Popup Maker – Popup Forms, Optins & More - Version 1.8.11

Version Description

Download this release

Release Info

Developer danieliser
Plugin Icon 128x128 Popup Maker – Popup Forms, Optins & More
Version 1.8.11
Comparing to
See all releases

Code changes from version 1.8.10 to 1.8.11

assets/js/admin-general.js CHANGED
@@ -6928,14 +6928,12 @@
6928
 
6929
  },
6930
  parseValues: function (values, fields) {
6931
- fields = fields || false
6932
 
6933
  if (!fields) {
6934
  return values;
6935
  }
6936
 
6937
- debugger;
6938
-
6939
  for (var key in fields) {
6940
  if (!fields.hasOwnProperty(key)) {
6941
  continue;
@@ -7669,11 +7667,25 @@ function pumChecked(val1, val2, print) {
7669
 
7670
  function makeObject(root, value) {
7671
 
7672
- var keys = root.match(patterns.key), k;
 
 
 
 
 
 
 
 
 
 
 
 
7673
 
7674
- try {
7675
- value = JSON.parse(value);
7676
- } catch (Error) {
 
 
7677
  }
7678
 
7679
  // nest, nest, ..., nest
@@ -7706,7 +7718,12 @@ function pumChecked(val1, val2, print) {
7706
  }
7707
 
7708
  function encode(pair) {
 
 
 
7709
  switch ($('[name="' + pair.name + '"]', $form).attr("type")) {
 
 
7710
  case "checkbox":
7711
  return pair.value === "1" ? true : pair.value;
7712
  default:
@@ -8106,8 +8123,6 @@ function pumChecked(val1, val2, print) {
8106
  data.value = [];
8107
  }
8108
 
8109
- debugger;
8110
-
8111
  if (typeof data.value === 'string' && data.value.indexOf(',')) {
8112
  data.value = data.value.split(',');
8113
  }
6928
 
6929
  },
6930
  parseValues: function (values, fields) {
6931
+ fields = fields || false;
6932
 
6933
  if (!fields) {
6934
  return values;
6935
  }
6936
 
 
 
6937
  for (var key in fields) {
6938
  if (!fields.hasOwnProperty(key)) {
6939
  continue;
7667
 
7668
  function makeObject(root, value) {
7669
 
7670
+ var keys = root.match(patterns.key), k,
7671
+ field = document.querySelector('[name="' + root + '"]'),
7672
+ type = false;
7673
+
7674
+ if ("INPUT" === field.tagName) {
7675
+ type = field.type;
7676
+ } else {
7677
+ if ("SELECT" === field.tagName) {
7678
+ type = 'select';
7679
+ } else if ("TEXTAREA" === field.tagName) {
7680
+ type = 'textarea';
7681
+ }
7682
+ }
7683
 
7684
+ if (['textarea', 'text'].indexOf(type) >= 0) {
7685
+ try {
7686
+ value = JSON.parse(value);
7687
+ } catch (Error) {
7688
+ }
7689
  }
7690
 
7691
  // nest, nest, ..., nest
7718
  }
7719
 
7720
  function encode(pair) {
7721
+
7722
+ console.log(pair);
7723
+
7724
  switch ($('[name="' + pair.name + '"]', $form).attr("type")) {
7725
+
7726
+
7727
  case "checkbox":
7728
  return pair.value === "1" ? true : pair.value;
7729
  default:
8123
  data.value = [];
8124
  }
8125
 
 
 
8126
  if (typeof data.value === 'string' && data.value.indexOf(',')) {
8127
  data.value = data.value.split(',');
8128
  }
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)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0: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)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0:e===t&&(i=!0),void 0!==n&&n?i?' checked="checked"':"":i}!function(e){"function"==typeof define&&void 0!==define.amd&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(i){var e=function(){if(i&&i.fn&&i.fn.pumselect2&&i.fn.pumselect2.amd)var e=i.fn.pumselect2.amd;var t,r,u,n;return e&&e.requirejs||(e?r=e:e={},function(p){var s,o,h,m,f={},g={},v={},y={},n=Object.prototype.hasOwnProperty,i=[].slice,_=/\.js$/;function b(e,t){return n.call(e,t)}function a(e,t){var n,i,r,s,o,a,l,u,c,d,p,h=t&&t.split("/"),m=v.map,f=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(o=(e=e.split("/")).length-1,v.nodeIdCompat&&_.test(e[o])&&(e[o]=e[o].replace(_,"")),e=h.slice(0,h.length-1).concat(e),c=0;c<e.length;c+=1)if("."===(p=e[c]))e.splice(c,1),c-=1;else if(".."===p){if(1===c&&(".."===e[2]||".."===e[0]))break;0<c&&(e.splice(c-1,2),c-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||f)&&m){for(c=(n=e.split("/")).length;0<c;c-=1){if(i=n.slice(0,c).join("/"),h)for(d=h.length;0<d;d-=1)if((r=m[h.slice(0,d).join("/")])&&(r=r[i])){s=r,a=c;break}if(s)break;!l&&f&&f[i]&&(l=f[i],u=c)}!s&&l&&(s=l,a=u),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function w(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(p,e.concat([t,n]))}}function A(t){return function(e){f[t]=e}}function x(e){if(b(g,e)){var t=g[e];delete g[e],y[e]=!0,s.apply(p,t)}if(!b(f,e)&&!b(y,e))throw new Error("No "+e);return f[e]}function l(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]}h=function(e,t){var n,i=l(e),r=i[0];return e=i[1],r&&(n=x(r=a(r,t))),r?e=n&&n.normalize?n.normalize(e,function(t){return function(e){return a(e,t)}}(t)):a(e,t):(r=(i=l(e=a(e,t)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},m={require:function(e){return w(e)},exports:function(e){var t=f[e];return void 0!==t?t:f[e]={}},module:function(e){return{id:e,uri:"",exports:f[e],config:function(e){return function(){return v&&v.config&&v.config[e]||{}}}(e)}}},s=function(e,t,n,i){var r,s,o,a,l,u,c=[],d=typeof n;if(i=i||e,"undefined"==d||"function"==d){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(s=(a=h(t[l],i)).f))c[l]=m.require(e);else if("exports"===s)c[l]=m.exports(e),u=!0;else if("module"===s)r=c[l]=m.module(e);else if(b(f,s)||b(g,s)||b(y,s))c[l]=x(s);else{if(!a.p)throw new Error(e+" missing "+s);a.p.load(a.n,w(i,!0),A(s),{}),c[l]=f[s]}o=n?n.apply(f[e],c):void 0,e&&(r&&r.exports!==p&&r.exports!==f[e]?f[e]=r.exports:o===p&&u||(f[e]=o))}else e&&(f[e]=n)},t=r=o=function(e,t,n,i,r){if("string"==typeof e)return m[e]?m[e](t):x(h(e,t).f);if(!e.splice){if((v=e).deps&&o(v.deps,v.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?s(p,e,t,n):setTimeout(function(){s(p,e,t,n)},4),o},o.config=function(e){return o(e)},t._defined=f,(u=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=[]),b(f,e)||b(g,e)||(g[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=r,e.define=u),e.define("almond",function(){}),e.define("jquery",[],function(){var e=i||$;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}),e.define("pumselect2/utils",["jquery"],function(s){var e={};function c(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}e.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},e.Decorate=function(i,r){var e=c(r),t=c(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=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=0;l<e.length;l++){var u=e[l];s.prototype[u]=a(u)}return s};var t=function(){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={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===s.fn.jquery.substr(0,3)){var n=s();s.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("pumselect2/results",["jquery","./utils"],function(p,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=p('<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=p('<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],r=this.option(i);t.push(r)}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 r=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()}),t=r.$results.find(".pumselect2-results__option[aria-selected]");t.each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")});var n=t.filter("[aria-selected=true]");0<n.length?n.first().trigger("mouseenter"):t.first().trigger("mouseenter")})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},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={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var r=n[i];t.setAttribute(i,r)}if(e.children){var s=p(t),o=document.createElement("strong");o.className="pumselect2-results__group";p(o);this.template(e,o);for(var a=[],l=0;l<e.children.length;l++){var u=e.children[l],c=this.option(u);a.push(c)}var d=p("<ul></ul>",{class:"pumselect2-results__options pumselect2-results__options--nested"});d.append(a),s.append(o),s.append(d)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&l.setClasses()}),t.on("unselect",function(){t.isOpen()&&l.setClasses()}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var s=l.$results.offset().top,o=r.offset().top,a=l.$results.scrollTop()+(o-s);0===i?l.$results.scrollTop(0):o-s<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),o=l.$results.scrollTop()+s-r;0===n?l.$results.scrollTop(0):r<s&&l.$results.scrollTop(o)}}),t.on("results:focus",function(e){e.element.addClass("pumselect2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".pumselect2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".pumselect2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("pumselect2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(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=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),s=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):p(t).append(r)},i}),e.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}}),e.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}),e.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){if(0!==e.length){var t=e[0],n=this.$selection.find(".pumselect2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),e.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){if(!n.options.get("disabled")){var 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">&times;</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}),e.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"string"==typeof t&&(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();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".pumselect2-selection__rendered").append(i)},t}),e.define("pumselect2/selection/allowClear",["jquery","../keys"],function(i,r){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!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".pumselect2-selection__placeholder").length||0===t.length)){var n=i('<span class="pumselect2-selection__clear">&times;</span>');n.data("data",t),this.$selection.find(".pumselect2-selection__rendered").prepend(n)}},e}),e.define("pumselect2/selection/search",["jquery","../utils","../keys"],function(i,e,o){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<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");var n=e.call(this);return this._transferTabIndex(),n},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){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===o.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".pumselect2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var r=document.documentMode,s=r&&r<=11;this.$selection.on("input.searchcheck",".pumselect2-search--inline",function(e){s?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".pumselect2-search--inline",function(e){if(s&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=o.SHIFT&&t!=o.CTRL&&t!=o.ALT&&t!=o.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(){if(this.resizeSearch(),!this._keyUpPrevented){var 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="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".pumselect2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.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){if(-1!==o.inArray(e,r)){t=t||{};var n=o.Event("pumselect2:"+e,{params:t});i.$element.trigger(n),-1!==o.inArray(e,s)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.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){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("pumselect2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=i.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+i.generateChars(4),n},n}),e.define("pumselect2/data/select",["./base","../utils","jquery"],function(e,t,a){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 n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var s=this;if(r.selected=!0,a(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");if(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===a.inArray(i,t)&&t.push(i)}s.$element.val(t),s.$element.trigger("change")});else{var 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,a(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===a.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(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var r=[],s=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=s.item(e),n=s.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},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=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.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")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var s=a(n[r]),o=this.item(s);i.push(o)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.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)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("pumselect2/data/array",["./select","../utils","jquery"],function(e,m,f){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return m.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(f(this)).id}).get(),r=[];function s(e){return function(){return f(this).val()==e.id}}for(var o=0;o<e.length;o++){var a=this._normalizeItem(e[o]);if(0<=f.inArray(a.id,i)){var l=n.filter(s(a)),u=this.item(l),c=f.extend(!0,{},a,u),d=this.option(c);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);m.appendMany(p,h)}r.push(p)}}return r},i}),e.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){var i=s.ajax(e);return i.then(t),i.fail(n),i}};return s.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){var r=this;null!=this._request&&(s.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=s.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&s.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){r.trigger("results:message",{message:"errorLoading"})});r._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&""!==n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("pumselect2/data/tags",["jquery"],function(c){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var s=n.get("insertTag");if(void 0!==s&&(this.insertTag=s),e.call(this,t,n),c.isArray(i))for(var o=0;o<i.length;o++){var a=i[o],l=this._normalizeItem(a),u=this.option(l);this.$element.append(u)}}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=d.createTag(u);if(null!=a){var l=d.option(a);l.attr("data-pumselect2-tag",!0),d.addOptions([l]),d.insertTag(i,a)}t.results=i,c(t)}):e.call(this,u,c)},e.prototype.createTag=function(e,t){var n=c.trim(t.term);return""===n?null:{id:n,text:n}},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||c(this).remove()})},e}),e.define("pumselect2/data/tokenizer",["jquery"],function(d){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];if(-1!==d.inArray(l,r)){var u=s.substr(0,o),c=a(d.extend({},t,{term:u}));null!=c?(i(c),s=s.substr(o+1)||"",o=0):o++}else o++}return{term:s}},e}),e.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}),e.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}),e.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(n,i,r){var s=this;this.current(function(e){var t=null!=e?e.length:0;0<s.maximumSelectionLength&&t>=s.maximumSelectionLength?s.trigger("results:message",{message:"maximumSelected",args:{maximum:s.maximumSelectionLength}}):n.call(s,i,r)})},e}),e.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}),e.define("pumselect2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=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=n,this.$search=n.find("input"),t.prepend(n),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){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.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"string"==typeof t&&(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}),e.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]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+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}),e.define("pumselect2/dropdown/attachBody",["jquery","../utils"],function(m,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||m(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=m("<span></span>"),n=e.call(this);return t.append(n),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,o=this.$container.parents().filter(a.hasScroll);o.each(function(){m(this).data("pumselect2-scroll-position",{x:m(this).scrollLeft(),y:m(this).scrollTop()})}),o.on(i,function(e){var t=m(this).data("pumselect2-scroll-position");m(this).scrollTop(t.y)}),m(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,r="orientationchange.pumselect2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),m(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=m(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(),u=a<r.top-o,c=l>r.bottom+o,d={left:r.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,t||n||(i="below"),c||!u||t?!u&&c&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.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(d)},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}),e.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}),e.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();if(!(e.length<1)){var t=e.data("data");null!=t.element&&t.element.selected||null==t.element&&t.selected||this.trigger("select",{data:t})}},e}),e.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){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{})},e}),e.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,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},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…"}}}),e.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(m,f,g,v,y,_,b,w,A,x,$,t,j,C,P,k,O,M,S,E,U,T,D,q,I,z,L,H,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=P:null!=t.data?t.dataAdapter=C:t.dataAdapter=j,0<t.minimumInputLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,M)),0<t.maximumInputLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,S)),0<t.maximumSelectionLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,E)),t.tags&&(t.dataAdapter=x.Decorate(t.dataAdapter,k)),null==t.tokenSeparators&&null==t.tokenizer||(t.dataAdapter=x.Decorate(t.dataAdapter,O)),null!=t.query){var e=f(t.amdBase+"compat/query");t.dataAdapter=x.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=f(t.amdBase+"compat/initSelection");t.dataAdapter=x.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=g,null!=t.ajax&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,q)),null!=t.placeholder&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,D)),t.selectOnClose&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,L))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=U;else{var i=x.Decorate(U,T);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=x.Decorate(t.dropdownAdapter,z)),t.closeOnSelect&&(t.dropdownAdapter=x.Decorate(t.dropdownAdapter,H)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var r=f(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=x.Decorate(t.dropdownAdapter,r)}t.dropdownAdapter=x.Decorate(t.dropdownAdapter,I)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=y:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,_)),t.allowClear&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,b)),t.multiple&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,w)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var s=f(t.amdBase+"compat/containerCss");t.selectionAdapter=x.Decorate(t.selectionAdapter,s)}t.selectionAdapter=x.Decorate(t.selectionAdapter,A)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var o=t.language.split("-")[0];t.language=[t.language,o]}else t.language=[t.language];if(m.isArray(t.language)){var a=new $;t.language.push("en");for(var l=t.language,u=0;u<l.length;u++){var c=l[u],d={};try{d=$.loadPath(c)}catch(e){try{c=this.defaults.amdLanguageBase+c,d=$.loadPath(c)}catch(e){t.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+c+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(d)}t.translations=a}else{var p=$.loadPath(this.defaults.amdLanguageBase+"en"),h=new $(t.language);h.extend(p),t.translations=h}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:x.escapeMarkup,language:e,matcher:function e(t,n){if(""===m.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=m.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[m.camelCase(e)]=t;var i=x._convertData(n);m.extend(this.defaults,i)},new n}),e.define("pumselect2/options",["require","jquery","./defaults","./utils"],function(i,s,r,o){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=o.Decorate(this.options.dataAdapter,n)}}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={};n=s.fn.jquery&&"1."==s.fn.jquery.substr(0,2)&&e[0].dataset?s.extend(!0,{},e[0].dataset,e.data()):e.data();var i=s.extend(!0,{},n);for(var r in i=o._convertData(i))-1<s.inArray(r,t)||(s.isPlainObject(this.options[r])?s.extend(this.options[r],i[r]):this.options[r]=i[r]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("pumselect2/core",["jquery","./options","./utils","./keys"],function(r,u,n,i){var c=function(e,t){null!=e.data("pumselect2")&&e.data("pumselect2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new u(t,e),c.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var s=this.options.get("selectionAdapter");this.selection=new s(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var o=this.options.get("dropdownAdapter");this.dropdown=new o(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("pumselect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("pumselect2",this)};return n.Extend(c,n.Observable),c.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,"")},c.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},c.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){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"!=t)return t;var s=e.attr("style");if("string"!=typeof s)return null;for(var o=s.split(";"),a=0,l=o.length;a<l;a+=1){var u=o[a].replace(/\s/g,"").match(n);if(null!==u&&1<=u.length)return u[1]}return null},c.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)},c.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)},c.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},c.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)})},c.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},c.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},c.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())})},c.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",{})},c.prototype.trigger=function(e,t){var n=c.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],s={prevented:!1,name:e,args:t};if(n.call(this,r,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},c.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},c.prototype.open=function(){this.isOpen()||this.trigger("query",{})},c.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},c.prototype.isOpen=function(){return this.$container.hasClass("pumselect2-container--open")},c.prototype.hasFocus=function(){return this.$container.hasClass("pumselect2-container--focus")},c.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("pumselect2-container--focus"),this.trigger("focus",{}))},c.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.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},c.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},c.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();var t=e[0];r.isArray(t)&&(t=r.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},c.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},c.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},c}),e.define("pumselect2/compat/utils",["jquery"],function(o){return{syncCssClasses:function(e,t,n){var i,r,s=[];(i=o.trim(e.attr("class")))&&o((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("pumselect2-")&&s.push(this)}),(i=o.trim(t.attr("class")))&&o((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("pumselect2-")&&null!=(r=n(this))&&s.push(r)}),e.attr("class",s.join(" "))}}}),e.define("pumselect2/compat/containerCss",["jquery","./utils"],function(o,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";o.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var s=this.options.get("containerCss")||{};return o.isFunction(s)&&(s=s(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(s),t.addClass(n),t},e}),e.define("pumselect2/compat/dropdownCss",["jquery","./utils"],function(o,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";o.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var s=this.options.get("dropdownCss")||{};return o.isFunction(s)&&(s=s(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(s),t.addClass(n),t},e}),e.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}),e.define("pumselect2/compat/inputData",["jquery"],function(o){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){function i(e,t){var n=[];return e.selected||-1!==o.inArray(e.id,t)?(e.selected=!0,n.push(e)):e.selected=!1,e.children&&n.push.apply(n,i(e.children,t)),n}for(var n=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r];n.push.apply(n,i(s,this.$element.val().split(this._valueSeparator)))}t(n)},e.prototype.select=function(e,t){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+t.id,this.$element.val(n),this.$element.trigger("change")}else this.current(function(e){o.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],o=this.matches(t,s);null!==o&&i.push(o)}n({results:i})},e.prototype.addOptions=function(e,t){var n=o.map(t,function(e){return o.data(e[0],"data")});this._currentData.push.apply(this._currentData,n)},e}),e.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}}}),e.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}),e.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}),e.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}),e.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}),n=function(p){var h,m,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],f=Array.prototype.slice;if(p.event.fixHooks)for(var n=e.length;n;)p.event.fixHooks[e[--n]]=p.event.mouseHooks;var g=p.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;p.data(this,"mousewheel-line-height",g.getLineHeight(this)),p.data(this,"mousewheel-page-height",g.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;p.removeData(this,"mousewheel-line-height"),p.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=p(e),n=t["offsetParent"in p.fn?"offsetParent":"parent"]();return n.length||(n=p("body")),parseInt(n.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return p(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=f.call(arguments,1),r=0,s=0,o=0,a=0,l=0;if((e=p.event.fix(n)).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){if(1===n.deltaMode){var u=p.data(this,"mousewheel-line-height");r*=u,o*=u,s*=u}else if(2===n.deltaMode){var c=p.data(this,"mousewheel-page-height");r*=c,o*=c,s*=c}if(t=Math.max(Math.abs(o),Math.abs(s)),(!m||t<m)&&y(n,m=t)&&(m/=40),y(n,t)&&(r/=40,s/=40,o/=40),r=Math[1<=r?"floor":"ceil"](r/m),s=Math[1<=s?"floor":"ceil"](s/m),o=Math[1<=o?"floor":"ceil"](o/m),g.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();a=e.clientX-d.left,l=e.clientY-d.top}return e.deltaX=s,e.deltaY=o,e.deltaFactor=m,e.offsetX=a,e.offsetY=l,e.deltaMode=0,i.unshift(e,r,s,o),h&&clearTimeout(h),h=setTimeout(v,200),(p.event.dispatch||p.event.handle).apply(this,i)}}function v(){m=null}function y(e,t){return g.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}p.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],n):"object"==typeof exports?module.exports=n:n(i),e.define("jquery.pumselect2",["jquery","jquery-mousewheel","./pumselect2/core","./pumselect2/defaults"],function(r,e,t,n){if(null==r.fn.pumselect2){var 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}}return null==r.fn.pumselect2.defaults&&(r.fn.pumselect2.defaults=n),t}),{define:e.define,require:e.require}}(),t=e.require("jquery.pumselect2");return i.fn.pumselect2.amd=e,t}),function(i){"use strict";var e=i(".pum-alerts"),r=i(".pum-alert-count"),s=parseInt(r.eq(0).text());function o(){0===e.find(".pum-alert-holder").length&&(e.slideUp(100,function(){e.remove()}),i("#menu-posts-popup .wp-menu-name .update-plugins").fadeOut())}i(document).on("pumDismissAlert",o).on("click",".pum-alert-holder .pum-dismiss",function(){var e=i(this),t=e.parents(".pum-alert-holder"),n=e.data("reason")||"maybe_later";"review_request"!==t.data("code")?function(e){var t=e.data("dismissible"),n="1"===t||1===t||!0===t?null:t;i.ajax({method:"POST",dataType:"json",url:ajaxurl,data:{action:"pum_alerts_action",nonce:window.pum_alerts_nonce,code:e.data("code"),expires:n}})}(t):function(e){i.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:e}}),void 0!==window.pum_review_api_url&&i.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:e,uuid:window.pum_review_uuid||null}})}(n),function(e){s--,r.text(s),e.fadeTo(100,0,function(){e.slideUp(100,function(){e.remove(),o()})})}(t)})}(jQuery),function(r){"use strict";var e={init:function(){r(".pum-color-picker").filter(":not(.pum-color-picker-initialized)").addClass("pum-color-picker-initialized").wpColorPicker({change:function(e,t){r(e.target).trigger("colorchange",t)},clear:function(e){r(e.target).prev().trigger("colorchange").wpColorPicker("close")},hide:!0})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.colorpicker=e,r(document).on("click",".iris-palette",function(){r(this).parents(".wp-picker-active").find("input.pum-color-picker").trigger("change")}).on("colorchange",function(e,t){var n=r(e.target),i="";void 0!==t&&void 0!==t.color&&(i=t.color.toString()),n.val(i).trigger("change"),"popup_theme"===r("form#post input#post_type").val()&&PUM_Admin.utils.debounce(PUM_Admin.themeEditor.refresh_preview,100)}).on("pum_init",e.init)}(jQuery),function(h){"use strict";var c={init:function(){c.checkDependencies()},checkDependencies:function(e){var t=h(e);(e=t.length?t:h("[data-pum-dependencies]:not([data-pum-processed-dependencies])")).each(function(){var e,l=h(this),u=l.data("id"),c=l.data("pum-processed-dependencies")||{},d=Object.keys(c).length,p=0,t=l.data("pum-dependent-fields");if(!l.data("pum-processed-dependencies")){for(e in"string"==typeof(c=l.data("pum-dependencies"))&&(c=JSON.parse(c)),c)c.hasOwnProperty(e)&&("string"==typeof c[e]?-1!==c[e].indexOf(",")?c[e]=c[e].split(","):c[e]=[c[e]]:"number"==typeof c[e]&&(c[e]=[c[e]]));d=Object.keys(c).length,l.data("pum-processed-dependencies",c).attr("data-pum-processed-dependencies",c)}t||(t=h.map(c,function(e,t){var n=h('.pum-field[data-id="'+t+'"]');return n.length?n.eq(0):null}),l.data("pum-dependent-fields",t)),h(t).each(function(){var e,t=h(this),n=t.find(":input:first"),i=t.data("id"),r=n.val(),s=c[i],o=t.data("pum-field-dependents")||[];if(-1===o.indexOf(u)&&(o.push(u),t.data("pum-field-dependents",o)),null==s)return l.removeClass("pum-dependencies-met").hide(0).trigger("pumFormDependencyUnmet"),!1;if(t.hasClass("pum-field-radio")&&(r=t.find(":input:checked").val()),t.hasClass("pum-field-multicheck")&&(r=[],t.find(":checkbox:checked").each(function(e){r[e]=h(this).val(),"string"!=typeof r[e]||isNaN(parseInt(r[e]))||(r[e]=parseInt(r[e]))})),t.hasClass("pum-field-select")||t.hasClass("pum-field-radio"))e=s&&-1!==s.indexOf(r);else if(t.hasClass("pum-field-checkbox"))e=s===n.is(":checked");else if(t.hasClass("pum-field-multicheck"))if(Array.isArray(s)){e=!1;for(var a=0;a<s.length;a++)-1!==r.indexOf(s[a])&&(e=!0)}else e=-1!==r.indexOf(s);else e=Array.isArray(s)?-1!==s.indexOf(r):s==r;if(!e)return l.removeClass("pum-dependencies-met").hide(0).trigger("pumFormDependencyUnmet"),!1;++p===d&&l.addClass("pum-dependencies-met").show(0).trigger("pumFormDependencyMet")})})},form_check:function(){h(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||{},r=e.fields||{};return Object.keys(t).length&&Object.keys(n).length?_.each(r,function(e,t){"object"==typeof e&&Object.keys(e).length&&_.each(e,function(e,t){if("object"==typeof e&&Object.keys(e).length){if(c.is_field(e)){var n={};n[t]=e,t="main",e=n}_.each(e,function(e){i[e.id]=e})}})}):Object.keys(t).length?_.each(r,function(e,t){"object"==typeof e&&Object.keys(e).length&&_.each(e,function(e){i[e.id]=e})}):Object.keys(n).length?_.each(r,function(e,t){_.each(e,function(e){i[e.id]=e})}):(r=c.parseFields(r,values),_.each(r,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=h.extend(!0,{id:"",tabs:{},sections:{},fields:{},maintabs:{},subtabs:{}},e),a=h.extend({id:o.id,classes:[],tabs:{},vertical:!0,form:!0,meta:{"data-min-height":250}},o.maintabs),l=h.extend({classes:["link-tabs","sub-tabs"],tabs:{}},o.subtabs),u=["pum-dynamic-form"];return r=r||{},Object.keys(o.tabs).length&&Object.keys(o.sections).length?(u.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=h.extend(l,{id:o.id+"-"+i+"-subtabs",tabs:{}}),_.each(e,function(e,t){if("object"==typeof e&&Object.keys(e).length){if(c.is_field(e)){var n={};n[t]=e,t="main",e=n}void 0===l.tabs[t]&&(l.tabs[t]={label:o.sections[i][t],content:""}),e=c.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?(u.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=c.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=c.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=c.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(u.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=c,h(document).on("pum_init pum_form_check",function(){PUM_Admin.forms.init()}).on("pumFieldChanged",".pum-field",function(){var e,t=h(this).data("pum-field-dependents")||[],n=h();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=h(this),t=e.find(":input"),n=e.parents(".pum-dynamic-form:first"),i=t.val(),r=(n.data("form_fields")||{})[e.data("id")]||{},s=e.find(".pum-desc"),o=e.data("pum-dynamic-desc");switch(r.type){case"radio":i=e.find(":input:checked").val()}r.value=i,o&&o.length&&s.html(PUM_Admin.templates.renderInline(o,r))}).on("change",".pum-field-select select",function(){h(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-checkbox input",function(){h(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-multicheck input",function(){h(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-radio input",function(e){var t=h(this),n=t.parents("li"),i=t.parents(".pum-field");i.trigger("pumFieldChanged"),i.find("li.pum-selected").removeClass("pum-selected"),n.addClass("pum-selected")})}(jQuery),function(s){"use strict";var i,r,o=s("html"),t=s(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){if(9===e.keyCode){var t=PUM_Admin.modals._current.find("*").filter(a).filter(":visible"),n=s(":focus"),i=t.length,r=t.index(n);e.shiftKey?0===r&&(t.get(i-1).focus(),e.preventDefault()):r===i-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){s(".pum-modal-background").off("keydown.pum_modal").hide(0,function(){s("html").css({overflow:"visible",width:"auto"}),i&&(i.attr("aria-hidden","false"),i=null),r.length&&r.focus(),PUM_Admin.modals._current=null,t.off("focus.pum_modal"),void 0!==e&&e()}).attr("aria-hidden","true")},show:function(e,t){s(".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=s(":focus");n.parents(".pum-modal-wrap").length||(r=n),PUM_Admin.modals._current=s(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=s("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){s(e).remove()},replace:function(e,t){PUM_Admin.modals.remove(s.trim(e)),s("body").append(s.trim(t))},reload:function(e,t,n){PUM_Admin.modals.replace(e,t),PUM_Admin.modals.show(e,n),s(e).trigger("pum_init")}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.modals=e,s(document).on("click",".pum-modal-background, .pum-modal-wrap .cancel, .pum-modal-wrap .pum-modal-close",function(e){var t=s(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)?n.val(t).trigger("change"):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){if("function"!=typeof window.$$){var r,s,o={},a={};window.$$=function(e,t){return t?((r=t.selector)&&(t=r),(s=a[t])===i&&(s=a[t]={}),(r=s[e])!==i?r:s[e]=n(e,$$(t))):(r=o[e])!==i?r:o[e]=n(e)},window.$$clear=function(e,t){t?((r=t.selector)&&(t=r),e&&(r=a[t])&&(r[e]=i),a[t]=i):e?(o[e]=i,a[e]=i):(o={},a={})},window.$$fresh=function(e,t){return $$clear(e,t),$$(e,t)}}}(jQuery),function(e,n){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(e,t){return n(e,t)});else if("undefined"!=typeof exports){var t=require("jquery");n(exports,t)}else n(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,a){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,n){var r={},s={};function o(e,t,n){return e[t]=n,e}function e(){return r}this.addPair=function(e){if(!l.validate.test(e.name))return this;var t=function(e,t){var n,i,r=e.match(l.key);try{t=JSON.parse(t)}catch(e){}for(;void 0!==(n=r.pop());)l.push.test(n)?t=o([],(i=e.replace(/\[\]$/,""),void 0===s[i]&&(s[i]=0),s[i]++),t):l.fixed.test(n)?t=o([],n,t):l.named.test(n)&&(t=o({},n,t));return t}(e.name,function(e){switch(a('[name="'+e.name+'"]',n).attr("type")){case"checkbox":return"1"===e.value||e.value;default:return e.value}}(e));return r=i.extend(!0,r,t),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(e())}}return t.patterns=l,t.serializeObject=function(){var e;return e=this.is("form")?this.serializeArray():this.find(":input").serializeArray(),new t(a,this).addPairs(e).serialize()},t.serializeJSON=function(){var e;return e=this.is("form")?this.serializeArray():this.find(":input").serializeArray(),new t(a,this).addPairs(e).serializeJSON()},void 0!==a.fn&&(a.fn.pumSerializeObject=t.serializeObject,a.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");if(e.hasClass("vertical-tabs")){var r=i&&0<i?i:t.eq(0).outerHeight(!0);e.css({minHeight:r+"px"}),e.parent().innerHeight<r&&e.parent().css({minHeight:r+"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(i){"use strict";var n=pum_admin_vars.I10n,e={render:function(e,t){var n=wp.template(e);return void 0!==(t=t||{}).classes&&Array.isArray(t.classes)&&(t.classes=t.classes.join(" ")),n(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=i.extend(!0,{},{tag:"",meta:{},has_content:!1,content:""},e),n=t.has_content?"pum-shortcode-w-content":"pum-shortcode";return PUM_Admin.templates.render(n,t)},modal:function(e){var t=i.extend(!0,{},{id:"",title:"",description:"",classes:"",save_button:n.save,cancel_button:n.cancel,content:""},e);return PUM_Admin.templates.render("pum-modal",t)},tabs:function(e){return"string"==typeof(e=i.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){var t=i.extend(!0,{},{classes:[],fields:[]},e);return PUM_Admin.templates.render("pum-field-section",t)},fieldArgs:function(e){var s=[],o=i.extend(!0,{},PUM_Admin.models.field(e));switch(void 0===e.std||"checkbox"===e.type||null!==o.value&&!1!==o.value||(o.value=e.std),"string"==typeof o.classes&&(o.classes=o.classes.split(" ")),void 0!==e.class&&o.classes.push(e.class),void 0!==e.dependencies&&"object"==typeof e.dependencies&&(o.dependencies=JSON.stringify(e.dependencies)),o.required&&(o.meta.required=!0,o.classes.push("pum-required")),"string"==typeof o.dynamic_desc&&o.dynamic_desc.length&&(o.classes.push("pum-field-dynamic-desc"),o.desc=PUM_Admin.templates.renderInline(o.dynamic_desc,o)),o.allow_html&&(o.classes.push("pum-field-"+o.type+"--html"),"string"==typeof o.value&&""!==o.value&&PUM_Admin.utils.htmlencoder.hasEncoded(o.value)&&(o.value=PUM_Admin.utils.htmlencoder.htmlDecode(o.value))),e.type){case"select":case"objectselect":case"postselect":case"taxonomyselect":void 0!==o.options&&(_.each(o.options,function(e,t){var n,i,r=!1;"object"!=typeof e?(null!==o.value&&(o.multiple&&("string"==typeof o.value&&o.value==t||Array.isArray(o.value)&&-1!==o.value.indexOf(t)||!Array.isArray(o.value)&&"object"==typeof o.value&&Object.keys(o.value).length&&void 0!==o.value[t])?r="selected":o.multiple||o.value!=t||(r="selected")),s.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:r}}))):(n=t,i=[],_.each(e,function(e,t){var n=!1;null!==o.value&&(o.multiple&&("string"==typeof o.value&&o.value==t||Array.isArray(o.value)&&-1!==o.value.indexOf(t)||!Array.isArray(o.value)&&"object"==typeof o.value&&Object.keys(o.value).length&&void 0!==o.value[t])?n="selected":o.multiple||o.value!=t||(n="selected")),i.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))}),s.push({label:n,options:i}))}),o.options=s),o.multiple&&(o.meta.multiple=!0,o.as_array&&(o.name+="[]"),o.value&&o.value.length||(o.value=[]),"string"==typeof o.value&&(o.value=[o.value])),"select"!==e.type&&(o.select2=!0,o.classes.push("pum-field-objectselect"),o.classes.push("postselect"===e.type?"pum-field-postselect":"pum-field-taxonomyselect"),o.meta["data-objecttype"]="postselect"===e.type?"post_type":"taxonomy",o.meta["data-objectkey"]="postselect"===e.type?e.post_type:e.taxonomy,o.meta["data-current"]="object"==typeof o.value||Array.isArray(o.value)?JSON.stringify(o.value):o.value),o.select2&&(o.classes.push("pum-field-select2"),o.placeholder&&(o.meta["data-placeholder"]=o.placeholder));break;case"radio":void 0!==o.options&&(_.each(o.options,function(e,t){s.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{checked:o.value===t}}))}),o.options=s);break;case"multicheck":void 0!==o.options&&(!1!==o.value&&null!==o.value||(o.value=[]),"string"==typeof o.value&&o.value.indexOf(",")&&(o.value=o.value.split(",")),o.as_array&&(o.name+="[]"),_.each(o.options,function(e,t){s.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{checked:Array.isArray(o.value)&&-1!==o.value.indexOf(t)||!Array.isArray(o.value)&&"object"==typeof o.value&&Object.keys(o.value).length&&void 0!==o.value[t]}}))}),o.options=s);break;case"checkbox":switch(typeof o.value){case"object":Array.isArray(o.value)&&1===o.value.length&&"1"===o.value[0].toString()&&(o.value=!0,o.meta.checked=!0);break;case"boolean":o.value&&(o.meta.checked=!0);break;case"string":"true"!==o.value&&"yes"!==o.value&&"1"!==o.value||(o.meta.checked=!0);break;case"number":(1===parseInt(o.value,10)||0<parseInt(o.value,10))&&(o.meta.checked=!0)}break;case"rangeslider":o.meta.step=o.step,o.meta.min=o.min,o.meta.max=o.max,o.meta["data-force-minmax"]=o.force_minmax.toString();break;case"textarea":o.meta.cols=o.cols,o.meta.rows=o.rows;break;case"measure":"string"==typeof o.value&&""!==o.value?(o.number=parseInt(o.value),o.unitValue=o.value.replace(o.number,""),o.value=o.number):o.unitValue=null,void 0!==o.units&&(_.each(o.units,function(e,t){var n=!1;o.unitValue==t&&(n="selected"),s.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))}),o.units=s);break;case"color":"string"==typeof o.value&&""!==o.value&&(o.meta["data-default-color"]=o.value);break;case"license_key":o.value=i.extend({key:"",license:{},messages:[],status:"empty",expires:!1,classes:!1},o.value),o.classes.push("pum-license-"+o.value.status+"-notice"),o.value.classes&&o.classes.push(o.value.classes)}return o},field:function(e){var t,n=PUM_Admin.templates.fieldArgs(e);return t="pum-field-"+n.type,"objectselfect"!==n.type&&"postselect"!==n.type&&"taxonomyselect"!==n.type||(t="pum-field-select"),i("#tmpl-"+t).length?(n.field=PUM_Admin.templates.render(t,n),PUM_Admin.templates.render("pum-field-wrapper",n)):(console.warn("No field template found for type:"+n.type+" fieldID: "+n.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:["&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&quot;","&amp;","&lt;","&gt;","&OElig;","&oelig;","&Scaron;","&scaron;","&Yuml;","&circ;","&tilde;","&ensp;","&emsp;","&thinsp;","&zwnj;","&zwj;","&lrm;","&rlm;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&Dagger;","&permil;","&lsaquo;","&rsaquo;","&euro;","&fnof;","&Alpha;","&Beta;","&Gamma;","&Delta;","&Epsilon;","&Zeta;","&Eta;","&Theta;","&Iota;","&Kappa;","&Lambda;","&Mu;","&Nu;","&Xi;","&Omicron;","&Pi;","&Rho;","&Sigma;","&Tau;","&Upsilon;","&Phi;","&Chi;","&Psi;","&Omega;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigmaf;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&thetasym;","&upsih;","&piv;","&bull;","&hellip;","&prime;","&Prime;","&oline;","&frasl;","&weierp;","&image;","&real;","&trade;","&alefsym;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&crarr;","&lArr;","&uArr;","&rArr;","&dArr;","&hArr;","&forall;","&part;","&exist;","&empty;","&nabla;","&isin;","&notin;","&ni;","&prod;","&sum;","&minus;","&lowast;","&radic;","&prop;","&infin;","&ang;","&and;","&or;","&cap;","&cup;","&int;","&there4;","&sim;","&cong;","&asymp;","&ne;","&equiv;","&le;","&ge;","&sub;","&sup;","&nsub;","&sube;","&supe;","&oplus;","&otimes;","&perp;","&sdot;","&lceil;","&rceil;","&lfloor;","&rfloor;","&lang;","&rang;","&loz;","&spades;","&clubs;","&hearts;","&diams;"],arr2:["&#160;","&#161;","&#162;","&#163;","&#164;","&#165;","&#166;","&#167;","&#168;","&#169;","&#170;","&#171;","&#172;","&#173;","&#174;","&#175;","&#176;","&#177;","&#178;","&#179;","&#180;","&#181;","&#182;","&#183;","&#184;","&#185;","&#186;","&#187;","&#188;","&#189;","&#190;","&#191;","&#192;","&#193;","&#194;","&#195;","&#196;","&#197;","&#198;","&#199;","&#200;","&#201;","&#202;","&#203;","&#204;","&#205;","&#206;","&#207;","&#208;","&#209;","&#210;","&#211;","&#212;","&#213;","&#214;","&#215;","&#216;","&#217;","&#218;","&#219;","&#220;","&#221;","&#222;","&#223;","&#224;","&#225;","&#226;","&#227;","&#228;","&#229;","&#230;","&#231;","&#232;","&#233;","&#234;","&#235;","&#236;","&#237;","&#238;","&#239;","&#240;","&#241;","&#242;","&#243;","&#244;","&#245;","&#246;","&#247;","&#248;","&#249;","&#250;","&#251;","&#252;","&#253;","&#254;","&#255;","&#34;","&#38;","&#60;","&#62;","&#338;","&#339;","&#352;","&#353;","&#376;","&#710;","&#732;","&#8194;","&#8195;","&#8201;","&#8204;","&#8205;","&#8206;","&#8207;","&#8211;","&#8212;","&#8216;","&#8217;","&#8218;","&#8220;","&#8221;","&#8222;","&#8224;","&#8225;","&#8240;","&#8249;","&#8250;","&#8364;","&#402;","&#913;","&#914;","&#915;","&#916;","&#917;","&#918;","&#919;","&#920;","&#921;","&#922;","&#923;","&#924;","&#925;","&#926;","&#927;","&#928;","&#929;","&#931;","&#932;","&#933;","&#934;","&#935;","&#936;","&#937;","&#945;","&#946;","&#947;","&#948;","&#949;","&#950;","&#951;","&#952;","&#953;","&#954;","&#955;","&#956;","&#957;","&#958;","&#959;","&#960;","&#961;","&#962;","&#963;","&#964;","&#965;","&#966;","&#967;","&#968;","&#969;","&#977;","&#978;","&#982;","&#8226;","&#8230;","&#8242;","&#8243;","&#8254;","&#8260;","&#8472;","&#8465;","&#8476;","&#8482;","&#8501;","&#8592;","&#8593;","&#8594;","&#8595;","&#8596;","&#8629;","&#8656;","&#8657;","&#8658;","&#8659;","&#8660;","&#8704;","&#8706;","&#8707;","&#8709;","&#8711;","&#8712;","&#8713;","&#8715;","&#8719;","&#8721;","&#8722;","&#8727;","&#8730;","&#8733;","&#8734;","&#8736;","&#8743;","&#8744;","&#8745;","&#8746;","&#8747;","&#8756;","&#8764;","&#8773;","&#8776;","&#8800;","&#8801;","&#8804;","&#8805;","&#8834;","&#8835;","&#8836;","&#8838;","&#8839;","&#8853;","&#8855;","&#8869;","&#8901;","&#8968;","&#8969;","&#8970;","&#8971;","&#9001;","&#9002;","&#9674;","&#9824;","&#9827;","&#9829;","&#9830;"],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,"&#38;"):e.replace(/&/g,"&amp;")),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,"&#38;"):e.replace(/&/g,"&amp;")).replace(/##AMPHASH##/g,"&#")),e=e.replace(/&#\d*([^\d;]|$)/g,"$1"),t||(e=this.correctEncoding(e)),"entity"==this.EncodeType&&(e=this.NumericalToHTML(e)),e)},XSSEncode:function(e,t){return this.isEmpty(e)?"":e=(t=t||!0)?(e=(e=(e=e.replace(/\'/g,"&#39;")).replace(/\"/g,"&quot;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"):(e=(e=(e=e.replace(/\'/g,"&#39;")).replace(/\"/g,"&#34;")).replace(/</g,"&#60;")).replace(/>/g,"&#62;")},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;)(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";var t={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)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0:e===t?i=!0: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)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0: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){var n=!1,i=function(){n=!1};return function(){n||(e(),window.setTimeout(i,t),n=!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)):(r||(r=t.length),t[r]=i)}(t,e,i(this).val()))}),t}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.utils=t,window.PUMUtils=t,i.fn.pumSerializeForm=t.serializeForm}(jQuery);
1
+ function pumSelected(e,t,n){"use strict";var i=!1;return"object"==typeof e&&"string"==typeof t&&-1!==jQuery.inArray(t,e)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0: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)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0:e===t&&(i=!0),void 0!==n&&n?i?' checked="checked"':"":i}!function(e){"function"==typeof define&&void 0!==define.amd&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(i){var e=function(){if(i&&i.fn&&i.fn.pumselect2&&i.fn.pumselect2.amd)var e=i.fn.pumselect2.amd;var t,r,u,n;return e&&e.requirejs||(e?r=e:e={},function(p){var s,o,h,m,f={},g={},v={},y={},n=Object.prototype.hasOwnProperty,i=[].slice,_=/\.js$/;function b(e,t){return n.call(e,t)}function a(e,t){var n,i,r,s,o,a,l,u,c,d,p,h=t&&t.split("/"),m=v.map,f=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(o=(e=e.split("/")).length-1,v.nodeIdCompat&&_.test(e[o])&&(e[o]=e[o].replace(_,"")),e=h.slice(0,h.length-1).concat(e),c=0;c<e.length;c+=1)if("."===(p=e[c]))e.splice(c,1),c-=1;else if(".."===p){if(1===c&&(".."===e[2]||".."===e[0]))break;0<c&&(e.splice(c-1,2),c-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||f)&&m){for(c=(n=e.split("/")).length;0<c;c-=1){if(i=n.slice(0,c).join("/"),h)for(d=h.length;0<d;d-=1)if((r=m[h.slice(0,d).join("/")])&&(r=r[i])){s=r,a=c;break}if(s)break;!l&&f&&f[i]&&(l=f[i],u=c)}!s&&l&&(s=l,a=u),s&&(n.splice(0,a,s),e=n.join("/"))}return e}function w(t,n){return function(){var e=i.call(arguments,0);return"string"!=typeof e[0]&&1===e.length&&e.push(null),o.apply(p,e.concat([t,n]))}}function A(t){return function(e){f[t]=e}}function x(e){if(b(g,e)){var t=g[e];delete g[e],y[e]=!0,s.apply(p,t)}if(!b(f,e)&&!b(y,e))throw new Error("No "+e);return f[e]}function l(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]}h=function(e,t){var n,i=l(e),r=i[0];return e=i[1],r&&(n=x(r=a(r,t))),r?e=n&&n.normalize?n.normalize(e,function(t){return function(e){return a(e,t)}}(t)):a(e,t):(r=(i=l(e=a(e,t)))[0],e=i[1],r&&(n=x(r))),{f:r?r+"!"+e:e,n:e,pr:r,p:n}},m={require:function(e){return w(e)},exports:function(e){var t=f[e];return void 0!==t?t:f[e]={}},module:function(e){return{id:e,uri:"",exports:f[e],config:function(e){return function(){return v&&v.config&&v.config[e]||{}}}(e)}}},s=function(e,t,n,i){var r,s,o,a,l,u,c=[],d=typeof n;if(i=i||e,"undefined"==d||"function"==d){for(t=!t.length&&n.length?["require","exports","module"]:t,l=0;l<t.length;l+=1)if("require"===(s=(a=h(t[l],i)).f))c[l]=m.require(e);else if("exports"===s)c[l]=m.exports(e),u=!0;else if("module"===s)r=c[l]=m.module(e);else if(b(f,s)||b(g,s)||b(y,s))c[l]=x(s);else{if(!a.p)throw new Error(e+" missing "+s);a.p.load(a.n,w(i,!0),A(s),{}),c[l]=f[s]}o=n?n.apply(f[e],c):void 0,e&&(r&&r.exports!==p&&r.exports!==f[e]?f[e]=r.exports:o===p&&u||(f[e]=o))}else e&&(f[e]=n)},t=r=o=function(e,t,n,i,r){if("string"==typeof e)return m[e]?m[e](t):x(h(e,t).f);if(!e.splice){if((v=e).deps&&o(v.deps,v.callback),!t)return;t.splice?(e=t,t=n,n=null):e=p}return t=t||function(){},"function"==typeof n&&(n=i,i=r),i?s(p,e,t,n):setTimeout(function(){s(p,e,t,n)},4),o},o.config=function(e){return o(e)},t._defined=f,(u=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=[]),b(f,e)||b(g,e)||(g[e]=[e,t,n])}).amd={jQuery:!0}}(),e.requirejs=t,e.require=r,e.define=u),e.define("almond",function(){}),e.define("jquery",[],function(){var e=i||$;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}),e.define("pumselect2/utils",["jquery"],function(s){var e={};function c(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}e.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},e.Decorate=function(i,r){var e=c(r),t=c(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=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=0;l<e.length;l++){var u=e[l];s.prototype[u]=a(u)}return s};var t=function(){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={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},e.appendMany=function(e,t){if("1.7"===s.fn.jquery.substr(0,3)){var n=s();s.map(t,function(e){n=n.add(e)}),t=n}e.append(t)},e}),e.define("pumselect2/results",["jquery","./utils"],function(p,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=p('<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=p('<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],r=this.option(i);t.push(r)}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 r=this;this.data.current(function(e){var i=p.map(e,function(e){return e.id.toString()}),t=r.$results.find(".pumselect2-results__option[aria-selected]");t.each(function(){var e=p(this),t=p.data(this,"data"),n=""+t.id;null!=t.element&&t.element.selected||null==t.element&&-1<p.inArray(n,i)?e.attr("aria-selected","true"):e.attr("aria-selected","false")});var n=t.filter("[aria-selected=true]");0<n.length?n.first().trigger("mouseenter"):t.first().trigger("mouseenter")})},i.prototype.showLoading=function(e){this.hideLoading();var t={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},n=this.option(t);n.className+=" loading-results",this.$results.prepend(n)},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={role:"treeitem","aria-selected":"false"};for(var i in e.disabled&&(delete n["aria-selected"],n["aria-disabled"]="true"),null==e.id&&delete n["aria-selected"],null!=e._resultId&&(t.id=e._resultId),e.title&&(t.title=e.title),e.children&&(n.role="group",n["aria-label"]=e.text,delete n["aria-selected"]),n){var r=n[i];t.setAttribute(i,r)}if(e.children){var s=p(t),o=document.createElement("strong");o.className="pumselect2-results__group";p(o);this.template(e,o);for(var a=[],l=0;l<e.children.length;l++){var u=e.children[l],c=this.option(u);a.push(c)}var d=p("<ul></ul>",{class:"pumselect2-results__options pumselect2-results__options--nested"});d.append(a),s.append(o),s.append(d)}else this.template(e,t);return p.data(t,"data",e),t},i.prototype.bind=function(t,e){var l=this,n=t.id+"-results";this.$results.attr("id",n),t.on("results:all",function(e){l.clear(),l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("results:append",function(e){l.append(e.data),t.isOpen()&&l.setClasses()}),t.on("query",function(e){l.hideMessages(),l.showLoading(e)}),t.on("select",function(){t.isOpen()&&l.setClasses()}),t.on("unselect",function(){t.isOpen()&&l.setClasses()}),t.on("open",function(){l.$results.attr("aria-expanded","true"),l.$results.attr("aria-hidden","false"),l.setClasses(),l.ensureHighlightVisible()}),t.on("close",function(){l.$results.attr("aria-expanded","false"),l.$results.attr("aria-hidden","true"),l.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=l.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=l.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?l.trigger("close",{}):l.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var i=n-1;0===e.length&&(i=0);var r=t.eq(i);r.trigger("mouseenter");var s=l.$results.offset().top,o=r.offset().top,a=l.$results.scrollTop()+(o-s);0===i?l.$results.scrollTop(0):o-s<0&&l.$results.scrollTop(a)}}),t.on("results:next",function(){var e=l.getHighlightedResults(),t=l.$results.find("[aria-selected]"),n=t.index(e)+1;if(!(n>=t.length)){var i=t.eq(n);i.trigger("mouseenter");var r=l.$results.offset().top+l.$results.outerHeight(!1),s=i.offset().top+i.outerHeight(!1),o=l.$results.scrollTop()+s-r;0===n?l.$results.scrollTop(0):r<s&&l.$results.scrollTop(o)}}),t.on("results:focus",function(e){e.element.addClass("pumselect2-results__option--highlighted")}),t.on("results:message",function(e){l.displayMessage(e)}),p.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=l.$results.scrollTop(),n=l.$results.get(0).scrollHeight-t+e.deltaY,i=0<e.deltaY&&t-e.deltaY<=0,r=e.deltaY<0&&n<=l.$results.height();i?(l.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(l.$results.scrollTop(l.$results.get(0).scrollHeight-l.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".pumselect2-results__option[aria-selected]",function(e){var t=p(this),n=t.data("data");"true"!==t.attr("aria-selected")?l.trigger("select",{originalEvent:e,data:n}):l.options.get("multiple")?l.trigger("unselect",{originalEvent:e,data:n}):l.trigger("close",{})}),this.$results.on("mouseenter",".pumselect2-results__option[aria-selected]",function(e){var t=p(this).data("data");l.getHighlightedResults().removeClass("pumselect2-results__option--highlighted"),l.trigger("results:focus",{data:t,element:p(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=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]").index(e),n=this.$results.offset().top,i=e.offset().top,r=this.$results.scrollTop()+(i-n),s=i-n;r-=2*e.outerHeight(!1),t<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},i.prototype.template=function(e,t){var n=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),r=n(e,t);null==r?t.style.display="none":"string"==typeof r?t.innerHTML=i(r):p(t).append(r)},i}),e.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}}),e.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}),e.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){if(0!==e.length){var t=e[0],n=this.$selection.find(".pumselect2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)}else this.clear()},r}),e.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){if(!n.options.get("disabled")){var 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">&times;</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}),e.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"string"==typeof t&&(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();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".pumselect2-selection__rendered").append(i)},t}),e.define("pumselect2/selection/allowClear",["jquery","../keys"],function(i,r){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!=r.DELETE&&t.which!=r.BACKSPACE||this._handleClear(t)},e.prototype.update=function(e,t){if(e.call(this,t),!(0<this.$selection.find(".pumselect2-selection__placeholder").length||0===t.length)){var n=i('<span class="pumselect2-selection__clear">&times;</span>');n.data("data",t),this.$selection.find(".pumselect2-selection__rendered").prepend(n)}},e}),e.define("pumselect2/selection/search",["jquery","../utils","../keys"],function(i,e,o){function t(e,t,n){e.call(this,t,n)}return t.prototype.render=function(e){var t=i('<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");var n=e.call(this);return this._transferTabIndex(),n},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){if(e.stopPropagation(),i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented(),e.which===o.BACKSPACE&&""===i.$search.val()){var t=i.$searchContainer.prev(".pumselect2-selection__choice");if(0<t.length){var n=t.data("data");i.searchRemoveChoice(n),e.preventDefault()}}});var r=document.documentMode,s=r&&r<=11;this.$selection.on("input.searchcheck",".pumselect2-search--inline",function(e){s?i.$selection.off("input.search input.searchcheck"):i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".pumselect2-search--inline",function(e){if(s&&"input"===e.type)i.$selection.off("input.search input.searchcheck");else{var t=e.which;t!=o.SHIFT&&t!=o.CTRL&&t!=o.ALT&&t!=o.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(){if(this.resizeSearch(),!this._keyUpPrevented){var 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="";""!==this.$search.attr("placeholder")?e=this.$selection.find(".pumselect2-selection__rendered").innerWidth():e=.75*(this.$search.val().length+1)+"em";this.$search.css("width",e)},t}),e.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){if(-1!==o.inArray(e,r)){t=t||{};var n=o.Event("pumselect2:"+e,{params:t});i.$element.trigger(n),-1!==o.inArray(e,s)&&(t.prevented=n.isDefaultPrevented())}})},e}),e.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){if(!(e in i._cache)){var t=n(e);i._cache[e]=t}return new i(i._cache[e])},i}),e.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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),e.define("pumselect2/data/base",["../utils"],function(i){function n(e,t){n.__super__.constructor.call(this)}return i.Extend(n,i.Observable),n.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},n.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},n.prototype.bind=function(e,t){},n.prototype.destroy=function(){},n.prototype.generateResultId=function(e,t){var n=e.id+"-result-";return n+=i.generateChars(4),null!=t.id?n+="-"+t.id.toString():n+="-"+i.generateChars(4),n},n}),e.define("pumselect2/data/select",["./base","../utils","jquery"],function(e,t,a){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 n=[],i=this;this.$element.find(":selected").each(function(){var e=a(this),t=i.item(e);n.push(t)}),e(n)},n.prototype.select=function(r){var s=this;if(r.selected=!0,a(r.element).is("option"))return r.element.selected=!0,void this.$element.trigger("change");if(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===a.inArray(i,t)&&t.push(i)}s.$element.val(t),s.$element.trigger("change")});else{var 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,a(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===a.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(){a.removeData(this,"data")})},n.prototype.query=function(i,e){var r=[],s=this;this.$element.children().each(function(){var e=a(this);if(e.is("option")||e.is("optgroup")){var t=s.item(e),n=s.matches(i,t);null!==n&&r.push(n)}}),e({results:r})},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=a(t),i=this._normalizeItem(e);return i.element=t,a.data(t,"data",i),n},n.prototype.item=function(e){var t={};if(null!=(t=a.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")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var n=e.children("option"),i=[],r=0;r<n.length;r++){var s=a(n[r]),o=this.item(s);i.push(o)}t.children=i}return(t=this._normalizeItem(t)).element=e[0],a.data(e[0],"data",t),t},n.prototype._normalizeItem=function(e){a.isPlainObject(e)||(e={id:e,text:e});return null!=(e=a.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)),a.extend({},{selected:!1,disabled:!1},e)},n.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},n}),e.define("pumselect2/data/array",["./select","../utils","jquery"],function(e,m,f){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return m.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(f(this)).id}).get(),r=[];function s(e){return function(){return f(this).val()==e.id}}for(var o=0;o<e.length;o++){var a=this._normalizeItem(e[o]);if(0<=f.inArray(a.id,i)){var l=n.filter(s(a)),u=this.item(l),c=f.extend(!0,{},a,u),d=this.option(c);l.replaceWith(d)}else{var p=this.option(a);if(a.children){var h=this.convertToOptions(a.children);m.appendMany(p,h)}r.push(p)}}return r},i}),e.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){var i=s.ajax(e);return i.then(t),i.fail(n),i}};return s.extend({},t,e,!0)},n.prototype.processResults=function(e){return e},n.prototype.query=function(n,i){var r=this;null!=this._request&&(s.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var t=s.extend({type:"GET"},this.ajaxOptions);function e(){var e=t.transport(t,function(e){var t=r.processResults(e,n);r.options.get("debug")&&window.console&&console.error&&(t&&t.results&&s.isArray(t.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),i(t)},function(){r.trigger("results:message",{message:"errorLoading"})});r._request=e}"function"==typeof t.url&&(t.url=t.url.call(this.$element,n)),"function"==typeof t.data&&(t.data=t.data.call(this.$element,n)),this.ajaxOptions.delay&&""!==n.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(e,this.ajaxOptions.delay)):e()},n}),e.define("pumselect2/data/tags",["jquery"],function(c){function e(e,t,n){var i=n.get("tags"),r=n.get("createTag");void 0!==r&&(this.createTag=r);var s=n.get("insertTag");if(void 0!==s&&(this.insertTag=s),e.call(this,t,n),c.isArray(i))for(var o=0;o<i.length;o++){var a=i[o],l=this._normalizeItem(a),u=this.option(l);this.$element.append(u)}}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=d.createTag(u);if(null!=a){var l=d.option(a);l.attr("data-pumselect2-tag",!0),d.addOptions([l]),d.insertTag(i,a)}t.results=i,c(t)}):e.call(this,u,c)},e.prototype.createTag=function(e,t){var n=c.trim(t.term);return""===n?null:{id:n,text:n}},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||c(this).remove()})},e}),e.define("pumselect2/data/tokenizer",["jquery"],function(d){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];if(-1!==d.inArray(l,r)){var u=s.substr(0,o),c=a(d.extend({},t,{term:u}));null!=c?(i(c),s=s.substr(o+1)||"",o=0):o++}else o++}return{term:s}},e}),e.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}),e.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}),e.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(n,i,r){var s=this;this.current(function(e){var t=null!=e?e.length:0;0<s.maximumSelectionLength&&t>=s.maximumSelectionLength?s.trigger("results:message",{message:"maximumSelected",args:{maximum:s.maximumSelectionLength}}):n.call(s,i,r)})},e}),e.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}),e.define("pumselect2/dropdown/search",["jquery","../utils"],function(r,e){function t(){}return t.prototype.render=function(e){var t=e.call(this),n=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=n,this.$search=n.find("input"),t.prepend(n),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){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t}),e.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"string"==typeof t&&(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}),e.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]);if(!i.loading&&e){var t=i.$results.offset().top+i.$results.outerHeight(!1);i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1)<=t+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}),e.define("pumselect2/dropdown/attachBody",["jquery","../utils"],function(m,a){function e(e,t,n){this.$dropdownParent=n.get("dropdownParent")||m(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=m("<span></span>"),n=e.call(this);return t.append(n),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,o=this.$container.parents().filter(a.hasScroll);o.each(function(){m(this).data("pumselect2-scroll-position",{x:m(this).scrollLeft(),y:m(this).scrollTop()})}),o.on(i,function(e){var t=m(this).data("pumselect2-scroll-position");m(this).scrollTop(t.y)}),m(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,r="orientationchange.pumselect2."+t.id;this.$container.parents().filter(a.hasScroll).off(n),m(window).off(n+" "+i+" "+r)},e.prototype._positionDropdown=function(){var e=m(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(),u=a<r.top-o,c=l>r.bottom+o,d={left:r.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,t||n||(i="below"),c||!u||t?!u&&c&&t&&(i="below"):i="above",("above"==i||t&&"below"!==i)&&(d.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(d)},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}),e.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}),e.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();if(!(e.length<1)){var t=e.data("data");null!=t.element&&t.element.selected||null==t.element&&t.selected||this.trigger("select",{data:t})}},e}),e.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){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{})},e}),e.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,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},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…"}}}),e.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(m,f,g,v,y,_,b,w,A,x,$,t,j,C,P,O,k,M,S,E,U,T,D,q,I,z,L,H,e){function n(){this.reset()}return n.prototype.apply=function(t){if(null==(t=m.extend(!0,{},this.defaults,t)).dataAdapter){if(null!=t.ajax?t.dataAdapter=P:null!=t.data?t.dataAdapter=C:t.dataAdapter=j,0<t.minimumInputLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,M)),0<t.maximumInputLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,S)),0<t.maximumSelectionLength&&(t.dataAdapter=x.Decorate(t.dataAdapter,E)),t.tags&&(t.dataAdapter=x.Decorate(t.dataAdapter,O)),null==t.tokenSeparators&&null==t.tokenizer||(t.dataAdapter=x.Decorate(t.dataAdapter,k)),null!=t.query){var e=f(t.amdBase+"compat/query");t.dataAdapter=x.Decorate(t.dataAdapter,e)}if(null!=t.initSelection){var n=f(t.amdBase+"compat/initSelection");t.dataAdapter=x.Decorate(t.dataAdapter,n)}}if(null==t.resultsAdapter&&(t.resultsAdapter=g,null!=t.ajax&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,q)),null!=t.placeholder&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,D)),t.selectOnClose&&(t.resultsAdapter=x.Decorate(t.resultsAdapter,L))),null==t.dropdownAdapter){if(t.multiple)t.dropdownAdapter=U;else{var i=x.Decorate(U,T);t.dropdownAdapter=i}if(0!==t.minimumResultsForSearch&&(t.dropdownAdapter=x.Decorate(t.dropdownAdapter,z)),t.closeOnSelect&&(t.dropdownAdapter=x.Decorate(t.dropdownAdapter,H)),null!=t.dropdownCssClass||null!=t.dropdownCss||null!=t.adaptDropdownCssClass){var r=f(t.amdBase+"compat/dropdownCss");t.dropdownAdapter=x.Decorate(t.dropdownAdapter,r)}t.dropdownAdapter=x.Decorate(t.dropdownAdapter,I)}if(null==t.selectionAdapter){if(t.multiple?t.selectionAdapter=y:t.selectionAdapter=v,null!=t.placeholder&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,_)),t.allowClear&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,b)),t.multiple&&(t.selectionAdapter=x.Decorate(t.selectionAdapter,w)),null!=t.containerCssClass||null!=t.containerCss||null!=t.adaptContainerCssClass){var s=f(t.amdBase+"compat/containerCss");t.selectionAdapter=x.Decorate(t.selectionAdapter,s)}t.selectionAdapter=x.Decorate(t.selectionAdapter,A)}if("string"==typeof t.language)if(0<t.language.indexOf("-")){var o=t.language.split("-")[0];t.language=[t.language,o]}else t.language=[t.language];if(m.isArray(t.language)){var a=new $;t.language.push("en");for(var l=t.language,u=0;u<l.length;u++){var c=l[u],d={};try{d=$.loadPath(c)}catch(e){try{c=this.defaults.amdLanguageBase+c,d=$.loadPath(c)}catch(e){t.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+c+'" could not be automatically loaded. A fallback will be used instead.');continue}}a.extend(d)}t.translations=a}else{var p=$.loadPath(this.defaults.amdLanguageBase+"en"),h=new $(t.language);h.extend(p),t.translations=h}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:x.escapeMarkup,language:e,matcher:function e(t,n){if(""===m.trim(t.term))return n;if(n.children&&0<n.children.length){for(var i=m.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[m.camelCase(e)]=t;var i=x._convertData(n);m.extend(this.defaults,i)},new n}),e.define("pumselect2/options",["require","jquery","./defaults","./utils"],function(i,s,r,o){function e(e,t){if(this.options=e,null!=t&&this.fromElement(t),this.options=r.apply(this.options),t&&t.is("input")){var n=i(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=o.Decorate(this.options.dataAdapter,n)}}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={};n=s.fn.jquery&&"1."==s.fn.jquery.substr(0,2)&&e[0].dataset?s.extend(!0,{},e[0].dataset,e.data()):e.data();var i=s.extend(!0,{},n);for(var r in i=o._convertData(i))-1<s.inArray(r,t)||(s.isPlainObject(this.options[r])?s.extend(this.options[r],i[r]):this.options[r]=i[r]);return this},e.prototype.get=function(e){return this.options[e]},e.prototype.set=function(e,t){this.options[e]=t},e}),e.define("pumselect2/core",["jquery","./options","./utils","./keys"],function(r,u,n,i){var c=function(e,t){null!=e.data("pumselect2")&&e.data("pumselect2").destroy(),this.$element=e,this.id=this._generateId(e),t=t||{},this.options=new u(t,e),c.__super__.constructor.call(this);var n=e.attr("tabindex")||0;e.data("old-tabindex",n),e.attr("tabindex","-1");var i=this.options.get("dataAdapter");this.dataAdapter=new i(e,this.options);var r=this.render();this._placeContainer(r);var s=this.options.get("selectionAdapter");this.selection=new s(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,r);var o=this.options.get("dropdownAdapter");this.dropdown=new o(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,r);var a=this.options.get("resultsAdapter");this.results=new a(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var l=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){l.trigger("selection:update",{data:e})}),e.addClass("pumselect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("pumselect2",this)};return n.Extend(c,n.Observable),c.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,"")},c.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},c.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){var r=e.outerWidth(!1);return r<=0?"auto":r+"px"}if("style"!=t)return t;var s=e.attr("style");if("string"!=typeof s)return null;for(var o=s.split(";"),a=0,l=o.length;a<l;a+=1){var u=o[a].replace(/\s/g,"").match(n);if(null!==u&&1<=u.length)return u[1]}return null},c.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)},c.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)},c.prototype._registerDataEvents=function(){var n=this;this.dataAdapter.on("*",function(e,t){n.trigger(e,t)})},c.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)})},c.prototype._registerDropdownEvents=function(){var n=this;this.dropdown.on("*",function(e,t){n.trigger(e,t)})},c.prototype._registerResultsEvents=function(){var n=this;this.results.on("*",function(e,t){n.trigger(e,t)})},c.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())})},c.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",{})},c.prototype.trigger=function(e,t){var n=c.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],s={prevented:!1,name:e,args:t};if(n.call(this,r,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},c.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},c.prototype.open=function(){this.isOpen()||this.trigger("query",{})},c.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},c.prototype.isOpen=function(){return this.$container.hasClass("pumselect2-container--open")},c.prototype.hasFocus=function(){return this.$container.hasClass("pumselect2-container--focus")},c.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("pumselect2-container--focus"),this.trigger("focus",{}))},c.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.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},c.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},c.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();var t=e[0];r.isArray(t)&&(t=r.map(t,function(e){return e.toString()})),this.$element.val(t).trigger("change")},c.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},c.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},c}),e.define("pumselect2/compat/utils",["jquery"],function(o){return{syncCssClasses:function(e,t,n){var i,r,s=[];(i=o.trim(e.attr("class")))&&o((i=""+i).split(/\s+/)).each(function(){0===this.indexOf("pumselect2-")&&s.push(this)}),(i=o.trim(t.attr("class")))&&o((i=""+i).split(/\s+/)).each(function(){0!==this.indexOf("pumselect2-")&&null!=(r=n(this))&&s.push(r)}),e.attr("class",s.join(" "))}}}),e.define("pumselect2/compat/containerCss",["jquery","./utils"],function(o,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("containerCssClass")||"";o.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var s=this.options.get("containerCss")||{};return o.isFunction(s)&&(s=s(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(s),t.addClass(n),t},e}),e.define("pumselect2/compat/dropdownCss",["jquery","./utils"],function(o,a){function l(e){return null}function e(){}return e.prototype.render=function(e){var t=e.call(this),n=this.options.get("dropdownCssClass")||"";o.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||l,-1!==n.indexOf(":all:")){n=n.replace(":all:","");var r=i;i=function(e){var t=r(e);return null!=t?t+" "+e:e}}var s=this.options.get("dropdownCss")||{};return o.isFunction(s)&&(s=s(this.$element)),a.syncCssClasses(t,this.$element,i),t.css(s),t.addClass(n),t},e}),e.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}),e.define("pumselect2/compat/inputData",["jquery"],function(o){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){function i(e,t){var n=[];return e.selected||-1!==o.inArray(e.id,t)?(e.selected=!0,n.push(e)):e.selected=!1,e.children&&n.push.apply(n,i(e.children,t)),n}for(var n=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r];n.push.apply(n,i(s,this.$element.val().split(this._valueSeparator)))}t(n)},e.prototype.select=function(e,t){if(this.options.get("multiple")){var n=this.$element.val();n+=this._valueSeparator+t.id,this.$element.val(n),this.$element.trigger("change")}else this.current(function(e){o.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],o=this.matches(t,s);null!==o&&i.push(o)}n({results:i})},e.prototype.addOptions=function(e,t){var n=o.map(t,function(e){return o.data(e[0],"data")});this._currentData.push.apply(this._currentData,n)},e}),e.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}}}),e.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}),e.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}),e.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}),e.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}),n=function(p){var h,m,e=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],t="onwheel"in document||9<=document.documentMode?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],f=Array.prototype.slice;if(p.event.fixHooks)for(var n=e.length;n;)p.event.fixHooks[e[--n]]=p.event.mouseHooks;var g=p.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;p.data(this,"mousewheel-line-height",g.getLineHeight(this)),p.data(this,"mousewheel-page-height",g.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=t.length;e;)this.removeEventListener(t[--e],i,!1);else this.onmousewheel=null;p.removeData(this,"mousewheel-line-height"),p.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var t=p(e),n=t["offsetParent"in p.fn?"offsetParent":"parent"]();return n.length||(n=p("body")),parseInt(n.css("fontSize"),10)||parseInt(t.css("fontSize"),10)||16},getPageHeight:function(e){return p(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function i(e){var t,n=e||window.event,i=f.call(arguments,1),r=0,s=0,o=0,a=0,l=0;if((e=p.event.fix(n)).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){if(1===n.deltaMode){var u=p.data(this,"mousewheel-line-height");r*=u,o*=u,s*=u}else if(2===n.deltaMode){var c=p.data(this,"mousewheel-page-height");r*=c,o*=c,s*=c}if(t=Math.max(Math.abs(o),Math.abs(s)),(!m||t<m)&&y(n,m=t)&&(m/=40),y(n,t)&&(r/=40,s/=40,o/=40),r=Math[1<=r?"floor":"ceil"](r/m),s=Math[1<=s?"floor":"ceil"](s/m),o=Math[1<=o?"floor":"ceil"](o/m),g.settings.normalizeOffset&&this.getBoundingClientRect){var d=this.getBoundingClientRect();a=e.clientX-d.left,l=e.clientY-d.top}return e.deltaX=s,e.deltaY=o,e.deltaFactor=m,e.offsetX=a,e.offsetY=l,e.deltaMode=0,i.unshift(e,r,s,o),h&&clearTimeout(h),h=setTimeout(v,200),(p.event.dispatch||p.event.handle).apply(this,i)}}function v(){m=null}function y(e,t){return g.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}p.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof e.define&&e.define.amd?e.define("jquery-mousewheel",["jquery"],n):"object"==typeof exports?module.exports=n:n(i),e.define("jquery.pumselect2",["jquery","jquery-mousewheel","./pumselect2/core","./pumselect2/defaults"],function(r,e,t,n){if(null==r.fn.pumselect2){var 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}}return null==r.fn.pumselect2.defaults&&(r.fn.pumselect2.defaults=n),t}),{define:e.define,require:e.require}}(),t=e.require("jquery.pumselect2");return i.fn.pumselect2.amd=e,t}),function(i){"use strict";var e=i(".pum-alerts"),r=i(".pum-alert-count"),s=parseInt(r.eq(0).text());function o(){0===e.find(".pum-alert-holder").length&&(e.slideUp(100,function(){e.remove()}),i("#menu-posts-popup .wp-menu-name .update-plugins").fadeOut())}i(document).on("pumDismissAlert",o).on("click",".pum-alert-holder .pum-dismiss",function(){var e=i(this),t=e.parents(".pum-alert-holder"),n=e.data("reason")||"maybe_later";"review_request"!==t.data("code")?function(e){var t=e.data("dismissible"),n="1"===t||1===t||!0===t?null:t;i.ajax({method:"POST",dataType:"json",url:ajaxurl,data:{action:"pum_alerts_action",nonce:window.pum_alerts_nonce,code:e.data("code"),expires:n}})}(t):function(e){i.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:e}}),void 0!==window.pum_review_api_url&&i.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:e,uuid:window.pum_review_uuid||null}})}(n),function(e){s--,r.text(s),e.fadeTo(100,0,function(){e.slideUp(100,function(){e.remove(),o()})})}(t)})}(jQuery),function(r){"use strict";var e={init:function(){r(".pum-color-picker").filter(":not(.pum-color-picker-initialized)").addClass("pum-color-picker-initialized").wpColorPicker({change:function(e,t){r(e.target).trigger("colorchange",t)},clear:function(e){r(e.target).prev().trigger("colorchange").wpColorPicker("close")},hide:!0})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.colorpicker=e,r(document).on("click",".iris-palette",function(){r(this).parents(".wp-picker-active").find("input.pum-color-picker").trigger("change")}).on("colorchange",function(e,t){var n=r(e.target),i="";void 0!==t&&void 0!==t.color&&(i=t.color.toString()),n.val(i).trigger("change"),"popup_theme"===r("form#post input#post_type").val()&&PUM_Admin.utils.debounce(PUM_Admin.themeEditor.refresh_preview,100)}).on("pum_init",e.init)}(jQuery),function(h){"use strict";var c={init:function(){c.checkDependencies()},checkDependencies:function(e){var t=h(e);(e=t.length?t:h("[data-pum-dependencies]:not([data-pum-processed-dependencies])")).each(function(){var e,l=h(this),u=l.data("id"),c=l.data("pum-processed-dependencies")||{},d=Object.keys(c).length,p=0,t=l.data("pum-dependent-fields");if(!l.data("pum-processed-dependencies")){for(e in"string"==typeof(c=l.data("pum-dependencies"))&&(c=JSON.parse(c)),c)c.hasOwnProperty(e)&&("string"==typeof c[e]?-1!==c[e].indexOf(",")?c[e]=c[e].split(","):c[e]=[c[e]]:"number"==typeof c[e]&&(c[e]=[c[e]]));d=Object.keys(c).length,l.data("pum-processed-dependencies",c).attr("data-pum-processed-dependencies",c)}t||(t=h.map(c,function(e,t){var n=h('.pum-field[data-id="'+t+'"]');return n.length?n.eq(0):null}),l.data("pum-dependent-fields",t)),h(t).each(function(){var e,t=h(this),n=t.find(":input:first"),i=t.data("id"),r=n.val(),s=c[i],o=t.data("pum-field-dependents")||[];if(-1===o.indexOf(u)&&(o.push(u),t.data("pum-field-dependents",o)),null==s)return l.removeClass("pum-dependencies-met").hide(0).trigger("pumFormDependencyUnmet"),!1;if(t.hasClass("pum-field-radio")&&(r=t.find(":input:checked").val()),t.hasClass("pum-field-multicheck")&&(r=[],t.find(":checkbox:checked").each(function(e){r[e]=h(this).val(),"string"!=typeof r[e]||isNaN(parseInt(r[e]))||(r[e]=parseInt(r[e]))})),t.hasClass("pum-field-select")||t.hasClass("pum-field-radio"))e=s&&-1!==s.indexOf(r);else if(t.hasClass("pum-field-checkbox"))e=s===n.is(":checked");else if(t.hasClass("pum-field-multicheck"))if(Array.isArray(s)){e=!1;for(var a=0;a<s.length;a++)-1!==r.indexOf(s[a])&&(e=!0)}else e=-1!==r.indexOf(s);else e=Array.isArray(s)?-1!==s.indexOf(r):s==r;if(!e)return l.removeClass("pum-dependencies-met").hide(0).trigger("pumFormDependencyUnmet"),!1;++p===d&&l.addClass("pum-dependencies-met").show(0).trigger("pumFormDependencyMet")})})},form_check:function(){h(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||{},r=e.fields||{};return Object.keys(t).length&&Object.keys(n).length?_.each(r,function(e,t){"object"==typeof e&&Object.keys(e).length&&_.each(e,function(e,t){if("object"==typeof e&&Object.keys(e).length){if(c.is_field(e)){var n={};n[t]=e,t="main",e=n}_.each(e,function(e){i[e.id]=e})}})}):Object.keys(t).length?_.each(r,function(e,t){"object"==typeof e&&Object.keys(e).length&&_.each(e,function(e){i[e.id]=e})}):Object.keys(n).length?_.each(r,function(e,t){_.each(e,function(e){i[e.id]=e})}):(r=c.parseFields(r,values),_.each(r,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=h.extend(!0,{id:"",tabs:{},sections:{},fields:{},maintabs:{},subtabs:{}},e),a=h.extend({id:o.id,classes:[],tabs:{},vertical:!0,form:!0,meta:{"data-min-height":250}},o.maintabs),l=h.extend({classes:["link-tabs","sub-tabs"],tabs:{}},o.subtabs),u=["pum-dynamic-form"];return r=r||{},Object.keys(o.tabs).length&&Object.keys(o.sections).length?(u.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=h.extend(l,{id:o.id+"-"+i+"-subtabs",tabs:{}}),_.each(e,function(e,t){if("object"==typeof e&&Object.keys(e).length){if(c.is_field(e)){var n={};n[t]=e,t="main",e=n}void 0===l.tabs[t]&&(l.tabs[t]={label:o.sections[i][t],content:""}),e=c.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?(u.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=c.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=c.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=c.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(u.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=c,h(document).on("pum_init pum_form_check",function(){PUM_Admin.forms.init()}).on("pumFieldChanged",".pum-field",function(){var e,t=h(this).data("pum-field-dependents")||[],n=h();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=h(this),t=e.find(":input"),n=e.parents(".pum-dynamic-form:first"),i=t.val(),r=(n.data("form_fields")||{})[e.data("id")]||{},s=e.find(".pum-desc"),o=e.data("pum-dynamic-desc");switch(r.type){case"radio":i=e.find(":input:checked").val()}r.value=i,o&&o.length&&s.html(PUM_Admin.templates.renderInline(o,r))}).on("change",".pum-field-select select",function(){h(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-checkbox input",function(){h(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-multicheck input",function(){h(this).parents(".pum-field").trigger("pumFieldChanged")}).on("click",".pum-field-radio input",function(e){var t=h(this),n=t.parents("li"),i=t.parents(".pum-field");i.trigger("pumFieldChanged"),i.find("li.pum-selected").removeClass("pum-selected"),n.addClass("pum-selected")})}(jQuery),function(s){"use strict";var i,r,o=s("html"),t=s(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){if(9===e.keyCode){var t=PUM_Admin.modals._current.find("*").filter(a).filter(":visible"),n=s(":focus"),i=t.length,r=t.index(n);e.shiftKey?0===r&&(t.get(i-1).focus(),e.preventDefault()):r===i-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){s(".pum-modal-background").off("keydown.pum_modal").hide(0,function(){s("html").css({overflow:"visible",width:"auto"}),i&&(i.attr("aria-hidden","false"),i=null),r.length&&r.focus(),PUM_Admin.modals._current=null,t.off("focus.pum_modal"),void 0!==e&&e()}).attr("aria-hidden","true")},show:function(e,t){s(".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=s(":focus");n.parents(".pum-modal-wrap").length||(r=n),PUM_Admin.modals._current=s(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=s("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){s(e).remove()},replace:function(e,t){PUM_Admin.modals.remove(s.trim(e)),s("body").append(s.trim(t))},reload:function(e,t,n){PUM_Admin.modals.replace(e,t),PUM_Admin.modals.show(e,n),s(e).trigger("pum_init")}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.modals=e,s(document).on("click",".pum-modal-background, .pum-modal-wrap .cancel, .pum-modal-wrap .pum-modal-close",function(e){var t=s(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)?n.val(t).trigger("change"):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){if("function"!=typeof window.$$){var r,s,o={},a={};window.$$=function(e,t){return t?((r=t.selector)&&(t=r),(s=a[t])===i&&(s=a[t]={}),(r=s[e])!==i?r:s[e]=n(e,$$(t))):(r=o[e])!==i?r:o[e]=n(e)},window.$$clear=function(e,t){t?((r=t.selector)&&(t=r),e&&(r=a[t])&&(r[e]=i),a[t]=i):e?(o[e]=i,a[e]=i):(o={},a={})},window.$$fresh=function(e,t){return $$clear(e,t),$$(e,t)}}}(jQuery),function(e,n){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(e,t){return n(e,t)});else if("undefined"!=typeof exports){var t=require("jquery");n(exports,t)}else n(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,s){var u={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,n){var r={},a={};function l(e,t,n){return e[t]=n,e}function e(){return r}this.addPair=function(e){if(!u.validate.test(e.name))return this;var t=function(e,t){var n,i,r=e.match(u.key),s=document.querySelector('[name="'+e+'"]'),o=!1;if("INPUT"===s.tagName?o=s.type:"SELECT"===s.tagName?o="select":"TEXTAREA"===s.tagName&&(o="textarea"),0<=["textarea","text"].indexOf(o))try{t=JSON.parse(t)}catch(e){}for(;void 0!==(n=r.pop());)u.push.test(n)?t=l([],(i=e.replace(/\[\]$/,""),void 0===a[i]&&(a[i]=0),a[i]++),t):u.fixed.test(n)?t=l([],n,t):u.named.test(n)&&(t=l({},n,t));return t}(e.name,function(e){switch(console.log(e),s('[name="'+e.name+'"]',n).attr("type")){case"checkbox":return"1"===e.value||e.value;default:return e.value}}(e));return r=i.extend(!0,r,t),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(e())}}return t.patterns=u,t.serializeObject=function(){var e;return e=this.is("form")?this.serializeArray():this.find(":input").serializeArray(),new t(s,this).addPairs(e).serialize()},t.serializeJSON=function(){var e;return e=this.is("form")?this.serializeArray():this.find(":input").serializeArray(),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");if(e.hasClass("vertical-tabs")){var r=i&&0<i?i:t.eq(0).outerHeight(!0);e.css({minHeight:r+"px"}),e.parent().innerHeight<r&&e.parent().css({minHeight:r+"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(i){"use strict";var n=pum_admin_vars.I10n,e={render:function(e,t){var n=wp.template(e);return void 0!==(t=t||{}).classes&&Array.isArray(t.classes)&&(t.classes=t.classes.join(" ")),n(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=i.extend(!0,{},{tag:"",meta:{},has_content:!1,content:""},e),n=t.has_content?"pum-shortcode-w-content":"pum-shortcode";return PUM_Admin.templates.render(n,t)},modal:function(e){var t=i.extend(!0,{},{id:"",title:"",description:"",classes:"",save_button:n.save,cancel_button:n.cancel,content:""},e);return PUM_Admin.templates.render("pum-modal",t)},tabs:function(e){return"string"==typeof(e=i.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){var t=i.extend(!0,{},{classes:[],fields:[]},e);return PUM_Admin.templates.render("pum-field-section",t)},fieldArgs:function(e){var s=[],o=i.extend(!0,{},PUM_Admin.models.field(e));switch(void 0===e.std||"checkbox"===e.type||null!==o.value&&!1!==o.value||(o.value=e.std),"string"==typeof o.classes&&(o.classes=o.classes.split(" ")),void 0!==e.class&&o.classes.push(e.class),void 0!==e.dependencies&&"object"==typeof e.dependencies&&(o.dependencies=JSON.stringify(e.dependencies)),o.required&&(o.meta.required=!0,o.classes.push("pum-required")),"string"==typeof o.dynamic_desc&&o.dynamic_desc.length&&(o.classes.push("pum-field-dynamic-desc"),o.desc=PUM_Admin.templates.renderInline(o.dynamic_desc,o)),o.allow_html&&(o.classes.push("pum-field-"+o.type+"--html"),"string"==typeof o.value&&""!==o.value&&PUM_Admin.utils.htmlencoder.hasEncoded(o.value)&&(o.value=PUM_Admin.utils.htmlencoder.htmlDecode(o.value))),e.type){case"select":case"objectselect":case"postselect":case"taxonomyselect":void 0!==o.options&&(_.each(o.options,function(e,t){var n,i,r=!1;"object"!=typeof e?(null!==o.value&&(o.multiple&&("string"==typeof o.value&&o.value==t||Array.isArray(o.value)&&-1!==o.value.indexOf(t)||!Array.isArray(o.value)&&"object"==typeof o.value&&Object.keys(o.value).length&&void 0!==o.value[t])?r="selected":o.multiple||o.value!=t||(r="selected")),s.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:r}}))):(n=t,i=[],_.each(e,function(e,t){var n=!1;null!==o.value&&(o.multiple&&("string"==typeof o.value&&o.value==t||Array.isArray(o.value)&&-1!==o.value.indexOf(t)||!Array.isArray(o.value)&&"object"==typeof o.value&&Object.keys(o.value).length&&void 0!==o.value[t])?n="selected":o.multiple||o.value!=t||(n="selected")),i.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))}),s.push({label:n,options:i}))}),o.options=s),o.multiple&&(o.meta.multiple=!0,o.as_array&&(o.name+="[]"),o.value&&o.value.length||(o.value=[]),"string"==typeof o.value&&(o.value=[o.value])),"select"!==e.type&&(o.select2=!0,o.classes.push("pum-field-objectselect"),o.classes.push("postselect"===e.type?"pum-field-postselect":"pum-field-taxonomyselect"),o.meta["data-objecttype"]="postselect"===e.type?"post_type":"taxonomy",o.meta["data-objectkey"]="postselect"===e.type?e.post_type:e.taxonomy,o.meta["data-current"]="object"==typeof o.value||Array.isArray(o.value)?JSON.stringify(o.value):o.value),o.select2&&(o.classes.push("pum-field-select2"),o.placeholder&&(o.meta["data-placeholder"]=o.placeholder));break;case"radio":void 0!==o.options&&(_.each(o.options,function(e,t){s.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{checked:o.value===t}}))}),o.options=s);break;case"multicheck":void 0!==o.options&&(!1!==o.value&&null!==o.value||(o.value=[]),"string"==typeof o.value&&o.value.indexOf(",")&&(o.value=o.value.split(",")),o.as_array&&(o.name+="[]"),_.each(o.options,function(e,t){s.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{checked:Array.isArray(o.value)&&-1!==o.value.indexOf(t)||!Array.isArray(o.value)&&"object"==typeof o.value&&Object.keys(o.value).length&&void 0!==o.value[t]}}))}),o.options=s);break;case"checkbox":switch(typeof o.value){case"object":Array.isArray(o.value)&&1===o.value.length&&"1"===o.value[0].toString()&&(o.value=!0,o.meta.checked=!0);break;case"boolean":o.value&&(o.meta.checked=!0);break;case"string":"true"!==o.value&&"yes"!==o.value&&"1"!==o.value||(o.meta.checked=!0);break;case"number":(1===parseInt(o.value,10)||0<parseInt(o.value,10))&&(o.meta.checked=!0)}break;case"rangeslider":o.meta.step=o.step,o.meta.min=o.min,o.meta.max=o.max,o.meta["data-force-minmax"]=o.force_minmax.toString();break;case"textarea":o.meta.cols=o.cols,o.meta.rows=o.rows;break;case"measure":"string"==typeof o.value&&""!==o.value?(o.number=parseInt(o.value),o.unitValue=o.value.replace(o.number,""),o.value=o.number):o.unitValue=null,void 0!==o.units&&(_.each(o.units,function(e,t){var n=!1;o.unitValue==t&&(n="selected"),s.push(PUM_Admin.templates.prepareMeta({label:e,value:t,meta:{selected:n}}))}),o.units=s);break;case"color":"string"==typeof o.value&&""!==o.value&&(o.meta["data-default-color"]=o.value);break;case"license_key":o.value=i.extend({key:"",license:{},messages:[],status:"empty",expires:!1,classes:!1},o.value),o.classes.push("pum-license-"+o.value.status+"-notice"),o.value.classes&&o.classes.push(o.value.classes)}return o},field:function(e){var t,n=PUM_Admin.templates.fieldArgs(e);return t="pum-field-"+n.type,"objectselfect"!==n.type&&"postselect"!==n.type&&"taxonomyselect"!==n.type||(t="pum-field-select"),i("#tmpl-"+t).length?(n.field=PUM_Admin.templates.render(t,n),PUM_Admin.templates.render("pum-field-wrapper",n)):(console.warn("No field template found for type:"+n.type+" fieldID: "+n.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:["&nbsp;","&iexcl;","&cent;","&pound;","&curren;","&yen;","&brvbar;","&sect;","&uml;","&copy;","&ordf;","&laquo;","&not;","&shy;","&reg;","&macr;","&deg;","&plusmn;","&sup2;","&sup3;","&acute;","&micro;","&para;","&middot;","&cedil;","&sup1;","&ordm;","&raquo;","&frac14;","&frac12;","&frac34;","&iquest;","&Agrave;","&Aacute;","&Acirc;","&Atilde;","&Auml;","&Aring;","&AElig;","&Ccedil;","&Egrave;","&Eacute;","&Ecirc;","&Euml;","&Igrave;","&Iacute;","&Icirc;","&Iuml;","&ETH;","&Ntilde;","&Ograve;","&Oacute;","&Ocirc;","&Otilde;","&Ouml;","&times;","&Oslash;","&Ugrave;","&Uacute;","&Ucirc;","&Uuml;","&Yacute;","&THORN;","&szlig;","&agrave;","&aacute;","&acirc;","&atilde;","&auml;","&aring;","&aelig;","&ccedil;","&egrave;","&eacute;","&ecirc;","&euml;","&igrave;","&iacute;","&icirc;","&iuml;","&eth;","&ntilde;","&ograve;","&oacute;","&ocirc;","&otilde;","&ouml;","&divide;","&oslash;","&ugrave;","&uacute;","&ucirc;","&uuml;","&yacute;","&thorn;","&yuml;","&quot;","&amp;","&lt;","&gt;","&OElig;","&oelig;","&Scaron;","&scaron;","&Yuml;","&circ;","&tilde;","&ensp;","&emsp;","&thinsp;","&zwnj;","&zwj;","&lrm;","&rlm;","&ndash;","&mdash;","&lsquo;","&rsquo;","&sbquo;","&ldquo;","&rdquo;","&bdquo;","&dagger;","&Dagger;","&permil;","&lsaquo;","&rsaquo;","&euro;","&fnof;","&Alpha;","&Beta;","&Gamma;","&Delta;","&Epsilon;","&Zeta;","&Eta;","&Theta;","&Iota;","&Kappa;","&Lambda;","&Mu;","&Nu;","&Xi;","&Omicron;","&Pi;","&Rho;","&Sigma;","&Tau;","&Upsilon;","&Phi;","&Chi;","&Psi;","&Omega;","&alpha;","&beta;","&gamma;","&delta;","&epsilon;","&zeta;","&eta;","&theta;","&iota;","&kappa;","&lambda;","&mu;","&nu;","&xi;","&omicron;","&pi;","&rho;","&sigmaf;","&sigma;","&tau;","&upsilon;","&phi;","&chi;","&psi;","&omega;","&thetasym;","&upsih;","&piv;","&bull;","&hellip;","&prime;","&Prime;","&oline;","&frasl;","&weierp;","&image;","&real;","&trade;","&alefsym;","&larr;","&uarr;","&rarr;","&darr;","&harr;","&crarr;","&lArr;","&uArr;","&rArr;","&dArr;","&hArr;","&forall;","&part;","&exist;","&empty;","&nabla;","&isin;","&notin;","&ni;","&prod;","&sum;","&minus;","&lowast;","&radic;","&prop;","&infin;","&ang;","&and;","&or;","&cap;","&cup;","&int;","&there4;","&sim;","&cong;","&asymp;","&ne;","&equiv;","&le;","&ge;","&sub;","&sup;","&nsub;","&sube;","&supe;","&oplus;","&otimes;","&perp;","&sdot;","&lceil;","&rceil;","&lfloor;","&rfloor;","&lang;","&rang;","&loz;","&spades;","&clubs;","&hearts;","&diams;"],arr2:["&#160;","&#161;","&#162;","&#163;","&#164;","&#165;","&#166;","&#167;","&#168;","&#169;","&#170;","&#171;","&#172;","&#173;","&#174;","&#175;","&#176;","&#177;","&#178;","&#179;","&#180;","&#181;","&#182;","&#183;","&#184;","&#185;","&#186;","&#187;","&#188;","&#189;","&#190;","&#191;","&#192;","&#193;","&#194;","&#195;","&#196;","&#197;","&#198;","&#199;","&#200;","&#201;","&#202;","&#203;","&#204;","&#205;","&#206;","&#207;","&#208;","&#209;","&#210;","&#211;","&#212;","&#213;","&#214;","&#215;","&#216;","&#217;","&#218;","&#219;","&#220;","&#221;","&#222;","&#223;","&#224;","&#225;","&#226;","&#227;","&#228;","&#229;","&#230;","&#231;","&#232;","&#233;","&#234;","&#235;","&#236;","&#237;","&#238;","&#239;","&#240;","&#241;","&#242;","&#243;","&#244;","&#245;","&#246;","&#247;","&#248;","&#249;","&#250;","&#251;","&#252;","&#253;","&#254;","&#255;","&#34;","&#38;","&#60;","&#62;","&#338;","&#339;","&#352;","&#353;","&#376;","&#710;","&#732;","&#8194;","&#8195;","&#8201;","&#8204;","&#8205;","&#8206;","&#8207;","&#8211;","&#8212;","&#8216;","&#8217;","&#8218;","&#8220;","&#8221;","&#8222;","&#8224;","&#8225;","&#8240;","&#8249;","&#8250;","&#8364;","&#402;","&#913;","&#914;","&#915;","&#916;","&#917;","&#918;","&#919;","&#920;","&#921;","&#922;","&#923;","&#924;","&#925;","&#926;","&#927;","&#928;","&#929;","&#931;","&#932;","&#933;","&#934;","&#935;","&#936;","&#937;","&#945;","&#946;","&#947;","&#948;","&#949;","&#950;","&#951;","&#952;","&#953;","&#954;","&#955;","&#956;","&#957;","&#958;","&#959;","&#960;","&#961;","&#962;","&#963;","&#964;","&#965;","&#966;","&#967;","&#968;","&#969;","&#977;","&#978;","&#982;","&#8226;","&#8230;","&#8242;","&#8243;","&#8254;","&#8260;","&#8472;","&#8465;","&#8476;","&#8482;","&#8501;","&#8592;","&#8593;","&#8594;","&#8595;","&#8596;","&#8629;","&#8656;","&#8657;","&#8658;","&#8659;","&#8660;","&#8704;","&#8706;","&#8707;","&#8709;","&#8711;","&#8712;","&#8713;","&#8715;","&#8719;","&#8721;","&#8722;","&#8727;","&#8730;","&#8733;","&#8734;","&#8736;","&#8743;","&#8744;","&#8745;","&#8746;","&#8747;","&#8756;","&#8764;","&#8773;","&#8776;","&#8800;","&#8801;","&#8804;","&#8805;","&#8834;","&#8835;","&#8836;","&#8838;","&#8839;","&#8853;","&#8855;","&#8869;","&#8901;","&#8968;","&#8969;","&#8970;","&#8971;","&#9001;","&#9002;","&#9674;","&#9824;","&#9827;","&#9829;","&#9830;"],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,"&#38;"):e.replace(/&/g,"&amp;")),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,"&#38;"):e.replace(/&/g,"&amp;")).replace(/##AMPHASH##/g,"&#")),e=e.replace(/&#\d*([^\d;]|$)/g,"$1"),t||(e=this.correctEncoding(e)),"entity"==this.EncodeType&&(e=this.NumericalToHTML(e)),e)},XSSEncode:function(e,t){return this.isEmpty(e)?"":e=(t=t||!0)?(e=(e=(e=e.replace(/\'/g,"&#39;")).replace(/\"/g,"&quot;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"):(e=(e=(e=e.replace(/\'/g,"&#39;")).replace(/\"/g,"&#34;")).replace(/</g,"&#60;")).replace(/>/g,"&#62;")},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;)(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";var t={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)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0:e===t?i=!0: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)?i=!0:"object"==typeof t&&"string"==typeof e&&-1!==jQuery.inArray(e,t)?i=!0: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){var n=!1,i=function(){n=!1};return function(){n||(e(),window.setTimeout(i,t),n=!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)):(r||(r=t.length),t[r]=i)}(t,e,i(this).val()))}),t}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.utils=t,window.PUMUtils=t,i.fn.pumSerializeForm=t.serializeForm}(jQuery);
assets/js/admin-shortcode-ui.js CHANGED
@@ -326,6 +326,7 @@
326
  event.preventDefault();
327
 
328
  var $form = $(this),
 
329
  values = PUM_Admin.forms.parseValues($form.pumSerializeObject().attrs, PUM_Admin.forms.flattenFields(data)),
330
  content;
331
 
326
  event.preventDefault();
327
 
328
  var $form = $(this),
329
+ raw_values = $form.pumSerializeObject(),
330
  values = PUM_Admin.forms.parseValues($form.pumSerializeObject().attrs, PUM_Admin.forms.flattenFields(data)),
331
  content;
332
 
assets/js/admin-shortcode-ui.min.js CHANGED
@@ -1 +1 @@
1
- !function(s){function t(){var t=s("#pum-shortcode-editor-pum_sub_form #provider"),e=""!==t.val()&&"none"!==t.val()?t.val():pum_admin_vars.default_provider,o=s('.pum-modal-content .tabs .tab a[href^="#pum-shortcode-editor-pum_sub_form_provider_"]'),i=s('[id^="pum-shortcode-editor-pum_sub_form_provider_"]'),n=o.filter('[href="#pum-shortcode-editor-pum_sub_form_provider_'+e+'"]'),r=i.filter('[id="pum-shortcode-editor-pum_sub_form_provider_'+e+'"]');o.each(function(){s(this).parent().hide()}),i.find(":input").attr("disable",!0),n.length&&(n.parent().show(),r.find(":input").attr("disable",!1))}function e(){var t=s("#pum-shortcode-editor-pum_sub_form_provider_mailchimp #list_id").val(),e=s("#pum-mci-list-"+t+",.pum-mci-list-"+t),o=s(".pum-mci-list-options");o.hide(),o.find('input[type="checkbox"]').attr("disabled",!0),e.length&&(e.show(),e.find('input[type="checkbox"]').attr("disabled",!1))}void 0===window.pum_newsletter_initialized&&(window.pum_newsletter_initialized=!0,s(document).on("pum_init","#pum-shortcode-editor-pum_sub_form",t).on("change","#pum-shortcode-editor-pum_sub_form #provider",t),s(document).on("pumInit pum_init","#pum-shortcode-editor-pum_sub_form",e).on("change","#pum-shortcode-editor-pum_sub_form_provider_mailchimp #list_id",e))}(jQuery),function(d){"use strict";if(void 0!==window.pum_shortcode_ui_vars){var i=pum_shortcode_ui_vars.I10n||{error_loading_shortcode_preview:"",shortcode_ui_button_tooltip:"",insert:"",update:""},t=pum_shortcode_ui_vars.shortcodes||{},o={version:1,shortcode_args:{},shortcode_data:{},initialize:function(t){},cleanAttrs:function(o){return _.each(o,function(t,e){null!==t&&""!==t||delete o[e],"object"==typeof t&&(o[e]=Object.keys(t))}),o},template:function(t){var e,o="pum-shortcode-view-"+this.type,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"attrs"};return 1===this.version&&(i.variable="attr"),d("#tmpl-"+o).length?(e=_.template(d("#tmpl-"+o).html(),i),t.class&&(t.classes=t.class,delete t.class),e(t=this.cleanAttrs(t))):this.text},getShortcodeValues:function(){if(void 0===this.shortcode||void 0===this.shortcode.attrs)return{};var t={};if(void 0!==this.shortcode.attrs.named&&(t=_.extend(t,this.shortcode.attrs.named||{})),void 0!==this.shortcode.attrs.numeric)for(var e=0;e<this.shortcode.attrs.numeric.length;e++)t[this.shortcode.attrs.numeric[e]]=!0;return t},getShortcodeContent:function(){return void 0===this.shortcode?"":this.shortcode.content||""},getContent:function(){return this.content||this.fetch(),this.content},formatShortcode:function(t){var e=this.shortcode_args.has_content,o=this.getShortcodeContent();return t=t||this.getShortcodeValues(),e&&void 0!==t._inner_content&&(o=t._inner_content,delete t._inner_content),t=this.cleanAttrs(t),PUM_Admin.templates.shortcode({tag:this.type,meta:t,has_content:e,content:o})},fetch:function(){var e=this,t=e.getShortcodeValues(),o={action:"pum_do_shortcode",post_id:d("#post_ID").val(),tag:e.type,shortcode:e.formatShortcode(),nonce:pum_shortcode_ui_vars.nonce};e.fetching||(e.fetching=!0,e.shortcode_args.has_content&&(t._inner_content=e.getShortcodeContent()),e.shortcode_args.ajax_rendering?d.post(ajaxurl,o).done(function(t){e.content=t.data}).fail(function(){e.content='<span class="pum_shortcode_ui_vars_error">'+i.error_loading_shortcode_preview+"</span>"}).always(function(){delete e.fetching,e.render()}):(e.content=e.template(t),delete e.fetching,e.render()))},edit:function(t,e){var o=_.extend({},this.getShortcodeValues());this.shortcode_args.has_content&&(o._inner_content=this.getShortcodeContent()),this.renderForm(o,e)},setLoader:function(){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-admin-generic"></div><div class="wpview-loading"><ins></ins></div></div>')},renderForm:function(t,n){var r=this,s=d.extend(!0,{},{tag:this.type,id:"pum-shortcode-editor-"+this.type,label:"",tabs:{},sections:{},fields:{}},r.shortcode_args);t=t||{},PUM_Admin.modals.reload("#"+s.id,PUM_Admin.templates.modal({id:s.id,title:s.label,description:s.description,classes:"tabbed-content pum-shortcode-editor",save_button:void 0===t?i.insert:i.update,content:PUM_Admin.forms.render({id:"pum-shortcode-editor-"+this.type,tabs:s.tabs||{},sections:s.sections||{},fields:s.fields||{}},t||{}),meta:{"data-shortcode_tag":this.type}})),d("#"+s.id+" form").on("submit",function(t){t.preventDefault();var e,o=d(this),i=PUM_Admin.forms.parseValues(o.pumSerializeObject().attrs,PUM_Admin.forms.flattenFields(s));e=r.formatShortcode(i),"function"==typeof n&&n(e),PUM_Admin.modals.closeAll()})}};d(document).on("pumFormDependencyMet pumFormDependencyUnmet",".pum-shortcode-editor .pum-field",function(t){var e=d(this).find(":input");"pumFormDependencyUnmet"===t.type.toString()?e.prop("disabled",!0):e.prop("disabled",!1)}).ready(function(){window.wp=window.wp||{},window.wp.mce=window.wp.mce||{},window.wp.mce.pum_shortcodes=window.wp.mce.pum_shortcodes||{},_.each(t,function(t,e){wp.mce.pum_shortcodes[e]=_.extend({},o,{version:t.version||1,shortcode_args:t,View:{type:e,template:function(t){return wp.mce.pum_shortcodes[this.type].template(t)},postID:d("#post_ID").val(),initialize:function(t){this.shortcode=t.shortcode,wp.mce.pum_shortcodes[this.type].shortcode_data=this.shortcode},getHtml:function(){var t=this.shortcode.attrs.named;return this.shortcode_args.has_content&&(t._inner_content=this.shortcode.content),this.template(t)}}}),void 0!==wp.mce.views&&"function"==typeof wp.mce.views.register&&wp.mce.views.register(e,wp.mce.pum_shortcodes[e])})})}}(jQuery);
1
+ !function(s){function t(){var t=s("#pum-shortcode-editor-pum_sub_form #provider"),e=""!==t.val()&&"none"!==t.val()?t.val():pum_admin_vars.default_provider,o=s('.pum-modal-content .tabs .tab a[href^="#pum-shortcode-editor-pum_sub_form_provider_"]'),i=s('[id^="pum-shortcode-editor-pum_sub_form_provider_"]'),n=o.filter('[href="#pum-shortcode-editor-pum_sub_form_provider_'+e+'"]'),r=i.filter('[id="pum-shortcode-editor-pum_sub_form_provider_'+e+'"]');o.each(function(){s(this).parent().hide()}),i.find(":input").attr("disable",!0),n.length&&(n.parent().show(),r.find(":input").attr("disable",!1))}function e(){var t=s("#pum-shortcode-editor-pum_sub_form_provider_mailchimp #list_id").val(),e=s("#pum-mci-list-"+t+",.pum-mci-list-"+t),o=s(".pum-mci-list-options");o.hide(),o.find('input[type="checkbox"]').attr("disabled",!0),e.length&&(e.show(),e.find('input[type="checkbox"]').attr("disabled",!1))}void 0===window.pum_newsletter_initialized&&(window.pum_newsletter_initialized=!0,s(document).on("pum_init","#pum-shortcode-editor-pum_sub_form",t).on("change","#pum-shortcode-editor-pum_sub_form #provider",t),s(document).on("pumInit pum_init","#pum-shortcode-editor-pum_sub_form",e).on("change","#pum-shortcode-editor-pum_sub_form_provider_mailchimp #list_id",e))}(jQuery),function(d){"use strict";if(void 0!==window.pum_shortcode_ui_vars){var i=pum_shortcode_ui_vars.I10n||{error_loading_shortcode_preview:"",shortcode_ui_button_tooltip:"",insert:"",update:""},t=pum_shortcode_ui_vars.shortcodes||{},o={version:1,shortcode_args:{},shortcode_data:{},initialize:function(t){},cleanAttrs:function(o){return _.each(o,function(t,e){null!==t&&""!==t||delete o[e],"object"==typeof t&&(o[e]=Object.keys(t))}),o},template:function(t){var e,o="pum-shortcode-view-"+this.type,i={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"attrs"};return 1===this.version&&(i.variable="attr"),d("#tmpl-"+o).length?(e=_.template(d("#tmpl-"+o).html(),i),t.class&&(t.classes=t.class,delete t.class),e(t=this.cleanAttrs(t))):this.text},getShortcodeValues:function(){if(void 0===this.shortcode||void 0===this.shortcode.attrs)return{};var t={};if(void 0!==this.shortcode.attrs.named&&(t=_.extend(t,this.shortcode.attrs.named||{})),void 0!==this.shortcode.attrs.numeric)for(var e=0;e<this.shortcode.attrs.numeric.length;e++)t[this.shortcode.attrs.numeric[e]]=!0;return t},getShortcodeContent:function(){return void 0===this.shortcode?"":this.shortcode.content||""},getContent:function(){return this.content||this.fetch(),this.content},formatShortcode:function(t){var e=this.shortcode_args.has_content,o=this.getShortcodeContent();return t=t||this.getShortcodeValues(),e&&void 0!==t._inner_content&&(o=t._inner_content,delete t._inner_content),t=this.cleanAttrs(t),PUM_Admin.templates.shortcode({tag:this.type,meta:t,has_content:e,content:o})},fetch:function(){var e=this,t=e.getShortcodeValues(),o={action:"pum_do_shortcode",post_id:d("#post_ID").val(),tag:e.type,shortcode:e.formatShortcode(),nonce:pum_shortcode_ui_vars.nonce};e.fetching||(e.fetching=!0,e.shortcode_args.has_content&&(t._inner_content=e.getShortcodeContent()),e.shortcode_args.ajax_rendering?d.post(ajaxurl,o).done(function(t){e.content=t.data}).fail(function(){e.content='<span class="pum_shortcode_ui_vars_error">'+i.error_loading_shortcode_preview+"</span>"}).always(function(){delete e.fetching,e.render()}):(e.content=e.template(t),delete e.fetching,e.render()))},edit:function(t,e){var o=_.extend({},this.getShortcodeValues());this.shortcode_args.has_content&&(o._inner_content=this.getShortcodeContent()),this.renderForm(o,e)},setLoader:function(){this.setContent('<div class="loading-placeholder"><div class="dashicons dashicons-admin-generic"></div><div class="wpview-loading"><ins></ins></div></div>')},renderForm:function(t,n){var r=this,s=d.extend(!0,{},{tag:this.type,id:"pum-shortcode-editor-"+this.type,label:"",tabs:{},sections:{},fields:{}},r.shortcode_args);t=t||{},PUM_Admin.modals.reload("#"+s.id,PUM_Admin.templates.modal({id:s.id,title:s.label,description:s.description,classes:"tabbed-content pum-shortcode-editor",save_button:void 0===t?i.insert:i.update,content:PUM_Admin.forms.render({id:"pum-shortcode-editor-"+this.type,tabs:s.tabs||{},sections:s.sections||{},fields:s.fields||{}},t||{}),meta:{"data-shortcode_tag":this.type}})),d("#"+s.id+" form").on("submit",function(t){t.preventDefault();var e,o=d(this),i=(o.pumSerializeObject(),PUM_Admin.forms.parseValues(o.pumSerializeObject().attrs,PUM_Admin.forms.flattenFields(s)));e=r.formatShortcode(i),"function"==typeof n&&n(e),PUM_Admin.modals.closeAll()})}};d(document).on("pumFormDependencyMet pumFormDependencyUnmet",".pum-shortcode-editor .pum-field",function(t){var e=d(this).find(":input");"pumFormDependencyUnmet"===t.type.toString()?e.prop("disabled",!0):e.prop("disabled",!1)}).ready(function(){window.wp=window.wp||{},window.wp.mce=window.wp.mce||{},window.wp.mce.pum_shortcodes=window.wp.mce.pum_shortcodes||{},_.each(t,function(t,e){wp.mce.pum_shortcodes[e]=_.extend({},o,{version:t.version||1,shortcode_args:t,View:{type:e,template:function(t){return wp.mce.pum_shortcodes[this.type].template(t)},postID:d("#post_ID").val(),initialize:function(t){this.shortcode=t.shortcode,wp.mce.pum_shortcodes[this.type].shortcode_data=this.shortcode},getHtml:function(){var t=this.shortcode.attrs.named;return this.shortcode_args.has_content&&(t._inner_content=this.shortcode.content),this.template(t)}}}),void 0!==wp.mce.views&&"function"==typeof wp.mce.views.register&&wp.mce.views.register(e,wp.mce.pum_shortcodes[e])})})}}(jQuery);
assets/js/site.js CHANGED
@@ -402,6 +402,8 @@ var PUM;
402
 
403
  $popup.trigger('pumAfterOpen');
404
 
 
 
405
  $.fn.popmake.last_open_popup = $popup;
406
 
407
  // Fire user passed callback.
402
 
403
  $popup.trigger('pumAfterOpen');
404
 
405
+ $(window).trigger('resize');
406
+
407
  $.fn.popmake.last_open_popup = $popup;
408
 
409
  // Fire user passed callback.
assets/js/site.min.js CHANGED
@@ -1 +1 @@
1
- var PUM,PUM_Accessibility,PUM_Analytics,pm_cookie,pm_cookie_json,pm_remove_cookie;!function(s){"use strict";void 0===s.fn.on&&(s.fn.on=function(e,o,t){return this.delegate(o,e,t)}),void 0===s.fn.off&&(s.fn.off=function(e,o,t){return this.undelegate(o,e,t)}),void 0===s.fn.bindFirst&&(s.fn.bindFirst=function(e,o){var t,n,i=s(this);i.unbind(e,o),i.bind(e,o),(n=(t=s._data(i[0]).events)[e]).unshift(n.pop()),t[e]=n}),void 0===s.fn.outerHtml&&(s.fn.outerHtml=function(){var e=s(this).clone();return s("<div/>").append(e).html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery),function(p,s,r){"use strict";window.pum_vars=window.pum_vars||{default_theme:"0",home_url:"/",version:1.7,ajaxurl:"",restapi:!1,rest_nonce:null,debug_mode:!1,disable_tracking:!0,message_position:"top",core_sub_forms_enabled:!0,popups:{}},window.pum_popups=window.pum_popups||{},window.pum_vars.popups=window.pum_popups,PUM={get:new function(){var i={},e=function(e,o,t){"boolean"==typeof o&&(t=o,o=!1);var n=o?o.selector+" "+e:e;return(r===i[n]||t)&&(i[n]=o?o.find(e):jQuery(e)),i[n]};return e.elementCache=i,e},getPopup:function(e){var o;return(o=function(e){return!isNaN(e)&&parseInt(Number(e))===parseInt(e)&&!isNaN(parseInt(e,10))}(e)?PUM.get("#pum-"+e):"current"===e?PUM.get(".pum-overlay.pum-active:eq(0)",!0):"open"===e?PUM.get(".pum-overlay.pum-active",!0):"closed"===e?PUM.get(".pum-overlay:not(.pum-active)",!0):e instanceof jQuery?e:p(e)).hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):p()},open:function(e,o){PUM.getPopup(e).popmake("open",o)},close:function(e,o){PUM.getPopup(e).popmake("close",o)},preventOpen:function(e){PUM.getPopup(e).addClass("preventOpen")},getSettings:function(e){return PUM.getPopup(e).popmake("getSettings")},getSetting:function(e,o,t){var n=function(e,o){function t(e,o,t){return o?e[o.slice(0,t?-1:o.length)]:e}return o.split(".").reduce(function(e,o){return o?o.split("[").reduce(t,e):e},e)}(PUM.getSettings(e),o);return void 0!==n?n:t!==r?t:null},checkConditions:function(e){return PUM.getPopup(e).popmake("checkConditions")},getCookie:function(e){return p.pm_cookie(e)},getJSONCookie:function(e){return p.pm_cookie_json(e)},setCookie:function(e,o){PUM.getPopup(e).popmake("setCookie",jQuery.extend({name:"pum-"+PUM.getSetting(e,"id"),expires:"+30 days"},o))},clearCookie:function(e,o){p.pm_remove_cookie(e),"function"==typeof o&&o()},clearCookies:function(e,o){var t,n=PUM.getPopup(e).popmake("getSettings").cookies;if(n!==r&&n.length)for(t=0;n.length>t;t+=1)p.pm_remove_cookie(n[t].settings.name);"function"==typeof o&&o()},getClickTriggerSelector:function(e,o){var t=PUM.getPopup(e),n=PUM.getSettings(e),i=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];return o.extra_selectors&&""!==o.extra_selectors&&i.push(o.extra_selectors),(i=pum.hooks.applyFilters("pum.trigger.click_open.selectors",i,o,t)).join(", ")},disableClickTriggers:function(e,o){if(e!==r)if(o!==r){var t=PUM.getClickTriggerSelector(e,o);p(t).removeClass("pum-trigger"),p(s).off("click.pumTrigger click.popmakeOpen",t)}else{var n=PUM.getSetting(e,"triggers",[]);if(n.length)for(var i=0;n.length>i;i++)if(-1!==pum.hooks.applyFilters("pum.disableClickTriggers.clickTriggerTypes",["click_open"]).indexOf(n[i].type)){t=PUM.getClickTriggerSelector(e,n[i].settings);p(t).removeClass("pum-trigger"),p(s).off("click.pumTrigger click.popmakeOpen",t)}}}},p.fn.popmake=function(e){return p.fn.popmake.methods[e]?(p(s).trigger("pumMethodCall",arguments),p.fn.popmake.methods[e].apply(this,Array.prototype.slice.call(arguments,1))):"object"!=typeof e&&e?void(window.console&&console.warn("Method "+e+" does not exist on $.fn.popmake")):p.fn.popmake.methods.init.apply(this,arguments)},p.fn.popmake.methods={init:function(){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getSettings");return o.theme_id<=0&&(o.theme_id=pum_vars.default_theme),o.disable_reposition!==r&&o.disable_reposition||p(window).on("resize",function(){(e.hasClass("pum-active")||e.find(".popmake.active").length)&&p.fn.popmake.utilities.throttle(setTimeout(function(){e.popmake("reposition")},25),500,!1)}),e.find(".pum-container").data("popmake",o),e.data("popmake",o).trigger("pumInit"),this})},getOverlay:function(){return PUM.getPopup(this)},getContainer:function(){return PUM.getPopup(this).find(".pum-container")},getTitle:function(){return PUM.getPopup(this).find(".pum-title")||null},getContent:function(){return PUM.getPopup(this).find(".pum-content")||null},getClose:function(){return PUM.getPopup(this).find(".pum-content + .pum-close")||null},getSettings:function(){var e=PUM.getPopup(this);return p.extend(!0,{},p.fn.popmake.defaults,e.data("popmake")||{},"object"==typeof pum_popups&&void 0!==pum_popups[e.attr("id")]?pum_popups[e.attr("id")]:{})},state:function(e){var o=PUM.getPopup(this);if(r!==e)switch(e){case"isOpen":return o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active");case"isClosed":return!o.hasClass("pum-open")&&!o.popmake("getContainer").hasClass("active")}},open:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getClose"),i=o.popmake("getSettings"),s=p("html");return o.trigger("pumBeforeOpen"),o.hasClass("preventOpen")||t.hasClass("preventOpen")?(console.log("prevented"),o.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented")):(i.stackable||o.popmake("close_all"),o.addClass("pum-active"),0<i.close_button_delay&&n.fadeOut(0),s.addClass("pum-open"),i.overlay_disabled?s.addClass("pum-open-overlay-disabled"):s.addClass("pum-open-overlay"),i.position_fixed?s.addClass("pum-open-fixed"):s.addClass("pum-open-scrollable"),o.popmake("setup_close").popmake("reposition").popmake("animate",i.animation_type,function(){0<i.close_button_delay&&setTimeout(function(){n.fadeIn()},i.close_button_delay),o.trigger("pumAfterOpen"),p.fn.popmake.last_open_popup=o,e!==r&&e()})),this},setup_close:function(){var t=PUM.getPopup(this),e=t.popmake("getClose"),o=t.popmake("getSettings");return(e=e.add(p(".popmake-close, .pum-close",t).not(e))).off("click.pum").on("click.pum",function(e){var o=p(this);o.hasClass("pum-do-default")||o.data("do-default")!==r&&o.data("do-default")||e.preventDefault(),p.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(o.close_on_esc_press||o.close_on_f4_press)&&p(window).off("keyup.popmake").on("keyup.popmake",function(e){27===e.keyCode&&o.close_on_esc_press&&(p.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===e.keyCode&&o.close_on_f4_press&&(p.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),o.close_on_overlay_click&&(t.on("pumAfterOpen",function(){p(s).on("click.pumCloseOverlay",function(e){p(e.target).closest(".pum-container").length||(p.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))})}),t.on("pumAfterClose",function(){p(s).off("click.pumCloseOverlay")})),t.trigger("pumSetupClose"),this},close:function(n){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getContainer"),t=e.popmake("getClose");return t=t.add(p(".popmake-close, .pum-close",e).not(t)),e.trigger("pumBeforeClose"),e.hasClass("preventClose")||o.hasClass("preventClose")?e.removeClass("preventClose").trigger("pumClosePrevented"):o.fadeOut("fast",function(){e.is(":visible")&&e.fadeOut("fast"),p(window).off("keyup.popmake"),e.off("click.popmake"),t.off("click.popmake"),1===p(".pum-active").length&&p("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),e.removeClass("pum-active").trigger("pumAfterClose"),o.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var e=p(this),o=e.attr("src"),t=o.replace("autoplay=1","1=1");t!==o&&(o=t),e.prop("src",o)}),o.find("video").each(function(){this.pause()}),n!==r&&n()}),this})},close_all:function(){return p(".pum-active").popmake("close"),this},reposition:function(e){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),t=o.popmake("getContainer"),n=o.popmake("getSettings"),i=n.location,s={my:"",at:"",of:window,collision:"none",using:"function"==typeof e?e:p.fn.popmake.callbacks.reposition_using},r={overlay:null,container:null},a=null;try{a=p(p.fn.popmake.last_open_trigger)}catch(e){a=p()}return n.position_from_trigger&&a.length?(s.of=a,0<=i.indexOf("left")&&(s.my+=" right",s.at+=" left"+(0!==n.position_left?"-"+n.position_left:"")),0<=i.indexOf("right")&&(s.my+=" left",s.at+=" right"+(0!==n.position_right?"+"+n.position_right:"")),0<=i.indexOf("center")&&(s.my="center"===i?"center":s.my+" center",s.at="center"===i?"center":s.at+" center"),0<=i.indexOf("top")&&(s.my+=" bottom",s.at+=" top"+(0!==n.position_top?"-"+n.position_top:"")),0<=i.indexOf("bottom")&&(s.my+=" top",s.at+=" bottom"+(0!==n.position_bottom?"+"+n.position_bottom:""))):(0<=i.indexOf("left")&&(s.my+=" left"+(0!==n.position_left?"+"+n.position_left:""),s.at+=" left"),0<=i.indexOf("right")&&(s.my+=" right"+(0!==n.position_right?"-"+n.position_right:""),s.at+=" right"),0<=i.indexOf("center")&&(s.my="center"===i?"center":s.my+" center",s.at="center"===i?"center":s.at+" center"),0<=i.indexOf("top")&&(s.my+=" top"+(0!==n.position_top?"+"+(p("body").hasClass("admin-bar")?parseInt(n.position_top,10)+32:n.position_top):""),s.at+=" top"),0<=i.indexOf("bottom")&&(s.my+=" bottom"+(0!==n.position_bottom?"-"+n.position_bottom:""),s.at+=" bottom")),s.my=p.trim(s.my),s.at=p.trim(s.at),o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show(0)),t.is(":hidden")&&(r.container=t.css("opacity"),t.css({opacity:0}).show(0)),n.position_fixed&&t.addClass("fixed"),"custom"===n.size?t.css({width:n.custom_width,height:n.custom_height_auto?"auto":n.custom_height}):"auto"!==n.size&&t.addClass("responsive").css({minWidth:""!==n.responsive_min_width?n.responsive_min_width:"auto",maxWidth:""!==n.responsive_max_width?n.responsive_max_width:"auto"}),o.trigger("pumAfterReposition"),t.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(0),r.container&&t.css({opacity:r.container}).hide(0),this},animation_origin:function(e){var o=PUM.getPopup(this).popmake("getContainer"),t={my:"",at:""};switch(e){case"top":t={my:"left+"+o.offset().left+" bottom-100",at:"left top"};break;case"bottom":t={my:"left+"+o.offset().left+" top+100",at:"left bottom"};break;case"left":t={my:"right top+"+o.offset().top,at:"left top"};break;case"right":t={my:"left top+"+o.offset().top,at:"right top"};break;default:0<=e.indexOf("left")&&(t={my:t.my+" right",at:t.at+" left"}),0<=e.indexOf("right")&&(t={my:t.my+" left",at:t.at+" right"}),0<=e.indexOf("center")&&(t={my:t.my+" center",at:t.at+" center"}),0<=e.indexOf("top")&&(t={my:t.my+" bottom-100",at:t.at+" top"}),0<=e.indexOf("bottom")&&(t={my:t.my+" top+100",at:t.at+" bottom"}),t.my=p.trim(t.my),t.at=p.trim(t.at)}return t.of=window,t.collision="none",t}}}(jQuery,document),function(s,t,e){"use strict";var n,i,r,a="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",o=".pum:not(.pum-accessibility-disabled)";PUM_Accessibility={forceFocus:function(e){r&&r.length&&!r[0].contains(e.target)&&(e.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(e){if(9===e.keyCode){var o=r.find(".pum-container *").filter(a).filter(":visible"),t=s(":focus"),n=o.length,i=o.index(t);e.shiftKey?0===i&&(o.get(n-1).focus(),e.preventDefault()):i===n-1&&(o.get(0).focus(),e.preventDefault())}},setFocusToFirstItem:function(){r.find(".pum-container *").filter(a).filter(":visible").filter(":not(.pum-close)").first().focus()}},s(t).on("pumInit",o,function(){PUM.getPopup(this).find("[tabindex]").each(function(){var e=s(this);e.data("tabindex",e.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",o,function(){var e=PUM.getPopup(this),o=s(":focus");e.has(o).length||(i=o),r=e.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),(n=s("body > *").filter(":visible").not(r)).attr("aria-hidden","true"),s(t).one("focusin.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",o,function(){}).on("pumBeforeClose",o,function(){}).on("pumAfterClose",o,function(){PUM.getPopup(this).off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),void 0!==i&&i.length&&i.focus(),r=null,s(t).off("focusin.pum_accessibility")}).on("pumSetupClose",o,function(){}).on("pumOpenPrevented",o,function(){}).on("pumClosePrevented",o,function(){}).on("pumBeforeReposition",o,function(){})}(jQuery,document),function(s){"use strict";s.fn.popmake.last_open_trigger=null,s.fn.popmake.last_close_trigger=null,s.fn.popmake.conversion_trigger=null;var r=!(void 0===pum_vars.restapi||!pum_vars.restapi);PUM_Analytics={beacon:function(e,o){var t=new Image,n=r?pum_vars.restapi:pum_vars.ajaxurl,i={route:"/analytics/",data:s.extend({event:"open",pid:null,_cache:+new Date},e),callback:"function"==typeof o?o:function(){}};r?n+=i.route:i.data.action="pum_analytics",n&&(s(t).on("error success load done",i.callback),t.src=n+"?"+s.param(i.data))}},void 0!==pum_vars.disable_tracking&&pum_vars.disable_tracking||s(document).on("pumAfterOpen.core_analytics",".pum",function(){var e=PUM.getPopup(this),o={pid:parseInt(e.popmake("getSettings").id,10)||null};0<o.pid&&!s("body").hasClass("single-popup")&&PUM_Analytics.beacon(o)})}(jQuery),function(n,e,r){"use strict";n.fn.popmake.methods.animate_overlay=function(e,o,t){return PUM.getPopup(this).popmake("getSettings").overlay_disabled?n.fn.popmake.overlay_animations.none.apply(this,[o,t]):n.fn.popmake.overlay_animations[e]?n.fn.popmake.overlay_animations[e].apply(this,[o,t]):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.methods.animate=function(e){return n.fn.popmake.animations[e]?n.fn.popmake.animations[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.animations={none:function(e){var o=PUM.getPopup(this);return o.popmake("getContainer").css({opacity:1,display:"block"}),o.popmake("animate_overlay","none",0,function(){e!==r&&e()}),this},slide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=n.animation_speed/2,s=e.popmake("animation_origin",n.animation_origin);return e.css({display:"block"}),t.css({display:"block"}).position(s).css({opacity:1}),e.popmake("animate_overlay","fade",i,function(){t.popmake("reposition",function(e){t.animate(e,i,"swing",function(){o!==r&&o()})})}),this},fade:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer").css({opacity:0,display:"block"}),n=o.popmake("getSettings").animation_speed/2;return o.popmake("animate_overlay","fade",n,function(){t.animate({opacity:1},n,"swing",function(){e!==r&&e()})}),this},fadeAndSlide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=n.animation_speed/2,s=e.popmake("animation_origin",n.animation_origin);return e.css({display:"block"}),t.css({display:"block"}).position(s),e.popmake("animate_overlay","fade",i,function(){t.popmake("reposition",function(e){t.css({opacity:0}),e.opacity=1,t.animate(e,i,"swing",function(){o!==r&&o()})})}),this},grow:function(e){return n.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(e){return n.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},n.fn.popmake.overlay_animations={none:function(e,o){PUM.getPopup(this).css({opacity:1,display:"block"}),"function"==typeof o&&o()},fade:function(e,o){PUM.getPopup(this).css({opacity:0,display:"block"}).animate({opacity:1},e,"swing",o)},slide:function(e,o){PUM.getPopup(this).slideDown(e,o)}}}(jQuery,document),function(e,o,t){"use strict";e(o).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(o,e,t){"use strict";o.fn.popmake.callbacks={reposition_using:function(e){o(this).css(e)}}}(jQuery,document),function(p,e,o){"use strict";var t,u=function(){return void 0===t&&(t="undefined"!=typeof MobileDetect?new MobileDetect(window.navigator.userAgent):{phone:function(){return!1},tablet:function(){return!1}}),t};p.extend(p.fn.popmake.methods,{checkConditions:function(){var e,o,t,n,i,s=PUM.getPopup(this),r=s.popmake("getSettings"),a=!0;if(r.disable_on_mobile&&u().phone())return!1;if(r.disable_on_tablet&&u().tablet())return!1;if(r.conditions.length)for(o=0;r.conditions.length>o;o++){for(n=r.conditions[o],e=!1,t=0;n.length>t&&(!(i=p.extend({},{not_operand:!1},n[t])).not_operand&&s.popmake("checkCondition",i)?e=!0:i.not_operand&&!s.popmake("checkCondition",i)&&(e=!0),p(this).trigger("pumCheckingCondition",[e,i]),!e);t++);e||(a=!1)}return a},checkCondition:function(e){var o=e.target||null;e.settings;return o?p.fn.popmake.conditions[o]?p.fn.popmake.conditions[o].apply(this,[e]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),p.fn.popmake.conditions={}}(jQuery,document),function(d){"use strict";d.extend(d.fn.popmake,{cookie:function(c){function m(e,o,t){var n,i=new Date;if("undefined"!=typeof document){if(1<arguments.length){switch(typeof(t=d.extend({path:pum_vars.home_url},m.defaults,t)).expires){case"number":i.setMilliseconds(i.getMilliseconds()+864e5*t.expires),t.expires=i;break;case"string":i.setTime(1e3*d.fn.popmake.utilities.strtotime("+"+t.expires)),t.expires=i}try{n=JSON.stringify(o),/^[\{\[]/.test(n)&&(o=n)}catch(e){}return o=c.write?c.write(o,e):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",o,t.expires?"; expires="+t.expires.toUTCString():"",t.path?"; path="+t.path:"",t.domain?"; domain="+t.domain:"",t.secure?"; secure":""].join("")}e||(n={});for(var s=document.cookie?document.cookie.split("; "):[],r=/(%[0-9A-Z]{2})+/g,a=0;a<s.length;a++){var p=s[a].split("="),u=p.slice(1).join("=");'"'===u.charAt(0)&&(u=u.slice(1,-1));try{var l=p[0].replace(r,decodeURIComponent);if(u=c.read?c.read(u,l):c(u,l)||u.replace(r,decodeURIComponent),this.json)try{u=JSON.parse(u)}catch(e){}if(e===l){n=u;break}e||(n[l]=u)}catch(e){}}return n}}return void 0===c&&(c=function(){}),(m.set=m).get=function(e){return m.call(m,e)},m.getJSON=function(){return m.apply({json:!0},[].slice.call(arguments))},m.defaults={},m.remove=function(e,o){m(e,"",d.extend({},o,{expires:-1,path:""})),m(e,"",d.extend({},o,{expires:-1}))},m.process=function(e,o,t,n){return 3<arguments.length&&"object"!=typeof t&&void 0!==o?m.apply(m,[e,o,{expires:t,path:n}]):m.apply(m,[].slice.call(arguments,[0,2]))},m.withConverter=d.fn.popmake.cookie,m}()}),pm_cookie=d.pm_cookie=d.fn.popmake.cookie.process,pm_cookie_json=d.pm_cookie_json=d.fn.popmake.cookie.getJSON,pm_remove_cookie=d.pm_remove_cookie=d.fn.popmake.cookie.remove}(jQuery),function(n,e,i){"use strict";n.extend(n.fn.popmake.methods,{addCookie:function(e){return pum.hooks.doAction("popmake.addCookie",arguments),n.fn.popmake.cookies[e]?n.fn.popmake.cookies[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+e+" does not exist."),this)},setCookie:function(e){n.pm_cookie(e.name,!0,e.session?null:e.time,e.path?pum_vars.home_url||"/":null),pum.hooks.doAction("popmake.setCookie",e)},checkCookies:function(e){var o,t=!1;if(e.cookie_name===i||null===e.cookie_name||""===e.cookie_name)return!1;switch(typeof e.cookie_name){case"object":case"array":for(o=0;e.cookie_name.length>o;o+=1)n.pm_cookie(e.cookie_name[o])!==i&&(t=!0);break;case"string":n.pm_cookie(e.cookie_name)!==i&&(t=!0)}return pum.hooks.doAction("popmake.checkCookies",e,t),t}}),n.fn.popmake.cookies=n.fn.popmake.cookies||{},n.extend(n.fn.popmake.cookies,{on_popup_open:function(e){var o=PUM.getPopup(this);o.on("pumAfterOpen",function(){o.popmake("setCookie",e)})},on_popup_close:function(e){var o=PUM.getPopup(this);o.on("pumBeforeClose",function(){o.popmake("setCookie",e)})},manual:function(e){var o=PUM.getPopup(this);o.on("pumSetCookie",function(){o.popmake("setCookie",e)})},form_success:function(e){var o=PUM.getPopup(this);o.on("pumFormSuccess",function(){o.popmake("setCookie",e)})},pum_sub_form_success:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},pum_sub_form_already_subscribed:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},ninja_form_success:function(e){return n.fn.popmake.cookies.form_success.apply(this,arguments)},cf7_form_success:function(e){return n.fn.popmake.cookies.form_success.apply(this,arguments)},gforms_form_success:function(e){return n.fn.popmake.cookies.form_success.apply(this,arguments)}}),n(e).on("pumInit",".pum",function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings").cookies||[],n=null;if(t.length)for(e=0;t.length>e;e+=1)n=t[e],o.popmake("addCookie",n.event,n.settings)})}(jQuery,document);var pum_debug,pum_debug_mode=!1;!function(r,e){if(e=window.pum_vars||{debug_mode:!1},(pum_debug_mode=void 0!==e.debug_mode&&e.debug_mode)||-1===window.location.href.indexOf("pum_debug")||(pum_debug_mode=!0),pum_debug_mode){var a=!1,t=!1,p=window.pum_debug_vars||{debug_mode_enabled:"Popup Maker: Debug Mode Enabled",debug_started_at:"Debug started at:",debug_more_info:"For more information on how to use this information visit https://docs.wppopupmaker.com/?utm_medium=js-debug-info&utm_campaign=ContextualHelp&utm_source=browser-console&utm_content=more-info",global_info:"Global Information",localized_vars:"Localized variables",popups_initializing:"Popups Initializing",popups_initialized:"Popups Initialized",single_popup_label:"Popup: #",theme_id:"Theme ID: ",label_method_call:"Method Call:",label_method_args:"Method Arguments:",label_popup_settings:"Settings",label_triggers:"Triggers",label_cookies:"Cookies",label_delay:"Delay:",label_conditions:"Conditions",label_cookie:"Cookie:",label_settings:"Settings:",label_selector:"Selector:",label_mobile_disabled:"Mobile Disabled:",label_tablet_disabled:"Tablet Disabled:",label_event:"Event: %s",triggers:[],cookies:[]};pum_debug={odump:function(e){return r.extend({},e)},logo:function(){console.log(" -------------------------------------------------------------\n| ____ __ __ _ |\n| | _ \\ ___ _ __ _ _ _ __ | \\/ | __ _| | _____ _ __ |\n| | |_) / _ \\| '_ \\| | | | '_ \\ | |\\/| |/ _` | |/ / _ \\ '__| |\n| | __/ (_) | |_) | |_| | |_) | | | | | (_| | < __/ | |\n| |_| \\___/| .__/ \\__,_| .__/ |_| |_|\\__,_|_|\\_\\___|_| |\n| |_| |_| |\n -------------------------------------------------------------")},initialize:function(){a=!0,pum_debug.logo(),console.debug(p.debug_mode_enabled),console.log(p.debug_started_at,new Date),console.info(p.debug_more_info),pum_debug.divider(p.global_info),console.groupCollapsed(p.localized_vars),console.log("pum_vars:",pum_debug.odump(e)),r(document).trigger("pum_debug_initialize_localized_vars"),console.groupEnd(),r(document).trigger("pum_debug_initialize")},popup_event_header:function(e){var o=e.popmake("getSettings");t!==o.id&&(t=o.id,pum_debug.divider(p.single_popup_label+o.id+" - "+o.slug))},divider:function(e){var o=62,t=0,n=" "+new Array(63).join("-")+" ";"string"==typeof e?(o=62-e.length,(t={left:Math.floor(o/2),right:Math.floor(o/2)}).left+t.right===o-1&&t.right++,t.left=new Array(t.left+1).join(" "),t.right=new Array(t.right+1).join(" "),console.log(n+"\n|"+t.left+e+t.right+"|\n"+n)):console.log(n)},click_trigger:function(e,o){var t,n=e.popmake("getSettings"),i=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&i.push(o.extra_selectors),t=(i=pum.hooks.applyFilters("pum.trigger.click_open.selectors",i,o,e)).join(", "),console.log(p.label_selector,t)},trigger:function(e,o){if("string"==typeof p.triggers[o.type]){switch(console.groupCollapsed(p.triggers[o.type]),o.type){case"auto_open":console.log(p.label_delay,o.settings.delay),console.log(p.label_cookie,o.settings.cookie_name);break;case"click_open":pum_debug.click_trigger(e,o.settings),console.log(p.label_cookie,o.settings.cookie_name)}r(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}},cookie:function(e,o){if("string"==typeof p.cookies[o.event]){switch(console.groupCollapsed(p.cookies[o.event]),o.event){case"on_popup_open":case"on_popup_close":case"manual":case"ninja_form_success":console.log(p.label_cookie,pum_debug.odump(o.settings))}r(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}}},r(document).on("pumInit",".pum",function(){var e=PUM.getPopup(r(this)),o=e.popmake("getSettings"),t=o.triggers||[],n=o.cookies||[],i=o.conditions||[],s=0;if(a||(pum_debug.initialize(),pum_debug.divider(p.popups_initializing)),console.groupCollapsed(p.single_popup_label+o.id+" - "+o.slug),console.log(p.theme_id,o.theme_id),t.length){for(console.groupCollapsed(p.label_triggers),s=0;t.length>s;s++)pum_debug.trigger(e,t[s]);console.groupEnd()}if(n.length){for(console.groupCollapsed(p.label_cookies),s=0;n.length>s;s+=1)pum_debug.cookie(e,n[s]);console.groupEnd()}i.length&&(console.groupCollapsed(p.label_conditions),console.log(i),console.groupEnd()),console.groupCollapsed(p.label_popup_settings),console.log(p.label_mobile_disabled,!1!==o.disable_on_mobile),console.log(p.label_tablet_disabled,!1!==o.disable_on_tablet),console.log(p.label_display_settings,pum_debug.odump(o)),e.trigger("pum_debug_popup_settings"),console.groupEnd(),console.groupEnd()}).on("pumBeforeOpen",".pum",function(){var e=PUM.getPopup(r(this)),o=r.fn.popmake.last_open_trigger;pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeOpen"));try{o=(o=r(r.fn.popmake.last_open_trigger)).length?o:r.fn.popmake.last_open_trigger.toString()}catch(e){o=""}finally{console.log(p.label_triggers,[o])}console.groupEnd()}).on("pumOpenPrevented",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumOpenPrevented")),console.groupEnd()}).on("pumAfterOpen",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterOpen")),console.groupEnd()}).on("pumSetupClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumSetupClose")),console.groupEnd()}).on("pumClosePrevented",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumClosePrevented")),console.groupEnd()}).on("pumBeforeClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeClose")),console.groupEnd()}).on("pumAfterClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterClose")),console.groupEnd()}).on("pumBeforeReposition",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeReposition")),console.groupEnd()}).on("pumAfterReposition",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterReposition")),console.groupEnd()}).on("pumCheckingCondition",".pum",function(e,o,t){var n=PUM.getPopup(r(this));pum_debug.popup_event_header(n),console.groupCollapsed(p.label_event.replace("%s","pumCheckingCondition")),console.log((t.not_operand?"(!) ":"")+t.target+": "+o,t),console.groupEnd()})}}(jQuery),function(e,o,t){"use strict";e.fn.popmake.defaults={id:null,slug:"",theme_id:null,cookies:[],triggers:[],conditions:[],mobile_disabled:null,tablet_disabled:null,custom_height_auto:!1,scrollable_content:!1,position_from_trigger:!1,position_fixed:!1,overlay_disabled:!1,stackable:!1,disable_reposition:!1,close_on_overlay_click:!1,close_on_esc_press:!1,close_on_f4_press:!1,disable_on_mobile:!1,disable_on_tablet:!1,size:"medium",responsive_min_width:"0%",responsive_max_width:"100%",custom_width:"640px",custom_height:"380px",animation_type:"fade",animation_speed:"350",animation_origin:"center top",location:"center top",position_top:"100",position_bottom:"0",position_left:"0",position_right:"0",zindex:"1999999999",close_button_delay:"0",meta:{display:{stackable:!1,overlay_disabled:!1,size:"medium",responsive_max_width:"100",responsive_max_width_unit:"%",responsive_min_width:"0",responsive_min_width_unit:"%",custom_width:"640",custom_width_unit:"px",custom_height:"380",custom_height_unit:"px",custom_height_auto:!1,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:!1,animation_type:"fade",animation_speed:350,animation_origin:"center top",scrollable_content:!1,disable_reposition:!1,position_from_trigger:!1,overlay_zindex:!1,zindex:"1999999999"},close:{overlay_click:!1,esc_press:!1,f4_press:!1,text:"",button_delay:0},click_open:[]},container:{active_class:"active",attr:{class:"popmake"}},title:{attr:{class:"popmake-title"}},content:{attr:{class:"popmake-content"}},close:{close_speed:0,attr:{class:"popmake-close"}},overlay:{attr:{id:"popmake-overlay",class:"popmake-overlay"}}}}(jQuery,document),function(s){"use strict";var r={openpopup:!1,openpopup_id:0,closepopup:!1,closedelay:0,redirect_enabled:!1,redirect:"",cookie:!1};window.PUM=window.PUM||{},window.PUM.forms=window.PUM.forms||{},s.extend(window.PUM.forms,{form:{validation:{errors:[]},responseHandler:function(e,o){var t=o.data;o.success?window.PUM.forms.form.success(e,t):window.PUM.forms.form.errors(e,t)},display_errors:function(e,o){window.PUM.forms.messages.add(e,o||this.validation.errors,"error")},beforeAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");window.PUM.forms.messages.clear_all(e),t.length||(t=s('<span class="pum-form__loader"></span>'),""!==o.attr("value")?t.insertAfter(o):o.append(t)),o.prop("disabled",!0),t.show(),e.addClass("pum-form--loading").removeClass("pum-form--errors")},afterAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");o.prop("disabled",!1),t.hide(),e.removeClass("pum-form--loading")},success:function(e,o){void 0!==o.message&&""!==o.message&&window.PUM.forms.messages.add(e,[{message:o.message}]),e.trigger("success",[o]),!e.data("noredirect")&&void 0!==e.data("redirect_enabled")&&o.redirect&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))},errors:function(e,o){void 0!==o.errors&&o.errors.length&&(console.log(o.errors),window.PUM.forms.form.display_errors(e,o.errors),window.PUM.forms.messages.scroll_to_first(e),e.addClass("pum-form--errors").trigger("errors",[o]))},submit:function(e){var o=s(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.forms.form.beforeAjax(o),s.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_form",values:t}}).always(function(){window.PUM.forms.form.afterAjax(o)}).done(function(e){window.PUM.forms.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}},messages:{add:function(e,o,t){var n=e.find(".pum-form__messages"),i=0;if(t=t||"success",o=o||[],!n.length)switch(n=s('<div class="pum-form__messages">').hide(),pum_vars.message_position){case"bottom":e.append(n.addClass("pum-form__messages--bottom"));break;case"top":e.prepend(n.addClass("pum-form__messages--top"))}if(0<=["bottom","top"].indexOf(pum_vars.message_position))for(;o.length>i;i++)this.add_message(n,o[i].message,t);else for(;o.length>i;i++)void 0!==o[i].field?this.add_field_error(e,o[i]):this.add_message(n,o[i].message,t);n.is(":hidden")&&s(".pum-form__message",n).length&&n.slideDown()},add_message:function(e,o,t){var n=s('<p class="pum-form__message">').html(o);t=t||"success",n.addClass("pum-form__message--"+t),e.append(n),e.is(":visible")&&n.hide().slideDown()},add_field_error:function(e,o){var t=s('[name="'+o.field+'"]',e).parents(".pum-form__field").addClass("pum-form__field--error");this.add_message(t,o.message,"error")},clear_all:function(e,o){var t=e.find(".pum-form__messages"),n=t.find(".pum-form__message"),i=e.find(".pum-form__field.pum-form__field--error");o=o||!1,t.length&&n.slideUp("fast",function(){s(this).remove(),o&&t.hide()}),i.length&&i.removeClass("pum-form__field--error").find("p.pum-form__message").remove()},scroll_to_first:function(e){window.PUM.utilities.scrollTo(s(".pum-form__field.pum-form__field--error",e).eq(0))}},success:function(e,o){if(o=s.extend({},r,o)){var t=PUM.getPopup(e),n={},i=function(){o.openpopup&&PUM.getPopup(o.openpopup_id).length?PUM.open(o.openpopup_id):o.redirect_enabled&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))};t.length&&(t.trigger("pumFormSuccess"),o.cookie&&(n=s.extend({name:"pum-"+PUM.getSetting(t,"id"),expires:"+1 year"},"object"==typeof o.cookie?o.cookie:{}),PUM.setCookie(t,n))),t.length&&o.closepopup?setTimeout(function(){t.popmake("close",i)},1e3*parseInt(o.closedelay)):i()}}})}(jQuery),function(e,o){"use strict";e.pum=e.pum||{},e.pum.hooks=e.pum.hooks||new function(){var t=Array.prototype.slice,i={removeFilter:function(e,o){return"string"==typeof e&&n("filters",e,o),i},applyFilters:function(){var e=t.call(arguments),o=e.shift();return"string"!=typeof o?i:r("filters",o,e)},addFilter:function(e,o,t,n){return"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),s("filters",e,o,t,n)),i},removeAction:function(e,o){return"string"==typeof e&&n("actions",e,o),i},doAction:function(){var e=t.call(arguments),o=e.shift();return"string"==typeof o&&r("actions",o,e),i},addAction:function(e,o,t,n){return"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),s("actions",e,o,t,n)),i}},a={actions:{},filters:{}};function n(e,o,t,n){var i,s,r;if(a[e][o])if(t)if(i=a[e][o],n)for(r=i.length;r--;)(s=i[r]).callback===t&&s.context===n&&i.splice(r,1);else for(r=i.length;r--;)i[r].callback===t&&i.splice(r,1);else a[e][o]=[]}function s(e,o,t,n,i){var s={callback:t,priority:n,context:i},r=a[e][o];r=r?(r.push(s),function(e){for(var o,t,n,i=1,s=e.length;i<s;i++){for(o=e[i],t=i;(n=e[t-1])&&n.priority>o.priority;)e[t]=e[t-1],--t;e[t]=o}return e}(r)):[s],a[e][o]=r}function r(e,o,t){var n,i,s=a[e][o];if(!s)return"filters"===e&&t[0];if(i=s.length,"filters"===e)for(n=0;n<i;n++)t[0]=s[n].callback.apply(s[n].context,t);else for(n=0;n<i;n++)s[n].callback.apply(s[n].context,t);return"filters"!==e||t[0]}return i}}(window),function(r){"use strict";var i={},e=!1;r(document).ready(function(){!1===e&&"undefined"!=typeof Marionette&&"undefined"!=typeof nfRadio&&(e=Marionette.Object.extend({initialize:function(){this.listenTo(nfRadio.channel("forms"),"submit:response",this.popupMaker)},popupMaker:function(e,o,t,n){var i=r("#nf-form-"+n+"-cont"),s={};e.errors.length||(void 0!==e.data.actions&&(s.openpopup=void 0!==e.data.actions.openpopup,s.openpopup_id=s.openpopup?parseInt(e.data.actions.openpopup):0,s.closepopup=void 0!==e.data.actions.closepopup,s.closedelay=s.closepopup?parseInt(e.data.actions.closepopup):0,s.closepopup&&e.data.actions.closedelay&&(s.closedelay=parseInt(e.data.actions.closedelay))),window.PUM.forms.success(i,s))}})),!1!==e&&new e,r(".gform_wrapper > form").each(function(){var e=r(this),o=e.attr("id").replace("gform_",""),t=e.find("input.gforms-pum"),n=!!t.length&&JSON.parse(t.val());n&&"object"==typeof n&&("object"==typeof n&&void 0!==n.closedelay&&3<=n.closedelay.toString().length&&(n.closedelay=n.closedelay/1e3),i[o]=n)})}).on("gform_confirmation_loaded",function(e,o){var t=r("#gform_confirmation_wrapper_"+o+",#gforms_confirmation_message_"+o),n=i[o]||!1;window.PUM.forms.success(t,n)}).on("wpcf7:mailsent",".wpcf7",function(e){var o=r(e.target),t=o.find("input.wpcf7-pum"),n=!!t.length&&JSON.parse(t.val());"object"==typeof n&&void 0!==n.closedelay&&3<=n.closedelay.toString().length&&(n.closedelay=n.closedelay/1e3),window.PUM.forms.success(o,n)})}(jQuery),function(i){"use strict";pum_vars&&void 0!==pum_vars.core_sub_forms_enabled&&!pum_vars.core_sub_forms_enabled||(window.PUM=window.PUM||{},window.PUM.newsletter=window.PUM.newsletter||{},i.extend(window.PUM.newsletter,{form:i.extend({},window.PUM.forms.form,{submit:function(e){var o=i(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.newsletter.form.beforeAjax(o),i.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_sub_form",values:t}}).always(function(){window.PUM.newsletter.form.afterAjax(o)}).done(function(e){window.PUM.newsletter.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}})}),i(document).on("submit","form.pum-sub-form",window.PUM.newsletter.form.submit).on("success","form.pum-sub-form",function(e,o){var t=i(e.target),n=t.data("settings")||{};t.trigger("pumNewsletterSuccess",[o]).addClass("pum-newsletter-success"),t[0].reset(),window.pum.hooks.doAction("pum-sub-form.success",o,t),"string"==typeof n.redirect&&""!==n.redirect&&(n.redirect=atob(n.redirect)),window.PUM.forms.success(t,n)}).on("error","form.pum-sub-form",function(e,o){var t=i(e.target);t.trigger("pumNewsletterError",[o]),window.pum.hooks.doAction("pum-sub-form.errors",o,t)}))}(jQuery),function(s,r,e){"use strict";s.extend(s.fn.popmake.methods,{addTrigger:function(e){return s.fn.popmake.triggers[e]?s.fn.popmake.triggers[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+e+" does not exist."),this)}}),s.fn.popmake.triggers={auto_open:function(e){var o=PUM.getPopup(this);setTimeout(function(){o.popmake("state","isOpen")||!o.popmake("checkCookies",e)&&o.popmake("checkConditions")&&(s.fn.popmake.last_open_trigger="Auto Open - Delay: "+e.delay,o.popmake("open"))},e.delay)},click_open:function(n){var e,i=PUM.getPopup(this),o=i.popmake("getSettings"),t=[".popmake-"+o.id,".popmake-"+decodeURIComponent(o.slug),'a[href$="#popmake-'+o.id+'"]'];n.extra_selectors&&""!==n.extra_selectors&&t.push(n.extra_selectors),e=(t=pum.hooks.applyFilters("pum.trigger.click_open.selectors",t,n,i)).join(", "),s(e).addClass("pum-trigger").css({cursor:"pointer"}),s(r).on("click.pumTrigger",e,function(e){var o=s(this),t=n.do_default||!1;0<i.has(o).length||i.popmake("state","isOpen")||!i.popmake("checkCookies",n)&&i.popmake("checkConditions")&&(o.data("do-default")?t=o.data("do-default"):(o.hasClass("do-default")||o.hasClass("popmake-do-default")||o.hasClass("pum-do-default"))&&(t=!0),e.ctrlKey||pum.hooks.applyFilters("pum.trigger.click_open.do_default",t,i,o)||(e.preventDefault(),e.stopPropagation()),s.fn.popmake.last_open_trigger=o,i.popmake("open"))})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},s(r).on("pumInit",".pum",function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings").triggers||[],n=null;if(t.length)for(e=0;t.length>e;e+=1)n=t[e],o.popmake("addTrigger",n.type,n.settings)})}(jQuery,document),function(p,e,o){"use strict";var n="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),i="select,textarea".split(","),s=/\[([^\]]*)\]/g;Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null==this)throw new TypeError;var o=Object(this),t=o.length>>>0;if(0==t)return-1;var n=0;if(0<arguments.length&&((n=Number(arguments[1]))!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(0<n||-1)*Math.floor(Math.abs(n)))),t<=n)return-1;for(var i=0<=n?n:Math.max(t-Math.abs(n),0);i<t;i++)if(i in o&&o[i]===e)return i;return-1}),p.fn.popmake.utilities={scrollTo:function(e,o){var t=p(e)||p();t.length&&p("html, body").animate({scrollTop:t.offset().top-100},1e3,"swing",function(){var e=t.find(':input:not([type="button"]):not([type="hidden"]):not(button)').eq(0);e.hasClass("wp-editor-area")?tinyMCE.execCommand("mceFocus",!1,e.attr("id")):e.focus(),"function"==typeof o&&o()})},inArray:function(e,o){return!!~o.indexOf(e)},convert_hex:function(e,o){return e=e.replace("#",""),"rgba("+parseInt(e.substring(0,2),16)+","+parseInt(e.substring(2,4),16)+","+parseInt(e.substring(4,6),16)+","+o/100+")"},debounce:function(t,n){var i;return function(){var e=this,o=arguments;window.clearTimeout(i),i=window.setTimeout(function(){t.apply(e,o)},n)}},throttle:function(e,o){var t=!1,n=function(){t=!1};return function(){t||(e.apply(this,arguments),window.setTimeout(n,o),t=!0)}},getXPath:function(e){var t,n,i,s,r,a=[];return p.each(p(e).parents(),function(e,o){if(t=p(o),n=t.attr("id")||"",i=t.attr("class")||"",s=t.get(0).tagName.toLowerCase(),r=t.parent().children(s).index(t),"body"===s)return!1;0<i.length&&(i=(i=i.split(" "))[0]),a.push(s+(0<n.length?"#"+n:0<i.length?"."+i.split(" ").join("."):":eq("+r+")"))}),a.reverse().join(" > ")},strtotime:function(e,o){var t,n,i,s,r,a,p,u,l,c;if(!e)return!1;if((n=(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase()).match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return!(12<n[1]||31<n[3])&&new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return!(12<n[3]||31<n[5]||n[1]<70&&38<n[1])&&(s=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(s,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return!(12<n[1]||31<n[3]||n[5]<70&&38<n[5])&&(s=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(s,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return!(23<n[1]||59<n[3]||59<n[5])&&(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===o||isNaN(o)?(new Date).getTime()/1e3||0:o||0;if(t=Date.parse(e),!isNaN(t))return t/1e3||0;function m(e){var o=e.split(" "),t=o[0],n=o[1].substring(0,3),i=/\d+/.test(t),s=("last"===t?-1:1)*("ago"===o[2]?-1:1);if(i&&(s*=parseInt(t,10)),p.hasOwnProperty(n)&&!o[1].match(/^mon(day|\.)?$/i))return r["set"+p[n]](r["get"+p[n]]()+s);if("wee"===n)return r.setDate(r.getDate()+7*s);if("next"===t||"last"===t)!function(e,o,t){var n,i=a[o];void 0!==i&&(0==(n=i-r.getDay())?n=7*t:0<n&&"last"===e?n-=7:n<0&&"next"===e&&(n+=7),r.setDate(r.getDate()+n))}(t,n,s);else if(!i)return!1;return!0}if(r=o?new Date(1e3*o):new Date,a={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},p={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},"([+-]?\\d+\\s"+(l="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)")+"|(last|next)\\s"+l+")(\\sago)?",!(n=e.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(c=0,u=n.length;c<u;c+=1)if(!m(n[c]))return!1;return r.getTime()/1e3},serializeObject:function(e){p.extend({},e);var o={},t=p.extend(!0,{include:[],exclude:[],includeByClass:""},e);return this.find(":input").each(function(){var e;!this.name||this.disabled||window.PUM.utilities.inArray(this.name,t.exclude)||t.include.length&&!window.PUM.utilities.inArray(this.name,t.include)||-1===this.className.indexOf(t.includeByClass)||(e=this.name.replace(s,"[$1").split("["))[0]&&(this.checked||window.PUM.utilities.inArray(this.type,n)||window.PUM.utilities.inArray(this.nodeName.toLowerCase(),i))&&("checkbox"===this.type&&e.push(""),function e(o,t,n){var i=t[0];1<t.length?(o[i]||(o[i]=t[1]?{}:[]),e(o[i],t.slice(1),n)):(i||(i=o.length),o[i]=n)}(o,e,p(this).val()))}),o}},p.fn.popmake.utilies=p.fn.popmake.utilities,window.PUM=window.PUM||{},window.PUM.utilities=window.PUM.utilities||{},window.PUM.utilities=p.extend(window.PUM.utilities,p.fn.popmake.utilities)}(jQuery,document),function(e,t){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(e,o){return t(e,o)});else if("undefined"!=typeof exports){var o=require("jquery");t(exports,o)}else t(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,a){var p={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 o(n,t){var i={},s={};function r(e,o,t){return e[o]=t,e}function e(){return i}this.addPair=function(e){if(!p.validate.test(e.name))return this;var o=function(e,o){var t,n,i=e.match(p.key);try{o=JSON.parse(o)}catch(e){}for(;void 0!==(t=i.pop());)p.push.test(t)?o=r([],(n=e.replace(/\[\]$/,""),void 0===s[n]&&(s[n]=0),s[n]++),o):p.fixed.test(t)?o=r([],t,o):p.named.test(t)&&(o=r({},t,o));return o}(e.name,function(e){switch(a('[name="'+e.name+'"]',t).attr("type")){case"checkbox":return"1"===e.value||e.value;default:return e.value}}(e));return i=n.extend(!0,i,o),this},this.addPairs=function(e){if(!n.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var o=0,t=e.length;o<t;o++)this.addPair(e[o]);return this},this.serialize=e,this.serializeJSON=function(){return JSON.stringify(e())}}return o.patterns=p,o.serializeObject=function(){var e;return e=this.is("form")?this.serializeArray():this.find(":input").serializeArray(),new o(a,this).addPairs(e).serialize()},o.serializeJSON=function(){var e;return e=this.is("form")?this.serializeArray():this.find(":input").serializeArray(),new o(a,this).addPairs(e).serializeJSON()},void 0!==a.fn&&(a.fn.pumSerializeObject=o.serializeObject,a.fn.pumSerializeJSON=o.serializeJSON),e.FormSerializer=o}),function(e,o,t){"use strict";e.fn.popmake.version=1.8,e.fn.popmake.last_open_popup=null,e(void 0).ready(function(){e(".pum").popmake(),e(void 0).trigger("pumInitialized"),"object"==typeof pum_vars.form_success&&(pum_vars.form_success=e.extend({popup_id:null,settings:{}}),PUM.forms.success(pum_vars.form_success.popup_id,pum_vars.form_success.settings))}),e(".pum").on("pumInit",function(){var e=PUM.getPopup(this),o=PUM.getSetting(e,"id"),t=e.find("form");t.length&&t.append('<input type="hidden" name="pum_form_popup_id" value="'+o+'" />')})}(jQuery);
1
+ var PUM,PUM_Accessibility,PUM_Analytics,pm_cookie,pm_cookie_json,pm_remove_cookie;!function(s){"use strict";void 0===s.fn.on&&(s.fn.on=function(e,o,t){return this.delegate(o,e,t)}),void 0===s.fn.off&&(s.fn.off=function(e,o,t){return this.undelegate(o,e,t)}),void 0===s.fn.bindFirst&&(s.fn.bindFirst=function(e,o){var t,n,i=s(this);i.unbind(e,o),i.bind(e,o),(n=(t=s._data(i[0]).events)[e]).unshift(n.pop()),t[e]=n}),void 0===s.fn.outerHtml&&(s.fn.outerHtml=function(){var e=s(this).clone();return s("<div/>").append(e).html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery),function(p,s,r){"use strict";window.pum_vars=window.pum_vars||{default_theme:"0",home_url:"/",version:1.7,ajaxurl:"",restapi:!1,rest_nonce:null,debug_mode:!1,disable_tracking:!0,message_position:"top",core_sub_forms_enabled:!0,popups:{}},window.pum_popups=window.pum_popups||{},window.pum_vars.popups=window.pum_popups,PUM={get:new function(){var i={},e=function(e,o,t){"boolean"==typeof o&&(t=o,o=!1);var n=o?o.selector+" "+e:e;return(r===i[n]||t)&&(i[n]=o?o.find(e):jQuery(e)),i[n]};return e.elementCache=i,e},getPopup:function(e){var o;return(o=function(e){return!isNaN(e)&&parseInt(Number(e))===parseInt(e)&&!isNaN(parseInt(e,10))}(e)?PUM.get("#pum-"+e):"current"===e?PUM.get(".pum-overlay.pum-active:eq(0)",!0):"open"===e?PUM.get(".pum-overlay.pum-active",!0):"closed"===e?PUM.get(".pum-overlay:not(.pum-active)",!0):e instanceof jQuery?e:p(e)).hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):p()},open:function(e,o){PUM.getPopup(e).popmake("open",o)},close:function(e,o){PUM.getPopup(e).popmake("close",o)},preventOpen:function(e){PUM.getPopup(e).addClass("preventOpen")},getSettings:function(e){return PUM.getPopup(e).popmake("getSettings")},getSetting:function(e,o,t){var n=function(e,o){function t(e,o,t){return o?e[o.slice(0,t?-1:o.length)]:e}return o.split(".").reduce(function(e,o){return o?o.split("[").reduce(t,e):e},e)}(PUM.getSettings(e),o);return void 0!==n?n:t!==r?t:null},checkConditions:function(e){return PUM.getPopup(e).popmake("checkConditions")},getCookie:function(e){return p.pm_cookie(e)},getJSONCookie:function(e){return p.pm_cookie_json(e)},setCookie:function(e,o){PUM.getPopup(e).popmake("setCookie",jQuery.extend({name:"pum-"+PUM.getSetting(e,"id"),expires:"+30 days"},o))},clearCookie:function(e,o){p.pm_remove_cookie(e),"function"==typeof o&&o()},clearCookies:function(e,o){var t,n=PUM.getPopup(e).popmake("getSettings").cookies;if(n!==r&&n.length)for(t=0;n.length>t;t+=1)p.pm_remove_cookie(n[t].settings.name);"function"==typeof o&&o()},getClickTriggerSelector:function(e,o){var t=PUM.getPopup(e),n=PUM.getSettings(e),i=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];return o.extra_selectors&&""!==o.extra_selectors&&i.push(o.extra_selectors),(i=pum.hooks.applyFilters("pum.trigger.click_open.selectors",i,o,t)).join(", ")},disableClickTriggers:function(e,o){if(e!==r)if(o!==r){var t=PUM.getClickTriggerSelector(e,o);p(t).removeClass("pum-trigger"),p(s).off("click.pumTrigger click.popmakeOpen",t)}else{var n=PUM.getSetting(e,"triggers",[]);if(n.length)for(var i=0;n.length>i;i++)if(-1!==pum.hooks.applyFilters("pum.disableClickTriggers.clickTriggerTypes",["click_open"]).indexOf(n[i].type)){t=PUM.getClickTriggerSelector(e,n[i].settings);p(t).removeClass("pum-trigger"),p(s).off("click.pumTrigger click.popmakeOpen",t)}}}},p.fn.popmake=function(e){return p.fn.popmake.methods[e]?(p(s).trigger("pumMethodCall",arguments),p.fn.popmake.methods[e].apply(this,Array.prototype.slice.call(arguments,1))):"object"!=typeof e&&e?void(window.console&&console.warn("Method "+e+" does not exist on $.fn.popmake")):p.fn.popmake.methods.init.apply(this,arguments)},p.fn.popmake.methods={init:function(){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getSettings");return o.theme_id<=0&&(o.theme_id=pum_vars.default_theme),o.disable_reposition!==r&&o.disable_reposition||p(window).on("resize",function(){(e.hasClass("pum-active")||e.find(".popmake.active").length)&&p.fn.popmake.utilities.throttle(setTimeout(function(){e.popmake("reposition")},25),500,!1)}),e.find(".pum-container").data("popmake",o),e.data("popmake",o).trigger("pumInit"),this})},getOverlay:function(){return PUM.getPopup(this)},getContainer:function(){return PUM.getPopup(this).find(".pum-container")},getTitle:function(){return PUM.getPopup(this).find(".pum-title")||null},getContent:function(){return PUM.getPopup(this).find(".pum-content")||null},getClose:function(){return PUM.getPopup(this).find(".pum-content + .pum-close")||null},getSettings:function(){var e=PUM.getPopup(this);return p.extend(!0,{},p.fn.popmake.defaults,e.data("popmake")||{},"object"==typeof pum_popups&&void 0!==pum_popups[e.attr("id")]?pum_popups[e.attr("id")]:{})},state:function(e){var o=PUM.getPopup(this);if(r!==e)switch(e){case"isOpen":return o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active");case"isClosed":return!o.hasClass("pum-open")&&!o.popmake("getContainer").hasClass("active")}},open:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getClose"),i=o.popmake("getSettings"),s=p("html");return o.trigger("pumBeforeOpen"),o.hasClass("preventOpen")||t.hasClass("preventOpen")?(console.log("prevented"),o.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented")):(i.stackable||o.popmake("close_all"),o.addClass("pum-active"),0<i.close_button_delay&&n.fadeOut(0),s.addClass("pum-open"),i.overlay_disabled?s.addClass("pum-open-overlay-disabled"):s.addClass("pum-open-overlay"),i.position_fixed?s.addClass("pum-open-fixed"):s.addClass("pum-open-scrollable"),o.popmake("setup_close").popmake("reposition").popmake("animate",i.animation_type,function(){0<i.close_button_delay&&setTimeout(function(){n.fadeIn()},i.close_button_delay),o.trigger("pumAfterOpen"),p(window).trigger("resize"),p.fn.popmake.last_open_popup=o,e!==r&&e()})),this},setup_close:function(){var t=PUM.getPopup(this),e=t.popmake("getClose"),o=t.popmake("getSettings");return(e=e.add(p(".popmake-close, .pum-close",t).not(e))).off("click.pum").on("click.pum",function(e){var o=p(this);o.hasClass("pum-do-default")||o.data("do-default")!==r&&o.data("do-default")||e.preventDefault(),p.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(o.close_on_esc_press||o.close_on_f4_press)&&p(window).off("keyup.popmake").on("keyup.popmake",function(e){27===e.keyCode&&o.close_on_esc_press&&(p.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===e.keyCode&&o.close_on_f4_press&&(p.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),o.close_on_overlay_click&&(t.on("pumAfterOpen",function(){p(s).on("click.pumCloseOverlay",function(e){p(e.target).closest(".pum-container").length||(p.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))})}),t.on("pumAfterClose",function(){p(s).off("click.pumCloseOverlay")})),t.trigger("pumSetupClose"),this},close:function(n){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getContainer"),t=e.popmake("getClose");return t=t.add(p(".popmake-close, .pum-close",e).not(t)),e.trigger("pumBeforeClose"),e.hasClass("preventClose")||o.hasClass("preventClose")?e.removeClass("preventClose").trigger("pumClosePrevented"):o.fadeOut("fast",function(){e.is(":visible")&&e.fadeOut("fast"),p(window).off("keyup.popmake"),e.off("click.popmake"),t.off("click.popmake"),1===p(".pum-active").length&&p("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),e.removeClass("pum-active").trigger("pumAfterClose"),o.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var e=p(this),o=e.attr("src"),t=o.replace("autoplay=1","1=1");t!==o&&(o=t),e.prop("src",o)}),o.find("video").each(function(){this.pause()}),n!==r&&n()}),this})},close_all:function(){return p(".pum-active").popmake("close"),this},reposition:function(e){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),t=o.popmake("getContainer"),n=o.popmake("getSettings"),i=n.location,s={my:"",at:"",of:window,collision:"none",using:"function"==typeof e?e:p.fn.popmake.callbacks.reposition_using},r={overlay:null,container:null},a=null;try{a=p(p.fn.popmake.last_open_trigger)}catch(e){a=p()}return n.position_from_trigger&&a.length?(s.of=a,0<=i.indexOf("left")&&(s.my+=" right",s.at+=" left"+(0!==n.position_left?"-"+n.position_left:"")),0<=i.indexOf("right")&&(s.my+=" left",s.at+=" right"+(0!==n.position_right?"+"+n.position_right:"")),0<=i.indexOf("center")&&(s.my="center"===i?"center":s.my+" center",s.at="center"===i?"center":s.at+" center"),0<=i.indexOf("top")&&(s.my+=" bottom",s.at+=" top"+(0!==n.position_top?"-"+n.position_top:"")),0<=i.indexOf("bottom")&&(s.my+=" top",s.at+=" bottom"+(0!==n.position_bottom?"+"+n.position_bottom:""))):(0<=i.indexOf("left")&&(s.my+=" left"+(0!==n.position_left?"+"+n.position_left:""),s.at+=" left"),0<=i.indexOf("right")&&(s.my+=" right"+(0!==n.position_right?"-"+n.position_right:""),s.at+=" right"),0<=i.indexOf("center")&&(s.my="center"===i?"center":s.my+" center",s.at="center"===i?"center":s.at+" center"),0<=i.indexOf("top")&&(s.my+=" top"+(0!==n.position_top?"+"+(p("body").hasClass("admin-bar")?parseInt(n.position_top,10)+32:n.position_top):""),s.at+=" top"),0<=i.indexOf("bottom")&&(s.my+=" bottom"+(0!==n.position_bottom?"-"+n.position_bottom:""),s.at+=" bottom")),s.my=p.trim(s.my),s.at=p.trim(s.at),o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show(0)),t.is(":hidden")&&(r.container=t.css("opacity"),t.css({opacity:0}).show(0)),n.position_fixed&&t.addClass("fixed"),"custom"===n.size?t.css({width:n.custom_width,height:n.custom_height_auto?"auto":n.custom_height}):"auto"!==n.size&&t.addClass("responsive").css({minWidth:""!==n.responsive_min_width?n.responsive_min_width:"auto",maxWidth:""!==n.responsive_max_width?n.responsive_max_width:"auto"}),o.trigger("pumAfterReposition"),t.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(0),r.container&&t.css({opacity:r.container}).hide(0),this},animation_origin:function(e){var o=PUM.getPopup(this).popmake("getContainer"),t={my:"",at:""};switch(e){case"top":t={my:"left+"+o.offset().left+" bottom-100",at:"left top"};break;case"bottom":t={my:"left+"+o.offset().left+" top+100",at:"left bottom"};break;case"left":t={my:"right top+"+o.offset().top,at:"left top"};break;case"right":t={my:"left top+"+o.offset().top,at:"right top"};break;default:0<=e.indexOf("left")&&(t={my:t.my+" right",at:t.at+" left"}),0<=e.indexOf("right")&&(t={my:t.my+" left",at:t.at+" right"}),0<=e.indexOf("center")&&(t={my:t.my+" center",at:t.at+" center"}),0<=e.indexOf("top")&&(t={my:t.my+" bottom-100",at:t.at+" top"}),0<=e.indexOf("bottom")&&(t={my:t.my+" top+100",at:t.at+" bottom"}),t.my=p.trim(t.my),t.at=p.trim(t.at)}return t.of=window,t.collision="none",t}}}(jQuery,document),function(s,t,e){"use strict";var n,i,r,a="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",o=".pum:not(.pum-accessibility-disabled)";PUM_Accessibility={forceFocus:function(e){r&&r.length&&!r[0].contains(e.target)&&(e.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(e){if(9===e.keyCode){var o=r.find(".pum-container *").filter(a).filter(":visible"),t=s(":focus"),n=o.length,i=o.index(t);e.shiftKey?0===i&&(o.get(n-1).focus(),e.preventDefault()):i===n-1&&(o.get(0).focus(),e.preventDefault())}},setFocusToFirstItem:function(){r.find(".pum-container *").filter(a).filter(":visible").filter(":not(.pum-close)").first().focus()}},s(t).on("pumInit",o,function(){PUM.getPopup(this).find("[tabindex]").each(function(){var e=s(this);e.data("tabindex",e.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",o,function(){var e=PUM.getPopup(this),o=s(":focus");e.has(o).length||(i=o),r=e.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),(n=s("body > *").filter(":visible").not(r)).attr("aria-hidden","true"),s(t).one("focusin.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",o,function(){}).on("pumBeforeClose",o,function(){}).on("pumAfterClose",o,function(){PUM.getPopup(this).off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),void 0!==i&&i.length&&i.focus(),r=null,s(t).off("focusin.pum_accessibility")}).on("pumSetupClose",o,function(){}).on("pumOpenPrevented",o,function(){}).on("pumClosePrevented",o,function(){}).on("pumBeforeReposition",o,function(){})}(jQuery,document),function(s){"use strict";s.fn.popmake.last_open_trigger=null,s.fn.popmake.last_close_trigger=null,s.fn.popmake.conversion_trigger=null;var r=!(void 0===pum_vars.restapi||!pum_vars.restapi);PUM_Analytics={beacon:function(e,o){var t=new Image,n=r?pum_vars.restapi:pum_vars.ajaxurl,i={route:"/analytics/",data:s.extend({event:"open",pid:null,_cache:+new Date},e),callback:"function"==typeof o?o:function(){}};r?n+=i.route:i.data.action="pum_analytics",n&&(s(t).on("error success load done",i.callback),t.src=n+"?"+s.param(i.data))}},void 0!==pum_vars.disable_tracking&&pum_vars.disable_tracking||s(document).on("pumAfterOpen.core_analytics",".pum",function(){var e=PUM.getPopup(this),o={pid:parseInt(e.popmake("getSettings").id,10)||null};0<o.pid&&!s("body").hasClass("single-popup")&&PUM_Analytics.beacon(o)})}(jQuery),function(n,e,r){"use strict";n.fn.popmake.methods.animate_overlay=function(e,o,t){return PUM.getPopup(this).popmake("getSettings").overlay_disabled?n.fn.popmake.overlay_animations.none.apply(this,[o,t]):n.fn.popmake.overlay_animations[e]?n.fn.popmake.overlay_animations[e].apply(this,[o,t]):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.methods.animate=function(e){return n.fn.popmake.animations[e]?n.fn.popmake.animations[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.animations={none:function(e){var o=PUM.getPopup(this);return o.popmake("getContainer").css({opacity:1,display:"block"}),o.popmake("animate_overlay","none",0,function(){e!==r&&e()}),this},slide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=n.animation_speed/2,s=e.popmake("animation_origin",n.animation_origin);return e.css({display:"block"}),t.css({display:"block"}).position(s).css({opacity:1}),e.popmake("animate_overlay","fade",i,function(){t.popmake("reposition",function(e){t.animate(e,i,"swing",function(){o!==r&&o()})})}),this},fade:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer").css({opacity:0,display:"block"}),n=o.popmake("getSettings").animation_speed/2;return o.popmake("animate_overlay","fade",n,function(){t.animate({opacity:1},n,"swing",function(){e!==r&&e()})}),this},fadeAndSlide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=n.animation_speed/2,s=e.popmake("animation_origin",n.animation_origin);return e.css({display:"block"}),t.css({display:"block"}).position(s),e.popmake("animate_overlay","fade",i,function(){t.popmake("reposition",function(e){t.css({opacity:0}),e.opacity=1,t.animate(e,i,"swing",function(){o!==r&&o()})})}),this},grow:function(e){return n.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(e){return n.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},n.fn.popmake.overlay_animations={none:function(e,o){PUM.getPopup(this).css({opacity:1,display:"block"}),"function"==typeof o&&o()},fade:function(e,o){PUM.getPopup(this).css({opacity:0,display:"block"}).animate({opacity:1},e,"swing",o)},slide:function(e,o){PUM.getPopup(this).slideDown(e,o)}}}(jQuery,document),function(e,o,t){"use strict";e(o).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(o,e,t){"use strict";o.fn.popmake.callbacks={reposition_using:function(e){o(this).css(e)}}}(jQuery,document),function(p,e,o){"use strict";var t,u=function(){return void 0===t&&(t="undefined"!=typeof MobileDetect?new MobileDetect(window.navigator.userAgent):{phone:function(){return!1},tablet:function(){return!1}}),t};p.extend(p.fn.popmake.methods,{checkConditions:function(){var e,o,t,n,i,s=PUM.getPopup(this),r=s.popmake("getSettings"),a=!0;if(r.disable_on_mobile&&u().phone())return!1;if(r.disable_on_tablet&&u().tablet())return!1;if(r.conditions.length)for(o=0;r.conditions.length>o;o++){for(n=r.conditions[o],e=!1,t=0;n.length>t&&(!(i=p.extend({},{not_operand:!1},n[t])).not_operand&&s.popmake("checkCondition",i)?e=!0:i.not_operand&&!s.popmake("checkCondition",i)&&(e=!0),p(this).trigger("pumCheckingCondition",[e,i]),!e);t++);e||(a=!1)}return a},checkCondition:function(e){var o=e.target||null;e.settings;return o?p.fn.popmake.conditions[o]?p.fn.popmake.conditions[o].apply(this,[e]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),p.fn.popmake.conditions={}}(jQuery,document),function(d){"use strict";d.extend(d.fn.popmake,{cookie:function(c){function m(e,o,t){var n,i=new Date;if("undefined"!=typeof document){if(1<arguments.length){switch(typeof(t=d.extend({path:pum_vars.home_url},m.defaults,t)).expires){case"number":i.setMilliseconds(i.getMilliseconds()+864e5*t.expires),t.expires=i;break;case"string":i.setTime(1e3*d.fn.popmake.utilities.strtotime("+"+t.expires)),t.expires=i}try{n=JSON.stringify(o),/^[\{\[]/.test(n)&&(o=n)}catch(e){}return o=c.write?c.write(o,e):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",o,t.expires?"; expires="+t.expires.toUTCString():"",t.path?"; path="+t.path:"",t.domain?"; domain="+t.domain:"",t.secure?"; secure":""].join("")}e||(n={});for(var s=document.cookie?document.cookie.split("; "):[],r=/(%[0-9A-Z]{2})+/g,a=0;a<s.length;a++){var p=s[a].split("="),u=p.slice(1).join("=");'"'===u.charAt(0)&&(u=u.slice(1,-1));try{var l=p[0].replace(r,decodeURIComponent);if(u=c.read?c.read(u,l):c(u,l)||u.replace(r,decodeURIComponent),this.json)try{u=JSON.parse(u)}catch(e){}if(e===l){n=u;break}e||(n[l]=u)}catch(e){}}return n}}return void 0===c&&(c=function(){}),(m.set=m).get=function(e){return m.call(m,e)},m.getJSON=function(){return m.apply({json:!0},[].slice.call(arguments))},m.defaults={},m.remove=function(e,o){m(e,"",d.extend({},o,{expires:-1,path:""})),m(e,"",d.extend({},o,{expires:-1}))},m.process=function(e,o,t,n){return 3<arguments.length&&"object"!=typeof t&&void 0!==o?m.apply(m,[e,o,{expires:t,path:n}]):m.apply(m,[].slice.call(arguments,[0,2]))},m.withConverter=d.fn.popmake.cookie,m}()}),pm_cookie=d.pm_cookie=d.fn.popmake.cookie.process,pm_cookie_json=d.pm_cookie_json=d.fn.popmake.cookie.getJSON,pm_remove_cookie=d.pm_remove_cookie=d.fn.popmake.cookie.remove}(jQuery),function(n,e,i){"use strict";n.extend(n.fn.popmake.methods,{addCookie:function(e){return pum.hooks.doAction("popmake.addCookie",arguments),n.fn.popmake.cookies[e]?n.fn.popmake.cookies[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+e+" does not exist."),this)},setCookie:function(e){n.pm_cookie(e.name,!0,e.session?null:e.time,e.path?pum_vars.home_url||"/":null),pum.hooks.doAction("popmake.setCookie",e)},checkCookies:function(e){var o,t=!1;if(e.cookie_name===i||null===e.cookie_name||""===e.cookie_name)return!1;switch(typeof e.cookie_name){case"object":case"array":for(o=0;e.cookie_name.length>o;o+=1)n.pm_cookie(e.cookie_name[o])!==i&&(t=!0);break;case"string":n.pm_cookie(e.cookie_name)!==i&&(t=!0)}return pum.hooks.doAction("popmake.checkCookies",e,t),t}}),n.fn.popmake.cookies=n.fn.popmake.cookies||{},n.extend(n.fn.popmake.cookies,{on_popup_open:function(e){var o=PUM.getPopup(this);o.on("pumAfterOpen",function(){o.popmake("setCookie",e)})},on_popup_close:function(e){var o=PUM.getPopup(this);o.on("pumBeforeClose",function(){o.popmake("setCookie",e)})},manual:function(e){var o=PUM.getPopup(this);o.on("pumSetCookie",function(){o.popmake("setCookie",e)})},form_success:function(e){var o=PUM.getPopup(this);o.on("pumFormSuccess",function(){o.popmake("setCookie",e)})},pum_sub_form_success:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},pum_sub_form_already_subscribed:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},ninja_form_success:function(e){return n.fn.popmake.cookies.form_success.apply(this,arguments)},cf7_form_success:function(e){return n.fn.popmake.cookies.form_success.apply(this,arguments)},gforms_form_success:function(e){return n.fn.popmake.cookies.form_success.apply(this,arguments)}}),n(e).on("pumInit",".pum",function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings").cookies||[],n=null;if(t.length)for(e=0;t.length>e;e+=1)n=t[e],o.popmake("addCookie",n.event,n.settings)})}(jQuery,document);var pum_debug,pum_debug_mode=!1;!function(r,e){if(e=window.pum_vars||{debug_mode:!1},(pum_debug_mode=void 0!==e.debug_mode&&e.debug_mode)||-1===window.location.href.indexOf("pum_debug")||(pum_debug_mode=!0),pum_debug_mode){var a=!1,t=!1,p=window.pum_debug_vars||{debug_mode_enabled:"Popup Maker: Debug Mode Enabled",debug_started_at:"Debug started at:",debug_more_info:"For more information on how to use this information visit https://docs.wppopupmaker.com/?utm_medium=js-debug-info&utm_campaign=ContextualHelp&utm_source=browser-console&utm_content=more-info",global_info:"Global Information",localized_vars:"Localized variables",popups_initializing:"Popups Initializing",popups_initialized:"Popups Initialized",single_popup_label:"Popup: #",theme_id:"Theme ID: ",label_method_call:"Method Call:",label_method_args:"Method Arguments:",label_popup_settings:"Settings",label_triggers:"Triggers",label_cookies:"Cookies",label_delay:"Delay:",label_conditions:"Conditions",label_cookie:"Cookie:",label_settings:"Settings:",label_selector:"Selector:",label_mobile_disabled:"Mobile Disabled:",label_tablet_disabled:"Tablet Disabled:",label_event:"Event: %s",triggers:[],cookies:[]};pum_debug={odump:function(e){return r.extend({},e)},logo:function(){console.log(" -------------------------------------------------------------\n| ____ __ __ _ |\n| | _ \\ ___ _ __ _ _ _ __ | \\/ | __ _| | _____ _ __ |\n| | |_) / _ \\| '_ \\| | | | '_ \\ | |\\/| |/ _` | |/ / _ \\ '__| |\n| | __/ (_) | |_) | |_| | |_) | | | | | (_| | < __/ | |\n| |_| \\___/| .__/ \\__,_| .__/ |_| |_|\\__,_|_|\\_\\___|_| |\n| |_| |_| |\n -------------------------------------------------------------")},initialize:function(){a=!0,pum_debug.logo(),console.debug(p.debug_mode_enabled),console.log(p.debug_started_at,new Date),console.info(p.debug_more_info),pum_debug.divider(p.global_info),console.groupCollapsed(p.localized_vars),console.log("pum_vars:",pum_debug.odump(e)),r(document).trigger("pum_debug_initialize_localized_vars"),console.groupEnd(),r(document).trigger("pum_debug_initialize")},popup_event_header:function(e){var o=e.popmake("getSettings");t!==o.id&&(t=o.id,pum_debug.divider(p.single_popup_label+o.id+" - "+o.slug))},divider:function(e){var o=62,t=0,n=" "+new Array(63).join("-")+" ";"string"==typeof e?(o=62-e.length,(t={left:Math.floor(o/2),right:Math.floor(o/2)}).left+t.right===o-1&&t.right++,t.left=new Array(t.left+1).join(" "),t.right=new Array(t.right+1).join(" "),console.log(n+"\n|"+t.left+e+t.right+"|\n"+n)):console.log(n)},click_trigger:function(e,o){var t,n=e.popmake("getSettings"),i=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&i.push(o.extra_selectors),t=(i=pum.hooks.applyFilters("pum.trigger.click_open.selectors",i,o,e)).join(", "),console.log(p.label_selector,t)},trigger:function(e,o){if("string"==typeof p.triggers[o.type]){switch(console.groupCollapsed(p.triggers[o.type]),o.type){case"auto_open":console.log(p.label_delay,o.settings.delay),console.log(p.label_cookie,o.settings.cookie_name);break;case"click_open":pum_debug.click_trigger(e,o.settings),console.log(p.label_cookie,o.settings.cookie_name)}r(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}},cookie:function(e,o){if("string"==typeof p.cookies[o.event]){switch(console.groupCollapsed(p.cookies[o.event]),o.event){case"on_popup_open":case"on_popup_close":case"manual":case"ninja_form_success":console.log(p.label_cookie,pum_debug.odump(o.settings))}r(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}}},r(document).on("pumInit",".pum",function(){var e=PUM.getPopup(r(this)),o=e.popmake("getSettings"),t=o.triggers||[],n=o.cookies||[],i=o.conditions||[],s=0;if(a||(pum_debug.initialize(),pum_debug.divider(p.popups_initializing)),console.groupCollapsed(p.single_popup_label+o.id+" - "+o.slug),console.log(p.theme_id,o.theme_id),t.length){for(console.groupCollapsed(p.label_triggers),s=0;t.length>s;s++)pum_debug.trigger(e,t[s]);console.groupEnd()}if(n.length){for(console.groupCollapsed(p.label_cookies),s=0;n.length>s;s+=1)pum_debug.cookie(e,n[s]);console.groupEnd()}i.length&&(console.groupCollapsed(p.label_conditions),console.log(i),console.groupEnd()),console.groupCollapsed(p.label_popup_settings),console.log(p.label_mobile_disabled,!1!==o.disable_on_mobile),console.log(p.label_tablet_disabled,!1!==o.disable_on_tablet),console.log(p.label_display_settings,pum_debug.odump(o)),e.trigger("pum_debug_popup_settings"),console.groupEnd(),console.groupEnd()}).on("pumBeforeOpen",".pum",function(){var e=PUM.getPopup(r(this)),o=r.fn.popmake.last_open_trigger;pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeOpen"));try{o=(o=r(r.fn.popmake.last_open_trigger)).length?o:r.fn.popmake.last_open_trigger.toString()}catch(e){o=""}finally{console.log(p.label_triggers,[o])}console.groupEnd()}).on("pumOpenPrevented",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumOpenPrevented")),console.groupEnd()}).on("pumAfterOpen",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterOpen")),console.groupEnd()}).on("pumSetupClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumSetupClose")),console.groupEnd()}).on("pumClosePrevented",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumClosePrevented")),console.groupEnd()}).on("pumBeforeClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeClose")),console.groupEnd()}).on("pumAfterClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterClose")),console.groupEnd()}).on("pumBeforeReposition",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeReposition")),console.groupEnd()}).on("pumAfterReposition",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterReposition")),console.groupEnd()}).on("pumCheckingCondition",".pum",function(e,o,t){var n=PUM.getPopup(r(this));pum_debug.popup_event_header(n),console.groupCollapsed(p.label_event.replace("%s","pumCheckingCondition")),console.log((t.not_operand?"(!) ":"")+t.target+": "+o,t),console.groupEnd()})}}(jQuery),function(e,o,t){"use strict";e.fn.popmake.defaults={id:null,slug:"",theme_id:null,cookies:[],triggers:[],conditions:[],mobile_disabled:null,tablet_disabled:null,custom_height_auto:!1,scrollable_content:!1,position_from_trigger:!1,position_fixed:!1,overlay_disabled:!1,stackable:!1,disable_reposition:!1,close_on_overlay_click:!1,close_on_esc_press:!1,close_on_f4_press:!1,disable_on_mobile:!1,disable_on_tablet:!1,size:"medium",responsive_min_width:"0%",responsive_max_width:"100%",custom_width:"640px",custom_height:"380px",animation_type:"fade",animation_speed:"350",animation_origin:"center top",location:"center top",position_top:"100",position_bottom:"0",position_left:"0",position_right:"0",zindex:"1999999999",close_button_delay:"0",meta:{display:{stackable:!1,overlay_disabled:!1,size:"medium",responsive_max_width:"100",responsive_max_width_unit:"%",responsive_min_width:"0",responsive_min_width_unit:"%",custom_width:"640",custom_width_unit:"px",custom_height:"380",custom_height_unit:"px",custom_height_auto:!1,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:!1,animation_type:"fade",animation_speed:350,animation_origin:"center top",scrollable_content:!1,disable_reposition:!1,position_from_trigger:!1,overlay_zindex:!1,zindex:"1999999999"},close:{overlay_click:!1,esc_press:!1,f4_press:!1,text:"",button_delay:0},click_open:[]},container:{active_class:"active",attr:{class:"popmake"}},title:{attr:{class:"popmake-title"}},content:{attr:{class:"popmake-content"}},close:{close_speed:0,attr:{class:"popmake-close"}},overlay:{attr:{id:"popmake-overlay",class:"popmake-overlay"}}}}(jQuery,document),function(s){"use strict";var r={openpopup:!1,openpopup_id:0,closepopup:!1,closedelay:0,redirect_enabled:!1,redirect:"",cookie:!1};window.PUM=window.PUM||{},window.PUM.forms=window.PUM.forms||{},s.extend(window.PUM.forms,{form:{validation:{errors:[]},responseHandler:function(e,o){var t=o.data;o.success?window.PUM.forms.form.success(e,t):window.PUM.forms.form.errors(e,t)},display_errors:function(e,o){window.PUM.forms.messages.add(e,o||this.validation.errors,"error")},beforeAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");window.PUM.forms.messages.clear_all(e),t.length||(t=s('<span class="pum-form__loader"></span>'),""!==o.attr("value")?t.insertAfter(o):o.append(t)),o.prop("disabled",!0),t.show(),e.addClass("pum-form--loading").removeClass("pum-form--errors")},afterAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");o.prop("disabled",!1),t.hide(),e.removeClass("pum-form--loading")},success:function(e,o){void 0!==o.message&&""!==o.message&&window.PUM.forms.messages.add(e,[{message:o.message}]),e.trigger("success",[o]),!e.data("noredirect")&&void 0!==e.data("redirect_enabled")&&o.redirect&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))},errors:function(e,o){void 0!==o.errors&&o.errors.length&&(console.log(o.errors),window.PUM.forms.form.display_errors(e,o.errors),window.PUM.forms.messages.scroll_to_first(e),e.addClass("pum-form--errors").trigger("errors",[o]))},submit:function(e){var o=s(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.forms.form.beforeAjax(o),s.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_form",values:t}}).always(function(){window.PUM.forms.form.afterAjax(o)}).done(function(e){window.PUM.forms.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}},messages:{add:function(e,o,t){var n=e.find(".pum-form__messages"),i=0;if(t=t||"success",o=o||[],!n.length)switch(n=s('<div class="pum-form__messages">').hide(),pum_vars.message_position){case"bottom":e.append(n.addClass("pum-form__messages--bottom"));break;case"top":e.prepend(n.addClass("pum-form__messages--top"))}if(0<=["bottom","top"].indexOf(pum_vars.message_position))for(;o.length>i;i++)this.add_message(n,o[i].message,t);else for(;o.length>i;i++)void 0!==o[i].field?this.add_field_error(e,o[i]):this.add_message(n,o[i].message,t);n.is(":hidden")&&s(".pum-form__message",n).length&&n.slideDown()},add_message:function(e,o,t){var n=s('<p class="pum-form__message">').html(o);t=t||"success",n.addClass("pum-form__message--"+t),e.append(n),e.is(":visible")&&n.hide().slideDown()},add_field_error:function(e,o){var t=s('[name="'+o.field+'"]',e).parents(".pum-form__field").addClass("pum-form__field--error");this.add_message(t,o.message,"error")},clear_all:function(e,o){var t=e.find(".pum-form__messages"),n=t.find(".pum-form__message"),i=e.find(".pum-form__field.pum-form__field--error");o=o||!1,t.length&&n.slideUp("fast",function(){s(this).remove(),o&&t.hide()}),i.length&&i.removeClass("pum-form__field--error").find("p.pum-form__message").remove()},scroll_to_first:function(e){window.PUM.utilities.scrollTo(s(".pum-form__field.pum-form__field--error",e).eq(0))}},success:function(e,o){if(o=s.extend({},r,o)){var t=PUM.getPopup(e),n={},i=function(){o.openpopup&&PUM.getPopup(o.openpopup_id).length?PUM.open(o.openpopup_id):o.redirect_enabled&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))};t.length&&(t.trigger("pumFormSuccess"),o.cookie&&(n=s.extend({name:"pum-"+PUM.getSetting(t,"id"),expires:"+1 year"},"object"==typeof o.cookie?o.cookie:{}),PUM.setCookie(t,n))),t.length&&o.closepopup?setTimeout(function(){t.popmake("close",i)},1e3*parseInt(o.closedelay)):i()}}})}(jQuery),function(e,o){"use strict";e.pum=e.pum||{},e.pum.hooks=e.pum.hooks||new function(){var t=Array.prototype.slice,i={removeFilter:function(e,o){return"string"==typeof e&&n("filters",e,o),i},applyFilters:function(){var e=t.call(arguments),o=e.shift();return"string"!=typeof o?i:r("filters",o,e)},addFilter:function(e,o,t,n){return"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),s("filters",e,o,t,n)),i},removeAction:function(e,o){return"string"==typeof e&&n("actions",e,o),i},doAction:function(){var e=t.call(arguments),o=e.shift();return"string"==typeof o&&r("actions",o,e),i},addAction:function(e,o,t,n){return"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),s("actions",e,o,t,n)),i}},a={actions:{},filters:{}};function n(e,o,t,n){var i,s,r;if(a[e][o])if(t)if(i=a[e][o],n)for(r=i.length;r--;)(s=i[r]).callback===t&&s.context===n&&i.splice(r,1);else for(r=i.length;r--;)i[r].callback===t&&i.splice(r,1);else a[e][o]=[]}function s(e,o,t,n,i){var s={callback:t,priority:n,context:i},r=a[e][o];r=r?(r.push(s),function(e){for(var o,t,n,i=1,s=e.length;i<s;i++){for(o=e[i],t=i;(n=e[t-1])&&n.priority>o.priority;)e[t]=e[t-1],--t;e[t]=o}return e}(r)):[s],a[e][o]=r}function r(e,o,t){var n,i,s=a[e][o];if(!s)return"filters"===e&&t[0];if(i=s.length,"filters"===e)for(n=0;n<i;n++)t[0]=s[n].callback.apply(s[n].context,t);else for(n=0;n<i;n++)s[n].callback.apply(s[n].context,t);return"filters"!==e||t[0]}return i}}(window),function(r){"use strict";var i={},e=!1;r(document).ready(function(){!1===e&&"undefined"!=typeof Marionette&&"undefined"!=typeof nfRadio&&(e=Marionette.Object.extend({initialize:function(){this.listenTo(nfRadio.channel("forms"),"submit:response",this.popupMaker)},popupMaker:function(e,o,t,n){var i=r("#nf-form-"+n+"-cont"),s={};e.errors.length||(void 0!==e.data.actions&&(s.openpopup=void 0!==e.data.actions.openpopup,s.openpopup_id=s.openpopup?parseInt(e.data.actions.openpopup):0,s.closepopup=void 0!==e.data.actions.closepopup,s.closedelay=s.closepopup?parseInt(e.data.actions.closepopup):0,s.closepopup&&e.data.actions.closedelay&&(s.closedelay=parseInt(e.data.actions.closedelay))),window.PUM.forms.success(i,s))}})),!1!==e&&new e,r(".gform_wrapper > form").each(function(){var e=r(this),o=e.attr("id").replace("gform_",""),t=e.find("input.gforms-pum"),n=!!t.length&&JSON.parse(t.val());n&&"object"==typeof n&&("object"==typeof n&&void 0!==n.closedelay&&3<=n.closedelay.toString().length&&(n.closedelay=n.closedelay/1e3),i[o]=n)})}).on("gform_confirmation_loaded",function(e,o){var t=r("#gform_confirmation_wrapper_"+o+",#gforms_confirmation_message_"+o),n=i[o]||!1;window.PUM.forms.success(t,n)}).on("wpcf7:mailsent",".wpcf7",function(e){var o=r(e.target),t=o.find("input.wpcf7-pum"),n=!!t.length&&JSON.parse(t.val());"object"==typeof n&&void 0!==n.closedelay&&3<=n.closedelay.toString().length&&(n.closedelay=n.closedelay/1e3),window.PUM.forms.success(o,n)})}(jQuery),function(i){"use strict";pum_vars&&void 0!==pum_vars.core_sub_forms_enabled&&!pum_vars.core_sub_forms_enabled||(window.PUM=window.PUM||{},window.PUM.newsletter=window.PUM.newsletter||{},i.extend(window.PUM.newsletter,{form:i.extend({},window.PUM.forms.form,{submit:function(e){var o=i(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.newsletter.form.beforeAjax(o),i.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_sub_form",values:t}}).always(function(){window.PUM.newsletter.form.afterAjax(o)}).done(function(e){window.PUM.newsletter.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}})}),i(document).on("submit","form.pum-sub-form",window.PUM.newsletter.form.submit).on("success","form.pum-sub-form",function(e,o){var t=i(e.target),n=t.data("settings")||{};t.trigger("pumNewsletterSuccess",[o]).addClass("pum-newsletter-success"),t[0].reset(),window.pum.hooks.doAction("pum-sub-form.success",o,t),"string"==typeof n.redirect&&""!==n.redirect&&(n.redirect=atob(n.redirect)),window.PUM.forms.success(t,n)}).on("error","form.pum-sub-form",function(e,o){var t=i(e.target);t.trigger("pumNewsletterError",[o]),window.pum.hooks.doAction("pum-sub-form.errors",o,t)}))}(jQuery),function(s,r,e){"use strict";s.extend(s.fn.popmake.methods,{addTrigger:function(e){return s.fn.popmake.triggers[e]?s.fn.popmake.triggers[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+e+" does not exist."),this)}}),s.fn.popmake.triggers={auto_open:function(e){var o=PUM.getPopup(this);setTimeout(function(){o.popmake("state","isOpen")||!o.popmake("checkCookies",e)&&o.popmake("checkConditions")&&(s.fn.popmake.last_open_trigger="Auto Open - Delay: "+e.delay,o.popmake("open"))},e.delay)},click_open:function(n){var e,i=PUM.getPopup(this),o=i.popmake("getSettings"),t=[".popmake-"+o.id,".popmake-"+decodeURIComponent(o.slug),'a[href$="#popmake-'+o.id+'"]'];n.extra_selectors&&""!==n.extra_selectors&&t.push(n.extra_selectors),e=(t=pum.hooks.applyFilters("pum.trigger.click_open.selectors",t,n,i)).join(", "),s(e).addClass("pum-trigger").css({cursor:"pointer"}),s(r).on("click.pumTrigger",e,function(e){var o=s(this),t=n.do_default||!1;0<i.has(o).length||i.popmake("state","isOpen")||!i.popmake("checkCookies",n)&&i.popmake("checkConditions")&&(o.data("do-default")?t=o.data("do-default"):(o.hasClass("do-default")||o.hasClass("popmake-do-default")||o.hasClass("pum-do-default"))&&(t=!0),e.ctrlKey||pum.hooks.applyFilters("pum.trigger.click_open.do_default",t,i,o)||(e.preventDefault(),e.stopPropagation()),s.fn.popmake.last_open_trigger=o,i.popmake("open"))})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},s(r).on("pumInit",".pum",function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings").triggers||[],n=null;if(t.length)for(e=0;t.length>e;e+=1)n=t[e],o.popmake("addTrigger",n.type,n.settings)})}(jQuery,document),function(p,e,o){"use strict";var n="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),i="select,textarea".split(","),s=/\[([^\]]*)\]/g;Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null==this)throw new TypeError;var o=Object(this),t=o.length>>>0;if(0==t)return-1;var n=0;if(0<arguments.length&&((n=Number(arguments[1]))!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(0<n||-1)*Math.floor(Math.abs(n)))),t<=n)return-1;for(var i=0<=n?n:Math.max(t-Math.abs(n),0);i<t;i++)if(i in o&&o[i]===e)return i;return-1}),p.fn.popmake.utilities={scrollTo:function(e,o){var t=p(e)||p();t.length&&p("html, body").animate({scrollTop:t.offset().top-100},1e3,"swing",function(){var e=t.find(':input:not([type="button"]):not([type="hidden"]):not(button)').eq(0);e.hasClass("wp-editor-area")?tinyMCE.execCommand("mceFocus",!1,e.attr("id")):e.focus(),"function"==typeof o&&o()})},inArray:function(e,o){return!!~o.indexOf(e)},convert_hex:function(e,o){return e=e.replace("#",""),"rgba("+parseInt(e.substring(0,2),16)+","+parseInt(e.substring(2,4),16)+","+parseInt(e.substring(4,6),16)+","+o/100+")"},debounce:function(t,n){var i;return function(){var e=this,o=arguments;window.clearTimeout(i),i=window.setTimeout(function(){t.apply(e,o)},n)}},throttle:function(e,o){var t=!1,n=function(){t=!1};return function(){t||(e.apply(this,arguments),window.setTimeout(n,o),t=!0)}},getXPath:function(e){var t,n,i,s,r,a=[];return p.each(p(e).parents(),function(e,o){if(t=p(o),n=t.attr("id")||"",i=t.attr("class")||"",s=t.get(0).tagName.toLowerCase(),r=t.parent().children(s).index(t),"body"===s)return!1;0<i.length&&(i=(i=i.split(" "))[0]),a.push(s+(0<n.length?"#"+n:0<i.length?"."+i.split(" ").join("."):":eq("+r+")"))}),a.reverse().join(" > ")},strtotime:function(e,o){var t,n,i,s,r,a,p,u,l,c;if(!e)return!1;if((n=(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase()).match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return!(12<n[3]||31<n[5])&&new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return!(12<n[1]||31<n[3])&&new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return!(12<n[3]||31<n[5]||n[1]<70&&38<n[1])&&(s=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(s,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return!(12<n[1]||31<n[3]||n[5]<70&&38<n[5])&&(s=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(s,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return!(23<n[1]||59<n[3]||59<n[5])&&(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===o||isNaN(o)?(new Date).getTime()/1e3||0:o||0;if(t=Date.parse(e),!isNaN(t))return t/1e3||0;function m(e){var o=e.split(" "),t=o[0],n=o[1].substring(0,3),i=/\d+/.test(t),s=("last"===t?-1:1)*("ago"===o[2]?-1:1);if(i&&(s*=parseInt(t,10)),p.hasOwnProperty(n)&&!o[1].match(/^mon(day|\.)?$/i))return r["set"+p[n]](r["get"+p[n]]()+s);if("wee"===n)return r.setDate(r.getDate()+7*s);if("next"===t||"last"===t)!function(e,o,t){var n,i=a[o];void 0!==i&&(0==(n=i-r.getDay())?n=7*t:0<n&&"last"===e?n-=7:n<0&&"next"===e&&(n+=7),r.setDate(r.getDate()+n))}(t,n,s);else if(!i)return!1;return!0}if(r=o?new Date(1e3*o):new Date,a={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},p={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},"([+-]?\\d+\\s"+(l="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)")+"|(last|next)\\s"+l+")(\\sago)?",!(n=e.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(c=0,u=n.length;c<u;c+=1)if(!m(n[c]))return!1;return r.getTime()/1e3},serializeObject:function(e){p.extend({},e);var o={},t=p.extend(!0,{include:[],exclude:[],includeByClass:""},e);return this.find(":input").each(function(){var e;!this.name||this.disabled||window.PUM.utilities.inArray(this.name,t.exclude)||t.include.length&&!window.PUM.utilities.inArray(this.name,t.include)||-1===this.className.indexOf(t.includeByClass)||(e=this.name.replace(s,"[$1").split("["))[0]&&(this.checked||window.PUM.utilities.inArray(this.type,n)||window.PUM.utilities.inArray(this.nodeName.toLowerCase(),i))&&("checkbox"===this.type&&e.push(""),function e(o,t,n){var i=t[0];1<t.length?(o[i]||(o[i]=t[1]?{}:[]),e(o[i],t.slice(1),n)):(i||(i=o.length),o[i]=n)}(o,e,p(this).val()))}),o}},p.fn.popmake.utilies=p.fn.popmake.utilities,window.PUM=window.PUM||{},window.PUM.utilities=window.PUM.utilities||{},window.PUM.utilities=p.extend(window.PUM.utilities,p.fn.popmake.utilities)}(jQuery,document),function(e,t){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(e,o){return t(e,o)});else if("undefined"!=typeof exports){var o=require("jquery");t(exports,o)}else t(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,a){var p={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 o(n,t){var i={},s={};function r(e,o,t){return e[o]=t,e}function e(){return i}this.addPair=function(e){if(!p.validate.test(e.name))return this;var o=function(e,o){var t,n,i=e.match(p.key);try{o=JSON.parse(o)}catch(e){}for(;void 0!==(t=i.pop());)p.push.test(t)?o=r([],(n=e.replace(/\[\]$/,""),void 0===s[n]&&(s[n]=0),s[n]++),o):p.fixed.test(t)?o=r([],t,o):p.named.test(t)&&(o=r({},t,o));return o}(e.name,function(e){switch(a('[name="'+e.name+'"]',t).attr("type")){case"checkbox":return"1"===e.value||e.value;default:return e.value}}(e));return i=n.extend(!0,i,o),this},this.addPairs=function(e){if(!n.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var o=0,t=e.length;o<t;o++)this.addPair(e[o]);return this},this.serialize=e,this.serializeJSON=function(){return JSON.stringify(e())}}return o.patterns=p,o.serializeObject=function(){var e;return e=this.is("form")?this.serializeArray():this.find(":input").serializeArray(),new o(a,this).addPairs(e).serialize()},o.serializeJSON=function(){var e;return e=this.is("form")?this.serializeArray():this.find(":input").serializeArray(),new o(a,this).addPairs(e).serializeJSON()},void 0!==a.fn&&(a.fn.pumSerializeObject=o.serializeObject,a.fn.pumSerializeJSON=o.serializeJSON),e.FormSerializer=o}),function(e,o,t){"use strict";e.fn.popmake.version=1.8,e.fn.popmake.last_open_popup=null,e(void 0).ready(function(){e(".pum").popmake(),e(void 0).trigger("pumInitialized"),"object"==typeof pum_vars.form_success&&(pum_vars.form_success=e.extend({popup_id:null,settings:{}}),PUM.forms.success(pum_vars.form_success.popup_id,pum_vars.form_success.settings))}),e(".pum").on("pumInit",function(){var e=PUM.getPopup(this),o=PUM.getSetting(e,"id"),t=e.find("form");t.length&&t.append('<input type="hidden" name="pum_form_popup_id" value="'+o+'" />')})}(jQuery);
classes/Newsletters.php CHANGED
@@ -83,9 +83,10 @@ class PUM_Newsletters {
83
 
84
  $error_code = self::$errors->get_error_code();
85
 
86
- $success = empty( $error_code ) ? 'success' : ( $error_code == 'already_subscribed' ? 'already_subscribed' : false );
 
87
 
88
- if ( ! $success ) {
89
  do_action( 'pum_sub_form_errors', $values, self::$errors );
90
 
91
  switch ( $error_code ) {
@@ -98,7 +99,11 @@ class PUM_Newsletters {
98
  } else {
99
  do_action( 'pum_sub_form_success', $values );
100
 
101
- $response["message"] = pum_get_newsletter_provider_message( $values['provider'], $success, $values );
 
 
 
 
102
  self::send_success( $response );
103
  }
104
  // Don't let it keep going.
@@ -223,7 +228,7 @@ class PUM_Newsletters {
223
 
224
  $values['provider'] = sanitize_text_field( $values['provider'] );
225
 
226
- if( ! empty( $values['consent_args'] ) && is_string( $values['consent_args'] ) ) {
227
  if ( strpos( $values['consent_args'], '\"' ) >= 0 ) {
228
  $values['consent_args'] = stripslashes( $values["consent_args"] );
229
  }
@@ -243,9 +248,9 @@ class PUM_Newsletters {
243
  if ( $values['consent_args']['enabled'] === 'yes' && ! $values['consent_args']['required'] && $values['consent'] === 'no' ) {
244
  $values['uuid'] = '';
245
  $values['user_id'] = 0;
246
- $values['name'] = '';
247
- $values['fname'] = '';
248
- $values['lname'] = '';
249
  $values['email'] = function_exists( 'wp_privacy_anonymize_data' ) ? wp_privacy_anonymize_data( 'email', $values['email'] ) : 'deleted@site.invalid';
250
  }
251
 
@@ -278,7 +283,7 @@ class PUM_Newsletters {
278
  * Provides basic field validation.
279
  *
280
  * @param WP_Error $errors
281
- * @param array $values
282
  *
283
  * @return WP_Error
284
  */
83
 
84
  $error_code = self::$errors->get_error_code();
85
 
86
+ $already_subscribed = 'already_subscribed' === $error_code;
87
+ $success = empty( $error_code ) || $already_subscribed ? true : false;
88
 
89
+ if ( ! $success && ! $already_subscribed ) {
90
  do_action( 'pum_sub_form_errors', $values, self::$errors );
91
 
92
  switch ( $error_code ) {
99
  } else {
100
  do_action( 'pum_sub_form_success', $values );
101
 
102
+ if ( $already_subscribed ) {
103
+ $response['already_subscribed'] = true;
104
+ }
105
+
106
+ $response["message"] = pum_get_newsletter_provider_message( $values['provider'], $already_subscribed ? 'already_subscribed' : 'success', $values );
107
  self::send_success( $response );
108
  }
109
  // Don't let it keep going.
228
 
229
  $values['provider'] = sanitize_text_field( $values['provider'] );
230
 
231
+ if ( ! empty( $values['consent_args'] ) && is_string( $values['consent_args'] ) ) {
232
  if ( strpos( $values['consent_args'], '\"' ) >= 0 ) {
233
  $values['consent_args'] = stripslashes( $values["consent_args"] );
234
  }
248
  if ( $values['consent_args']['enabled'] === 'yes' && ! $values['consent_args']['required'] && $values['consent'] === 'no' ) {
249
  $values['uuid'] = '';
250
  $values['user_id'] = 0;
251
+ $values['name'] = '';
252
+ $values['fname'] = '';
253
+ $values['lname'] = '';
254
  $values['email'] = function_exists( 'wp_privacy_anonymize_data' ) ? wp_privacy_anonymize_data( 'email', $values['email'] ) : 'deleted@site.invalid';
255
  }
256
 
283
  * Provides basic field validation.
284
  *
285
  * @param WP_Error $errors
286
+ * @param array $values
287
  *
288
  * @return WP_Error
289
  */
package.json DELETED
@@ -1,52 +0,0 @@
1
- {
2
- "name": "popup-maker",
3
- "version": "1.8.8",
4
- "description": "WordPress Popup Plugin",
5
- "scripts": {
6
- "test": "echo \"Error: no test specified\" && exit 1"
7
- },
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/PopupMaker/Popup-Maker.git"
11
- },
12
- "author": "WP Popup Maker",
13
- "license": "GPL-3.0",
14
- "bugs": {
15
- "url": "https://github.com/PopupMaker/Popup-Maker/issues"
16
- },
17
- "homepage": "https://github.com/PopupMaker/Popup-Maker#readme",
18
- "dependencies": {},
19
- "devDependencies": {
20
- "gulp": "^4.0.0",
21
- "gulp-autoprefixer": "^6.0.0",
22
- "gulp-clean": "^0.4.0",
23
- "gulp-clean-css": "^3.10.0",
24
- "gulp-combine-mq": "^0.4.0",
25
- "gulp-concat": "^2.6.0",
26
- "gulp-csso": "^3.0.1",
27
- "gulp-filter": "^5.1.0",
28
- "gulp-git": "^2.0.0",
29
- "gulp-ignore": "^2.0.1",
30
- "gulp-jshint": "^2.0.0",
31
- "gulp-livereload": "^4.0.0",
32
- "gulp-load-plugins": "^1.6.0",
33
- "gulp-notify": "^3.2.0",
34
- "gulp-order": "^1.2.0",
35
- "gulp-plumber": "^1.1.0",
36
- "gulp-rename": "^1.2.2",
37
- "gulp-sane-watch": "^2.0.6",
38
- "gulp-sass": "^4.0.2",
39
- "gulp-sass-lint": "^1.4.0",
40
- "gulp-scss-lint": "^0.7.1",
41
- "gulp-sort": "^2.0.0",
42
- "gulp-sourcemaps": "^2.6.4",
43
- "gulp-uglify": "^3.0.1",
44
- "gulp-watch": "^5.0.1",
45
- "gulp-wp-pot": "^2.3.2",
46
- "gulp-zip": "^4.2.0",
47
- "jshint": "^2.9.1",
48
- "merge-stream": "^1.0.1",
49
- "notify-send": "^0.1.2",
50
- "run-sequence": "^2.2.1"
51
- }
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
popup-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Popup Maker
4
  * Plugin URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&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.8.10
7
  * Author: WP Popup Maker
8
  * Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
9
  * License: GPL2 or later
@@ -95,7 +95,7 @@ class Popup_Maker {
95
  /**
96
  * @var string Plugin Version
97
  */
98
- public static $VER = '1.8.10';
99
 
100
  /**
101
  * @var int DB Version
3
  * Plugin Name: Popup Maker
4
  * Plugin URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&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.8.11
7
  * Author: WP Popup Maker
8
  * Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
9
  * License: GPL2 or later
95
  /**
96
  * @var string Plugin Version
97
  */
98
+ public static $VER = '1.8.11';
99
 
100
  /**
101
  * @var int DB Version
readme.txt CHANGED
@@ -7,7 +7,7 @@ Tags: marketing, popup, popups, optin, advertising, conversion, responsive popu
7
  Requires at least: 4.1
8
  Tested up to: 5.3
9
  Requires PHP: 5.2.17
10
- Stable tag: 1.8.10
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
@@ -98,6 +98,11 @@ There are several common causes for this, check [this guide for help](https://do
98
 
99
  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.
100
 
 
 
 
 
 
101
  = v1.8.10 - 07/06/2019 =
102
  * Fix: PHP backward compatibility issue due to short array syntax usage.
103
 
7
  Requires at least: 4.1
8
  Tested up to: 5.3
9
  Requires PHP: 5.2.17
10
+ Stable tag: 1.8.11
11
  License: GPLv2 or later
12
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
13
 
98
 
99
  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.
100
 
101
+ = v1.8.11 - 08/18/2019 =
102
+ * Improvement: Trigger window resize event when popups open to fix issues with some sliders & JS sized content.
103
+ * Fix: Updated form value processing to prevent some edge cases where string values were converted to Infinity.
104
+ * Fix: Custom "already subscribed" messages in MailChimp integration were not working correctly.
105
+
106
  = v1.8.10 - 07/06/2019 =
107
  * Fix: PHP backward compatibility issue due to short array syntax usage.
108