Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Popup Maker – Popup Forms, Optins & More |
Version | 1.16.5 |
Comparing to | |
See all releases |
Code changes from version 1.16.4 to 1.16.5
- assets/js/admin-general.js +0 -3
- assets/js/admin-general.min.js +1 -1
- classes/Cookies.php +1 -1
- includes/functions/popups/template.php +14 -12
- popup-maker.php +2 -2
- readme.txt +13 -2
assets/js/admin-general.js
CHANGED
@@ -1475,9 +1475,6 @@ function pumChecked(val1, val2, print) {
|
|
1475 |
}
|
1476 |
|
1477 |
function encode(pair) {
|
1478 |
-
|
1479 |
-
console.log(pair);
|
1480 |
-
|
1481 |
switch ($('[name="' + pair.name + '"]', $form).attr("type")) {
|
1482 |
|
1483 |
|
1475 |
}
|
1476 |
|
1477 |
function encode(pair) {
|
|
|
|
|
|
|
1478 |
switch ($('[name="' + pair.name + '"]', $form).attr("type")) {
|
1479 |
|
1480 |
|
assets/js/admin-general.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function pumSelected(e,t,n){"use strict";var i=!1;return("object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)||"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)||e===t)&&(i=!0),void 0!==n&&n?i?' selected="selected"':"":i}function pumChecked(e,t,n){"use strict";var i=!1;return("object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)||"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)||e===t)&&(i=!0),void 0!==n&&n?i?' checked="checked"':"":i}!function(i){i(function(){i(".pum-enabled-toggle-button").on("change",function(e){e.preventDefault();var t=i(this),n=0;!0===e.target.checked&&(n=1),e=t.data("popup-id"),n=n,t=t.data("nonce"),i.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"pum_save_enabled_state",nonce:t,popupID:e,enabled:n}})})})}(jQuery),function(o){"use strict";var e=o(".pum-alerts"),a=o(".pum-alert-count"),l=parseInt(a.eq(0).text());function u(){0===e.find(".pum-alert-holder").length&&(e.slideUp(100,function(){e.remove()}),o("#menu-posts-popup .wp-menu-name .update-plugins").fadeOut())}o(document).on("pumDismissAlert",u).on("click",".pum-alert-holder .pum-dismiss",function(e){var t,n=o(this),i=n.parents(".pum-alert-holder"),r=n.data("reason")||"maybe_later",s=o(this).data("action")||"dismiss";e.preventDefault(),"review_request"!==i.data("code")?(n=s,s="1"===(s=(e=i).data("dismissible"))||1===s||!0===s?null:s,o.ajax({method:"POST",dataType:"json",url:ajaxurl,data:{action:"pum_alerts_action",nonce:window.pum_alerts_nonce,code:e.data("code"),expires:s,pum_dismiss_alert:n}})):(r=r,o.ajax({method:"POST",dataType:"json",url:ajaxurl,data:{action:"pum_review_action",nonce:window.pum_review_nonce,group:window.pum_review_trigger.group,code:window.pum_review_trigger.code,pri:window.pum_review_trigger.pri,reason:r}}),void 0!==window.pum_review_api_url&&o.ajax({method:"POST",dataType:"json",url:window.pum_review_api_url,data:{trigger_group:window.pum_review_trigger.group,trigger_code:window.pum_review_trigger.code,reason:r,uuid:window.pum_review_uuid||null}})),t=i,l--,a.text(l),t.fadeTo(100,0,function(){t.slideUp(100,function(){t.remove(),u()})})})}(jQuery),function(i){"use strict";var e={init:function(){i(".pum-color-picker").filter(":not(.pum-color-picker-initialized)").addClass("pum-color-picker-initialized").wpColorPicker({change:function(e,t){i(e.target).trigger("colorchange",t)},clear:function(e){i(e.target).prev().trigger("colorchange").wpColorPicker("close")},hide:!0})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.colorpicker=e,i(document).on("click",".iris-palette",function(){i(this).parents(".wp-picker-active").find("input.pum-color-picker").trigger("change")}).on("colorchange",function(e,t){var n=i(e.target),e="";void 0!==t&&void 0!==t.color&&(e=t.color.toString()),n.val(e).trigger("change"),"popup_theme"===i("form#post input#post_type").val()&&PUM_Admin.utils.debounce(PUM_Admin.themeEditor.refresh_preview,100)}).on("pum_init",e.init)}(jQuery),function(p){"use strict";var u={init:function(){u.checkDependencies()},checkDependencies:function(e){var t=p(e);(e=t.length?t:p("[data-pum-dependencies]:not([data-pum-processed-dependencies])")).each(function(){var e,a=p(this),l=a.data("id"),u=a.data("pum-processed-dependencies")||{},c=Object.keys(u).length,d=0,t=a.data("pum-dependent-fields");if(!a.data("pum-processed-dependencies")){for(e in u="string"==typeof(u=a.data("pum-dependencies"))?JSON.parse(u):u)u.hasOwnProperty(e)&&("string"==typeof u[e]?-1!==u[e].indexOf(",")?u[e]=u[e].split(","):u[e]=[u[e]]:"number"==typeof u[e]&&(u[e]=[u[e]]));c=Object.keys(u).length,a.data("pum-processed-dependencies",u).attr("data-pum-processed-dependencies",u)}t||(t=p.map(u,function(e,t){t=p('.pum-field[data-id="'+t+'"]');return t.length?t.eq(0):null}),a.data("pum-dependent-fields",t)),p(t).each(function(){var e=p(this),t=e.find(":input:first"),n=e.data("id"),i=t.val(),r=u[n],n=e.data("pum-field-dependents")||[];if(-1===n.indexOf(l)&&(n.push(l),e.data("pum-field-dependents",n)),null==r)return a.removeClass("pum-dependencies-met").hide(0).trigger("pumFormDependencyUnmet"),!1;if(e.hasClass("pum-field-radio")&&(i=e.find(":input:checked").val()),e.hasClass("pum-field-multicheck")&&(i=[],e.find(":checkbox:checked").each(function(e){i[e]=p(this).val(),"string"!=typeof i[e]||isNaN(parseInt(i[e]))||(i[e]=parseInt(i[e]))})),e.hasClass("pum-field-select")||e.hasClass("pum-field-radio"))s=r&&-1!==r.indexOf(i);else if(e.hasClass("pum-field-checkbox"))s=r===t.is(":checked");else if(e.hasClass("pum-field-multicheck"))if(Array.isArray(r))for(var s=!1,o=0;o<r.length;o++)-1!==i.indexOf(r[o])&&(s=!0);else s=-1!==i.indexOf(r);else s=Array.isArray(r)?-1!==r.indexOf(i):r==i;if(!s)return a.removeClass("pum-dependencies-met").hide(0).trigger("pumFormDependencyUnmet"),!1;++d===c&&a.addClass("pum-dependencies-met").show(0).trigger("pumFormDependencyMet")})})},form_check:function(){p(document).trigger("pum_form_check")},is_field:function(e){return"object"==typeof e&&0<=[void 0===e.type&&(void 0!==e.label||void 0!==e.desc),void 0!==e.type&&"string"==typeof e.type].indexOf(!0)},flattenFields:function(e){var i={},t=e.tabs||{},n=e.sections||{},e=e.fields||{};return Object.keys(t).length&&Object.keys(n).length?_.each(e,function(e,t){"object"==typeof e&&Object.keys(e).length&&_.each(e,function(e,t){var n;"object"==typeof e&&Object.keys(e).length&&(u.is_field(e)&&((n={})[t]=e,t="main",e=n),_.each(e,function(e){i[e.id]=e}))})}):Object.keys(t).length?_.each(e,function(e,t){"object"==typeof e&&Object.keys(e).length&&_.each(e,function(e){i[e.id]=e})}):Object.keys(n).length?_.each(e,function(e,t){_.each(e,function(e){i[e.id]=e})}):(e=u.parseFields(e,values),_.each(e,function(e){i[e.id]=e})),i},parseFields:function(n,i){return i=i||{},_.each(n,function(e,t){n[t]=PUM_Admin.models.field(e),"object"!=typeof n[t].meta&&(n[t].meta={}),void 0!==i[t]&&(n[t].value=i[t]),""===n[t].id&&(n[t].id=t)}),n},renderTab:function(){},renderSection:function(){},render:function(e,r,t){var n,i=[],s={},o=p.extend(!0,{id:"",tabs:{},sections:{},fields:{},maintabs:{},subtabs:{}},e),a=p.extend({id:o.id,classes:[],tabs:{},vertical:!0,form:!0,meta:{"data-min-height":250}},o.maintabs),l=p.extend({classes:["link-tabs","sub-tabs"],tabs:{}},o.subtabs),e=["pum-dynamic-form"];return r=r||{},Object.keys(o.tabs).length&&Object.keys(o.sections).length?(e.push("tabbed-content"),_.each(o.fields,function(e,i){"object"==typeof e&&Object.keys(e).length&&(void 0===a.tabs[i]&&(a.tabs[i]={label:o.tabs[i],content:""}),l=p.extend(l,{id:o.id+"-"+i+"-subtabs",tabs:{}}),_.each(e,function(e,t){var n;"object"==typeof e&&Object.keys(e).length&&(u.is_field(e)&&((n={})[t]=e,t="main",e=n),void 0===l.tabs[t]&&(l.tabs[t]={label:o.sections[i][t],content:""}),e=u.parseFields(e,r),_.each(e,function(e){s[e.id]=e,l.tabs[t].content+=PUM_Admin.templates.field(e)}),""===l.tabs[t].content&&delete l.tabs[t])}),Object.keys(l.tabs).length?a.tabs[i].content=PUM_Admin.templates.tabs(l):delete a.tabs[i])}),Object.keys(a.tabs).length&&(n=PUM_Admin.templates.tabs(a))):Object.keys(o.tabs).length?(e.push("tabbed-content"),_.each(o.fields,function(e,t){"object"==typeof e&&Object.keys(e).length&&(void 0===a.tabs[t]&&(a.tabs[t]={label:o.tabs[t],content:""}),i=[],e=u.parseFields(e,r),_.each(e,function(e){s[e.id]=e,i.push(PUM_Admin.templates.field(e))}),i.length?a.tabs[t].content=PUM_Admin.templates.section({fields:i}):delete a.tabs[t])}),Object.keys(a.tabs).length&&(n=PUM_Admin.templates.tabs(a))):Object.keys(o.sections).length?_.each(o.fields,function(e,t){(i=[]).push(PUM_Admin.templates.field({type:"heading",desc:o.sections[t]||""})),e=u.parseFields(e,r),_.each(e,function(e){s[e.id]=e,i.push(PUM_Admin.templates.field(e))}),n+=PUM_Admin.templates.section({fields:i})}):(o.fields=u.parseFields(o.fields,r),_.each(o.fields,function(e){s[e.id]=e,i.push(PUM_Admin.templates.field(e))}),n=PUM_Admin.templates.section({fields:i})),void 0!==t&&t.length&&t.addClass(e.join(" ")).data("form_fields",s).html(n).trigger("pum_init"),n},parseValues:function(e,t){if(!(t=t||!1))return e;for(var n in t)t.hasOwnProperty(n)&&(e.hasOwnProperty(n+"_unit")&&(e[n]+=e[n+"_unit"],delete e[n+"_unit"]),void 0!==e[n]?t[n].allow_html&&!PUM_Admin.utils.htmlencoder.hasEncoded(e[n])&&(e[n]=PUM_Admin.utils.htmlencoder.htmlEncode(e[n])):"checkbox"===t[n].type&&(e[n]=!1));return e}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.forms=u,p(document).on("pum_init pum_form_check",function(){PUM_Admin.forms.init()}).on("pumFieldChanged",".pum-field",function(){var e,t=p(this).data("pum-field-dependents")||[],n=p();if(t&&!(t.length<=0)){for(e=0;e<t.length;e++)n=n.add('.pum-field[data-id="'+t[e]+'"]');PUM_Admin.forms.checkDependencies(n)}}).on("pumFieldChanged",".pum-field-dynamic-desc",function(){var e=p(this),t=e.find(":input"),n=e.parents(".pum-dynamic-form:first"),i=t.val(),r=(n.data("form_fields")||{})[e.data("id")]||{},t=e.find(".pum-desc"),n=e.data("pum-dynamic-desc");"radio"===r.type&&(i=e.find(":input:checked").val()),r.value=i,n&&n.length&&t.html(PUM_Admin.templates.renderInline(n,r))}).on("change",".pum-field-select select",function(){p(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-checkbox input",function(){p(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-multicheck input",function(){p(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-radio input",function(e){var t=p(this),n=t.parents("li"),t=t.parents(".pum-field");t.trigger("pumFieldChanged"),t.find("li.pum-selected").removeClass("pum-selected"),n.addClass("pum-selected")})}(jQuery),function(r){"use strict";var i,s,o=r("html"),t=r(document),a="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",e={_current:null,forceFocus:function(e){PUM_Admin.modals._current&&!PUM_Admin.modals._current.contains(e.target)&&(e.stopPropagation(),PUM_Admin.modals._current.focus())},trapEscapeKey:function(e){27===e.keyCode&&(PUM_Admin.modals.closeAll(),e.preventDefault())},trapTabKey:function(e){var t,n,i;9===e.keyCode&&(t=PUM_Admin.modals._current.find("*").filter(a).filter(":visible"),i=r(":focus"),n=t.length,i=t.index(i),e.shiftKey?0===i&&(t.get(n-1).focus(),e.preventDefault()):i===n-1&&(t.get(0).focus(),e.preventDefault()))},setFocusToFirstItem:function(){PUM_Admin.modals._current.find(".pum-modal-content *").filter(a).filter(":visible").first().focus()},closeAll:function(e){r(".pum-modal-background").off("keydown.pum_modal").hide(0,function(){r("html").css({overflow:"visible",width:"auto"}),i&&(i.attr("aria-hidden","false"),i=null),s.length&&s.focus(),PUM_Admin.modals._current=null,t.off("focus.pum_modal"),void 0!==e&&e()}).attr("aria-hidden","true")},show:function(e,t){r(".pum-modal-background").off("keydown.pum_modal").hide(0).attr("aria-hidden","true"),o.data("origwidth",o.innerWidth()).css({overflow:"hidden",width:o.innerWidth()});var n=r(":focus");n.parents(".pum-modal-wrap").length||(s=n),PUM_Admin.modals._current=r(e),PUM_Admin.modals._current.on("keydown.pum_modal",function(e){PUM_Admin.modals.trapEscapeKey(e),PUM_Admin.modals.trapTabKey(e)}).show(0,function(){(i=r("body > *").filter(":visible").not(PUM_Admin.modals._current)).attr("aria-hidden","true"),PUM_Admin.modals._current.trigger("pum_init").on("focus.pum_modal",PUM_Admin.modals.forceFocus),PUM_Admin.modals.setFocusToFirstItem(),void 0!==t&&t()}).attr("aria-hidden","false")},remove:function(e){r(e).remove()},replace:function(e,t){PUM_Admin.modals.remove(r.trim(e)),r("body").append(r.trim(t))},reload:function(e,t,n){PUM_Admin.modals.replace(e,t),PUM_Admin.modals.show(e,n),r(e).trigger("pum_init")}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.modals=e,r(document).on("click",".pum-modal-background, .pum-modal-wrap .cancel, .pum-modal-wrap .pum-modal-close",function(e){var t=r(e.target);(t.hasClass("cancel")||t.hasClass("pum-modal-close")||t.hasClass("submitdelete"))&&(PUM_Admin.modals.closeAll(),e.preventDefault(),e.stopPropagation())})}(jQuery),function(t){"use strict";var e={field:function(e){return t.extend(!0,{},{type:"text",id:"",id_prefix:"",name:"",label:null,placeholder:"",desc:null,dynamic_desc:null,size:"regular",classes:[],dependencies:"",value:null,select2:!1,allow_html:!1,multiple:!1,as_array:!1,options:[],object_type:null,object_key:null,std:null,min:0,max:50,force_minmax:!1,step:1,unit:"px",units:{},required:!1,desc_position:"bottom",meta:{}},e)}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.models=e}(jQuery),function(a){"use strict";var s={cloneables:{slider:a('<input type="range" class="pum-range-slider" />'),plus:a('<button type="button" class="pum-range-plus">+</button>'),minus:a('<button type="button" class="pum-range-minus">-</button>')},init:function(){a(".pum-field-rangeslider:not(.pum-rangeslider-initialized)").each(function(){var e=a(this).addClass("pum-rangeslider-initialized").find("input.pum-range-manual"),t=s.cloneables.slider.clone(),n=s.cloneables.plus.clone(),i=s.cloneables.minus.clone(),r={force:e.data("force-minmax"),min:parseInt(e.attr("min"),10)||0,max:parseInt(e.attr("max"),10)||100,step:parseInt(e.attr("step"),10)||1,value:parseInt(e.attr("value"),10)||0};r.force&&r.value>r.max&&(r.value=r.max,e.val(r.value)),t.prop({min:r.min||0,max:r.force||r.max&&r.max>r.value?r.max:1.5*r.value,step:r.step||1.5*r.value/100,value:r.value}).on("change input",function(){e.trigger("input")}),e.next().after(i,n),e.before(t)})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.rangesliders=s,a(document).on("pum_init",PUM_Admin.rangesliders.init).on("input",".pum-field-rangeslider.pum-rangeslider-initialized .pum-range-slider",function(){var e=a(this);e.siblings(".pum-range-manual").val(e.val())}).on("change",".pum-range-manual",function(){var e=a(this),t=parseInt(e.prop("max"),0),n=parseInt(e.prop("min"),0),i=parseInt(e.prop("step"),0),r=e.data("force-minmax"),s=parseInt(e.val(),0),o=e.prev();isNaN(s)&&(s=o.val()),r&&t<s?s=t:r&&s<n&&(s=n),e.val(s).trigger("input"),o.prop({max:r||t&&s<t?t:1.5*s,step:i||1.5*s/100,value:s})}).on("click",".pum-range-plus",function(e){var t=a(this).siblings(".pum-range-manual"),n=parseInt(t.prop("max"),0),i=parseInt(t.prop("step"),0),r=t.data("force-minmax"),s=parseInt(t.val(),0),o=t.prev();e.preventDefault(),s+=i,isNaN(s)&&(s=o.val()),r&&n<s&&(s=n),t.val(s).trigger("input"),o.val(s)}).on("click",".pum-range-minus",function(e){var t=a(this).siblings(".pum-range-manual"),n=parseInt(t.prop("min"),0),i=parseInt(t.prop("step"),0),r=t.data("force-minmax"),s=parseInt(t.val(),0),o=t.prev();e.preventDefault(),s-=i,isNaN(s)&&(s=o.val()),r&&s<n&&(s=n),t.val(s).trigger("input"),o.val(s)})}(jQuery),function(o){"use strict";o.fn.pumselect2=o.fn.pumselect2||o.fn.select2;var e={init:function(){o(".pum-field-select2 select").filter(":not(.pumselect2-initialized)").each(function(){var n=o(this),t=n.data("current")||n.val(),i=n.data("objecttype"),r=n.data("objectkey"),s=n.data("objectexcludes")||null,e={width:"100%",multiple:!1,dropdownParent:n.parent()};n.attr("multiple")&&(e.multiple=!0),i&&r&&(e=o.extend(e,{ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(e){return{s:e.term,paged:e.page,action:"pum_object_search",object_type:i,object_key:r,exclude:s}},processResults:function(e,t){return t.page=t.page||1,{results:e.items,pagination:{more:10*t.page<e.total_count}}},cache:!0},cache:!0,escapeMarkup:function(e){return e},maximumInputLength:20,closeOnSelect:!e.multiple,templateResult:PUM_Admin.select2.formatObject,templateSelection:PUM_Admin.select2.formatObjectSelection})),n.addClass("pumselect2-initialized").pumselect2(e),null!=t?e.multiple&&"object"!=typeof t&&""!==t?t=[t]:e.multiple||""!==t||(t=null):t=null,i&&r&&null!==t&&("number"==typeof t||t.length)?o.ajax({url:ajaxurl,data:{action:"pum_object_search",object_type:i,object_key:r,exclude:s,include:t&&t.length?"string"==typeof t||"number"==typeof t?[t]:t:null},dataType:"json",success:function(e){o.each(e.items,function(e,t){n.find('option[value="'+t.id+'"]').length||n.prepend('<option value="'+t.id+'">'+t.text+"</option>")}),n.val(t).trigger("change")}}):(t&&(e.multiple&&t.length||!e.multiple&&""!==t)||null===t)&&n.val(t).trigger("change")})},formatObject:function(e){return e.text},formatObjectSelection:function(e){return e.text||e.text}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.select2=e,o(document).on("pum_init",function(){PUM_Admin.select2.init()})}(jQuery),function(n,i){var r,s,o,a;"function"!=typeof window.$$&&(r={},s={},window.$$=function(e,t){return t?((o=t.selector)&&(t=o),(a=s[t])===i&&(a=s[t]={}),(o=a[e])!==i?o:a[e]=n(e,$$(t))):(o=r[e])!==i?o:r[e]=n(e)},window.$$clear=function(e,t){t?((o=t.selector)&&(t=o),e&&(o=s[t])&&(o[e]=i),s[t]=i):e?(r[e]=i,s[e]=i):(r={},s={})},window.$$fresh=function(e,t){return $$clear(e,t),$$(e,t)})}(jQuery),function(e,t){var n;"function"==typeof define&&define.amd?define(["exports","jquery"],t):"undefined"!=typeof exports?(n=require("jquery"),t(exports,n)):t(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,s){var l={validate:/^[a-z_][a-z0-9_]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i,key:/[a-z0-9_]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_]+$/i};function t(i,t){var n={},o={};function a(e,t,n){return e[t]=n,e}function r(e,t){var n,i=e.match(l.key),r=document.querySelector('[name="'+e+'"]'),s=!1;if("INPUT"===r.tagName?s=r.type:"SELECT"===r.tagName?s="select":"TEXTAREA"===r.tagName&&(s="textarea"),0<=["textarea","text"].indexOf(s))try{t=JSON.parse(t)}catch(e){}for(;void 0!==(n=i.pop());)l.push.test(n)?t=a([],function(e){void 0===o[e]&&(o[e]=0);return o[e]++}(e.replace(/\[\]$/,"")),t):l.fixed.test(n)?t=a([],n,t):l.named.test(n)&&(t=a({},n,t));return t}function e(){return n}this.addPair=function(e){return l.validate.test(e.name)&&(e=r(e.name,(e=e,console.log(e),"checkbox"===s('[name="'+e.name+'"]',t).attr("type")&&"1"===e.value||e.value)),n=i.extend(!0,n,e)),this},this.addPairs=function(e){if(!i.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var t=0,n=e.length;t<n;t++)this.addPair(e[t]);return this},this.serialize=e,this.serializeJSON=function(){return JSON.stringify(n)}}return t.patterns=l,t.serializeObject=function(){var e=(this.is("form")?this:this.find(":input")).serializeArray();return new t(s,this).addPairs(e).serialize()},t.serializeJSON=function(){var e=(this.is("form")?this:this.find(":input")).serializeArray();return new t(s,this).addPairs(e).serializeJSON()},void 0!==s.fn&&(s.fn.pumSerializeObject=t.serializeObject,s.fn.pumSerializeJSON=t.serializeJSON),e.FormSerializer=t}),function(o){"use strict";var e={init:function(){o(".pum-tabs-container").filter(":not(.pum-tabs-initialized)").each(function(){var e=o(this).addClass("pum-tabs-initialized"),t=e.find("> ul.tabs"),n=t.find("> li:first"),i=e.data("min-height");e.hasClass("vertical-tabs")&&(t=i&&0<i?i:t.eq(0).outerHeight(!0),e.css({minHeight:t+"px"}),e.parent().innerHeight<t&&e.parent().css({minHeight:t+"px"})),n.trigger("click")})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.tabs=e,o(document).on("pum_init",PUM_Admin.tabs.init).on("click",".pum-tabs-initialized li.tab",function(e){var t=o(this),n=t.parents(".pum-tabs-container:first"),i=n.find("> ul.tabs > li.tab"),r=n.find("> div.tab-content"),s=t.find("a").attr("href");i.removeClass("active"),r.removeClass("active"),t.addClass("active"),n.find("> div.tab-content"+s).addClass("active"),e.preventDefault()})}(jQuery),function(n){"use strict";var t=pum_admin_vars.I10n,e={render:function(e,t){e=wp.template(e);return void 0!==(t=t||{}).classes&&Array.isArray(t.classes)&&(t.classes=t.classes.join(" ")),e(t=PUM_Admin.templates.prepareMeta(t))},renderInline:function(e,t){return _.template(e,null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"})(t)},shortcode:function(e){var t=n.extend(!0,{},{tag:"",meta:{},has_content:!1,content:""},e),e=t.has_content?"pum-shortcode-w-content":"pum-shortcode";return PUM_Admin.templates.render(e,t)},modal:function(e){e=n.extend(!0,{},{id:"",title:"",description:"",classes:"",save_button:t.save,cancel_button:t.cancel,content:""},e);return PUM_Admin.templates.render("pum-modal",e)},tabs:function(e){return"string"==typeof(e=n.extend(!0,{},{id:"",vertical:!1,form:!1,classes:[],tabs:{},meta:{}},e)).classes&&(e.classes=[e.classes]),e.form&&e.classes.push("pum-tabbed-form"),e.meta["data-tab-count"]=Object.keys(e.tabs).length,e.classes.push(e.vertical?"vertical-tabs":"horizontal-tabs"),e.classes=e.classes.join(" "),PUM_Admin.templates.render("pum-tabs",e)},section:function(e){e=n.extend(!0,{},{classes:[],fields:[]},e);return PUM_Admin.templates.render("pum-field-section",e)},fieldArgs:function(e){var r=[],s=n.extend(!0,{},PUM_Admin.models.field(e));switch(void 0===e.std||"checkbox"===e.type||null!==s.value&&!1!==s.value||(s.value=e.std),"string"==typeof s.classes&&(s.classes=s.classes.split(" ")),void 0!==e.class&&s.classes.push(e.class),void 0!==e.dependencies&&"object"==typeof e.dependencies&&(s.dependencies=JSON.stringify(e.dependencies)),s.required&&(s.meta.required=!0,s.classes.push("pum-required")),"string"==typeof s.dynamic_desc&&s.dynamic_desc.length&&(s.classes.push("pum-field-dynamic-desc"),s.desc=PUM_Admin.templates.renderInline(s.dynamic_desc,s)),s.allow_html&&(s.classes.push("pum-field-"+s.type+"--html"),"string"==typeof s.value&&""!==s.value&&PUM_Admin.utils.htmlencoder.hasEncoded(s.value)&&(s.value=PUM_Admin.utils.htmlencoder.htmlDecode(s.value))),e.type){case"select":case"objectselect":case"postselect":case"taxonomyselect":void 0!==s.options&&(_.each(s.options,function(e,t){var i,n=!1;"object"!=typeof e?(null===s.value||(s.multiple&&("string"==typeof s.value&&s.value==t||Array.isArray(s.value)&&-1!==s.value.indexOf(t)||!Array.isArray(s.value)&&"object"==typeof s.value&&Object.keys(s.value).length&&void 0!==s.value[t])||!s.multiple&&s.value==t)&&(n="selected"),r.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))):(t=t,i=[],_.each(e,function(e,t){var n=!1;null===s.value||(s.multiple&&("string"==typeof s.value&&s.value==t||Array.isArray(s.value)&&-1!==s.value.indexOf(t)||!Array.isArray(s.value)&&"object"==typeof s.value&&Object.keys(s.value).length&&void 0!==s.value[t])||!s.multiple&&s.value==t)&&(n="selected"),i.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))}),r.push({label:t,options:i}))}),s.options=r),s.multiple&&(s.meta.multiple=!0,s.as_array&&(s.name+="[]"),s.value&&s.value.length||(s.value=[]),"string"==typeof s.value&&(s.value=[s.value])),"select"!==e.type&&(s.select2=!0,s.classes.push("pum-field-objectselect"),s.classes.push("postselect"===e.type?"pum-field-postselect":"pum-field-taxonomyselect"),s.meta["data-objecttype"]="postselect"===e.type?"post_type":"taxonomy",s.meta["data-objectkey"]="postselect"===e.type?e.post_type:e.taxonomy,s.meta["data-current"]="object"==typeof s.value||Array.isArray(s.value)?JSON.stringify(s.value):s.value),s.select2&&(s.classes.push("pum-field-select2"),s.placeholder&&(s.meta["data-placeholder"]=s.placeholder));break;case"radio":void 0!==s.options&&(_.each(s.options,function(e,t){r.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{checked:s.value===t}}))}),s.options=r);break;case"multicheck":void 0!==s.options&&(!1!==s.value&&null!==s.value||(s.value=[]),"string"==typeof s.value&&s.value.indexOf(",")&&(s.value=s.value.split(",")),s.as_array&&(s.name+="[]"),_.each(s.options,function(e,t){r.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{checked:Array.isArray(s.value)&&-1!==s.value.indexOf(t)||!Array.isArray(s.value)&&"object"==typeof s.value&&Object.keys(s.value).length&&void 0!==s.value[t]}}))}),s.options=r);break;case"checkbox":switch(typeof s.value){case"object":Array.isArray(s.value)&&1===s.value.length&&"1"===s.value[0].toString()&&(s.value=!0,s.meta.checked=!0);break;case"boolean":s.value&&(s.meta.checked=!0);break;case"string":"true"!==s.value&&"yes"!==s.value&&"1"!==s.value||(s.meta.checked=!0);break;case"number":(1===parseInt(s.value,10)||0<parseInt(s.value,10))&&(s.meta.checked=!0)}break;case"rangeslider":s.meta.step=s.step,s.meta.min=s.min,s.meta.max=s.max,s.meta["data-force-minmax"]=s.force_minmax.toString();break;case"textarea":s.meta.cols=s.cols,s.meta.rows=s.rows;break;case"measure":"string"==typeof s.value&&""!==s.value?(s.number=parseInt(s.value),s.unitValue=s.value.replace(s.number,""),s.value=s.number):s.unitValue=null,void 0!==s.units&&(_.each(s.units,function(e,t){var n=!1;s.unitValue==t&&(n="selected"),r.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))}),s.units=r);break;case"color":"string"==typeof s.value&&""!==s.value&&(s.meta["data-default-color"]=s.value);break;case"license_key":s.value=n.extend({key:"",license:{},messages:[],status:"empty",expires:!1,classes:!1},s.value),s.classes.push("pum-license-"+s.value.status+"-notice"),s.value.classes&&s.classes.push(s.value.classes)}return s},field:function(e){var t=PUM_Admin.templates.fieldArgs(e),e="pum-field-"+t.type;return"objectselfect"!==t.type&&"postselect"!==t.type&&"taxonomyselect"!==t.type||(e="pum-field-select"),n("#tmpl-"+e).length?(t.field=PUM_Admin.templates.render(e,t),PUM_Admin.templates.render("pum-field-wrapper",t)):(console.warn("No field template found for type:"+t.type+" fieldID: "+t.id),"")},prepareMeta:function(e){var t,n=[];for(t in e.meta)e.meta.hasOwnProperty(t)&&("boolean"==typeof e.meta[t]?e.meta[t]&&n.push(_.escape(t)):n.push(_.escape(t)+'="'+_.escape(e.meta[t])+'"'));return e.meta=n.join(" "),e}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.templates=e}(window.jQuery),function(i){"use strict";String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};var r="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),s="select,textarea".split(","),o=/\[([^\]]*)\]/g;function a(e,t){return-1!==i.inArray(t,e)}var e={EncodeType:"entity",isEmpty:function(e){return!e||(null===e||0==e.length||/^\s+$/.test(e))},arr1:[" ","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ",""","&","<",">","Œ","œ","Š","š","Ÿ","ˆ","˜"," "," "," ","‌","‍","‎","‏","–","—","‘","’","‚","“","”","„","†","‡","‰","‹","›","€","ƒ","Α","Β","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω","α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","ς","σ","τ","υ","φ","χ","ψ","ω","ϑ","ϒ","ϖ","•","…","′","″","‾","⁄","℘","ℑ","ℜ","™","ℵ","←","↑","→","↓","↔","↵","⇐","⇑","⇒","⇓","⇔","∀","∂","∃","∅","∇","∈","∉","∋","∏","∑","−","∗","√","∝","∞","∠","∧","∨","∩","∪","∫","∴","∼","≅","≈","≠","≡","≤","≥","⊂","⊃","⊄","⊆","⊇","⊕","⊗","⊥","⋅","⌈","⌉","⌊","⌋","⟨","⟩","◊","♠","♣","♥","♦"],arr2:[" ","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ",""","&","<",">","Œ","œ","Š","š","Ÿ","ˆ","˜"," "," "," ","‌","‍","‎","‏","–","—","‘","’","‚","“","”","„","†","‡","‰","‹","›","€","ƒ","Α","Β","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω","α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","ς","σ","τ","υ","φ","χ","ψ","ω","ϑ","ϒ","ϖ","•","…","′","″","‾","⁄","℘","ℑ","ℜ","™","ℵ","←","↑","→","↓","↔","↵","⇐","⇑","⇒","⇓","⇔","∀","∂","∃","∅","∇","∈","∉","∋","∏","∑","−","∗","√","∝","∞","∠","∧","∨","∩","∪","∫","∴","∼","≅","≈","≠","≡","≤","≥","⊂","⊃","⊄","⊆","⊇","⊕","⊗","⊥","⋅","⌈","⌉","⌊","⌋","〈","〉","◊","♠","♣","♥","♦"],HTML2Numerical:function(e){return this.swapArrayVals(e,this.arr1,this.arr2)},NumericalToHTML:function(e){return this.swapArrayVals(e,this.arr2,this.arr1)},numEncode:function(e){if(this.isEmpty(e))return"";for(var t=[],n=e.length,i=0;i<n;i++){var r=e.charAt(i);r<" "||"~"<r?(t.push("&#"),t.push(r.charCodeAt()),t.push(";")):t.push(r)}return t.join("")},htmlDecode:function(e){var t,n,i=e;if(this.isEmpty(i))return"";var r=(i=this.HTML2Numerical(i)).match(/&#[0-9]{1,5};/g);if(null!=r)for(var s=0;s<r.length;s++)i=-32768<=(t=(n=r[s]).substring(2,n.length-1))&&t<=65535?i.replace(n,String.fromCharCode(t)):i.replace(n,"");return i},htmlEncode:function(e,t){return this.isEmpty(e)?"":((t=t||!1)&&(e="numerical"==this.EncodeType?e.replace(/&/g,"&"):e.replace(/&/g,"&")),e=this.XSSEncode(e,!1),"numerical"!=this.EncodeType&&t||(e=this.HTML2Numerical(e)),e=this.numEncode(e),t||(e=e.replace(/&#/g,"##AMPHASH##"),e=(e="numerical"==this.EncodeType?e.replace(/&/g,"&"):e.replace(/&/g,"&")).replace(/##AMPHASH##/g,"&#")),e=e.replace(/&#\d*([^\d;]|$)/g,"$1"),t||(e=this.correctEncoding(e)),e="entity"==this.EncodeType?this.NumericalToHTML(e):e)},XSSEncode:function(e,t){return this.isEmpty(e)?"":e=(t=t||!0)?(e=(e=(e=e.replace(/\'/g,"'")).replace(/\"/g,""")).replace(/</g,"<")).replace(/>/g,">"):(e=(e=(e=e.replace(/\'/g,"'")).replace(/\"/g,""")).replace(/</g,"<")).replace(/>/g,">")},hasEncoded:function(e){return!!/&#[0-9]{1,5};/g.test(e)||!!/&[A-Z]{2,6};/gi.test(e)},stripUnicode:function(e){return e.replace(/[^\x20-\x7E]/g,"")},correctEncoding:function(e){return e.replace(/(&)(amp;)+/,"$1")},swapArrayVals:function(e,t,n){if(this.isEmpty(e))return"";var i;if(t&&n&&t.length==n.length)for(var r=0,s=t.length;r<s;r++)i=new RegExp(t[r],"g"),e=e.replace(i,n[r]);return e},inArray:function(e,t){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}};e.EncodeType="entity",e={htmlencoder:e,convert_meta_to_object:function(e){var t,n,i,r={};for(i in e)e.hasOwnProperty(i)&&(t=i.split(/_(.+)?/)[0],n=i.split(/_(.+)?/)[1],void 0===r[t]&&(r[t]={}),r[t][n]=e[i]);return r},object_to_array:function(e){var t,n=[];if("object"==typeof e){for(t in e)n.push(e[t]);e=n}return e},checked:function(e,t,n){var i=!1;return("object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)||"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)||e===t||e==t)&&(i=!0),void 0!==n&&n?i?' checked="checked"':"":i},selected:function(e,t,n){var i=!1;return("object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)||"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)||e===t)&&(i=!0),void 0!==n&&n?i?' selected="selected"':"":i},convert_hex:function(e,t){return void 0===e?"":(void 0===t&&(t=100),e=e.replace("#",""),"rgba("+parseInt(e.substring(0,2),16)+","+parseInt(e.substring(2,4),16)+","+parseInt(e.substring(4,6),16)+","+t/100+")")},debounce:function(n,i){var r;return function(){var e=this,t=arguments;window.clearTimeout(r),r=window.setTimeout(function(){n.apply(e,t)},i)}},throttle:function(e,t){function n(){i=!1}var i=!1;return function(){i||(e(),window.setTimeout(n,t),i=!0)}},serializeForm:function(e){i.extend({},e);var t={},n=i.extend(!0,{include:[],exclude:[],includeByClass:""},e);return this.find(":input").each(function(){var e;!this.name||this.disabled||a(n.exclude,this.name)||n.include.length&&!a(n.include,this.name)||-1===this.className.indexOf(n.includeByClass)||(e=this.name.replace(o,"[$1").split("["))[0]&&(this.checked||a(r,this.type)||a(s,this.nodeName.toLowerCase()))&&("checkbox"===this.type&&e.push(""),function e(t,n,i){var r=n[0];1<n.length?(t[r]||(t[r]=n[1]?{}:[]),e(t[r],n.slice(1),i)):t[r=r||t.length]=i}(t,e,i(this).val()))}),t}},window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.utils=e,window.PUMUtils=e,i.fn.pumSerializeForm=e.serializeForm}(jQuery),function(e){"function"==typeof define&&void 0!==define.amd&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(t){var e,n,d,s,o,p,h,m,f,g,v,i,r,y,a,a=((c=t&&t.fn&&t.fn.pumselect2&&t.fn.pumselect2.amd?t.fn.pumselect2.amd:c)&&c.requirejs||(c?n=c:c={},m={},f={},g={},v={},i=Object.prototype.hasOwnProperty,r=[].slice,y=/\.js$/,p=function(e,t){var n,i,r=u(e),s=r[0];return e=r[1],s&&(n=w(s=l(s,t))),s?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return l(e,i)})):l(e,t):(s=(r=u(e=l(e,t)))[0],e=r[1],s&&(n=w(s))),{f:s?s+"!"+e:e,n:e,pr:s,p:n}},h={require:function(e){return b(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return g&&g.config&&g.config[t]||{}})};var t}},s=function(e,t,n,i){var r,s,o,a,l,u=[],c=typeof n;if(i=i||e,"undefined"==c||"function"==c){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(s=(o=p(t[a],i)).f))u[a]=h.require(e);else if("exports"===s)u[a]=h.exports(e),l=!0;else if("module"===s)r=u[a]=h.module(e);else if(_(m,s)||_(f,s)||_(v,s))u[a]=w(s);else{if(!o.p)throw new Error(e+" missing "+s);o.p.load(o.n,b(i,!0),function(t){return function(e){m[t]=e}}(s),{}),u[a]=m[s]}c=n?n.apply(m[e],u):void 0,e&&(r&&r.exports!==d&&r.exports!==m[e]?m[e]=r.exports:c===d&&l||(m[e]=c))}else e&&(m[e]=n)},e=n=o=function(e,t,n,i,r){if("string"==typeof e)return h[e]?h[e](t):w(p(e,t).f);if(!e.splice){if((g=e).deps&&o(g.deps,g.callback),!t)return;t.splice?(e=t,t=n,n=null):e=d}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?s(d,e,t,n):setTimeout(function(){s(d,e,t,n)},4),o},o.config=function(e){return o(e)},e._defined=m,(a=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),_(m,e)||_(f,e)||(f[e]=[e,t,n])}).amd={jQuery:!0},c.requirejs=e,c.require=n,c.define=a),c.define("almond",function(){}),c.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),c.define("pumselect2/utils",["jquery"],function(s){var e={};function u(e){var t,n=e.prototype,i=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&i.push(t);return i}e.Extend=function(e,t){var n,i={}.hasOwnProperty;function r(){this.constructor=e}for(n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},e.Decorate=function(i,r){var e=u(r),t=u(i);function s(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}r.displayName=i.displayName,s.prototype=new function(){this.constructor=s};for(var n=0;n<t.length;n++){var o=t[n];s.prototype[o]=i.prototype[o]}for(var a=0;a<e.length;a++){var l=e[a];s.prototype[l]=function(e){var t=function(){};e in s.prototype&&(t=s.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return s};function t(){this.listeners={}}return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice;this.listeners=this.listeners||{},e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var s=n[r];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),r==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=s(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){var n;"1.7"===s.fn.jquery.substr(0,3)&&(n=s(),s.map(t,function(e){n=n.add(e)}),t=n),e.append(t)},e}),c.define("pumselect2/results",["jquery","./utils"],function(d,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=d('<ul class="pumselect2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d('<li role="treeitem" aria-live="assertive" class="pumselect2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" pumselect2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".pumselect2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],i=this.option(i);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".pumselect2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.setClasses=function(){var n=this;this.data.current(function(e){var i=d.map(e,function(e){return e.id.toString()}),t=n.$results.find(".pumselect2-results__option[aria-selected]");t.each(function(){var e=d(this),t=d.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<d.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")});e=t.filter("[aria-selected=true]");(0<e.length?e:t).first().trigger("mouseenter")})},i.prototype.showLoading=function(e){this.hideLoading();e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},e=this.option(e);e.className+=" loading-results",this.$results.prepend(e)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="pumselect2-results__option";var n,i={role:"treeitem","aria-selected":"false"};for(n in e.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==e.id&&delete i["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(i.role="group",i["aria-label"]=e.text,delete i["aria-selected"]),i){var r=i[n];t.setAttribute(n,r)}if(e.children){var s=d(t),o=document.createElement("strong");o.className="pumselect2-results__group";d(o);this.template(e,o);for(var a=[],l=0;l<e.children.length;l++){var u=e.children[l],u=this.option(u);a.push(u)}var c=d("<ul></ul>",{class:"pumselect2-results__options pumselect2-results__options--nested"});c.append(a),s.append(o),s.append(c)}else this.template(e,t);return d.data(t,"data",e),t},i.prototype.bind=function(t,e){var r=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){r.clear(),r.append(e.data),t.isOpen()&&r.setClasses()}),t.on("results:append",function(e){r.append(e.data),t.isOpen()&&r.setClasses()}),t.on("query",function(e){r.hideMessages(),r.showLoading(e)}),t.on("select",function(){t.isOpen()&&r.setClasses()}),t.on("unselect",function(){t.isOpen()&&r.setClasses()}),t.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}),t.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=r.getHighlightedResults();0!==t.length&&(e=t.data("data"),"true"==t.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=r.getHighlightedResults(),n=r.$results.find("[aria-selected]"),i=n.index(t);0!==i&&(e=i-1,0===t.length&&(e=0),(i=n.eq(e)).trigger("mouseenter"),t=r.$results.offset().top,n=i.offset().top,i=r.$results.scrollTop()+(n-t),0===e?r.$results.scrollTop(0):n-t<0&&r.$results.scrollTop(i))}),t.on("results:next",function(){var e,t=r.getHighlightedResults(),n=r.$results.find("[aria-selected]"),i=n.index(t)+1;i>=n.length||((e=n.eq(i)).trigger("mouseenter"),t=r.$results.offset().top+r.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=r.$results.scrollTop()+n-t,0===i?r.$results.scrollTop(0):t<n&&r.$results.scrollTop(e))}),t.on("results:focus",function(e){e.element.addClass("pumselect2-results__option--highlighted")}),t.on("results:message",function(e){r.displayMessage(e)}),d.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-t+e.deltaY,t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=r.$results.height();t?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".pumselect2-results__option[aria-selected]",function(e){var t=d(this),n=t.data("data");"true"!==t.attr("aria-selected")?r.trigger("select",{originalEvent:e,data:n}):r.options.get("multiple")?r.trigger("unselect",{originalEvent:e,data:n}):r.trigger("close",{})}),this.$results.on("mouseenter",".pumselect2-results__option[aria-selected]",function(e){var t=d(this).data("data");r.getHighlightedResults().removeClass("pumselect2-results__option--highlighted"),r.trigger("results:focus",{data:t,element:d(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".pumselect2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e,t,n,i,r=this.getHighlightedResults();0!==r.length&&(e=this.$results.find("[aria-selected]").index(r),i=this.$results.offset().top,t=r.offset().top,n=this.$results.scrollTop()+(t-i),i=t-i,n-=2*r.outerHeight(!1),e<=2?this.$results.scrollTop(0):(i>this.$results.outerHeight()||i<0)&&this.$results.scrollTop(n))},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=i(e):d(t).append(e)},i}),c.define("pumselect2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),c.define("pumselect2/selection/base",["jquery","../utils","../keys"],function(n,e,r){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="pumselect2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.pumselect2."+e.id,function(e){var t=n(e.target).closest(".pumselect2");n(".pumselect2.pumselect2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").pumselect2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.pumselect2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),c.define("pumselect2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("pumselect2-selection--single"),e.html('<span class="pumselect2-selection__rendered"></span><span class="pumselect2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".pumselect2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".pumselect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){var t,n;0!==e.length?(t=e[0],n=this.$selection.find(".pumselect2-selection__rendered"),e=this.display(t,n),n.empty().append(e),n.prop("title",t.title||t.text)):this.clear()},r}),c.define("pumselect2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function r(e,t){r.__super__.constructor.apply(this,arguments)}return a.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("pumselect2-selection--multiple"),e.html('<ul class="pumselect2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".pumselect2-selection__choice__remove",function(e){var t;n.options.get("disabled")||(t=i(this).parent().data("data"),n.trigger("unselect",{originalEvent:e,data:t}))})},r.prototype.clear=function(){this.$selection.find(".pumselect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="pumselect2-selection__choice"><span class="pumselect2-selection__choice__remove" role="presentation">×</span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),s=this.display(i,r);r.append(s),r.prop("title",i.title||i.text),r.data("data",i),t.push(r)}var o=this.$selection.find(".pumselect2-selection__rendered");a.appendMany(o,t)}},r}),c.define("pumselect2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return t="string"==typeof t?{id:"",text:t}:t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("pumselect2-selection__placeholder").removeClass("pumselect2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".pumselect2-selection__rendered").append(t)},t}),c.define("pumselect2/selection/allowClear",["jquery","../keys"],function(n,i){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".pumselect2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".pumselect2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r<i.length;r++){var s={data:i[r]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=i.DELETE&&t.which!=i.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){e.call(this,t),0<this.$selection.find(".pumselect2-selection__placeholder").length||0===t.length||((e=n('<span class="pumselect2-selection__clear">×</span>')).data("data",t),this.$selection.find(".pumselect2-selection__rendered").prepend(e))},e}),c.define("pumselect2/selection/search",["jquery","../utils","../keys"],function(n,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=n('<li class="pumselect2-search pumselect2-search--inline"><input class="pumselect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");e=e.call(this);return this._transferTabIndex(),e},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".pumselect2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".pumselect2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".pumselect2-search--inline",function(e){var t;e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which!==s.BACKSPACE||""!==i.$search.val()||0<(t=i.$searchContainer.prev(".pumselect2-selection__choice")).length&&(t=t.data("data"),i.searchRemoveChoice(t),e.preventDefault())});var t=document.documentMode,r=t&&t<=11;this.$selection.on("input.searchcheck",".pumselect2-search--inline",function(e){r?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".pumselect2-search--inline",function(e){var t;r&&"input"===e.type?i.$selection.off("input.search input.searchcheck"):(t=e.which)!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".pumselect2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";e=""!==this.$search.attr("placeholder")?this.$selection.find(".pumselect2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",e)},t}),c.define("pumselect2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==o.inArray(e,r)&&(t=t||{},n=o.Event("pumselect2:"+e,{params:t}),i.$element.trigger(n),-1!==o.inArray(e,s)&&(t.prevented=n.isDefaultPrevented()))})},e}),c.define("pumselect2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){var t;return e in i._cache||(t=n(e),i._cache[e]=t),new i(i._cache[e])},i}),c.define("pumselect2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),c.define("pumselect2/data/base",["../utils"],function(n){function i(e,t){i.__super__.constructor.call(this)}return n.Extend(i,n.Observable),i.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},i.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},i.prototype.bind=function(e,t){},i.prototype.destroy=function(){},i.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},i}),c.define("pumselect2/data/select",["./base","../utils","jquery"],function(e,t,o){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var t=[],n=this;this.$element.find(":selected").each(function(){var e=o(this),e=n.item(e);t.push(e)}),e(t)},n.prototype.select=function(r){var e,s=this;if(r.selected=!0,o(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===o.inArray(i,t)&&t.push(i)}s.$element.val(t),s.$element.trigger("change")}):(e=r.id,this.$element.val(e),this.$element.trigger("change"))},n.prototype.unselect=function(r){var s=this;if(this.$element.prop("multiple")){if(r.selected=!1,o(r.element).is("option"))return r.element.selected=!1,void this.$element.trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===o.inArray(i,t)&&t.push(i)}s.$element.val(t),s.$element.trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){o.removeData(this,"data")})},n.prototype.query=function(t,e){var n=[],i=this;this.$element.children().each(function(){var e=o(this);(e.is("option")||e.is("optgroup"))&&(e=i.item(e),null!==(e=i.matches(t,e))&&n.push(e))}),e({results:n})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=o(t),e=this._normalizeItem(e);return e.element=t,o.data(t,"data",e),n},n.prototype.item=function(e){var t={};if(null!=(t=o.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){for(var t={text:e.prop("label"),children:[],title:e.prop("title")},n=e.children("option"),i=[],r=0;r<n.length;r++){var s=o(n[r]),s=this.item(s);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],o.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){o.isPlainObject(e)||(e={id:e,text:e});return null!=(e=o.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),o.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),c.define("pumselect2/data/array",["./select","../utils","jquery"],function(e,u,c){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return u.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),i=n.map(function(){return t.item(c(this)).id}).get(),r=[];for(var s=0;s<e.length;s++){var o,a,l=this._normalizeItem(e[s]);0<=c.inArray(l.id,i)?(o=n.filter(function(e){return function(){return c(this).val()==e.id}}(l)),a=this.item(o),a=c.extend(!0,{},l,a),a=this.option(a),o.replaceWith(a)):(a=this.option(l),l.children&&(l=this.convertToOptions(l.children),u.appendMany(a,l)),r.push(a))}return r},i}),c.define("pumselect2/data/ajax",["./array","../utils","jquery"],function(e,t,s){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return s.extend({},e,{q:e.term})},transport:function(e,t,n){e=s.ajax(e);return e.then(t),e.fail(n),e}};return s.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(t,n){var i=this;null!=this._request&&(s.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=s.extend({type:"GET"},this.ajaxOptions);function e(){var e=r.transport(r,function(e){e=i.processResults(e,t);i.options.get("debug")&&window.console&&console.error&&(e&&e.results&&s.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){i.trigger("results:message",{message:"errorLoading"})});i._request=e}"function"==typeof r.url&&(r.url=r.url.call(this.$element,t)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,t)),this.ajaxOptions.delay&&""!==t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),c.define("pumselect2/data/tags",["jquery"],function(a){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);r=n.get("insertTag");if(void 0!==r&&(this.insertTag=r),e.call(this,t,n),a.isArray(i))for(var s=0;s<i.length;s++){var o=i[s],o=this._normalizeItem(o),o=this.option(o);this.$element.append(o)}}return e.prototype.query=function(e,u,c){var d=this;this._removeOldTags(),null!=u.term&&null==u.page?e.call(this,u,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var s=i[r],o=null!=s.children&&!e({results:s.children},!0);if(s.text===u.term||o)return!n&&(t.data=i,void c(t))}if(n)return!0;var a,l=d.createTag(u);null!=l&&((a=d.option(l)).attr("data-pumselect2-tag",!0),d.addOptions([a]),d.insertTag(i,l)),t.results=i,c(t)}):e.call(this,u,c)},e.prototype.createTag=function(e,t){t=a.trim(t.term);return""===t?null:{id:t,text:t}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this._lastTag;this.$element.find("option[data-pumselect2-tag]").each(function(){this.selected||a(this).remove()})},e}),c.define("pumselect2/data/tokenizer",["jquery"],function(u){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".pumselect2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){i.trigger("select",{data:e})});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.focus()),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],s=t.term,o=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};o<s.length;){var l=s[o];-1!==u.inArray(l,r)?(l=s.substr(0,o),null!=(l=a(u.extend({},t,{term:l})))?(i(l),s=s.substr(o+1)||"",o=0):o++):o++}return{term:s}},e}),c.define("pumselect2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),c.define("pumselect2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),c.define("pumselect2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(t,n,i){var r=this;this.current(function(e){e=null!=e?e.length:0;0<r.maximumSelectionLength&&e>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):t.call(r,n,i)})},e}),c.define("pumselect2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="pumselect2-dropdown"><span class="pumselect2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),c.define("pumselect2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),e=r('<span class="pumselect2-search pumselect2-search--dropdown"><input class="pumselect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),t.prepend(e),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("pumselect2-search--hide"):i.$searchContainer.addClass("pumselect2-search--hide"))})},t.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),c.define("pumselect2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return t="string"==typeof t?{id:"",text:t}:t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),c.define("pumselect2/dropdown/infiniteScroll",["jquery"],function(r){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=r.contains(document.documentElement,i.$loadingMore[0]);!i.loading&&e&&(e=i.$results.offset().top+i.$results.outerHeight(!1),i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=e+50&&i.loadMore())})},e.prototype.loadMore=function(){this.loading=!0;var e=r.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=r('<li class="pumselect2-results__option pumselect2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),c.define("pumselect2/dropdown/attachBody",["jquery","../utils"],function(u,o){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||u(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("pumselect2"),t.addClass("pumselect2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u("<span></span>"),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.pumselect2."+t.id,r="resize.pumselect2."+t.id,s="orientationchange.pumselect2."+t.id,t=this.$container.parents().filter(o.hasScroll);t.each(function(){u(this).data("pumselect2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(i,function(e){var t=u(this).data("pumselect2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(i+" "+r+" "+s,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.pumselect2."+t.id,i="resize.pumselect2."+t.id,t="orientationchange.pumselect2."+t.id;this.$container.parents().filter(o.hasScroll).off(n),u(window).off(n+" "+i+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown.hasClass("pumselect2-dropdown--above"),n=this.$dropdown.hasClass("pumselect2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=r.top,s.bottom=r.top+s.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),e=a<r.top-o,a=l>r.bottom+o,l={left:r.left,top:s.bottom},r=this.$dropdownParent,r=(r="static"===r.css("position")?r.offsetParent():r).offset();l.top-=r.top,l.left-=r.left,t||n||(i="below"),a||!e||t?!e&&a&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(l.top=s.top-o),null!=i&&(this.$dropdown.removeClass("pumselect2-dropdown--below pumselect2-dropdown--above").addClass("pumselect2-dropdown--"+i),this.$container.removeClass("pumselect2-container--below pumselect2-container--above").addClass("pumselect2-container--"+i)),this.$dropdownContainer.css(l)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),c.define("pumselect2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),c.define("pumselect2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(){i._handleSelectOnClose()})},e.prototype._handleSelectOnClose=function(){var e=this.getHighlightedResults();e.length<1||(null!=(e=e.data("data")).element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e}))},e}),c.define("pumselect2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){t=t.originalEvent;t&&t.ctrlKey||this.trigger("close",{})},e}),c.define("pumselect2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),c.define("pumselect2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,d,p,h,m,f,g,v,y,_,b,t,w,A,x,$,j,P,C,O,k,S,M,E,U,T,D,q,e){function n(){this.reset()}return n.prototype.apply=function(t){var e,n;if(null==(t=c.extend(!0,{},this.defaults,t)).dataAdapter&&(null!=t.ajax?t.dataAdapter=x:null!=t.data?t.dataAdapter=A:t.dataAdapter=w,0<t.minimumInputLength&&(t.dataAdapter=_.Decorate(t.dataAdapter,P)),0<t.maximumInputLength&&(t.dataAdapter=_.Decorate(t.dataAdapter,C)),0<t.maximumSelectionLength&&(t.dataAdapter=_.Decorate(t.dataAdapter,O)),t.tags&&(t.dataAdapter=_.Decorate(t.dataAdapter,$)),null==t.tokenSeparators&&null==t.tokenizer||(t.dataAdapter=_.Decorate(t.dataAdapter,j)),null!=t.query&&(e=d(t.amdBase+"compat/query"),t.dataAdapter=_.Decorate(t.dataAdapter,e)),null!=t.initSelection&&(e=d(t.amdBase+"compat/initSelection"),t.dataAdapter=_.Decorate(t.dataAdapter,e))),null==t.resultsAdapter&&(t.resultsAdapter=p,null!=t.ajax&&(t.resultsAdapter=_.Decorate(t.resultsAdapter,E)),null!=t.placeholder&&(t.resultsAdapter=_.Decorate(t.resultsAdapter,M)),t.selectOnClose&&(t.resultsAdapter=_.Decorate(t.resultsAdapter,D))),null==t.dropdownAdapter&&(t.multiple?t.dropdownAdapter=k:(n=_.Decorate(k,S),t.dropdownAdapter=n),0!==t.minimumResultsForSearch&&(t.dropdownAdapter=_.Decorate(t.dropdownAdapter,T)),t.closeOnSelect&&(t.dropdownAdapter=_.Decorate(t.dropdownAdapter,q)),null==t.dropdownCssClass&&null==t.dropdownCss&&null==t.adaptDropdownCssClass||(n=d(t.amdBase+"compat/dropdownCss"),t.dropdownAdapter=_.Decorate(t.dropdownAdapter,n)),t.dropdownAdapter=_.Decorate(t.dropdownAdapter,U)),null==t.selectionAdapter&&(t.multiple?t.selectionAdapter=m:t.selectionAdapter=h,null!=t.placeholder&&(t.selectionAdapter=_.Decorate(t.selectionAdapter,f)),t.allowClear&&(t.selectionAdapter=_.Decorate(t.selectionAdapter,g)),t.multiple&&(t.selectionAdapter=_.Decorate(t.selectionAdapter,v)),null==t.containerCssClass&&null==t.containerCss&&null==t.adaptContainerCssClass||(l=d(t.amdBase+"compat/containerCss"),t.selectionAdapter=_.Decorate(t.selectionAdapter,l)),t.selectionAdapter=_.Decorate(t.selectionAdapter,y)),"string"==typeof t.language&&(0<t.language.indexOf("-")?(u=t.language.split("-")[0],t.language=[t.language,u]):t.language=[t.language]),c.isArray(t.language)){var i=new b;t.language.push("en");for(var r=t.language,s=0;s<r.length;s++){var o=r[s],a={};try{a=b.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,a=b.loadPath(o)}catch(e){t.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.');continue}}i.extend(a)}t.translations=i}else{var l=b.loadPath(this.defaults.amdLanguageBase+"en"),u=new b(t.language);u.extend(l),t.translations=u}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:_.escapeMarkup,language:e,matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=c.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var s=a(n.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<s.indexOf(o)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;n=_._convertData(n);c.extend(this.defaults,n)},new n}),c.define("pumselect2/options",["require","jquery","./defaults","./utils"],function(n,s,i,o){function e(e,t){this.options=e,null!=t&&this.fromElement(t),this.options=i.apply(this.options),t&&t.is("input")&&(t=n(this.get("amdBase")+"compat/inputData"),this.options.dataAdapter=o.Decorate(this.options.dataAdapter,t))}return e.prototype.fromElement=function(e){var t=["pumselect2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("pumselect2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-pumselect2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("pumselect2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n,i={},i=s.fn.jquery&&"1."==s.fn.jquery.substr(0,2)&&e[0].dataset?s.extend(!0,{},e[0].dataset,e.data()):e.data(),r=s.extend(!0,{},i);for(n in r=o._convertData(r))-1<s.inArray(n,t)||(s.isPlainObject(this.options[n])?s.extend(this.options[n],r[n]):this.options[n]=r[n]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),c.define("pumselect2/core",["jquery","./options","./utils","./keys"],function(r,s,n,i){var o=function(e,t){null!=e.data("pumselect2")&&e.data("pumselect2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new s(t,e),o.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");t=this.options.get("dataAdapter");this.dataAdapter=new t(e,this.options);n=this.render();this._placeContainer(n);t=this.options.get("selectionAdapter");this.selection=new t(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,n);t=this.options.get("dropdownAdapter");this.dropdown=new t(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,n);n=this.options.get("resultsAdapter");this.results=new n(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var i=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})}),e.addClass("pumselect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("pumselect2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){return"pumselect2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"!=t)return t;e=e.attr("style");if("string"!=typeof e)return null;for(var r=e.split(";"),s=0,o=r.length;s<o;s+=1){var a=r[s].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.pumselect2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this._sync=n.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){r.each(e,t._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",t._sync,!1)},o.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===r.inArray(e,i)&&n.trigger(e,t)})},o.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("pumselect2-container--open")}),this.on("close",function(){n.$container.removeClass("pumselect2-container--open")}),this.on("enable",function(){n.$container.removeClass("pumselect2-container--disabled")}),this.on("disable",function(){n.$container.addClass("pumselect2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("pumselect2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],i={prevented:!1,name:e,args:t};if(n.call(this,r,i),i.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("pumselect2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("pumselect2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("pumselect2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `pumselect2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.');e=!(e=null==e||0===e.length?[!0]:e)[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `pumselect2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `pumselect2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0];r.isArray(e)&&(e=r.map(e,function(e){return e.toString()})),this.$element.val(e).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".pumselect2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("pumselect2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("pumselect2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=r('<span class="pumselect2 pumselect2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("pumselect2-container--"+this.options.get("theme")),e.data("element",this.$element),e},o}),c.define("pumselect2/compat/utils",["jquery"],function(o){return{syncCssClasses:function(e,t,n){var i,r=[],s=o.trim(e.attr("class"));s&&o((s=""+s).split(/\s+/)).each(function(){0===this.indexOf("pumselect2-")&&r.push(this)}),(s=o.trim(t.attr("class")))&&o((s=""+s).split(/\s+/)).each(function(){0!==this.indexOf("pumselect2-")&&null!=(i=n(this))&&r.push(i)}),e.attr("class",r.join(" "))}}}),c.define("pumselect2/compat/containerCss",["jquery","./utils"],function(s,o){function a(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i,r=this.options.get("adaptContainerCssClass");r=r||a,-1!==n.indexOf(":all:")&&(n=n.replace(":all:",""),i=r,r=function(e){var t=i(e);return null!=t?t+" "+e:e});e=this.options.get("containerCss")||{};return s.isFunction(e)&&(e=e(this.$element)),o.syncCssClasses(t,this.$element,r),t.css(e),t.addClass(n),t},e}),c.define("pumselect2/compat/dropdownCss",["jquery","./utils"],function(s,o){function a(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i,r=this.options.get("adaptDropdownCssClass");r=r||a,-1!==n.indexOf(":all:")&&(n=n.replace(":all:",""),i=r,r=function(e){var t=i(e);return null!=t?t+" "+e:e});e=this.options.get("dropdownCss")||{};return s.isFunction(e)&&(e=e(this.$element)),o.syncCssClasses(t,this.$element,r),t.css(e),t.addClass(n),t},e}),c.define("pumselect2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),c.define("pumselect2/compat/inputData",["jquery"],function(s){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return e.prototype.current=function(e,t){for(var n=[],i=0;i<this._currentData.length;i++){var r=this._currentData[i];n.push.apply(n,function e(t,n){var i=[];return t.selected||-1!==s.inArray(t.id,n)?(t.selected=!0,i.push(t)):t.selected=!1,t.children&&i.push.apply(i,e(t.children,n)),i}(r,this.$element.val().split(this._valueSeparator)))}t(n)},e.prototype.select=function(e,t){var n;this.options.get("multiple")?(n=this.$element.val(),n+=this._valueSeparator+t.id,this.$element.val(n)):(this.current(function(e){s.map(e,function(e){e.selected=!1})}),this.$element.val(t.id)),this.$element.trigger("change")},e.prototype.unselect=function(e,r){var s=this;r.selected=!1,this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];r.id!=i.id&&t.push(i.id)}s.$element.val(t.join(s._valueSeparator)),s.$element.trigger("change")})},e.prototype.query=function(e,t,n){for(var i=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r],s=this.matches(t,s);null!==s&&i.push(s)}n({results:i})},e.prototype.addOptions=function(e,t){t=s.map(t,function(e){return s.data(e[0],"data")});this._currentData.push.apply(this._currentData,t)},e}),c.define("pumselect2/compat/matcher",["jquery"],function(o){return function(s){return function(e,t){var n=o.extend(!0,{},t);if(null==e.term||""===o.trim(e.term))return n;if(t.children){for(var i=t.children.length-1;0<=i;i--){var r=t.children[i];s(e.term,r.text,r)||n.children.splice(i,1)}if(0<n.children.length)return n}return s(e.term,t.text,t)?n:null}}}),c.define("pumselect2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),c.define("pumselect2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("pumselect2-dropdown--below"),n.addClass("pumselect2-container--below")},e}),c.define("pumselect2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),c.define("pumselect2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),a=function(c){var d,p,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice;if(c.event.fixHooks)for(var n=e.length;n;)c.event.fixHooks[e[--n]]=c.event.mouseHooks;var m=c.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;c.data(this,"mousewheel-line-height",m.getLineHeight(this)),c.data(this,"mousewheel-page-height",m.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;c.removeData(this,"mousewheel-line-height"),c.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=c(e),e=t["offsetParent"in c.fn?"offsetParent":"parent"]();return e.length||(e=c("body")),parseInt(e.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return c(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=h.call(arguments,1),r=0,s=0,o=0,a=0,l=0,u=0;if(e=c.event.fix(n),e.type="mousewheel","detail"in n&&(o=-1*n.detail),"wheelDelta"in n&&(o=n.wheelDelta),"wheelDeltaY"in n&&(o=n.wheelDeltaY),"wheelDeltaX"in n&&(s=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(s=-1*o,o=0),r=0===o?s:o,"deltaY"in n&&(r=o=-1*n.deltaY),"deltaX"in n&&(s=n.deltaX,0===o&&(r=-1*s)),0!==o||0!==s)return 1===n.deltaMode?(r*=t=c.data(this,"mousewheel-line-height"),o*=t,s*=t):2===n.deltaMode&&(r*=t=c.data(this,"mousewheel-page-height"),o*=t,s*=t),a=Math.max(Math.abs(o),Math.abs(s)),(!p||a<p)&&g(n,p=a)&&(p/=40),g(n,a)&&(r/=40,s/=40,o/=40),r=Math[1<=r?"floor":"ceil"](r/p),s=Math[1<=s?"floor":"ceil"](s/p),o=Math[1<=o?"floor":"ceil"](o/p),m.settings.normalizeOffset&&this.getBoundingClientRect&&(a=this.getBoundingClientRect(),l=e.clientX-a.left,u=e.clientY-a.top),e.deltaX=s,e.deltaY=o,e.deltaFactor=p,e.offsetX=l,e.offsetY=u,e.deltaMode=0,i.unshift(e,r,s,o),d&&clearTimeout(d),d=setTimeout(f,200),(c.event.dispatch||c.event.handle).apply(this,i)}function f(){p=null}function g(e,t){return m.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}c.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof c.define&&c.define.amd?c.define("jquery-mousewheel",["jquery"],a):"object"==typeof exports?module.exports=a:a(t),c.define("jquery.pumselect2",["jquery","jquery-mousewheel","./pumselect2/core","./pumselect2/defaults"],function(r,e,t,n){var s;return null==r.fn.pumselect2&&(s=["open","close","destroy"],r.fn.pumselect2=function(n){if("object"==typeof(n=n||{}))return this.each(function(){var e=r.extend(!0,{},n);new t(r(this),e)}),this;if("string"!=typeof n)throw new Error("Invalid arguments for Select2: "+n);var i;return this.each(function(){var e=r(this).data("pumselect2");null==e&&window.console&&console.error&&console.error("The pumselect2('"+n+"') method was called on an element that is not using Select2.");var t=Array.prototype.slice.call(arguments,1);i=e[n].apply(e,t)}),-1<r.inArray(n,s)?this:i}),null==r.fn.pumselect2.defaults&&(r.fn.pumselect2.defaults=n),t}),{define:c.define,require:c.require});function _(e,t){return i.call(e,t)}function l(e,t){var n,i,r,s,o,a,l,u,c,d,p=t&&t.split("/"),h=g.map,m=h&&h["*"]||{};if(e&&"."===e.charAt(0))if(t){for(t=(e=e.split("/")).length-1,g.nodeIdCompat&&y.test(e[t])&&(e[t]=e[t].replace(y,"")),e=p.slice(0,p.length-1).concat(e),u=0;u<e.length;u+=1)if("."===(d=e[u]))e.splice(u,1),--u;else if(".."===d){if(1===u&&(".."===e[2]||".."===e[0]))break;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((p||m)&&h){for(u=(n=e.split("/")).length;0<u;--u){if(i=n.slice(0,u).join("/"),p)for(c=p.length;0<c;--c)if(r=h[p.slice(0,c).join("/")],r=r&&r[i]){s=r,o=u;break}if(s)break;!a&&m&&m[i]&&(a=m[i],l=u)}!s&&a&&(s=a,o=l),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function b(t,n){return function(){var e=r.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(d,e.concat([t,n]))}}function w(e){var t;if(_(f,e)&&(t=f[e],delete f[e],v[e]=!0,s.apply(d,t)),!_(m,e)&&!_(v,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var c=a.require("jquery.pumselect2");return t.fn.pumselect2.amd=a,c});
|
1 |
+
function pumSelected(e,t,n){"use strict";var i=!1;return("object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)||"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)||e===t)&&(i=!0),void 0!==n&&n?i?' selected="selected"':"":i}function pumChecked(e,t,n){"use strict";var i=!1;return("object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)||"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)||e===t)&&(i=!0),void 0!==n&&n?i?' checked="checked"':"":i}!function(i){i(function(){i(".pum-enabled-toggle-button").on("change",function(e){e.preventDefault();var t=i(this),n=0;!0===e.target.checked&&(n=1),e=t.data("popup-id"),n=n,t=t.data("nonce"),i.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"pum_save_enabled_state",nonce:t,popupID:e,enabled:n}})})})}(jQuery),function(o){"use strict";var e=o(".pum-alerts"),a=o(".pum-alert-count"),l=parseInt(a.eq(0).text());function u(){0===e.find(".pum-alert-holder").length&&(e.slideUp(100,function(){e.remove()}),o("#menu-posts-popup .wp-menu-name .update-plugins").fadeOut())}o(document).on("pumDismissAlert",u).on("click",".pum-alert-holder .pum-dismiss",function(e){var t,n=o(this),i=n.parents(".pum-alert-holder"),r=n.data("reason")||"maybe_later",s=o(this).data("action")||"dismiss";e.preventDefault(),"review_request"!==i.data("code")?(n=s,s="1"===(s=(e=i).data("dismissible"))||1===s||!0===s?null:s,o.ajax({method:"POST",dataType:"json",url:ajaxurl,data:{action:"pum_alerts_action",nonce:window.pum_alerts_nonce,code:e.data("code"),expires:s,pum_dismiss_alert:n}})):(r=r,o.ajax({method:"POST",dataType:"json",url:ajaxurl,data:{action:"pum_review_action",nonce:window.pum_review_nonce,group:window.pum_review_trigger.group,code:window.pum_review_trigger.code,pri:window.pum_review_trigger.pri,reason:r}}),void 0!==window.pum_review_api_url&&o.ajax({method:"POST",dataType:"json",url:window.pum_review_api_url,data:{trigger_group:window.pum_review_trigger.group,trigger_code:window.pum_review_trigger.code,reason:r,uuid:window.pum_review_uuid||null}})),t=i,l--,a.text(l),t.fadeTo(100,0,function(){t.slideUp(100,function(){t.remove(),u()})})})}(jQuery),function(i){"use strict";var e={init:function(){i(".pum-color-picker").filter(":not(.pum-color-picker-initialized)").addClass("pum-color-picker-initialized").wpColorPicker({change:function(e,t){i(e.target).trigger("colorchange",t)},clear:function(e){i(e.target).prev().trigger("colorchange").wpColorPicker("close")},hide:!0})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.colorpicker=e,i(document).on("click",".iris-palette",function(){i(this).parents(".wp-picker-active").find("input.pum-color-picker").trigger("change")}).on("colorchange",function(e,t){var n=i(e.target),e="";void 0!==t&&void 0!==t.color&&(e=t.color.toString()),n.val(e).trigger("change"),"popup_theme"===i("form#post input#post_type").val()&&PUM_Admin.utils.debounce(PUM_Admin.themeEditor.refresh_preview,100)}).on("pum_init",e.init)}(jQuery),function(p){"use strict";var u={init:function(){u.checkDependencies()},checkDependencies:function(e){var t=p(e);(e=t.length?t:p("[data-pum-dependencies]:not([data-pum-processed-dependencies])")).each(function(){var e,a=p(this),l=a.data("id"),u=a.data("pum-processed-dependencies")||{},c=Object.keys(u).length,d=0,t=a.data("pum-dependent-fields");if(!a.data("pum-processed-dependencies")){for(e in u="string"==typeof(u=a.data("pum-dependencies"))?JSON.parse(u):u)u.hasOwnProperty(e)&&("string"==typeof u[e]?-1!==u[e].indexOf(",")?u[e]=u[e].split(","):u[e]=[u[e]]:"number"==typeof u[e]&&(u[e]=[u[e]]));c=Object.keys(u).length,a.data("pum-processed-dependencies",u).attr("data-pum-processed-dependencies",u)}t||(t=p.map(u,function(e,t){t=p('.pum-field[data-id="'+t+'"]');return t.length?t.eq(0):null}),a.data("pum-dependent-fields",t)),p(t).each(function(){var e=p(this),t=e.find(":input:first"),n=e.data("id"),i=t.val(),r=u[n],n=e.data("pum-field-dependents")||[];if(-1===n.indexOf(l)&&(n.push(l),e.data("pum-field-dependents",n)),null==r)return a.removeClass("pum-dependencies-met").hide(0).trigger("pumFormDependencyUnmet"),!1;if(e.hasClass("pum-field-radio")&&(i=e.find(":input:checked").val()),e.hasClass("pum-field-multicheck")&&(i=[],e.find(":checkbox:checked").each(function(e){i[e]=p(this).val(),"string"!=typeof i[e]||isNaN(parseInt(i[e]))||(i[e]=parseInt(i[e]))})),e.hasClass("pum-field-select")||e.hasClass("pum-field-radio"))s=r&&-1!==r.indexOf(i);else if(e.hasClass("pum-field-checkbox"))s=r===t.is(":checked");else if(e.hasClass("pum-field-multicheck"))if(Array.isArray(r))for(var s=!1,o=0;o<r.length;o++)-1!==i.indexOf(r[o])&&(s=!0);else s=-1!==i.indexOf(r);else s=Array.isArray(r)?-1!==r.indexOf(i):r==i;if(!s)return a.removeClass("pum-dependencies-met").hide(0).trigger("pumFormDependencyUnmet"),!1;++d===c&&a.addClass("pum-dependencies-met").show(0).trigger("pumFormDependencyMet")})})},form_check:function(){p(document).trigger("pum_form_check")},is_field:function(e){return"object"==typeof e&&0<=[void 0===e.type&&(void 0!==e.label||void 0!==e.desc),void 0!==e.type&&"string"==typeof e.type].indexOf(!0)},flattenFields:function(e){var i={},t=e.tabs||{},n=e.sections||{},e=e.fields||{};return Object.keys(t).length&&Object.keys(n).length?_.each(e,function(e,t){"object"==typeof e&&Object.keys(e).length&&_.each(e,function(e,t){var n;"object"==typeof e&&Object.keys(e).length&&(u.is_field(e)&&((n={})[t]=e,t="main",e=n),_.each(e,function(e){i[e.id]=e}))})}):Object.keys(t).length?_.each(e,function(e,t){"object"==typeof e&&Object.keys(e).length&&_.each(e,function(e){i[e.id]=e})}):Object.keys(n).length?_.each(e,function(e,t){_.each(e,function(e){i[e.id]=e})}):(e=u.parseFields(e,values),_.each(e,function(e){i[e.id]=e})),i},parseFields:function(n,i){return i=i||{},_.each(n,function(e,t){n[t]=PUM_Admin.models.field(e),"object"!=typeof n[t].meta&&(n[t].meta={}),void 0!==i[t]&&(n[t].value=i[t]),""===n[t].id&&(n[t].id=t)}),n},renderTab:function(){},renderSection:function(){},render:function(e,r,t){var n,i=[],s={},o=p.extend(!0,{id:"",tabs:{},sections:{},fields:{},maintabs:{},subtabs:{}},e),a=p.extend({id:o.id,classes:[],tabs:{},vertical:!0,form:!0,meta:{"data-min-height":250}},o.maintabs),l=p.extend({classes:["link-tabs","sub-tabs"],tabs:{}},o.subtabs),e=["pum-dynamic-form"];return r=r||{},Object.keys(o.tabs).length&&Object.keys(o.sections).length?(e.push("tabbed-content"),_.each(o.fields,function(e,i){"object"==typeof e&&Object.keys(e).length&&(void 0===a.tabs[i]&&(a.tabs[i]={label:o.tabs[i],content:""}),l=p.extend(l,{id:o.id+"-"+i+"-subtabs",tabs:{}}),_.each(e,function(e,t){var n;"object"==typeof e&&Object.keys(e).length&&(u.is_field(e)&&((n={})[t]=e,t="main",e=n),void 0===l.tabs[t]&&(l.tabs[t]={label:o.sections[i][t],content:""}),e=u.parseFields(e,r),_.each(e,function(e){s[e.id]=e,l.tabs[t].content+=PUM_Admin.templates.field(e)}),""===l.tabs[t].content&&delete l.tabs[t])}),Object.keys(l.tabs).length?a.tabs[i].content=PUM_Admin.templates.tabs(l):delete a.tabs[i])}),Object.keys(a.tabs).length&&(n=PUM_Admin.templates.tabs(a))):Object.keys(o.tabs).length?(e.push("tabbed-content"),_.each(o.fields,function(e,t){"object"==typeof e&&Object.keys(e).length&&(void 0===a.tabs[t]&&(a.tabs[t]={label:o.tabs[t],content:""}),i=[],e=u.parseFields(e,r),_.each(e,function(e){s[e.id]=e,i.push(PUM_Admin.templates.field(e))}),i.length?a.tabs[t].content=PUM_Admin.templates.section({fields:i}):delete a.tabs[t])}),Object.keys(a.tabs).length&&(n=PUM_Admin.templates.tabs(a))):Object.keys(o.sections).length?_.each(o.fields,function(e,t){(i=[]).push(PUM_Admin.templates.field({type:"heading",desc:o.sections[t]||""})),e=u.parseFields(e,r),_.each(e,function(e){s[e.id]=e,i.push(PUM_Admin.templates.field(e))}),n+=PUM_Admin.templates.section({fields:i})}):(o.fields=u.parseFields(o.fields,r),_.each(o.fields,function(e){s[e.id]=e,i.push(PUM_Admin.templates.field(e))}),n=PUM_Admin.templates.section({fields:i})),void 0!==t&&t.length&&t.addClass(e.join(" ")).data("form_fields",s).html(n).trigger("pum_init"),n},parseValues:function(e,t){if(!(t=t||!1))return e;for(var n in t)t.hasOwnProperty(n)&&(e.hasOwnProperty(n+"_unit")&&(e[n]+=e[n+"_unit"],delete e[n+"_unit"]),void 0!==e[n]?t[n].allow_html&&!PUM_Admin.utils.htmlencoder.hasEncoded(e[n])&&(e[n]=PUM_Admin.utils.htmlencoder.htmlEncode(e[n])):"checkbox"===t[n].type&&(e[n]=!1));return e}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.forms=u,p(document).on("pum_init pum_form_check",function(){PUM_Admin.forms.init()}).on("pumFieldChanged",".pum-field",function(){var e,t=p(this).data("pum-field-dependents")||[],n=p();if(t&&!(t.length<=0)){for(e=0;e<t.length;e++)n=n.add('.pum-field[data-id="'+t[e]+'"]');PUM_Admin.forms.checkDependencies(n)}}).on("pumFieldChanged",".pum-field-dynamic-desc",function(){var e=p(this),t=e.find(":input"),n=e.parents(".pum-dynamic-form:first"),i=t.val(),r=(n.data("form_fields")||{})[e.data("id")]||{},t=e.find(".pum-desc"),n=e.data("pum-dynamic-desc");"radio"===r.type&&(i=e.find(":input:checked").val()),r.value=i,n&&n.length&&t.html(PUM_Admin.templates.renderInline(n,r))}).on("change",".pum-field-select select",function(){p(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-checkbox input",function(){p(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-multicheck input",function(){p(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-radio input",function(e){var t=p(this),n=t.parents("li"),t=t.parents(".pum-field");t.trigger("pumFieldChanged"),t.find("li.pum-selected").removeClass("pum-selected"),n.addClass("pum-selected")})}(jQuery),function(r){"use strict";var i,s,o=r("html"),t=r(document),a="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",e={_current:null,forceFocus:function(e){PUM_Admin.modals._current&&!PUM_Admin.modals._current.contains(e.target)&&(e.stopPropagation(),PUM_Admin.modals._current.focus())},trapEscapeKey:function(e){27===e.keyCode&&(PUM_Admin.modals.closeAll(),e.preventDefault())},trapTabKey:function(e){var t,n,i;9===e.keyCode&&(t=PUM_Admin.modals._current.find("*").filter(a).filter(":visible"),i=r(":focus"),n=t.length,i=t.index(i),e.shiftKey?0===i&&(t.get(n-1).focus(),e.preventDefault()):i===n-1&&(t.get(0).focus(),e.preventDefault()))},setFocusToFirstItem:function(){PUM_Admin.modals._current.find(".pum-modal-content *").filter(a).filter(":visible").first().focus()},closeAll:function(e){r(".pum-modal-background").off("keydown.pum_modal").hide(0,function(){r("html").css({overflow:"visible",width:"auto"}),i&&(i.attr("aria-hidden","false"),i=null),s.length&&s.focus(),PUM_Admin.modals._current=null,t.off("focus.pum_modal"),void 0!==e&&e()}).attr("aria-hidden","true")},show:function(e,t){r(".pum-modal-background").off("keydown.pum_modal").hide(0).attr("aria-hidden","true"),o.data("origwidth",o.innerWidth()).css({overflow:"hidden",width:o.innerWidth()});var n=r(":focus");n.parents(".pum-modal-wrap").length||(s=n),PUM_Admin.modals._current=r(e),PUM_Admin.modals._current.on("keydown.pum_modal",function(e){PUM_Admin.modals.trapEscapeKey(e),PUM_Admin.modals.trapTabKey(e)}).show(0,function(){(i=r("body > *").filter(":visible").not(PUM_Admin.modals._current)).attr("aria-hidden","true"),PUM_Admin.modals._current.trigger("pum_init").on("focus.pum_modal",PUM_Admin.modals.forceFocus),PUM_Admin.modals.setFocusToFirstItem(),void 0!==t&&t()}).attr("aria-hidden","false")},remove:function(e){r(e).remove()},replace:function(e,t){PUM_Admin.modals.remove(r.trim(e)),r("body").append(r.trim(t))},reload:function(e,t,n){PUM_Admin.modals.replace(e,t),PUM_Admin.modals.show(e,n),r(e).trigger("pum_init")}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.modals=e,r(document).on("click",".pum-modal-background, .pum-modal-wrap .cancel, .pum-modal-wrap .pum-modal-close",function(e){var t=r(e.target);(t.hasClass("cancel")||t.hasClass("pum-modal-close")||t.hasClass("submitdelete"))&&(PUM_Admin.modals.closeAll(),e.preventDefault(),e.stopPropagation())})}(jQuery),function(t){"use strict";var e={field:function(e){return t.extend(!0,{},{type:"text",id:"",id_prefix:"",name:"",label:null,placeholder:"",desc:null,dynamic_desc:null,size:"regular",classes:[],dependencies:"",value:null,select2:!1,allow_html:!1,multiple:!1,as_array:!1,options:[],object_type:null,object_key:null,std:null,min:0,max:50,force_minmax:!1,step:1,unit:"px",units:{},required:!1,desc_position:"bottom",meta:{}},e)}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.models=e}(jQuery),function(a){"use strict";var s={cloneables:{slider:a('<input type="range" class="pum-range-slider" />'),plus:a('<button type="button" class="pum-range-plus">+</button>'),minus:a('<button type="button" class="pum-range-minus">-</button>')},init:function(){a(".pum-field-rangeslider:not(.pum-rangeslider-initialized)").each(function(){var e=a(this).addClass("pum-rangeslider-initialized").find("input.pum-range-manual"),t=s.cloneables.slider.clone(),n=s.cloneables.plus.clone(),i=s.cloneables.minus.clone(),r={force:e.data("force-minmax"),min:parseInt(e.attr("min"),10)||0,max:parseInt(e.attr("max"),10)||100,step:parseInt(e.attr("step"),10)||1,value:parseInt(e.attr("value"),10)||0};r.force&&r.value>r.max&&(r.value=r.max,e.val(r.value)),t.prop({min:r.min||0,max:r.force||r.max&&r.max>r.value?r.max:1.5*r.value,step:r.step||1.5*r.value/100,value:r.value}).on("change input",function(){e.trigger("input")}),e.next().after(i,n),e.before(t)})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.rangesliders=s,a(document).on("pum_init",PUM_Admin.rangesliders.init).on("input",".pum-field-rangeslider.pum-rangeslider-initialized .pum-range-slider",function(){var e=a(this);e.siblings(".pum-range-manual").val(e.val())}).on("change",".pum-range-manual",function(){var e=a(this),t=parseInt(e.prop("max"),0),n=parseInt(e.prop("min"),0),i=parseInt(e.prop("step"),0),r=e.data("force-minmax"),s=parseInt(e.val(),0),o=e.prev();isNaN(s)&&(s=o.val()),r&&t<s?s=t:r&&s<n&&(s=n),e.val(s).trigger("input"),o.prop({max:r||t&&s<t?t:1.5*s,step:i||1.5*s/100,value:s})}).on("click",".pum-range-plus",function(e){var t=a(this).siblings(".pum-range-manual"),n=parseInt(t.prop("max"),0),i=parseInt(t.prop("step"),0),r=t.data("force-minmax"),s=parseInt(t.val(),0),o=t.prev();e.preventDefault(),s+=i,isNaN(s)&&(s=o.val()),r&&n<s&&(s=n),t.val(s).trigger("input"),o.val(s)}).on("click",".pum-range-minus",function(e){var t=a(this).siblings(".pum-range-manual"),n=parseInt(t.prop("min"),0),i=parseInt(t.prop("step"),0),r=t.data("force-minmax"),s=parseInt(t.val(),0),o=t.prev();e.preventDefault(),s-=i,isNaN(s)&&(s=o.val()),r&&s<n&&(s=n),t.val(s).trigger("input"),o.val(s)})}(jQuery),function(o){"use strict";o.fn.pumselect2=o.fn.pumselect2||o.fn.select2;var e={init:function(){o(".pum-field-select2 select").filter(":not(.pumselect2-initialized)").each(function(){var n=o(this),t=n.data("current")||n.val(),i=n.data("objecttype"),r=n.data("objectkey"),s=n.data("objectexcludes")||null,e={width:"100%",multiple:!1,dropdownParent:n.parent()};n.attr("multiple")&&(e.multiple=!0),i&&r&&(e=o.extend(e,{ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(e){return{s:e.term,paged:e.page,action:"pum_object_search",object_type:i,object_key:r,exclude:s}},processResults:function(e,t){return t.page=t.page||1,{results:e.items,pagination:{more:10*t.page<e.total_count}}},cache:!0},cache:!0,escapeMarkup:function(e){return e},maximumInputLength:20,closeOnSelect:!e.multiple,templateResult:PUM_Admin.select2.formatObject,templateSelection:PUM_Admin.select2.formatObjectSelection})),n.addClass("pumselect2-initialized").pumselect2(e),null!=t?e.multiple&&"object"!=typeof t&&""!==t?t=[t]:e.multiple||""!==t||(t=null):t=null,i&&r&&null!==t&&("number"==typeof t||t.length)?o.ajax({url:ajaxurl,data:{action:"pum_object_search",object_type:i,object_key:r,exclude:s,include:t&&t.length?"string"==typeof t||"number"==typeof t?[t]:t:null},dataType:"json",success:function(e){o.each(e.items,function(e,t){n.find('option[value="'+t.id+'"]').length||n.prepend('<option value="'+t.id+'">'+t.text+"</option>")}),n.val(t).trigger("change")}}):(t&&(e.multiple&&t.length||!e.multiple&&""!==t)||null===t)&&n.val(t).trigger("change")})},formatObject:function(e){return e.text},formatObjectSelection:function(e){return e.text||e.text}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.select2=e,o(document).on("pum_init",function(){PUM_Admin.select2.init()})}(jQuery),function(n,i){var r,s,o,a;"function"!=typeof window.$$&&(r={},s={},window.$$=function(e,t){return t?((o=t.selector)&&(t=o),(a=s[t])===i&&(a=s[t]={}),(o=a[e])!==i?o:a[e]=n(e,$$(t))):(o=r[e])!==i?o:r[e]=n(e)},window.$$clear=function(e,t){t?((o=t.selector)&&(t=o),e&&(o=s[t])&&(o[e]=i),s[t]=i):e?(r[e]=i,s[e]=i):(r={},s={})},window.$$fresh=function(e,t){return $$clear(e,t),$$(e,t)})}(jQuery),function(e,t){var n;"function"==typeof define&&define.amd?define(["exports","jquery"],t):"undefined"!=typeof exports?(n=require("jquery"),t(exports,n)):t(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,s){var l={validate:/^[a-z_][a-z0-9_]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i,key:/[a-z0-9_]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_]+$/i};function t(i,t){var n={},o={};function a(e,t,n){return e[t]=n,e}function r(e,t){var n,i=e.match(l.key),r=document.querySelector('[name="'+e+'"]'),s=!1;if("INPUT"===r.tagName?s=r.type:"SELECT"===r.tagName?s="select":"TEXTAREA"===r.tagName&&(s="textarea"),0<=["textarea","text"].indexOf(s))try{t=JSON.parse(t)}catch(e){}for(;void 0!==(n=i.pop());)l.push.test(n)?t=a([],function(e){void 0===o[e]&&(o[e]=0);return o[e]++}(e.replace(/\[\]$/,"")),t):l.fixed.test(n)?t=a([],n,t):l.named.test(n)&&(t=a({},n,t));return t}function e(){return n}this.addPair=function(e){return l.validate.test(e.name)&&(e=r(e.name,"checkbox"===s('[name="'+(e=e).name+'"]',t).attr("type")&&"1"===e.value||e.value),n=i.extend(!0,n,e)),this},this.addPairs=function(e){if(!i.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var t=0,n=e.length;t<n;t++)this.addPair(e[t]);return this},this.serialize=e,this.serializeJSON=function(){return JSON.stringify(n)}}return t.patterns=l,t.serializeObject=function(){var e=(this.is("form")?this:this.find(":input")).serializeArray();return new t(s,this).addPairs(e).serialize()},t.serializeJSON=function(){var e=(this.is("form")?this:this.find(":input")).serializeArray();return new t(s,this).addPairs(e).serializeJSON()},void 0!==s.fn&&(s.fn.pumSerializeObject=t.serializeObject,s.fn.pumSerializeJSON=t.serializeJSON),e.FormSerializer=t}),function(o){"use strict";var e={init:function(){o(".pum-tabs-container").filter(":not(.pum-tabs-initialized)").each(function(){var e=o(this).addClass("pum-tabs-initialized"),t=e.find("> ul.tabs"),n=t.find("> li:first"),i=e.data("min-height");e.hasClass("vertical-tabs")&&(t=i&&0<i?i:t.eq(0).outerHeight(!0),e.css({minHeight:t+"px"}),e.parent().innerHeight<t&&e.parent().css({minHeight:t+"px"})),n.trigger("click")})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.tabs=e,o(document).on("pum_init",PUM_Admin.tabs.init).on("click",".pum-tabs-initialized li.tab",function(e){var t=o(this),n=t.parents(".pum-tabs-container:first"),i=n.find("> ul.tabs > li.tab"),r=n.find("> div.tab-content"),s=t.find("a").attr("href");i.removeClass("active"),r.removeClass("active"),t.addClass("active"),n.find("> div.tab-content"+s).addClass("active"),e.preventDefault()})}(jQuery),function(n){"use strict";var t=pum_admin_vars.I10n,e={render:function(e,t){e=wp.template(e);return void 0!==(t=t||{}).classes&&Array.isArray(t.classes)&&(t.classes=t.classes.join(" ")),e(t=PUM_Admin.templates.prepareMeta(t))},renderInline:function(e,t){return _.template(e,null,{evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"})(t)},shortcode:function(e){var t=n.extend(!0,{},{tag:"",meta:{},has_content:!1,content:""},e),e=t.has_content?"pum-shortcode-w-content":"pum-shortcode";return PUM_Admin.templates.render(e,t)},modal:function(e){e=n.extend(!0,{},{id:"",title:"",description:"",classes:"",save_button:t.save,cancel_button:t.cancel,content:""},e);return PUM_Admin.templates.render("pum-modal",e)},tabs:function(e){return"string"==typeof(e=n.extend(!0,{},{id:"",vertical:!1,form:!1,classes:[],tabs:{},meta:{}},e)).classes&&(e.classes=[e.classes]),e.form&&e.classes.push("pum-tabbed-form"),e.meta["data-tab-count"]=Object.keys(e.tabs).length,e.classes.push(e.vertical?"vertical-tabs":"horizontal-tabs"),e.classes=e.classes.join(" "),PUM_Admin.templates.render("pum-tabs",e)},section:function(e){e=n.extend(!0,{},{classes:[],fields:[]},e);return PUM_Admin.templates.render("pum-field-section",e)},fieldArgs:function(e){var r=[],s=n.extend(!0,{},PUM_Admin.models.field(e));switch(void 0===e.std||"checkbox"===e.type||null!==s.value&&!1!==s.value||(s.value=e.std),"string"==typeof s.classes&&(s.classes=s.classes.split(" ")),void 0!==e.class&&s.classes.push(e.class),void 0!==e.dependencies&&"object"==typeof e.dependencies&&(s.dependencies=JSON.stringify(e.dependencies)),s.required&&(s.meta.required=!0,s.classes.push("pum-required")),"string"==typeof s.dynamic_desc&&s.dynamic_desc.length&&(s.classes.push("pum-field-dynamic-desc"),s.desc=PUM_Admin.templates.renderInline(s.dynamic_desc,s)),s.allow_html&&(s.classes.push("pum-field-"+s.type+"--html"),"string"==typeof s.value&&""!==s.value&&PUM_Admin.utils.htmlencoder.hasEncoded(s.value)&&(s.value=PUM_Admin.utils.htmlencoder.htmlDecode(s.value))),e.type){case"select":case"objectselect":case"postselect":case"taxonomyselect":void 0!==s.options&&(_.each(s.options,function(e,t){var i,n=!1;"object"!=typeof e?(null===s.value||(s.multiple&&("string"==typeof s.value&&s.value==t||Array.isArray(s.value)&&-1!==s.value.indexOf(t)||!Array.isArray(s.value)&&"object"==typeof s.value&&Object.keys(s.value).length&&void 0!==s.value[t])||!s.multiple&&s.value==t)&&(n="selected"),r.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))):(t=t,i=[],_.each(e,function(e,t){var n=!1;null===s.value||(s.multiple&&("string"==typeof s.value&&s.value==t||Array.isArray(s.value)&&-1!==s.value.indexOf(t)||!Array.isArray(s.value)&&"object"==typeof s.value&&Object.keys(s.value).length&&void 0!==s.value[t])||!s.multiple&&s.value==t)&&(n="selected"),i.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))}),r.push({label:t,options:i}))}),s.options=r),s.multiple&&(s.meta.multiple=!0,s.as_array&&(s.name+="[]"),s.value&&s.value.length||(s.value=[]),"string"==typeof s.value&&(s.value=[s.value])),"select"!==e.type&&(s.select2=!0,s.classes.push("pum-field-objectselect"),s.classes.push("postselect"===e.type?"pum-field-postselect":"pum-field-taxonomyselect"),s.meta["data-objecttype"]="postselect"===e.type?"post_type":"taxonomy",s.meta["data-objectkey"]="postselect"===e.type?e.post_type:e.taxonomy,s.meta["data-current"]="object"==typeof s.value||Array.isArray(s.value)?JSON.stringify(s.value):s.value),s.select2&&(s.classes.push("pum-field-select2"),s.placeholder&&(s.meta["data-placeholder"]=s.placeholder));break;case"radio":void 0!==s.options&&(_.each(s.options,function(e,t){r.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{checked:s.value===t}}))}),s.options=r);break;case"multicheck":void 0!==s.options&&(!1!==s.value&&null!==s.value||(s.value=[]),"string"==typeof s.value&&s.value.indexOf(",")&&(s.value=s.value.split(",")),s.as_array&&(s.name+="[]"),_.each(s.options,function(e,t){r.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{checked:Array.isArray(s.value)&&-1!==s.value.indexOf(t)||!Array.isArray(s.value)&&"object"==typeof s.value&&Object.keys(s.value).length&&void 0!==s.value[t]}}))}),s.options=r);break;case"checkbox":switch(typeof s.value){case"object":Array.isArray(s.value)&&1===s.value.length&&"1"===s.value[0].toString()&&(s.value=!0,s.meta.checked=!0);break;case"boolean":s.value&&(s.meta.checked=!0);break;case"string":"true"!==s.value&&"yes"!==s.value&&"1"!==s.value||(s.meta.checked=!0);break;case"number":(1===parseInt(s.value,10)||0<parseInt(s.value,10))&&(s.meta.checked=!0)}break;case"rangeslider":s.meta.step=s.step,s.meta.min=s.min,s.meta.max=s.max,s.meta["data-force-minmax"]=s.force_minmax.toString();break;case"textarea":s.meta.cols=s.cols,s.meta.rows=s.rows;break;case"measure":"string"==typeof s.value&&""!==s.value?(s.number=parseInt(s.value),s.unitValue=s.value.replace(s.number,""),s.value=s.number):s.unitValue=null,void 0!==s.units&&(_.each(s.units,function(e,t){var n=!1;s.unitValue==t&&(n="selected"),r.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))}),s.units=r);break;case"color":"string"==typeof s.value&&""!==s.value&&(s.meta["data-default-color"]=s.value);break;case"license_key":s.value=n.extend({key:"",license:{},messages:[],status:"empty",expires:!1,classes:!1},s.value),s.classes.push("pum-license-"+s.value.status+"-notice"),s.value.classes&&s.classes.push(s.value.classes)}return s},field:function(e){var t=PUM_Admin.templates.fieldArgs(e),e="pum-field-"+t.type;return"objectselfect"!==t.type&&"postselect"!==t.type&&"taxonomyselect"!==t.type||(e="pum-field-select"),n("#tmpl-"+e).length?(t.field=PUM_Admin.templates.render(e,t),PUM_Admin.templates.render("pum-field-wrapper",t)):(console.warn("No field template found for type:"+t.type+" fieldID: "+t.id),"")},prepareMeta:function(e){var t,n=[];for(t in e.meta)e.meta.hasOwnProperty(t)&&("boolean"==typeof e.meta[t]?e.meta[t]&&n.push(_.escape(t)):n.push(_.escape(t)+'="'+_.escape(e.meta[t])+'"'));return e.meta=n.join(" "),e}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.templates=e}(window.jQuery),function(i){"use strict";String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)};var r="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),s="select,textarea".split(","),o=/\[([^\]]*)\]/g;function a(e,t){return-1!==i.inArray(t,e)}var e={EncodeType:"entity",isEmpty:function(e){return!e||(null===e||0==e.length||/^\s+$/.test(e))},arr1:[" ","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ",""","&","<",">","Œ","œ","Š","š","Ÿ","ˆ","˜"," "," "," ","‌","‍","‎","‏","–","—","‘","’","‚","“","”","„","†","‡","‰","‹","›","€","ƒ","Α","Β","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω","α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","ς","σ","τ","υ","φ","χ","ψ","ω","ϑ","ϒ","ϖ","•","…","′","″","‾","⁄","℘","ℑ","ℜ","™","ℵ","←","↑","→","↓","↔","↵","⇐","⇑","⇒","⇓","⇔","∀","∂","∃","∅","∇","∈","∉","∋","∏","∑","−","∗","√","∝","∞","∠","∧","∨","∩","∪","∫","∴","∼","≅","≈","≠","≡","≤","≥","⊂","⊃","⊄","⊆","⊇","⊕","⊗","⊥","⋅","⌈","⌉","⌊","⌋","⟨","⟩","◊","♠","♣","♥","♦"],arr2:[" ","¡","¢","£","¤","¥","¦","§","¨","©","ª","«","¬","­","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ",""","&","<",">","Œ","œ","Š","š","Ÿ","ˆ","˜"," "," "," ","‌","‍","‎","‏","–","—","‘","’","‚","“","”","„","†","‡","‰","‹","›","€","ƒ","Α","Β","Γ","Δ","Ε","Ζ","Η","Θ","Ι","Κ","Λ","Μ","Ν","Ξ","Ο","Π","Ρ","Σ","Τ","Υ","Φ","Χ","Ψ","Ω","α","β","γ","δ","ε","ζ","η","θ","ι","κ","λ","μ","ν","ξ","ο","π","ρ","ς","σ","τ","υ","φ","χ","ψ","ω","ϑ","ϒ","ϖ","•","…","′","″","‾","⁄","℘","ℑ","ℜ","™","ℵ","←","↑","→","↓","↔","↵","⇐","⇑","⇒","⇓","⇔","∀","∂","∃","∅","∇","∈","∉","∋","∏","∑","−","∗","√","∝","∞","∠","∧","∨","∩","∪","∫","∴","∼","≅","≈","≠","≡","≤","≥","⊂","⊃","⊄","⊆","⊇","⊕","⊗","⊥","⋅","⌈","⌉","⌊","⌋","〈","〉","◊","♠","♣","♥","♦"],HTML2Numerical:function(e){return this.swapArrayVals(e,this.arr1,this.arr2)},NumericalToHTML:function(e){return this.swapArrayVals(e,this.arr2,this.arr1)},numEncode:function(e){if(this.isEmpty(e))return"";for(var t=[],n=e.length,i=0;i<n;i++){var r=e.charAt(i);r<" "||"~"<r?(t.push("&#"),t.push(r.charCodeAt()),t.push(";")):t.push(r)}return t.join("")},htmlDecode:function(e){var t,n,i=e;if(this.isEmpty(i))return"";var r=(i=this.HTML2Numerical(i)).match(/&#[0-9]{1,5};/g);if(null!=r)for(var s=0;s<r.length;s++)i=-32768<=(t=(n=r[s]).substring(2,n.length-1))&&t<=65535?i.replace(n,String.fromCharCode(t)):i.replace(n,"");return i},htmlEncode:function(e,t){return this.isEmpty(e)?"":((t=t||!1)&&(e="numerical"==this.EncodeType?e.replace(/&/g,"&"):e.replace(/&/g,"&")),e=this.XSSEncode(e,!1),"numerical"!=this.EncodeType&&t||(e=this.HTML2Numerical(e)),e=this.numEncode(e),t||(e=e.replace(/&#/g,"##AMPHASH##"),e=(e="numerical"==this.EncodeType?e.replace(/&/g,"&"):e.replace(/&/g,"&")).replace(/##AMPHASH##/g,"&#")),e=e.replace(/&#\d*([^\d;]|$)/g,"$1"),t||(e=this.correctEncoding(e)),e="entity"==this.EncodeType?this.NumericalToHTML(e):e)},XSSEncode:function(e,t){return this.isEmpty(e)?"":e=(t=t||!0)?(e=(e=(e=e.replace(/\'/g,"'")).replace(/\"/g,""")).replace(/</g,"<")).replace(/>/g,">"):(e=(e=(e=e.replace(/\'/g,"'")).replace(/\"/g,""")).replace(/</g,"<")).replace(/>/g,">")},hasEncoded:function(e){return!!/&#[0-9]{1,5};/g.test(e)||!!/&[A-Z]{2,6};/gi.test(e)},stripUnicode:function(e){return e.replace(/[^\x20-\x7E]/g,"")},correctEncoding:function(e){return e.replace(/(&)(amp;)+/,"$1")},swapArrayVals:function(e,t,n){if(this.isEmpty(e))return"";var i;if(t&&n&&t.length==n.length)for(var r=0,s=t.length;r<s;r++)i=new RegExp(t[r],"g"),e=e.replace(i,n[r]);return e},inArray:function(e,t){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1}};e.EncodeType="entity",e={htmlencoder:e,convert_meta_to_object:function(e){var t,n,i,r={};for(i in e)e.hasOwnProperty(i)&&(t=i.split(/_(.+)?/)[0],n=i.split(/_(.+)?/)[1],void 0===r[t]&&(r[t]={}),r[t][n]=e[i]);return r},object_to_array:function(e){var t,n=[];if("object"==typeof e){for(t in e)n.push(e[t]);e=n}return e},checked:function(e,t,n){var i=!1;return("object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)||"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)||e===t||e==t)&&(i=!0),void 0!==n&&n?i?' checked="checked"':"":i},selected:function(e,t,n){var i=!1;return("object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)||"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)||e===t)&&(i=!0),void 0!==n&&n?i?' selected="selected"':"":i},convert_hex:function(e,t){return void 0===e?"":(void 0===t&&(t=100),e=e.replace("#",""),"rgba("+parseInt(e.substring(0,2),16)+","+parseInt(e.substring(2,4),16)+","+parseInt(e.substring(4,6),16)+","+t/100+")")},debounce:function(n,i){var r;return function(){var e=this,t=arguments;window.clearTimeout(r),r=window.setTimeout(function(){n.apply(e,t)},i)}},throttle:function(e,t){function n(){i=!1}var i=!1;return function(){i||(e(),window.setTimeout(n,t),i=!0)}},serializeForm:function(e){i.extend({},e);var t={},n=i.extend(!0,{include:[],exclude:[],includeByClass:""},e);return this.find(":input").each(function(){var e;!this.name||this.disabled||a(n.exclude,this.name)||n.include.length&&!a(n.include,this.name)||-1===this.className.indexOf(n.includeByClass)||(e=this.name.replace(o,"[$1").split("["))[0]&&(this.checked||a(r,this.type)||a(s,this.nodeName.toLowerCase()))&&("checkbox"===this.type&&e.push(""),function e(t,n,i){var r=n[0];1<n.length?(t[r]||(t[r]=n[1]?{}:[]),e(t[r],n.slice(1),i)):t[r=r||t.length]=i}(t,e,i(this).val()))}),t}},window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.utils=e,window.PUMUtils=e,i.fn.pumSerializeForm=e.serializeForm}(jQuery),function(e){"function"==typeof define&&void 0!==define.amd&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(t){var e,n,d,s,o,p,h,m,f,g,v,i,r,y,a,a=((c=t&&t.fn&&t.fn.pumselect2&&t.fn.pumselect2.amd?t.fn.pumselect2.amd:c)&&c.requirejs||(c?n=c:c={},m={},f={},g={},v={},i=Object.prototype.hasOwnProperty,r=[].slice,y=/\.js$/,p=function(e,t){var n,i,r=u(e),s=r[0];return e=r[1],s&&(n=w(s=l(s,t))),s?e=n&&n.normalize?n.normalize(e,(i=t,function(e){return l(e,i)})):l(e,t):(s=(r=u(e=l(e,t)))[0],e=r[1],s&&(n=w(s))),{f:s?s+"!"+e:e,n:e,pr:s,p:n}},h={require:function(e){return b(e)},exports:function(e){var t=m[e];return void 0!==t?t:m[e]={}},module:function(e){return{id:e,uri:"",exports:m[e],config:(t=e,function(){return g&&g.config&&g.config[t]||{}})};var t}},s=function(e,t,n,i){var r,s,o,a,l,u=[],c=typeof n;if(i=i||e,"undefined"==c||"function"==c){for(t=!t.length&&n.length?["require","exports","module"]:t,a=0;a<t.length;a+=1)if("require"===(s=(o=p(t[a],i)).f))u[a]=h.require(e);else if("exports"===s)u[a]=h.exports(e),l=!0;else if("module"===s)r=u[a]=h.module(e);else if(_(m,s)||_(f,s)||_(v,s))u[a]=w(s);else{if(!o.p)throw new Error(e+" missing "+s);o.p.load(o.n,b(i,!0),function(t){return function(e){m[t]=e}}(s),{}),u[a]=m[s]}c=n?n.apply(m[e],u):void 0,e&&(r&&r.exports!==d&&r.exports!==m[e]?m[e]=r.exports:c===d&&l||(m[e]=c))}else e&&(m[e]=n)},e=n=o=function(e,t,n,i,r){if("string"==typeof e)return h[e]?h[e](t):w(p(e,t).f);if(!e.splice){if((g=e).deps&&o(g.deps,g.callback),!t)return;t.splice?(e=t,t=n,n=null):e=d}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?s(d,e,t,n):setTimeout(function(){s(d,e,t,n)},4),o},o.config=function(e){return o(e)},e._defined=m,(a=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),_(m,e)||_(f,e)||(f[e]=[e,t,n])}).amd={jQuery:!0},c.requirejs=e,c.require=n,c.define=a),c.define("almond",function(){}),c.define("jquery",[],function(){var e=t||$;return null==e&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),e}),c.define("pumselect2/utils",["jquery"],function(s){var e={};function u(e){var t,n=e.prototype,i=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&i.push(t);return i}e.Extend=function(e,t){var n,i={}.hasOwnProperty;function r(){this.constructor=e}for(n in t)i.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},e.Decorate=function(i,r){var e=u(r),t=u(i);function s(){var e=Array.prototype.unshift,t=r.prototype.constructor.length,n=i.prototype.constructor;0<t&&(e.call(arguments,i.prototype.constructor),n=r.prototype.constructor),n.apply(this,arguments)}r.displayName=i.displayName,s.prototype=new function(){this.constructor=s};for(var n=0;n<t.length;n++){var o=t[n];s.prototype[o]=i.prototype[o]}for(var a=0;a<e.length;a++){var l=e[a];s.prototype[l]=function(e){var t=function(){};e in s.prototype&&(t=s.prototype[e]);var n=r.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),n.apply(this,arguments)}}(l)}return s};function t(){this.listeners={}}return t.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},t.prototype.trigger=function(e){var t=Array.prototype.slice;this.listeners=this.listeners||{},e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},t.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},e.Observable=t,e.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},e.bind=function(e,t){return function(){e.apply(t,arguments)}},e._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var r=0;r<n.length;r++){var s=n[r];(s=s.substring(0,1).toLowerCase()+s.substring(1))in i||(i[s]={}),r==n.length-1&&(i[s]=e[t]),i=i[s]}delete e[t]}}return e},e.hasScroll=function(e,t){var n=s(t),i=t.style.overflowX,r=t.style.overflowY;return(i!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===i||"scroll"===r||(n.innerHeight()<t.scrollHeight||n.innerWidth()<t.scrollWidth))},e.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){var n;"1.7"===s.fn.jquery.substr(0,3)&&(n=s(),s.map(t,function(e){n=n.add(e)}),t=n),e.append(t)},e}),c.define("pumselect2/results",["jquery","./utils"],function(d,e){function i(e,t,n){this.$element=e,this.data=n,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=d('<ul class="pumselect2-results__options" role="tree"></ul>');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e},i.prototype.clear=function(){this.$results.empty()},i.prototype.displayMessage=function(e){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var n=d('<li role="treeitem" aria-live="assertive" class="pumselect2-results__option"></li>'),i=this.options.get("translations").get(e.message);n.append(t(i(e.args))),n[0].className+=" pumselect2-results__message",this.$results.append(n)},i.prototype.hideMessages=function(){this.$results.find(".pumselect2-results__message").remove()},i.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],i=this.option(i);t.push(i)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},i.prototype.position=function(e,t){t.find(".pumselect2-results").append(e)},i.prototype.sort=function(e){return this.options.get("sorter")(e)},i.prototype.setClasses=function(){var n=this;this.data.current(function(e){var i=d.map(e,function(e){return e.id.toString()}),t=n.$results.find(".pumselect2-results__option[aria-selected]");t.each(function(){var e=d(this),t=d.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<d.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")});e=t.filter("[aria-selected=true]");(0<e.length?e:t).first().trigger("mouseenter")})},i.prototype.showLoading=function(e){this.hideLoading();e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},e=this.option(e);e.className+=" loading-results",this.$results.prepend(e)},i.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},i.prototype.option=function(e){var t=document.createElement("li");t.className="pumselect2-results__option";var n,i={role:"treeitem","aria-selected":"false"};for(n in e.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==e.id&&delete i["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(i.role="group",i["aria-label"]=e.text,delete i["aria-selected"]),i){var r=i[n];t.setAttribute(n,r)}if(e.children){var s=d(t),o=document.createElement("strong");o.className="pumselect2-results__group";d(o);this.template(e,o);for(var a=[],l=0;l<e.children.length;l++){var u=e.children[l],u=this.option(u);a.push(u)}var c=d("<ul></ul>",{class:"pumselect2-results__options pumselect2-results__options--nested"});c.append(a),s.append(o),s.append(c)}else this.template(e,t);return d.data(t,"data",e),t},i.prototype.bind=function(t,e){var r=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){r.clear(),r.append(e.data),t.isOpen()&&r.setClasses()}),t.on("results:append",function(e){r.append(e.data),t.isOpen()&&r.setClasses()}),t.on("query",function(e){r.hideMessages(),r.showLoading(e)}),t.on("select",function(){t.isOpen()&&r.setClasses()}),t.on("unselect",function(){t.isOpen()&&r.setClasses()}),t.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}),t.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=r.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e,t=r.getHighlightedResults();0!==t.length&&(e=t.data("data"),"true"==t.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:e}))}),t.on("results:previous",function(){var e,t=r.getHighlightedResults(),n=r.$results.find("[aria-selected]"),i=n.index(t);0!==i&&(e=i-1,0===t.length&&(e=0),(i=n.eq(e)).trigger("mouseenter"),t=r.$results.offset().top,n=i.offset().top,i=r.$results.scrollTop()+(n-t),0===e?r.$results.scrollTop(0):n-t<0&&r.$results.scrollTop(i))}),t.on("results:next",function(){var e,t=r.getHighlightedResults(),n=r.$results.find("[aria-selected]"),i=n.index(t)+1;i>=n.length||((e=n.eq(i)).trigger("mouseenter"),t=r.$results.offset().top+r.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=r.$results.scrollTop()+n-t,0===i?r.$results.scrollTop(0):t<n&&r.$results.scrollTop(e))}),t.on("results:focus",function(e){e.element.addClass("pumselect2-results__option--highlighted")}),t.on("results:message",function(e){r.displayMessage(e)}),d.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-t+e.deltaY,t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=r.$results.height();t?(r.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".pumselect2-results__option[aria-selected]",function(e){var t=d(this),n=t.data("data");"true"!==t.attr("aria-selected")?r.trigger("select",{originalEvent:e,data:n}):r.options.get("multiple")?r.trigger("unselect",{originalEvent:e,data:n}):r.trigger("close",{})}),this.$results.on("mouseenter",".pumselect2-results__option[aria-selected]",function(e){var t=d(this).data("data");r.getHighlightedResults().removeClass("pumselect2-results__option--highlighted"),r.trigger("results:focus",{data:t,element:d(this)})})},i.prototype.getHighlightedResults=function(){return this.$results.find(".pumselect2-results__option--highlighted")},i.prototype.destroy=function(){this.$results.remove()},i.prototype.ensureHighlightVisible=function(){var e,t,n,i,r=this.getHighlightedResults();0!==r.length&&(e=this.$results.find("[aria-selected]").index(r),i=this.$results.offset().top,t=r.offset().top,n=this.$results.scrollTop()+(t-i),i=t-i,n-=2*r.outerHeight(!1),e<=2?this.$results.scrollTop(0):(i>this.$results.outerHeight()||i<0)&&this.$results.scrollTop(n))},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),e=n(e,t);null==e?t.style.display="none":"string"==typeof e?t.innerHTML=i(e):d(t).append(e)},i}),c.define("pumselect2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),c.define("pumselect2/selection/base",["jquery","../utils","../keys"],function(n,e,r){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return e.Extend(i,e.Observable),i.prototype.render=function(){var e=n('<span class="pumselect2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e},i.prototype.bind=function(e,t){var n=this,i=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){n.trigger("focus",e)}),this.$selection.on("blur",function(e){n._handleBlur(e)}),this.$selection.on("keydown",function(e){n.trigger("keypress",e),e.which===r.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){n.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){n.update(e.data)}),e.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(e)}),e.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.focus(),n._detachCloseHandler(e)}),e.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),e.on("disable",function(){n.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(e){var t=this;window.setTimeout(function(){document.activeElement==t.$selection[0]||n.contains(t.$selection[0],document.activeElement)||t.trigger("blur",e)},1)},i.prototype._attachCloseHandler=function(e){n(document.body).on("mousedown.pumselect2."+e.id,function(e){var t=n(e.target).closest(".pumselect2");n(".pumselect2.pumselect2-container--open").each(function(){var e=n(this);this!=t[0]&&e.data("element").pumselect2("close")})})},i.prototype._detachCloseHandler=function(e){n(document.body).off("mousedown.pumselect2."+e.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),c.define("pumselect2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function r(){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,t),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("pumselect2-selection--single"),e.html('<span class="pumselect2-selection__rendered"></span><span class="pumselect2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".pumselect2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("selection:update",function(e){n.update(e.data)})},r.prototype.clear=function(){this.$selection.find(".pumselect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return e("<span></span>")},r.prototype.update=function(e){var t,n;0!==e.length?(t=e[0],n=this.$selection.find(".pumselect2-selection__rendered"),e=this.display(t,n),n.empty().append(e),n.prop("title",t.title||t.text)):this.clear()},r}),c.define("pumselect2/selection/multiple",["jquery","./base","../utils"],function(i,e,a){function r(e,t){r.__super__.constructor.apply(this,arguments)}return a.Extend(r,e),r.prototype.render=function(){var e=r.__super__.render.call(this);return e.addClass("pumselect2-selection--multiple"),e.html('<ul class="pumselect2-selection__rendered"></ul>'),e},r.prototype.bind=function(e,t){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){n.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".pumselect2-selection__choice__remove",function(e){var t;n.options.get("disabled")||(t=i(this).parent().data("data"),n.trigger("unselect",{originalEvent:e,data:t}))})},r.prototype.clear=function(){this.$selection.find(".pumselect2-selection__rendered").empty()},r.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},r.prototype.selectionContainer=function(){return i('<li class="pumselect2-selection__choice"><span class="pumselect2-selection__choice__remove" role="presentation">×</span></li>')},r.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],n=0;n<e.length;n++){var i=e[n],r=this.selectionContainer(),s=this.display(i,r);r.append(s),r.prop("title",i.title||i.text),r.data("data",i),t.push(r)}var o=this.$selection.find(".pumselect2-selection__rendered");a.appendMany(o,t)}},r}),c.define("pumselect2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return t="string"==typeof t?{id:"",text:t}:t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("pumselect2-selection__placeholder").removeClass("pumselect2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear();t=this.createPlaceholder(this.placeholder);this.$selection.find(".pumselect2-selection__rendered").append(t)},t}),c.define("pumselect2/selection/allowClear",["jquery","../keys"],function(n,i){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".pumselect2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},e.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".pumselect2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),r=0;r<i.length;r++){var s={data:i[r]};if(this.trigger("unselect",s),s.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},e.prototype._handleKeyboardClear=function(e,t,n){n.isOpen()||t.which!=i.DELETE&&t.which!=i.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){e.call(this,t),0<this.$selection.find(".pumselect2-selection__placeholder").length||0===t.length||((e=n('<span class="pumselect2-selection__clear">×</span>')).data("data",t),this.$selection.find(".pumselect2-selection__rendered").prepend(e))},e}),c.define("pumselect2/selection/search",["jquery","../utils","../keys"],function(n,e,s){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=n('<li class="pumselect2-search pumselect2-search--inline"><input class="pumselect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=t,this.$search=t.find("input");e=e.call(this);return this._transferTabIndex(),e},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("open",function(){i.$search.trigger("focus")}),t.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),t.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),t.on("disable",function(){i.$search.prop("disabled",!0)}),t.on("focus",function(e){i.$search.trigger("focus")}),t.on("results:focus",function(e){i.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".pumselect2-search--inline",function(e){i.trigger("focus",e)}),this.$selection.on("focusout",".pumselect2-search--inline",function(e){i._handleBlur(e)}),this.$selection.on("keydown",".pumselect2-search--inline",function(e){var t;e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which!==s.BACKSPACE||""!==i.$search.val()||0<(t=i.$searchContainer.prev(".pumselect2-selection__choice")).length&&(t=t.data("data"),i.searchRemoveChoice(t),e.preventDefault())});var t=document.documentMode,r=t&&t<=11;this.$selection.on("input.searchcheck",".pumselect2-search--inline",function(e){r?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".pumselect2-search--inline",function(e){var t;r&&"input"===e.type?i.$selection.off("input.search input.searchcheck"):(t=e.which)!=s.SHIFT&&t!=s.CTRL&&t!=s.ALT&&t!=s.TAB&&i.handleSearch(e)})},t.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},t.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},t.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".pumselect2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},t.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},t.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},t.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";e=""!==this.$search.attr("placeholder")?this.$selection.find(".pumselect2-selection__rendered").innerWidth():.75*(this.$search.val().length+1)+"em",this.$search.css("width",e)},t}),c.define("pumselect2/selection/eventRelay",["jquery"],function(o){function e(){}return e.prototype.bind=function(e,t,n){var i=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];e.call(this,t,n),t.on("*",function(e,t){var n;-1!==o.inArray(e,r)&&(t=t||{},n=o.Event("pumselect2:"+e,{params:t}),i.$element.trigger(n),-1!==o.inArray(e,s)&&(t.prevented=n.isDefaultPrevented()))})},e}),c.define("pumselect2/translation",["jquery","require"],function(t,n){function i(e){this.dict=e||{}}return i.prototype.all=function(){return this.dict},i.prototype.get=function(e){return this.dict[e]},i.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},i._cache={},i.loadPath=function(e){var t;return e in i._cache||(t=n(e),i._cache[e]=t),new i(i._cache[e])},i}),c.define("pumselect2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),c.define("pumselect2/data/base",["../utils"],function(n){function i(e,t){i.__super__.constructor.call(this)}return n.Extend(i,n.Observable),i.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},i.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},i.prototype.bind=function(e,t){},i.prototype.destroy=function(){},i.prototype.generateResultId=function(e,t){e=e.id+"-result-";return e+=n.generateChars(4),null!=t.id?e+="-"+t.id.toString():e+="-"+n.generateChars(4),e},i}),c.define("pumselect2/data/select",["./base","../utils","jquery"],function(e,t,o){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,e),n.prototype.current=function(e){var t=[],n=this;this.$element.find(":selected").each(function(){var e=o(this),e=n.item(e);t.push(e)}),e(t)},n.prototype.select=function(r){var e,s=this;if(r.selected=!0,o(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");this.$element.prop("multiple")?this.current(function(e){var t=[];(r=[r]).push.apply(r,e);for(var n=0;n<r.length;n++){var i=r[n].id;-1===o.inArray(i,t)&&t.push(i)}s.$element.val(t),s.$element.trigger("change")}):(e=r.id,this.$element.val(e),this.$element.trigger("change"))},n.prototype.unselect=function(r){var s=this;if(this.$element.prop("multiple")){if(r.selected=!1,o(r.element).is("option"))return r.element.selected=!1,void this.$element.trigger("change");this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n].id;i!==r.id&&-1===o.inArray(i,t)&&t.push(i)}s.$element.val(t),s.$element.trigger("change")})}},n.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},n.prototype.destroy=function(){this.$element.find("*").each(function(){o.removeData(this,"data")})},n.prototype.query=function(t,e){var n=[],i=this;this.$element.children().each(function(){var e=o(this);(e.is("option")||e.is("optgroup"))&&(e=i.item(e),null!==(e=i.matches(t,e))&&n.push(e))}),e({results:n})},n.prototype.addOptions=function(e){t.appendMany(this.$element,e)},n.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup")).label=e.text:void 0!==(t=document.createElement("option")).textContent?t.textContent=e.text:t.innerText=e.text,e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var n=o(t),e=this._normalizeItem(e);return e.element=t,o.data(t,"data",e),n},n.prototype.item=function(e){var t={};if(null!=(t=o.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){for(var t={text:e.prop("label"),children:[],title:e.prop("title")},n=e.children("option"),i=[],r=0;r<n.length;r++){var s=o(n[r]),s=this.item(s);i.push(s)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],o.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){o.isPlainObject(e)||(e={id:e,text:e});return null!=(e=o.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),o.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),c.define("pumselect2/data/array",["./select","../utils","jquery"],function(e,u,c){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return u.Extend(i,e),i.prototype.select=function(n){var e=this.$element.find("option").filter(function(e,t){return t.value==n.id.toString()});0===e.length&&(e=this.option(n),this.addOptions(e)),i.__super__.select.call(this,n)},i.prototype.convertToOptions=function(e){var t=this,n=this.$element.find("option"),i=n.map(function(){return t.item(c(this)).id}).get(),r=[];for(var s=0;s<e.length;s++){var o,a,l=this._normalizeItem(e[s]);0<=c.inArray(l.id,i)?(o=n.filter(function(e){return function(){return c(this).val()==e.id}}(l)),a=this.item(o),a=c.extend(!0,{},l,a),a=this.option(a),o.replaceWith(a)):(a=this.option(l),l.children&&(l=this.convertToOptions(l.children),u.appendMany(a,l)),r.push(a))}return r},i}),c.define("pumselect2/data/ajax",["./array","../utils","jquery"],function(e,t,s){function n(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),n.__super__.constructor.call(this,e,t)}return t.Extend(n,e),n.prototype._applyDefaults=function(e){var t={data:function(e){return s.extend({},e,{q:e.term})},transport:function(e,t,n){e=s.ajax(e);return e.then(t),e.fail(n),e}};return s.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(t,n){var i=this;null!=this._request&&(s.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=s.extend({type:"GET"},this.ajaxOptions);function e(){var e=r.transport(r,function(e){e=i.processResults(e,t);i.options.get("debug")&&window.console&&console.error&&(e&&e.results&&s.isArray(e.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),n(e)},function(){i.trigger("results:message",{message:"errorLoading"})});i._request=e}"function"==typeof r.url&&(r.url=r.url.call(this.$element,t)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,t)),this.ajaxOptions.delay&&""!==t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),c.define("pumselect2/data/tags",["jquery"],function(a){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);r=n.get("insertTag");if(void 0!==r&&(this.insertTag=r),e.call(this,t,n),a.isArray(i))for(var s=0;s<i.length;s++){var o=i[s],o=this._normalizeItem(o),o=this.option(o);this.$element.append(o)}}return e.prototype.query=function(e,u,c){var d=this;this._removeOldTags(),null!=u.term&&null==u.page?e.call(this,u,function e(t,n){for(var i=t.results,r=0;r<i.length;r++){var s=i[r],o=null!=s.children&&!e({results:s.children},!0);if(s.text===u.term||o)return!n&&(t.data=i,void c(t))}if(n)return!0;var a,l=d.createTag(u);null!=l&&((a=d.option(l)).attr("data-pumselect2-tag",!0),d.addOptions([a]),d.insertTag(i,l)),t.results=i,c(t)}):e.call(this,u,c)},e.prototype.createTag=function(e,t){t=a.trim(t.term);return""===t?null:{id:t,text:t}},e.prototype.insertTag=function(e,t,n){t.unshift(n)},e.prototype._removeOldTags=function(e){this._lastTag;this.$element.find("option[data-pumselect2-tag]").each(function(){this.selected||a(this).remove()})},e}),c.define("pumselect2/data/tokenizer",["jquery"],function(u){function e(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".pumselect2-search__field")},e.prototype.query=function(e,t,n){var i=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,function(e){i.trigger("select",{data:e})});r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.focus()),t.term=r.term),e.call(this,t,n)},e.prototype.tokenizer=function(e,t,n,i){for(var r=n.get("tokenSeparators")||[],s=t.term,o=0,a=this.createTag||function(e){return{id:e.term,text:e.term}};o<s.length;){var l=s[o];-1!==u.inArray(l,r)?(l=s.substr(0,o),null!=(l=a(u.extend({},t,{term:l})))?(i(l),s=s.substr(o+1)||"",o=0):o++):o++}return{term:s}},e}),c.define("pumselect2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),c.define("pumselect2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e}),c.define("pumselect2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(t,n,i){var r=this;this.current(function(e){e=null!=e?e.length:0;0<r.maximumSelectionLength&&e>=r.maximumSelectionLength?r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):t.call(r,n,i)})},e}),c.define("pumselect2/dropdown",["jquery","./utils"],function(t,e){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('<span class="pumselect2-dropdown"><span class="pumselect2-results"></span></span>');return e.attr("dir",this.options.get("dir")),this.$dropdown=e},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),c.define("pumselect2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),e=r('<span class="pumselect2-search pumselect2-search--dropdown"><input class="pumselect2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),t.prepend(e),t},t.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),this.$search.on("keydown",function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(e){r(this).off("keyup")}),this.$search.on("keyup input",function(e){i.handleSearch(e)}),t.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),t.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),t.on("results:all",function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer.removeClass("pumselect2-search--hide"):i.$searchContainer.addClass("pumselect2-search--hide"))})},t.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),c.define("pumselect2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return t="string"==typeof t?{id:"",text:t}:t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;0<=i;i--){var r=t[i];this.placeholder.id===r.id&&n.splice(i,1)}return n},e}),c.define("pumselect2/dropdown/infiniteScroll",["jquery"],function(r){function e(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("query",function(e){i.lastParams=e,i.loading=!0}),t.on("query:append",function(e){i.lastParams=e,i.loading=!0}),this.$results.on("scroll",function(){var e=r.contains(document.documentElement,i.$loadingMore[0]);!i.loading&&e&&(e=i.$results.offset().top+i.$results.outerHeight(!1),i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=e+50&&i.loadMore())})},e.prototype.loadMore=function(){this.loading=!0;var e=r.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},e.prototype.createLoadingMore=function(){var e=r('<li class="pumselect2-results__option pumselect2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),t=this.options.get("translations").get("loadingMore");return e.html(t(this.lastParams)),e},e}),c.define("pumselect2/dropdown/attachBody",["jquery","../utils"],function(u,o){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||u(document.body),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var i=this,r=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),r||(r=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},e.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},e.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("pumselect2"),t.addClass("pumselect2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},e.prototype.render=function(e){var t=u("<span></span>"),e=e.call(this);return t.append(e),this.$dropdownContainer=t},e.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},e.prototype._attachPositioningHandler=function(e,t){var n=this,i="scroll.pumselect2."+t.id,r="resize.pumselect2."+t.id,s="orientationchange.pumselect2."+t.id,t=this.$container.parents().filter(o.hasScroll);t.each(function(){u(this).data("pumselect2-scroll-position",{x:u(this).scrollLeft(),y:u(this).scrollTop()})}),t.on(i,function(e){var t=u(this).data("pumselect2-scroll-position");u(this).scrollTop(t.y)}),u(window).on(i+" "+r+" "+s,function(e){n._positionDropdown(),n._resizeDropdown()})},e.prototype._detachPositioningHandler=function(e,t){var n="scroll.pumselect2."+t.id,i="resize.pumselect2."+t.id,t="orientationchange.pumselect2."+t.id;this.$container.parents().filter(o.hasScroll).off(n),u(window).off(n+" "+i+" "+t)},e.prototype._positionDropdown=function(){var e=u(window),t=this.$dropdown.hasClass("pumselect2-dropdown--above"),n=this.$dropdown.hasClass("pumselect2-dropdown--below"),i=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=r.top,s.bottom=r.top+s.height;var o=this.$dropdown.outerHeight(!1),a=e.scrollTop(),l=e.scrollTop()+e.height(),e=a<r.top-o,a=l>r.bottom+o,l={left:r.left,top:s.bottom},r=this.$dropdownParent,r=(r="static"===r.css("position")?r.offsetParent():r).offset();l.top-=r.top,l.left-=r.left,t||n||(i="below"),a||!e||t?!e&&a&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(l.top=s.top-o),null!=i&&(this.$dropdown.removeClass("pumselect2-dropdown--below pumselect2-dropdown--above").addClass("pumselect2-dropdown--"+i),this.$container.removeClass("pumselect2-container--below pumselect2-container--above").addClass("pumselect2-container--"+i)),this.$dropdownContainer.css(l)},e.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.width="auto"),this.$dropdown.css(e)},e.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},e}),c.define("pumselect2/dropdown/minimumResultsForSearch",[],function(){function e(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,i=0;i<t.length;i++){var r=t[i];r.children?n+=e(r.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e}),c.define("pumselect2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(){i._handleSelectOnClose()})},e.prototype._handleSelectOnClose=function(){var e=this.getHighlightedResults();e.length<1||(null!=(e=e.data("data")).element&&e.element.selected||null==e.element&&e.selected||this.trigger("select",{data:e}))},e}),c.define("pumselect2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){t=t.originalEvent;t&&t.ctrlKey||this.trigger("close",{})},e}),c.define("pumselect2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,e="Please delete "+t+" character";return 1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),c.define("pumselect2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(c,d,p,h,m,f,g,v,y,_,b,t,w,A,x,$,j,P,C,O,k,S,M,E,U,T,D,q,e){function n(){this.reset()}return n.prototype.apply=function(t){var e,n;if(null==(t=c.extend(!0,{},this.defaults,t)).dataAdapter&&(null!=t.ajax?t.dataAdapter=x:null!=t.data?t.dataAdapter=A:t.dataAdapter=w,0<t.minimumInputLength&&(t.dataAdapter=_.Decorate(t.dataAdapter,P)),0<t.maximumInputLength&&(t.dataAdapter=_.Decorate(t.dataAdapter,C)),0<t.maximumSelectionLength&&(t.dataAdapter=_.Decorate(t.dataAdapter,O)),t.tags&&(t.dataAdapter=_.Decorate(t.dataAdapter,$)),null==t.tokenSeparators&&null==t.tokenizer||(t.dataAdapter=_.Decorate(t.dataAdapter,j)),null!=t.query&&(e=d(t.amdBase+"compat/query"),t.dataAdapter=_.Decorate(t.dataAdapter,e)),null!=t.initSelection&&(e=d(t.amdBase+"compat/initSelection"),t.dataAdapter=_.Decorate(t.dataAdapter,e))),null==t.resultsAdapter&&(t.resultsAdapter=p,null!=t.ajax&&(t.resultsAdapter=_.Decorate(t.resultsAdapter,E)),null!=t.placeholder&&(t.resultsAdapter=_.Decorate(t.resultsAdapter,M)),t.selectOnClose&&(t.resultsAdapter=_.Decorate(t.resultsAdapter,D))),null==t.dropdownAdapter&&(t.multiple?t.dropdownAdapter=k:(n=_.Decorate(k,S),t.dropdownAdapter=n),0!==t.minimumResultsForSearch&&(t.dropdownAdapter=_.Decorate(t.dropdownAdapter,T)),t.closeOnSelect&&(t.dropdownAdapter=_.Decorate(t.dropdownAdapter,q)),null==t.dropdownCssClass&&null==t.dropdownCss&&null==t.adaptDropdownCssClass||(n=d(t.amdBase+"compat/dropdownCss"),t.dropdownAdapter=_.Decorate(t.dropdownAdapter,n)),t.dropdownAdapter=_.Decorate(t.dropdownAdapter,U)),null==t.selectionAdapter&&(t.multiple?t.selectionAdapter=m:t.selectionAdapter=h,null!=t.placeholder&&(t.selectionAdapter=_.Decorate(t.selectionAdapter,f)),t.allowClear&&(t.selectionAdapter=_.Decorate(t.selectionAdapter,g)),t.multiple&&(t.selectionAdapter=_.Decorate(t.selectionAdapter,v)),null==t.containerCssClass&&null==t.containerCss&&null==t.adaptContainerCssClass||(l=d(t.amdBase+"compat/containerCss"),t.selectionAdapter=_.Decorate(t.selectionAdapter,l)),t.selectionAdapter=_.Decorate(t.selectionAdapter,y)),"string"==typeof t.language&&(0<t.language.indexOf("-")?(u=t.language.split("-")[0],t.language=[t.language,u]):t.language=[t.language]),c.isArray(t.language)){var i=new b;t.language.push("en");for(var r=t.language,s=0;s<r.length;s++){var o=r[s],a={};try{a=b.loadPath(o)}catch(e){try{o=this.defaults.amdLanguageBase+o,a=b.loadPath(o)}catch(e){t.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+o+'" could not be automatically loaded. A fallback will be used instead.');continue}}i.extend(a)}t.translations=i}else{var l=b.loadPath(this.defaults.amdLanguageBase+"en"),u=new b(t.language);u.extend(l),t.translations=u}return t},n.prototype.reset=function(){function a(e){return e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e})}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:_.escapeMarkup,language:e,matcher:function e(t,n){if(""===c.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=c.extend(!0,{},n),r=n.children.length-1;0<=r;r--)null==e(t,n.children[r])&&i.children.splice(r,1);return 0<i.children.length?i:e(t,i)}var s=a(n.text).toUpperCase(),o=a(t.term).toUpperCase();return-1<s.indexOf(o)?n:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},n.prototype.set=function(e,t){var n={};n[c.camelCase(e)]=t;n=_._convertData(n);c.extend(this.defaults,n)},new n}),c.define("pumselect2/options",["require","jquery","./defaults","./utils"],function(n,s,i,o){function e(e,t){this.options=e,null!=t&&this.fromElement(t),this.options=i.apply(this.options),t&&t.is("input")&&(t=n(this.get("amdBase")+"compat/inputData"),this.options.dataAdapter=o.Decorate(this.options.dataAdapter,t))}return e.prototype.fromElement=function(e){var t=["pumselect2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("pumselect2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-pumselect2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("pumselect2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var n,i={},i=s.fn.jquery&&"1."==s.fn.jquery.substr(0,2)&&e[0].dataset?s.extend(!0,{},e[0].dataset,e.data()):e.data(),r=s.extend(!0,{},i);for(n in r=o._convertData(r))-1<s.inArray(n,t)||(s.isPlainObject(this.options[n])?s.extend(this.options[n],r[n]):this.options[n]=r[n]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),c.define("pumselect2/core",["jquery","./options","./utils","./keys"],function(r,s,n,i){var o=function(e,t){null!=e.data("pumselect2")&&e.data("pumselect2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new s(t,e),o.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");t=this.options.get("dataAdapter");this.dataAdapter=new t(e,this.options);n=this.render();this._placeContainer(n);t=this.options.get("selectionAdapter");this.selection=new t(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,n);t=this.options.get("dropdownAdapter");this.dropdown=new t(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,n);n=this.options.get("resultsAdapter");this.results=new n(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var i=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})}),e.addClass("pumselect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("pumselect2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){return"pumselect2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){i=e.outerWidth(!1);return i<=0?"auto":i+"px"}if("style"!=t)return t;e=e.attr("style");if("string"!=typeof e)return null;for(var r=e.split(";"),s=0,o=r.length;s<o;s+=1){var a=r[s].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.pumselect2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this._sync=n.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var e=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=e?(this._observer=new e(function(e){r.each(e,t._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",t._sync,!1)},o.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerSelectionEvents=function(){var n=this,i=["toggle","focus"];this.selection.on("toggle",function(){n.toggleDropdown()}),this.selection.on("focus",function(e){n.focus(e)}),this.selection.on("*",function(e,t){-1===r.inArray(e,i)&&n.trigger(e,t)})},o.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},o.prototype._registerEvents=function(){var n=this;this.on("open",function(){n.$container.addClass("pumselect2-container--open")}),this.on("close",function(){n.$container.removeClass("pumselect2-container--open")}),this.on("enable",function(){n.$container.removeClass("pumselect2-container--disabled")}),this.on("disable",function(){n.$container.addClass("pumselect2-container--disabled")}),this.on("blur",function(){n.$container.removeClass("pumselect2-container--focus")}),this.on("query",function(t){n.isOpen()||n.trigger("open",{}),this.dataAdapter.query(t,function(e){n.trigger("results:all",{data:e,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(e){n.trigger("results:append",{data:e,query:t})})}),this.on("keypress",function(e){var t=e.which;n.isOpen()?t===i.ESC||t===i.TAB||t===i.UP&&e.altKey?(n.close(),e.preventDefault()):t===i.ENTER?(n.trigger("results:select",{}),e.preventDefault()):t===i.SPACE&&e.ctrlKey?(n.trigger("results:toggle",{}),e.preventDefault()):t===i.UP?(n.trigger("results:previous",{}),e.preventDefault()):t===i.DOWN&&(n.trigger("results:next",{}),e.preventDefault()):(t===i.ENTER||t===i.SPACE||t===i.DOWN&&e.altKey)&&(n.open(),e.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],i={prevented:!1,name:e,args:t};if(n.call(this,r,i),i.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("pumselect2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("pumselect2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("pumselect2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `pumselect2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.');e=!(e=null==e||0===e.length?[!0]:e)[0];this.$element.prop("disabled",e)},o.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `pumselect2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},o.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `pumselect2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0];r.isArray(e)&&(e=r.map(e,function(e){return e.toString()})),this.$element.val(e).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".pumselect2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("pumselect2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("pumselect2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var e=r('<span class="pumselect2 pumselect2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("pumselect2-container--"+this.options.get("theme")),e.data("element",this.$element),e},o}),c.define("pumselect2/compat/utils",["jquery"],function(o){return{syncCssClasses:function(e,t,n){var i,r=[],s=o.trim(e.attr("class"));s&&o((s=""+s).split(/\s+/)).each(function(){0===this.indexOf("pumselect2-")&&r.push(this)}),(s=o.trim(t.attr("class")))&&o((s=""+s).split(/\s+/)).each(function(){0!==this.indexOf("pumselect2-")&&null!=(i=n(this))&&r.push(i)}),e.attr("class",r.join(" "))}}}),c.define("pumselect2/compat/containerCss",["jquery","./utils"],function(s,o){function a(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i,r=this.options.get("adaptContainerCssClass");r=r||a,-1!==n.indexOf(":all:")&&(n=n.replace(":all:",""),i=r,r=function(e){var t=i(e);return null!=t?t+" "+e:e});e=this.options.get("containerCss")||{};return s.isFunction(e)&&(e=e(this.$element)),o.syncCssClasses(t,this.$element,r),t.css(e),t.addClass(n),t},e}),c.define("pumselect2/compat/dropdownCss",["jquery","./utils"],function(s,o){function a(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";s.isFunction(n)&&(n=n(this.$element));var i,r=this.options.get("adaptDropdownCssClass");r=r||a,-1!==n.indexOf(":all:")&&(n=n.replace(":all:",""),i=r,r=function(e){var t=i(e);return null!=t?t+" "+e:e});e=this.options.get("dropdownCss")||{};return s.isFunction(e)&&(e=e(this.$element)),o.syncCssClasses(t,this.$element,r),t.css(e),t.addClass(n),t},e}),c.define("pumselect2/compat/initSelection",["jquery"],function(i){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return e.prototype.current=function(e,t){var n=this;this._isInitialized?e.call(this,t):this.initSelection.call(null,this.$element,function(e){n._isInitialized=!0,i.isArray(e)||(e=[e]),t(e)})},e}),c.define("pumselect2/compat/inputData",["jquery"],function(s){function e(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return e.prototype.current=function(e,t){for(var n=[],i=0;i<this._currentData.length;i++){var r=this._currentData[i];n.push.apply(n,function e(t,n){var i=[];return t.selected||-1!==s.inArray(t.id,n)?(t.selected=!0,i.push(t)):t.selected=!1,t.children&&i.push.apply(i,e(t.children,n)),i}(r,this.$element.val().split(this._valueSeparator)))}t(n)},e.prototype.select=function(e,t){var n;this.options.get("multiple")?(n=this.$element.val(),n+=this._valueSeparator+t.id,this.$element.val(n)):(this.current(function(e){s.map(e,function(e){e.selected=!1})}),this.$element.val(t.id)),this.$element.trigger("change")},e.prototype.unselect=function(e,r){var s=this;r.selected=!1,this.current(function(e){for(var t=[],n=0;n<e.length;n++){var i=e[n];r.id!=i.id&&t.push(i.id)}s.$element.val(t.join(s._valueSeparator)),s.$element.trigger("change")})},e.prototype.query=function(e,t,n){for(var i=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r],s=this.matches(t,s);null!==s&&i.push(s)}n({results:i})},e.prototype.addOptions=function(e,t){t=s.map(t,function(e){return s.data(e[0],"data")});this._currentData.push.apply(this._currentData,t)},e}),c.define("pumselect2/compat/matcher",["jquery"],function(o){return function(s){return function(e,t){var n=o.extend(!0,{},t);if(null==e.term||""===o.trim(e.term))return n;if(t.children){for(var i=t.children.length-1;0<=i;i--){var r=t.children[i];s(e.term,r.text,r)||n.children.splice(i,1)}if(0<n.children.length)return n}return s(e.term,t.text,t)?n:null}}}),c.define("pumselect2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),c.define("pumselect2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("pumselect2-dropdown--below"),n.addClass("pumselect2-container--below")},e}),c.define("pumselect2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),c.define("pumselect2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),function(e){e.stopPropagation()})},e}),a=function(c){var d,p,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],h=Array.prototype.slice;if(c.event.fixHooks)for(var n=e.length;n;)c.event.fixHooks[e[--n]]=c.event.mouseHooks;var m=c.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=t.length;e;)this.addEventListener(t[--e],i,!1);else this.onmousewheel=i;c.data(this,"mousewheel-line-height",m.getLineHeight(this)),c.data(this,"mousewheel-page-height",m.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;c.removeData(this,"mousewheel-line-height"),c.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=c(e),e=t["offsetParent"in c.fn?"offsetParent":"parent"]();return e.length||(e=c("body")),parseInt(e.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return c(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=h.call(arguments,1),r=0,s=0,o=0,a=0,l=0,u=0;if(e=c.event.fix(n),e.type="mousewheel","detail"in n&&(o=-1*n.detail),"wheelDelta"in n&&(o=n.wheelDelta),"wheelDeltaY"in n&&(o=n.wheelDeltaY),"wheelDeltaX"in n&&(s=-1*n.wheelDeltaX),"axis"in n&&n.axis===n.HORIZONTAL_AXIS&&(s=-1*o,o=0),r=0===o?s:o,"deltaY"in n&&(r=o=-1*n.deltaY),"deltaX"in n&&(s=n.deltaX,0===o&&(r=-1*s)),0!==o||0!==s)return 1===n.deltaMode?(r*=t=c.data(this,"mousewheel-line-height"),o*=t,s*=t):2===n.deltaMode&&(r*=t=c.data(this,"mousewheel-page-height"),o*=t,s*=t),a=Math.max(Math.abs(o),Math.abs(s)),(!p||a<p)&&g(n,p=a)&&(p/=40),g(n,a)&&(r/=40,s/=40,o/=40),r=Math[1<=r?"floor":"ceil"](r/p),s=Math[1<=s?"floor":"ceil"](s/p),o=Math[1<=o?"floor":"ceil"](o/p),m.settings.normalizeOffset&&this.getBoundingClientRect&&(a=this.getBoundingClientRect(),l=e.clientX-a.left,u=e.clientY-a.top),e.deltaX=s,e.deltaY=o,e.deltaFactor=p,e.offsetX=l,e.offsetY=u,e.deltaMode=0,i.unshift(e,r,s,o),d&&clearTimeout(d),d=setTimeout(f,200),(c.event.dispatch||c.event.handle).apply(this,i)}function f(){p=null}function g(e,t){return m.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}c.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof c.define&&c.define.amd?c.define("jquery-mousewheel",["jquery"],a):"object"==typeof exports?module.exports=a:a(t),c.define("jquery.pumselect2",["jquery","jquery-mousewheel","./pumselect2/core","./pumselect2/defaults"],function(r,e,t,n){var s;return null==r.fn.pumselect2&&(s=["open","close","destroy"],r.fn.pumselect2=function(n){if("object"==typeof(n=n||{}))return this.each(function(){var e=r.extend(!0,{},n);new t(r(this),e)}),this;if("string"!=typeof n)throw new Error("Invalid arguments for Select2: "+n);var i;return this.each(function(){var e=r(this).data("pumselect2");null==e&&window.console&&console.error&&console.error("The pumselect2('"+n+"') method was called on an element that is not using Select2.");var t=Array.prototype.slice.call(arguments,1);i=e[n].apply(e,t)}),-1<r.inArray(n,s)?this:i}),null==r.fn.pumselect2.defaults&&(r.fn.pumselect2.defaults=n),t}),{define:c.define,require:c.require});function _(e,t){return i.call(e,t)}function l(e,t){var n,i,r,s,o,a,l,u,c,d,p=t&&t.split("/"),h=g.map,m=h&&h["*"]||{};if(e&&"."===e.charAt(0))if(t){for(t=(e=e.split("/")).length-1,g.nodeIdCompat&&y.test(e[t])&&(e[t]=e[t].replace(y,"")),e=p.slice(0,p.length-1).concat(e),u=0;u<e.length;u+=1)if("."===(d=e[u]))e.splice(u,1),--u;else if(".."===d){if(1===u&&(".."===e[2]||".."===e[0]))break;0<u&&(e.splice(u-1,2),u-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((p||m)&&h){for(u=(n=e.split("/")).length;0<u;--u){if(i=n.slice(0,u).join("/"),p)for(c=p.length;0<c;--c)if(r=h[p.slice(0,c).join("/")],r=r&&r[i]){s=r,o=u;break}if(s)break;!a&&m&&m[i]&&(a=m[i],l=u)}!s&&a&&(s=a,o=l),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function b(t,n){return function(){var e=r.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(d,e.concat([t,n]))}}function w(e){var t;if(_(f,e)&&(t=f[e],delete f[e],v[e]=!0,s.apply(d,t)),!_(m,e)&&!_(v,e))throw new Error("No "+e);return m[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}var c=a.require("jquery.pumselect2");return t.fn.pumselect2.amd=a,c});
|
classes/Cookies.php
CHANGED
@@ -144,7 +144,7 @@ class PUM_Cookies {
|
|
144 |
'id' => '',
|
145 |
'name' => '',
|
146 |
'modal_title' => __( 'Cookie Settings', 'popup-maker' ),
|
147 |
-
'settings_column' => sprintf( '%s%s%s', '
|
148 |
'priority' => 10,
|
149 |
'tabs' => $this->get_tabs(),
|
150 |
'fields' => $this->cookie_fields(),
|
144 |
'id' => '',
|
145 |
'name' => '',
|
146 |
'modal_title' => __( 'Cookie Settings', 'popup-maker' ),
|
147 |
+
'settings_column' => sprintf( '%s%s%s', '{{ (typeof data.session === "undefined" || data.session !== "1") ? data.time : "', __( 'Sessions', 'popup-maker' ), '" }}' ),
|
148 |
'priority' => 10,
|
149 |
'tabs' => $this->get_tabs(),
|
150 |
'fields' => $this->cookie_fields(),
|
includes/functions/popups/template.php
CHANGED
@@ -10,25 +10,25 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
10 |
/**
|
11 |
* Render the popup ID
|
12 |
*
|
13 |
-
* @param null|int|string $popup_id
|
14 |
*/
|
15 |
function pum_popup_ID( $popup_id = null ) {
|
16 |
-
echo pum_get_popup_id( $popup_id );
|
17 |
}
|
18 |
|
19 |
/**
|
20 |
* Render the popup title.
|
21 |
*
|
22 |
-
* @param null|int $popup_id
|
23 |
*/
|
24 |
function pum_popup_title( $popup_id = null ) {
|
25 |
-
echo pum_get_popup_title( $popup_id );
|
26 |
}
|
27 |
|
28 |
/**
|
29 |
* Render the popup content.
|
30 |
*
|
31 |
-
* @param null|int $popup_id
|
32 |
*/
|
33 |
function pum_popup_content( $popup_id = null ) {
|
34 |
$popup = pum_get_popup( $popup_id );
|
@@ -39,14 +39,14 @@ function pum_popup_content( $popup_id = null ) {
|
|
39 |
|
40 |
$cached_content = PUM_Site_Popups::get_cache_content( $popup->ID );
|
41 |
|
42 |
-
echo false !== $cached_content ? $cached_content : $popup->get_content();
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
* Render the chose popup elements classes.
|
47 |
*
|
48 |
-
* @param null $popup_id
|
49 |
-
* @param string $element
|
50 |
*/
|
51 |
function pum_popup_classes( $popup_id = null, $element = 'overlay' ) {
|
52 |
$popup = pum_get_popup( $popup_id );
|
@@ -61,7 +61,7 @@ function pum_popup_classes( $popup_id = null, $element = 'overlay' ) {
|
|
61 |
/**
|
62 |
* Render the popups data attribute.
|
63 |
*
|
64 |
-
* @param null|int $popup_id
|
65 |
*/
|
66 |
function pum_popup_data_attr( $popup_id = null ) {
|
67 |
$popup = pum_get_popup( $popup_id );
|
@@ -74,8 +74,10 @@ function pum_popup_data_attr( $popup_id = null ) {
|
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
-
* Render the popup's content tabindex attribute to make focusable
|
78 |
* if needed.
|
|
|
|
|
79 |
*/
|
80 |
function pum_popup_content_tabindex_attr( $popup_id = null ) {
|
81 |
$popup = pum_get_popup( $popup_id );
|
@@ -91,7 +93,7 @@ function pum_popup_content_tabindex_attr( $popup_id = null ) {
|
|
91 |
/**
|
92 |
* Render the popup close button text.
|
93 |
*
|
94 |
-
* @param null|int $popup_id
|
95 |
*/
|
96 |
function pum_popup_close_text( $popup_id = null ) {
|
97 |
$popup = pum_get_popup( $popup_id );
|
@@ -103,7 +105,7 @@ function pum_popup_close_text( $popup_id = null ) {
|
|
103 |
$close_text = $popup->close_text();
|
104 |
|
105 |
// If the close text is a font awesome icon (E.g. "fas fa-camera"), add the icon instead of the text.
|
106 |
-
if ( preg_match(
|
107 |
echo '<i class="' . esc_attr( $close_text ) . '"></i>';
|
108 |
} else {
|
109 |
echo esc_html( $close_text );
|
10 |
/**
|
11 |
* Render the popup ID
|
12 |
*
|
13 |
+
* @param null|int|string $popup_id Popup ID.
|
14 |
*/
|
15 |
function pum_popup_ID( $popup_id = null ) {
|
16 |
+
echo esc_attr( pum_get_popup_id( $popup_id ) );
|
17 |
}
|
18 |
|
19 |
/**
|
20 |
* Render the popup title.
|
21 |
*
|
22 |
+
* @param null|int $popup_id Popup ID.
|
23 |
*/
|
24 |
function pum_popup_title( $popup_id = null ) {
|
25 |
+
echo esc_html( pum_get_popup_title( $popup_id ) );
|
26 |
}
|
27 |
|
28 |
/**
|
29 |
* Render the popup content.
|
30 |
*
|
31 |
+
* @param null|int $popup_id Popup ID.
|
32 |
*/
|
33 |
function pum_popup_content( $popup_id = null ) {
|
34 |
$popup = pum_get_popup( $popup_id );
|
39 |
|
40 |
$cached_content = PUM_Site_Popups::get_cache_content( $popup->ID );
|
41 |
|
42 |
+
echo esc_html( false !== $cached_content ? $cached_content : $popup->get_content() );
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
* Render the chose popup elements classes.
|
47 |
*
|
48 |
+
* @param null $popup_id Popup ID.
|
49 |
+
* @param string $element Element to get classes for.
|
50 |
*/
|
51 |
function pum_popup_classes( $popup_id = null, $element = 'overlay' ) {
|
52 |
$popup = pum_get_popup( $popup_id );
|
61 |
/**
|
62 |
* Render the popups data attribute.
|
63 |
*
|
64 |
+
* @param null|int $popup_id Popup ID.
|
65 |
*/
|
66 |
function pum_popup_data_attr( $popup_id = null ) {
|
67 |
$popup = pum_get_popup( $popup_id );
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
+
* Render the popup's content tabindex attribute to make focusable
|
78 |
* if needed.
|
79 |
+
*
|
80 |
+
* @param null|int $popup_id Popup ID.
|
81 |
*/
|
82 |
function pum_popup_content_tabindex_attr( $popup_id = null ) {
|
83 |
$popup = pum_get_popup( $popup_id );
|
93 |
/**
|
94 |
* Render the popup close button text.
|
95 |
*
|
96 |
+
* @param null|int $popup_id Popup ID.
|
97 |
*/
|
98 |
function pum_popup_close_text( $popup_id = null ) {
|
99 |
$popup = pum_get_popup( $popup_id );
|
105 |
$close_text = $popup->close_text();
|
106 |
|
107 |
// If the close text is a font awesome icon (E.g. "fas fa-camera"), add the icon instead of the text.
|
108 |
+
if ( preg_match( '/^fa[srldb]?\s.+/i', $close_text ) ) {
|
109 |
echo '<i class="' . esc_attr( $close_text ) . '"></i>';
|
110 |
} else {
|
111 |
echo esc_html( $close_text );
|
popup-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Popup Maker
|
4 |
* Plugin URI: https://wppopupmaker.com/?utm_campaign=plugin-info&utm_source=plugin-header&utm_medium=plugin-uri
|
5 |
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
|
6 |
-
* Version: 1.16.
|
7 |
* Author: Popup Maker
|
8 |
* Author URI: https://wppopupmaker.com/?utm_campaign=plugin-info&utm_source=plugin-header&utm_medium=author-uri
|
9 |
* License: GPL2 or later
|
@@ -93,7 +93,7 @@ class Popup_Maker {
|
|
93 |
/**
|
94 |
* @var string Plugin Version
|
95 |
*/
|
96 |
-
public static $VER = '1.16.
|
97 |
|
98 |
/**
|
99 |
* @var int DB Version
|
3 |
* Plugin Name: Popup Maker
|
4 |
* Plugin URI: https://wppopupmaker.com/?utm_campaign=plugin-info&utm_source=plugin-header&utm_medium=plugin-uri
|
5 |
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
|
6 |
+
* Version: 1.16.5
|
7 |
* Author: Popup Maker
|
8 |
* Author URI: https://wppopupmaker.com/?utm_campaign=plugin-info&utm_source=plugin-header&utm_medium=author-uri
|
9 |
* License: GPL2 or later
|
93 |
/**
|
94 |
* @var string Plugin Version
|
95 |
*/
|
96 |
+
public static $VER = '1.16.5';
|
97 |
|
98 |
/**
|
99 |
* @var int DB Version
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: marketing, ecommerce, popup, popups, optin, conversion, promotion, pop-up
|
|
7 |
Requires at least: 4.9
|
8 |
Tested up to: 5.9
|
9 |
Requires PHP: 5.6
|
10 |
-
Stable tag: 1.16.
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -181,7 +181,14 @@ There are several common causes for this, check [this guide for help](https://do
|
|
181 |
|
182 |
View our [complete changelog](https://github.com/PopupMaker/Popup-Maker/blob/master/CHANGELOG.md) for up-to-date information on what has been going on with the development of Popup Maker.
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
= v1.16.4 - 01/25/2022 =
|
|
|
185 |
* Improvement: Prevent changing aria-hidden if its already set when showing a popup.
|
186 |
* Improvement: Remove usage of !important in several CSS rules.
|
187 |
* Improvement: Pass wp_get_environment_type to license server to prevent dev servers from taking a site activation.
|
@@ -189,13 +196,14 @@ View our [complete changelog](https://github.com/PopupMaker/Popup-Maker/blob/mas
|
|
189 |
* Improvement: Add new `pumBeforeInit` jQuery event.
|
190 |
* Fix: Remove unwanted outline when no focusable elements existed in popups.
|
191 |
|
192 |
-
|
193 |
= v1.16.3 - 11/16/2021 =
|
|
|
194 |
* Improvement: Code cleanup/simplifications, and more inline documentation.
|
195 |
* Improvement: Added enhancements in the analytics systems for upcoming extension updates.
|
196 |
* Fix: Issue with width of some popup editor select fields.
|
197 |
|
198 |
= v1.16.2 - 07/07/2021 =
|
|
|
199 |
* Improvement: All plugin images optimized for size. This only affects our admin pages.
|
200 |
* Improvement: Various label & text changes.
|
201 |
* Improvement: Improved focus when popups content is taller than screen and first focusable element is off screen.
|
@@ -203,9 +211,11 @@ View our [complete changelog](https://github.com/PopupMaker/Popup-Maker/blob/mas
|
|
203 |
* Fix: Deprecated function parameter notices on PHP 8.
|
204 |
|
205 |
= v1.16.1 - 03/21/2021 =
|
|
|
206 |
* Fix: WP <5.0 and ClassicPress saw errors in the admin for usage of WP_Block_Type_Registry. [Issue #995](https://github.com/PopupMaker/Popup-Maker/issues/995)
|
207 |
|
208 |
= v1.16.0 - 03/09/2021 =
|
|
|
209 |
* Feature: Add 'flush popup cache' link in admin bar menu to quickly clear cached plugin JS & CSS files. [Issue #931](https://github.com/PopupMaker/Popup-Maker/issues/931)
|
210 |
* Improvement: Remove 'Tools -> System Info' page, use WP Site Health page instead. [Issue #862](https://github.com/PopupMaker/Popup-Maker/issues/862)
|
211 |
* Improvement: Accessibility forced focus can now focus main close button if nothing else is available. [Issue #943](https://github.com/PopupMaker/Popup-Maker/issues/943)
|
@@ -216,6 +226,7 @@ View our [complete changelog](https://github.com/PopupMaker/Popup-Maker/blob/mas
|
|
216 |
* Fix: Update integration with Contact Form 7 due to breaking changes in their recent v5.4 update. [Issue #946](https://github.com/PopupMaker/Popup-Maker/issues/946)
|
217 |
|
218 |
= v1.15.0 - 01/12/2021 =
|
|
|
219 |
* Feature: Automatically enqueue popups when detected during page load [Issue $543](https://github.com/PopupMaker/Popup-Maker/issues/543)
|
220 |
* Improvement: Improvements to 'Extend' page [Issue $913](https://github.com/PopupMaker/Popup-Maker/issues/913)
|
221 |
* Improvement: Start working toward more consistent linking/documentation strategy
|
7 |
Requires at least: 4.9
|
8 |
Tested up to: 5.9
|
9 |
Requires PHP: 5.6
|
10 |
+
Stable tag: 1.16.5
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
181 |
|
182 |
View our [complete changelog](https://github.com/PopupMaker/Popup-Maker/blob/master/CHANGELOG.md) for up-to-date information on what has been going on with the development of Popup Maker.
|
183 |
|
184 |
+
= v1.16.5 - 04/04/2022 =
|
185 |
+
|
186 |
+
* Improvement: Add precautionary escaping of some generated outputs.
|
187 |
+
* Improvement: Remove leftover console logging code.
|
188 |
+
* Fix: Typo in admin template rendering for cookie editor.
|
189 |
+
|
190 |
= v1.16.4 - 01/25/2022 =
|
191 |
+
|
192 |
* Improvement: Prevent changing aria-hidden if its already set when showing a popup.
|
193 |
* Improvement: Remove usage of !important in several CSS rules.
|
194 |
* Improvement: Pass wp_get_environment_type to license server to prevent dev servers from taking a site activation.
|
196 |
* Improvement: Add new `pumBeforeInit` jQuery event.
|
197 |
* Fix: Remove unwanted outline when no focusable elements existed in popups.
|
198 |
|
|
|
199 |
= v1.16.3 - 11/16/2021 =
|
200 |
+
|
201 |
* Improvement: Code cleanup/simplifications, and more inline documentation.
|
202 |
* Improvement: Added enhancements in the analytics systems for upcoming extension updates.
|
203 |
* Fix: Issue with width of some popup editor select fields.
|
204 |
|
205 |
= v1.16.2 - 07/07/2021 =
|
206 |
+
|
207 |
* Improvement: All plugin images optimized for size. This only affects our admin pages.
|
208 |
* Improvement: Various label & text changes.
|
209 |
* Improvement: Improved focus when popups content is taller than screen and first focusable element is off screen.
|
211 |
* Fix: Deprecated function parameter notices on PHP 8.
|
212 |
|
213 |
= v1.16.1 - 03/21/2021 =
|
214 |
+
|
215 |
* Fix: WP <5.0 and ClassicPress saw errors in the admin for usage of WP_Block_Type_Registry. [Issue #995](https://github.com/PopupMaker/Popup-Maker/issues/995)
|
216 |
|
217 |
= v1.16.0 - 03/09/2021 =
|
218 |
+
|
219 |
* Feature: Add 'flush popup cache' link in admin bar menu to quickly clear cached plugin JS & CSS files. [Issue #931](https://github.com/PopupMaker/Popup-Maker/issues/931)
|
220 |
* Improvement: Remove 'Tools -> System Info' page, use WP Site Health page instead. [Issue #862](https://github.com/PopupMaker/Popup-Maker/issues/862)
|
221 |
* Improvement: Accessibility forced focus can now focus main close button if nothing else is available. [Issue #943](https://github.com/PopupMaker/Popup-Maker/issues/943)
|
226 |
* Fix: Update integration with Contact Form 7 due to breaking changes in their recent v5.4 update. [Issue #946](https://github.com/PopupMaker/Popup-Maker/issues/946)
|
227 |
|
228 |
= v1.15.0 - 01/12/2021 =
|
229 |
+
|
230 |
* Feature: Automatically enqueue popups when detected during page load [Issue $543](https://github.com/PopupMaker/Popup-Maker/issues/543)
|
231 |
* Improvement: Improvements to 'Extend' page [Issue $913](https://github.com/PopupMaker/Popup-Maker/issues/913)
|
232 |
* Improvement: Start working toward more consistent linking/documentation strategy
|