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

Version Description

Download this release

Release Info

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

Code changes from version 1.4.18 to 1.4.19

Files changed (94) hide show
  1. assets/js/admin.js +31 -27
  2. assets/js/admin.min.js +3 -3
  3. assets/js/mobile-detect.js +987 -0
  4. assets/js/mobile-detect.min.js +2 -0
  5. assets/js/site.js +298 -140
  6. assets/js/site.min.js +1 -1
  7. includes/admin/admin-pages.php +2 -2
  8. includes/admin/admin-setup.php +1 -1
  9. includes/admin/settings/register-settings.php +1 -1
  10. includes/admin/tools/tools-page.php +2 -2
  11. includes/class-pum-condition.php +18 -2
  12. includes/class-pum-fields.php +2 -0
  13. includes/class-pum-freemius.php +6 -7
  14. includes/class-pum-popup.php +111 -56
  15. includes/class-pum.php +1 -1
  16. includes/importer/easy-modal-v2.php +6 -1
  17. includes/libs/freemius/assets/css/admin/account.css +1 -1
  18. includes/libs/freemius/assets/css/admin/common.css +1 -1
  19. includes/libs/freemius/assets/css/admin/deactivation-feedback.css +1 -1
  20. includes/libs/freemius/assets/css/admin/dialog-boxes.css +2 -0
  21. includes/libs/freemius/assets/css/admin/license-activation.css +1 -1
  22. includes/libs/freemius/assets/img/icon.png +0 -0
  23. includes/libs/freemius/assets/img/popup-maker.png +0 -0
  24. includes/libs/freemius/assets/js/jquery.ba-postmessage.js +0 -222
  25. includes/libs/freemius/assets/js/jquery.ba-postmessage.min.js +0 -9
  26. includes/libs/freemius/assets/js/postmessage.js +28 -3
  27. includes/libs/freemius/assets/scss/_mixins.scss +0 -8
  28. includes/libs/freemius/assets/scss/admin/_deactivation-feedback.scss +55 -0
  29. includes/libs/freemius/assets/scss/admin/_license-activation.scss +7 -0
  30. includes/libs/freemius/assets/scss/admin/_license-key-resend.scss +44 -0
  31. includes/libs/freemius/assets/scss/admin/_modal-common.scss +153 -0
  32. includes/libs/freemius/assets/scss/admin/account.scss +14 -1
  33. includes/libs/freemius/assets/scss/admin/common.scss +6 -0
  34. includes/libs/freemius/assets/scss/admin/deactivation-feedback.scss +0 -120
  35. includes/libs/freemius/assets/scss/admin/dialog-boxes.scss +5 -0
  36. includes/libs/freemius/assets/scss/admin/license-activation.scss +0 -99
  37. includes/libs/freemius/config.php +3 -3
  38. includes/libs/freemius/gulpfile.js +42 -0
  39. includes/libs/freemius/includes/class-freemius-abstract.php +1 -2
  40. includes/libs/freemius/includes/class-freemius.php +980 -332
  41. includes/libs/freemius/includes/class-fs-api.php +28 -1
  42. includes/libs/freemius/includes/class-fs-plugin-updater.php +5 -2
  43. includes/libs/freemius/includes/class-fs-security.php +19 -1
  44. includes/libs/freemius/includes/entities/class-fs-entity.php +1 -1
  45. includes/libs/freemius/includes/entities/class-fs-payment.php +94 -0
  46. includes/libs/freemius/includes/entities/class-fs-plugin-license.php +46 -2
  47. includes/libs/freemius/includes/entities/class-fs-plugin-plan.php +21 -0
  48. includes/libs/freemius/includes/fs-core-functions.php +12 -2
  49. includes/libs/freemius/includes/fs-essential-functions.php +3 -0
  50. includes/libs/freemius/includes/fs-plugin-info-dialog.php +3 -9
  51. includes/libs/freemius/includes/i18n.php +27 -2
  52. includes/libs/freemius/includes/managers/class-fs-admin-menu-manager.php +1 -1
  53. includes/libs/freemius/includes/managers/class-fs-admin-notice-manager.php +1 -1
  54. includes/libs/freemius/includes/managers/class-fs-key-value-storage.php +31 -0
  55. includes/libs/freemius/includes/managers/class-fs-license-manager.php +3 -0
  56. includes/libs/freemius/languages/freemius-en.mo +0 -0
  57. includes/libs/freemius/languages/freemius-en.po +1396 -0
  58. includes/libs/freemius/languages/freemius-it_IT.mo +0 -0
  59. includes/libs/freemius/languages/freemius-it_IT.po +1521 -0
  60. includes/libs/freemius/languages/freemius.pot +1399 -0
  61. includes/libs/freemius/package.json +32 -0
  62. includes/libs/freemius/require.php +43 -0
  63. includes/libs/freemius/start.php +10 -40
  64. includes/libs/freemius/templates/account.php +613 -547
  65. includes/libs/freemius/templates/add-ons.php +18 -8
  66. includes/libs/freemius/templates/all-admin-notice.php +4 -0
  67. includes/libs/freemius/templates/billing.php +109 -0
  68. includes/libs/freemius/templates/checkout.php +19 -15
  69. includes/libs/freemius/templates/connect.php +23 -7
  70. includes/libs/freemius/templates/contact.php +12 -1
  71. includes/libs/freemius/templates/debug.php +47 -1
  72. includes/libs/freemius/templates/debug/logger.php +8 -2
  73. includes/libs/freemius/templates/debug/scheduled-crons.php +33 -24
  74. includes/libs/freemius/templates/email.php +3 -0
  75. includes/libs/freemius/templates/firewall-issues-js.php +2 -2
  76. includes/libs/freemius/templates/forms/deactivation/contact.php +23 -0
  77. includes/libs/freemius/templates/{deactivation-feedback-modal.php → forms/deactivation/form.php} +95 -17
  78. includes/libs/freemius/templates/forms/deactivation/retry-skip.php +24 -0
  79. includes/libs/freemius/templates/forms/license-activation.php +228 -0
  80. includes/libs/freemius/templates/forms/resend-key.php +197 -0
  81. includes/libs/freemius/templates/license-activation-modal.php +0 -177
  82. includes/libs/freemius/templates/plugin-icon.php +3 -0
  83. includes/libs/freemius/templates/plugin-info/description.php +2 -0
  84. includes/libs/freemius/templates/plugin-info/features.php +2 -0
  85. includes/libs/freemius/templates/plugin-info/screenshots.php +2 -0
  86. includes/libs/freemius/templates/powered-by.php +2 -4
  87. includes/libs/freemius/templates/pricing.php +13 -2
  88. includes/libs/freemius/templates/sticky-admin-notice-js.php +1 -1
  89. includes/scripts.php +2 -0
  90. includes/shortcodes/class-pum-shortcode-popup-close.php +8 -1
  91. includes/shortcodes/class-pum-shortcode-popup-trigger.php +9 -1
  92. languages/popup-maker.pot +21 -17
  93. popup-maker.php +1 -1
  94. readme.txt +11 -3
assets/js/admin.js CHANGED
@@ -6309,30 +6309,11 @@ var PUMColorPickers;
6309
  $('.color-picker').filter(':not(.initialized)')
6310
  .addClass('initialized')
6311
  .wpColorPicker({
6312
- change: function (e) {
6313
- var $this = $(this),
6314
- $input = $(e.currentTarget);
6315
- if ($input.hasClass('background-color')) {
6316
- $input.parents('table').find('.background-opacity').show();
6317
- }
6318
-
6319
- $this.trigger('change.update');
6320
-
6321
- if ($('form#post input#post_type').val() === 'popup_theme') {
6322
- PopMakeAdmin.update_theme();
6323
- }
6324
  },
6325
- clear: function (e) {
6326
- var $input = $(e.currentTarget).prev();
6327
- if ($input.hasClass('background-color')) {
6328
- $input.parents('table').find('.background-opacity').hide();
6329
- }
6330
-
6331
- $(this).prev('input').trigger('change.clear').wpColorPicker('close');
6332
-
6333
- if ($('form#post input#post_type').val() === 'popup_theme') {
6334
- PopMakeAdmin.update_theme();
6335
- }
6336
  }
6337
  });
6338
  }
@@ -6343,6 +6324,29 @@ var PUMColorPickers;
6343
  $(this).parents('.wp-picker-active').find('input.color-picker').trigger('change');
6344
  setTimeout(PopMakeAdmin.update_theme, 500);
6345
  })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6346
  .on('pum_init', PUMColorPickers.init);
6347
  }(jQuery, document));
6348
  var PUMConditions;
@@ -7223,10 +7227,10 @@ var PUMRangeSLiders;
7223
 
7224
  $slider
7225
  .prop({
7226
- 'min': min || 0,
7227
- 'max': force || (max && max > value) ? max : value * 1.5,
7228
- 'step': step || value * 1.5 / 100,
7229
- 'value': value
7230
  })
7231
  .on('change input', function () {
7232
  $this.trigger('input');
6309
  $('.color-picker').filter(':not(.initialized)')
6310
  .addClass('initialized')
6311
  .wpColorPicker({
6312
+ change: function (event, ui) {
6313
+ $(event.target).trigger('colorchange', ui);
 
 
 
 
 
 
 
 
 
 
6314
  },
6315
+ clear: function (event) {
6316
+ $(event.target).prev().trigger('colorchange').wpColorPicker('close');
 
 
 
 
 
 
 
 
 
6317
  }
6318
  });
6319
  }
6324
  $(this).parents('.wp-picker-active').find('input.color-picker').trigger('change');
6325
  setTimeout(PopMakeAdmin.update_theme, 500);
6326
  })
6327
+ .on('colorchange', function (event, ui) {
6328
+ var $input = $(event.target),
6329
+ $opacity = $input.parents('tr').next('tr.background-opacity'),
6330
+ color = '';
6331
+
6332
+ if (ui !== undefined && ui.color !== undefined) {
6333
+ color = ui.color.toString();
6334
+ }
6335
+
6336
+ if ($input.hasClass('background-color')) {
6337
+ if (typeof color === 'string' && color.length) {
6338
+ $opacity.show();
6339
+ } else {
6340
+ $opacity.hide();
6341
+ }
6342
+ }
6343
+
6344
+ $input.val(color);
6345
+
6346
+ if ($('form#post input#post_type').val() === 'popup_theme') {
6347
+ PopMakeAdmin.update_theme();
6348
+ }
6349
+ })
6350
  .on('pum_init', PUMColorPickers.init);
6351
  }(jQuery, document));
6352
  var PUMConditions;
7227
 
7228
  $slider
7229
  .prop({
7230
+ min: min || 0,
7231
+ max: ( force || (max && max > value) ) ? max : value * 1.5,
7232
+ step: step || value * 1.5 / 100,
7233
+ value: value
7234
  })
7235
  .on('change input', function () {
7236
  $this.trigger('input');
assets/js/admin.min.js CHANGED
@@ -1,4 +1,4 @@
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):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.pumselect2&&e.fn.pumselect2.amd)var t=e.fn.pumselect2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,i;!function(t){function o(e,t){return b.call(e,t)}function r(e,t){var n,i,o,r,s,a,l,c,p,u,d,h=t&&t.split("/"),f=_.map,m=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(e=e.split("/"),s=e.length-1,_.nodeIdCompat&&x.test(e[s])&&(e[s]=e[s].replace(x,"")),e=h.slice(0,h.length-1).concat(e),p=0;p<e.length;p+=1)if(d=e[p],"."===d)e.splice(p,1),p-=1;else if(".."===d){if(1===p&&(".."===e[2]||".."===e[0]))break;p>0&&(e.splice(p-1,2),p-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||m)&&f){for(n=e.split("/"),p=n.length;p>0;p-=1){if(i=n.slice(0,p).join("/"),h)for(u=h.length;u>0;u-=1)if(o=f[h.slice(0,u).join("/")],o&&(o=o[i])){r=o,a=p;break}if(r)break;!l&&m&&m[i]&&(l=m[i],c=p)}!r&&l&&(r=l,a=c),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function s(e,n){return function(){var i=w.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),h.apply(t,i.concat([e,n]))}}function a(e){return function(t){return r(t,e)}}function l(e){return function(t){g[e]=t}}function c(e){if(o(v,e)){var n=v[e];delete v[e],y[e]=!0,d.apply(t,n)}if(!o(g,e)&&!o(y,e))throw new Error("No "+e);return g[e]}function p(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function u(e){return function(){return _&&_.config&&_.config[e]||{}}}var d,h,f,m,g={},v={},_={},y={},b=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;f=function(e,t){var n,i=p(e),o=i[0];return e=i[1],o&&(o=r(o,t),n=c(o)),o?e=n&&n.normalize?n.normalize(e,a(t)):r(e,t):(e=r(e,t),i=p(e),o=i[0],e=i[1],o&&(n=c(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},m={require:function(e){return s(e)},exports:function(e){var t=g[e];return"undefined"!=typeof t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:u(e)}}},d=function(e,n,i,r){var a,p,u,d,h,_,b=[],w=typeof i;if(r=r||e,"undefined"===w||"function"===w){for(n=!n.length&&i.length?["require","exports","module"]:n,h=0;h<n.length;h+=1)if(d=f(n[h],r),p=d.f,"require"===p)b[h]=m.require(e);else if("exports"===p)b[h]=m.exports(e),_=!0;else if("module"===p)a=b[h]=m.module(e);else if(o(g,p)||o(v,p)||o(y,p))b[h]=c(p);else{if(!d.p)throw new Error(e+" missing "+p);d.p.load(d.n,s(r,!0),l(p),{}),b[h]=g[p]}u=i?i.apply(g[e],b):void 0,e&&(a&&a.exports!==t&&a.exports!==g[e]?g[e]=a.exports:u===t&&_||(g[e]=u))}else e&&(g[e]=i)},e=n=h=function(e,n,i,o,r){if("string"==typeof e)return m[e]?m[e](n):c(f(e,n).f);if(!e.splice){if(_=e,_.deps&&h(_.deps,_.callback),!n)return;n.splice?(e=n,n=i,i=null):e=t}return n=n||function(){},"function"==typeof i&&(i=o,o=r),o?d(t,e,n,i):setTimeout(function(){d(t,e,n,i)},4),h},h.config=function(e){return h(e)},e._defined=g,i=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=[]),o(g,e)||o(v,e)||(v[e]=[e,t,n])},i.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&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."),t}),t.define("pumselect2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var i in t){var o=t[i];"function"==typeof o&&"constructor"!==i&&n.push(i)}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var o in t)i.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function i(){var t=Array.prototype.unshift,i=n.prototype.constructor.length,o=e.prototype.constructor;i>0&&(t.call(arguments,e.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=i}var r=t(n),s=t(e);n.displayName=e.displayName,i.prototype=new o;for(var a=0;a<s.length;a++){var l=s[a];i.prototype[l]=e.prototype[l]}for(var c=(function(e){var t=function(){};e in i.prototype&&(t=i.prototype[e]);var o=n.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,t),o.apply(this,arguments)}}),p=0;p<r.length;p++){var u=r[p];i.prototype[u]=c(u)}return i};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.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)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;i>n;n++)e[n].apply(this,t)},n.Observable=i,n.generateChars=function(e){for(var t="",n=0;e>n;n++){var i=Math.floor(36*Math.random());t+=i.toString(36)}return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];r=r.substring(0,1).toLowerCase()+r.substring(1),r in i||(i[r]={}),o==n.length-1&&(i[r]=e[t]),i=i[r]}delete e[t]}}return e},n.hasScroll=function(t,n){var i=e(n),o=n.style.overflowX,r=n.style.overflowY;return o!==r||"hidden"!==r&&"visible"!==r?"scroll"===o||"scroll"===r?!0:i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth:!1},n.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]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},n}),t.define("pumselect2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="pumselect2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="pumselect2-results__option"></li>'),o=this.options.get("translations").get(t.message);i.append(n(o(t.args))),i[0].className+=" pumselect2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".pumselect2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)},n.prototype.position=function(e,t){var n=t.find(".pumselect2-results");n.append(e)},n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var i=e.map(n,function(e){return e.id.toString()}),o=t.$results.find(".pumselect2-results__option[aria-selected]");o.each(function(){var t=e(this),n=e.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(o,i)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")});var r=o.filter("[aria-selected=true]");r.length>0?r.first().trigger("mouseenter"):o.first().trigger("mouseenter")})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="pumselect2-results__option";var i={role:"treeitem","aria-selected":"false"};t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]);for(var o in i){var r=i[o];n.setAttribute(o,r)}if(t.children){var s=e(n),a=document.createElement("strong");a.className="pumselect2-results__group";e(a);this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var p=t.children[c],u=this.option(p);l.push(u)}var d=e("<ul></ul>",{"class":"pumselect2-results__options pumselect2-results__options--nested"});d.append(l),s.append(a),s.append(d)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&i.setClasses()}),t.on("unselect",function(){t.isOpen()&&i.setClasses()}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var o=n-1;0===e.length&&(o=0);var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top,a=r.offset().top,l=i.$results.scrollTop()+(a-s);0===o?i.$results.scrollTop(0):0>a-s&&i.$results.scrollTop(l)}}),t.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e),o=n+1;if(!(o>=t.length)){var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),a=r.offset().top+r.outerHeight(!1),l=i.$results.scrollTop()+a-s;0===o?i.$results.scrollTop(0):a>s&&i.$results.scrollTop(l)}}),t.on("results:focus",function(e){e.element.addClass("pumselect2-results__option--highlighted")}),t.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,r=e.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".pumselect2-results__option[aria-selected]",function(t){var n=e(this),o=n.data("data");return"true"===n.attr("aria-selected")?void(i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:o}):i.trigger("close",{})):void i.trigger("select",{originalEvent:t,data:o})}),this.$results.on("mouseenter",".pumselect2-results__option[aria-selected]",function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("pumselect2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){var e=this.$results.find(".pumselect2-results__option--highlighted");return e},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),i=this.$results.offset().top,o=e.offset().top,r=this.$results.scrollTop()+(o-i),s=o-i;r-=2*e.outerHeight(!1),2>=n?this.$results.scrollTop(0):(s>this.$results.outerHeight()||0>s)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(t,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):e(n).append(r)},n}),t.define("pumselect2/keys",[],function(){var e={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};return e}),t.define("pumselect2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<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")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,o=(e.id+"-container",e.id+"-results");this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.pumselect2."+t.id,function(t){var n=e(t.target),i=n.closest(".pumselect2"),o=e(".pumselect2.pumselect2-container--open");o.each(function(){var t=e(this);if(this!=i[0]){var n=t.data("element");n.pumselect2("close")}})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.pumselect2."+t.id)},i.prototype.position=function(e,t){var n=t.find(".selection");n.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}),t.define("pumselect2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__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},o.prototype.bind=function(e,t){var n=this;o.__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)})},o.prototype.clear=function(){this.$selection.find(".pumselect2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0===e.length)return void this.clear();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)},o}),t.define("pumselect2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("pumselect2-selection--multiple"),e.html('<ul class="pumselect2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".pumselect2-selection__choice__remove",function(t){if(!o.options.get("disabled")){var n=e(this),i=n.parent(),r=i.data("data");o.trigger("unselect",{originalEvent:t,data:r})}})},i.prototype.clear=function(){this.$selection.find(".pumselect2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(e,t))},i.prototype.selectionContainer=function(){var t=e('<li class="pumselect2-selection__choice"><span class="pumselect2-selection__choice__remove" role="presentation">&times;</span></li>');return t},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var o=e[i],r=this.selectionContainer(),s=this.display(o,r);r.append(s),r.prop("title",o.title||o.text),r.data("data",o),t.push(r)}var a=this.$selection.find(".pumselect2-selection__rendered");n.appendMany(a,t)}},i}),t.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,i=t.length>1;if(i||n)return e.call(this,t);this.clear();var o=this.createPlaceholder(this.placeholder);this.$selection.find(".pumselect2-selection__rendered").append(o)},t}),t.define("pumselect2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.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)})},n.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"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".pumselect2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="pumselect2-selection__clear">&times;</span>');i.data("data",n),this.$selection.find(".pumselect2-selection__rendered").prepend(i)}},n}),t.define("pumselect2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<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=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var o=this;e.call(this,t,i),t.on("open",function(){o.$search.trigger("focus")}),t.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),t.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),t.on("disable",function(){o.$search.prop("disabled",!0)}),t.on("focus",function(e){o.$search.trigger("focus")}),t.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".pumselect2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".pumselect2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".pumselect2-search--inline",function(e){e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented();var t=e.which;if(t===n.BACKSPACE&&""===o.$search.val()){var i=o.$searchContainer.prev(".pumselect2-selection__choice");if(i.length>0){var r=i.data("data");o.searchRemoveChoice(r),e.preventDefault()}}});var r=document.documentMode,s=r&&11>=r;this.$selection.on("input.searchcheck",".pumselect2-search--inline",function(e){return s?void o.$selection.off("input.search input.searchcheck"):void o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".pumselect2-search--inline",function(e){if(s&&"input"===e.type)return void o.$selection.off("input.search input.searchcheck");var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.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()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".pumselect2-selection__rendered").innerWidth();else{var t=this.$search.val().length+1;e=.75*t+"em"}this.$search.css("width",e)},i}),t.define("pumselect2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,r)){n=n||{};var i=e.Event("pumselect2:"+t,{params:n});o.$element.trigger(i),-1!==e.inArray(t,s)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("pumselect2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("pumselect2/diacritics",[],function(){var e={"Ⓐ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return e}),t.define("pumselect2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),i+=null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4)},t}),t.define("pumselect2/data/select",["./base","../utils","jquery"],function(e,t,n){
2
- function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),o=i.item(e);t.push(o)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];e=[e],e.push.apply(e,i);for(var r=0;r<e.length;r++){var s=e[r].id;-1===n.inArray(s,o)&&o.push(s)}t.$element.val(o),t.$element.trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return e.selected=!1,n(e.element).is("option")?(e.element.selected=!1,void this.$element.trigger("change")):void this.current(function(i){for(var o=[],r=0;r<i.length;r++){var s=i[r].id;s!==e.id&&-1===n.inArray(s,o)&&o.push(s)}t.$element.val(o),t.$element.trigger("change")})},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(e,t){var i=[],o=this,r=this.$element.children();r.each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var r=o.item(t),s=o.matches(e,r);null!==s&&i.push(s)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup"),t.label=e.text):(t=document.createElement("option"),void 0!==t.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 i=n(t),o=this._normalizeItem(e);return o.element=t,n.data(t,"data",o),i},i.prototype.item=function(e){var t={};if(t=n.data(e[0],"data"),null!=t)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 i=e.children("option"),o=[],r=0;r<i.length;r++){var s=n(i[r]),a=this.item(s);o.push(a)}t.children=o}return t=this._normalizeItem(t),t.element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=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)),n.extend({},t,e)},i.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)},i}),t.define("pumselect2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){function i(e){return function(){return n(this).val()==e.id}}for(var o=this,r=this.$element.find("option"),s=r.map(function(){return o.item(n(this)).id}).get(),a=[],l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var p=r.filter(i(c)),u=this.item(p),d=n.extend(!0,{},c,u),h=this.option(d);p.replaceWith(h)}else{var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(f,m)}a.push(f)}}return a},i}),t.define("pumselect2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var o=n.ajax(e);return o.then(t),o.fail(i),o}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){function i(){var i=r.transport(r,function(i){var r=o.processResults(i,e);o.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r)},function(){o.trigger("results:message",{message:"errorLoading"})});o._request=i}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&""!==e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),t.define("pumselect2/data/tags",["jquery"],function(e){function t(t,n,i){var o=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var s=i.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,i),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),p=this.option(c);this.$element.append(p)}}return t.prototype.query=function(e,t,n){function i(e,r){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!i({results:l.children},!0),p=l.text===t.term;if(p||c)return r?!1:(e.data=s,void n(e))}if(r)return!0;var u=o.createTag(t);if(null!=u){var d=o.option(u);d.attr("data-pumselect2-tag",!0),o.addOptions([d]),o.insertTag(s,u)}e.results=s,n(e)}var o=this;return this._removeOldTags(),null==t.term||null!=t.page?void e.call(this,t,n):void e.call(this,t,i)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){var n=(this._lastTag,this.$element.find("option[data-pumselect2-tag]"));n.each(function(){this.selected||e(this).remove()})},t}),t.define("pumselect2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".pumselect2-search__field")},t.prototype.query=function(e,t,n){function i(e){o.trigger("select",{data:e})}var o=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,i);r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.focus()),t.term=r.term),e.call(this,t,n)},t.prototype.tokenizer=function(t,n,i,o){for(var r=i.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;){var c=s[a];if(-1!==e.inArray(c,r)){var p=s.substr(0,a),u=e.extend({},n,{term:p}),d=l(u);null!=d?(o(d),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},t}),t.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){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.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){return t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.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(e,t,n){var i=this;this.current(function(o){var r=null!=o?o.length:0;return i.maximumSelectionLength>0&&r>=i.maximumSelectionLength?void i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):void e.call(i,t,n)})},e}),t.define("pumselect2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="pumselect2-dropdown"><span class="pumselect2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("pumselect2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<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=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){var t=o.showSearch(e);t?o.$searchContainer.removeClass("pumselect2-search--hide"):o.$searchContainer.addClass("pumselect2-search--hide")}})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.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;i>=0;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),t.define("pumselect2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);if(!o.loading&&t){var n=o.$results.offset().top+o.$results.outerHeight(!1),i=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1);n+50>=i&&o.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="pumselect2-results__option pumselect2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("pumselect2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!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()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.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},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.pumselect2."+i.id,s="resize.pumselect2."+i.id,a="orientationchange.pumselect2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("pumselect2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(r,function(t){var n=e(this).data("pumselect2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(r+" "+s+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.pumselect2."+i.id,r="resize.pumselect2."+i.id,s="orientationchange.pumselect2."+i.id,a=this.$container.parents().filter(t.hasScroll);a.off(o),e(window).off(o+" "+r+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("pumselect2-dropdown--above"),i=this.$dropdown.hasClass("pumselect2-dropdown--below"),o=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 a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<r.top-a.height,p=l.bottom>r.bottom+a.height,u={left:r.left,top:s.bottom},d=this.$dropdownParent;"static"===d.css("position")&&(d=d.offsetParent());var h=d.offset();u.top-=h.top,u.left-=h.left,n||i||(o="below"),p||!c||n?!c&&p&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(u.top=s.top-a.height),null!=o&&(this.$dropdown.removeClass("pumselect2-dropdown--below pumselect2-dropdown--above").addClass("pumselect2-dropdown--"+o),this.$container.removeClass("pumselect2-container--below pumselect2-container--above").addClass("pumselect2-container--"+o)),this.$dropdownContainer.css(u)},n.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)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("pumselect2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return t.prototype.showSearch=function(t,n){return e(n.data.results)<this.minimumResultsForSearch?!1:t.call(this,n)},t}),t.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}),t.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}),t.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){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},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…"}}}),t.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(e,t,n,i,o,r,s,a,l,c,p,u,d,h,f,m,g,v,_,y,b,w,x,k,$,C,A,P,M){function S(){this.reset()}S.prototype.apply=function(u){if(u=e.extend(!0,{},this.defaults,u),null==u.dataAdapter){if(null!=u.ajax?u.dataAdapter=f:null!=u.data?u.dataAdapter=h:u.dataAdapter=d,u.minimumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,v)),u.maximumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,_)),u.maximumSelectionLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)),u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,m)),null==u.tokenSeparators&&null==u.tokenizer||(u.dataAdapter=c.Decorate(u.dataAdapter,g)),null!=u.query){var M=t(u.amdBase+"compat/query");u.dataAdapter=c.Decorate(u.dataAdapter,M)}if(null!=u.initSelection){var S=t(u.amdBase+"compat/initSelection");u.dataAdapter=c.Decorate(u.dataAdapter,S)}}if(null==u.resultsAdapter&&(u.resultsAdapter=n,null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,k)),null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,x)),u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,A))),null==u.dropdownAdapter){if(u.multiple)u.dropdownAdapter=b;else{var U=c.Decorate(b,w);u.dropdownAdapter=U}if(0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,C)),u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,P)),null!=u.dropdownCssClass||null!=u.dropdownCss||null!=u.adaptDropdownCssClass){var T=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=c.Decorate(u.dropdownAdapter,T)}u.dropdownAdapter=c.Decorate(u.dropdownAdapter,$)}if(null==u.selectionAdapter){if(u.multiple?u.selectionAdapter=o:u.selectionAdapter=i,null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,r)),u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,s)),u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,a)),null!=u.containerCssClass||null!=u.containerCss||null!=u.adaptContainerCssClass){var j=t(u.amdBase+"compat/containerCss");u.selectionAdapter=c.Decorate(u.selectionAdapter,j)}u.selectionAdapter=c.Decorate(u.selectionAdapter,l)}if("string"==typeof u.language)if(u.language.indexOf("-")>0){var O=u.language.split("-"),D=O[0];u.language=[u.language,D]}else u.language=[u.language];if(e.isArray(u.language)){var E=new p;u.language.push("en");for(var q=u.language,I=0;I<q.length;I++){var z=q[I],L={};try{L=p.loadPath(z)}catch(R){try{z=this.defaults.amdLanguageBase+z,L=p.loadPath(z)}catch(H){u.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+z+'" could not be automatically loaded. A fallback will be used instead.');continue}}E.extend(L)}u.translations=E}else{var F=p.loadPath(this.defaults.amdLanguageBase+"en"),N=new p(u.language);N.extend(F),u.translations=N}return u},S.prototype.reset=function(){function t(e){function t(e){return u[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(i,o){if(""===e.trim(i.term))return o;if(o.children&&o.children.length>0){for(var r=e.extend(!0,{},o),s=o.children.length-1;s>=0;s--){var a=o.children[s],l=n(i,a);null==l&&r.children.splice(s,1)}return r.children.length>0?r:n(i,r)}var c=t(o.text).toUpperCase(),p=t(i.term).toUpperCase();return c.indexOf(p)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:M,matcher:n,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"}},S.prototype.set=function(t,n){var i=e.camelCase(t),o={};o[i]=n;var r=c._convertData(o);e.extend(this.defaults,r)};var U=new S;return U}),t.define("pumselect2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var r=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(e){var n=["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 o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var r=t.extend(!0,{},o);r=i._convertData(r);for(var s in r)t.inArray(s,n)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],r[s]):this.options[s]=r[s]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("pumselect2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var o=function(e,n){null!=e.data("pumselect2")&&e.data("pumselect2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),o.__super__.constructor.call(this);var i=e.attr("tabindex")||0;e.data("old-tabindex",i),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var s=this.render();this._placeContainer(s);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var l=this.options.get("dropdownAdapter");this.dropdown=new l(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var p=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){p.trigger("selection:update",{data:e})}),e.addClass("pumselect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("pumselect2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="pumselect2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return 0>=o?"auto":o+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;l>a;a+=1){var c=s[a].replace(/\s/g,""),p=c.match(n);if(null!==p&&p.length>=1)return p[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.pumselect2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this._sync=n.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",t._sync,!1)},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,o){-1===e.inArray(i,n)&&t.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("pumselect2-container--open")}),this.on("close",function(){e.$container.removeClass("pumselect2-container--open")}),this.on("enable",function(){e.$container.removeClass("pumselect2-container--disabled")}),this.on("disable",function(){e.$container.addClass("pumselect2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("pumselect2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],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)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("pumselect2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("pumselect2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("pumselect2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `pumselect2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&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 e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){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==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".pumselect2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("pumselect2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("pumselect2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="pumselect2 pumselect2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("pumselect2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),t.define("pumselect2/compat/utils",["jquery"],function(e){function t(t,n,i){var o,r,s=[];o=e.trim(t.attr("class")),o&&(o=""+o,e(o.split(/\s+/)).each(function(){0===this.indexOf("pumselect2-")&&s.push(this)})),o=e.trim(n.attr("class")),o&&(o=""+o,e(o.split(/\s+/)).each(function(){0!==this.indexOf("pumselect2-")&&(r=i(this),null!=r&&s.push(r))})),t.attr("class",s.join(" "));
3
- }return{syncCssClasses:t}}),t.define("pumselect2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),r=this.options.get("containerCssClass")||"";e.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||n,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},i}),t.define("pumselect2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),r=this.options.get("dropdownCssClass")||"";e.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||n,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},i}),t.define("pumselect2/compat/initSelection",["jquery"],function(e){function t(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 t.prototype.current=function(t,n){var i=this;return this._isInitialized?void t.call(this,n):void this.initSelection.call(null,this.$element,function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),t.define("pumselect2/compat/inputData",["jquery"],function(e){function t(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 t.prototype.current=function(t,n){function i(t,n){var o=[];return t.selected||-1!==e.inArray(t.id,n)?(t.selected=!0,o.push(t)):t.selected=!1,t.children&&o.push.apply(o,i(t.children,n)),o}for(var o=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r];o.push.apply(o,i(s,this.$element.val().split(this._valueSeparator)))}n(o)},t.prototype.select=function(t,n){if(this.options.get("multiple")){var i=this.$element.val();i+=this._valueSeparator+n.id,this.$element.val(i),this.$element.trigger("change")}else this.current(function(t){e.map(t,function(e){e.selected=!1})}),this.$element.val(n.id),this.$element.trigger("change")},t.prototype.unselect=function(e,t){var n=this;t.selected=!1,this.current(function(e){for(var i=[],o=0;o<e.length;o++){var r=e[o];t.id!=r.id&&i.push(r.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("change")})},t.prototype.query=function(e,t,n){for(var i=[],o=0;o<this._currentData.length;o++){var r=this._currentData[o],s=this.matches(t,r);null!==s&&i.push(s)}n({results:i})},t.prototype.addOptions=function(t,n){var i=e.map(n,function(t){return e.data(t[0],"data")});this._currentData.push.apply(this._currentData,i)},t}),t.define("pumselect2/compat/matcher",["jquery"],function(e){function t(t){function n(n,i){var o=e.extend(!0,{},i);if(null==n.term||""===e.trim(n.term))return o;if(i.children){for(var r=i.children.length-1;r>=0;r--){var s=i.children[r],a=t(n.term,s.text,s);a||o.children.splice(r,1)}if(o.children.length>0)return o}return t(n.term,i.text,i)?o:null}return n}return t}),t.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;var i=this.options.get("query");i.call(null,t)},e}),t.define("pumselect2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){var i=n.find(".dropdown-wrapper");i.append(t),t.addClass("pumselect2-dropdown--below"),n.addClass("pumselect2-container--below")},e}),t.define("pumselect2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(i.join(" "),function(e){e.stopPropagation()})},e}),t.define("pumselect2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(i.join(" "),function(e){e.stopPropagation()})},e}),function(n){"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],n):"object"==typeof exports?module.exports=n:n(e)}(function(e){function t(t){var s=t||window.event,a=l.call(arguments,1),c=0,u=0,d=0,h=0,f=0,m=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(u=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=-1*d,d=0),c=0===d?u:d,"deltaY"in s&&(d=-1*s.deltaY,c=d),"deltaX"in s&&(u=s.deltaX,0===d&&(c=-1*u)),0!==d||0!==u){if(1===s.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,d*=g,u*=g}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,d*=v,u*=v}if(h=Math.max(Math.abs(d),Math.abs(u)),(!r||r>h)&&(r=h,i(s,h)&&(r/=40)),i(s,h)&&(c/=40,u/=40,d/=40),c=Math[c>=1?"floor":"ceil"](c/r),u=Math[u>=1?"floor":"ceil"](u/r),d=Math[d>=1?"floor":"ceil"](d/r),p.settings.normalizeOffset&&this.getBoundingClientRect){var _=this.getBoundingClientRect();f=t.clientX-_.left,m=t.clientY-_.top}return t.deltaX=u,t.deltaY=d,t.deltaFactor=r,t.offsetX=f,t.offsetY=m,t.deltaMode=0,a.unshift(t,c,u,d),o&&clearTimeout(o),o=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){r=null}function i(e,t){return p.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var o,r,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var p=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",p.getLineHeight(this)),e.data(this,"mousewheel-page-height",p.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),t.define("jquery.pumselect2",["jquery","jquery-mousewheel","./pumselect2/core","./pumselect2/defaults"],function(e,t,n,i){if(null==e.fn.pumselect2){var o=["open","close","destroy"];e.fn.pumselect2=function(t){if(t=t||{},"object"==typeof t)return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i;return this.each(function(){var n=e(this).data("pumselect2");null==n&&window.console&&console.error&&console.error("The pumselect2('"+t+"') method was called on an element that is not using Select2.");var o=Array.prototype.slice.call(arguments,1);i=n[t].apply(n,o)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.pumselect2.defaults&&(e.fn.pumselect2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.pumselect2");return e.fn.pumselect2.amd=t,n}),function(e,t,n){"use strict";e(t).on("click","#popup_reset_open_count",function(){var t=e(this);t.is(":checked")&&!confirm(pum_admin.I10n.confirm_count_reset)&&t.prop("checked",!1)})}(jQuery,document);var PUMColorPickers;!function(e,t,n){"use strict";PUMColorPickers={init:function(){e(".color-picker").filter(":not(.initialized)").addClass("initialized").wpColorPicker({change:function(t){var n=e(this),i=e(t.currentTarget);i.hasClass("background-color")&&i.parents("table").find(".background-opacity").show(),n.trigger("change.update"),"popup_theme"===e("form#post input#post_type").val()&&PopMakeAdmin.update_theme()},clear:function(t){var n=e(t.currentTarget).prev();n.hasClass("background-color")&&n.parents("table").find(".background-opacity").hide(),e(this).prev("input").trigger("change.clear").wpColorPicker("close"),"popup_theme"===e("form#post input#post_type").val()&&PopMakeAdmin.update_theme()}})}},e(t).on("click",".iris-palette",function(){e(this).parents(".wp-picker-active").find("input.color-picker").trigger("change"),setTimeout(PopMakeAdmin.update_theme,500)}).on("pum_init",PUMColorPickers.init)}(jQuery,document);var PUMConditions;!function(e,t,n){"use strict";PUMConditions={templates:{},addGroup:function(n,i){var o=e("#pum-popup-conditions"),r={index:o.find(".facet-group-wrap").length,conditions:[{target:n||null,not_operand:i||!1,settings:{}}]};o.find(".facet-groups").append(PUMConditions.templates.group(r)),o.find(".facet-builder").addClass("has-conditions"),e(t).trigger("pum_init")},renumber:function(){e("#pum-popup-conditions .facet-group-wrap").each(function(){var t=e(this),n=t.parent().children().index(t);t.data("index",n).find(".facet").each(function(){var t=e(this),i=t.parent().children().index(t);t.data("index",i).find("[name]").each(function(){var e="popup_conditions["+n+"]["+i+"]";this.name=this.name.replace(/popup_conditions\[\d*?\]\[\d*?\]/,e),this.id=this.name})})})}},e(t).on("pum_init",PUMConditions.renumber).ready(function(){e("body.post-type-popup form#post").length&&(PUMConditions.templates.group=wp.template("pum-condition-group"),PUMConditions.templates.facet=wp.template("pum-condition-facet"),PUMConditions.templates.settings={},e("script.tmpl.pum-condition-settings").each(function(){var t=e(this),n=t.attr("id").replace("tmpl-","");PUMConditions.templates.settings[t.data("condition")]=wp.template(n)}),PUMConditions.renumber())}).on("select2:select pumselect2:select","#pum-first-condition",function(){var t=e(this),n=t.val(),i=e("#pum-first-condition-operand"),o=i.is(":checked")?i.val():null;PUMConditions.addGroup(n,o),t.val(null).trigger("change"),i.prop("checked",!1).parents(".pum-condition-target").removeClass("not-operand-checked")}).on("click","#pum-popup-conditions .pum-not-operand",function(){var t=e(this),n=t.find("input"),i=t.parents(".pum-condition-target");n.is(":checked")?(i.removeClass("not-operand-checked"),n.prop("checked",!1)):(i.addClass("not-operand-checked"),n.prop("checked",!0))}).on("change","#pum-popup-conditions select.target",function(){var i=e(this),o=i.val(),r={index:i.parents(".facet-group").find(".facet").length,target:o,settings:{}};""!==o&&o!==i.parents(".facet").data("target")&&PUMConditions.templates.settings[o]!==n&&(i.parents(".facet").data("target",o).find(".facet-settings").html(PUMConditions.templates.settings[o](r)),e(t).trigger("pum_init"))}).on("click","#pum-popup-conditions .facet-group-wrap:last-child .and .add-facet",PUMConditions.addGroup).on("click","#pum-popup-conditions .add-or .add-facet:not(.disabled)",function(){var n=e(this),i=n.parents(".facet-group-wrap"),o={group:i.data("index"),index:i.find(".facet").length,target:null,settings:{}};i.find(".facet-list").append(PUMConditions.templates.facet(o)),e(t).trigger("pum_init")}).on("click","#pum-popup-conditions .remove-facet",function(){var t=e(this),n=e("#pum-popup-conditions"),i=t.parents(".facet"),o=t.parents(".facet-group-wrap");i.remove(),0===o.find(".facet").length&&(o.prev(".facet-group-wrap").find(".and .add-facet").removeClass("disabled"),o.remove(),0===n.find(".facet-group-wrap").length&&n.find(".facet-builder").removeClass("has-conditions")),PUMConditions.renumber()})}(jQuery,document);var PUMCookies;!function(e,t,n){"use strict";var i=pum_admin.I10n,o=pum_admin.defaults;PUMCookies={getLabel:function(e){return i.labels.cookies[e].name},getSettingsDesc:function(e,t){var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},o=_.template(i.labels.cookies[e].settings_column,null,n);return t.I10n=i,o(t)},renumber:function(){e("#pum_popup_cookies_list tbody tr").each(function(){var t=e(this),n=t.parent().children().index(t),i=t.data("index");t.data("index",n),t.find("[name]").each(function(){var e="["+n+"]";this.name=this.name.replace("["+i+"]",e).replace("[]",e)})})},refreshDescriptions:function(){e("#pum_popup_cookies_list tbody tr").each(function(){var t=e(this),n=t.find(".popup_cookies_field_event").val(),i=JSON.parse(t.find(".popup_cookies_field_settings:first").val());t.find("td.settings-column").html(PUMCookies.getSettingsDesc(n,i))})},initEditForm:function(){PUMCookies.updateSessionsCheckbox()},updateSessionsCheckbox:function(){var t=e(".cookie-editor .pum-form"),n=t.find('.field.checkbox.session input[type="checkbox"]').is(":checked"),i=t.find(".field").filter(".time");n?i.hide():i.show()},resetCookieKey:function(){var t=e(this),n=(new Date).getTime().toString(16);t.parents(".pum-form").find(".field.text.name").data("cookiekey",n),t.siblings('input[type="text"]:first').val(n)}},e(t).on("select2:select pumselect2:select","#pum-first-cookie",function(){var t=e(this),r=t.val(),s="pum-cookie-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={};c.cookie_settings=o.cookies[r]!==n?o.cookies[r]:{},c.cookie_settings.name="pum-"+e("#post_ID").val(),c.save_button_text=i.add,c.index=null,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMCookies.initEditForm(),t.val(null).trigger("change")}).on("click",".field.cookiekey button.reset",PUMCookies.resetCookieKey).on("click",".cookie-editor .pum-form .field.checkbox.session",PUMCookies.updateSessionsCheckbox).on("click","#pum_popup_cookies .add-new",function(){var e=wp.template("pum-cookie-add-event");PUMModals.reload("#pum_cookie_add_event_modal",e())}).on("click","#pum_popup_cookies_list .edit",function(t){var n=e(this),o=n.parents("tr:first"),r=o.find(".popup_cookies_field_event").val(),s="pum-cookie-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={index:o.parent().children().index(o),event:r,cookie_settings:JSON.parse(o.find(".popup_cookies_field_settings:first").val())};t.preventDefault(),c.save_button_text=i.save,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMCookies.initEditForm()}).on("click","#pum_popup_cookies_list .remove",function(t){var n=e(this),o=n.parents("tr:first");t.preventDefault(),window.confirm(i.confirm_delete_cookie)&&(o.remove(),e("#pum_popup_cookies_list tbody tr").length||(e("#pum-first-cookie").val(null).trigger("change"),e("#pum_popup_cookie_fields").removeClass("has-cookies")),PUMCookies.renumber())}).on("submit","#pum_cookie_add_event_modal .pum-form",function(t){var r=e("#popup_cookie_add_event").val(),s="pum-cookie-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={};t.preventDefault(),c.cookie_settings=o.cookies[r]!==n?o.cookies[r]:{},c.cookie_settings.name="pum-"+e("#post_ID").val(),c.save_button_text=i.add,c.index=null,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMCookies.initEditForm()}).on("submit",".cookie-editor .pum-form",function(t){var n,o,r,s=e(this),a=(s.find("input.event").val(),s.pumSerializeObject()),l=parseInt(a.index),c=l>=0?e("#pum_popup_cookies_list tbody tr").eq(l):null,p=wp.template("pum-cookie-row");t.preventDefault(),(!l||0>l)&&(a.index=e("#pum_popup_cookies_list tbody tr").length),a.I10n=i,n=p(a),c?c.replaceWith(n):e("#pum_popup_cookies_list tbody").append(n),PUMModals.closeAll(),PUMCookies.renumber(),e("#pum_popup_cookie_fields").addClass("has-cookies"),PUMTriggers.new_cookie>=0&&(o=e("#pum_popup_triggers_list tbody tr").eq(PUMTriggers.new_cookie).find(".popup_triggers_field_settings:first"),r=JSON.parse(o.val()),r.cookie.name[r.cookie.name.indexOf("add_new")]=a.cookie_settings.name,o.val(JSON.stringify(r)),PUMTriggers.new_cookie=!1,PUMTriggers.refreshDescriptions())}).ready(function(){PUMCookies.refreshDescriptions(),e("#pum-first-cookie").val(null).trigger("change")})}(jQuery,document),function(e,t,n){"use strict";var i={init:function(){e("#popmake_popup_auto_open_fields, #popmake_popup_targeting_condition_fields").length&&(i.initialize_popup_page(),i.attachQuickSearchListeners(),i.attachTabsPanelListeners())},attachTabsPanelListeners:function(){e("#poststuff").bind("click",function(t){var n,i,o,r,s,a,l,c,p,u,d,h,f,m,g=e(t.target);if(g.hasClass("nav-tab-link"))i=g.data("type"),o=g.parents(".posttypediv, .taxonomydiv").first(),e("input",o).removeAttr("checked"),e(".tabs-panel-active",o).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),e("#"+i,o).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),e(".tabs",o).removeClass("tabs"),g.parent().addClass("tabs"),e(".quick-search",o).focus(),t.preventDefault();else if(g.hasClass("select-all"))n=/#(.*)$/.exec(t.target.href),n&&n[1]&&(r=e("#"+n[1]+" .tabs-panel-active .menu-item-title input"),r.length===r.filter(":checked").length?r.removeAttr("checked"):r.prop("checked",!0));else if(g.hasClass("submit-add-to-menu")){for(s=g.parents(".options"),a=e('.tabs-panel-active input[type="checkbox"]:checked',s),l=e("textarea",s),c=e(".tagchecklist",s),p=l.val().split(","),u=0;u<p.length;u+=1)p[u]=parseInt(p[u],10);a.each(function(){d=e(this),h=parseInt(d.val(),10),f=d.parent("label").siblings(".menu-item-title").val(),-1===e.inArray(h,p)&&p.push(h),c.append('<span><a class="ntdelbutton" data-id="'+h+'">X</a> '+f+"</span>")}),l.text(p.join(",")),t.preventDefault()}else g.hasClass("ntdelbutton")&&(d=g,m=parseInt(d.data("id"),10),s=g.parents(".options"),l=e("textarea",s),c=e(".tagchecklist",s),p=l.val().split(","),p=e.grep(p,function(e){return parseInt(e,10)!==parseInt(m,10)}),d.parent("span").remove(),l.text(p.join(",")))})},attachQuickSearchListeners:function(){var t;e(".quick-search").keypress(function(n){var o=e(this);return 13===n.which?(i.updateQuickSearchResults(o),!1):(t&&clearTimeout(t),void(t=setTimeout(function(){i.updateQuickSearchResults(o)},400)))}).attr("autocomplete","off")},updateQuickSearchResults:function(t){var n,o,r=2,s=t.val();s.length<r||(n=t.parents(".tabs-panel"),o={action:"menu-quick-search","response-format":"markup",menu:null,"menu-settings-column-nonce":e("#menu-settings-column-nonce").val(),q:s,type:t.attr("name")},e(".spinner",n).show(),e.post(ajaxurl,o,function(e){i.processQuickSearchQueryResponse(e,o,n)}))},processQuickSearchQueryResponse:function(t,n,i){var o,r,s,a=e("form#post"),l={},c=/menu-item[(\[\^]\]*/,p=e("<div>").html(t).find("li");return p.length?(p.each(function(){if(s=e(this),o=c.exec(s.html()),o&&o[1]){for(r=o[1];a.elements["menu-item["+r+"][menu-item-type]"]||l[r];)r-=1;l[r]=!0,r!==o[1]&&s.html(s.html().replace(new RegExp("menu-item\\["+o[1]+"\\]","g"),"menu-item["+r+"]"))}}),e(".categorychecklist",i).html(p),e(".spinner",i).hide(),void e('[name^="menu-item"]').removeAttr("name")):(e(".categorychecklist",i).html("<li><p>noResultsFound</p></li>"),void e(".spinner",i).hide())},initialize_popup_page:function(){var n=function(t){var n,i,o=t.siblings(".options");t.is(":checked")?(o.show(),"popup_targeting_condition_on_entire_site"===t.attr("id")?(n=t.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),i=t.parents(".targeting_condition").siblings(".targeting_condition"),i.hide(),e("> *",i).prop("disabled",!0),n.show(),e("> *",n).prop("disabled",!1)):e("*",o).prop("disabled",!1)):(o.hide(),"popup_targeting_condition_on_entire_site"===t.attr("id")?(n=t.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),i=t.parents(".targeting_condition").siblings(".targeting_condition"),i.show(),e("> *",i).prop("disabled",!1),n.hide(),e("> *",n).prop("disabled",!0)):e("*",o).prop("disabled",!0))},i=function(t){var n=t.parents(".options").find('input[type="checkbox"]:eq(0)'),i=n.attr("name").indexOf("exclude")>=0,o=i?n.attr("name").replace("popup_targeting_condition_exclude_on_specific_",""):n.attr("name").replace("popup_targeting_condition_on_specific_",""),r=e(i?"#exclude_on_specific_"+o:"#on_specific_"+o);t.is(":checked")&&("true"===t.val()?(n.prop("checked",!0),r.show(),e("*",r).prop("disabled",!1)):""===t.val()&&(n.prop("checked",!1),r.hide(),e("*",r).prop("disabled",!0)))},o=function(){e("#popup_auto_open_session_cookie").is(":checked")?e(".not-session-cookie").hide():e(".not-session-cookie").show()},r=function(){e("#popup_auto_open_enabled").is(":checked")?(e(".auto-open-enabled").show(),o()):e(".auto-open-enabled").hide()},s=function(){e("#popup_auto_open_cookie_key").val((new Date).getTime().toString(16))};e('[name^="menu-item"]').removeAttr("name"),e("#title").prop("required",!0),e(t).on("click","#popup_auto_open_session_cookie",function(){o()}).on("click","#popup_auto_open_enabled",function(){r()}).on("click",".popmake-reset-auto-open-cookie-key",function(){s()}),e('#popmake_popup_targeting_condition_fields .targeting_condition > input[type="checkbox"]').on("click",function(){n(e(this))}).each(function(){n(e(this))}),e('input[type="radio"][id*="popup_targeting_condition_"]').on("click",function(){i(e(this))}).each(function(){i(e(this))}),e(".posttypediv, .taxonomydiv").each(function(){var t=e(this),n=e("> ul li"),i=e(".tabs-panel",t);n.removeClass("tabs"),n.eq(0).addClass("tabs"),i.removeClass("tabs-panel-active").addClass("tabs-panel-inactive").removeAttr("style"),i.eq(0).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")}),r(),""===e("#popup_auto_open_cookie_key").val()&&s()}};e(t).ready(function(){i.init(),e(t).trigger("pum_init")})}(jQuery,document);var PUMMarketing;!function(e,t,n){"use strict";PUMMarketing={init:function(){e('#menu-posts-popup ul li a[href="edit.php?post_type=popup&page=extensions"]').css({color:"#9aba27"})}},e(t).ready(PUMMarketing.init)}(jQuery,document);var PUMModals;!function(e,t,n){"use strict";var i,o,r,s=e("html"),a=e(t),l="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUMModals={forceFocus:function(e){r&&!r.contains(e.target)&&(e.stopPropagation(),r.focus())},trapEscapeKey:function(e){27===e.keyCode&&(PUMModals.closeAll(),e.preventDefault())},trapTabKey:function(t){if(9===t.keyCode){var n=r.find("*").filter(l).filter(":visible"),i=e(":focus"),o=n.length,s=n.index(i);t.shiftKey?0===s&&(n.get(o-1).focus(),t.preventDefault()):s===o-1&&(n.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){r.find(".pum-modal-content *").filter(l).filter(":visible").first().focus()},closeAll:function(t){e(".pum-modal-background").off("keydown.pum_modal").hide(0,function(){e("html").css({overflow:"visible",width:"auto"}),i&&(i.attr("aria-hidden","false"),i=null),o.length&&o.focus(),r=null,a.off("focus.pum_modal"),n!==t&&t()}).attr("aria-hidden","true")},show:function(t,a){e(".pum-modal-background").off("keydown.pum_modal").hide(0).attr("aria-hidden","true"),s.data("origwidth",s.innerWidth()).css({overflow:"hidden",width:s.innerWidth()});var l=e(":focus");l.parents(".pum-modal-wrap").length||(o=l),r=e(t),r.on("keydown.pum_modal",function(e){PUMModals.trapEscapeKey(e),PUMModals.trapTabKey(e)}).show(0,function(){i=e("body > *").filter(":visible").not(r),i.attr("aria-hidden","true"),r.trigger("pum_init").on("focus.pum_modal",PUMModals.forceFocus),PUMModals.setFocusToFirstItem(),n!==a&&a()}).attr("aria-hidden","false")},remove:function(t){e(t).remove()},replace:function(t,n){PUMModals.remove(e.trim(t)),e("body").append(e.trim(n))},reload:function(e,t,n){PUMModals.replace(e,t),PUMModals.show(e,n)}},e(t).on("click",".pum-modal-background, .pum-modal-wrap .cancel, .pum-modal-wrap .pum-modal-close",function(t){var n=e(t.target);(n.hasClass("pum-modal-background")||n.hasClass("cancel")||n.hasClass("pum-modal-close")||n.hasClass("submitdelete"))&&(PUMModals.closeAll(),t.preventDefault(),t.stopPropagation())})}(jQuery,document);var PUMRangeSLiders;!function(e,t,n){"use strict";PUMRangeSLiders={init:function(){var n,i,o,r,s,a=e('<input type="range"/>'),l=e('<button type="button" class="popmake-range-plus">+</button>'),c=e('<button type="button" class="popmake-range-minus">-</button>');e(".popmake-range-manual").filter(":not(.initialized)").each(function(){var p=e(this).addClass("initialized"),u=p.data("force-minmax"),d=parseInt(p.prop("min"),0),h=parseInt(p.prop("max"),0),f=parseInt(p.prop("step"),0),m=parseInt(p.val(),0);o=a.clone(),r=l.clone(),s=c.clone(),u&&m>h&&(m=h,p.val(m)),o.prop({min:d||0,max:u||h&&h>m?h:1.5*m,step:f||1.5*m/100,value:m}).on("change input",function(){p.trigger("input")}),p.next().after(s,r),p.before(o),n=t.createElement("input"),n.setAttribute("type","range"),"text"===n.type&&e("input[type=range]").each(function(t,n){i=e(n),o=e("<div />").slider({min:parseInt(i.attr("min"),10)||0,max:parseInt(i.attr("max"),10)||100,value:parseInt(i.attr("value"),10)||0,step:parseInt(i.attr("step"),10)||1,slide:function(t,n){e(this).prev("input").val(n.value)}}),i.after(o).hide()})})}},e(t).on("pum_init",PUMRangeSLiders.init).on("input",'input[type="range"]',function(){var t=e(this);t.siblings(".popmake-range-manual").val(t.val())}).on("click",".popmake-range-manual",function(){var t=e(this);t.prop("readonly",!1)}).on("focusout",".popmake-range-manual",function(){var t=e(this);t.prop("readonly",!0)}).on("change",".popmake-range-manual",function(){var t=e(this),n=parseInt(t.prop("max"),0),i=parseInt(t.prop("step"),0),o=t.data("force-minmax"),r=parseInt(t.val(),0),s=t.prev();o&&r>n&&(r=n,t.val(r)),s.prop({max:o||n&&n>r?n:1.5*r,step:i||1.5*r/100,value:r})}).on("click",".popmake-range-plus",function(t){var n=e(this).siblings(".popmake-range-manual"),i=parseInt(n.prop("step"),0),o=parseInt(n.val(),0),r=o+i,s=n.prev();t.preventDefault(),n.val(r).trigger("input"),s.val(r)}).on("click",".popmake-range-minus",function(t){var n=e(this).siblings(".popmake-range-manual"),i=parseInt(n.prop("step"),0),o=parseInt(n.val(),0),r=o-i,s=n.prev();t.preventDefault(),n.val(r).trigger("input"),s.val(r)})}(jQuery,document);var PUMSelect2Fields;!function(e,t,n){"use strict";e.fn.pumselect2=e.fn.pumselect2||e.fn.select2,PUMSelect2Fields={init:function(){e(".pum-select2 select").filter(":not(.initialized)").each(function(){var t=e(this),i=t.data("current"),o=t.data("objecttype"),r=t.data("objectkey"),s={multiple:!1,dropdownParent:t.parent()};t.attr("multiple")&&(s.multiple=!0),o&&r&&(s=e.extend(s,{ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(e){return{s:e.term,page:e.page,action:"pum_object_search",object_type:o,object_key:r}},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},minimumInputLength:1,templateResult:PUMSelect2Fields.formatObject,templateSelection:PUMSelect2Fields.formatObjectSelection})),t.addClass("initialized").pumselect2(s),i!==n&&("object"!=typeof i&&(i=[i]),o&&r?e.ajax({url:ajaxurl,data:{action:"pum_object_search",object_type:o,object_key:r,include:i},dataType:"json",success:function(n){e.each(n.items,function(e,n){t.find('option[value="'+n.id+'"]').length||t.prepend('<option value="'+n.id+'">'+n.text+"</option>")}),t.val(i).trigger("change")}}):t.val(i).trigger("change"))})},formatObject:function(e){return e.text},formatObjectSelection:function(e){return e.text||e.text}},e(t).on("pum_init",PUMSelect2Fields.init)}(jQuery,document),function(e,t,n){function i(t,n){return-1!==e.inArray(n,t)}function o(e,t,n){var i=t[0];t.length>1?(e[i]||(e[i]=t[1]?{}:[]),o(e[i],t.slice(1),n)):(i||(i=e.length),e[i]=n)}var r="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),s="select,textarea".split(","),a=/\[([^\]]*)\]/g;e.fn.pumSerializeObject=function(t){e.extend({},t);var n={},l=e.extend(!0,{include:[],exclude:[],includeByClass:""},t);return this.find(":input").each(function(){var t;!this.name||this.disabled||i(l.exclude,this.name)||l.include.length&&!i(l.include,this.name)||-1===this.className.indexOf(l.includeByClass)||(t=this.name.replace(a,"[$1").split("["),t[0]&&(this.checked||i(r,this.type)||i(s,this.nodeName.toLowerCase()))&&("checkbox"===this.type&&t.push(""),o(n,t,e(this).val())))}),n}}(jQuery,document);var PUMTabs;!function(e,t,n){"use strict";PUMTabs={init:function(){e(".pum-tabs-container").filter(":not(.initialized)").each(function(){var t=e(this),n=t.find(".tab:first");t.hasClass("vertical-tabs")&&t.css({minHeight:t.find(".tabs").eq(0).outerHeight(!0)}),t.find(".active").removeClass("active"),n.addClass("active"),e(n.find("a").attr("href")).addClass("active"),t.addClass("initialized")})}},e(t).on("pum_init",PUMTabs.init).on("click",".pum-tabs-container .tab",function(t){var n=e(this),i=n.parents(".pum-tabs-container:first"),o=n.find("a").attr("href");i.find(".active").removeClass("active"),n.addClass("active"),e(o).addClass("active"),t.preventDefault()})}(jQuery,document);var PUM_Templates;!function(e,t,n){"use strict";var i=pum_admin.I10n;PUM_Templates={render:function(e,t){var n=wp.template(e);return"object"==typeof t.classes&&(t.classes=t.classes.join(" ")),t=PUM_Templates.prepareMeta(t),n(t)},shortcode:function(t){var n=e.extend(!0,{},{tag:"",meta:{},has_content:!1,content:""},t),i=n.has_content?"pum-shortcode-w-content":"pum-shortcode";return PUM_Templates.render(i,n)},modal:function(t){var n=e.extend(!0,{},{id:"",title:"",description:"",classes:"",save_button:i.save,cancel_button:i.cancel,content:""},t);return PUM_Templates.render("pum-modal",n)},tabs:function(t){var n=t.classes||[],i=e.extend(!0,{},{id:"",vertical:!0,form:!0,classes:"",tabs:{general:{label:"General",content:""}}},t);return i.form&&n.push("tabbed-form"),i.vertical&&n.push("vertical-tabs"),i.classes=i.classes+" "+n.join(" "),PUM_Templates.render("pum-tabs",i)},section:function(t){var n=e.extend(!0,{},{classes:[],fields:[]},t);return PUM_Templates.render("pum-field-section",n)},field:function(t){var i="pum-field-"+t.type,o=[],r=e.extend(!0,{},{type:"text",id:"",id_prefix:"",name:"",label:null,placeholder:"",desc:null,size:"regular",classes:[],value:null,select2:!1,multiple:!1,as_array:!1,options:[],object_type:null,object_key:null,std:null,min:0,max:50,step:1,unit:"px",required:!1,meta:{}},t);if(!e("#tmpl-"+i).length&&("objectselect"!==t.type&&"postselect"!==t.type&&"taxonomyselect"!==t.type||(i="pum-field-select"),!e("#tmpl-"+i).length))return"";switch(r.value||t.std===n||(r.value=t.std),
4
- "string"==typeof r.classes&&(r.classes=r.classes.split(" ")),t["class"]!==n&&r.classes.push(t["class"]),r.required&&(r.meta.required=!0,r.classes.push("pum-required")),t.type){case"select":case"objectselect":case"postselect":case"taxonomyselect":r.options!==n&&(_.each(r.options,function(e,t){var n=!1;r.multiple&&r.value.indexOf(e)!==!1?n="selected":r.multiple||r.value!=e||(n="selected"),o.push(PUM_Templates.prepareMeta({label:t,value:e,meta:{selected:n}}))}),r.options=o),r.multiple&&(r.meta.multiple=!0,r.as_array&&(r.name+="[]"),r.value&&r.value.length||(r.value=[]),"string"==typeof r.value&&(r.value=[r.value])),"select"!==t.type&&(r.select2=!0,r.classes.push("pum-field-objectselect"),r.classes.push("postselect"===t.type?"pum-field-postselect":"pum-field-taxonomyselect"),r.meta["data-objecttype"]="postselect"===t.type?"post_type":"taxonomy",r.meta["data-objectkey"]="postselect"===t.type?t.post_type:t.taxonomy,r.meta["data-current"]=r.value),r.select2&&(r.classes.push("pum-select2"),r.placeholder&&(r.meta["data-placeholder"]=r.placeholder));break;case"multicheck":r.options!==n&&(_.each(r.options,function(e,t){o.push({label:t,value:e,meta:{checked:r.value.indexOf(e)>=0}})}),r.options=o);break;case"checkbox":1===parseInt(r.value,10)&&(r.meta.checked=!0);break;case"rangeslider":r.meta.readonly=!0,r.meta.step=r.step,r.meta.min=r.min,r.meta.max=r.max;break;case"textarea":r.meta.cols=r.cols,r.meta.rows=r.rows}return r.field=PUM_Templates.render(i,r),PUM_Templates.render("pum-field-wrapper",r)},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}}}(jQuery,document);var PUMTriggers;!function(e,t,n){"use strict";var i=pum_admin.I10n,o=pum_admin.defaults;PUMTriggers={new_cookie:!1,getLabel:function(e){return i.labels.triggers[e].name},getSettingsDesc:function(e,t){var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},o=_.template(i.labels.triggers[e].settings_column,null,n);return t.I10n=i,o(t)},renumber:function(){e("#pum_popup_triggers_list tbody tr").each(function(){var t=e(this),n=t.parent().children().index(t),i=t.data("index");t.data("index",n),t.find("input").each(function(){var e="["+n+"]";this.name=this.name.replace("["+i+"]",e).replace("[]",e)})})},refreshDescriptions:function(){e("#pum_popup_triggers_list tbody tr").each(function(){var t=e(this),n=t.find(".popup_triggers_field_type").val(),i=JSON.parse(t.find(".popup_triggers_field_settings:first").val()),o=PUMTriggers.cookie_column_value(i.cookie.name);t.find("td.settings-column").html(PUMTriggers.getSettingsDesc(n,i)),t.find("td.cookie-column code").text(o)})},initEditForm:function(t){var n=e(".trigger-editor .pum-form"),i=e("#name",n),o=t.trigger_settings;e("#pum_popup_cookies_list tbody tr").each(function(){var t=JSON.parse(e(this).find(".popup_cookies_field_settings:first").val());i.find('option[value="'+t.name+'"]').length||e('<option value="'+t.name+'">'+t.name+"</option>").appendTo(i)}),i.val(o.cookie.name),i.trigger("chosen:updated")},cookie_column_value:function(e){var t=i.no_cookie;return e instanceof Array?t=e.join(", "):null!==e&&(t=e),t}},PUMTriggers.refreshDescriptions(),e(t).on("select2:select pumselect2:select","#pum-first-trigger",function(){var t=e(this),r=t.val(),s="pum-trigger-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={};c.trigger_settings=o.triggers[r]!==n?o.triggers[r]:{},c.save_button_text=i.add,c.index=null,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMTriggers.initEditForm(c),t.val(null).trigger("change")}).on("click","#pum_popup_triggers .add-new",function(){var e=wp.template("pum-trigger-add-type");PUMModals.reload("#pum_trigger_add_type_modal",e())}).on("click","#pum_popup_triggers_list .edit",function(t){var n=e(this),o=n.parents("tr:first"),r=o.find(".popup_triggers_field_type").val(),s="pum-trigger-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={index:o.parent().children().index(o),type:r,trigger_settings:JSON.parse(o.find(".popup_triggers_field_settings:first").val())};t.preventDefault(),c.save_button_text=i.save,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMTriggers.initEditForm(c)}).on("click","#pum_popup_triggers_list .remove",function(t){var n=e(this),o=n.parents("tr:first");t.preventDefault(),window.confirm(i.confirm_delete_trigger)&&(o.remove(),e("#pum_popup_triggers_list tbody tr").length||(e("#pum-first-trigger").val(null).trigger("change"),e("#pum_popup_trigger_fields").removeClass("has-triggers")),PUMTriggers.renumber())}).on("submit","#pum_trigger_add_type_modal .pum-form",function(t){var r=e("#popup_trigger_add_type").val(),s="pum-trigger-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={};t.preventDefault(),c.trigger_settings=o.triggers[r]!==n?o.triggers[r]:{},c.save_button_text=i.add,c.index=null,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMTriggers.initEditForm(c)}).on("submit",".trigger-editor .pum-form",function(t){var n,o=e(this),r=(o.find("input.type").val(),o.pumSerializeObject()),s=parseInt(r.index),a=s>=0?e("#pum_popup_triggers_list tbody tr").eq(s):null,l=wp.template("pum-trigger-row");t.preventDefault(),(!s||0>s)&&(r.index=e("#pum_popup_triggers_list tbody tr").length),r.I10n=i,n=l(r),a?a.replaceWith(n):e("#pum_popup_triggers_list tbody").append(n),PUMModals.closeAll(),PUMTriggers.renumber(),PUMTriggers.refreshDescriptions(),e("#pum_popup_trigger_fields").addClass("has-triggers"),null!==r.trigger_settings.cookie.name&&r.trigger_settings.cookie.name.indexOf("add_new")>=0&&(PUMTriggers.new_cookie=r.index,e("#pum_popup_cookie_fields button.add-new").trigger("click"))}).ready(function(){PUMTriggers.refreshDescriptions(),e("#pum-first-trigger").val(null).trigger("change")})}(jQuery,document);var PUMUtils;!function(e,t,n){"use strict";PUMUtils={convert_meta_to_object:function(e){var t,i,o,r={};for(o in e)e.hasOwnProperty(o)&&(t=o.split(/_(.+)?/)[0],i=o.split(/_(.+)?/)[1],r[t]===n&&(r[t]={}),r[t][i]=e[o]);return r},serialize_form:function(t){var n={};return e("[name]",t).each(function(){var t,i,o=e(this).attr("name"),r=e(this).val(),s=o.split("["),a=n,l=s.length;for(t=0;l>t;t+=1)i=s[t].replace("]",""),a[i]||(a[i]={}),t!==s.length-1?a=a[i]:t===s.length-1&&(a[i]=r)}),n},convert_hex:function(e,t){if(n===e)return"";n===t&&(t=100),e=e.replace("#","");var i=parseInt(e.substring(0,2),16),o=parseInt(e.substring(2,4),16),r=parseInt(e.substring(4,6),16),s="rgba("+i+","+o+","+r+","+t/100+")";return s},debounce:function(e,t){var n;return function(){var i=this,o=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(i,o)},t)}},throttle:function(e,t){var n=!1,i=function(){n=!1};return function(){n||(e(),window.setTimeout(i,t),n=!0)}}},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)}}(jQuery,document);var PopMakeAdmin,PUM_Admin;!function(e,t,n){"use strict";var i=e(t);pum_admin.I10n,pum_admin.defaults;PUM_Admin={},PopMakeAdmin={init:function(){e("body.post-type-popup form#post").length&&PopMakeAdmin.initialize_popup_page(),e("body.post-type-popup_theme form#post").length&&PopMakeAdmin.initialize_theme_page()},initialize_popup_page:function(){var n=function(){"custom"===e("#popup_display_size").val()?(e(".custom-size-only").show(),e(".responsive-size-only").hide(),e("#popup_display_custom_height_auto").is(":checked")?e(".custom-size-height-only").hide():e(".custom-size-height-only").show()):(e(".custom-size-only").hide(),"auto"!==e("#popup_display_size").val()?(e(".responsive-size-only").show(),e("#popup_display_custom_height_auto").prop("checked",!1)):e(".responsive-size-only").hide())},i=function(){e(".animation-speed, .animation-origin").hide(),"fade"===e("#popup_display_animation_type").val()?e(".animation-speed").show():"none"!==e("#popup_display_animation_type").val()&&e(".animation-speed, .animation-origin").show()},o=function(){var t=e("#popup_display_location"),n=t.parents("table"),i=t.val();e("tr.top, tr.right, tr.left, tr.bottom",n).hide(),i.indexOf("top")>=0&&e("tr.top").show(),i.indexOf("left")>=0&&e("tr.left").show(),i.indexOf("bottom")>=0&&e("tr.bottom").show(),i.indexOf("right")>=0&&e("tr.right").show()};e("#popuptitlediv").insertAfter("#titlediv"),e("#title").prop("required",!0),e(t).on("change","#popup_theme",function(){var t=e(this),n=e("#edit_theme_link"),i=t.val();n.attr("href",n.data("baseurl")+i)}).on("keydown","#popuptitle",function(t){var n=t.keyCode||t.which;9===n&&(t.preventDefault(),e("#title").focus())}).on("keydown","#title, #popuptitle",function(t){var n,i=t.keyCode||t.which;t.shiftKey||9!==i||(t.preventDefault(),n="title"===e(this).attr("id")?"#popuptitle":"#insert-media-button",e(n).focus())}).on("keydown","#popuptitle, #insert-media-button",function(t){var n,i=t.keyCode||t.which;t.shiftKey&&9===i&&(t.preventDefault(),n="popuptitle"===e(this).attr("id")?"#title":"#popuptitle",e(n).focus())}).on("click","#popup_display_custom_height_auto",function(){n()}).on("change","#popup_display_size",function(){"custom"!==e("#popup_display_size").val()&&"auto"!==e("#popup_display_size").val()&&e("#popup_display_position_fixed, #popup_display_scrollable_content").prop("checked",!1),n()}).on("change","#popup_display_animation_type",function(){i()}).on("change","#popup_display_location",function(){o()}),n(),i(),o()},theme_page_listeners:function(){var n=this;e(t).on("change","select.font-family",function(){e("select.font-weight option, select.font-style option",e(this).parents("table")).prop("selected",!1),n.update_font_selectboxes()}).on("change","select.font-weight, select.font-style",function(){n.update_font_selectboxes()}).on("change input focusout","select, input",function(){n.update_theme()}).on("change","select.border-style",function(){var t=e(this);"none"===t.val()?t.parents("table").find(".border-options").hide():t.parents("table").find(".border-options").show()}).on("change","#popup_theme_close_location",function(){var t=e(this),n=t.parents("table");e("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",n).hide(),e("tr."+t.val(),n).show()})},update_theme:function(){var t,n=e("[name^='popup_theme_']").serializeArray(),i={};for(t=0;n.length>t;t+=1)0===n[t].name.indexOf("popup_theme_")&&(i[n[t].name.replace("popup_theme_","")]=n[t].value);this.retheme_popup(i)},theme_preview_scroll:function(){var t=e("#popmake-theme-editor .empreview, body.post-type-popup_theme form#post #popmake_popup_theme_preview"),n=t.parent(),i=t.offset().top-50;e(window).on("scroll",function(){e("> .postbox:visible",n).index(t)===e("> .postbox:visible",n).length-1&&e(window).scrollTop()>=i?t.css({left:t.offset().left,width:t.width(),height:t.height(),position:"fixed",top:50}):t.removeAttr("style")})},update_font_selectboxes:function(){return e("select.font-family").each(function(){var t,i,o=e(this),r=o.parents("table").find("select.font-weight"),s=o.parents("table").find("select.font-style"),a=r.find("option"),l=s.find("option");if(popmake_google_fonts[o.val()]!==n){if(t=popmake_google_fonts[o.val()],a.hide(),l.hide(),t.variants.length)for(i=0;t.variants.length>i;i+=1)"regular"===t.variants[i]?(e('option[value=""]',r).show(),e('option[value=""]',s).show()):(t.variants[i].indexOf("italic")>=0&&e('option[value="italic"]',s).show(),e('option[value="'+parseInt(t.variants[i],10)+'"]',r).show())}else a.show(),l.show();r.parents("tr:first").show(),r.find("option:visible").length<=1?r.parents("tr:first").hide():r.parents("tr:first").show(),s.parents("tr:first").show(),s.find("option:visible").length<=1?s.parents("tr:first").hide():s.parents("tr:first").show()})},convert_theme_for_preview:function(e){},initialize_theme_page:function(){e("#popuptitlediv").insertAfter("#titlediv");var n=this,i=e("#popup_theme_close_location").parents("table");switch(n.update_theme(),n.theme_page_listeners(),n.theme_preview_scroll(),n.update_font_selectboxes(),e(t).on("click",".popmake-preview",function(t){t.preventDefault(),e("#popmake-preview, #popmake-overlay").css({visibility:"visible"}).show()}).on("click",".popmake-close",function(){e("#popmake-preview, #popmake-overlay").hide()}),e("select.border-style").each(function(){var t=e(this);"none"===t.val()?t.parents("table").find(".border-options").hide():t.parents("table").find(".border-options").show()}),e(".color-picker.background-color").each(function(){var t=e(this);""===t.val()?t.parents("table").find(".background-opacity").hide():t.parents("table").find(".background-opacity").show()}),e("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",i).hide(),e("#popup_theme_close_location").val()){case"topleft":e("tr.topleft",i).show();break;case"topright":e("tr.topright",i).show();break;case"bottomleft":e("tr.bottomleft",i).show();break;case"bottomright":e("tr.bottomright",i).show()}},retheme_popup:function(i){var o,r=e(".empreview .example-popup-overlay, #popmake-overlay"),s=e(".empreview .example-popup, #popmake-preview"),a=e(".title, .popmake-title",s),l=e(".content, .popmake-content",s),c=e(".close-popup, .popmake-close",s),p="yes"===i.container_boxshadow_inset?"inset ":"",u="yes"===i.close_boxshadow_inset?"inset ":"";switch(this.convert_theme_for_preview(i),popmake_google_fonts[i.title_font_family]!==n&&(o="//fonts.googleapis.com/css?family="+i.title_font_family,"normal"!==i.title_font_weight&&(o+=":"+i.title_font_weight),"italic"===i.title_font_style&&(-1===o.indexOf(":")&&(o+=":"),o+="italic"),e("body").append('<link href="'+o+'" rel="stylesheet" type="text/css">')),popmake_google_fonts[i.content_font_family]!==n&&(o="//fonts.googleapis.com/css?family="+i.content_font_family,"normal"!==i.content_font_weight&&(o+=":"+i.content_font_weight),"italic"===i.content_font_style&&(-1===o.indexOf(":")&&(o+=":"),o+="italic"),e("body").append('<link href="'+o+'" rel="stylesheet" type="text/css">')),popmake_google_fonts[i.close_font_family]!==n&&(o="//fonts.googleapis.com/css?family="+i.close_font_family,"normal"!==i.close_font_weight&&(o+=":"+i.close_font_weight),"italic"===i.close_font_style&&(-1===o.indexOf(":")&&(o+=":"),o+="italic"),e("body").append('<link href="'+o+'" rel="stylesheet" type="text/css">')),r.removeAttr("style").css({backgroundColor:PUMUtils.convert_hex(i.overlay_background_color,i.overlay_background_opacity)}),s.removeAttr("style").css({padding:i.container_padding+"px",backgroundColor:PUMUtils.convert_hex(i.container_background_color,i.container_background_opacity),borderStyle:i.container_border_style,borderColor:i.container_border_color,borderWidth:i.container_border_width+"px",borderRadius:i.container_border_radius+"px",boxShadow:p+i.container_boxshadow_horizontal+"px "+i.container_boxshadow_vertical+"px "+i.container_boxshadow_blur+"px "+i.container_boxshadow_spread+"px "+PUMUtils.convert_hex(i.container_boxshadow_color,i.container_boxshadow_opacity)}),a.removeAttr("style").css({color:i.title_font_color,lineHeight:i.title_line_height+"px",fontSize:i.title_font_size+"px",fontFamily:i.title_font_family,fontStyle:i.title_font_style,fontWeight:i.title_font_weight,textAlign:i.title_text_align,textShadow:i.title_textshadow_horizontal+"px "+i.title_textshadow_vertical+"px "+i.title_textshadow_blur+"px "+PUMUtils.convert_hex(i.title_textshadow_color,i.title_textshadow_opacity)}),l.removeAttr("style").css({color:i.content_font_color,fontFamily:i.content_font_family,fontStyle:i.content_font_style,fontWeight:i.content_font_weight}),c.html(i.close_text).removeAttr("style").css({padding:i.close_padding+"px",height:i.close_height>0?i.close_height+"px":"auto",width:i.close_width>0?i.close_width+"px":"auto",backgroundColor:PUMUtils.convert_hex(i.close_background_color,i.close_background_opacity),color:i.close_font_color,lineHeight:i.close_line_height+"px",fontSize:i.close_font_size+"px",fontFamily:i.close_font_family,fontWeight:i.close_font_weight,fontStyle:i.close_font_style,borderStyle:i.close_border_style,borderColor:i.close_border_color,borderWidth:i.close_border_width+"px",borderRadius:i.close_border_radius+"px",boxShadow:u+i.close_boxshadow_horizontal+"px "+i.close_boxshadow_vertical+"px "+i.close_boxshadow_blur+"px "+i.close_boxshadow_spread+"px "+PUMUtils.convert_hex(i.close_boxshadow_color,i.close_boxshadow_opacity),textShadow:i.close_textshadow_horizontal+"px "+i.close_textshadow_vertical+"px "+i.close_textshadow_blur+"px "+PUMUtils.convert_hex(i.close_textshadow_color,i.close_textshadow_opacity)}),i.close_location){case"topleft":c.css({top:i.close_position_top+"px",left:i.close_position_left+"px"});break;case"topright":c.css({top:i.close_position_top+"px",right:i.close_position_right+"px"});break;case"bottomleft":c.css({bottom:i.close_position_bottom+"px",left:i.close_position_left+"px"});break;case"bottomright":c.css({bottom:i.close_position_bottom+"px",right:i.close_position_right+"px"})}e(t).trigger("popmake-admin-retheme",[i])}},i.ready(function(){PopMakeAdmin.init(),i.trigger("pum_init")})}(jQuery,document);
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):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.pumselect2&&e.fn.pumselect2.amd)var t=e.fn.pumselect2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,i;!function(t){function o(e,t){return b.call(e,t)}function r(e,t){var n,i,o,r,s,a,l,c,p,u,d,h=t&&t.split("/"),f=_.map,m=f&&f["*"]||{};if(e&&"."===e.charAt(0))if(t){for(e=e.split("/"),s=e.length-1,_.nodeIdCompat&&x.test(e[s])&&(e[s]=e[s].replace(x,"")),e=h.slice(0,h.length-1).concat(e),p=0;p<e.length;p+=1)if(d=e[p],"."===d)e.splice(p,1),p-=1;else if(".."===d){if(1===p&&(".."===e[2]||".."===e[0]))break;p>0&&(e.splice(p-1,2),p-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((h||m)&&f){for(n=e.split("/"),p=n.length;p>0;p-=1){if(i=n.slice(0,p).join("/"),h)for(u=h.length;u>0;u-=1)if(o=f[h.slice(0,u).join("/")],o&&(o=o[i])){r=o,a=p;break}if(r)break;!l&&m&&m[i]&&(l=m[i],c=p)}!r&&l&&(r=l,a=c),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function s(e,n){return function(){var i=w.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),h.apply(t,i.concat([e,n]))}}function a(e){return function(t){return r(t,e)}}function l(e){return function(t){g[e]=t}}function c(e){if(o(v,e)){var n=v[e];delete v[e],y[e]=!0,d.apply(t,n)}if(!o(g,e)&&!o(y,e))throw new Error("No "+e);return g[e]}function p(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function u(e){return function(){return _&&_.config&&_.config[e]||{}}}var d,h,f,m,g={},v={},_={},y={},b=Object.prototype.hasOwnProperty,w=[].slice,x=/\.js$/;f=function(e,t){var n,i=p(e),o=i[0];return e=i[1],o&&(o=r(o,t),n=c(o)),o?e=n&&n.normalize?n.normalize(e,a(t)):r(e,t):(e=r(e,t),i=p(e),o=i[0],e=i[1],o&&(n=c(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},m={require:function(e){return s(e)},exports:function(e){var t=g[e];return"undefined"!=typeof t?t:g[e]={}},module:function(e){return{id:e,uri:"",exports:g[e],config:u(e)}}},d=function(e,n,i,r){var a,p,u,d,h,_,b=[],w=typeof i;if(r=r||e,"undefined"===w||"function"===w){for(n=!n.length&&i.length?["require","exports","module"]:n,h=0;h<n.length;h+=1)if(d=f(n[h],r),p=d.f,"require"===p)b[h]=m.require(e);else if("exports"===p)b[h]=m.exports(e),_=!0;else if("module"===p)a=b[h]=m.module(e);else if(o(g,p)||o(v,p)||o(y,p))b[h]=c(p);else{if(!d.p)throw new Error(e+" missing "+p);d.p.load(d.n,s(r,!0),l(p),{}),b[h]=g[p]}u=i?i.apply(g[e],b):void 0,e&&(a&&a.exports!==t&&a.exports!==g[e]?g[e]=a.exports:u===t&&_||(g[e]=u))}else e&&(g[e]=i)},e=n=h=function(e,n,i,o,r){if("string"==typeof e)return m[e]?m[e](n):c(f(e,n).f);if(!e.splice){if(_=e,_.deps&&h(_.deps,_.callback),!n)return;n.splice?(e=n,n=i,i=null):e=t}return n=n||function(){},"function"==typeof i&&(i=o,o=r),o?d(t,e,n,i):setTimeout(function(){d(t,e,n,i)},4),h},h.config=function(e){return h(e)},e._defined=g,i=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=[]),o(g,e)||o(v,e)||(v[e]=[e,t,n])},i.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&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."),t}),t.define("pumselect2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var i in t){var o=t[i];"function"==typeof o&&"constructor"!==i&&n.push(i)}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var o in t)i.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function i(){var t=Array.prototype.unshift,i=n.prototype.constructor.length,o=e.prototype.constructor;i>0&&(t.call(arguments,e.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=i}var r=t(n),s=t(e);n.displayName=e.displayName,i.prototype=new o;for(var a=0;a<s.length;a++){var l=s[a];i.prototype[l]=e.prototype[l]}for(var c=(function(e){var t=function(){};e in i.prototype&&(t=i.prototype[e]);var o=n.prototype[e];return function(){var e=Array.prototype.unshift;return e.call(arguments,t),o.apply(this,arguments)}}),p=0;p<r.length;p++){var u=r[p];i.prototype[u]=c(u)}return i};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.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)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;i>n;n++)e[n].apply(this,t)},n.Observable=i,n.generateChars=function(e){for(var t="",n=0;e>n;n++){var i=Math.floor(36*Math.random());t+=i.toString(36)}return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];r=r.substring(0,1).toLowerCase()+r.substring(1),r in i||(i[r]={}),o==n.length-1&&(i[r]=e[t]),i=i[r]}delete e[t]}}return e},n.hasScroll=function(t,n){var i=e(n),o=n.style.overflowX,r=n.style.overflowY;return o!==r||"hidden"!==r&&"visible"!==r?"scroll"===o||"scroll"===r?!0:i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth:!1},n.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]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},n}),t.define("pumselect2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="pumselect2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="pumselect2-results__option"></li>'),o=this.options.get("translations").get(t.message);i.append(n(o(t.args))),i[0].className+=" pumselect2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".pumselect2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)},n.prototype.position=function(e,t){var n=t.find(".pumselect2-results");n.append(e)},n.prototype.sort=function(e){var t=this.options.get("sorter");return t(e)},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var i=e.map(n,function(e){return e.id.toString()}),o=t.$results.find(".pumselect2-results__option[aria-selected]");o.each(function(){var t=e(this),n=e.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(o,i)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")});var r=o.filter("[aria-selected=true]");r.length>0?r.first().trigger("mouseenter"):o.first().trigger("mouseenter")})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="pumselect2-results__option";var i={role:"treeitem","aria-selected":"false"};t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]);for(var o in i){var r=i[o];n.setAttribute(o,r)}if(t.children){var s=e(n),a=document.createElement("strong");a.className="pumselect2-results__group";e(a);this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var p=t.children[c],u=this.option(p);l.push(u)}var d=e("<ul></ul>",{"class":"pumselect2-results__options pumselect2-results__options--nested"});d.append(l),s.append(a),s.append(d)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&i.setClasses()}),t.on("unselect",function(){t.isOpen()&&i.setClasses()}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var o=n-1;0===e.length&&(o=0);var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top,a=r.offset().top,l=i.$results.scrollTop()+(a-s);0===o?i.$results.scrollTop(0):0>a-s&&i.$results.scrollTop(l)}}),t.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e),o=n+1;if(!(o>=t.length)){var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),a=r.offset().top+r.outerHeight(!1),l=i.$results.scrollTop()+a-s;0===o?i.$results.scrollTop(0):a>s&&i.$results.scrollTop(l)}}),t.on("results:focus",function(e){e.element.addClass("pumselect2-results__option--highlighted")}),t.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,r=e.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".pumselect2-results__option[aria-selected]",function(t){var n=e(this),o=n.data("data");return"true"===n.attr("aria-selected")?void(i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:o}):i.trigger("close",{})):void i.trigger("select",{originalEvent:t,data:o})}),this.$results.on("mouseenter",".pumselect2-results__option[aria-selected]",function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("pumselect2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){var e=this.$results.find(".pumselect2-results__option--highlighted");return e},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),i=this.$results.offset().top,o=e.offset().top,r=this.$results.scrollTop()+(o-i),s=o-i;r-=2*e.outerHeight(!1),2>=n?this.$results.scrollTop(0):(s>this.$results.outerHeight()||0>s)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(t,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):e(n).append(r)},n}),t.define("pumselect2/keys",[],function(){var e={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};return e}),t.define("pumselect2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<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")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,o=(e.id+"-container",e.id+"-results");this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.pumselect2."+t.id,function(t){var n=e(t.target),i=n.closest(".pumselect2"),o=e(".pumselect2.pumselect2-container--open");o.each(function(){var t=e(this);if(this!=i[0]){var n=t.data("element");n.pumselect2("close")}})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.pumselect2."+t.id)},i.prototype.position=function(e,t){var n=t.find(".selection");n.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}),t.define("pumselect2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__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},o.prototype.bind=function(e,t){var n=this;o.__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)})},o.prototype.clear=function(){this.$selection.find(".pumselect2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0===e.length)return void this.clear();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)},o}),t.define("pumselect2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("pumselect2-selection--multiple"),e.html('<ul class="pumselect2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".pumselect2-selection__choice__remove",function(t){if(!o.options.get("disabled")){var n=e(this),i=n.parent(),r=i.data("data");o.trigger("unselect",{originalEvent:t,data:r})}})},i.prototype.clear=function(){this.$selection.find(".pumselect2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(e,t))},i.prototype.selectionContainer=function(){var t=e('<li class="pumselect2-selection__choice"><span class="pumselect2-selection__choice__remove" role="presentation">&times;</span></li>');return t},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var o=e[i],r=this.selectionContainer(),s=this.display(o,r);r.append(s),r.prop("title",o.title||o.text),r.data("data",o),t.push(r)}var a=this.$selection.find(".pumselect2-selection__rendered");n.appendMany(a,t)}},i}),t.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,i=t.length>1;if(i||n)return e.call(this,t);this.clear();var o=this.createPlaceholder(this.placeholder);this.$selection.find(".pumselect2-selection__rendered").append(o)},t}),t.define("pumselect2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.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)})},n.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"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".pumselect2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="pumselect2-selection__clear">&times;</span>');i.data("data",n),this.$selection.find(".pumselect2-selection__rendered").prepend(i)}},n}),t.define("pumselect2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<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=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var o=this;e.call(this,t,i),t.on("open",function(){o.$search.trigger("focus")}),t.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),t.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),t.on("disable",function(){o.$search.prop("disabled",!0)}),t.on("focus",function(e){o.$search.trigger("focus")}),t.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".pumselect2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".pumselect2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".pumselect2-search--inline",function(e){e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented();var t=e.which;if(t===n.BACKSPACE&&""===o.$search.val()){var i=o.$searchContainer.prev(".pumselect2-selection__choice");if(i.length>0){var r=i.data("data");o.searchRemoveChoice(r),e.preventDefault()}}});var r=document.documentMode,s=r&&11>=r;this.$selection.on("input.searchcheck",".pumselect2-search--inline",function(e){return s?void o.$selection.off("input.search input.searchcheck"):void o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".pumselect2-search--inline",function(e){if(s&&"input"===e.type)return void o.$selection.off("input.search input.searchcheck");var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.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()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".pumselect2-selection__rendered").innerWidth();else{var t=this.$search.val().length+1;e=.75*t+"em"}this.$search.css("width",e)},i}),t.define("pumselect2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,r)){n=n||{};var i=e.Event("pumselect2:"+t,{params:n});o.$element.trigger(i),-1!==e.inArray(t,s)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("pumselect2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("pumselect2/diacritics",[],function(){var e={"Ⓐ":"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","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return e}),t.define("pumselect2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),i+=null!=n.id?"-"+n.id.toString():"-"+e.generateChars(4)},t}),t.define("pumselect2/data/select",["./base","../utils","jquery"],function(e,t,n){
2
+ function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),o=i.item(e);t.push(o)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];e=[e],e.push.apply(e,i);for(var r=0;r<e.length;r++){var s=e[r].id;-1===n.inArray(s,o)&&o.push(s)}t.$element.val(o),t.$element.trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple"))return e.selected=!1,n(e.element).is("option")?(e.element.selected=!1,void this.$element.trigger("change")):void this.current(function(i){for(var o=[],r=0;r<i.length;r++){var s=i[r].id;s!==e.id&&-1===n.inArray(s,o)&&o.push(s)}t.$element.val(o),t.$element.trigger("change")})},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(e,t){var i=[],o=this,r=this.$element.children();r.each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var r=o.item(t),s=o.matches(e,r);null!==s&&i.push(s)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup"),t.label=e.text):(t=document.createElement("option"),void 0!==t.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 i=n(t),o=this._normalizeItem(e);return o.element=t,n.data(t,"data",o),i},i.prototype.item=function(e){var t={};if(t=n.data(e[0],"data"),null!=t)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 i=e.children("option"),o=[],r=0;r<i.length;r++){var s=n(i[r]),a=this.item(s);o.push(a)}t.children=o}return t=this._normalizeItem(t),t.element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=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)),n.extend({},t,e)},i.prototype.matches=function(e,t){var n=this.options.get("matcher");return n(e,t)},i}),t.define("pumselect2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){function i(e){return function(){return n(this).val()==e.id}}for(var o=this,r=this.$element.find("option"),s=r.map(function(){return o.item(n(this)).id}).get(),a=[],l=0;l<e.length;l++){var c=this._normalizeItem(e[l]);if(n.inArray(c.id,s)>=0){var p=r.filter(i(c)),u=this.item(p),d=n.extend(!0,{},c,u),h=this.option(d);p.replaceWith(h)}else{var f=this.option(c);if(c.children){var m=this.convertToOptions(c.children);t.appendMany(f,m)}a.push(f)}}return a},i}),t.define("pumselect2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var o=n.ajax(e);return o.then(t),o.fail(i),o}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){function i(){var i=r.transport(r,function(i){var r=o.processResults(i,e);o.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r)},function(){o.trigger("results:message",{message:"errorLoading"})});o._request=i}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&""!==e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),t.define("pumselect2/data/tags",["jquery"],function(e){function t(t,n,i){var o=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var s=i.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,i),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),p=this.option(c);this.$element.append(p)}}return t.prototype.query=function(e,t,n){function i(e,r){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!i({results:l.children},!0),p=l.text===t.term;if(p||c)return r?!1:(e.data=s,void n(e))}if(r)return!0;var u=o.createTag(t);if(null!=u){var d=o.option(u);d.attr("data-pumselect2-tag",!0),o.addOptions([d]),o.insertTag(s,u)}e.results=s,n(e)}var o=this;return this._removeOldTags(),null==t.term||null!=t.page?void e.call(this,t,n):void e.call(this,t,i)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){var n=(this._lastTag,this.$element.find("option[data-pumselect2-tag]"));n.each(function(){this.selected||e(this).remove()})},t}),t.define("pumselect2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".pumselect2-search__field")},t.prototype.query=function(e,t,n){function i(e){o.trigger("select",{data:e})}var o=this;t.term=t.term||"";var r=this.tokenizer(t,this.options,i);r.term!==t.term&&(this.$search.length&&(this.$search.val(r.term),this.$search.focus()),t.term=r.term),e.call(this,t,n)},t.prototype.tokenizer=function(t,n,i,o){for(var r=i.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;){var c=s[a];if(-1!==e.inArray(c,r)){var p=s.substr(0,a),u=e.extend({},n,{term:p}),d=l(u);null!=d?(o(d),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},t}),t.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){return t.term=t.term||"",t.term.length<this.minimumInputLength?void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.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){return t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):void e.call(this,t,n)},e}),t.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(e,t,n){var i=this;this.current(function(o){var r=null!=o?o.length:0;return i.maximumSelectionLength>0&&r>=i.maximumSelectionLength?void i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}}):void e.call(i,t,n)})},e}),t.define("pumselect2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="pumselect2-dropdown"><span class="pumselect2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("pumselect2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<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=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){var t=o.showSearch(e);t?o.$searchContainer.removeClass("pumselect2-search--hide"):o.$searchContainer.addClass("pumselect2-search--hide")}})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.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;i>=0;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),t.define("pumselect2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);if(!o.loading&&t){var n=o.$results.offset().top+o.$results.outerHeight(!1),i=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1);n+50>=i&&o.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="pumselect2-results__option pumselect2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("pumselect2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!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()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.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},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.pumselect2."+i.id,s="resize.pumselect2."+i.id,a="orientationchange.pumselect2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("pumselect2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(r,function(t){var n=e(this).data("pumselect2-scroll-position");e(this).scrollTop(n.y)}),e(window).on(r+" "+s+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.pumselect2."+i.id,r="resize.pumselect2."+i.id,s="orientationchange.pumselect2."+i.id,a=this.$container.parents().filter(t.hasScroll);a.off(o),e(window).off(o+" "+r+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("pumselect2-dropdown--above"),i=this.$dropdown.hasClass("pumselect2-dropdown--below"),o=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 a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<r.top-a.height,p=l.bottom>r.bottom+a.height,u={left:r.left,top:s.bottom},d=this.$dropdownParent;"static"===d.css("position")&&(d=d.offsetParent());var h=d.offset();u.top-=h.top,u.left-=h.left,n||i||(o="below"),p||!c||n?!c&&p&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(u.top=s.top-a.height),null!=o&&(this.$dropdown.removeClass("pumselect2-dropdown--below pumselect2-dropdown--above").addClass("pumselect2-dropdown--"+o),this.$container.removeClass("pumselect2-container--below pumselect2-container--above").addClass("pumselect2-container--"+o)),this.$dropdownContainer.css(u)},n.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)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("pumselect2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return t.prototype.showSearch=function(t,n){return e(n.data.results)<this.minimumResultsForSearch?!1:t.call(this,n)},t}),t.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}),t.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}),t.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){var t=e.minimum-e.input.length,n="Please enter "+t+" or more characters";return n},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…"}}}),t.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(e,t,n,i,o,r,s,a,l,c,p,u,d,h,f,m,g,v,_,y,b,w,x,k,$,C,A,P,M){function S(){this.reset()}S.prototype.apply=function(u){if(u=e.extend(!0,{},this.defaults,u),null==u.dataAdapter){if(null!=u.ajax?u.dataAdapter=f:null!=u.data?u.dataAdapter=h:u.dataAdapter=d,u.minimumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,v)),u.maximumInputLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,_)),u.maximumSelectionLength>0&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)),u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,m)),null==u.tokenSeparators&&null==u.tokenizer||(u.dataAdapter=c.Decorate(u.dataAdapter,g)),null!=u.query){var M=t(u.amdBase+"compat/query");u.dataAdapter=c.Decorate(u.dataAdapter,M)}if(null!=u.initSelection){var S=t(u.amdBase+"compat/initSelection");u.dataAdapter=c.Decorate(u.dataAdapter,S)}}if(null==u.resultsAdapter&&(u.resultsAdapter=n,null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,k)),null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,x)),u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,A))),null==u.dropdownAdapter){if(u.multiple)u.dropdownAdapter=b;else{var U=c.Decorate(b,w);u.dropdownAdapter=U}if(0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,C)),u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,P)),null!=u.dropdownCssClass||null!=u.dropdownCss||null!=u.adaptDropdownCssClass){var j=t(u.amdBase+"compat/dropdownCss");u.dropdownAdapter=c.Decorate(u.dropdownAdapter,j)}u.dropdownAdapter=c.Decorate(u.dropdownAdapter,$)}if(null==u.selectionAdapter){if(u.multiple?u.selectionAdapter=o:u.selectionAdapter=i,null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,r)),u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,s)),u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,a)),null!=u.containerCssClass||null!=u.containerCss||null!=u.adaptContainerCssClass){var O=t(u.amdBase+"compat/containerCss");u.selectionAdapter=c.Decorate(u.selectionAdapter,O)}u.selectionAdapter=c.Decorate(u.selectionAdapter,l)}if("string"==typeof u.language)if(u.language.indexOf("-")>0){var T=u.language.split("-"),D=T[0];u.language=[u.language,D]}else u.language=[u.language];if(e.isArray(u.language)){var E=new p;u.language.push("en");for(var q=u.language,I=0;I<q.length;I++){var z=q[I],L={};try{L=p.loadPath(z)}catch(R){try{z=this.defaults.amdLanguageBase+z,L=p.loadPath(z)}catch(H){u.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+z+'" could not be automatically loaded. A fallback will be used instead.');continue}}E.extend(L)}u.translations=E}else{var F=p.loadPath(this.defaults.amdLanguageBase+"en"),N=new p(u.language);N.extend(F),u.translations=N}return u},S.prototype.reset=function(){function t(e){function t(e){return u[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(i,o){if(""===e.trim(i.term))return o;if(o.children&&o.children.length>0){for(var r=e.extend(!0,{},o),s=o.children.length-1;s>=0;s--){var a=o.children[s],l=n(i,a);null==l&&r.children.splice(s,1)}return r.children.length>0?r:n(i,r)}var c=t(o.text).toUpperCase(),p=t(i.term).toUpperCase();return c.indexOf(p)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:M,matcher:n,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"}},S.prototype.set=function(t,n){var i=e.camelCase(t),o={};o[i]=n;var r=c._convertData(o);e.extend(this.defaults,r)};var U=new S;return U}),t.define("pumselect2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var r=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(e){var n=["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 o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var r=t.extend(!0,{},o);r=i._convertData(r);for(var s in r)t.inArray(s,n)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],r[s]):this.options[s]=r[s]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("pumselect2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var o=function(e,n){null!=e.data("pumselect2")&&e.data("pumselect2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),o.__super__.constructor.call(this);var i=e.attr("tabindex")||0;e.data("old-tabindex",i),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var s=this.render();this._placeContainer(s);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var l=this.options.get("dropdownAdapter");this.dropdown=new l(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var p=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){p.trigger("selection:update",{data:e})}),e.addClass("pumselect2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("pumselect2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="pumselect2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return 0>=o?"auto":o+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;l>a;a+=1){var c=s[a].replace(/\s/g,""),p=c.match(n);if(null!==p&&p.length>=1)return p[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.pumselect2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this._sync=n.bind(this._syncAttributes,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._sync);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._sync)}),this._observer.observe(this.$element[0],{attributes:!0,subtree:!1})):this.$element[0].addEventListener&&this.$element[0].addEventListener("DOMAttrModified",t._sync,!1)},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,o){-1===e.inArray(i,n)&&t.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("pumselect2-container--open")}),this.on("close",function(){e.$container.removeClass("pumselect2-container--open")}),this.on("enable",function(){e.$container.removeClass("pumselect2-container--disabled")}),this.on("disable",function(){e.$container.addClass("pumselect2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("pumselect2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],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)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("pumselect2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("pumselect2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("pumselect2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `pumselect2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&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 e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){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==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._sync),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&this.$element[0].removeEventListener("DOMAttrModified",this._sync,!1),this._sync=null,this.$element.off(".pumselect2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("pumselect2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("pumselect2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="pumselect2 pumselect2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("pumselect2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),t.define("pumselect2/compat/utils",["jquery"],function(e){function t(t,n,i){var o,r,s=[];o=e.trim(t.attr("class")),o&&(o=""+o,e(o.split(/\s+/)).each(function(){0===this.indexOf("pumselect2-")&&s.push(this)})),o=e.trim(n.attr("class")),o&&(o=""+o,e(o.split(/\s+/)).each(function(){0!==this.indexOf("pumselect2-")&&(r=i(this),null!=r&&s.push(r))})),t.attr("class",s.join(" "));
3
+ }return{syncCssClasses:t}}),t.define("pumselect2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),r=this.options.get("containerCssClass")||"";e.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||n,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},i}),t.define("pumselect2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),r=this.options.get("dropdownCssClass")||"";e.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||n,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},i}),t.define("pumselect2/compat/initSelection",["jquery"],function(e){function t(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 t.prototype.current=function(t,n){var i=this;return this._isInitialized?void t.call(this,n):void this.initSelection.call(null,this.$element,function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),t.define("pumselect2/compat/inputData",["jquery"],function(e){function t(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 t.prototype.current=function(t,n){function i(t,n){var o=[];return t.selected||-1!==e.inArray(t.id,n)?(t.selected=!0,o.push(t)):t.selected=!1,t.children&&o.push.apply(o,i(t.children,n)),o}for(var o=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r];o.push.apply(o,i(s,this.$element.val().split(this._valueSeparator)))}n(o)},t.prototype.select=function(t,n){if(this.options.get("multiple")){var i=this.$element.val();i+=this._valueSeparator+n.id,this.$element.val(i),this.$element.trigger("change")}else this.current(function(t){e.map(t,function(e){e.selected=!1})}),this.$element.val(n.id),this.$element.trigger("change")},t.prototype.unselect=function(e,t){var n=this;t.selected=!1,this.current(function(e){for(var i=[],o=0;o<e.length;o++){var r=e[o];t.id!=r.id&&i.push(r.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("change")})},t.prototype.query=function(e,t,n){for(var i=[],o=0;o<this._currentData.length;o++){var r=this._currentData[o],s=this.matches(t,r);null!==s&&i.push(s)}n({results:i})},t.prototype.addOptions=function(t,n){var i=e.map(n,function(t){return e.data(t[0],"data")});this._currentData.push.apply(this._currentData,i)},t}),t.define("pumselect2/compat/matcher",["jquery"],function(e){function t(t){function n(n,i){var o=e.extend(!0,{},i);if(null==n.term||""===e.trim(n.term))return o;if(i.children){for(var r=i.children.length-1;r>=0;r--){var s=i.children[r],a=t(n.term,s.text,s);a||o.children.splice(r,1)}if(o.children.length>0)return o}return t(n.term,i.text,i)?o:null}return n}return t}),t.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;var i=this.options.get("query");i.call(null,t)},e}),t.define("pumselect2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){var i=n.find(".dropdown-wrapper");i.append(t),t.addClass("pumselect2-dropdown--below"),n.addClass("pumselect2-container--below")},e}),t.define("pumselect2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(i.join(" "),function(e){e.stopPropagation()})},e}),t.define("pumselect2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(i.join(" "),function(e){e.stopPropagation()})},e}),function(n){"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],n):"object"==typeof exports?module.exports=n:n(e)}(function(e){function t(t){var s=t||window.event,a=l.call(arguments,1),c=0,u=0,d=0,h=0,f=0,m=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(d=-1*s.detail),"wheelDelta"in s&&(d=s.wheelDelta),"wheelDeltaY"in s&&(d=s.wheelDeltaY),"wheelDeltaX"in s&&(u=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(u=-1*d,d=0),c=0===d?u:d,"deltaY"in s&&(d=-1*s.deltaY,c=d),"deltaX"in s&&(u=s.deltaX,0===d&&(c=-1*u)),0!==d||0!==u){if(1===s.deltaMode){var g=e.data(this,"mousewheel-line-height");c*=g,d*=g,u*=g}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,d*=v,u*=v}if(h=Math.max(Math.abs(d),Math.abs(u)),(!r||r>h)&&(r=h,i(s,h)&&(r/=40)),i(s,h)&&(c/=40,u/=40,d/=40),c=Math[c>=1?"floor":"ceil"](c/r),u=Math[u>=1?"floor":"ceil"](u/r),d=Math[d>=1?"floor":"ceil"](d/r),p.settings.normalizeOffset&&this.getBoundingClientRect){var _=this.getBoundingClientRect();f=t.clientX-_.left,m=t.clientY-_.top}return t.deltaX=u,t.deltaY=d,t.deltaFactor=r,t.offsetX=f,t.offsetY=m,t.deltaMode=0,a.unshift(t,c,u,d),o&&clearTimeout(o),o=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){r=null}function i(e,t){return p.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120===0}var o,r,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var p=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",p.getLineHeight(this)),e.data(this,"mousewheel-page-height",p.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),t.define("jquery.pumselect2",["jquery","jquery-mousewheel","./pumselect2/core","./pumselect2/defaults"],function(e,t,n,i){if(null==e.fn.pumselect2){var o=["open","close","destroy"];e.fn.pumselect2=function(t){if(t=t||{},"object"==typeof t)return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i;return this.each(function(){var n=e(this).data("pumselect2");null==n&&window.console&&console.error&&console.error("The pumselect2('"+t+"') method was called on an element that is not using Select2.");var o=Array.prototype.slice.call(arguments,1);i=n[t].apply(n,o)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.pumselect2.defaults&&(e.fn.pumselect2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.pumselect2");return e.fn.pumselect2.amd=t,n}),function(e,t,n){"use strict";e(t).on("click","#popup_reset_open_count",function(){var t=e(this);t.is(":checked")&&!confirm(pum_admin.I10n.confirm_count_reset)&&t.prop("checked",!1)})}(jQuery,document);var PUMColorPickers;!function(e,t,n){"use strict";PUMColorPickers={init:function(){e(".color-picker").filter(":not(.initialized)").addClass("initialized").wpColorPicker({change:function(t,n){e(t.target).trigger("colorchange",n)},clear:function(t){e(t.target).prev().trigger("colorchange").wpColorPicker("close")}})}},e(t).on("click",".iris-palette",function(){e(this).parents(".wp-picker-active").find("input.color-picker").trigger("change"),setTimeout(PopMakeAdmin.update_theme,500)}).on("colorchange",function(t,i){var o=e(t.target),r=o.parents("tr").next("tr.background-opacity"),s="";i!==n&&i.color!==n&&(s=i.color.toString()),o.hasClass("background-color")&&("string"==typeof s&&s.length?r.show():r.hide()),o.val(s),"popup_theme"===e("form#post input#post_type").val()&&PopMakeAdmin.update_theme()}).on("pum_init",PUMColorPickers.init)}(jQuery,document);var PUMConditions;!function(e,t,n){"use strict";PUMConditions={templates:{},addGroup:function(n,i){var o=e("#pum-popup-conditions"),r={index:o.find(".facet-group-wrap").length,conditions:[{target:n||null,not_operand:i||!1,settings:{}}]};o.find(".facet-groups").append(PUMConditions.templates.group(r)),o.find(".facet-builder").addClass("has-conditions"),e(t).trigger("pum_init")},renumber:function(){e("#pum-popup-conditions .facet-group-wrap").each(function(){var t=e(this),n=t.parent().children().index(t);t.data("index",n).find(".facet").each(function(){var t=e(this),i=t.parent().children().index(t);t.data("index",i).find("[name]").each(function(){var e="popup_conditions["+n+"]["+i+"]";this.name=this.name.replace(/popup_conditions\[\d*?\]\[\d*?\]/,e),this.id=this.name})})})}},e(t).on("pum_init",PUMConditions.renumber).ready(function(){e("body.post-type-popup form#post").length&&(PUMConditions.templates.group=wp.template("pum-condition-group"),PUMConditions.templates.facet=wp.template("pum-condition-facet"),PUMConditions.templates.settings={},e("script.tmpl.pum-condition-settings").each(function(){var t=e(this),n=t.attr("id").replace("tmpl-","");PUMConditions.templates.settings[t.data("condition")]=wp.template(n)}),PUMConditions.renumber())}).on("select2:select pumselect2:select","#pum-first-condition",function(){var t=e(this),n=t.val(),i=e("#pum-first-condition-operand"),o=i.is(":checked")?i.val():null;PUMConditions.addGroup(n,o),t.val(null).trigger("change"),i.prop("checked",!1).parents(".pum-condition-target").removeClass("not-operand-checked")}).on("click","#pum-popup-conditions .pum-not-operand",function(){var t=e(this),n=t.find("input"),i=t.parents(".pum-condition-target");n.is(":checked")?(i.removeClass("not-operand-checked"),n.prop("checked",!1)):(i.addClass("not-operand-checked"),n.prop("checked",!0))}).on("change","#pum-popup-conditions select.target",function(){var i=e(this),o=i.val(),r={index:i.parents(".facet-group").find(".facet").length,target:o,settings:{}};""!==o&&o!==i.parents(".facet").data("target")&&PUMConditions.templates.settings[o]!==n&&(i.parents(".facet").data("target",o).find(".facet-settings").html(PUMConditions.templates.settings[o](r)),e(t).trigger("pum_init"))}).on("click","#pum-popup-conditions .facet-group-wrap:last-child .and .add-facet",PUMConditions.addGroup).on("click","#pum-popup-conditions .add-or .add-facet:not(.disabled)",function(){var n=e(this),i=n.parents(".facet-group-wrap"),o={group:i.data("index"),index:i.find(".facet").length,target:null,settings:{}};i.find(".facet-list").append(PUMConditions.templates.facet(o)),e(t).trigger("pum_init")}).on("click","#pum-popup-conditions .remove-facet",function(){var t=e(this),n=e("#pum-popup-conditions"),i=t.parents(".facet"),o=t.parents(".facet-group-wrap");i.remove(),0===o.find(".facet").length&&(o.prev(".facet-group-wrap").find(".and .add-facet").removeClass("disabled"),o.remove(),0===n.find(".facet-group-wrap").length&&n.find(".facet-builder").removeClass("has-conditions")),PUMConditions.renumber()})}(jQuery,document);var PUMCookies;!function(e,t,n){"use strict";var i=pum_admin.I10n,o=pum_admin.defaults;PUMCookies={getLabel:function(e){return i.labels.cookies[e].name},getSettingsDesc:function(e,t){var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},o=_.template(i.labels.cookies[e].settings_column,null,n);return t.I10n=i,o(t)},renumber:function(){e("#pum_popup_cookies_list tbody tr").each(function(){var t=e(this),n=t.parent().children().index(t),i=t.data("index");t.data("index",n),t.find("[name]").each(function(){var e="["+n+"]";this.name=this.name.replace("["+i+"]",e).replace("[]",e)})})},refreshDescriptions:function(){e("#pum_popup_cookies_list tbody tr").each(function(){var t=e(this),n=t.find(".popup_cookies_field_event").val(),i=JSON.parse(t.find(".popup_cookies_field_settings:first").val());t.find("td.settings-column").html(PUMCookies.getSettingsDesc(n,i))})},initEditForm:function(){PUMCookies.updateSessionsCheckbox()},updateSessionsCheckbox:function(){var t=e(".cookie-editor .pum-form"),n=t.find('.field.checkbox.session input[type="checkbox"]').is(":checked"),i=t.find(".field").filter(".time");n?i.hide():i.show()},resetCookieKey:function(){var t=e(this),n=(new Date).getTime().toString(16);t.parents(".pum-form").find(".field.text.name").data("cookiekey",n),t.siblings('input[type="text"]:first').val(n)}},e(t).on("select2:select pumselect2:select","#pum-first-cookie",function(){var t=e(this),r=t.val(),s="pum-cookie-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={};c.cookie_settings=o.cookies[r]!==n?o.cookies[r]:{},c.cookie_settings.name="pum-"+e("#post_ID").val(),c.save_button_text=i.add,c.index=null,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMCookies.initEditForm(),t.val(null).trigger("change")}).on("click",".field.cookiekey button.reset",PUMCookies.resetCookieKey).on("click",".cookie-editor .pum-form .field.checkbox.session",PUMCookies.updateSessionsCheckbox).on("click","#pum_popup_cookies .add-new",function(){var e=wp.template("pum-cookie-add-event");PUMModals.reload("#pum_cookie_add_event_modal",e())}).on("click","#pum_popup_cookies_list .edit",function(t){var n=e(this),o=n.parents("tr:first"),r=o.find(".popup_cookies_field_event").val(),s="pum-cookie-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={index:o.parent().children().index(o),event:r,cookie_settings:JSON.parse(o.find(".popup_cookies_field_settings:first").val())};t.preventDefault(),c.save_button_text=i.save,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMCookies.initEditForm()}).on("click","#pum_popup_cookies_list .remove",function(t){var n=e(this),o=n.parents("tr:first");t.preventDefault(),window.confirm(i.confirm_delete_cookie)&&(o.remove(),e("#pum_popup_cookies_list tbody tr").length||(e("#pum-first-cookie").val(null).trigger("change"),e("#pum_popup_cookie_fields").removeClass("has-cookies")),PUMCookies.renumber())}).on("submit","#pum_cookie_add_event_modal .pum-form",function(t){var r=e("#popup_cookie_add_event").val(),s="pum-cookie-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={};t.preventDefault(),c.cookie_settings=o.cookies[r]!==n?o.cookies[r]:{},c.cookie_settings.name="pum-"+e("#post_ID").val(),c.save_button_text=i.add,c.index=null,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMCookies.initEditForm()}).on("submit",".cookie-editor .pum-form",function(t){var n,o,r,s=e(this),a=(s.find("input.event").val(),s.pumSerializeObject()),l=parseInt(a.index),c=l>=0?e("#pum_popup_cookies_list tbody tr").eq(l):null,p=wp.template("pum-cookie-row");t.preventDefault(),(!l||0>l)&&(a.index=e("#pum_popup_cookies_list tbody tr").length),a.I10n=i,n=p(a),c?c.replaceWith(n):e("#pum_popup_cookies_list tbody").append(n),PUMModals.closeAll(),PUMCookies.renumber(),e("#pum_popup_cookie_fields").addClass("has-cookies"),PUMTriggers.new_cookie>=0&&(o=e("#pum_popup_triggers_list tbody tr").eq(PUMTriggers.new_cookie).find(".popup_triggers_field_settings:first"),r=JSON.parse(o.val()),r.cookie.name[r.cookie.name.indexOf("add_new")]=a.cookie_settings.name,o.val(JSON.stringify(r)),PUMTriggers.new_cookie=!1,PUMTriggers.refreshDescriptions())}).ready(function(){PUMCookies.refreshDescriptions(),e("#pum-first-cookie").val(null).trigger("change")})}(jQuery,document),function(e,t,n){"use strict";var i={init:function(){e("#popmake_popup_auto_open_fields, #popmake_popup_targeting_condition_fields").length&&(i.initialize_popup_page(),i.attachQuickSearchListeners(),i.attachTabsPanelListeners())},attachTabsPanelListeners:function(){e("#poststuff").bind("click",function(t){var n,i,o,r,s,a,l,c,p,u,d,h,f,m,g=e(t.target);if(g.hasClass("nav-tab-link"))i=g.data("type"),o=g.parents(".posttypediv, .taxonomydiv").first(),e("input",o).removeAttr("checked"),e(".tabs-panel-active",o).removeClass("tabs-panel-active").addClass("tabs-panel-inactive"),e("#"+i,o).removeClass("tabs-panel-inactive").addClass("tabs-panel-active"),e(".tabs",o).removeClass("tabs"),g.parent().addClass("tabs"),e(".quick-search",o).focus(),t.preventDefault();else if(g.hasClass("select-all"))n=/#(.*)$/.exec(t.target.href),n&&n[1]&&(r=e("#"+n[1]+" .tabs-panel-active .menu-item-title input"),r.length===r.filter(":checked").length?r.removeAttr("checked"):r.prop("checked",!0));else if(g.hasClass("submit-add-to-menu")){for(s=g.parents(".options"),a=e('.tabs-panel-active input[type="checkbox"]:checked',s),l=e("textarea",s),c=e(".tagchecklist",s),p=l.val().split(","),u=0;u<p.length;u+=1)p[u]=parseInt(p[u],10);a.each(function(){d=e(this),h=parseInt(d.val(),10),f=d.parent("label").siblings(".menu-item-title").val(),-1===e.inArray(h,p)&&p.push(h),c.append('<span><a class="ntdelbutton" data-id="'+h+'">X</a> '+f+"</span>")}),l.text(p.join(",")),t.preventDefault()}else g.hasClass("ntdelbutton")&&(d=g,m=parseInt(d.data("id"),10),s=g.parents(".options"),l=e("textarea",s),c=e(".tagchecklist",s),p=l.val().split(","),p=e.grep(p,function(e){return parseInt(e,10)!==parseInt(m,10)}),d.parent("span").remove(),l.text(p.join(",")))})},attachQuickSearchListeners:function(){var t;e(".quick-search").keypress(function(n){var o=e(this);return 13===n.which?(i.updateQuickSearchResults(o),!1):(t&&clearTimeout(t),void(t=setTimeout(function(){i.updateQuickSearchResults(o)},400)))}).attr("autocomplete","off")},updateQuickSearchResults:function(t){var n,o,r=2,s=t.val();s.length<r||(n=t.parents(".tabs-panel"),o={action:"menu-quick-search","response-format":"markup",menu:null,"menu-settings-column-nonce":e("#menu-settings-column-nonce").val(),q:s,type:t.attr("name")},e(".spinner",n).show(),e.post(ajaxurl,o,function(e){i.processQuickSearchQueryResponse(e,o,n)}))},processQuickSearchQueryResponse:function(t,n,i){var o,r,s,a=e("form#post"),l={},c=/menu-item[(\[\^]\]*/,p=e("<div>").html(t).find("li");return p.length?(p.each(function(){if(s=e(this),o=c.exec(s.html()),o&&o[1]){for(r=o[1];a.elements["menu-item["+r+"][menu-item-type]"]||l[r];)r-=1;l[r]=!0,r!==o[1]&&s.html(s.html().replace(new RegExp("menu-item\\["+o[1]+"\\]","g"),"menu-item["+r+"]"))}}),e(".categorychecklist",i).html(p),e(".spinner",i).hide(),void e('[name^="menu-item"]').removeAttr("name")):(e(".categorychecklist",i).html("<li><p>noResultsFound</p></li>"),void e(".spinner",i).hide())},initialize_popup_page:function(){var n=function(t){var n,i,o=t.siblings(".options");t.is(":checked")?(o.show(),"popup_targeting_condition_on_entire_site"===t.attr("id")?(n=t.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),i=t.parents(".targeting_condition").siblings(".targeting_condition"),i.hide(),e("> *",i).prop("disabled",!0),n.show(),e("> *",n).prop("disabled",!1)):e("*",o).prop("disabled",!1)):(o.hide(),"popup_targeting_condition_on_entire_site"===t.attr("id")?(n=t.parents("#popmake_popup_targeting_condition_fields").find('[id^="targeting_condition-exclude_on_"]'),i=t.parents(".targeting_condition").siblings(".targeting_condition"),i.show(),e("> *",i).prop("disabled",!1),n.hide(),e("> *",n).prop("disabled",!0)):e("*",o).prop("disabled",!0))},i=function(t){var n=t.parents(".options").find('input[type="checkbox"]:eq(0)'),i=n.attr("name").indexOf("exclude")>=0,o=i?n.attr("name").replace("popup_targeting_condition_exclude_on_specific_",""):n.attr("name").replace("popup_targeting_condition_on_specific_",""),r=e(i?"#exclude_on_specific_"+o:"#on_specific_"+o);t.is(":checked")&&("true"===t.val()?(n.prop("checked",!0),r.show(),e("*",r).prop("disabled",!1)):""===t.val()&&(n.prop("checked",!1),r.hide(),e("*",r).prop("disabled",!0)))},o=function(){e("#popup_auto_open_session_cookie").is(":checked")?e(".not-session-cookie").hide():e(".not-session-cookie").show()},r=function(){e("#popup_auto_open_enabled").is(":checked")?(e(".auto-open-enabled").show(),o()):e(".auto-open-enabled").hide()},s=function(){e("#popup_auto_open_cookie_key").val((new Date).getTime().toString(16))};e('[name^="menu-item"]').removeAttr("name"),e("#title").prop("required",!0),e(t).on("click","#popup_auto_open_session_cookie",function(){o()}).on("click","#popup_auto_open_enabled",function(){r()}).on("click",".popmake-reset-auto-open-cookie-key",function(){s()}),e('#popmake_popup_targeting_condition_fields .targeting_condition > input[type="checkbox"]').on("click",function(){n(e(this))}).each(function(){n(e(this))}),e('input[type="radio"][id*="popup_targeting_condition_"]').on("click",function(){i(e(this))}).each(function(){i(e(this))}),e(".posttypediv, .taxonomydiv").each(function(){var t=e(this),n=e("> ul li"),i=e(".tabs-panel",t);n.removeClass("tabs"),n.eq(0).addClass("tabs"),i.removeClass("tabs-panel-active").addClass("tabs-panel-inactive").removeAttr("style"),i.eq(0).removeClass("tabs-panel-inactive").addClass("tabs-panel-active")}),r(),""===e("#popup_auto_open_cookie_key").val()&&s()}};e(t).ready(function(){i.init(),e(t).trigger("pum_init")})}(jQuery,document);var PUMMarketing;!function(e,t,n){"use strict";PUMMarketing={init:function(){e('#menu-posts-popup ul li a[href="edit.php?post_type=popup&page=extensions"]').css({color:"#9aba27"})}},e(t).ready(PUMMarketing.init)}(jQuery,document);var PUMModals;!function(e,t,n){"use strict";var i,o,r,s=e("html"),a=e(t),l="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUMModals={forceFocus:function(e){r&&!r.contains(e.target)&&(e.stopPropagation(),r.focus())},trapEscapeKey:function(e){27===e.keyCode&&(PUMModals.closeAll(),e.preventDefault())},trapTabKey:function(t){if(9===t.keyCode){var n=r.find("*").filter(l).filter(":visible"),i=e(":focus"),o=n.length,s=n.index(i);t.shiftKey?0===s&&(n.get(o-1).focus(),t.preventDefault()):s===o-1&&(n.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){r.find(".pum-modal-content *").filter(l).filter(":visible").first().focus()},closeAll:function(t){e(".pum-modal-background").off("keydown.pum_modal").hide(0,function(){e("html").css({overflow:"visible",width:"auto"}),i&&(i.attr("aria-hidden","false"),i=null),o.length&&o.focus(),r=null,a.off("focus.pum_modal"),n!==t&&t()}).attr("aria-hidden","true")},show:function(t,a){e(".pum-modal-background").off("keydown.pum_modal").hide(0).attr("aria-hidden","true"),s.data("origwidth",s.innerWidth()).css({overflow:"hidden",width:s.innerWidth()});var l=e(":focus");l.parents(".pum-modal-wrap").length||(o=l),r=e(t),r.on("keydown.pum_modal",function(e){PUMModals.trapEscapeKey(e),PUMModals.trapTabKey(e)}).show(0,function(){i=e("body > *").filter(":visible").not(r),i.attr("aria-hidden","true"),r.trigger("pum_init").on("focus.pum_modal",PUMModals.forceFocus),PUMModals.setFocusToFirstItem(),n!==a&&a()}).attr("aria-hidden","false")},remove:function(t){e(t).remove()},replace:function(t,n){PUMModals.remove(e.trim(t)),e("body").append(e.trim(n))},reload:function(e,t,n){PUMModals.replace(e,t),PUMModals.show(e,n)}},e(t).on("click",".pum-modal-background, .pum-modal-wrap .cancel, .pum-modal-wrap .pum-modal-close",function(t){var n=e(t.target);(n.hasClass("pum-modal-background")||n.hasClass("cancel")||n.hasClass("pum-modal-close")||n.hasClass("submitdelete"))&&(PUMModals.closeAll(),t.preventDefault(),t.stopPropagation())})}(jQuery,document);var PUMRangeSLiders;!function(e,t,n){"use strict";PUMRangeSLiders={init:function(){var n,i,o,r,s,a=e('<input type="range"/>'),l=e('<button type="button" class="popmake-range-plus">+</button>'),c=e('<button type="button" class="popmake-range-minus">-</button>');e(".popmake-range-manual").filter(":not(.initialized)").each(function(){var p=e(this).addClass("initialized"),u=p.data("force-minmax"),d=parseInt(p.prop("min"),0),h=parseInt(p.prop("max"),0),f=parseInt(p.prop("step"),0),m=parseInt(p.val(),0);o=a.clone(),r=l.clone(),s=c.clone(),u&&m>h&&(m=h,p.val(m)),o.prop({min:d||0,max:u||h&&h>m?h:1.5*m,step:f||1.5*m/100,value:m}).on("change input",function(){p.trigger("input")}),p.next().after(s,r),p.before(o),n=t.createElement("input"),n.setAttribute("type","range"),"text"===n.type&&e("input[type=range]").each(function(t,n){i=e(n),o=e("<div />").slider({min:parseInt(i.attr("min"),10)||0,max:parseInt(i.attr("max"),10)||100,value:parseInt(i.attr("value"),10)||0,step:parseInt(i.attr("step"),10)||1,slide:function(t,n){e(this).prev("input").val(n.value)}}),i.after(o).hide()})})}},e(t).on("pum_init",PUMRangeSLiders.init).on("input",'input[type="range"]',function(){var t=e(this);t.siblings(".popmake-range-manual").val(t.val())}).on("click",".popmake-range-manual",function(){var t=e(this);t.prop("readonly",!1)}).on("focusout",".popmake-range-manual",function(){var t=e(this);t.prop("readonly",!0)}).on("change",".popmake-range-manual",function(){var t=e(this),n=parseInt(t.prop("max"),0),i=parseInt(t.prop("step"),0),o=t.data("force-minmax"),r=parseInt(t.val(),0),s=t.prev();o&&r>n&&(r=n,t.val(r)),s.prop({max:o||n&&n>r?n:1.5*r,step:i||1.5*r/100,value:r})}).on("click",".popmake-range-plus",function(t){var n=e(this).siblings(".popmake-range-manual"),i=parseInt(n.prop("step"),0),o=parseInt(n.val(),0),r=o+i,s=n.prev();t.preventDefault(),n.val(r).trigger("input"),s.val(r)}).on("click",".popmake-range-minus",function(t){var n=e(this).siblings(".popmake-range-manual"),i=parseInt(n.prop("step"),0),o=parseInt(n.val(),0),r=o-i,s=n.prev();t.preventDefault(),n.val(r).trigger("input"),s.val(r)})}(jQuery,document);var PUMSelect2Fields;!function(e,t,n){"use strict";e.fn.pumselect2=e.fn.pumselect2||e.fn.select2,PUMSelect2Fields={init:function(){e(".pum-select2 select").filter(":not(.initialized)").each(function(){var t=e(this),i=t.data("current"),o=t.data("objecttype"),r=t.data("objectkey"),s={multiple:!1,dropdownParent:t.parent()};t.attr("multiple")&&(s.multiple=!0),o&&r&&(s=e.extend(s,{ajax:{url:ajaxurl,dataType:"json",delay:250,data:function(e){return{s:e.term,page:e.page,action:"pum_object_search",object_type:o,object_key:r}},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},minimumInputLength:1,templateResult:PUMSelect2Fields.formatObject,templateSelection:PUMSelect2Fields.formatObjectSelection})),t.addClass("initialized").pumselect2(s),i!==n&&("object"!=typeof i&&(i=[i]),o&&r?e.ajax({url:ajaxurl,data:{action:"pum_object_search",object_type:o,object_key:r,include:i},dataType:"json",success:function(n){e.each(n.items,function(e,n){t.find('option[value="'+n.id+'"]').length||t.prepend('<option value="'+n.id+'">'+n.text+"</option>")}),t.val(i).trigger("change")}}):t.val(i).trigger("change"))})},formatObject:function(e){return e.text},formatObjectSelection:function(e){return e.text||e.text}},e(t).on("pum_init",PUMSelect2Fields.init)}(jQuery,document),function(e,t,n){function i(t,n){return-1!==e.inArray(n,t)}function o(e,t,n){var i=t[0];t.length>1?(e[i]||(e[i]=t[1]?{}:[]),o(e[i],t.slice(1),n)):(i||(i=e.length),e[i]=n)}var r="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),s="select,textarea".split(","),a=/\[([^\]]*)\]/g;e.fn.pumSerializeObject=function(t){e.extend({},t);var n={},l=e.extend(!0,{include:[],exclude:[],includeByClass:""},t);return this.find(":input").each(function(){var t;!this.name||this.disabled||i(l.exclude,this.name)||l.include.length&&!i(l.include,this.name)||-1===this.className.indexOf(l.includeByClass)||(t=this.name.replace(a,"[$1").split("["),t[0]&&(this.checked||i(r,this.type)||i(s,this.nodeName.toLowerCase()))&&("checkbox"===this.type&&t.push(""),o(n,t,e(this).val())))}),n}}(jQuery,document);var PUMTabs;!function(e,t,n){"use strict";PUMTabs={init:function(){e(".pum-tabs-container").filter(":not(.initialized)").each(function(){var t=e(this),n=t.find(".tab:first");t.hasClass("vertical-tabs")&&t.css({minHeight:t.find(".tabs").eq(0).outerHeight(!0)}),t.find(".active").removeClass("active"),n.addClass("active"),e(n.find("a").attr("href")).addClass("active"),t.addClass("initialized")})}},e(t).on("pum_init",PUMTabs.init).on("click",".pum-tabs-container .tab",function(t){var n=e(this),i=n.parents(".pum-tabs-container:first"),o=n.find("a").attr("href");i.find(".active").removeClass("active"),n.addClass("active"),e(o).addClass("active"),t.preventDefault()})}(jQuery,document);var PUM_Templates;!function(e,t,n){"use strict";var i=pum_admin.I10n;PUM_Templates={render:function(e,t){var n=wp.template(e);return"object"==typeof t.classes&&(t.classes=t.classes.join(" ")),t=PUM_Templates.prepareMeta(t),n(t)},shortcode:function(t){var n=e.extend(!0,{},{tag:"",meta:{},has_content:!1,content:""},t),i=n.has_content?"pum-shortcode-w-content":"pum-shortcode";return PUM_Templates.render(i,n)},modal:function(t){var n=e.extend(!0,{},{id:"",title:"",description:"",classes:"",save_button:i.save,cancel_button:i.cancel,content:""},t);return PUM_Templates.render("pum-modal",n)},tabs:function(t){var n=t.classes||[],i=e.extend(!0,{},{id:"",vertical:!0,form:!0,classes:"",tabs:{general:{label:"General",content:""}}},t);return i.form&&n.push("tabbed-form"),i.vertical&&n.push("vertical-tabs"),i.classes=i.classes+" "+n.join(" "),PUM_Templates.render("pum-tabs",i)},section:function(t){var n=e.extend(!0,{},{classes:[],fields:[]},t);return PUM_Templates.render("pum-field-section",n)},field:function(t){var i="pum-field-"+t.type,o=[],r=e.extend(!0,{},{type:"text",id:"",id_prefix:"",name:"",label:null,placeholder:"",desc:null,size:"regular",classes:[],value:null,select2:!1,multiple:!1,as_array:!1,options:[],object_type:null,object_key:null,std:null,min:0,max:50,step:1,unit:"px",required:!1,meta:{}},t);if(!e("#tmpl-"+i).length&&("objectselect"!==t.type&&"postselect"!==t.type&&"taxonomyselect"!==t.type||(i="pum-field-select"),!e("#tmpl-"+i).length))return"";switch(r.value||t.std===n||(r.value=t.std),"string"==typeof r.classes&&(r.classes=r.classes.split(" ")),
4
+ t["class"]!==n&&r.classes.push(t["class"]),r.required&&(r.meta.required=!0,r.classes.push("pum-required")),t.type){case"select":case"objectselect":case"postselect":case"taxonomyselect":r.options!==n&&(_.each(r.options,function(e,t){var n=!1;r.multiple&&r.value.indexOf(e)!==!1?n="selected":r.multiple||r.value!=e||(n="selected"),o.push(PUM_Templates.prepareMeta({label:t,value:e,meta:{selected:n}}))}),r.options=o),r.multiple&&(r.meta.multiple=!0,r.as_array&&(r.name+="[]"),r.value&&r.value.length||(r.value=[]),"string"==typeof r.value&&(r.value=[r.value])),"select"!==t.type&&(r.select2=!0,r.classes.push("pum-field-objectselect"),r.classes.push("postselect"===t.type?"pum-field-postselect":"pum-field-taxonomyselect"),r.meta["data-objecttype"]="postselect"===t.type?"post_type":"taxonomy",r.meta["data-objectkey"]="postselect"===t.type?t.post_type:t.taxonomy,r.meta["data-current"]=r.value),r.select2&&(r.classes.push("pum-select2"),r.placeholder&&(r.meta["data-placeholder"]=r.placeholder));break;case"multicheck":r.options!==n&&(_.each(r.options,function(e,t){o.push({label:t,value:e,meta:{checked:r.value.indexOf(e)>=0}})}),r.options=o);break;case"checkbox":1===parseInt(r.value,10)&&(r.meta.checked=!0);break;case"rangeslider":r.meta.readonly=!0,r.meta.step=r.step,r.meta.min=r.min,r.meta.max=r.max;break;case"textarea":r.meta.cols=r.cols,r.meta.rows=r.rows}return r.field=PUM_Templates.render(i,r),PUM_Templates.render("pum-field-wrapper",r)},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}}}(jQuery,document);var PUMTriggers;!function(e,t,n){"use strict";var i=pum_admin.I10n,o=pum_admin.defaults;PUMTriggers={new_cookie:!1,getLabel:function(e){return i.labels.triggers[e].name},getSettingsDesc:function(e,t){var n={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"},o=_.template(i.labels.triggers[e].settings_column,null,n);return t.I10n=i,o(t)},renumber:function(){e("#pum_popup_triggers_list tbody tr").each(function(){var t=e(this),n=t.parent().children().index(t),i=t.data("index");t.data("index",n),t.find("input").each(function(){var e="["+n+"]";this.name=this.name.replace("["+i+"]",e).replace("[]",e)})})},refreshDescriptions:function(){e("#pum_popup_triggers_list tbody tr").each(function(){var t=e(this),n=t.find(".popup_triggers_field_type").val(),i=JSON.parse(t.find(".popup_triggers_field_settings:first").val()),o=PUMTriggers.cookie_column_value(i.cookie.name);t.find("td.settings-column").html(PUMTriggers.getSettingsDesc(n,i)),t.find("td.cookie-column code").text(o)})},initEditForm:function(t){var n=e(".trigger-editor .pum-form"),i=e("#name",n),o=t.trigger_settings;e("#pum_popup_cookies_list tbody tr").each(function(){var t=JSON.parse(e(this).find(".popup_cookies_field_settings:first").val());i.find('option[value="'+t.name+'"]').length||e('<option value="'+t.name+'">'+t.name+"</option>").appendTo(i)}),i.val(o.cookie.name),i.trigger("chosen:updated")},cookie_column_value:function(e){var t=i.no_cookie;return e instanceof Array?t=e.join(", "):null!==e&&(t=e),t}},PUMTriggers.refreshDescriptions(),e(t).on("select2:select pumselect2:select","#pum-first-trigger",function(){var t=e(this),r=t.val(),s="pum-trigger-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={};c.trigger_settings=o.triggers[r]!==n?o.triggers[r]:{},c.save_button_text=i.add,c.index=null,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMTriggers.initEditForm(c),t.val(null).trigger("change")}).on("click","#pum_popup_triggers .add-new",function(){var e=wp.template("pum-trigger-add-type");PUMModals.reload("#pum_trigger_add_type_modal",e())}).on("click","#pum_popup_triggers_list .edit",function(t){var n=e(this),o=n.parents("tr:first"),r=o.find(".popup_triggers_field_type").val(),s="pum-trigger-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={index:o.parent().children().index(o),type:r,trigger_settings:JSON.parse(o.find(".popup_triggers_field_settings:first").val())};t.preventDefault(),c.save_button_text=i.save,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMTriggers.initEditForm(c)}).on("click","#pum_popup_triggers_list .remove",function(t){var n=e(this),o=n.parents("tr:first");t.preventDefault(),window.confirm(i.confirm_delete_trigger)&&(o.remove(),e("#pum_popup_triggers_list tbody tr").length||(e("#pum-first-trigger").val(null).trigger("change"),e("#pum_popup_trigger_fields").removeClass("has-triggers")),PUMTriggers.renumber())}).on("submit","#pum_trigger_add_type_modal .pum-form",function(t){var r=e("#popup_trigger_add_type").val(),s="pum-trigger-settings-"+r,a="#"+s.replace(/-/g,"_"),l=wp.template(s),c={};t.preventDefault(),c.trigger_settings=o.triggers[r]!==n?o.triggers[r]:{},c.save_button_text=i.add,c.index=null,l.length||alert("Something went wrong. Please refresh and try again."),PUMModals.reload(a,l(c)),PUMTriggers.initEditForm(c)}).on("submit",".trigger-editor .pum-form",function(t){var n,o=e(this),r=(o.find("input.type").val(),o.pumSerializeObject()),s=parseInt(r.index),a=s>=0?e("#pum_popup_triggers_list tbody tr").eq(s):null,l=wp.template("pum-trigger-row");t.preventDefault(),(!s||0>s)&&(r.index=e("#pum_popup_triggers_list tbody tr").length),r.I10n=i,n=l(r),a?a.replaceWith(n):e("#pum_popup_triggers_list tbody").append(n),PUMModals.closeAll(),PUMTriggers.renumber(),PUMTriggers.refreshDescriptions(),e("#pum_popup_trigger_fields").addClass("has-triggers"),null!==r.trigger_settings.cookie.name&&r.trigger_settings.cookie.name.indexOf("add_new")>=0&&(PUMTriggers.new_cookie=r.index,e("#pum_popup_cookie_fields button.add-new").trigger("click"))}).ready(function(){PUMTriggers.refreshDescriptions(),e("#pum-first-trigger").val(null).trigger("change")})}(jQuery,document);var PUMUtils;!function(e,t,n){"use strict";PUMUtils={convert_meta_to_object:function(e){var t,i,o,r={};for(o in e)e.hasOwnProperty(o)&&(t=o.split(/_(.+)?/)[0],i=o.split(/_(.+)?/)[1],r[t]===n&&(r[t]={}),r[t][i]=e[o]);return r},serialize_form:function(t){var n={};return e("[name]",t).each(function(){var t,i,o=e(this).attr("name"),r=e(this).val(),s=o.split("["),a=n,l=s.length;for(t=0;l>t;t+=1)i=s[t].replace("]",""),a[i]||(a[i]={}),t!==s.length-1?a=a[i]:t===s.length-1&&(a[i]=r)}),n},convert_hex:function(e,t){if(n===e)return"";n===t&&(t=100),e=e.replace("#","");var i=parseInt(e.substring(0,2),16),o=parseInt(e.substring(2,4),16),r=parseInt(e.substring(4,6),16),s="rgba("+i+","+o+","+r+","+t/100+")";return s},debounce:function(e,t){var n;return function(){var i=this,o=arguments;window.clearTimeout(n),n=window.setTimeout(function(){e.apply(i,o)},t)}},throttle:function(e,t){var n=!1,i=function(){n=!1};return function(){n||(e(),window.setTimeout(i,t),n=!0)}}},String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1)}}(jQuery,document);var PopMakeAdmin,PUM_Admin;!function(e,t,n){"use strict";var i=e(t);pum_admin.I10n,pum_admin.defaults;PUM_Admin={},PopMakeAdmin={init:function(){e("body.post-type-popup form#post").length&&PopMakeAdmin.initialize_popup_page(),e("body.post-type-popup_theme form#post").length&&PopMakeAdmin.initialize_theme_page()},initialize_popup_page:function(){var n=function(){"custom"===e("#popup_display_size").val()?(e(".custom-size-only").show(),e(".responsive-size-only").hide(),e("#popup_display_custom_height_auto").is(":checked")?e(".custom-size-height-only").hide():e(".custom-size-height-only").show()):(e(".custom-size-only").hide(),"auto"!==e("#popup_display_size").val()?(e(".responsive-size-only").show(),e("#popup_display_custom_height_auto").prop("checked",!1)):e(".responsive-size-only").hide())},i=function(){e(".animation-speed, .animation-origin").hide(),"fade"===e("#popup_display_animation_type").val()?e(".animation-speed").show():"none"!==e("#popup_display_animation_type").val()&&e(".animation-speed, .animation-origin").show()},o=function(){var t=e("#popup_display_location"),n=t.parents("table"),i=t.val();e("tr.top, tr.right, tr.left, tr.bottom",n).hide(),i.indexOf("top")>=0&&e("tr.top").show(),i.indexOf("left")>=0&&e("tr.left").show(),i.indexOf("bottom")>=0&&e("tr.bottom").show(),i.indexOf("right")>=0&&e("tr.right").show()};e("#popuptitlediv").insertAfter("#titlediv"),e("#title").prop("required",!0),e(t).on("change","#popup_theme",function(){var t=e(this),n=e("#edit_theme_link"),i=t.val();n.attr("href",n.data("baseurl")+i)}).on("keydown","#popuptitle",function(t){var n=t.keyCode||t.which;9===n&&(t.preventDefault(),e("#title").focus())}).on("keydown","#title, #popuptitle",function(t){var n,i=t.keyCode||t.which;t.shiftKey||9!==i||(t.preventDefault(),n="title"===e(this).attr("id")?"#popuptitle":"#insert-media-button",e(n).focus())}).on("keydown","#popuptitle, #insert-media-button",function(t){var n,i=t.keyCode||t.which;t.shiftKey&&9===i&&(t.preventDefault(),n="popuptitle"===e(this).attr("id")?"#title":"#popuptitle",e(n).focus())}).on("click","#popup_display_custom_height_auto",function(){n()}).on("change","#popup_display_size",function(){"custom"!==e("#popup_display_size").val()&&"auto"!==e("#popup_display_size").val()&&e("#popup_display_position_fixed, #popup_display_scrollable_content").prop("checked",!1),n()}).on("change","#popup_display_animation_type",function(){i()}).on("change","#popup_display_location",function(){o()}),n(),i(),o()},theme_page_listeners:function(){var n=this;e(t).on("change","select.font-family",function(){e("select.font-weight option, select.font-style option",e(this).parents("table")).prop("selected",!1),n.update_font_selectboxes()}).on("change","select.font-weight, select.font-style",function(){n.update_font_selectboxes()}).on("change input focusout","select, input",function(){n.update_theme()}).on("change","select.border-style",function(){var t=e(this);"none"===t.val()?t.parents("table").find(".border-options").hide():t.parents("table").find(".border-options").show()}).on("change","#popup_theme_close_location",function(){var t=e(this),n=t.parents("table");e("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",n).hide(),e("tr."+t.val(),n).show()})},update_theme:function(){var t,n=e("[name^='popup_theme_']").serializeArray(),i={};for(t=0;n.length>t;t+=1)0===n[t].name.indexOf("popup_theme_")&&(i[n[t].name.replace("popup_theme_","")]=n[t].value);this.retheme_popup(i)},theme_preview_scroll:function(){var t=e("#popmake-theme-editor .empreview, body.post-type-popup_theme form#post #popmake_popup_theme_preview"),n=t.parent(),i=t.offset().top-50;e(window).on("scroll",function(){e("> .postbox:visible",n).index(t)===e("> .postbox:visible",n).length-1&&e(window).scrollTop()>=i?t.css({left:t.offset().left,width:t.width(),height:t.height(),position:"fixed",top:50}):t.removeAttr("style")})},update_font_selectboxes:function(){return e("select.font-family").each(function(){var t,i,o=e(this),r=o.parents("table").find("select.font-weight"),s=o.parents("table").find("select.font-style"),a=r.find("option"),l=s.find("option");if(popmake_google_fonts[o.val()]!==n){if(t=popmake_google_fonts[o.val()],a.hide(),l.hide(),t.variants.length)for(i=0;t.variants.length>i;i+=1)"regular"===t.variants[i]?(e('option[value=""]',r).show(),e('option[value=""]',s).show()):(t.variants[i].indexOf("italic")>=0&&e('option[value="italic"]',s).show(),e('option[value="'+parseInt(t.variants[i],10)+'"]',r).show())}else a.show(),l.show();r.parents("tr:first").show(),r.find("option:visible").length<=1?r.parents("tr:first").hide():r.parents("tr:first").show(),s.parents("tr:first").show(),s.find("option:visible").length<=1?s.parents("tr:first").hide():s.parents("tr:first").show()})},convert_theme_for_preview:function(e){},initialize_theme_page:function(){e("#popuptitlediv").insertAfter("#titlediv");var n=this,i=e("#popup_theme_close_location").parents("table");switch(n.update_theme(),n.theme_page_listeners(),n.theme_preview_scroll(),n.update_font_selectboxes(),e(t).on("click",".popmake-preview",function(t){t.preventDefault(),e("#popmake-preview, #popmake-overlay").css({visibility:"visible"}).show()}).on("click",".popmake-close",function(){e("#popmake-preview, #popmake-overlay").hide()}),e("select.border-style").each(function(){var t=e(this);"none"===t.val()?t.parents("table").find(".border-options").hide():t.parents("table").find(".border-options").show()}),e(".color-picker.background-color").each(function(){var t=e(this);""===t.val()?t.parents("table").find(".background-opacity").hide():t.parents("table").find(".background-opacity").show()}),e("tr.topleft, tr.topright, tr.bottomleft, tr.bottomright",i).hide(),e("#popup_theme_close_location").val()){case"topleft":e("tr.topleft",i).show();break;case"topright":e("tr.topright",i).show();break;case"bottomleft":e("tr.bottomleft",i).show();break;case"bottomright":e("tr.bottomright",i).show()}},retheme_popup:function(i){var o,r=e(".empreview .example-popup-overlay, #popmake-overlay"),s=e(".empreview .example-popup, #popmake-preview"),a=e(".title, .popmake-title",s),l=e(".content, .popmake-content",s),c=e(".close-popup, .popmake-close",s),p="yes"===i.container_boxshadow_inset?"inset ":"",u="yes"===i.close_boxshadow_inset?"inset ":"";switch(this.convert_theme_for_preview(i),popmake_google_fonts[i.title_font_family]!==n&&(o="//fonts.googleapis.com/css?family="+i.title_font_family,"normal"!==i.title_font_weight&&(o+=":"+i.title_font_weight),"italic"===i.title_font_style&&(-1===o.indexOf(":")&&(o+=":"),o+="italic"),e("body").append('<link href="'+o+'" rel="stylesheet" type="text/css">')),popmake_google_fonts[i.content_font_family]!==n&&(o="//fonts.googleapis.com/css?family="+i.content_font_family,"normal"!==i.content_font_weight&&(o+=":"+i.content_font_weight),"italic"===i.content_font_style&&(-1===o.indexOf(":")&&(o+=":"),o+="italic"),e("body").append('<link href="'+o+'" rel="stylesheet" type="text/css">')),popmake_google_fonts[i.close_font_family]!==n&&(o="//fonts.googleapis.com/css?family="+i.close_font_family,"normal"!==i.close_font_weight&&(o+=":"+i.close_font_weight),"italic"===i.close_font_style&&(-1===o.indexOf(":")&&(o+=":"),o+="italic"),e("body").append('<link href="'+o+'" rel="stylesheet" type="text/css">')),r.removeAttr("style").css({backgroundColor:PUMUtils.convert_hex(i.overlay_background_color,i.overlay_background_opacity)}),s.removeAttr("style").css({padding:i.container_padding+"px",backgroundColor:PUMUtils.convert_hex(i.container_background_color,i.container_background_opacity),borderStyle:i.container_border_style,borderColor:i.container_border_color,borderWidth:i.container_border_width+"px",borderRadius:i.container_border_radius+"px",boxShadow:p+i.container_boxshadow_horizontal+"px "+i.container_boxshadow_vertical+"px "+i.container_boxshadow_blur+"px "+i.container_boxshadow_spread+"px "+PUMUtils.convert_hex(i.container_boxshadow_color,i.container_boxshadow_opacity)}),a.removeAttr("style").css({color:i.title_font_color,lineHeight:i.title_line_height+"px",fontSize:i.title_font_size+"px",fontFamily:i.title_font_family,fontStyle:i.title_font_style,fontWeight:i.title_font_weight,textAlign:i.title_text_align,textShadow:i.title_textshadow_horizontal+"px "+i.title_textshadow_vertical+"px "+i.title_textshadow_blur+"px "+PUMUtils.convert_hex(i.title_textshadow_color,i.title_textshadow_opacity)}),l.removeAttr("style").css({color:i.content_font_color,fontFamily:i.content_font_family,fontStyle:i.content_font_style,fontWeight:i.content_font_weight}),c.html(i.close_text).removeAttr("style").css({padding:i.close_padding+"px",height:i.close_height>0?i.close_height+"px":"auto",width:i.close_width>0?i.close_width+"px":"auto",backgroundColor:PUMUtils.convert_hex(i.close_background_color,i.close_background_opacity),color:i.close_font_color,lineHeight:i.close_line_height+"px",fontSize:i.close_font_size+"px",fontFamily:i.close_font_family,fontWeight:i.close_font_weight,fontStyle:i.close_font_style,borderStyle:i.close_border_style,borderColor:i.close_border_color,borderWidth:i.close_border_width+"px",borderRadius:i.close_border_radius+"px",boxShadow:u+i.close_boxshadow_horizontal+"px "+i.close_boxshadow_vertical+"px "+i.close_boxshadow_blur+"px "+i.close_boxshadow_spread+"px "+PUMUtils.convert_hex(i.close_boxshadow_color,i.close_boxshadow_opacity),textShadow:i.close_textshadow_horizontal+"px "+i.close_textshadow_vertical+"px "+i.close_textshadow_blur+"px "+PUMUtils.convert_hex(i.close_textshadow_color,i.close_textshadow_opacity)}),i.close_location){case"topleft":c.css({top:i.close_position_top+"px",left:i.close_position_left+"px"});break;case"topright":c.css({top:i.close_position_top+"px",right:i.close_position_right+"px"});break;case"bottomleft":c.css({bottom:i.close_position_bottom+"px",left:i.close_position_left+"px"});break;case"bottomright":c.css({bottom:i.close_position_bottom+"px",right:i.close_position_right+"px"})}e(t).trigger("popmake-admin-retheme",[i])}},i.ready(function(){PopMakeAdmin.init(),i.trigger("pum_init")})}(jQuery,document);
assets/js/mobile-detect.js ADDED
@@ -0,0 +1,987 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // THIS FILE IS GENERATED - DO NOT EDIT!
2
+ /*!mobile-detect v1.3.3 2016-07-31*/
3
+ /*global module:false, define:false*/
4
+ /*!@license Copyright 2013, Heinrich Goebl, License: MIT, see https://github.com/hgoebl/mobile-detect.js*/
5
+ (function (define, undefined) {
6
+ define(function () {
7
+ 'use strict';
8
+
9
+ var impl = {};
10
+
11
+ impl.mobileDetectRules = {
12
+ "phones": {
13
+ "iPhone": "\\biPhone\\b|\\biPod\\b",
14
+ "BlackBerry": "BlackBerry|\\bBB10\\b|rim[0-9]+",
15
+ "HTC": "HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m",
16
+ "Nexus": "Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",
17
+ "Dell": "Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",
18
+ "Motorola": "Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b",
19
+ "Samsung": "Samsung|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F",
20
+ "LG": "\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)",
21
+ "Sony": "SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",
22
+ "Asus": "Asus.*Galaxy|PadFone.*Mobile",
23
+ "NokiaLumia": "Lumia [0-9]{3,4}",
24
+ "Micromax": "Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",
25
+ "Palm": "PalmSource|Palm",
26
+ "Vertu": "Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",
27
+ "Pantech": "PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",
28
+ "Fly": "IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",
29
+ "Wiko": "KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",
30
+ "iMobile": "i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",
31
+ "SimValley": "\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",
32
+ "Wolfgang": "AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",
33
+ "Alcatel": "Alcatel",
34
+ "Nintendo": "Nintendo 3DS",
35
+ "Amoi": "Amoi",
36
+ "INQ": "INQ",
37
+ "GenericPhone": "Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"
38
+ },
39
+ "tablets": {
40
+ "iPad": "iPad|iPad.*Mobile",
41
+ "NexusTablet": "Android.*Nexus[\\s]+(7|9|10)",
42
+ "SamsungTablet": "SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561",
43
+ "Kindle": "Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI)\\b",
44
+ "SurfaceTablet": "Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",
45
+ "HPTablet": "HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",
46
+ "AsusTablet": "^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K017 |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA",
47
+ "BlackBerryTablet": "PlayBook|RIM Tablet",
48
+ "HTCtablet": "HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",
49
+ "MotorolaTablet": "xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",
50
+ "NookTablet": "Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",
51
+ "AcerTablet": "Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20",
52
+ "ToshibaTablet": "Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",
53
+ "LGTablet": "\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",
54
+ "FujitsuTablet": "Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",
55
+ "PrestigioTablet": "PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",
56
+ "LenovoTablet": "Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",
57
+ "DellTablet": "Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",
58
+ "YarvikTablet": "Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",
59
+ "MedionTablet": "Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",
60
+ "ArnovaTablet": "AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",
61
+ "IntensoTablet": "INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",
62
+ "IRUTablet": "M702pro",
63
+ "MegafonTablet": "MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",
64
+ "EbodaTablet": "E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",
65
+ "AllViewTablet": "Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",
66
+ "ArchosTablet": "\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",
67
+ "AinolTablet": "NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",
68
+ "NokiaLumiaTablet": "Lumia 2520",
69
+ "SonyTablet": "Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31",
70
+ "PhilipsTablet": "\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",
71
+ "CubeTablet": "Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",
72
+ "CobyTablet": "MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",
73
+ "MIDTablet": "M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",
74
+ "MSITablet": "MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",
75
+ "SMiTTablet": "Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",
76
+ "RockChipTablet": "Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",
77
+ "FlyTablet": "IQ310|Fly Vision",
78
+ "bqTablet": "Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus",
79
+ "HuaweiTablet": "MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",
80
+ "NecTablet": "\\bN-06D|\\bN-08D",
81
+ "PantechTablet": "Pantech.*P4100",
82
+ "BronchoTablet": "Broncho.*(N701|N708|N802|a710)",
83
+ "VersusTablet": "TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",
84
+ "ZyncTablet": "z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",
85
+ "PositivoTablet": "TB07STA|TB10STA|TB07FTA|TB10FTA",
86
+ "NabiTablet": "Android.*\\bNabi",
87
+ "KoboTablet": "Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",
88
+ "DanewTablet": "DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",
89
+ "TexetTablet": "NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",
90
+ "PlaystationTablet": "Playstation.*(Portable|Vita)",
91
+ "TrekstorTablet": "ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",
92
+ "PyleAudioTablet": "\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",
93
+ "AdvanTablet": "Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",
94
+ "DanyTechTablet": "Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",
95
+ "GalapadTablet": "Android.*\\bG1\\b",
96
+ "MicromaxTablet": "Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",
97
+ "KarbonnTablet": "Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",
98
+ "AllFineTablet": "Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",
99
+ "PROSCANTablet": "\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",
100
+ "YONESTablet": "BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",
101
+ "ChangJiaTablet": "TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",
102
+ "GUTablet": "TX-A1301|TX-M9002|Q702|kf026",
103
+ "PointOfViewTablet": "TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",
104
+ "OvermaxTablet": "OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",
105
+ "HCLTablet": "HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",
106
+ "DPSTablet": "DPS Dream 9|DPS Dual 7",
107
+ "VistureTablet": "V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",
108
+ "CrestaTablet": "CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",
109
+ "MediatekTablet": "\\bMT8125|MT8389|MT8135|MT8377\\b",
110
+ "ConcordeTablet": "Concorde([ ]+)?Tab|ConCorde ReadMan",
111
+ "GoCleverTablet": "GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",
112
+ "ModecomTablet": "FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",
113
+ "VoninoTablet": "\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",
114
+ "ECSTablet": "V07OT2|TM105A|S10OT1|TR10CS1",
115
+ "StorexTablet": "eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",
116
+ "VodafoneTablet": "SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497",
117
+ "EssentielBTablet": "Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",
118
+ "RossMoorTablet": "RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",
119
+ "iMobileTablet": "i-mobile i-note",
120
+ "TolinoTablet": "tolino tab [0-9.]+|tolino shine",
121
+ "AudioSonicTablet": "\\bC-22Q|T7-QC|T-17B|T-17P\\b",
122
+ "AMPETablet": "Android.* A78 ",
123
+ "SkkTablet": "Android.* (SKYPAD|PHOENIX|CYCLOPS)",
124
+ "TecnoTablet": "TECNO P9",
125
+ "JXDTablet": "Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",
126
+ "iJoyTablet": "Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",
127
+ "FX2Tablet": "FX2 PAD7|FX2 PAD10",
128
+ "XoroTablet": "KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",
129
+ "ViewsonicTablet": "ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",
130
+ "OdysTablet": "LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",
131
+ "CaptivaTablet": "CAPTIVA PAD",
132
+ "IconbitTablet": "NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",
133
+ "TeclastTablet": "T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",
134
+ "OndaTablet": "\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",
135
+ "JaytechTablet": "TPC-PA762",
136
+ "BlaupunktTablet": "Endeavour 800NG|Endeavour 1010",
137
+ "DigmaTablet": "\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",
138
+ "EvolioTablet": "ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",
139
+ "LavaTablet": "QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",
140
+ "AocTablet": "MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712",
141
+ "MpmanTablet": "MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",
142
+ "CelkonTablet": "CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",
143
+ "WolderTablet": "miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",
144
+ "MiTablet": "\\bMI PAD\\b|\\bHM NOTE 1W\\b",
145
+ "NibiruTablet": "Nibiru M1|Nibiru Jupiter One",
146
+ "NexoTablet": "NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",
147
+ "LeaderTablet": "TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",
148
+ "UbislateTablet": "UbiSlate[\\s]?7C",
149
+ "PocketBookTablet": "Pocketbook",
150
+ "KocasoTablet": "\\b(TB-1207)\\b",
151
+ "Hudl": "Hudl HT7S3|Hudl 2",
152
+ "TelstraTablet": "T-Hub2",
153
+ "GenericTablet": "Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bJolla\\b|\\bTP750\\b"
154
+ },
155
+ "oss": {
156
+ "AndroidOS": "Android",
157
+ "BlackBerryOS": "blackberry|\\bBB10\\b|rim tablet os",
158
+ "PalmOS": "PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",
159
+ "SymbianOS": "Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",
160
+ "WindowsMobileOS": "Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",
161
+ "WindowsPhoneOS": "Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",
162
+ "iOS": "\\biPhone.*Mobile|\\biPod|\\biPad",
163
+ "MeeGoOS": "MeeGo",
164
+ "MaemoOS": "Maemo",
165
+ "JavaOS": "J2ME\/|\\bMIDP\\b|\\bCLDC\\b",
166
+ "webOS": "webOS|hpwOS",
167
+ "badaOS": "\\bBada\\b",
168
+ "BREWOS": "BREW"
169
+ },
170
+ "uas": {
171
+ "Vivaldi": "Vivaldi",
172
+ "Chrome": "\\bCrMo\\b|CriOS|Android.*Chrome\/[.0-9]* (Mobile)?",
173
+ "Dolfin": "\\bDolfin\\b",
174
+ "Opera": "Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR\/[0-9.]+|Coast\/[0-9.]+",
175
+ "Skyfire": "Skyfire",
176
+ "Edge": "Mobile Safari\/[.0-9]* Edge",
177
+ "IE": "IEMobile|MSIEMobile",
178
+ "Firefox": "fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile",
179
+ "Bolt": "bolt",
180
+ "TeaShark": "teashark",
181
+ "Blazer": "Blazer",
182
+ "Safari": "Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",
183
+ "Tizen": "Tizen",
184
+ "UCBrowser": "UC.*Browser|UCWEB",
185
+ "baiduboxapp": "baiduboxapp",
186
+ "baidubrowser": "baidubrowser",
187
+ "DiigoBrowser": "DiigoBrowser",
188
+ "Puffin": "Puffin",
189
+ "Mercury": "\\bMercury\\b",
190
+ "ObigoBrowser": "Obigo",
191
+ "NetFront": "NF-Browser",
192
+ "GenericBrowser": "NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger",
193
+ "PaleMoon": "Android.*PaleMoon|Mobile.*PaleMoon"
194
+ },
195
+ "props": {
196
+ "Mobile": "Mobile\/[VER]",
197
+ "Build": "Build\/[VER]",
198
+ "Version": "Version\/[VER]",
199
+ "VendorID": "VendorID\/[VER]",
200
+ "iPad": "iPad.*CPU[a-z ]+[VER]",
201
+ "iPhone": "iPhone.*CPU[a-z ]+[VER]",
202
+ "iPod": "iPod.*CPU[a-z ]+[VER]",
203
+ "Kindle": "Kindle\/[VER]",
204
+ "Chrome": [
205
+ "Chrome\/[VER]",
206
+ "CriOS\/[VER]",
207
+ "CrMo\/[VER]"
208
+ ],
209
+ "Coast": [
210
+ "Coast\/[VER]"
211
+ ],
212
+ "Dolfin": "Dolfin\/[VER]",
213
+ "Firefox": "Firefox\/[VER]",
214
+ "Fennec": "Fennec\/[VER]",
215
+ "Edge": "Edge\/[VER]",
216
+ "IE": [
217
+ "IEMobile\/[VER];",
218
+ "IEMobile [VER]",
219
+ "MSIE [VER];",
220
+ "Trident\/[0-9.]+;.*rv:[VER]"
221
+ ],
222
+ "NetFront": "NetFront\/[VER]",
223
+ "NokiaBrowser": "NokiaBrowser\/[VER]",
224
+ "Opera": [
225
+ " OPR\/[VER]",
226
+ "Opera Mini\/[VER]",
227
+ "Version\/[VER]"
228
+ ],
229
+ "Opera Mini": "Opera Mini\/[VER]",
230
+ "Opera Mobi": "Version\/[VER]",
231
+ "UC Browser": "UC Browser[VER]",
232
+ "MQQBrowser": "MQQBrowser\/[VER]",
233
+ "MicroMessenger": "MicroMessenger\/[VER]",
234
+ "baiduboxapp": "baiduboxapp\/[VER]",
235
+ "baidubrowser": "baidubrowser\/[VER]",
236
+ "Iron": "Iron\/[VER]",
237
+ "Safari": [
238
+ "Version\/[VER]",
239
+ "Safari\/[VER]"
240
+ ],
241
+ "Skyfire": "Skyfire\/[VER]",
242
+ "Tizen": "Tizen\/[VER]",
243
+ "Webkit": "webkit[ \/][VER]",
244
+ "PaleMoon": "PaleMoon\/[VER]",
245
+ "Gecko": "Gecko\/[VER]",
246
+ "Trident": "Trident\/[VER]",
247
+ "Presto": "Presto\/[VER]",
248
+ "Goanna": "Goanna\/[VER]",
249
+ "iOS": " \\bi?OS\\b [VER][ ;]{1}",
250
+ "Android": "Android [VER]",
251
+ "BlackBerry": [
252
+ "BlackBerry[\\w]+\/[VER]",
253
+ "BlackBerry.*Version\/[VER]",
254
+ "Version\/[VER]"
255
+ ],
256
+ "BREW": "BREW [VER]",
257
+ "Java": "Java\/[VER]",
258
+ "Windows Phone OS": [
259
+ "Windows Phone OS [VER]",
260
+ "Windows Phone [VER]"
261
+ ],
262
+ "Windows Phone": "Windows Phone [VER]",
263
+ "Windows CE": "Windows CE\/[VER]",
264
+ "Windows NT": "Windows NT [VER]",
265
+ "Symbian": [
266
+ "SymbianOS\/[VER]",
267
+ "Symbian\/[VER]"
268
+ ],
269
+ "webOS": [
270
+ "webOS\/[VER]",
271
+ "hpwOS\/[VER];"
272
+ ]
273
+ },
274
+ "utils": {
275
+ "Bot": "Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",
276
+ "MobileBot": "Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker\/M1A1-R2D2",
277
+ "DesktopMode": "WPDesktop",
278
+ "TV": "SonyDTV|HbbTV",
279
+ "WebKit": "(webkit)[ \/]([\\w.]+)",
280
+ "Console": "\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b",
281
+ "Watch": "SM-V700"
282
+ }
283
+ };
284
+
285
+ // following patterns come from http://detectmobilebrowsers.com/
286
+ impl.detectMobileBrowsers = {
287
+ fullPattern: /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,
288
+ shortPattern: /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,
289
+ tabletPattern: /android|ipad|playbook|silk/i
290
+ };
291
+
292
+ var hasOwnProp = Object.prototype.hasOwnProperty,
293
+ isArray;
294
+
295
+ impl.FALLBACK_PHONE = 'UnknownPhone';
296
+ impl.FALLBACK_TABLET = 'UnknownTablet';
297
+ impl.FALLBACK_MOBILE = 'UnknownMobile';
298
+
299
+ isArray = ('isArray' in Array) ?
300
+ Array.isArray : function (value) { return Object.prototype.toString.call(value) === '[object Array]'; };
301
+
302
+ function equalIC(a, b) {
303
+ return a != null && b != null && a.toLowerCase() === b.toLowerCase();
304
+ }
305
+
306
+ function containsIC(array, value) {
307
+ var valueLC, i, len = array.length;
308
+ if (!len || !value) {
309
+ return false;
310
+ }
311
+ valueLC = value.toLowerCase();
312
+ for (i = 0; i < len; ++i) {
313
+ if (valueLC === array[i].toLowerCase()) {
314
+ return true;
315
+ }
316
+ }
317
+ return false;
318
+ }
319
+
320
+ function convertPropsToRegExp(object) {
321
+ for (var key in object) {
322
+ if (hasOwnProp.call(object, key)) {
323
+ object[key] = new RegExp(object[key], 'i');
324
+ }
325
+ }
326
+ }
327
+
328
+ (function init() {
329
+ var key, values, value, i, len, verPos, mobileDetectRules = impl.mobileDetectRules;
330
+ for (key in mobileDetectRules.props) {
331
+ if (hasOwnProp.call(mobileDetectRules.props, key)) {
332
+ values = mobileDetectRules.props[key];
333
+ if (!isArray(values)) {
334
+ values = [values];
335
+ }
336
+ len = values.length;
337
+ for (i = 0; i < len; ++i) {
338
+ value = values[i];
339
+ verPos = value.indexOf('[VER]');
340
+ if (verPos >= 0) {
341
+ value = value.substring(0, verPos) + '([\\w._\\+]+)' + value.substring(verPos + 5);
342
+ }
343
+ values[i] = new RegExp(value, 'i');
344
+ }
345
+ mobileDetectRules.props[key] = values;
346
+ }
347
+ }
348
+ convertPropsToRegExp(mobileDetectRules.oss);
349
+ convertPropsToRegExp(mobileDetectRules.phones);
350
+ convertPropsToRegExp(mobileDetectRules.tablets);
351
+ convertPropsToRegExp(mobileDetectRules.uas);
352
+ convertPropsToRegExp(mobileDetectRules.utils);
353
+
354
+ // copy some patterns to oss0 which are tested first (see issue#15)
355
+ mobileDetectRules.oss0 = {
356
+ WindowsPhoneOS: mobileDetectRules.oss.WindowsPhoneOS,
357
+ WindowsMobileOS: mobileDetectRules.oss.WindowsMobileOS
358
+ };
359
+ }());
360
+
361
+ /**
362
+ * Test userAgent string against a set of rules and find the first matched key.
363
+ * @param {Object} rules (key is String, value is RegExp)
364
+ * @param {String} userAgent the navigator.userAgent (or HTTP-Header 'User-Agent').
365
+ * @returns {String|null} the matched key if found, otherwise <tt>null</tt>
366
+ * @private
367
+ */
368
+ impl.findMatch = function(rules, userAgent) {
369
+ for (var key in rules) {
370
+ if (hasOwnProp.call(rules, key)) {
371
+ if (rules[key].test(userAgent)) {
372
+ return key;
373
+ }
374
+ }
375
+ }
376
+ return null;
377
+ };
378
+
379
+ /**
380
+ * Test userAgent string against a set of rules and return an array of matched keys.
381
+ * @param {Object} rules (key is String, value is RegExp)
382
+ * @param {String} userAgent the navigator.userAgent (or HTTP-Header 'User-Agent').
383
+ * @returns {Array} an array of matched keys, may be empty when there is no match, but not <tt>null</tt>
384
+ * @private
385
+ */
386
+ impl.findMatches = function(rules, userAgent) {
387
+ var result = [];
388
+ for (var key in rules) {
389
+ if (hasOwnProp.call(rules, key)) {
390
+ if (rules[key].test(userAgent)) {
391
+ result.push(key);
392
+ }
393
+ }
394
+ }
395
+ return result;
396
+ };
397
+
398
+ /**
399
+ * Check the version of the given property in the User-Agent.
400
+ *
401
+ * @param {String} propertyName
402
+ * @param {String} userAgent
403
+ * @return {String} version or <tt>null</tt> if version not found
404
+ * @private
405
+ */
406
+ impl.getVersionStr = function (propertyName, userAgent) {
407
+ var props = impl.mobileDetectRules.props, patterns, i, len, match;
408
+ if (hasOwnProp.call(props, propertyName)) {
409
+ patterns = props[propertyName];
410
+ len = patterns.length;
411
+ for (i = 0; i < len; ++i) {
412
+ match = patterns[i].exec(userAgent);
413
+ if (match !== null) {
414
+ return match[1];
415
+ }
416
+ }
417
+ }
418
+ return null;
419
+ };
420
+
421
+ /**
422
+ * Check the version of the given property in the User-Agent.
423
+ * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
424
+ *
425
+ * @param {String} propertyName
426
+ * @param {String} userAgent
427
+ * @return {Number} version or <tt>NaN</tt> if version not found
428
+ * @private
429
+ */
430
+ impl.getVersion = function (propertyName, userAgent) {
431
+ var version = impl.getVersionStr(propertyName, userAgent);
432
+ return version ? impl.prepareVersionNo(version) : NaN;
433
+ };
434
+
435
+ /**
436
+ * Prepare the version number.
437
+ *
438
+ * @param {String} version
439
+ * @return {Number} the version number as a floating number
440
+ * @private
441
+ */
442
+ impl.prepareVersionNo = function (version) {
443
+ var numbers;
444
+
445
+ numbers = version.split(/[a-z._ \/\-]/i);
446
+ if (numbers.length === 1) {
447
+ version = numbers[0];
448
+ }
449
+ if (numbers.length > 1) {
450
+ version = numbers[0] + '.';
451
+ numbers.shift();
452
+ version += numbers.join('');
453
+ }
454
+ return Number(version);
455
+ };
456
+
457
+ impl.isMobileFallback = function (userAgent) {
458
+ return impl.detectMobileBrowsers.fullPattern.test(userAgent) ||
459
+ impl.detectMobileBrowsers.shortPattern.test(userAgent.substr(0,4));
460
+ };
461
+
462
+ impl.isTabletFallback = function (userAgent) {
463
+ return impl.detectMobileBrowsers.tabletPattern.test(userAgent);
464
+ };
465
+
466
+ impl.prepareDetectionCache = function (cache, userAgent, maxPhoneWidth) {
467
+ if (cache.mobile !== undefined) {
468
+ return;
469
+ }
470
+ var phone, tablet, phoneSized;
471
+
472
+ // first check for stronger tablet rules, then phone (see issue#5)
473
+ tablet = impl.findMatch(impl.mobileDetectRules.tablets, userAgent);
474
+ if (tablet) {
475
+ cache.mobile = cache.tablet = tablet;
476
+ cache.phone = null;
477
+ return; // unambiguously identified as tablet
478
+ }
479
+
480
+ phone = impl.findMatch(impl.mobileDetectRules.phones, userAgent);
481
+ if (phone) {
482
+ cache.mobile = cache.phone = phone;
483
+ cache.tablet = null;
484
+ return; // unambiguously identified as phone
485
+ }
486
+
487
+ // our rules haven't found a match -> try more general fallback rules
488
+ if (impl.isMobileFallback(userAgent)) {
489
+ phoneSized = MobileDetect.isPhoneSized(maxPhoneWidth);
490
+ if (phoneSized === undefined) {
491
+ cache.mobile = impl.FALLBACK_MOBILE;
492
+ cache.tablet = cache.phone = null;
493
+ } else if (phoneSized) {
494
+ cache.mobile = cache.phone = impl.FALLBACK_PHONE;
495
+ cache.tablet = null;
496
+ } else {
497
+ cache.mobile = cache.tablet = impl.FALLBACK_TABLET;
498
+ cache.phone = null;
499
+ }
500
+ } else if (impl.isTabletFallback(userAgent)) {
501
+ cache.mobile = cache.tablet = impl.FALLBACK_TABLET;
502
+ cache.phone = null;
503
+ } else {
504
+ // not mobile at all!
505
+ cache.mobile = cache.tablet = cache.phone = null;
506
+ }
507
+ };
508
+
509
+ // t is a reference to a MobileDetect instance
510
+ impl.mobileGrade = function (t) {
511
+ // impl note:
512
+ // To keep in sync w/ Mobile_Detect.php easily, the following code is tightly aligned to the PHP version.
513
+ // When changes are made in Mobile_Detect.php, copy this method and replace:
514
+ // $this-> / t.
515
+ // self::MOBILE_GRADE_(.) / '$1'
516
+ // , self::VERSION_TYPE_FLOAT / (nothing)
517
+ // isIOS() / os('iOS')
518
+ // [reg] / (nothing) <-- jsdelivr complaining about unescaped unicode character U+00AE
519
+ var $isMobile = t.mobile() !== null;
520
+
521
+ if (
522
+ // Apple iOS 3.2-5.1 - Tested on the original iPad (4.3 / 5.0), iPad 2 (4.3), iPad 3 (5.1), original iPhone (3.1), iPhone 3 (3.2), 3GS (4.3), 4 (4.3 / 5.0), and 4S (5.1)
523
+ t.os('iOS') && t.version('iPad')>=4.3 ||
524
+ t.os('iOS') && t.version('iPhone')>=3.1 ||
525
+ t.os('iOS') && t.version('iPod')>=3.1 ||
526
+
527
+ // Android 2.1-2.3 - Tested on the HTC Incredible (2.2), original Droid (2.2), HTC Aria (2.1), Google Nexus S (2.3). Functional on 1.5 & 1.6 but performance may be sluggish, tested on Google G1 (1.5)
528
+ // Android 3.1 (Honeycomb) - Tested on the Samsung Galaxy Tab 10.1 and Motorola XOOM
529
+ // Android 4.0 (ICS) - Tested on a Galaxy Nexus. Note: transition performance can be poor on upgraded devices
530
+ // Android 4.1 (Jelly Bean) - Tested on a Galaxy Nexus and Galaxy 7
531
+ ( t.version('Android')>2.1 && t.is('Webkit') ) ||
532
+
533
+ // Windows Phone 7-7.5 - Tested on the HTC Surround (7.0) HTC Trophy (7.5), LG-E900 (7.5), Nokia Lumia 800
534
+ t.version('Windows Phone OS')>=7.0 ||
535
+
536
+ // Blackberry 7 - Tested on BlackBerry Torch 9810
537
+ // Blackberry 6.0 - Tested on the Torch 9800 and Style 9670
538
+ t.is('BlackBerry') && t.version('BlackBerry')>=6.0 ||
539
+ // Blackberry Playbook (1.0-2.0) - Tested on PlayBook
540
+ t.match('Playbook.*Tablet') ||
541
+
542
+ // Palm WebOS (1.4-2.0) - Tested on the Palm Pixi (1.4), Pre (1.4), Pre 2 (2.0)
543
+ ( t.version('webOS')>=1.4 && t.match('Palm|Pre|Pixi') ) ||
544
+ // Palm WebOS 3.0 - Tested on HP TouchPad
545
+ t.match('hp.*TouchPad') ||
546
+
547
+ // Firefox Mobile (12 Beta) - Tested on Android 2.3 device
548
+ ( t.is('Firefox') && t.version('Firefox')>=12 ) ||
549
+
550
+ // Chrome for Android - Tested on Android 4.0, 4.1 device
551
+ ( t.is('Chrome') && t.is('AndroidOS') && t.version('Android')>=4.0 ) ||
552
+
553
+ // Skyfire 4.1 - Tested on Android 2.3 device
554
+ ( t.is('Skyfire') && t.version('Skyfire')>=4.1 && t.is('AndroidOS') && t.version('Android')>=2.3 ) ||
555
+
556
+ // Opera Mobile 11.5-12: Tested on Android 2.3
557
+ ( t.is('Opera') && t.version('Opera Mobi')>11 && t.is('AndroidOS') ) ||
558
+
559
+ // Meego 1.2 - Tested on Nokia 950 and N9
560
+ t.is('MeeGoOS') ||
561
+
562
+ // Tizen (pre-release) - Tested on early hardware
563
+ t.is('Tizen') ||
564
+
565
+ // Samsung Bada 2.0 - Tested on a Samsung Wave 3, Dolphin browser
566
+ // @todo: more tests here!
567
+ t.is('Dolfin') && t.version('Bada')>=2.0 ||
568
+
569
+ // UC Browser - Tested on Android 2.3 device
570
+ ( (t.is('UC Browser') || t.is('Dolfin')) && t.version('Android')>=2.3 ) ||
571
+
572
+ // Kindle 3 and Fire - Tested on the built-in WebKit browser for each
573
+ ( t.match('Kindle Fire') ||
574
+ t.is('Kindle') && t.version('Kindle')>=3.0 ) ||
575
+
576
+ // Nook Color 1.4.1 - Tested on original Nook Color, not Nook Tablet
577
+ t.is('AndroidOS') && t.is('NookTablet') ||
578
+
579
+ // Chrome Desktop 11-21 - Tested on OS X 10.7 and Windows 7
580
+ t.version('Chrome')>=11 && !$isMobile ||
581
+
582
+ // Safari Desktop 4-5 - Tested on OS X 10.7 and Windows 7
583
+ t.version('Safari')>=5.0 && !$isMobile ||
584
+
585
+ // Firefox Desktop 4-13 - Tested on OS X 10.7 and Windows 7
586
+ t.version('Firefox')>=4.0 && !$isMobile ||
587
+
588
+ // Internet Explorer 7-9 - Tested on Windows XP, Vista and 7
589
+ t.version('MSIE')>=7.0 && !$isMobile ||
590
+
591
+ // Opera Desktop 10-12 - Tested on OS X 10.7 and Windows 7
592
+ // @reference: http://my.opera.com/community/openweb/idopera/
593
+ t.version('Opera')>=10 && !$isMobile
594
+
595
+ ){
596
+ return 'A';
597
+ }
598
+
599
+ if (
600
+ t.os('iOS') && t.version('iPad')<4.3 ||
601
+ t.os('iOS') && t.version('iPhone')<3.1 ||
602
+ t.os('iOS') && t.version('iPod')<3.1 ||
603
+
604
+ // Blackberry 5.0: Tested on the Storm 2 9550, Bold 9770
605
+ t.is('Blackberry') && t.version('BlackBerry')>=5 && t.version('BlackBerry')<6 ||
606
+
607
+ //Opera Mini (5.0-6.5) - Tested on iOS 3.2/4.3 and Android 2.3
608
+ ( t.version('Opera Mini')>=5.0 && t.version('Opera Mini')<=6.5 &&
609
+ (t.version('Android')>=2.3 || t.is('iOS')) ) ||
610
+
611
+ // Nokia Symbian^3 - Tested on Nokia N8 (Symbian^3), C7 (Symbian^3), also works on N97 (Symbian^1)
612
+ t.match('NokiaN8|NokiaC7|N97.*Series60|Symbian/3') ||
613
+
614
+ // @todo: report this (tested on Nokia N71)
615
+ t.version('Opera Mobi')>=11 && t.is('SymbianOS')
616
+ ){
617
+ return 'B';
618
+ }
619
+
620
+ if (
621
+ // Blackberry 4.x - Tested on the Curve 8330
622
+ t.version('BlackBerry')<5.0 ||
623
+ // Windows Mobile - Tested on the HTC Leo (WinMo 5.2)
624
+ t.match('MSIEMobile|Windows CE.*Mobile') || t.version('Windows Mobile')<=5.2
625
+
626
+ ){
627
+ return 'C';
628
+ }
629
+
630
+ //All older smartphone platforms and featurephones - Any device that doesn't support media queries
631
+ //will receive the basic, C grade experience.
632
+ return 'C';
633
+ };
634
+
635
+ impl.detectOS = function (ua) {
636
+ return impl.findMatch(impl.mobileDetectRules.oss0, ua) ||
637
+ impl.findMatch(impl.mobileDetectRules.oss, ua);
638
+ };
639
+
640
+ impl.getDeviceSmallerSide = function () {
641
+ return window.screen.width < window.screen.height ?
642
+ window.screen.width :
643
+ window.screen.height;
644
+ };
645
+
646
+ /**
647
+ * Constructor for MobileDetect object.
648
+ * <br>
649
+ * Such an object will keep a reference to the given user-agent string and cache most of the detect queries.<br>
650
+ * <div style="background-color: #d9edf7; border: 1px solid #bce8f1; color: #3a87ad; padding: 14px; border-radius: 2px; margin-top: 20px">
651
+ * <strong>Find information how to download and install:</strong>
652
+ * <a href="https://github.com/hgoebl/mobile-detect.js/">github.com/hgoebl/mobile-detect.js/</a>
653
+ * </div>
654
+ *
655
+ * @example <pre>
656
+ * var md = new MobileDetect(window.navigator.userAgent);
657
+ * if (md.mobile()) {
658
+ * location.href = (md.mobileGrade() === 'A') ? '/mobile/' : '/lynx/';
659
+ * }
660
+ * </pre>
661
+ *
662
+ * @param {string} userAgent typically taken from window.navigator.userAgent or http_header['User-Agent']
663
+ * @param {number} [maxPhoneWidth=600] <strong>only for browsers</strong> specify a value for the maximum
664
+ * width of smallest device side (in logical "CSS" pixels) until a device detected as mobile will be handled
665
+ * as phone.
666
+ * This is only used in cases where the device cannot be classified as phone or tablet.<br>
667
+ * See <a href="http://developer.android.com/guide/practices/screens_support.html">Declaring Tablet Layouts
668
+ * for Android</a>.<br>
669
+ * If you provide a value < 0, then this "fuzzy" check is disabled.
670
+ * @constructor
671
+ * @global
672
+ */
673
+ function MobileDetect(userAgent, maxPhoneWidth) {
674
+ this.ua = userAgent || '';
675
+ this._cache = {};
676
+ //600dp is typical 7" tablet minimum width
677
+ this.maxPhoneWidth = maxPhoneWidth || 600;
678
+ }
679
+
680
+ MobileDetect.prototype = {
681
+ constructor: MobileDetect,
682
+
683
+ /**
684
+ * Returns the detected phone or tablet type or <tt>null</tt> if it is not a mobile device.
685
+ * <br>
686
+ * For a list of possible return values see {@link MobileDetect#phone} and {@link MobileDetect#tablet}.<br>
687
+ * <br>
688
+ * If the device is not detected by the regular expressions from Mobile-Detect, a test is made against
689
+ * the patterns of <a href="http://detectmobilebrowsers.com/">detectmobilebrowsers.com</a>. If this test
690
+ * is positive, a value of <code>UnknownPhone</code>, <code>UnknownTablet</code> or
691
+ * <code>UnknownMobile</code> is returned.<br>
692
+ * When used in browser, the decision whether phone or tablet is made based on <code>screen.width/height</code>.<br>
693
+ * <br>
694
+ * When used server-side (node.js), there is no way to tell the difference between <code>UnknownTablet</code>
695
+ * and <code>UnknownMobile</code>, so you will get <code>UnknownMobile</code> here.<br>
696
+ * Be aware that since v1.0.0 in this special case you will get <code>UnknownMobile</code> only for:
697
+ * {@link MobileDetect#mobile}, not for {@link MobileDetect#phone} and {@link MobileDetect#tablet}.
698
+ * In versions before v1.0.0 all 3 methods returned <code>UnknownMobile</code> which was tedious to use.
699
+ * <br>
700
+ * In most cases you will use the return value just as a boolean.
701
+ *
702
+ * @returns {String} the key for the phone family or tablet family, e.g. "Nexus".
703
+ * @function MobileDetect#mobile
704
+ */
705
+ mobile: function () {
706
+ impl.prepareDetectionCache(this._cache, this.ua, this.maxPhoneWidth);
707
+ return this._cache.mobile;
708
+ },
709
+
710
+ /**
711
+ * Returns the detected phone type/family string or <tt>null</tt>.
712
+ * <br>
713
+ * The returned tablet (family or producer) is one of following keys:<br>
714
+ * <br><tt>iPhone, BlackBerry, HTC, Nexus, Dell, Motorola, Samsung, LG, Sony, Asus,
715
+ * NokiaLumia, Micromax, Palm, Vertu, Pantech, Fly, Wiko, iMobile, SimValley,
716
+ * Wolfgang, Alcatel, Nintendo, Amoi, INQ, GenericPhone</tt><br>
717
+ * <br>
718
+ * If the device is not detected by the regular expressions from Mobile-Detect, a test is made against
719
+ * the patterns of <a href="http://detectmobilebrowsers.com/">detectmobilebrowsers.com</a>. If this test
720
+ * is positive, a value of <code>UnknownPhone</code> or <code>UnknownMobile</code> is returned.<br>
721
+ * When used in browser, the decision whether phone or tablet is made based on <code>screen.width/height</code>.<br>
722
+ * <br>
723
+ * When used server-side (node.js), there is no way to tell the difference between <code>UnknownTablet</code>
724
+ * and <code>UnknownMobile</code>, so you will get <code>null</code> here, while {@link MobileDetect#mobile}
725
+ * will return <code>UnknownMobile</code>.<br>
726
+ * Be aware that since v1.0.0 in this special case you will get <code>UnknownMobile</code> only for:
727
+ * {@link MobileDetect#mobile}, not for {@link MobileDetect#phone} and {@link MobileDetect#tablet}.
728
+ * In versions before v1.0.0 all 3 methods returned <code>UnknownMobile</code> which was tedious to use.
729
+ * <br>
730
+ * In most cases you will use the return value just as a boolean.
731
+ *
732
+ * @returns {String} the key of the phone family or producer, e.g. "iPhone"
733
+ * @function MobileDetect#phone
734
+ */
735
+ phone: function () {
736
+ impl.prepareDetectionCache(this._cache, this.ua, this.maxPhoneWidth);
737
+ return this._cache.phone;
738
+ },
739
+
740
+ /**
741
+ * Returns the detected tablet type/family string or <tt>null</tt>.
742
+ * <br>
743
+ * The returned tablet (family or producer) is one of following keys:<br>
744
+ * <br><tt>iPad, NexusTablet, SamsungTablet, Kindle, SurfaceTablet, HPTablet, AsusTablet,
745
+ * BlackBerryTablet, HTCtablet, MotorolaTablet, NookTablet, AcerTablet,
746
+ * ToshibaTablet, LGTablet, FujitsuTablet, PrestigioTablet, LenovoTablet,
747
+ * DellTablet, YarvikTablet, MedionTablet, ArnovaTablet, IntensoTablet, IRUTablet,
748
+ * MegafonTablet, EbodaTablet, AllViewTablet, ArchosTablet, AinolTablet,
749
+ * NokiaLumiaTablet, SonyTablet, PhilipsTablet, CubeTablet, CobyTablet, MIDTablet,
750
+ * MSITablet, SMiTTablet, RockChipTablet, FlyTablet, bqTablet, HuaweiTablet,
751
+ * NecTablet, PantechTablet, BronchoTablet, VersusTablet, ZyncTablet,
752
+ * PositivoTablet, NabiTablet, KoboTablet, DanewTablet, TexetTablet,
753
+ * PlaystationTablet, TrekstorTablet, PyleAudioTablet, AdvanTablet,
754
+ * DanyTechTablet, GalapadTablet, MicromaxTablet, KarbonnTablet, AllFineTablet,
755
+ * PROSCANTablet, YONESTablet, ChangJiaTablet, GUTablet, PointOfViewTablet,
756
+ * OvermaxTablet, HCLTablet, DPSTablet, VistureTablet, CrestaTablet,
757
+ * MediatekTablet, ConcordeTablet, GoCleverTablet, ModecomTablet, VoninoTablet,
758
+ * ECSTablet, StorexTablet, VodafoneTablet, EssentielBTablet, RossMoorTablet,
759
+ * iMobileTablet, TolinoTablet, AudioSonicTablet, AMPETablet, SkkTablet,
760
+ * TecnoTablet, JXDTablet, iJoyTablet, FX2Tablet, XoroTablet, ViewsonicTablet,
761
+ * OdysTablet, CaptivaTablet, IconbitTablet, TeclastTablet, OndaTablet,
762
+ * JaytechTablet, BlaupunktTablet, DigmaTablet, EvolioTablet, LavaTablet,
763
+ * AocTablet, MpmanTablet, CelkonTablet, WolderTablet, MiTablet, NibiruTablet,
764
+ * NexoTablet, LeaderTablet, UbislateTablet, PocketBookTablet, KocasoTablet, Hudl,
765
+ * TelstraTablet, GenericTablet</tt><br>
766
+ * <br>
767
+ * If the device is not detected by the regular expressions from Mobile-Detect, a test is made against
768
+ * the patterns of <a href="http://detectmobilebrowsers.com/">detectmobilebrowsers.com</a>. If this test
769
+ * is positive, a value of <code>UnknownTablet</code> or <code>UnknownMobile</code> is returned.<br>
770
+ * When used in browser, the decision whether phone or tablet is made based on <code>screen.width/height</code>.<br>
771
+ * <br>
772
+ * When used server-side (node.js), there is no way to tell the difference between <code>UnknownTablet</code>
773
+ * and <code>UnknownMobile</code>, so you will get <code>null</code> here, while {@link MobileDetect#mobile}
774
+ * will return <code>UnknownMobile</code>.<br>
775
+ * Be aware that since v1.0.0 in this special case you will get <code>UnknownMobile</code> only for:
776
+ * {@link MobileDetect#mobile}, not for {@link MobileDetect#phone} and {@link MobileDetect#tablet}.
777
+ * In versions before v1.0.0 all 3 methods returned <code>UnknownMobile</code> which was tedious to use.
778
+ * <br>
779
+ * In most cases you will use the return value just as a boolean.
780
+ *
781
+ * @returns {String} the key of the tablet family or producer, e.g. "SamsungTablet"
782
+ * @function MobileDetect#tablet
783
+ */
784
+ tablet: function () {
785
+ impl.prepareDetectionCache(this._cache, this.ua, this.maxPhoneWidth);
786
+ return this._cache.tablet;
787
+ },
788
+
789
+ /**
790
+ * Returns the (first) detected user-agent string or <tt>null</tt>.
791
+ * <br>
792
+ * The returned user-agent is one of following keys:<br>
793
+ * <br><tt>Vivaldi, Chrome, Dolfin, Opera, Skyfire, Edge, IE, Firefox, Bolt, TeaShark,
794
+ * Blazer, Safari, Tizen, UCBrowser, baiduboxapp, baidubrowser, DiigoBrowser,
795
+ * Puffin, Mercury, ObigoBrowser, NetFront, GenericBrowser, PaleMoon</tt><br>
796
+ * <br>
797
+ * In most cases calling {@link MobileDetect#userAgent} will be sufficient. But there are rare
798
+ * cases where a mobile device pretends to be more than one particular browser. You can get the
799
+ * list of all matches with {@link MobileDetect#userAgents} or check for a particular value by
800
+ * providing one of the defined keys as first argument to {@link MobileDetect#is}.
801
+ *
802
+ * @returns {String} the key for the detected user-agent or <tt>null</tt>
803
+ * @function MobileDetect#userAgent
804
+ */
805
+ userAgent: function () {
806
+ if (this._cache.userAgent === undefined) {
807
+ this._cache.userAgent = impl.findMatch(impl.mobileDetectRules.uas, this.ua);
808
+ }
809
+ return this._cache.userAgent;
810
+ },
811
+
812
+ /**
813
+ * Returns all detected user-agent strings.
814
+ * <br>
815
+ * The array is empty or contains one or more of following keys:<br>
816
+ * <br><tt>Vivaldi, Chrome, Dolfin, Opera, Skyfire, Edge, IE, Firefox, Bolt, TeaShark,
817
+ * Blazer, Safari, Tizen, UCBrowser, baiduboxapp, baidubrowser, DiigoBrowser,
818
+ * Puffin, Mercury, ObigoBrowser, NetFront, GenericBrowser, PaleMoon</tt><br>
819
+ * <br>
820
+ * In most cases calling {@link MobileDetect#userAgent} will be sufficient. But there are rare
821
+ * cases where a mobile device pretends to be more than one particular browser. You can get the
822
+ * list of all matches with {@link MobileDetect#userAgents} or check for a particular value by
823
+ * providing one of the defined keys as first argument to {@link MobileDetect#is}.
824
+ *
825
+ * @returns {Array} the array of detected user-agent keys or <tt>[]</tt>
826
+ * @function MobileDetect#userAgents
827
+ */
828
+ userAgents: function () {
829
+ if (this._cache.userAgents === undefined) {
830
+ this._cache.userAgents = impl.findMatches(impl.mobileDetectRules.uas, this.ua);
831
+ }
832
+ return this._cache.userAgents;
833
+ },
834
+
835
+ /**
836
+ * Returns the detected operating system string or <tt>null</tt>.
837
+ * <br>
838
+ * The operating system is one of following keys:<br>
839
+ * <br><tt>AndroidOS, BlackBerryOS, PalmOS, SymbianOS, WindowsMobileOS, WindowsPhoneOS,
840
+ * iOS, MeeGoOS, MaemoOS, JavaOS, webOS, badaOS, BREWOS</tt><br>
841
+ *
842
+ * @returns {String} the key for the detected operating system.
843
+ * @function MobileDetect#os
844
+ */
845
+ os: function () {
846
+ if (this._cache.os === undefined) {
847
+ this._cache.os = impl.detectOS(this.ua);
848
+ }
849
+ return this._cache.os;
850
+ },
851
+
852
+ /**
853
+ * Get the version (as Number) of the given property in the User-Agent.
854
+ * <br>
855
+ * Will return a float number. (eg. 2_0 will return 2.0, 4.3.1 will return 4.31)
856
+ *
857
+ * @param {String} key a key defining a thing which has a version.<br>
858
+ * You can use one of following keys:<br>
859
+ * <br><tt>Mobile, Build, Version, VendorID, iPad, iPhone, iPod, Kindle, Chrome, Coast,
860
+ * Dolfin, Firefox, Fennec, Edge, IE, NetFront, NokiaBrowser, Opera, Opera Mini,
861
+ * Opera Mobi, UC Browser, MQQBrowser, MicroMessenger, baiduboxapp, baidubrowser,
862
+ * Iron, Safari, Skyfire, Tizen, Webkit, PaleMoon, Gecko, Trident, Presto, Goanna,
863
+ * iOS, Android, BlackBerry, BREW, Java, Windows Phone OS, Windows Phone, Windows
864
+ * CE, Windows NT, Symbian, webOS</tt><br>
865
+ *
866
+ * @returns {Number} the version as float or <tt>NaN</tt> if User-Agent doesn't contain this version.
867
+ * Be careful when comparing this value with '==' operator!
868
+ * @function MobileDetect#version
869
+ */
870
+ version: function (key) {
871
+ return impl.getVersion(key, this.ua);
872
+ },
873
+
874
+ /**
875
+ * Get the version (as String) of the given property in the User-Agent.
876
+ * <br>
877
+ *
878
+ * @param {String} key a key defining a thing which has a version.<br>
879
+ * You can use one of following keys:<br>
880
+ * <br><tt>Mobile, Build, Version, VendorID, iPad, iPhone, iPod, Kindle, Chrome, Coast,
881
+ * Dolfin, Firefox, Fennec, Edge, IE, NetFront, NokiaBrowser, Opera, Opera Mini,
882
+ * Opera Mobi, UC Browser, MQQBrowser, MicroMessenger, baiduboxapp, baidubrowser,
883
+ * Iron, Safari, Skyfire, Tizen, Webkit, PaleMoon, Gecko, Trident, Presto, Goanna,
884
+ * iOS, Android, BlackBerry, BREW, Java, Windows Phone OS, Windows Phone, Windows
885
+ * CE, Windows NT, Symbian, webOS</tt><br>
886
+ *
887
+ * @returns {String} the "raw" version as String or <tt>null</tt> if User-Agent doesn't contain this version.
888
+ *
889
+ * @function MobileDetect#versionStr
890
+ */
891
+ versionStr: function (key) {
892
+ return impl.getVersionStr(key, this.ua);
893
+ },
894
+
895
+ /**
896
+ * Global test key against userAgent, os, phone, tablet and some other properties of userAgent string.
897
+ *
898
+ * @param {String} key the key (case-insensitive) of a userAgent, an operating system, phone or
899
+ * tablet family.<br>
900
+ * For a complete list of possible values, see {@link MobileDetect#userAgent},
901
+ * {@link MobileDetect#os}, {@link MobileDetect#phone}, {@link MobileDetect#tablet}.<br>
902
+ * Additionally you have following keys:<br>
903
+ * <br><tt>Bot, MobileBot, DesktopMode, TV, WebKit, Console, Watch</tt><br>
904
+ *
905
+ * @returns {boolean} <tt>true</tt> when the given key is one of the defined keys of userAgent, os, phone,
906
+ * tablet or one of the listed additional keys, otherwise <tt>false</tt>
907
+ * @function MobileDetect#is
908
+ */
909
+ is: function (key) {
910
+ return containsIC(this.userAgents(), key) ||
911
+ equalIC(key, this.os()) ||
912
+ equalIC(key, this.phone()) ||
913
+ equalIC(key, this.tablet()) ||
914
+ containsIC(impl.findMatches(impl.mobileDetectRules.utils, this.ua), key);
915
+ },
916
+
917
+ /**
918
+ * Do a quick test against navigator::userAgent.
919
+ *
920
+ * @param {String|RegExp} pattern the pattern, either as String or RegExp
921
+ * (a string will be converted to a case-insensitive RegExp).
922
+ * @returns {boolean} <tt>true</tt> when the pattern matches, otherwise <tt>false</tt>
923
+ * @function MobileDetect#match
924
+ */
925
+ match: function (pattern) {
926
+ if (!(pattern instanceof RegExp)) {
927
+ pattern = new RegExp(pattern, 'i');
928
+ }
929
+ return pattern.test(this.ua);
930
+ },
931
+
932
+ /**
933
+ * Checks whether the mobile device can be considered as phone regarding <code>screen.width</code>.
934
+ * <br>
935
+ * Obviously this method makes sense in browser environments only (not for Node.js)!
936
+ * @param {number} [maxPhoneWidth] the maximum logical pixels (aka. CSS-pixels) to be considered as phone.<br>
937
+ * The argument is optional and if not present or falsy, the value of the constructor is taken.
938
+ * @returns {boolean|undefined} <code>undefined</code> if screen size wasn't detectable, else <code>true</code>
939
+ * when screen.width is less or equal to maxPhoneWidth, otherwise <code>false</code>.<br>
940
+ * Will always return <code>undefined</code> server-side.
941
+ */
942
+ isPhoneSized: function (maxPhoneWidth) {
943
+ return MobileDetect.isPhoneSized(maxPhoneWidth || this.maxPhoneWidth);
944
+ },
945
+
946
+ /**
947
+ * Returns the mobile grade ('A', 'B', 'C').
948
+ *
949
+ * @returns {String} one of the mobile grades ('A', 'B', 'C').
950
+ * @function MobileDetect#mobileGrade
951
+ */
952
+ mobileGrade: function () {
953
+ if (this._cache.grade === undefined) {
954
+ this._cache.grade = impl.mobileGrade(this);
955
+ }
956
+ return this._cache.grade;
957
+ }
958
+ };
959
+
960
+ // environment-dependent
961
+ if (typeof window !== 'undefined' && window.screen) {
962
+ MobileDetect.isPhoneSized = function (maxPhoneWidth) {
963
+ return maxPhoneWidth < 0 ? undefined : impl.getDeviceSmallerSide() <= maxPhoneWidth;
964
+ };
965
+ } else {
966
+ MobileDetect.isPhoneSized = function () {};
967
+ }
968
+
969
+ // should not be replaced by a completely new object - just overwrite existing methods
970
+ MobileDetect._impl = impl;
971
+
972
+ MobileDetect.version = '1.3.3 2016-07-31';
973
+
974
+ return MobileDetect;
975
+ }); // end of call of define()
976
+ })((function (undefined) {
977
+ if (typeof module !== 'undefined' && module.exports) {
978
+ return function (factory) { module.exports = factory(); };
979
+ } else if (typeof define === 'function' && define.amd) {
980
+ return define;
981
+ } else if (typeof window !== 'undefined') {
982
+ return function (factory) { window.MobileDetect = factory(); };
983
+ } else {
984
+ // please file a bug if you get this error!
985
+ throw new Error('unknown environment');
986
+ }
987
+ })());
assets/js/mobile-detect.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ !function(T,e){T(function(){"use strict";function T(T,e){return null!=T&&null!=e&&T.toLowerCase()===e.toLowerCase()}function S(T,e){var S,i,o=T.length;if(!o||!e)return!1;for(S=e.toLowerCase(),i=0;o>i;++i)if(S===T[i].toLowerCase())return!0;return!1}function i(T){for(var e in T)n.call(T,e)&&(T[e]=new RegExp(T[e],"i"))}function o(T,e){this.ua=T||"",this._cache={},this.maxPhoneWidth=e||600}var P={};P.mobileDetectRules={phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",Dell:"Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b",Samsung:"Samsung|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",NokiaLumia:"Lumia [0-9]{3,4}",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo 3DS",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI)\\b",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K017 |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",NokiaLumiaTablet:"Lumia 2520",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",KocasoTablet:"\\b(TB-1207)\\b",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bJolla\\b|\\bTP750\\b"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Vivaldi:"Vivaldi",Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+",Skyfire:"Skyfire",Edge:"Mobile Safari/[.0-9]* Edge",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",Tizen:"Tizen",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger",PaleMoon:"Android.*PaleMoon|Mobile.*PaleMoon"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:"Firefox/[VER]",Fennec:"Fennec/[VER]",Edge:"Edge/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]","UC Browser":"UC Browser[VER]",MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",PaleMoon:"PaleMoon/[VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",Goanna:"Goanna/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},P.detectMobileBrowsers={fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,tabletPattern:/android|ipad|playbook|silk/i};var a,n=Object.prototype.hasOwnProperty;return P.FALLBACK_PHONE="UnknownPhone",P.FALLBACK_TABLET="UnknownTablet",P.FALLBACK_MOBILE="UnknownMobile",a="isArray"in Array?Array.isArray:function(T){return"[object Array]"===Object.prototype.toString.call(T)},function(){var T,e,S,o,A,b,G=P.mobileDetectRules;
2
+ for(T in G.props)if(n.call(G.props,T)){for(e=G.props[T],a(e)||(e=[e]),A=e.length,o=0;A>o;++o)S=e[o],b=S.indexOf("[VER]"),b>=0&&(S=S.substring(0,b)+"([\\w._\\+]+)"+S.substring(b+5)),e[o]=new RegExp(S,"i");G.props[T]=e}i(G.oss),i(G.phones),i(G.tablets),i(G.uas),i(G.utils),G.oss0={WindowsPhoneOS:G.oss.WindowsPhoneOS,WindowsMobileOS:G.oss.WindowsMobileOS}}(),P.findMatch=function(T,e){for(var S in T)if(n.call(T,S)&&T[S].test(e))return S;return null},P.findMatches=function(T,e){var S=[];for(var i in T)n.call(T,i)&&T[i].test(e)&&S.push(i);return S},P.getVersionStr=function(T,e){var S,i,o,a,A=P.mobileDetectRules.props;if(n.call(A,T))for(S=A[T],o=S.length,i=0;o>i;++i)if(a=S[i].exec(e),null!==a)return a[1];return null},P.getVersion=function(T,e){var S=P.getVersionStr(T,e);return S?P.prepareVersionNo(S):NaN},P.prepareVersionNo=function(T){var e;return e=T.split(/[a-z._ \/\-]/i),1===e.length&&(T=e[0]),e.length>1&&(T=e[0]+".",e.shift(),T+=e.join("")),Number(T)},P.isMobileFallback=function(T){return P.detectMobileBrowsers.fullPattern.test(T)||P.detectMobileBrowsers.shortPattern.test(T.substr(0,4))},P.isTabletFallback=function(T){return P.detectMobileBrowsers.tabletPattern.test(T)},P.prepareDetectionCache=function(T,S,i){if(T.mobile===e){var a,n,A;return(n=P.findMatch(P.mobileDetectRules.tablets,S))?(T.mobile=T.tablet=n,void(T.phone=null)):(a=P.findMatch(P.mobileDetectRules.phones,S))?(T.mobile=T.phone=a,void(T.tablet=null)):void(P.isMobileFallback(S)?(A=o.isPhoneSized(i),A===e?(T.mobile=P.FALLBACK_MOBILE,T.tablet=T.phone=null):A?(T.mobile=T.phone=P.FALLBACK_PHONE,T.tablet=null):(T.mobile=T.tablet=P.FALLBACK_TABLET,T.phone=null)):P.isTabletFallback(S)?(T.mobile=T.tablet=P.FALLBACK_TABLET,T.phone=null):T.mobile=T.tablet=T.phone=null)}},P.mobileGrade=function(T){var e=null!==T.mobile();return T.os("iOS")&&T.version("iPad")>=4.3||T.os("iOS")&&T.version("iPhone")>=3.1||T.os("iOS")&&T.version("iPod")>=3.1||T.version("Android")>2.1&&T.is("Webkit")||T.version("Windows Phone OS")>=7||T.is("BlackBerry")&&T.version("BlackBerry")>=6||T.match("Playbook.*Tablet")||T.version("webOS")>=1.4&&T.match("Palm|Pre|Pixi")||T.match("hp.*TouchPad")||T.is("Firefox")&&T.version("Firefox")>=12||T.is("Chrome")&&T.is("AndroidOS")&&T.version("Android")>=4||T.is("Skyfire")&&T.version("Skyfire")>=4.1&&T.is("AndroidOS")&&T.version("Android")>=2.3||T.is("Opera")&&T.version("Opera Mobi")>11&&T.is("AndroidOS")||T.is("MeeGoOS")||T.is("Tizen")||T.is("Dolfin")&&T.version("Bada")>=2||(T.is("UC Browser")||T.is("Dolfin"))&&T.version("Android")>=2.3||T.match("Kindle Fire")||T.is("Kindle")&&T.version("Kindle")>=3||T.is("AndroidOS")&&T.is("NookTablet")||T.version("Chrome")>=11&&!e||T.version("Safari")>=5&&!e||T.version("Firefox")>=4&&!e||T.version("MSIE")>=7&&!e||T.version("Opera")>=10&&!e?"A":T.os("iOS")&&T.version("iPad")<4.3||T.os("iOS")&&T.version("iPhone")<3.1||T.os("iOS")&&T.version("iPod")<3.1||T.is("Blackberry")&&T.version("BlackBerry")>=5&&T.version("BlackBerry")<6||T.version("Opera Mini")>=5&&T.version("Opera Mini")<=6.5&&(T.version("Android")>=2.3||T.is("iOS"))||T.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||T.version("Opera Mobi")>=11&&T.is("SymbianOS")?"B":(T.version("BlackBerry")<5||T.match("MSIEMobile|Windows CE.*Mobile")||T.version("Windows Mobile")<=5.2,"C")},P.detectOS=function(T){return P.findMatch(P.mobileDetectRules.oss0,T)||P.findMatch(P.mobileDetectRules.oss,T)},P.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},o.prototype={constructor:o,mobile:function(){return P.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return P.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return P.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return this._cache.userAgent===e&&(this._cache.userAgent=P.findMatch(P.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return this._cache.userAgents===e&&(this._cache.userAgents=P.findMatches(P.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return this._cache.os===e&&(this._cache.os=P.detectOS(this.ua)),this._cache.os},version:function(T){return P.getVersion(T,this.ua)},versionStr:function(T){return P.getVersionStr(T,this.ua)},is:function(e){return S(this.userAgents(),e)||T(e,this.os())||T(e,this.phone())||T(e,this.tablet())||S(P.findMatches(P.mobileDetectRules.utils,this.ua),e)},match:function(T){return T instanceof RegExp||(T=new RegExp(T,"i")),T.test(this.ua)},isPhoneSized:function(T){return o.isPhoneSized(T||this.maxPhoneWidth)},mobileGrade:function(){return this._cache.grade===e&&(this._cache.grade=P.mobileGrade(this)),this._cache.grade}},"undefined"!=typeof window&&window.screen?o.isPhoneSized=function(T){return 0>T?e:P.getDeviceSmallerSide()<=T}:o.isPhoneSized=function(){},o._impl=P,o.version="1.3.3 2016-07-31",o})}(function(T){if("undefined"!=typeof module&&module.exports)return function(T){module.exports=T()};if("function"==typeof define&&define.amd)return define;if("undefined"!=typeof window)return function(T){window.MobileDetect=T()};throw new Error("unknown environment")}());
assets/js/site.js CHANGED
@@ -227,8 +227,14 @@ var PUM;
227
  // TODO: Move to a global $(document).on type bind. Possibly look for an inactive class to fail on.
228
  $close
229
  .off('click.pum')
230
- .on("click.pum", function (e) {
231
- e.preventDefault();
 
 
 
 
 
 
232
  $.fn.popmake.last_close_trigger = 'Close Button';
233
  $popup.popmake('close');
234
  });
@@ -1090,137 +1096,306 @@ var PUM_Analytics;
1090
  };
1091
 
1092
  }(jQuery, document));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1093
  /**
1094
  * Defines the core $.popmake.cookie functions.
1095
  * Version 1.4
1096
  *
1097
  * Defines the pm_cookie & pm_remove_cookie global functions.
1098
  */
1099
- var pm_cookie, pm_remove_cookie;
1100
- (function ($, document, undefined) {
1101
  "use strict";
1102
 
1103
- $.fn.popmake.cookie = {
1104
- defaults: {},
1105
- raw: false,
1106
- json: true,
1107
- pluses: /\+/g,
1108
- encode: function (s) {
1109
- return $.fn.popmake.cookie.raw ? s : encodeURIComponent(s);
1110
- },
1111
- decode: function (s) {
1112
- return $.fn.popmake.cookie.raw ? s : decodeURIComponent(s);
1113
- },
1114
- stringifyCookieValue: function (value) {
1115
- return $.fn.popmake.cookie.encode($.fn.popmake.cookie.json ? JSON.stringify(value) : String(value));
1116
- },
1117
- parseCookieValue: function (s) {
1118
- if (s.indexOf('"') === 0) {
1119
- // This is a quoted cookie as according to RFC2068, unescape...
1120
- s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
1121
- }
1122
 
1123
- try {
1124
- // Replace server-side written pluses with spaces.
1125
- // If we can't decode the cookie, ignore it, it's unusable.
1126
- // If we can't parse the cookie, ignore it, it's unusable.
1127
- s = decodeURIComponent(s.replace($.fn.popmake.cookie.pluses, ' '));
1128
- return $.fn.popmake.cookie.json ? JSON.parse(s) : s;
1129
- } catch (ignore) {
1130
  }
1131
- },
1132
- read: function (s, converter) {
1133
- var value = $.fn.popmake.cookie.raw ? s : $.fn.popmake.cookie.parseCookieValue(s);
1134
- return $.isFunction(converter) ? converter(value) : value;
1135
- },
1136
- process: function (key, value, expires, path) {
1137
- var result = key ? undefined : {},
1138
- t = new Date(),
1139
- cookies = document.cookie ? document.cookie.split('; ') : [],
1140
- parts,
1141
- name,
1142
- cookie,
1143
- i,
1144
- l;
1145
  // Write
1146
 
1147
- if (value !== undefined && !$.isFunction(value)) {
 
 
 
1148
 
1149
- switch (typeof expires) {
1150
  case 'number':
1151
- t.setTime(+t + expires * 864e+5);
1152
- expires = t;
1153
  break;
1154
  case 'string':
1155
- t.setTime($.fn.popmake.utilities.strtotime("+" + expires) * 1000);
1156
- expires = t;
1157
  break;
1158
  }
1159
 
1160
- document.cookie = [
1161
- $.fn.popmake.cookie.encode(key), '=', $.fn.popmake.cookie.stringifyCookieValue(value),
1162
- expires ? '; expires=' + expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
1163
- path ? '; path=' + path : ''
1164
- ].join('');
1165
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1166
  }
1167
 
1168
- for (i = 0, l = cookies.length; i < l; i += 1) {
1169
- parts = cookies[i].split('=');
1170
- name = $.fn.popmake.cookie.decode(parts.shift());
1171
- cookie = parts.join('=');
1172
 
1173
- if (key && key === name) {
1174
- // If second argument (value) is a function it's a converter...
1175
- result = $.fn.popmake.cookie.read(cookie, value);
1176
- break;
 
 
 
 
 
 
 
 
 
 
 
 
 
1177
  }
1178
 
1179
- // Prevent storing a cookie that we couldn't decode.
1180
- cookie = $.fn.popmake.cookie.read(cookie);
1181
- if (!key && cookie !== undefined) {
1182
- result[name] = cookie;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1183
  }
1184
  }
1185
 
1186
  return result;
1187
- },
1188
- remove: function (key) {
1189
- if ($.pm_cookie(key) === undefined) {
1190
- return false;
1191
- }
1192
- $.pm_cookie(key, '', -1);
1193
- $.pm_cookie(key, '', -1, '/');
1194
- return !$.pm_cookie(key);
1195
  }
1196
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1197
 
1198
  pm_cookie = $.pm_cookie = $.fn.popmake.cookie.process;
 
1199
  pm_remove_cookie = $.pm_remove_cookie = $.fn.popmake.cookie.remove;
1200
 
1201
- }(jQuery, document));
1202
  (function ($, document, undefined) {
1203
  "use strict";
1204
 
1205
- $.fn.popmake.methods.addCookie = function (type) {
1206
- // Method calling logic
1207
- if ($.fn.popmake.cookies[type]) {
1208
- return $.fn.popmake.cookies[type].apply(this, Array.prototype.slice.call(arguments, 1));
1209
- }
1210
- if (window.console) {
1211
- console.warn('Cookie type ' + type + ' does not exist.');
1212
- }
1213
- return this;
1214
- };
 
 
 
 
 
 
 
 
 
 
 
1215
 
1216
- $.fn.popmake.methods.setCookie = function (settings) {
1217
- $.pm_cookie(
1218
- settings.name,
1219
- true,
1220
- settings.session ? null : settings.time,
1221
- settings.path ? '/' : null
1222
- );
1223
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1224
 
1225
  $.fn.popmake.cookies = {
1226
  on_popup_open: function (settings) {
@@ -1334,42 +1509,18 @@ var pm_cookie, pm_remove_cookie;
1334
  (function ($, document, undefined) {
1335
  "use strict";
1336
 
1337
- $.fn.popmake.methods.addTrigger = function (type) {
1338
- // Method calling logic
1339
- if ($.fn.popmake.triggers[type]) {
1340
- return $.fn.popmake.triggers[type].apply(this, Array.prototype.slice.call(arguments, 1));
1341
- }
1342
- if (window.console) {
1343
- console.warn('Trigger type ' + type + ' does not exist.');
1344
- }
1345
- return this;
1346
- };
1347
-
1348
- $.fn.popmake.methods.checkCookies = function (settings) {
1349
- var i;
1350
-
1351
- if (settings.cookie === undefined || settings.cookie.name === undefined || settings.cookie.name === null) {
1352
- return false;
1353
- }
1354
-
1355
- switch (typeof settings.cookie.name) {
1356
- case 'object':
1357
- case 'array':
1358
- for (i = 0; settings.cookie.name.length > i; i += 1) {
1359
- if ($.pm_cookie(settings.cookie.name[i]) !== undefined) {
1360
- return true;
1361
- }
1362
  }
1363
- break;
1364
- case 'string':
1365
- if ($.pm_cookie(settings.cookie.name) !== undefined) {
1366
- return true;
1367
  }
1368
- break;
1369
  }
1370
-
1371
- return false;
1372
- };
1373
 
1374
  $.fn.popmake.triggers = {
1375
  auto_open: function (settings) {
@@ -1383,8 +1534,8 @@ var pm_cookie, pm_remove_cookie;
1383
  return;
1384
  }
1385
 
1386
- // If cookie exists return.
1387
- if ($popup.popmake('checkCookies', settings)) {
1388
  return;
1389
  }
1390
 
@@ -1418,26 +1569,33 @@ var pm_cookie, pm_remove_cookie;
1418
  .css({cursor: "pointer"});
1419
 
1420
  $(document)
1421
- .on('click.pumTrigger', trigger_selector, function (e) {
1422
-
 
1423
  // If trigger is inside of the popup that it opens, do nothing.
1424
- if ($popup.has(this).length > 0) {
1425
  return;
1426
  }
1427
 
1428
- // If cookie exists return.
1429
- if ($popup.popmake('checkCookies', settings)) {
1430
  return;
1431
  }
1432
 
 
 
 
 
 
 
1433
  // If trigger has the class do-default we don't prevent default actions.
1434
- if (!settings.do_default && !$(e.target).hasClass('do-default')) {
1435
- e.preventDefault();
1436
- e.stopPropagation();
1437
  }
1438
 
1439
  // Set the global last open trigger to the clicked element.
1440
- $.fn.popmake.last_open_trigger = this;
1441
 
1442
  // Open the popup.
1443
  $popup.popmake('open');
227
  // TODO: Move to a global $(document).on type bind. Possibly look for an inactive class to fail on.
228
  $close
229
  .off('click.pum')
230
+ .on("click.pum", function (event) {
231
+ var $this = $(event.target),
232
+ do_default = $this.data('do-default') !== undefined && $this.data('do-default');
233
+
234
+ if (!do_default) {
235
+ event.preventDefault();
236
+ }
237
+
238
  $.fn.popmake.last_close_trigger = 'Close Button';
239
  $popup.popmake('close');
240
  });
1096
  };
1097
 
1098
  }(jQuery, document));
1099
+ (function ($, document, undefined) {
1100
+ "use strict";
1101
+
1102
+ $.extend($.fn.popmake.methods, {
1103
+ checkConditions: function () {
1104
+ var $popup = PUM.getPopup(this),
1105
+ settings = $popup.popmake('getSettings'),
1106
+ // Loadable defaults to true if no conditions. Making the popup available everywhere.
1107
+ loadable = true,
1108
+ group_check,
1109
+ g,
1110
+ c,
1111
+ group,
1112
+ condition;
1113
+
1114
+ if (settings.conditions !== undefined && settings.conditions.length) {
1115
+
1116
+ // All Groups Must Return True. Break if any is false and set loadable to false.
1117
+ for (g = 0; settings.conditions.length > g; g++) {
1118
+
1119
+ group = settings.conditions[g];
1120
+
1121
+ // Groups are false until a condition proves true.
1122
+ group_check = false;
1123
+
1124
+ // At least one group condition must be true. Break this loop if any condition is true.
1125
+ for (c = 0; group.length > c; c++) {
1126
+
1127
+ condition = $.extend({}, {
1128
+ not_operand: false
1129
+ }, group[c]);
1130
+
1131
+ // If any condition passes, set group_check true and break.
1132
+ if (!condition.not_operand && $popup.popmake('checkCondition', condition)) {
1133
+ group_check = true;
1134
+ break;
1135
+ } else if (condition.not_operand && !$popup.popmake('checkCondition', condition)) {
1136
+ group_check = true;
1137
+ break;
1138
+ }
1139
+
1140
+ }
1141
+
1142
+ // If any group of conditions doesn't pass, popup is not loadable.
1143
+ if (!group_check) {
1144
+ loadable = false;
1145
+ }
1146
+
1147
+ }
1148
+
1149
+ }
1150
+
1151
+ return loadable;
1152
+ },
1153
+ checkCondition: function (settings) {
1154
+ var condition = settings.target || null;
1155
+
1156
+ if ( ! condition ) {
1157
+ console.warn('Condition type not set.');
1158
+ return false;
1159
+ }
1160
+
1161
+ // Method calling logic
1162
+ if ($.fn.popmake.conditions[condition]) {
1163
+ return $.fn.popmake.conditions[condition].apply(this, [settings]);
1164
+ }
1165
+ if (window.console) {
1166
+ console.warn('Condition ' + condition + ' does not exist.');
1167
+ return true;
1168
+ }
1169
+ }
1170
+ });
1171
+
1172
+
1173
+ $.fn.popmake.conditions = {};
1174
+
1175
+ }(jQuery, document));
1176
+
1177
  /**
1178
  * Defines the core $.popmake.cookie functions.
1179
  * Version 1.4
1180
  *
1181
  * Defines the pm_cookie & pm_remove_cookie global functions.
1182
  */
1183
+ var pm_cookie, pm_cookie_json, pm_remove_cookie;
1184
+ (function ($) {
1185
  "use strict";
1186
 
1187
+ function cookie (converter) {
1188
+ if (converter === undefined) {
1189
+ converter = function () {
1190
+ };
1191
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1192
 
1193
+ function api(key, value, attributes) {
1194
+ var result,
1195
+ expires = new Date();
1196
+ if (typeof document === 'undefined') {
1197
+ return;
 
 
1198
  }
1199
+
 
 
 
 
 
 
 
 
 
 
 
 
 
1200
  // Write
1201
 
1202
+ if (arguments.length > 1) {
1203
+ attributes = $.extend({
1204
+ path: '/'
1205
+ }, api.defaults, attributes);
1206
 
1207
+ switch (typeof attributes.expires) {
1208
  case 'number':
1209
+ expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
1210
+ attributes.expires = expires;
1211
  break;
1212
  case 'string':
1213
+ expires.setTime($.fn.popmake.utilities.strtotime("+" + attributes.expires) * 1000);
1214
+ attributes.expires = expires;
1215
  break;
1216
  }
1217
 
1218
+ try {
1219
+ result = JSON.stringify(value);
1220
+ if (/^[\{\[]/.test(result)) {
1221
+ value = result;
1222
+ }
1223
+ } catch (e) {}
1224
+
1225
+ if (!converter.write) {
1226
+ value = encodeURIComponent(String(value))
1227
+ .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
1228
+ } else {
1229
+ value = converter.write(value, key);
1230
+ }
1231
+
1232
+ key = encodeURIComponent(String(key));
1233
+ key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
1234
+ key = key.replace(/[\(\)]/g, escape);
1235
+
1236
+ return (document.cookie = [
1237
+ key, '=', value,
1238
+ attributes.expires ? '; expires=' + attributes.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
1239
+ attributes.path ? '; path=' + attributes.path : '',
1240
+ attributes.domain ? '; domain=' + attributes.domain : '',
1241
+ attributes.secure ? '; secure' : ''
1242
+ ].join(''));
1243
  }
1244
 
1245
+ // Read
 
 
 
1246
 
1247
+ if (!key) {
1248
+ result = {};
1249
+ }
1250
+
1251
+ // To prevent the for loop in the first place assign an empty array
1252
+ // in case there are no cookies at all. Also prevents odd result when
1253
+ // calling "get()"
1254
+ var cookies = document.cookie ? document.cookie.split('; ') : [];
1255
+ var rdecode = /(%[0-9A-Z]{2})+/g;
1256
+ var i = 0;
1257
+
1258
+ for (; i < cookies.length; i++) {
1259
+ var parts = cookies[i].split('=');
1260
+ var cookie = parts.slice(1).join('=');
1261
+
1262
+ if (cookie.charAt(0) === '"') {
1263
+ cookie = cookie.slice(1, -1);
1264
  }
1265
 
1266
+ try {
1267
+ var name = parts[0].replace(rdecode, decodeURIComponent);
1268
+ cookie = converter.read ?
1269
+ converter.read(cookie, name) : converter(cookie, name) ||
1270
+ cookie.replace(rdecode, decodeURIComponent);
1271
+
1272
+ if (this.json) {
1273
+ try {
1274
+ cookie = JSON.parse(cookie);
1275
+ } catch (e) {
1276
+ }
1277
+ }
1278
+
1279
+ if (key === name) {
1280
+ result = cookie;
1281
+ break;
1282
+ }
1283
+
1284
+ if (!key) {
1285
+ result[name] = cookie;
1286
+ }
1287
+ } catch (e) {
1288
  }
1289
  }
1290
 
1291
  return result;
 
 
 
 
 
 
 
 
1292
  }
1293
+
1294
+ api.set = api;
1295
+ api.get = function (key) {
1296
+ return api.call(api, key);
1297
+ };
1298
+ api.getJSON = function () {
1299
+ return api.apply({
1300
+ json: true
1301
+ }, [].slice.call(arguments));
1302
+ };
1303
+ api.defaults = {};
1304
+
1305
+ api.remove = function (key, attributes) {
1306
+ // Clears keys with current path.
1307
+ api(key, '', $.extend({}, attributes, {
1308
+ expires: -1,
1309
+ path: ''
1310
+ }));
1311
+ // Clears sitewide keys.
1312
+ api(key, '', $.extend({}, attributes, {
1313
+ expires: -1
1314
+ }));
1315
+ };
1316
+
1317
+ /**
1318
+ * Polyfill for jQuery Cookie argument arrangement.
1319
+ *
1320
+ * @param key
1321
+ * @param value
1322
+ * @param attributes || expires (deprecated)
1323
+ * @param path (deprecated)
1324
+ * @returns {*}
1325
+ */
1326
+ api.process = function (key, value, attributes, path) {
1327
+ if (arguments.length > 3 && typeof arguments[2] !== 'object' && value !== undefined) {
1328
+ return api.apply(api, [key, value, {
1329
+ expires: attributes,
1330
+ path: path
1331
+ }]);
1332
+ } else {
1333
+ return api.apply(api, [].slice.call(arguments, [0, 2]));
1334
+ }
1335
+ };
1336
+
1337
+ api.withConverter = $.fn.popmake.cookie;
1338
+
1339
+ return api;
1340
+ }
1341
+
1342
+ $.extend($.fn.popmake, {
1343
+ cookie: cookie()
1344
+ });
1345
 
1346
  pm_cookie = $.pm_cookie = $.fn.popmake.cookie.process;
1347
+ pm_cookie_json = $.pm_cookie_json = $.fn.popmake.cookie.getJSON;
1348
  pm_remove_cookie = $.pm_remove_cookie = $.fn.popmake.cookie.remove;
1349
 
1350
+ }(jQuery));
1351
  (function ($, document, undefined) {
1352
  "use strict";
1353
 
1354
+ $.extend($.fn.popmake.methods, {
1355
+ addCookie: function (type) {
1356
+ // Method calling logic
1357
+ if ($.fn.popmake.cookies[type]) {
1358
+ return $.fn.popmake.cookies[type].apply(this, Array.prototype.slice.call(arguments, 1));
1359
+ }
1360
+ if (window.console) {
1361
+ console.warn('Cookie type ' + type + ' does not exist.');
1362
+ }
1363
+ return this;
1364
+ },
1365
+ setCookie: function (settings) {
1366
+ $.pm_cookie(
1367
+ settings.name,
1368
+ true,
1369
+ settings.session ? null : settings.time,
1370
+ settings.path ? '/' : null
1371
+ );
1372
+ },
1373
+ checkCookies: function (settings) {
1374
+ var i;
1375
 
1376
+ if (settings.cookie === undefined || settings.cookie.name === undefined || settings.cookie.name === null) {
1377
+ return false;
1378
+ }
1379
+
1380
+ switch (typeof settings.cookie.name) {
1381
+ case 'object':
1382
+ case 'array':
1383
+ for (i = 0; settings.cookie.name.length > i; i += 1) {
1384
+ if ($.pm_cookie(settings.cookie.name[i]) !== undefined) {
1385
+ return true;
1386
+ }
1387
+ }
1388
+ break;
1389
+ case 'string':
1390
+ if ($.pm_cookie(settings.cookie.name) !== undefined) {
1391
+ return true;
1392
+ }
1393
+ break;
1394
+ }
1395
+
1396
+ return false;
1397
+ }
1398
+ });
1399
 
1400
  $.fn.popmake.cookies = {
1401
  on_popup_open: function (settings) {
1509
  (function ($, document, undefined) {
1510
  "use strict";
1511
 
1512
+ $.extend($.fn.popmake.methods, {
1513
+ addTrigger: function (type) {
1514
+ // Method calling logic
1515
+ if ($.fn.popmake.triggers[type]) {
1516
+ return $.fn.popmake.triggers[type].apply(this, Array.prototype.slice.call(arguments, 1));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1517
  }
1518
+ if (window.console) {
1519
+ console.warn('Trigger type ' + type + ' does not exist.');
 
 
1520
  }
1521
+ return this;
1522
  }
1523
+ });
 
 
1524
 
1525
  $.fn.popmake.triggers = {
1526
  auto_open: function (settings) {
1534
  return;
1535
  }
1536
 
1537
+ // If cookie exists or conditions fail return.
1538
+ if ($popup.popmake('checkCookies', settings) || !$popup.popmake('checkConditions')) {
1539
  return;
1540
  }
1541
 
1569
  .css({cursor: "pointer"});
1570
 
1571
  $(document)
1572
+ .on('click.pumTrigger', trigger_selector, function (event) {
1573
+ var $this = $(this),
1574
+ do_default = settings.do_default;
1575
  // If trigger is inside of the popup that it opens, do nothing.
1576
+ if ($popup.has($this).length > 0) {
1577
  return;
1578
  }
1579
 
1580
+ // If cookie exists or conditions fail return.
1581
+ if ($popup.popmake('checkCookies', settings) || !$popup.popmake('checkConditions')) {
1582
  return;
1583
  }
1584
 
1585
+ if ($this.data('do-default')) {
1586
+ do_default = $this.data('do-default');
1587
+ } else {
1588
+ do_default = $this.hasClass('do-default');
1589
+ }
1590
+
1591
  // If trigger has the class do-default we don't prevent default actions.
1592
+ if (!do_default) {
1593
+ event.preventDefault();
1594
+ event.stopPropagation();
1595
  }
1596
 
1597
  // Set the global last open trigger to the clicked element.
1598
+ $.fn.popmake.last_open_trigger = $this;
1599
 
1600
  // Open the popup.
1601
  $popup.popmake('open');
assets/js/site.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";void 0===e.fn.on&&(e.fn.on=function(e,t,o){return this.delegate(t,e,o)}),void 0===e.fn.off&&(e.fn.off=function(e,t,o){return this.undelegate(t,e,o)}),void 0===e.fn.bindFirst&&(e.fn.bindFirst=function(t,o){var n,i,a=e(this);a.unbind(t,o),a.bind(t,o),n=e._data(a[0]).events,i=n[t],i.unshift(i.pop()),n[t]=i}),void 0===e.fn.outerHtml&&(e.fn.outerHtml=function(){var t=e(this).clone(),o=e("<div/>").append(t);return o.html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery);var PUM;!function(e,t,o){"use strict";PUM={getPopup:function(t){var o=e(t);return o.hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):e()}},e.fn.popmake=function(t){return e.fn.popmake.methods[t]?e.fn.popmake.methods[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void(window.console&&console.warn("Method "+t+" does not exist on $.fn.popmake")):e.fn.popmake.methods.init.apply(this,arguments)},e.fn.popmake.methods={init:function(t){return this.each(function(){var n=PUM.getPopup(this),i=e.extend(!0,{},e.fn.popmake.defaults,n.data("popmake"),t);return i.theme_id<=0&&(i.theme_id=popmake_default_theme),i.meta.display.disable_reposition===o&&e(window).on("resize",function(){(n.hasClass("pum-active")||n.find(".popmake.active").length)&&e.fn.popmake.utilities.throttle(setTimeout(function(){n.popmake("reposition")},25),500,!1)}),"string"==typeof popmake_powered_by&&""!==popmake_powered_by&&n.popmake("getContent").append(e(popmake_powered_by)),n.find(".pum-container").data("popmake",i),n.data("popmake",i).trigger("pumInit"),this})},getOverlay:function(){return e(this)},getContainer:function(){return e(this).find(".pum-container")},getTitle:function(){return e(this).find(".pum-title")||null},getContent:function(){return e(this).find(".pum-content")||null},getClose:function(){return e(this).find(".pum-content + .pum-close")||null},getSettings:function(){return e(this).data("popmake")},open:function(t){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose"),s=n.popmake("getSettings"),p=e("html");return s.meta.display.stackable||n.popmake("close_all"),n.addClass("pum-active").trigger("pumBeforeOpen"),s.meta.close.button_delay>0&&a.fadeOut(0),n.hasClass("preventOpen")||i.hasClass("preventOpen")?(n.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented"),this):(p.addClass("pum-open"),s.meta.display.overlay_disabled?p.addClass("pum-open-overlay-disabled"):p.addClass("pum-open-overlay"),s.meta.display.position_fixed!==o&&s.meta.display.position_fixed?p.addClass("pum-open-fixed"):p.addClass("pum-open-scrollable"),n.popmake("setup_close").popmake("reposition").css({"z-index":s.meta.display.overlay_zindex||1999999998}).popmake("animate",s.meta.display.animation_type,function(){s.meta.close.button_delay>0&&setTimeout(function(){a.fadeIn()},s.meta.close.button_delay),n.trigger("pumAfterOpen"),e.fn.popmake.last_open_popup=n,t!==o&&t()}),this)},setup_close:function(){var t=PUM.getPopup(this),o=t.popmake("getClose").add(e(".popmake-close",t).not(o)),n=t.popmake("getSettings");return o.off("click.pum").on("click.pum",function(o){o.preventDefault(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.meta.close.esc_press||n.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(o){27===o.keyCode&&n.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===o.keyCode&&n.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.meta.close.overlay_click&&t.off("click.popmake").on("click.popmake",function(o){o.target===t[0]&&(e.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))}),t.trigger("pumSetupClose"),this},close:function(t){return this.each(function(){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose").add(e(".popmake-close",n));return n.trigger("pumBeforeClose"),n.hasClass("preventClose")||i.hasClass("preventClose")?(n.removeClass("preventClose").trigger("pumClosePrevented"),this):(i.fadeOut("fast",function(){n.is(":visible")&&n.fadeOut("fast"),e(window).off("keyup.popmake"),n.off("click.popmake"),a.off("click.popmake"),1===e(".pum-active").length&&e("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),n.removeClass("pum-active").trigger("pumAfterClose"),i.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var t=e(this),o=t.attr("src"),n=o.replace("autoplay=1","1=1");n!==o&&(o=n),t.prop("src",o)}),i.find("video").each(function(){this.pause()}),t!==o&&t()}),this)})},close_all:function(){return e(".pum-active").popmake("close"),this},reposition:function(t){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),n=o.popmake("getContainer"),i=o.popmake("getSettings"),a=i.meta.display,s=a.location,p={my:"",at:""},r={overlay:null,container:null};return s.indexOf("left")>=0&&(p={my:p.my+" left"+(0!==a.position_left?"+"+a.position_left:""),at:p.at+" left"}),s.indexOf("right")>=0&&(p={my:p.my+" right"+(0!==a.position_right?"-"+a.position_right:""),at:p.at+" right"}),s.indexOf("center")>=0&&(p="center"===s?{my:"center",at:"center"}:{my:p.my+" center",at:p.at+" center"}),s.indexOf("top")>=0&&(p={my:p.my+" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),at:p.at+" top"}),s.indexOf("bottom")>=0&&(p={my:p.my+" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),at:p.at+" bottom"}),p.my=e.trim(p.my),p.at=e.trim(p.at),p.of=window,p.collision="none",p.using="function"==typeof t?t:e.fn.popmake.callbacks.reposition_using,o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show()),n.is(":hidden")&&(r.container=n.css("opacity"),n.css({opacity:0}).show()),a.position_fixed&&n.addClass("fixed"),"custom"===i.meta.display.size?n.css({width:i.meta.display.custom_width+i.meta.display.custom_width_unit,height:i.meta.display.custom_height_auto?"auto":i.meta.display.custom_height+i.meta.display.custom_height_unit}):"auto"!==i.meta.display.size&&n.addClass("responsive").css({minWidth:""!==i.meta.display.responsive_min_width?i.meta.display.responsive_min_width+i.meta.display.responsive_min_width_unit:"auto",maxWidth:""!==i.meta.display.responsive_max_width?i.meta.display.responsive_max_width+i.meta.display.responsive_max_width_unit:"auto"}),n.addClass("custom-position").position(p).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(),r.container&&n.css({opacity:r.container}).hide(),this},retheme:function(t){e(this).trigger("popmakeBeforeRetheme");var n,i,a=PUM.getPopup(this),s=a.popmake("getContainer"),p=a.popmake("getTitle"),r=a.popmake("getContent"),c=a.popmake("getClose"),l=a.popmake("getSettings");switch(t===o&&(t=e.fn.popmake.themes[l.theme_id],t===o&&(t=e.fn.popmake.themes[1])),n="yes"===t.container.boxshadow_inset?"inset ":"",i="yes"===t.close.boxshadow_inset?"inset ":"",a.removeAttr("style").css({backgroundColor:e.fn.popmake.utilities.convert_hex(t.overlay.background_color,t.overlay.background_opacity),zIndex:l.meta.display.overlay_zindex||998}),s.css({padding:t.container.padding+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.container.background_color,t.container.background_opacity),borderStyle:t.container.border_style,borderColor:t.container.border_color,borderWidth:t.container.border_width+"px",borderRadius:t.container.border_radius+"px",boxShadow:n+t.container.boxshadow_horizontal+"px "+t.container.boxshadow_vertical+"px "+t.container.boxshadow_blur+"px "+t.container.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.container.boxshadow_color,t.container.boxshadow_opacity),zIndex:l.meta.display.zindex||999}),p.css({color:t.title.font_color,lineHeight:t.title.line_height+"px",fontSize:t.title.font_size+"px",fontFamily:t.title.font_family,fontWeight:t.title.font_weight,fontStyle:t.title.font_style,textAlign:t.title.text_align,textShadow:t.title.textshadow_horizontal+"px "+t.title.textshadow_vertical+"px "+t.title.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.title.textshadow_color,t.title.textshadow_opacity)}),r.css({color:t.content.font_color,fontFamily:t.content.font_family,fontWeight:t.content.font_weight,fontStyle:t.content.font_style}),e("p, label",r).css({color:t.content.font_color,fontFamily:t.content.font_family}),c.html(t.close.text).css({padding:t.close.padding+"px",height:t.close.height+"px",width:t.close.width+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.close.background_color,t.close.background_opacity),color:t.close.font_color,lineHeight:t.close.line_height+"px",fontSize:t.close.font_size+"px",fontWeight:t.close.font_weight,fontStyle:t.close.font_style,fontFamily:t.close.font_family,borderStyle:t.close.border_style,borderColor:t.close.border_color,borderWidth:t.close.border_width+"px",borderRadius:t.close.border_radius+"px",boxShadow:i+t.close.boxshadow_horizontal+"px "+t.close.boxshadow_vertical+"px "+t.close.boxshadow_blur+"px "+t.close.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.close.boxshadow_color,t.close.boxshadow_opacity),textShadow:t.close.textshadow_horizontal+"px "+t.close.textshadow_vertical+"px "+t.close.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.close.textshadow_color,t.close.textshadow_opacity),left:"auto",right:"auto",bottom:"auto",top:"auto"}),t.close.location){case"topleft":c.css({top:t.close.position_top+"px",left:t.close.position_left+"px"});break;case"topright":c.css({top:t.close.position_top+"px",right:t.close.position_right+"px"});break;case"bottomleft":c.css({bottom:t.close.position_bottom+"px",left:t.close.position_left+"px"});break;case"bottomright":c.css({bottom:t.close.position_bottom+"px",right:t.close.position_right+"px"})}return a.trigger("popmakeAfterRetheme",[t]),this},animation_origin:function(t){var o=PUM.getPopup(this),n=o.popmake("getContainer"),i={my:"",at:""};switch(t){case"top":i={my:"left+"+n.offset().left+" bottom-100",at:"left top"};break;case"bottom":i={my:"left+"+n.offset().left+" top+100",at:"left bottom"};break;case"left":i={my:"right top+"+n.offset().top,at:"left top"};break;case"right":i={my:"left top+"+n.offset().top,at:"right top"};break;default:t.indexOf("left")>=0&&(i={my:i.my+" right",at:i.at+" left"}),t.indexOf("right")>=0&&(i={my:i.my+" left",at:i.at+" right"}),t.indexOf("center")>=0&&(i={my:i.my+" center",at:i.at+" center"}),t.indexOf("top")>=0&&(i={my:i.my+" bottom-100",at:i.at+" top"}),t.indexOf("bottom")>=0&&(i={my:i.my+" top+100",at:i.at+" bottom"}),i.my=e.trim(i.my),i.at=e.trim(i.at)}return i.of=window,i.collision="none",i}}}(jQuery,document);var PUM_Accessibility;!function(e,t,o){"use strict";var n,i,a,s="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUM_Accessibility={forceFocus:function(t){a&&!e.contains(a,t.target)&&(t.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(t){if(9===t.keyCode){var o=a.find(".pum-container *").filter(s).filter(":visible"),n=e(":focus"),i=o.length,p=o.index(n);t.shiftKey?0===p&&(o.get(i-1).focus(),t.preventDefault()):p===i-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-container *").filter(s).filter(":visible").filter(":not(.pum-close)").first().focus()}},e(t).on("pumInit",".pum",function(){PUM.getPopup(this).find("[tabindex]").each(function(){var t=e(this);t.data("tabindex",t.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",".pum",function(){var o=PUM.getPopup(this),s=e(":focus");o.has(s).length||(i=s),a=o.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),n=e("body > *").filter(":visible").not(a),n.attr("aria-hidden","true"),e(t).on("focus.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",".pum",function(){}).on("pumBeforeClose",".pum",function(){}).on("pumAfterClose",".pum",function(){var o=PUM.getPopup(this);o.off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),i.length&&i.focus(),a=null,e(t).off("focus.pum_accessibility")}).on("pumSetupClose",".pum",function(){}).on("pumOpenPrevented",".pum",function(){}).on("pumClosePrevented",".pum",function(){}).on("pumBeforeReposition",".pum",function(){})}(jQuery,document);var PUM_Analytics;!function(e,t,o){"use strict";e.fn.popmake.last_open_trigger=null,e.fn.popmake.last_close_trigger=null,e.fn.popmake.conversion_trigger=null,PUM_Analytics={beacon:function(t){var o=new Image;t=e.extend(!0,{},{url:pum_vars.ajaxurl||null,data:{action:"pum_analytics",_cache:+new Date},callback:function(){}},t),t.url&&(e(o).on("error success load done",t.callback),o.src=t.url+"?"+e.param(t.data))}},e(t).on("pumAfterOpen.core_analytics","body > .pum",function(){var t=PUM.getPopup(this),o={pid:parseInt(t.popmake("getSettings").id,10)||null,type:"open"};o.pid>0&&!e("body").hasClass("single-popup")&&PUM_Analytics.beacon({data:o})})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.animate_overlay=function(t,o,n){var i=PUM.getPopup(this).popmake("getSettings");return i.meta.display.overlay_disabled?e.fn.popmake.overlay_animations.none.apply(this,[o,n]):e.fn.popmake.overlay_animations[t]?e.fn.popmake.overlay_animations[t].apply(this,[o,n]):(window.console&&console.warn("Animation style "+t+" does not exist."),this)},e.fn.popmake.methods.animate=function(t){return e.fn.popmake.animations[t]?e.fn.popmake.animations[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+t+" does not exist."),this)},e.fn.popmake.animations={none:function(e){var t=PUM.getPopup(this);return t.popmake("getContainer").show(0),t.popmake("animate_overlay","none",0,function(){e!==o&&e()}),this},slide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,s=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(s).css({opacity:1}),t.css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},fade:function(e){var t=PUM.getPopup(this),n=t.popmake("getContainer"),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2;return n.show(0).css({opacity:0}),t.popmake("animate_overlay","fade",a,function(){n.animate({opacity:1},a,"swing",function(){e!==o&&e()})}),this},fadeAndSlide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,s=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(s),t.hide().css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){t.opacity=1,n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},grow:function(t){return e.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(t){return e.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},e.fn.popmake.overlay_animations={none:function(e,t){PUM.getPopup(this).show(e,t)},fade:function(e,t){PUM.getPopup(this).fadeIn(e,t)},slide:function(e,t){PUM.getPopup(this).slideDown(e,t)}}}(jQuery,document),function(e,t,o){"use strict";e(t).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(e,t,o){"use strict";e.fn.popmake.callbacks={reposition_using:function(t){e(this).css(t)}}}(jQuery,document);var pm_cookie,pm_remove_cookie;!function(e,t,o){"use strict";e.fn.popmake.cookie={defaults:{},raw:!1,json:!0,pluses:/\+/g,encode:function(t){return e.fn.popmake.cookie.raw?t:encodeURIComponent(t)},decode:function(t){return e.fn.popmake.cookie.raw?t:decodeURIComponent(t)},stringifyCookieValue:function(t){return e.fn.popmake.cookie.encode(e.fn.popmake.cookie.json?JSON.stringify(t):String(t))},parseCookieValue:function(t){0===t.indexOf('"')&&(t=t.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return t=decodeURIComponent(t.replace(e.fn.popmake.cookie.pluses," ")),e.fn.popmake.cookie.json?JSON.parse(t):t}catch(o){}},read:function(t,o){var n=e.fn.popmake.cookie.raw?t:e.fn.popmake.cookie.parseCookieValue(t);return e.isFunction(o)?o(n):n},process:function(n,i,a,s){var p,r,c,l,m,u=n?o:{},f=new Date,d=t.cookie?t.cookie.split("; "):[];if(i!==o&&!e.isFunction(i)){switch(typeof a){case"number":f.setTime(+f+864e5*a),a=f;break;case"string":f.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+a)),a=f}return void(t.cookie=[e.fn.popmake.cookie.encode(n),"=",e.fn.popmake.cookie.stringifyCookieValue(i),a?"; expires="+a.toUTCString():"",s?"; path="+s:""].join(""))}for(l=0,m=d.length;m>l;l+=1){if(p=d[l].split("="),r=e.fn.popmake.cookie.decode(p.shift()),c=p.join("="),n&&n===r){u=e.fn.popmake.cookie.read(c,i);break}c=e.fn.popmake.cookie.read(c),n||c===o||(u[r]=c)}return u},remove:function(t){return e.pm_cookie(t)===o?!1:(e.pm_cookie(t,"",-1),e.pm_cookie(t,"",-1,"/"),!e.pm_cookie(t))}},pm_cookie=e.pm_cookie=e.fn.popmake.cookie.process,pm_remove_cookie=e.pm_remove_cookie=e.fn.popmake.cookie.remove}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.addCookie=function(t){return e.fn.popmake.cookies[t]?e.fn.popmake.cookies[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+t+" does not exist."),this)},e.fn.popmake.methods.setCookie=function(t){e.pm_cookie(t.name,!0,t.session?null:t.time,t.path?"/":null)},e.fn.popmake.cookies={on_popup_open:function(e){var t=PUM.getPopup(this);t.on("pumAfterOpen",function(){t.popmake("setCookie",e)})},on_popup_close:function(e){var t=PUM.getPopup(this);t.on("pumBeforeClose",function(){t.popmake("setCookie",e)})},manual:function(e){var t=PUM.getPopup(this);t.on("pumSetCookie",function(){t.popmake("setCookie",e)})}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.cookies,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addCookie",a.event,a.settings)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.defaults={meta:{display:{stackable:0,overlay_disabled:0,size:"medium",responsive_max_width:"",responsive_max_width_unit:"%",responsive_min_width:"",responsive_min_width_unit:"%",custom_width:"",custom_width_unit:"%",custom_height:"",custom_height_unit:"em",custom_height_auto:0,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:0,animation_type:"fade",animation_speed:350,animation_origin:"center top"},close:{overlay_click:0,esc_press:0,f4_press:0}},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(e,t,o){"use strict";e.fn.popmake.methods.addTrigger=function(t){return e.fn.popmake.triggers[t]?e.fn.popmake.triggers[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+t+" does not exist."),this)},e.fn.popmake.methods.checkCookies=function(t){var n;if(t.cookie===o||t.cookie.name===o||null===t.cookie.name)return!1;switch(typeof t.cookie.name){case"object":case"array":for(n=0;t.cookie.name.length>n;n+=1)if(e.pm_cookie(t.cookie.name[n])!==o)return!0;break;case"string":if(e.pm_cookie(t.cookie.name)!==o)return!0}return!1},e.fn.popmake.triggers={auto_open:function(t){var o=PUM.getPopup(this);setTimeout(function(){o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active")||o.popmake("checkCookies",t)||(e.fn.popmake.last_open_trigger="Auto Open - Delay: "+t.delay,o.popmake("open"))},t.delay)},click_open:function(o){var n,i=PUM.getPopup(this),a=i.popmake("getSettings"),s=[".popmake-"+a.id,".popmake-"+decodeURIComponent(a.slug),'a[href$="#popmake-'+a.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&s.push(o.extra_selectors),n=s.join(", "),e(n).addClass("pum-trigger").css({cursor:"pointer"}),e(t).on("click.pumTrigger",n,function(t){i.has(this).length>0||i.popmake("checkCookies",o)||(o.do_default||e(t.target).hasClass("do-default")||(t.preventDefault(),t.stopPropagation()),e.fn.popmake.last_open_trigger=this,i.popmake("open"))})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.triggers,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addTrigger",a.type,a.settings)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.utilities={convert_hex:function(e,t){e=e.replace("#","");var o=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return"rgba("+o+","+n+","+i+","+t/100+")"},debounce:function(e,t){var o;return function(){var n=this,i=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(n,i)},t)}},throttle:function(e,t){var o=!1,n=function(){o=!1};return function(){o||(e.apply(this,arguments),window.setTimeout(n,t),o=!0)}},getXPath:function(t){var o,n,i,a,s,p=[];return e.each(e(t).parents(),function(t,r){return o=e(r),n=o.attr("id")||"",i=o.attr("class")||"",a=o.get(0).tagName.toLowerCase(),s=o.parent().children(a).index(o),"body"===a?!1:(i.length>0&&(i=i.split(" "),i=i[0]),void p.push(a+(n.length>0?"#"+n:i.length>0?"."+i.split(" ").join("."):":eq("+s+")")))}),p.reverse().join(" > ")},strtotime:function(e,t){function n(e,t,n){var i,a=l[t];a!==o&&(i=a-c.getDay(),0===i?i=7*n:i>0&&"last"===e?i-=7:0>i&&"next"===e&&(i+=7),c.setDate(c.getDate()+i))}function i(e){var t=e.split(" "),o=t[0],i=t[1].substring(0,3),a=/\d+/.test(o),s="ago"===t[2],p=("last"===o?-1:1)*(s?-1:1);if(a&&(p*=parseInt(o,10)),m.hasOwnProperty(i)&&!t[1].match(/^mon(day|\.)?$/i))return c["set"+m[i]](c["get"+m[i]]()+p);if("wee"===i)return c.setDate(c.getDate()+7*p);if("next"===o||"last"===o)n(o,i,p);else if(!a)return!1;return!0}var a,s,p,r,c,l,m,u,f,d,h,g=!1;if(!e)return g;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),s=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),s&&s[2]===s[4])if(s[1]>1901)switch(s[2]){case"-":return s[3]>12||s[5]>31?g:new Date(s[1],parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case".":return g;case"/":return s[3]>12||s[5]>31?g:new Date(s[1],parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3}else if(s[5]>1901)switch(s[2]){case"-":return s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case".":return s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case"/":return s[1]>12||s[3]>31?g:new Date(s[5],parseInt(s[1],10)-1,s[3],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3}else switch(s[2]){case"-":return s[3]>12||s[5]>31||s[1]<70&&s[1]>38?g:(r=s[1]>=0&&s[1]<=38?+s[1]+2e3:s[1],new Date(r,parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3);case".":return s[5]>=70?s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3:s[5]<60&&!s[6]?s[1]>23||s[3]>59?g:(p=new Date,new Date(p.getFullYear(),p.getMonth(),p.getDate(),s[1]||0,s[3]||0,s[5]||0,s[9]||0)/1e3):g;case"/":return s[1]>12||s[3]>31||s[5]<70&&s[5]>38?g:(r=s[5]>=0&&s[5]<=38?+s[5]+2e3:s[5],new Date(r,parseInt(s[1],10)-1,s[3],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3);case":":return s[1]>23||s[3]>59||s[5]>59?g:(p=new Date,new Date(p.getFullYear(),p.getMonth(),p.getDate(),s[1]||0,s[3]||0,s[5]||0)/1e3)}if("now"===e)return null===t||isNaN(t)?(new Date).getTime()/1e3||0:t||0;if(a=Date.parse(e),!isNaN(a))return a/1e3||0;if(c=t?new Date(1e3*t):new Date,l={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},m={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},f="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",d="([+-]?\\d+\\s"+f+"|(last|next)\\s"+f+")(\\sago)?",s=e.match(new RegExp(d,"gi")),!s)return g;for(h=0,u=s.length;u>h;h+=1)if(!i(s[h]))return g;return c.getTime()/1e3}},e.fn.popmake.utilies=e.fn.popmake.utilities}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.version=1.4,e.fn.popmake.last_open_popup=null,e(t).ready(function(){e(".popmake").popmake()})}(jQuery);
1
+ !function(e){"use strict";void 0===e.fn.on&&(e.fn.on=function(e,t,o){return this.delegate(t,e,o)}),void 0===e.fn.off&&(e.fn.off=function(e,t,o){return this.undelegate(t,e,o)}),void 0===e.fn.bindFirst&&(e.fn.bindFirst=function(t,o){var n,i,a=e(this);a.unbind(t,o),a.bind(t,o),n=e._data(a[0]).events,i=n[t],i.unshift(i.pop()),n[t]=i}),void 0===e.fn.outerHtml&&(e.fn.outerHtml=function(){var t=e(this).clone(),o=e("<div/>").append(t);return o.html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery);var PUM;!function(e,t,o){"use strict";PUM={getPopup:function(t){var o=e(t);return o.hasClass("pum-overlay")?o:o.hasClass("popmake")?o.parents(".pum-overlay"):o.parents(".pum-overlay").length?o.parents(".pum-overlay"):e()}},e.fn.popmake=function(t){return e.fn.popmake.methods[t]?e.fn.popmake.methods[t].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof t&&t?void(window.console&&console.warn("Method "+t+" does not exist on $.fn.popmake")):e.fn.popmake.methods.init.apply(this,arguments)},e.fn.popmake.methods={init:function(t){return this.each(function(){var n=PUM.getPopup(this),i=e.extend(!0,{},e.fn.popmake.defaults,n.data("popmake"),t);return i.theme_id<=0&&(i.theme_id=popmake_default_theme),i.meta.display.disable_reposition===o&&e(window).on("resize",function(){(n.hasClass("pum-active")||n.find(".popmake.active").length)&&e.fn.popmake.utilities.throttle(setTimeout(function(){n.popmake("reposition")},25),500,!1)}),"string"==typeof popmake_powered_by&&""!==popmake_powered_by&&n.popmake("getContent").append(e(popmake_powered_by)),n.find(".pum-container").data("popmake",i),n.data("popmake",i).trigger("pumInit"),this})},getOverlay:function(){return e(this)},getContainer:function(){return e(this).find(".pum-container")},getTitle:function(){return e(this).find(".pum-title")||null},getContent:function(){return e(this).find(".pum-content")||null},getClose:function(){return e(this).find(".pum-content + .pum-close")||null},getSettings:function(){return e(this).data("popmake")},open:function(t){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose"),s=n.popmake("getSettings"),p=e("html");return s.meta.display.stackable||n.popmake("close_all"),n.addClass("pum-active").trigger("pumBeforeOpen"),s.meta.close.button_delay>0&&a.fadeOut(0),n.hasClass("preventOpen")||i.hasClass("preventOpen")?(n.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented"),this):(p.addClass("pum-open"),s.meta.display.overlay_disabled?p.addClass("pum-open-overlay-disabled"):p.addClass("pum-open-overlay"),s.meta.display.position_fixed!==o&&s.meta.display.position_fixed?p.addClass("pum-open-fixed"):p.addClass("pum-open-scrollable"),n.popmake("setup_close").popmake("reposition").css({"z-index":s.meta.display.overlay_zindex||1999999998}).popmake("animate",s.meta.display.animation_type,function(){s.meta.close.button_delay>0&&setTimeout(function(){a.fadeIn()},s.meta.close.button_delay),n.trigger("pumAfterOpen"),e.fn.popmake.last_open_popup=n,t!==o&&t()}),this)},setup_close:function(){var t=PUM.getPopup(this),n=t.popmake("getClose").add(e(".popmake-close",t).not(n)),i=t.popmake("getSettings");return n.off("click.pum").on("click.pum",function(n){var i=e(n.target),a=i.data("do-default")!==o&&i.data("do-default");a||n.preventDefault(),e.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(i.meta.close.esc_press||i.meta.close.f4_press)&&e(window).off("keyup.popmake").on("keyup.popmake",function(o){27===o.keyCode&&i.meta.close.esc_press&&(e.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===o.keyCode&&i.meta.close.f4_press&&(e.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),i.meta.close.overlay_click&&t.off("click.popmake").on("click.popmake",function(o){o.target===t[0]&&(e.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))}),t.trigger("pumSetupClose"),this},close:function(t){return this.each(function(){var n=PUM.getPopup(this),i=n.popmake("getContainer"),a=n.popmake("getClose").add(e(".popmake-close",n));return n.trigger("pumBeforeClose"),n.hasClass("preventClose")||i.hasClass("preventClose")?(n.removeClass("preventClose").trigger("pumClosePrevented"),this):(i.fadeOut("fast",function(){n.is(":visible")&&n.fadeOut("fast"),e(window).off("keyup.popmake"),n.off("click.popmake"),a.off("click.popmake"),1===e(".pum-active").length&&e("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),n.removeClass("pum-active").trigger("pumAfterClose"),i.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var t=e(this),o=t.attr("src"),n=o.replace("autoplay=1","1=1");n!==o&&(o=n),t.prop("src",o)}),i.find("video").each(function(){this.pause()}),t!==o&&t()}),this)})},close_all:function(){return e(".pum-active").popmake("close"),this},reposition:function(t){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),n=o.popmake("getContainer"),i=o.popmake("getSettings"),a=i.meta.display,s=a.location,p={my:"",at:""},r={overlay:null,container:null};return s.indexOf("left")>=0&&(p={my:p.my+" left"+(0!==a.position_left?"+"+a.position_left:""),at:p.at+" left"}),s.indexOf("right")>=0&&(p={my:p.my+" right"+(0!==a.position_right?"-"+a.position_right:""),at:p.at+" right"}),s.indexOf("center")>=0&&(p="center"===s?{my:"center",at:"center"}:{my:p.my+" center",at:p.at+" center"}),s.indexOf("top")>=0&&(p={my:p.my+" top"+(0!==a.position_top?"+"+(e("body").hasClass("admin-bar")?parseInt(a.position_top,10)+32:a.position_top):""),at:p.at+" top"}),s.indexOf("bottom")>=0&&(p={my:p.my+" bottom"+(0!==a.position_bottom?"-"+a.position_bottom:""),at:p.at+" bottom"}),p.my=e.trim(p.my),p.at=e.trim(p.at),p.of=window,p.collision="none",p.using="function"==typeof t?t:e.fn.popmake.callbacks.reposition_using,o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show()),n.is(":hidden")&&(r.container=n.css("opacity"),n.css({opacity:0}).show()),a.position_fixed&&n.addClass("fixed"),"custom"===i.meta.display.size?n.css({width:i.meta.display.custom_width+i.meta.display.custom_width_unit,height:i.meta.display.custom_height_auto?"auto":i.meta.display.custom_height+i.meta.display.custom_height_unit}):"auto"!==i.meta.display.size&&n.addClass("responsive").css({minWidth:""!==i.meta.display.responsive_min_width?i.meta.display.responsive_min_width+i.meta.display.responsive_min_width_unit:"auto",maxWidth:""!==i.meta.display.responsive_max_width?i.meta.display.responsive_max_width+i.meta.display.responsive_max_width_unit:"auto"}),n.addClass("custom-position").position(p).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(),r.container&&n.css({opacity:r.container}).hide(),this},retheme:function(t){e(this).trigger("popmakeBeforeRetheme");var n,i,a=PUM.getPopup(this),s=a.popmake("getContainer"),p=a.popmake("getTitle"),r=a.popmake("getContent"),c=a.popmake("getClose"),l=a.popmake("getSettings");switch(t===o&&(t=e.fn.popmake.themes[l.theme_id],t===o&&(t=e.fn.popmake.themes[1])),n="yes"===t.container.boxshadow_inset?"inset ":"",i="yes"===t.close.boxshadow_inset?"inset ":"",a.removeAttr("style").css({backgroundColor:e.fn.popmake.utilities.convert_hex(t.overlay.background_color,t.overlay.background_opacity),zIndex:l.meta.display.overlay_zindex||998}),s.css({padding:t.container.padding+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.container.background_color,t.container.background_opacity),borderStyle:t.container.border_style,borderColor:t.container.border_color,borderWidth:t.container.border_width+"px",borderRadius:t.container.border_radius+"px",boxShadow:n+t.container.boxshadow_horizontal+"px "+t.container.boxshadow_vertical+"px "+t.container.boxshadow_blur+"px "+t.container.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.container.boxshadow_color,t.container.boxshadow_opacity),zIndex:l.meta.display.zindex||999}),p.css({color:t.title.font_color,lineHeight:t.title.line_height+"px",fontSize:t.title.font_size+"px",fontFamily:t.title.font_family,fontWeight:t.title.font_weight,fontStyle:t.title.font_style,textAlign:t.title.text_align,textShadow:t.title.textshadow_horizontal+"px "+t.title.textshadow_vertical+"px "+t.title.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.title.textshadow_color,t.title.textshadow_opacity)}),r.css({color:t.content.font_color,fontFamily:t.content.font_family,fontWeight:t.content.font_weight,fontStyle:t.content.font_style}),e("p, label",r).css({color:t.content.font_color,fontFamily:t.content.font_family}),c.html(t.close.text).css({padding:t.close.padding+"px",height:t.close.height+"px",width:t.close.width+"px",backgroundColor:e.fn.popmake.utilities.convert_hex(t.close.background_color,t.close.background_opacity),color:t.close.font_color,lineHeight:t.close.line_height+"px",fontSize:t.close.font_size+"px",fontWeight:t.close.font_weight,fontStyle:t.close.font_style,fontFamily:t.close.font_family,borderStyle:t.close.border_style,borderColor:t.close.border_color,borderWidth:t.close.border_width+"px",borderRadius:t.close.border_radius+"px",boxShadow:i+t.close.boxshadow_horizontal+"px "+t.close.boxshadow_vertical+"px "+t.close.boxshadow_blur+"px "+t.close.boxshadow_spread+"px "+e.fn.popmake.utilities.convert_hex(t.close.boxshadow_color,t.close.boxshadow_opacity),textShadow:t.close.textshadow_horizontal+"px "+t.close.textshadow_vertical+"px "+t.close.textshadow_blur+"px "+e.fn.popmake.utilities.convert_hex(t.close.textshadow_color,t.close.textshadow_opacity),left:"auto",right:"auto",bottom:"auto",top:"auto"}),t.close.location){case"topleft":c.css({top:t.close.position_top+"px",left:t.close.position_left+"px"});break;case"topright":c.css({top:t.close.position_top+"px",right:t.close.position_right+"px"});break;case"bottomleft":c.css({bottom:t.close.position_bottom+"px",left:t.close.position_left+"px"});break;case"bottomright":c.css({bottom:t.close.position_bottom+"px",right:t.close.position_right+"px"})}return a.trigger("popmakeAfterRetheme",[t]),this},animation_origin:function(t){var o=PUM.getPopup(this),n=o.popmake("getContainer"),i={my:"",at:""};switch(t){case"top":i={my:"left+"+n.offset().left+" bottom-100",at:"left top"};break;case"bottom":i={my:"left+"+n.offset().left+" top+100",at:"left bottom"};break;case"left":i={my:"right top+"+n.offset().top,at:"left top"};break;case"right":i={my:"left top+"+n.offset().top,at:"right top"};break;default:t.indexOf("left")>=0&&(i={my:i.my+" right",at:i.at+" left"}),t.indexOf("right")>=0&&(i={my:i.my+" left",at:i.at+" right"}),t.indexOf("center")>=0&&(i={my:i.my+" center",at:i.at+" center"}),t.indexOf("top")>=0&&(i={my:i.my+" bottom-100",at:i.at+" top"}),t.indexOf("bottom")>=0&&(i={my:i.my+" top+100",at:i.at+" bottom"}),i.my=e.trim(i.my),i.at=e.trim(i.at)}return i.of=window,i.collision="none",i}}}(jQuery,document);var PUM_Accessibility;!function(e,t,o){"use strict";var n,i,a,s="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]";PUM_Accessibility={forceFocus:function(t){a&&!e.contains(a,t.target)&&(t.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(t){if(9===t.keyCode){var o=a.find(".pum-container *").filter(s).filter(":visible"),n=e(":focus"),i=o.length,p=o.index(n);t.shiftKey?0===p&&(o.get(i-1).focus(),t.preventDefault()):p===i-1&&(o.get(0).focus(),t.preventDefault())}},setFocusToFirstItem:function(){a.find(".pum-container *").filter(s).filter(":visible").filter(":not(.pum-close)").first().focus()}},e(t).on("pumInit",".pum",function(){PUM.getPopup(this).find("[tabindex]").each(function(){var t=e(this);t.data("tabindex",t.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",".pum",function(){var o=PUM.getPopup(this),s=e(":focus");o.has(s).length||(i=s),a=o.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),n=e("body > *").filter(":visible").not(a),n.attr("aria-hidden","true"),e(t).on("focus.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",".pum",function(){}).on("pumBeforeClose",".pum",function(){}).on("pumAfterClose",".pum",function(){var o=PUM.getPopup(this);o.off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),i.length&&i.focus(),a=null,e(t).off("focus.pum_accessibility")}).on("pumSetupClose",".pum",function(){}).on("pumOpenPrevented",".pum",function(){}).on("pumClosePrevented",".pum",function(){}).on("pumBeforeReposition",".pum",function(){})}(jQuery,document);var PUM_Analytics;!function(e,t,o){"use strict";e.fn.popmake.last_open_trigger=null,e.fn.popmake.last_close_trigger=null,e.fn.popmake.conversion_trigger=null,PUM_Analytics={beacon:function(t){var o=new Image;t=e.extend(!0,{},{url:pum_vars.ajaxurl||null,data:{action:"pum_analytics",_cache:+new Date},callback:function(){}},t),t.url&&(e(o).on("error success load done",t.callback),o.src=t.url+"?"+e.param(t.data))}},e(t).on("pumAfterOpen.core_analytics","body > .pum",function(){var t=PUM.getPopup(this),o={pid:parseInt(t.popmake("getSettings").id,10)||null,type:"open"};o.pid>0&&!e("body").hasClass("single-popup")&&PUM_Analytics.beacon({data:o})})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.methods.animate_overlay=function(t,o,n){var i=PUM.getPopup(this).popmake("getSettings");return i.meta.display.overlay_disabled?e.fn.popmake.overlay_animations.none.apply(this,[o,n]):e.fn.popmake.overlay_animations[t]?e.fn.popmake.overlay_animations[t].apply(this,[o,n]):(window.console&&console.warn("Animation style "+t+" does not exist."),this)},e.fn.popmake.methods.animate=function(t){return e.fn.popmake.animations[t]?e.fn.popmake.animations[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+t+" does not exist."),this)},e.fn.popmake.animations={none:function(e){var t=PUM.getPopup(this);return t.popmake("getContainer").show(0),t.popmake("animate_overlay","none",0,function(){e!==o&&e()}),this},slide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,s=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(s).css({opacity:1}),t.css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},fade:function(e){var t=PUM.getPopup(this),n=t.popmake("getContainer"),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2;return n.show(0).css({opacity:0}),t.popmake("animate_overlay","fade",a,function(){n.animate({opacity:1},a,"swing",function(){e!==o&&e()})}),this},fadeAndSlide:function(e){var t=PUM.getPopup(this).show(0).css({opacity:0}),n=t.popmake("getContainer").show(0).css({opacity:0}),i=t.popmake("getSettings"),a=i.meta.display.animation_speed/2,s=t.popmake("animation_origin",i.meta.display.animation_origin);return n.position(s),t.hide().css({opacity:1}).popmake("animate_overlay","fade",a,function(){n.popmake("reposition",function(t){t.opacity=1,n.animate(t,a,"swing",function(){e!==o&&e()})})}),this},grow:function(t){return e.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(t){return e.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},e.fn.popmake.overlay_animations={none:function(e,t){PUM.getPopup(this).show(e,t)},fade:function(e,t){PUM.getPopup(this).fadeIn(e,t)},slide:function(e,t){PUM.getPopup(this).slideDown(e,t)}}}(jQuery,document),function(e,t,o){"use strict";e(t).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(e,t,o){"use strict";e.fn.popmake.callbacks={reposition_using:function(t){e(this).css(t)}}}(jQuery,document),function(e,t,o){"use strict";e.extend(e.fn.popmake.methods,{checkConditions:function(){var t,n,i,a,s,p=PUM.getPopup(this),r=p.popmake("getSettings"),c=!0;if(r.conditions!==o&&r.conditions.length)for(n=0;r.conditions.length>n;n++){for(a=r.conditions[n],t=!1,i=0;a.length>i;i++){if(s=e.extend({},{not_operand:!1},a[i]),!s.not_operand&&p.popmake("checkCondition",s)){t=!0;break}if(s.not_operand&&!p.popmake("checkCondition",s)){t=!0;break}}t||(c=!1)}return c},checkCondition:function(t){var o=t.target||null;return o?e.fn.popmake.conditions[o]?e.fn.popmake.conditions[o].apply(this,[t]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),e.fn.popmake.conditions={}}(jQuery,document);var pm_cookie,pm_cookie_json,pm_remove_cookie;!function(e){"use strict";function t(t){function o(n,i,a){var s,p=new Date;if("undefined"!=typeof document){if(arguments.length>1){switch(a=e.extend({path:"/"},o.defaults,a),typeof a.expires){case"number":p.setMilliseconds(p.getMilliseconds()+864e5*a.expires),a.expires=p;break;case"string":p.setTime(1e3*e.fn.popmake.utilities.strtotime("+"+a.expires)),a.expires=p}try{s=JSON.stringify(i),/^[\{\[]/.test(s)&&(i=s)}catch(r){}return i=t.write?t.write(i,n):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)),n=n.replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent),n=n.replace(/[\(\)]/g,escape),document.cookie=[n,"=",i,a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}n||(s={});for(var c=document.cookie?document.cookie.split("; "):[],l=/(%[0-9A-Z]{2})+/g,u=0;u<c.length;u++){var m=c[u].split("="),d=m.slice(1).join("=");'"'===d.charAt(0)&&(d=d.slice(1,-1));try{var f=m[0].replace(l,decodeURIComponent);if(d=t.read?t.read(d,f):t(d,f)||d.replace(l,decodeURIComponent),this.json)try{d=JSON.parse(d)}catch(r){}if(n===f){s=d;break}n||(s[f]=d)}catch(r){}}return s}}return void 0===t&&(t=function(){}),o.set=o,o.get=function(e){return o.call(o,e)},o.getJSON=function(){return o.apply({json:!0},[].slice.call(arguments))},o.defaults={},o.remove=function(t,n){o(t,"",e.extend({},n,{expires:-1,path:""})),o(t,"",e.extend({},n,{expires:-1}))},o.process=function(e,t,n,i){return arguments.length>3&&"object"!=typeof arguments[2]&&void 0!==t?o.apply(o,[e,t,{expires:n,path:i}]):o.apply(o,[].slice.call(arguments,[0,2]))},o.withConverter=e.fn.popmake.cookie,o}e.extend(e.fn.popmake,{cookie:t()}),pm_cookie=e.pm_cookie=e.fn.popmake.cookie.process,pm_cookie_json=e.pm_cookie_json=e.fn.popmake.cookie.getJSON,pm_remove_cookie=e.pm_remove_cookie=e.fn.popmake.cookie.remove}(jQuery),function(e,t,o){"use strict";e.extend(e.fn.popmake.methods,{addCookie:function(t){return e.fn.popmake.cookies[t]?e.fn.popmake.cookies[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+t+" does not exist."),this)},setCookie:function(t){e.pm_cookie(t.name,!0,t.session?null:t.time,t.path?"/":null)},checkCookies:function(t){var n;if(t.cookie===o||t.cookie.name===o||null===t.cookie.name)return!1;switch(typeof t.cookie.name){case"object":case"array":for(n=0;t.cookie.name.length>n;n+=1)if(e.pm_cookie(t.cookie.name[n])!==o)return!0;break;case"string":if(e.pm_cookie(t.cookie.name)!==o)return!0}return!1}}),e.fn.popmake.cookies={on_popup_open:function(e){var t=PUM.getPopup(this);t.on("pumAfterOpen",function(){t.popmake("setCookie",e)})},on_popup_close:function(e){var t=PUM.getPopup(this);t.on("pumBeforeClose",function(){t.popmake("setCookie",e)})},manual:function(e){var t=PUM.getPopup(this);t.on("pumSetCookie",function(){t.popmake("setCookie",e)})}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.cookies,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addCookie",a.event,a.settings)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.defaults={meta:{display:{stackable:0,overlay_disabled:0,size:"medium",responsive_max_width:"",responsive_max_width_unit:"%",responsive_min_width:"",responsive_min_width_unit:"%",custom_width:"",custom_width_unit:"%",custom_height:"",custom_height_unit:"em",custom_height_auto:0,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:0,animation_type:"fade",animation_speed:350,animation_origin:"center top"},close:{overlay_click:0,esc_press:0,f4_press:0}},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(e,t,o){"use strict";e.extend(e.fn.popmake.methods,{addTrigger:function(t){return e.fn.popmake.triggers[t]?e.fn.popmake.triggers[t].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+t+" does not exist."),this)}}),e.fn.popmake.triggers={auto_open:function(t){var o=PUM.getPopup(this);setTimeout(function(){o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active")||!o.popmake("checkCookies",t)&&o.popmake("checkConditions")&&(e.fn.popmake.last_open_trigger="Auto Open - Delay: "+t.delay,o.popmake("open"))},t.delay)},click_open:function(o){var n,i=PUM.getPopup(this),a=i.popmake("getSettings"),s=[".popmake-"+a.id,".popmake-"+decodeURIComponent(a.slug),'a[href$="#popmake-'+a.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&s.push(o.extra_selectors),n=s.join(", "),e(n).addClass("pum-trigger").css({cursor:"pointer"}),e(t).on("click.pumTrigger",n,function(t){var n=e(this),a=o.do_default;i.has(n).length>0||!i.popmake("checkCookies",o)&&i.popmake("checkConditions")&&(a=n.data("do-default")?n.data("do-default"):n.hasClass("do-default"),a||(t.preventDefault(),t.stopPropagation()),e.fn.popmake.last_open_trigger=n,i.popmake("open"))})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},e(t).on("pumInit",".pum",function(){var e,t=PUM.getPopup(this),n=t.popmake("getSettings"),i=n.triggers,a=null;if(i!==o&&i.length)for(e=0;i.length>e;e+=1)a=i[e],t.popmake("addTrigger",a.type,a.settings)})}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.utilities={convert_hex:function(e,t){e=e.replace("#","");var o=parseInt(e.substring(0,2),16),n=parseInt(e.substring(2,4),16),i=parseInt(e.substring(4,6),16);return"rgba("+o+","+n+","+i+","+t/100+")"},debounce:function(e,t){var o;return function(){var n=this,i=arguments;window.clearTimeout(o),o=window.setTimeout(function(){e.apply(n,i)},t)}},throttle:function(e,t){var o=!1,n=function(){o=!1};return function(){o||(e.apply(this,arguments),window.setTimeout(n,t),o=!0)}},getXPath:function(t){var o,n,i,a,s,p=[];return e.each(e(t).parents(),function(t,r){return o=e(r),n=o.attr("id")||"",i=o.attr("class")||"",a=o.get(0).tagName.toLowerCase(),s=o.parent().children(a).index(o),"body"===a?!1:(i.length>0&&(i=i.split(" "),i=i[0]),void p.push(a+(n.length>0?"#"+n:i.length>0?"."+i.split(" ").join("."):":eq("+s+")")))}),p.reverse().join(" > ")},strtotime:function(e,t){function n(e,t,n){var i,a=l[t];a!==o&&(i=a-c.getDay(),0===i?i=7*n:i>0&&"last"===e?i-=7:0>i&&"next"===e&&(i+=7),c.setDate(c.getDate()+i))}function i(e){var t=e.split(" "),o=t[0],i=t[1].substring(0,3),a=/\d+/.test(o),s="ago"===t[2],p=("last"===o?-1:1)*(s?-1:1);if(a&&(p*=parseInt(o,10)),u.hasOwnProperty(i)&&!t[1].match(/^mon(day|\.)?$/i))return c["set"+u[i]](c["get"+u[i]]()+p);if("wee"===i)return c.setDate(c.getDate()+7*p);if("next"===o||"last"===o)n(o,i,p);else if(!a)return!1;return!0}var a,s,p,r,c,l,u,m,d,f,h,g=!1;if(!e)return g;if(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase(),s=e.match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/),s&&s[2]===s[4])if(s[1]>1901)switch(s[2]){case"-":return s[3]>12||s[5]>31?g:new Date(s[1],parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case".":return g;case"/":return s[3]>12||s[5]>31?g:new Date(s[1],parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3}else if(s[5]>1901)switch(s[2]){case"-":return s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case".":return s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3;case"/":return s[1]>12||s[3]>31?g:new Date(s[5],parseInt(s[1],10)-1,s[3],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3}else switch(s[2]){case"-":return s[3]>12||s[5]>31||s[1]<70&&s[1]>38?g:(r=s[1]>=0&&s[1]<=38?+s[1]+2e3:s[1],new Date(r,parseInt(s[3],10)-1,s[5],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3);case".":return s[5]>=70?s[3]>12||s[1]>31?g:new Date(s[5],parseInt(s[3],10)-1,s[1],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3:s[5]<60&&!s[6]?s[1]>23||s[3]>59?g:(p=new Date,new Date(p.getFullYear(),p.getMonth(),p.getDate(),s[1]||0,s[3]||0,s[5]||0,s[9]||0)/1e3):g;case"/":return s[1]>12||s[3]>31||s[5]<70&&s[5]>38?g:(r=s[5]>=0&&s[5]<=38?+s[5]+2e3:s[5],new Date(r,parseInt(s[1],10)-1,s[3],s[6]||0,s[7]||0,s[8]||0,s[9]||0)/1e3);case":":return s[1]>23||s[3]>59||s[5]>59?g:(p=new Date,new Date(p.getFullYear(),p.getMonth(),p.getDate(),s[1]||0,s[3]||0,s[5]||0)/1e3)}if("now"===e)return null===t||isNaN(t)?(new Date).getTime()/1e3||0:t||0;if(a=Date.parse(e),!isNaN(a))return a/1e3||0;if(c=t?new Date(1e3*t):new Date,l={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},u={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},d="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",f="([+-]?\\d+\\s"+d+"|(last|next)\\s"+d+")(\\sago)?",s=e.match(new RegExp(f,"gi")),!s)return g;for(h=0,m=s.length;m>h;h+=1)if(!i(s[h]))return g;return c.getTime()/1e3}},e.fn.popmake.utilies=e.fn.popmake.utilities}(jQuery,document),function(e,t,o){"use strict";e.fn.popmake.version=1.4,e.fn.popmake.last_open_popup=null,e(t).ready(function(){e(".popmake").popmake()})}(jQuery);
includes/admin/admin-pages.php CHANGED
@@ -27,9 +27,9 @@ if ( ! defined( 'ABSPATH' ) ) {
27
  function popmake_admin_submenu_pages() {
28
  global $popmake_settings_page, $popmake_tools_page, $popmake_extensions_page;
29
 
30
- $popmake_settings_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Settings', 'popup-maker' ), __( 'Settings', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_settings_capability', 'manage_options' ), 'settings', 'popmake_settings_page' );
31
 
32
- $popmake_tools_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Tools', 'popup-maker' ), __( 'Tools', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_tools_capability', 'manage_options' ), 'tools', 'popmake_tools_page' );
33
 
34
  $popmake_extensions_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Extend', 'popup-maker' ), __( 'Extend', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_extensions_capability', 'edit_posts' ), 'pum-extensions', 'popmake_extensions_page' );
35
 
27
  function popmake_admin_submenu_pages() {
28
  global $popmake_settings_page, $popmake_tools_page, $popmake_extensions_page;
29
 
30
+ $popmake_settings_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Settings', 'popup-maker' ), __( 'Settings', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_settings_capability', 'manage_options' ), 'pum-settings', 'popmake_settings_page' );
31
 
32
+ $popmake_tools_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Tools', 'popup-maker' ), __( 'Tools', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_tools_capability', 'manage_options' ), 'pum-tools', 'popmake_tools_page' );
33
 
34
  $popmake_extensions_page = add_submenu_page( 'edit.php?post_type=popup', __( 'Extend', 'popup-maker' ), __( 'Extend', 'popup-maker' ), apply_filters( 'popmake_admin_submenu_extensions_capability', 'edit_posts' ), 'pum-extensions', 'popmake_extensions_page' );
35
 
includes/admin/admin-setup.php CHANGED
@@ -19,7 +19,7 @@ add_filter( 'user_has_cap', 'popmake_prevent_default_theme_deletion', 10, 3 );
19
 
20
  function popmake_plugin_action_links( $links, $file ) {
21
  if ( $file == plugin_basename( POPMAKE ) ) {
22
- $settings_page_url = admin_url( 'edit.php?post_type=popup&page=settings' );
23
  $plugin_action_links = apply_filters( 'popmake_action_links', array(
24
  'settings' => '<a href="'. $settings_page_url .'">'.__( 'Settings', 'popup-maker' ).'</a>',
25
  'extensions' => '<a href="https://wppopupmaker.com/extensions?utm_source=WP+Admin+Plugins+Page&utm_medium=Text+Link&utm_campaign=Extensions" target="_blank">' . __( 'Extensions', 'popup-maker' ) . '</a>',
19
 
20
  function popmake_plugin_action_links( $links, $file ) {
21
  if ( $file == plugin_basename( POPMAKE ) ) {
22
+ $settings_page_url = admin_url( 'edit.php?post_type=popup&page=pum-settings' );
23
  $plugin_action_links = apply_filters( 'popmake_action_links', array(
24
  'settings' => '<a href="'. $settings_page_url .'">'.__( 'Settings', 'popup-maker' ).'</a>',
25
  'extensions' => '<a href="https://wppopupmaker.com/extensions?utm_source=WP+Admin+Plugins+Page&utm_medium=Text+Link&utm_campaign=Extensions" target="_blank">' . __( 'Extensions', 'popup-maker' ) . '</a>',
includes/admin/settings/register-settings.php CHANGED
@@ -192,7 +192,7 @@ function popmake_get_pages( $force = false ) {
192
 
193
  $pages_options = array( 0 => '' ); // Blank option
194
 
195
- if ( ( ! isset( $_GET['page'] ) || 'popmake-settings' != $_GET['page'] ) && ! $force ) {
196
  return $pages_options;
197
  }
198
 
192
 
193
  $pages_options = array( 0 => '' ); // Blank option
194
 
195
+ if ( ( ! isset( $_GET['page'] ) || 'pum-settings' != $_GET['page'] ) && ! $force ) {
196
  return $pages_options;
197
  }
198
 
includes/admin/tools/tools-page.php CHANGED
@@ -114,7 +114,7 @@ function popmake_emodal_admin_init() {
114
  return;
115
  }
116
  popmake_emodal_v2_import();
117
- wp_redirect( admin_url( 'edit.php?post_type=popup&page=tools&imported=1' ), 302 );
118
  }
119
 
120
  add_action( 'admin_init', 'popmake_emodal_admin_init' );
@@ -126,7 +126,7 @@ add_action( 'admin_init', 'popmake_emodal_admin_init' );
126
  * @return void
127
  */
128
  function popmake_tools_sysinfo_display() { ?>
129
- <form action="<?php echo esc_url( admin_url( 'edit.php?post_type=popup&page=tools&tab=system_info' ) ); ?>" method="post" dir="ltr">
130
  <textarea style="min-height: 350px; width: 100%; display: block;" readonly="readonly" onclick="this.focus(); this.select()" id="system-info-textarea" name="popmake-sysinfo" title="<?php _e( 'To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'popup-maker' ); ?>"><?php echo popmake_tools_sysinfo_get(); ?></textarea>
131
  <p class="submit">
132
  <input type="hidden" name="popmake_action" value="popup_sysinfo" />
114
  return;
115
  }
116
  popmake_emodal_v2_import();
117
+ wp_redirect( admin_url( 'edit.php?post_type=popup&page=pum-tools&imported=1' ), 302 );
118
  }
119
 
120
  add_action( 'admin_init', 'popmake_emodal_admin_init' );
126
  * @return void
127
  */
128
  function popmake_tools_sysinfo_display() { ?>
129
+ <form action="<?php echo esc_url( admin_url( 'edit.php?post_type=popup&page=pum-tools&tab=system_info' ) ); ?>" method="post" dir="ltr">
130
  <textarea style="min-height: 350px; width: 100%; display: block;" readonly="readonly" onclick="this.focus(); this.select()" id="system-info-textarea" name="popmake-sysinfo" title="<?php _e( 'To copy the system info, click below then press Ctrl + C (PC) or Cmd + C (Mac).', 'popup-maker' ); ?>"><?php echo popmake_tools_sysinfo_get(); ?></textarea>
131
  <p class="submit">
132
  <input type="hidden" name="popmake_action" value="popup_sysinfo" />
includes/class-pum-condition.php CHANGED
@@ -37,6 +37,14 @@ class PUM_Condition extends PUM_Fields {
37
  * @param array $args
38
  */
39
  public function __construct( $args = array() ) {
 
 
 
 
 
 
 
 
40
  $this->id = $args['id'];
41
 
42
  if ( ! empty( $args['labels'] ) && is_array( $args['labels'] ) ) {
@@ -76,8 +84,16 @@ class PUM_Condition extends PUM_Fields {
76
  return $this->labels;
77
  }
78
 
79
- public function has_callback() {
80
- return ! empty( $this->args['callback'] ) ? true : false;
 
 
 
 
 
 
 
 
81
  }
82
 
83
  public function get_callback() {
37
  * @param array $args
38
  */
39
  public function __construct( $args = array() ) {
40
+ $args = wp_parse_args( $args, array(
41
+ 'id' => '',
42
+ 'group' => '',
43
+ 'name' => '',
44
+ 'labels' => array(),
45
+ 'advanced' => false,
46
+ ) );
47
+
48
  $this->id = $args['id'];
49
 
50
  if ( ! empty( $args['labels'] ) && is_array( $args['labels'] ) ) {
84
  return $this->labels;
85
  }
86
 
87
+ public function has_callback( $valid_callback = true ) {
88
+ if ( empty( $this->args['callback'] ) ) {
89
+ return false;
90
+ }
91
+
92
+ return $valid_callback ? is_callable( $this->args['callback'] ) : true;
93
+ }
94
+
95
+ public function is_advanced() {
96
+ return $this->args['advanced'] != false;
97
  }
98
 
99
  public function get_callback() {
includes/class-pum-fields.php CHANGED
@@ -692,6 +692,7 @@ class PUM_Fields extends Popmake_Fields {
692
  'max' => 50,
693
  'step' => 1,
694
  'unit' => 'px',
 
695
  'required' => false,
696
  'disabled' => false,
697
  ) );
@@ -720,6 +721,7 @@ class PUM_Fields extends Popmake_Fields {
720
  min="<?php esc_attr_e( $args['min'] ); ?>"
721
  max="<?php esc_attr_e( $args['max'] ); ?>"
722
  <?php if ( $args['required'] ) { echo 'required'; } ?>
 
723
  />
724
  <span class="range-value-unit regular-text"><?php esc_html_e( $args['unit'] ); ?></span><?php
725
 
692
  'max' => 50,
693
  'step' => 1,
694
  'unit' => 'px',
695
+ 'force' => true,
696
  'required' => false,
697
  'disabled' => false,
698
  ) );
721
  min="<?php esc_attr_e( $args['min'] ); ?>"
722
  max="<?php esc_attr_e( $args['max'] ); ?>"
723
  <?php if ( $args['required'] ) { echo 'required'; } ?>
724
+ data-force-minmax="<?php esc_attr_e( $args['force'] ); ?>"
725
  />
726
  <span class="range-value-unit regular-text"><?php esc_html_e( $args['unit'] ); ?></span><?php
727
 
includes/class-pum-freemius.php CHANGED
@@ -91,14 +91,13 @@ class PUM_Freemius {
91
  * Renders the popup maker usage statistics permission notification.
92
  */
93
  public function permission_list( $permissions = array() ) {
94
- /*
95
  $permissions['metrics'] = array(
96
  'icon-class' => 'dashicons dashicons-performance',
97
  'label' => __( 'Usage Statistics', 'popup-maker' ),
98
  'desc' => __( 'Popup & Theme Counts, Open Counts', 'popup-maker' ),
99
  'priority' => 25,
100
  );
101
- */
102
  return $permissions;
103
  }
104
 
@@ -158,17 +157,16 @@ class PUM_Freemius {
158
 
159
  $this->api_call( 'new_opt_in', $args );
160
 
 
161
  }
162
 
163
  /**
164
- * User just opted in.
165
- *
166
- * Forward the request to our server for discount code generation.
167
  */
168
  public function plan_sync() {
169
 
170
  // Send a maximum of once per week
171
- if ( get_site_transient( 'pum_tracking_last_send' ) ) {
172
  return;
173
  }
174
 
@@ -176,7 +174,8 @@ class PUM_Freemius {
176
 
177
  $this->api_call( 'check_in', $args );
178
 
179
- set_site_transient( 'pum_tracking_last_send', 3 * DAY_IN_SECONDS + 12 * HOUR_IN_SECONDS );
 
180
  }
181
 
182
  /**
91
  * Renders the popup maker usage statistics permission notification.
92
  */
93
  public function permission_list( $permissions = array() ) {
 
94
  $permissions['metrics'] = array(
95
  'icon-class' => 'dashicons dashicons-performance',
96
  'label' => __( 'Usage Statistics', 'popup-maker' ),
97
  'desc' => __( 'Popup & Theme Counts, Open Counts', 'popup-maker' ),
98
  'priority' => 25,
99
  );
100
+
101
  return $permissions;
102
  }
103
 
157
 
158
  $this->api_call( 'new_opt_in', $args );
159
 
160
+ set_transient( 'pum_tracking_last_send', true, 3 * DAY_IN_SECONDS + 12 * HOUR_IN_SECONDS );
161
  }
162
 
163
  /**
164
+ * Sync tracking data with freemius.
 
 
165
  */
166
  public function plan_sync() {
167
 
168
  // Send a maximum of once per week
169
+ if ( get_transient( 'pum_tracking_last_send' ) ) {
170
  return;
171
  }
172
 
174
 
175
  $this->api_call( 'check_in', $args );
176
 
177
+ // Twice per week.
178
+ set_transient( 'pum_tracking_last_send', true, 3 * DAY_IN_SECONDS + 12 * HOUR_IN_SECONDS );
179
  }
180
 
181
  /**
includes/class-pum-popup.php CHANGED
@@ -157,7 +157,7 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
157
  */
158
  function get_classes( $element = 'overlay' ) {
159
  $classes = array(
160
- 'overlay' => array(
161
  'pum',
162
  'pum-overlay',
163
  'pum-theme-' . $this->get_theme_id(),
@@ -168,15 +168,15 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
168
  'popmake', // Backward Compatibility
169
  'theme-' . $this->get_theme_id(), // Backward Compatibility
170
  ),
171
- 'title' => array(
172
  'pum-title',
173
  'popmake-title', // Backward Compatibility
174
  ),
175
- 'content' => array(
176
  'pum-content',
177
  'popmake-content', // Backward Compatibility
178
  ),
179
- 'close' => array(
180
  'pum-close',
181
  'popmake-close' // Backward Compatibility
182
  ),
@@ -284,46 +284,6 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
284
  return apply_filters( 'pum_popup_get_triggers', $this->triggers, $this->ID );
285
  }
286
 
287
- /**
288
- * @return mixed|void
289
- */
290
- function get_conditions() {
291
- if ( ! $this->conditions ) {
292
- $this->conditions = get_post_meta( $this->ID, 'popup_conditions', true );
293
-
294
- if ( ! $this->conditions ) {
295
- $this->conditions = array();
296
- }
297
-
298
- // Sanity Check on the values not operand value.
299
- foreach ( $this->conditions as $group_key => $group ) {
300
-
301
- foreach ( $group as $key => $condition ) {
302
-
303
- // The condition target doesn't exist. Lets ignore this condition.
304
- if ( empty( $condition['target'] ) ) {
305
- unset( $this->conditions[ $group_key ][ $key ] );
306
- continue;
307
- }
308
-
309
- // The not operand value is missing, set it to false.
310
- if ( ! isset ( $condition['not_operand'] ) ) {
311
- $this->conditions[ $group_key ][ $key ]['not_operand'] = false;
312
- }
313
- }
314
- }
315
- }
316
-
317
- return apply_filters( 'pum_popup_get_conditions', $this->conditions, $this->ID );
318
- }
319
-
320
- /**
321
- * @return mixed|void
322
- */
323
- function has_conditions() {
324
- return boolval( count ( $this->get_conditions() ) );
325
- }
326
-
327
  /**
328
  * Returns all or single display settings.
329
  *
@@ -407,9 +367,15 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
407
  'close' => $this->get_close(),
408
  // Added here for backward compatibility in extensions.
409
  'click_open' => popmake_get_popup_click_open( $this->ID ),
410
- )
411
  );
412
 
 
 
 
 
 
 
413
  // Deprecated
414
  $this->data_attr = apply_filters( 'popmake_get_the_popup_data_attr', $data_attr, $this->ID );
415
  }
@@ -423,7 +389,7 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
423
  */
424
  public function close_text() {
425
  $text = '&#215;';
426
-
427
  /** @deprecated */
428
  $text = apply_filters( 'popmake_popup_default_close_text', $text, $this->ID );
429
 
@@ -457,6 +423,90 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
457
  return boolval( apply_filters( 'pum_popup_show_close_button', $show, $this->ID ) );
458
  }
459
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
460
  /**
461
  * Returns whether or not the popup is visible in the loop.
462
  *
@@ -472,10 +522,12 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
472
  // Published/private
473
  }
474
 
475
- if ( $this->has_conditions() ) {
 
 
476
 
477
  // All Groups Must Return True. Break if any is false and set $loadable to false.
478
- foreach ( $this->get_conditions() as $group => $conditions ) {
479
 
480
  // Groups are false until a condition proves true.
481
  $group_check = false;
@@ -533,10 +585,13 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
533
  * @return integer
534
  */
535
  public function get_open_count( $which = 'current' ) {
536
- switch( $which ) {
537
- case 'current' : return absint( $this->get_meta( 'popup_open_count', true ) );
538
- case 'total' : return absint( $this->get_meta( 'popup_open_count_total', true ) );
 
 
539
  }
 
540
  return 0;
541
  }
542
 
@@ -545,14 +600,14 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
545
 
546
  // Set the current open count
547
  $current = $this->get_open_count();
548
- if( ! $current ) {
549
  $current = 0;
550
  };
551
  $current = $current + 1;
552
 
553
  // Set the total open count since creation.
554
  $total = $this->get_open_count( 'total' );
555
- if( ! $total ) {
556
  $total = 0;
557
  }
558
  $total = $total + 1;
@@ -588,7 +643,7 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
588
  // Log the reset time and count.
589
  add_post_meta( $this->ID, 'popup_open_count_reset', array(
590
  'timestamp' => current_time( 'timestamp', 0 ),
591
- 'count' => absint( $this->get_open_count( 'current' ) )
592
  ) );
593
 
594
  update_post_meta( $this->ID, 'popup_open_count', 0 );
@@ -616,8 +671,8 @@ if ( ! class_exists( 'PUM_Popup' ) ) {
616
  *
617
  * @return bool
618
  */
619
- function cmp ( $a, $b ) {
620
- return ( float ) $a['timestamp'] < ( float )$b['timestamp'];
621
  }
622
 
623
  usort( $resets, "cmp" );
157
  */
158
  function get_classes( $element = 'overlay' ) {
159
  $classes = array(
160
+ 'overlay' => array(
161
  'pum',
162
  'pum-overlay',
163
  'pum-theme-' . $this->get_theme_id(),
168
  'popmake', // Backward Compatibility
169
  'theme-' . $this->get_theme_id(), // Backward Compatibility
170
  ),
171
+ 'title' => array(
172
  'pum-title',
173
  'popmake-title', // Backward Compatibility
174
  ),
175
+ 'content' => array(
176
  'pum-content',
177
  'popmake-content', // Backward Compatibility
178
  ),
179
+ 'close' => array(
180
  'pum-close',
181
  'popmake-close' // Backward Compatibility
182
  ),
284
  return apply_filters( 'pum_popup_get_triggers', $this->triggers, $this->ID );
285
  }
286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  /**
288
  * Returns all or single display settings.
289
  *
367
  'close' => $this->get_close(),
368
  // Added here for backward compatibility in extensions.
369
  'click_open' => popmake_get_popup_click_open( $this->ID ),
370
+ ),
371
  );
372
 
373
+ $filters = array( 'js_only' => true );
374
+
375
+ if ( $this->has_conditions( $filters ) ) {
376
+ $data_attr['conditions'] = $this->get_conditions( $filters );
377
+ }
378
+
379
  // Deprecated
380
  $this->data_attr = apply_filters( 'popmake_get_the_popup_data_attr', $data_attr, $this->ID );
381
  }
389
  */
390
  public function close_text() {
391
  $text = '&#215;';
392
+
393
  /** @deprecated */
394
  $text = apply_filters( 'popmake_popup_default_close_text', $text, $this->ID );
395
 
423
  return boolval( apply_filters( 'pum_popup_show_close_button', $show, $this->ID ) );
424
  }
425
 
426
+ /**
427
+ * @return mixed|void
428
+ */
429
+ function get_conditions( $filters = array() ) {
430
+
431
+ $filters = wp_parse_args( $filters, array(
432
+ 'php_only' => null,
433
+ 'js_only' => null,
434
+ ) );
435
+
436
+
437
+ if ( ! $this->conditions ) {
438
+ $this->conditions = get_post_meta( $this->ID, 'popup_conditions', true );
439
+
440
+ if ( ! $this->conditions ) {
441
+ $this->conditions = array();
442
+ }
443
+ }
444
+
445
+ $conditions = $this->conditions;
446
+
447
+ // Sanity Check on the values not operand value.
448
+ foreach ( $conditions as $group_key => $group ) {
449
+
450
+ foreach ( $group as $key => $condition ) {
451
+
452
+ if ( $this->exclude_condition( $condition, $filters ) ) {
453
+ unset( $conditions[ $group_key ][ $key ] );
454
+ if ( empty( $conditions[ $group_key ] ) ) {
455
+ unset( $conditions[ $group_key ] );
456
+ break;
457
+ }
458
+ continue;
459
+ }
460
+
461
+ $conditions[ $group_key ][ $key ] = $this->parse_condition( $condition );
462
+ }
463
+ }
464
+
465
+ return apply_filters( 'pum_popup_get_conditions', $conditions, $this->ID );
466
+ }
467
+
468
+ public function parse_condition( $condition ) {
469
+ // The not operand value is missing, set it to false.
470
+ if ( ! isset ( $condition['not_operand'] ) ) {
471
+ $condition['not_operand'] = false;
472
+ }
473
+
474
+ return $condition;
475
+ }
476
+
477
+ public function exclude_condition( $condition, $filters = array() ) {
478
+
479
+ $exclude = false;
480
+
481
+ // The condition target doesn't exist. Lets ignore this condition.
482
+ if ( empty( $condition['target'] ) ) {
483
+ return true;
484
+ }
485
+
486
+ $condition_args = PUM_Conditions::instance()->get_condition( $condition['target'] );
487
+
488
+ // The condition target doesn't exist. Lets ignore this condition.
489
+ if ( ! $condition_args ) {
490
+ return true;
491
+ }
492
+
493
+
494
+ if ( $filters['js_only'] && ! $condition_args->is_advanced() ) {
495
+ return true;
496
+ } elseif ( $filters['php_only'] && $condition_args->is_advanced() ) {
497
+ return true;
498
+ }
499
+
500
+ return $exclude;
501
+ }
502
+
503
+ /**
504
+ * @return mixed|void
505
+ */
506
+ public function has_conditions( $filters = array() ) {
507
+ return boolval( count( $this->get_conditions( $filters ) ) );
508
+ }
509
+
510
  /**
511
  * Returns whether or not the popup is visible in the loop.
512
  *
522
  // Published/private
523
  }
524
 
525
+ $filters = array( 'php_only' => true );
526
+
527
+ if ( $this->has_conditions( $filters ) ) {
528
 
529
  // All Groups Must Return True. Break if any is false and set $loadable to false.
530
+ foreach ( $this->get_conditions( $filters ) as $group => $conditions ) {
531
 
532
  // Groups are false until a condition proves true.
533
  $group_check = false;
585
  * @return integer
586
  */
587
  public function get_open_count( $which = 'current' ) {
588
+ switch ( $which ) {
589
+ case 'current' :
590
+ return absint( $this->get_meta( 'popup_open_count', true ) );
591
+ case 'total' :
592
+ return absint( $this->get_meta( 'popup_open_count_total', true ) );
593
  }
594
+
595
  return 0;
596
  }
597
 
600
 
601
  // Set the current open count
602
  $current = $this->get_open_count();
603
+ if ( ! $current ) {
604
  $current = 0;
605
  };
606
  $current = $current + 1;
607
 
608
  // Set the total open count since creation.
609
  $total = $this->get_open_count( 'total' );
610
+ if ( ! $total ) {
611
  $total = 0;
612
  }
613
  $total = $total + 1;
643
  // Log the reset time and count.
644
  add_post_meta( $this->ID, 'popup_open_count_reset', array(
645
  'timestamp' => current_time( 'timestamp', 0 ),
646
+ 'count' => absint( $this->get_open_count( 'current' ) ),
647
  ) );
648
 
649
  update_post_meta( $this->ID, 'popup_open_count', 0 );
671
  *
672
  * @return bool
673
  */
674
+ function cmp( $a, $b ) {
675
+ return ( float ) $a['timestamp'] < ( float ) $b['timestamp'];
676
  }
677
 
678
  usort( $resets, "cmp" );
includes/class-pum.php CHANGED
@@ -7,7 +7,7 @@ if ( ! defined( 'ABSPATH' ) ) {
7
 
8
  class PUM {
9
 
10
- const VER = '1.4.18';
11
 
12
  const DB_VER = 6;
13
 
7
 
8
  class PUM {
9
 
10
+ const VER = '1.4.19';
11
 
12
  const DB_VER = 6;
13
 
includes/importer/easy-modal-v2.php CHANGED
@@ -216,7 +216,7 @@ function popmake_emodal_init() {
216
  add_filter( 'popmake_shortcode_popup_default_atts', 'popmake_emodal_shortcode_popup_default_atts', 10, 2 );
217
  add_filter( 'popmake_shortcode_data_attr', 'popmake_emodal_shortcode_data_attr', 10, 2 );
218
 
219
- add_filter( 'popmake_popup_is_loadable', 'popmake_emodal_popup_is_loadable', 20, 2 );
220
  }
221
  }
222
 
@@ -225,6 +225,9 @@ add_action( 'init', 'popmake_emodal_init' );
225
 
226
  function popmake_emodal_popup_is_loadable( $return, $popup_id ) {
227
  global $post;
 
 
 
228
  $easy_modal_id = get_post_meta( $popup_id, 'popup_old_easy_modal_id', true );
229
  $post_modals = get_post_meta( $post->ID, 'easy-modal_post_modals', true );
230
  if ( ! $easy_modal_id || empty( $post_modals ) || ! in_array( $easy_modal_id, $post_modals ) ) {
@@ -329,3 +332,5 @@ function popmake_emodal_shortcode_data_attr( $data, $attr ) {
329
 
330
  return $data;
331
  }
 
 
216
  add_filter( 'popmake_shortcode_popup_default_atts', 'popmake_emodal_shortcode_popup_default_atts', 10, 2 );
217
  add_filter( 'popmake_shortcode_data_attr', 'popmake_emodal_shortcode_data_attr', 10, 2 );
218
 
219
+ add_filter( 'pum_popup_is_loadable', 'popmake_emodal_popup_is_loadable', 20, 2 );
220
  }
221
  }
222
 
225
 
226
  function popmake_emodal_popup_is_loadable( $return, $popup_id ) {
227
  global $post;
228
+ if ( empty( $post ) || ! isset( $post->ID ) ) {
229
+ return $return;
230
+ }
231
  $easy_modal_id = get_post_meta( $popup_id, 'popup_old_easy_modal_id', true );
232
  $post_modals = get_post_meta( $post->ID, 'easy-modal_post_modals', true );
233
  if ( ! $easy_modal_id || empty( $post_modals ) || ! in_array( $easy_modal_id, $post_modals ) ) {
332
 
333
  return $data;
334
  }
335
+
336
+
includes/libs/freemius/assets/css/admin/account.css CHANGED
@@ -1 +1 @@
1
- #fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .button i.dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table var,.fs-key-value-table code{color:#0073AA;font-size:16px;background:none}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}
1
+ #fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .button i.dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}
includes/libs/freemius/assets/css/admin/common.css CHANGED
@@ -1 +1 @@
1
- .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;box-shadow:0px 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}
1
+ .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;box-shadow:0px 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}
includes/libs/freemius/assets/css/admin/deactivation-feedback.css CHANGED
@@ -1 +1 @@
1
- .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}.fs-modal .fs-modal-dialog li.reason{margin-bottom:10px}.fs-modal .fs-modal-dialog li.reason .reason-input{margin-left:29px}.fs-modal .fs-modal-dialog li.reason label{display:table}.fs-modal .fs-modal-dialog li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body h2{font-size:20px}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel:not(.active){display:none}.fs-modal .reason-input{margin:3px 0 3px 22px}.fs-modal .reason-input input,.fs-modal .reason-input textarea{width:100%}body.has-fs-modal{overflow:hidden}#the-list .deactivate>.fs-slug{display:none}
1
+ .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}.fs-modal .fs-modal-dialog li.reason{margin-bottom:10px}.fs-modal .fs-modal-dialog li.reason .reason-input,.fs-modal .fs-modal-dialog li.reason .internal-message{margin-left:29px}.fs-modal .fs-modal-dialog li.reason label{display:table}.fs-modal .fs-modal-dialog li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body h2{font-size:20px}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel:not(.active){display:none}.fs-modal .reason-input,.fs-modal .internal-message{margin:3px 0 3px 22px}.fs-modal .reason-input input,.fs-modal .reason-input textarea,.fs-modal .internal-message input,.fs-modal .internal-message textarea{width:100%}.fs-modal li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}body.has-fs-modal{overflow:hidden}#the-list .deactivate>.fs-slug{display:none}
includes/libs/freemius/assets/css/admin/dialog-boxes.css ADDED
@@ -0,0 +1,2 @@
 
 
1
+ .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-license-activation .fs-modal-body input.license_key{width:100%}.fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend .fs-modal-body input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{margin-top:2px}}
2
+ .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}
includes/libs/freemius/assets/css/admin/license-activation.css CHANGED
@@ -1 +1 @@
1
- .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body input.license_key{width:100%}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel:not(.active){display:none}body.has-fs-modal{overflow:hidden}
1
+ .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body .license-activation-message{margin:0;display:none}.fs-modal .fs-modal-body input.license_key{width:100%}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel:not(.active){display:none}body.has-fs-modal{overflow:hidden}
includes/libs/freemius/assets/img/icon.png DELETED
Binary file
includes/libs/freemius/assets/img/popup-maker.png DELETED
Binary file
includes/libs/freemius/assets/js/jquery.ba-postmessage.js DELETED
@@ -1,222 +0,0 @@
1
- /*!
2
- * jQuery postMessage - v0.5 - 9/11/2009
3
- * http://benalman.com/projects/jquery-postmessage-plugin/
4
- *
5
- * Copyright (c) 2009 "Cowboy" Ben Alman
6
- * Dual licensed under the MIT and GPL licenses.
7
- * http://benalman.com/about/license/
8
- */
9
-
10
- // Script: jQuery postMessage: Cross-domain scripting goodness
11
- //
12
- // *Version: 0.5, Last updated: 9/11/2009*
13
- //
14
- // Project Home - http://benalman.com/projects/jquery-postmessage-plugin/
15
- // GitHub - http://github.com/cowboy/jquery-postmessage/
16
- // Source - http://github.com/cowboy/jquery-postmessage/raw/master/jquery.ba-postmessage.js
17
- // (Minified) - http://github.com/cowboy/jquery-postmessage/raw/master/jquery.ba-postmessage.min.js (0.9kb)
18
- //
19
- // About: License
20
- //
21
- // Copyright (c) 2009 "Cowboy" Ben Alman,
22
- // Dual licensed under the MIT and GPL licenses.
23
- // http://benalman.com/about/license/
24
- //
25
- // About: Examples
26
- //
27
- // This working example, complete with fully commented code, illustrates one
28
- // way in which this plugin can be used.
29
- //
30
- // Iframe resizing - http://benalman.com/code/projects/jquery-postmessage/examples/iframe/
31
- //
32
- // About: Support and Testing
33
- //
34
- // Information about what version or versions of jQuery this plugin has been
35
- // tested with and what browsers it has been tested in.
36
- //
37
- // jQuery Versions - 1.3.2
38
- // Browsers Tested - Internet Explorer 6-8, Firefox 3, Safari 3-4, Chrome, Opera 9.
39
- //
40
- // About: Release History
41
- //
42
- // 0.5 - (9/11/2009) Improved cache-busting
43
- // 0.4 - (8/25/2009) Initial release
44
-
45
- (function($){
46
- '$:nomunge'; // Used by YUI compressor.
47
-
48
- // A few vars used in non-awesome browsers.
49
- var interval_id,
50
- last_hash,
51
- cache_bust = 1,
52
-
53
- // A var used in awesome browsers.
54
- rm_callback,
55
-
56
- // A few convenient shortcuts.
57
- window = this,
58
- FALSE = !1,
59
-
60
- // Reused internal strings.
61
- postMessage = 'postMessage',
62
- addEventListener = 'addEventListener',
63
-
64
- p_receiveMessage,
65
-
66
- // I couldn't get window.postMessage to actually work in Opera 9.64!
67
- has_postMessage = window[postMessage] && !$.browser.opera;
68
-
69
- // Method: jQuery.postMessage
70
- //
71
- // This method will call window.postMessage if available, setting the
72
- // targetOrigin parameter to the base of the target_url parameter for maximum
73
- // security in browsers that support it. If window.postMessage is not available,
74
- // the target window's location.hash will be used to pass the message. If an
75
- // object is passed as the message param, it will be serialized into a string
76
- // using the jQuery.param method.
77
- //
78
- // Usage:
79
- //
80
- // > jQuery.postMessage( message, target_url [, target ] );
81
- //
82
- // Arguments:
83
- //
84
- // message - (String) A message to be passed to the other frame.
85
- // message - (Object) An object to be serialized into a params string, using
86
- // the jQuery.param method.
87
- // target_url - (String) The URL of the other frame this window is
88
- // attempting to communicate with. This must be the exact URL (including
89
- // any query string) of the other window for this script to work in
90
- // browsers that don't support window.postMessage.
91
- // target - (Object) A reference to the other frame this window is
92
- // attempting to communicate with. If omitted, defaults to `parent`.
93
- //
94
- // Returns:
95
- //
96
- // Nothing.
97
-
98
- $[postMessage] = function( message, target_url, target ) {
99
- if ( !target_url ) { return; }
100
-
101
- // Serialize the message if not a string. Note that this is the only real
102
- // jQuery dependency for this script. If removed, this script could be
103
- // written as very basic JavaScript.
104
- message = typeof message === 'string' ? message : $.param( message );
105
-
106
- // Default to parent if unspecified.
107
- target = target || parent;
108
-
109
- if ( has_postMessage ) {
110
- // The browser supports window.postMessage, so call it with a targetOrigin
111
- // set appropriately, based on the target_url parameter.
112
- target[postMessage]( message, target_url.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
113
-
114
- } else if ( target_url ) {
115
- // The browser does not support window.postMessage, so set the location
116
- // of the target to target_url#message. A bit ugly, but it works! A cache
117
- // bust parameter is added to ensure that repeat messages trigger the
118
- // callback.
119
- target.location = target_url.replace( /#.*$/, '' ) + '#' + (+new Date) + (cache_bust++) + '&' + message;
120
- }
121
- };
122
-
123
- // Method: jQuery.receiveMessage
124
- //
125
- // Register a single callback for either a window.postMessage call, if
126
- // supported, or if unsupported, for any change in the current window
127
- // location.hash. If window.postMessage is supported and source_origin is
128
- // specified, the source window will be checked against this for maximum
129
- // security. If window.postMessage is unsupported, a polling loop will be
130
- // started to watch for changes to the location.hash.
131
- //
132
- // Note that for simplicity's sake, only a single callback can be registered
133
- // at one time. Passing no params will unbind this event (or stop the polling
134
- // loop), and calling this method a second time with another callback will
135
- // unbind the event (or stop the polling loop) first, before binding the new
136
- // callback.
137
- //
138
- // Also note that if window.postMessage is available, the optional
139
- // source_origin param will be used to test the event.origin property. From
140
- // the MDC window.postMessage docs: This string is the concatenation of the
141
- // protocol and "://", the host name if one exists, and ":" followed by a port
142
- // number if a port is present and differs from the default port for the given
143
- // protocol. Examples of typical origins are https://example.org (implying
144
- // port 443), http://example.net (implying port 80), and http://example.com:8080.
145
- //
146
- // Usage:
147
- //
148
- // > jQuery.receiveMessage( callback [, source_origin ] [, delay ] );
149
- //
150
- // Arguments:
151
- //
152
- // callback - (Function) This callback will execute whenever a <jQuery.postMessage>
153
- // message is received, provided the source_origin matches. If callback is
154
- // omitted, any existing receiveMessage event bind or polling loop will be
155
- // canceled.
156
- // source_origin - (String) If window.postMessage is available and this value
157
- // is not equal to the event.origin property, the callback will not be
158
- // called.
159
- // source_origin - (Function) If window.postMessage is available and this
160
- // function returns false when passed the event.origin property, the
161
- // callback will not be called.
162
- // delay - (Number) An optional zero-or-greater delay in milliseconds at
163
- // which the polling loop will execute (for browser that don't support
164
- // window.postMessage). If omitted, defaults to 100.
165
- //
166
- // Returns:
167
- //
168
- // Nothing!
169
-
170
- $.receiveMessage = p_receiveMessage = function( callback, source_origin, delay ) {
171
- if ( has_postMessage ) {
172
- // Since the browser supports window.postMessage, the callback will be
173
- // bound to the actual event associated with window.postMessage.
174
-
175
- if ( callback ) {
176
- // Unbind an existing callback if it exists.
177
- rm_callback && p_receiveMessage();
178
-
179
- // Bind the callback. A reference to the callback is stored for ease of
180
- // unbinding.
181
- rm_callback = function(e) {
182
- if ( ( typeof source_origin === 'string' && e.origin !== source_origin )
183
- || ( $.isFunction( source_origin ) && source_origin( e.origin ) === FALSE ) ) {
184
- return FALSE;
185
- }
186
- callback( e );
187
- };
188
- }
189
-
190
- if ( window[addEventListener] ) {
191
- window[ callback ? addEventListener : 'removeEventListener' ]( 'message', rm_callback, FALSE );
192
- } else {
193
- window[ callback ? 'attachEvent' : 'detachEvent' ]( 'onmessage', rm_callback );
194
- }
195
-
196
- } else {
197
- // Since the browser sucks, a polling loop will be started, and the
198
- // callback will be called whenever the location.hash changes.
199
-
200
- interval_id && clearInterval( interval_id );
201
- interval_id = null;
202
-
203
- if ( callback ) {
204
- delay = typeof source_origin === 'number'
205
- ? source_origin
206
- : typeof delay === 'number'
207
- ? delay
208
- : 100;
209
-
210
- interval_id = setInterval(function(){
211
- var hash = document.location.hash,
212
- re = /^#?\d+&/;
213
- if ( hash !== last_hash && re.test( hash ) ) {
214
- last_hash = hash;
215
- callback({ data: hash.replace( re, '' ) });
216
- }
217
- }, delay );
218
- }
219
- }
220
- };
221
-
222
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/libs/freemius/assets/js/jquery.ba-postmessage.min.js DELETED
@@ -1,9 +0,0 @@
1
- /*
2
- * jQuery postMessage - v0.5 - 9/11/2009
3
- * http://benalman.com/projects/jquery-postmessage-plugin/
4
- *
5
- * Copyright (c) 2009 "Cowboy" Ben Alman
6
- * Dual licensed under the MIT and GPL licenses.
7
- * http://benalman.com/about/license/
8
- */
9
- (function($){var g,d,j=1,a,b=this,f=!1,h="postMessage",e="addEventListener",c,i=b[h]&&!$.browser.opera;$[h]=function(k,l,m){if(!l){return}k=typeof k==="string"?k:$.param(k);m=m||parent;if(i){m[h](k,l.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))}else{if(l){m.location=l.replace(/#.*$/,"")+"#"+(+new Date)+(j++)+"&"+k}}};$.receiveMessage=c=function(l,m,k){if(i){if(l){a&&c();a=function(n){if((typeof m==="string"&&n.origin!==m)||($.isFunction(m)&&m(n.origin)===f)){return f}l(n)}}if(b[e]){b[l?e:"removeEventListener"]("message",a,f)}else{b[l?"attachEvent":"detachEvent"]("onmessage",a)}}else{g&&clearInterval(g);g=null;if(l){k=typeof m==="number"?m:typeof k==="number"?k:100;g=setInterval(function(){var o=document.location.hash,n=/^#?\d+&/;if(o!==d&&n.test(o)){d=o;l({data:o.replace(n,"")})}},k)}}}})(jQuery);
 
 
 
 
 
 
 
 
 
includes/libs/freemius/assets/js/postmessage.js CHANGED
@@ -24,10 +24,13 @@
24
  }
25
  }
26
  }, _base_url);
27
- };
 
 
 
28
 
29
  return {
30
- init : function (url)
31
  {
32
  _base_url = url;
33
  _init();
@@ -36,6 +39,16 @@
36
  FS.PostMessage.receiveOnce('forward', function (data){
37
  window.location = data.url;
38
  });
 
 
 
 
 
 
 
 
 
 
39
  },
40
  init_child : function ()
41
  {
@@ -46,8 +59,14 @@
46
  // Post height of a child right after window is loaded.
47
  $(window).bind('load', function () {
48
  FS.PostMessage.postHeight();
49
- });
50
 
 
 
 
 
 
 
 
51
  },
52
  postHeight : function (diff, wrapper) {
53
  diff = diff || 0;
@@ -56,6 +75,12 @@
56
  height: diff + $(wrapper).outerHeight(true)
57
  });
58
  },
 
 
 
 
 
 
59
  post : function (type, data, iframe)
60
  {
61
  console.debug('PostMessage.post', type);
24
  }
25
  }
26
  }, _base_url);
27
+ },
28
+ _hasParent = ('' !== _parent_url),
29
+ $window = $(window),
30
+ $html = $('html');
31
 
32
  return {
33
+ init : function (url, iframes)
34
  {
35
  _base_url = url;
36
  _init();
39
  FS.PostMessage.receiveOnce('forward', function (data){
40
  window.location = data.url;
41
  });
42
+
43
+ iframes = iframes || [];
44
+
45
+ if (iframes.length > 0) {
46
+ $window.on('scroll', function () {
47
+ for (var i = 0; i < iframes.length; i++) {
48
+ FS.PostMessage.postScroll(iframes[i]);
49
+ }
50
+ });
51
+ }
52
  },
53
  init_child : function ()
54
  {
59
  // Post height of a child right after window is loaded.
60
  $(window).bind('load', function () {
61
  FS.PostMessage.postHeight();
 
62
 
63
+ // Post message that window was loaded.
64
+ FS.PostMessage.post('loaded');
65
+ });
66
+ },
67
+ hasParent : function ()
68
+ {
69
+ return _hasParent;
70
  },
71
  postHeight : function (diff, wrapper) {
72
  diff = diff || 0;
75
  height: diff + $(wrapper).outerHeight(true)
76
  });
77
  },
78
+ postScroll : function (iframe) {
79
+ this.post('scroll', {
80
+ top: $window.scrollTop(),
81
+ height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
82
+ }, iframe);
83
+ },
84
  post : function (type, data, iframe)
85
  {
86
  console.debug('PostMessage.post', type);
includes/libs/freemius/assets/scss/_mixins.scss CHANGED
@@ -200,14 +200,6 @@ $useIEFilters: 0;
200
  filter: alpha(opacity=$opacity-ie); //IE8
201
  }
202
 
203
- @mixin sprite($img, $width, $height: $width, $display: block)
204
- {
205
- display: $display;
206
- background-image: url('#{$img}');
207
-
208
- @include size($width, $height);
209
- }
210
-
211
  @mixin size($width, $height: $width)
212
  {
213
  width: $width;
200
  filter: alpha(opacity=$opacity-ie); //IE8
201
  }
202
 
 
 
 
 
 
 
 
 
203
  @mixin size($width, $height: $width)
204
  {
205
  width: $width;
includes/libs/freemius/assets/scss/admin/_deactivation-feedback.scss ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../colors";
2
+
3
+ .fs-modal.fs-modal-deactivation-feedback {
4
+ .reason-input, .internal-message {
5
+ margin: 3px 0 3px 22px;
6
+
7
+ input, textarea {
8
+ width: 100%;
9
+ }
10
+ }
11
+
12
+ li.reason {
13
+ &.has-internal-message .internal-message {
14
+ border: 1px solid lighten($darkest-color, 80%);
15
+ padding: 7px;
16
+ display: none;
17
+ }
18
+
19
+ @media (max-width: 650px) {
20
+ li.reason {
21
+ margin-bottom: 10px;
22
+
23
+ .reason-input, .internal-message {
24
+ margin-left: 29px;
25
+ }
26
+
27
+ label {
28
+ display: table;
29
+
30
+ > span {
31
+ display: table-cell;
32
+ font-size: 1.3em;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ .anonymous-feedback-label {
40
+ float: left;
41
+ }
42
+
43
+ .fs-modal-panel {
44
+ margin-top: 0 !important;
45
+
46
+ h3 {
47
+ margin-top: 0;
48
+ line-height: 1.5em;
49
+ }
50
+ }
51
+ }
52
+
53
+ #the-list .deactivate > .fs-slug {
54
+ display: none;
55
+ }
includes/libs/freemius/assets/scss/admin/_license-activation.scss ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ .fs-modal.fs-modal-license-activation {
2
+ .fs-modal-body {
3
+ input.license_key {
4
+ width: 100%;
5
+ }
6
+ }
7
+ }
includes/libs/freemius/assets/scss/admin/_license-key-resend.scss ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .fs-modal.fs-modal-license-key-resend {
2
+ .fs-modal-body {
3
+ .input-container > .email-address-container {
4
+ overflow: hidden;
5
+ padding-right: 2px;
6
+ }
7
+
8
+ input.email-address {
9
+ width: 100%;
10
+ }
11
+
12
+ .button-container {
13
+ float: right;
14
+ margin-left: 7px;
15
+
16
+ @media (max-width: 650px) {
17
+ margin-top: 2px;
18
+ }
19
+ }
20
+ }
21
+ }
22
+
23
+ .rtl
24
+ {
25
+ .fs-modal.fs-modal-license-key-resend {
26
+ .fs-modal-body {
27
+ .input-container > .email-address-container {
28
+ padding-left: 2px;
29
+ padding-right: 0;
30
+ }
31
+
32
+ .button-container {
33
+ float: left;
34
+ margin-right: 7px;
35
+ margin-left: 0;
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ a.show-license-resend-modal {
42
+ margin-top: 4px;
43
+ display: inline-block;
44
+ }
includes/libs/freemius/assets/scss/admin/_modal-common.scss ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "../colors";
2
+ @import "../mixins";
3
+
4
+ .fs-modal {
5
+ position: fixed;
6
+ overflow: auto;
7
+ height: 100%;
8
+ width: 100%;
9
+ top: 0;
10
+ z-index: 100000;
11
+ display: none;
12
+ background: rgba(0, 0, 0, 0.6);
13
+
14
+ .fs-modal-dialog {
15
+ background: transparent;
16
+ position: absolute;
17
+ left: 50%;
18
+ margin-left: -298px;
19
+ padding-bottom: 30px;
20
+ top: -100%;
21
+ z-index: 100001;
22
+ width: 596px;
23
+
24
+ @media (max-width: 650px) {
25
+ margin-left: -50%;
26
+ box-sizing: border-box;
27
+ padding-left: 10px;
28
+ padding-right: 10px;
29
+ width: 100%;
30
+
31
+ .fs-modal-panel > h3 > strong {
32
+ font-size: 1.3em;
33
+ }
34
+ }
35
+ }
36
+
37
+ &.active {
38
+ display: block;
39
+
40
+ &:before {
41
+ display: block;
42
+ }
43
+
44
+ .fs-modal-dialog {
45
+ top: 10%;
46
+ }
47
+ }
48
+
49
+ .fs-modal-body,
50
+ .fs-modal-footer {
51
+ border: 0;
52
+ background: #fefefe;
53
+ padding: 20px;
54
+ }
55
+
56
+ .fs-modal-header {
57
+ border-bottom: #eeeeee solid 1px;
58
+ background: #fbfbfb;
59
+ padding: 15px 20px;
60
+ position: relative;
61
+ // z-index: 2;
62
+
63
+ h4 {
64
+ margin: 0;
65
+ padding: 0;
66
+ text-transform: uppercase;
67
+ font-size: 1.2em;
68
+ font-weight: bold;
69
+ color: #cacaca;
70
+ text-shadow: 1px 1px 1px #fff;
71
+ letter-spacing: 0.6px;
72
+ -webkit-font-smoothing: antialiased;
73
+ }
74
+
75
+ .fs-close {
76
+ position: absolute;
77
+ right: 10px;
78
+ top: 12px;
79
+ cursor: pointer;
80
+ color: #bbb;
81
+ @include border-radius(20px);
82
+ padding: 3px;
83
+ @include transition(all 0.2s ease-in-out);
84
+
85
+ &:hover {
86
+ color: #fff;
87
+ background: #aaa;
88
+ }
89
+ }
90
+ }
91
+
92
+ .fs-modal-body {
93
+ border-bottom: 0;
94
+
95
+ p {
96
+ font-size: 14px;
97
+ }
98
+
99
+ h2 {
100
+ font-size: 20px;
101
+ }
102
+
103
+ > div {
104
+ margin-top: 10px;
105
+
106
+ h2 {
107
+ font-weight: bold;
108
+ font-size: 20px;
109
+ margin-top: 0;
110
+ }
111
+ }
112
+ }
113
+
114
+ .fs-modal-footer {
115
+ border-top: #eeeeee solid 1px;
116
+ text-align: right;
117
+
118
+ > .button {
119
+ margin: 0 7px;
120
+
121
+ &:first-child {
122
+ margin: 0;
123
+ }
124
+ }
125
+ }
126
+
127
+ .fs-modal-panel {
128
+ > .notice.inline {
129
+ margin: 0;
130
+ display: none;
131
+ }
132
+
133
+ &:not(.active) {
134
+ display: none;
135
+ }
136
+ }
137
+ }
138
+
139
+ .rtl
140
+ {
141
+ .fs-modal {
142
+ .fs-modal-header {
143
+ .fs-close {
144
+ right: auto;
145
+ left: 20px;
146
+ }
147
+ }
148
+ }
149
+ }
150
+
151
+ body.has-fs-modal {
152
+ overflow: hidden;
153
+ }
includes/libs/freemius/assets/scss/admin/account.scss CHANGED
@@ -58,6 +58,10 @@
58
  }
59
  }
60
 
 
 
 
 
61
  .rtl #fs_account .fs-header-actions
62
  {
63
  left: 15px;
@@ -106,12 +110,21 @@
106
  padding: 10px;
107
  }
108
 
109
- var, code
 
 
 
 
110
  {
111
  color: #0073AA;
112
  font-size: 16px;
113
  background: none;
114
  }
 
 
 
 
 
115
  }
116
 
117
  label.fs-tag
58
  }
59
  }
60
 
61
+ #fs_account_details .button-group {
62
+ float: right;
63
+ }
64
+
65
  .rtl #fs_account .fs-header-actions
66
  {
67
  left: 15px;
110
  padding: 10px;
111
  }
112
 
113
+ code {
114
+ line-height: 28px;
115
+ }
116
+
117
+ var, code, input[type="text"]
118
  {
119
  color: #0073AA;
120
  font-size: 16px;
121
  background: none;
122
  }
123
+
124
+ input[type="text"] {
125
+ width: 100%;
126
+ font-weight: bold;
127
+ }
128
  }
129
 
130
  label.fs-tag
includes/libs/freemius/assets/scss/admin/common.scss CHANGED
@@ -108,6 +108,12 @@
108
  }
109
  }
110
 
 
 
 
 
 
 
111
  @media screen and (max-width: 782px) {
112
  .fs-secure-notice
113
  {
108
  }
109
  }
110
 
111
+ @media screen and (max-width:500px) {
112
+ #fs_promo_tab {
113
+ display: none;
114
+ }
115
+ }
116
+
117
  @media screen and (max-width: 782px) {
118
  .fs-secure-notice
119
  {
includes/libs/freemius/assets/scss/admin/deactivation-feedback.scss DELETED
@@ -1,120 +0,0 @@
1
- .fs-modal {
2
- position: fixed;
3
- overflow: auto;
4
- height: 100%;
5
- width: 100%;
6
- top: 0;
7
- z-index: 100000;
8
- display: none;
9
- background: rgba(0, 0, 0, 0.6);
10
-
11
- .fs-modal-dialog {
12
- background: transparent;
13
- position: absolute;
14
- left: 50%;
15
- margin-left: -298px;
16
- padding-bottom: 30px;
17
- top: -100%;
18
- z-index: 100001;
19
- width: 596px;
20
-
21
- @media (max-width: 650px) {
22
- margin-left: -50%;
23
- box-sizing: border-box;
24
- padding-left: 10px;
25
- padding-right: 10px;
26
- width: 100%;
27
-
28
- .fs-modal-panel > h3 > strong {
29
- font-size: 1.3em;
30
- }
31
-
32
- li.reason {
33
- margin-bottom: 10px;
34
-
35
- .reason-input {
36
- margin-left: 29px;
37
- }
38
-
39
- label {
40
- display: table;
41
-
42
- > span {
43
- display: table-cell;
44
- font-size: 1.3em;
45
- }
46
- }
47
- }
48
- }
49
- }
50
-
51
- &.active {
52
- display: block;
53
-
54
- &:before {
55
- display: block;
56
- }
57
-
58
- .fs-modal-dialog {
59
- top: 10%;
60
- }
61
- }
62
-
63
- .fs-modal-body,
64
- .fs-modal-footer {
65
- border: 0;
66
- background: #fefefe;
67
- padding: 20px;
68
- }
69
-
70
- .fs-modal-body {
71
- border-bottom: 0;
72
-
73
- h2 {
74
- font-size: 20px;
75
- }
76
-
77
- > div {
78
- margin-top: 10px;
79
-
80
- h2 {
81
- font-weight: bold;
82
- font-size: 20px;
83
- margin-top: 0;
84
- }
85
- }
86
- }
87
-
88
- .fs-modal-footer {
89
- border-top: #eeeeee solid 1px;
90
- text-align: right;
91
-
92
- > .button {
93
- margin: 0 7px;
94
-
95
- &:first-child {
96
- margin: 0;
97
- }
98
- }
99
- }
100
-
101
- .fs-modal-panel:not(.active) {
102
- display: none;
103
- }
104
-
105
- .reason-input {
106
- margin: 3px 0 3px 22px;
107
-
108
- input, textarea {
109
- width: 100%;
110
- }
111
- }
112
- }
113
-
114
- body.has-fs-modal {
115
- overflow: hidden;
116
- }
117
-
118
- #the-list .deactivate > .fs-slug {
119
- display: none;
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/libs/freemius/assets/scss/admin/dialog-boxes.scss ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ @import "../start";
2
+ @import "modal-common";
3
+ @import "deactivation-feedback";
4
+ @import "license-activation";
5
+ @import "license-key-resend";
includes/libs/freemius/assets/scss/admin/license-activation.scss DELETED
@@ -1,99 +0,0 @@
1
- .fs-modal {
2
- position: fixed;
3
- overflow: auto;
4
- height: 100%;
5
- width: 100%;
6
- top: 0;
7
- z-index: 100000;
8
- display: none;
9
- background: rgba(0, 0, 0, 0.6);
10
-
11
- .fs-modal-dialog {
12
- background: transparent;
13
- position: absolute;
14
- left: 50%;
15
- margin-left: -298px;
16
- padding-bottom: 30px;
17
- top: -100%;
18
- z-index: 100001;
19
- width: 596px;
20
-
21
- @media (max-width: 650px) {
22
- margin-left: -50%;
23
- box-sizing: border-box;
24
- padding-left: 10px;
25
- padding-right: 10px;
26
- width: 100%;
27
-
28
- .fs-modal-panel > h3 > strong {
29
- font-size: 1.3em;
30
- }
31
- }
32
- }
33
-
34
- &.active {
35
- display: block;
36
-
37
- &:before {
38
- display: block;
39
- }
40
-
41
- .fs-modal-dialog {
42
- top: 10%;
43
- }
44
- }
45
-
46
- .fs-modal-body,
47
- .fs-modal-footer {
48
- border: 0;
49
- background: #fefefe;
50
- padding: 20px;
51
- }
52
-
53
- .fs-modal-body {
54
- border-bottom: 0;
55
-
56
- input.license_key {
57
- width: 100%;
58
- }
59
-
60
- p {
61
- font-size: 14px;
62
- }
63
-
64
- h2 {
65
- font-size: 20px;
66
- }
67
-
68
- > div {
69
- margin-top: 10px;
70
-
71
- h2 {
72
- font-weight: bold;
73
- font-size: 20px;
74
- margin-top: 0;
75
- }
76
- }
77
- }
78
-
79
- .fs-modal-footer {
80
- border-top: #eeeeee solid 1px;
81
- text-align: right;
82
-
83
- > .button {
84
- margin: 0 7px;
85
-
86
- &:first-child {
87
- margin: 0;
88
- }
89
- }
90
- }
91
-
92
- .fs-modal-panel:not(.active) {
93
- display: none;
94
- }
95
- }
96
-
97
- body.has-fs-modal {
98
- overflow: hidden;
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/libs/freemius/config.php CHANGED
@@ -139,8 +139,8 @@
139
  } else {
140
  define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
141
  is_string( WP_FS__REMOTE_ADDR ) &&
142
- ( substr( WP_FS__REMOTE_ADDR, 0, 4 ) == '127.' ||
143
- WP_FS__REMOTE_ADDR == '::1' )
144
  );
145
  }
146
 
@@ -164,7 +164,7 @@
164
  define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
165
 
166
  define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
167
- // Checks if CloudFlare's HTTPS (Flexible SSL support)
168
  isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) ||
169
  // Check if HTTPS request.
170
  ( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
139
  } else {
140
  define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
141
  is_string( WP_FS__REMOTE_ADDR ) &&
142
+ ( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
143
+ WP_FS__REMOTE_ADDR === '::1' )
144
  );
145
  }
146
 
164
  define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
165
 
166
  define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
167
+ // Checks if CloudFlare's HTTPS (Flexible SSL support).
168
  isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) ||
169
  // Check if HTTPS request.
170
  ( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
includes/libs/freemius/gulpfile.js ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var gulp = require('gulp');
2
+ var wpPot = require('gulp-wp-pot');
3
+ var gettext = require('gulp-gettext');
4
+ var sort = require('gulp-sort');
5
+ var pofill = require('gulp-pofill');
6
+ var rename = require('gulp-rename');
7
+
8
+ gulp.task('default', function () {
9
+ // Create POT out of i18n.php.
10
+ gulp.src('includes/i18n.php')
11
+ .pipe(sort())
12
+ .pipe(wpPot( {
13
+ destFile:'freemius.pot',
14
+ package: 'freemius',
15
+ bugReport: 'https://github.com/Freemius/wordpress-sdk/issues',
16
+ lastTranslator: 'Vova Feldman <vova@freemius.com>',
17
+ team: 'Freemius Team <admin@freemius.com>'
18
+ } ))
19
+ .pipe(gulp.dest('languages/'));
20
+
21
+ // Create English PO out of the POT.
22
+ gulp.src('languages/freemius.pot')
23
+ .pipe(pofill({
24
+ items: function(item) {
25
+ // If msgstr is empty, use identity translation
26
+ if (!item.msgstr.length) {
27
+ item.msgstr = [''];
28
+ }
29
+ if (!item.msgstr[0]) {
30
+ item.msgstr[0] = item.msgid;
31
+ }
32
+ return item;
33
+ }
34
+ }))
35
+ .pipe(rename('freemius-en.po'))
36
+ .pipe(gulp.dest('languages/'));
37
+
38
+ // Compile POs to MOs.
39
+ gulp.src('languages/*.po')
40
+ .pipe(gettext())
41
+ .pipe(gulp.dest('languages/'))
42
+ });
includes/libs/freemius/includes/class-freemius-abstract.php CHANGED
@@ -340,8 +340,7 @@
340
  * @return bool
341
  */
342
  function is_freemium() {
343
- return ! $this->is_only_premium() &&
344
- $this->has_paid_plan() &&
345
  $this->has_free_plan();
346
  }
347
 
340
  * @return bool
341
  */
342
  function is_freemium() {
343
+ return $this->has_paid_plan() &&
 
344
  $this->has_free_plan();
345
  }
346
 
includes/libs/freemius/includes/class-freemius.php CHANGED
@@ -227,18 +227,43 @@
227
  */
228
  private static $_instances = array();
229
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
 
231
  /* Ctor
232
  ------------------------------------------------------------------------------------------------------------------*/
233
 
234
- private function __construct( $slug ) {
 
 
 
 
 
 
 
 
 
235
  $this->_slug = $slug;
236
 
237
  $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $slug, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
238
 
239
  $this->_storage = FS_Key_Value_Storage::instance( 'plugin_data', $this->_slug );
240
 
241
- $this->_plugin_main_file_path = $this->_find_caller_plugin_file();
242
  $this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
243
  $this->_plugin_basename = plugin_basename( $this->_plugin_main_file_path );
244
  $this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
@@ -444,9 +469,6 @@
444
  }
445
  }
446
 
447
- // Hook to plugin uninstall.
448
- register_uninstall_hook( $this->_plugin_main_file_path, array( 'Freemius', '_uninstall_plugin_hook' ) );
449
-
450
  if ( ! $this->is_ajax() ) {
451
  if ( ! $this->is_addon() ) {
452
  add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
@@ -464,6 +486,41 @@
464
  $this->add_action( 'sdk_version_update', array( &$this, '_data_migration' ), WP_FS__DEFAULT_PRIORITY, 2 );
465
  }
466
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
467
  /**
468
  * @author Vova Feldman (@svovaf)
469
  * @since 1.0.9
@@ -488,13 +545,22 @@
488
  // If user is paying or in trial and have the free version installed,
489
  // assume that the deactivation is for the upgrade process.
490
  if ( ! $this->is_paying_or_trial() || $this->is_premium() ) {
491
- add_action( 'wp_ajax_submit-uninstall-reason', array( &$this, '_submit_uninstall_reason_action' ) );
 
 
 
492
 
493
  global $pagenow;
494
  if ( 'plugins.php' === $pagenow ) {
495
  add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
496
  }
497
  }
 
 
 
 
 
 
498
  }
499
  }
500
 
@@ -504,11 +570,13 @@
504
  * @author Vova Feldman (@svovaf)
505
  * @since 1.0.6
506
  *
 
 
507
  * @return string
508
  *
509
  * @uses fs_find_caller_plugin_file
510
  */
511
- private function _find_caller_plugin_file() {
512
  // Try to load the cached value of the file path.
513
  if ( isset( $this->_storage->plugin_main_file ) ) {
514
  if ( file_exists( $this->_storage->plugin_main_file->path ) ) {
@@ -516,6 +584,39 @@
516
  }
517
  }
518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  $plugin_file = fs_find_caller_plugin_file();
520
 
521
  $this->_storage->plugin_main_file = (object) array(
@@ -537,8 +638,6 @@
537
  * @since 1.1.2
538
  */
539
  function _add_deactivation_feedback_dialog_box() {
540
- fs_enqueue_local_style( 'fs_deactivation_feedback', '/admin/deactivation-feedback.css' );
541
-
542
  /* Check the type of user:
543
  * 1. Long-term (long-term)
544
  * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
@@ -582,7 +681,7 @@
582
  /**
583
  * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
584
  */
585
- fs_require_template( 'deactivation-feedback-modal.php', $vars );
586
  }
587
 
588
  /**
@@ -594,22 +693,32 @@
594
  * @return array The uninstall reasons for the specified user type.
595
  */
596
  function _get_uninstall_reasons( $user_type = 'long-term' ) {
 
 
 
 
 
 
 
 
 
 
597
  $reason_found_better_plugin = array(
598
- 'id' => 2,
599
  'text' => __fs( 'reason-found-a-better-plugin', $this->_slug ),
600
  'input_type' => 'textfield',
601
  'input_placeholder' => __fs( 'placeholder-plugin-name', $this->_slug )
602
  );
603
 
604
  $reason_temporary_deactivation = array(
605
- 'id' => 15,
606
  'text' => __fs( 'reason-temporary-deactivation', $this->_slug ),
607
  'input_type' => '',
608
  'input_placeholder' => ''
609
  );
610
 
611
  $reason_other = array(
612
- 'id' => 7,
613
  'text' => __fs( 'reason-other', $this->_slug ),
614
  'input_type' => 'textfield',
615
  'input_placeholder' => ''
@@ -617,100 +726,116 @@
617
 
618
  $long_term_user_reasons = array(
619
  array(
620
- 'id' => 1,
621
  'text' => __fs( 'reason-no-longer-needed', $this->_slug ),
622
  'input_type' => '',
623
  'input_placeholder' => ''
624
  ),
625
  $reason_found_better_plugin,
626
  array(
627
- 'id' => 3,
628
  'text' => __fs( 'reason-needed-for-a-short-period', $this->_slug ),
629
  'input_type' => '',
630
  'input_placeholder' => ''
631
  ),
632
  array(
633
- 'id' => 4,
634
  'text' => __fs( 'reason-broke-my-site', $this->_slug ),
635
  'input_type' => '',
636
- 'input_placeholder' => ''
 
637
  ),
638
  array(
639
- 'id' => 5,
640
  'text' => __fs( 'reason-suddenly-stopped-working', $this->_slug ),
641
  'input_type' => '',
642
- 'input_placeholder' => ''
 
643
  )
644
  );
645
 
646
  if ( $this->is_paying() ) {
647
  $long_term_user_reasons[] = array(
648
- 'id' => 6,
649
  'text' => __fs( 'reason-cant-pay-anymore', $this->_slug ),
650
  'input_type' => 'textfield',
651
  'input_placeholder' => __fs( 'placeholder-comfortable-price', $this->_slug )
652
  );
653
  }
654
 
655
- $long_term_user_reasons[] = $reason_temporary_deactivation;
656
- $long_term_user_reasons[] = $reason_other;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
657
 
658
  $uninstall_reasons = array(
659
  'long-term' => $long_term_user_reasons,
660
  'non-registered-and-non-anonymous-short-term' => array(
661
  array(
662
- 'id' => 8,
663
  'text' => __fs( 'reason-didnt-work', $this->_slug ),
664
  'input_type' => '',
665
  'input_placeholder' => ''
666
  ),
667
- array(
668
- 'id' => 9,
669
- 'text' => __fs( 'reason-dont-like-to-share-my-information', $this->_slug ),
670
- 'input_type' => '',
671
- 'input_placeholder' => ''
672
- ),
673
- $reason_found_better_plugin,
674
- $reason_temporary_deactivation,
675
- $reason_other
676
  ),
677
  'short-term' => array(
678
  array(
679
- 'id' => 10,
680
  'text' => __fs( 'reason-couldnt-make-it-work', $this->_slug ),
681
  'input_type' => '',
682
- 'input_placeholder' => ''
 
683
  ),
684
  $reason_found_better_plugin,
685
  array(
686
- 'id' => 11,
687
  'text' => __fs( 'reason-great-but-need-specific-feature', $this->_slug ),
688
  'input_type' => 'textarea',
689
  'input_placeholder' => __fs( 'placeholder-feature', $this->_slug )
690
  ),
691
  array(
692
- 'id' => 12,
693
  'text' => __fs( 'reason-not-working', $this->_slug ),
694
  'input_type' => 'textarea',
695
  'input_placeholder' => __fs( 'placeholder-share-what-didnt-work', $this->_slug )
696
  ),
697
  array(
698
- 'id' => 13,
699
  'text' => __fs( 'reason-not-what-i-was-looking-for', $this->_slug ),
700
  'input_type' => 'textarea',
701
  'input_placeholder' => __fs( 'placeholder-what-youve-been-looking-for', $this->_slug )
702
  ),
703
  array(
704
- 'id' => 14,
705
  'text' => __fs( 'reason-didnt-work-as-expected', $this->_slug ),
706
  'input_type' => 'textarea',
707
  'input_placeholder' => __fs( 'placeholder-what-did-you-expect', $this->_slug )
708
- ),
709
- $reason_temporary_deactivation,
710
- $reason_other
711
  )
712
  );
713
 
 
 
 
 
 
 
 
714
  $uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
715
 
716
  return $uninstall_reasons[ $user_type ];
@@ -723,15 +848,22 @@
723
  * @since 1.1.2
724
  */
725
  function _submit_uninstall_reason_action() {
726
- if ( ! isset( $_POST['reason_id'] ) ) {
 
 
 
727
  exit;
728
  }
729
 
730
- $reason_info = isset( $_REQUEST['reason_info'] ) ? trim( stripslashes( $_REQUEST['reason_info'] ) ) : '';
 
 
 
731
 
732
  $reason = (object) array(
733
- 'id' => $_POST['reason_id'],
734
- 'info' => substr( $reason_info, 0, 128 )
 
735
  );
736
 
737
  $this->_storage->store( 'uninstall_reason', $reason );
@@ -751,11 +883,12 @@
751
  * @author Vova Feldman (@svovaf)
752
  * @since 1.0.0
753
  *
754
- * @param $slug
 
755
  *
756
  * @return Freemius
757
  */
758
- static function instance( $slug ) {
759
  $slug = strtolower( $slug );
760
 
761
  if ( ! isset( self::$_instances[ $slug ] ) ) {
@@ -763,7 +896,7 @@
763
  self::_load_required_static();
764
  }
765
 
766
- self::$_instances[ $slug ] = new Freemius( $slug );
767
  }
768
 
769
  return self::$_instances[ $slug ];
@@ -1026,9 +1159,33 @@
1026
 
1027
  add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
1028
 
 
 
1029
  self::$_statics_loaded = true;
1030
  }
1031
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1032
  #region Debugging ------------------------------------------------------------------
1033
 
1034
  /**
@@ -1108,6 +1265,7 @@
1108
  $users = self::get_all_users();
1109
  $addons = self::get_all_addons();
1110
  $account_addons = self::get_all_account_addons();
 
1111
 
1112
  // $plans = self::get_all_plans();
1113
  // $licenses = self::get_all_licenses();
@@ -1117,6 +1275,7 @@
1117
  'users' => $users,
1118
  'addons' => $addons,
1119
  'account_addons' => $account_addons,
 
1120
  );
1121
 
1122
  fs_enqueue_local_style( 'fs_account', '/admin/debug.css' );
@@ -1805,7 +1964,7 @@
1805
 
1806
  $active_plugin = self::get_active_plugins();
1807
 
1808
- // Generate the list of active plugins separated by new line.
1809
  $active_plugin_string = '';
1810
  foreach ( $active_plugin as $plugin ) {
1811
  $active_plugin_string .= sprintf(
@@ -1931,12 +2090,12 @@
1931
  // If anonymous mode is disabled, add firewall admin-notice message.
1932
  add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
1933
 
1934
- add_action( "wp_ajax_{$this->_slug}_resolve_firewall_issues", array(
1935
  &$this,
1936
  '_email_about_firewall_issue'
1937
  ) );
1938
 
1939
- add_action( "wp_ajax_{$this->_slug}_retry_connectivity_test", array(
1940
  &$this,
1941
  '_retry_connectivity_test'
1942
  ) );
@@ -1964,34 +2123,32 @@
1964
  }
1965
  }
1966
 
1967
- if ( $this->has_api_connectivity() && $this->is_user_in_admin() ) {
1968
- /**
1969
- * Schedule daily data sync cron if:
1970
- *
1971
- * 1. User opted-in (for tracking).
1972
- * 2. If plugin has add-ons (update add-ons data).
1973
- * 3. If skipped, but later upgraded (opted-in via upgrade).
1974
- *
1975
- * @author Vova Feldman (@svovaf)
1976
- * @since 1.1.7.3
1977
- *
1978
- */
1979
- if ( $this->is_registered() ||
1980
- ( ! $this->is_activation_mode() && $this->_has_addons )
1981
- ) {
1982
-
1983
  $this->hook_callback_to_sync_cron();
1984
-
1985
- if ( ! $this->is_sync_cron_on() ) {
1986
- $this->schedule_sync_cron();
 
 
 
 
 
 
 
 
 
 
 
 
1987
  }
1988
- }
1989
 
1990
- /**
1991
- * Check if requested for manual blocking background sync.
1992
- */
1993
- if ( fs_request_has( 'background_sync' ) ) {
1994
- $this->run_manual_sync();
 
1995
  }
1996
  }
1997
 
@@ -2077,23 +2234,25 @@
2077
 
2078
  $this->do_action( 'initiated' );
2079
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2080
  if ( ! $this->is_addon() ) {
2081
  if ( $this->is_registered() ) {
2082
  // Fix for upgrade from versions < 1.0.9.
2083
  if ( ! isset( $this->_storage->activation_timestamp ) ) {
2084
  $this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME;
2085
  }
2086
- if ( $this->_storage->prev_is_premium !== $this->_plugin->is_premium ) {
2087
- if ( isset( $this->_storage->prev_is_premium ) ) {
2088
- add_action( is_admin() ? 'admin_init' : 'init', array(
2089
- &$this,
2090
- '_plugin_code_type_changed'
2091
- ) );
2092
- } else {
2093
- // Set for code type for the first time.
2094
- $this->_storage->prev_is_premium = $this->_plugin->is_premium;
2095
- }
2096
- }
2097
 
2098
  $this->do_action( 'after_init_plugin_registered' );
2099
  } else if ( $this->is_anonymous() ) {
@@ -2113,14 +2272,23 @@
2113
 
2114
  // Add license activation link and AJAX request handler.
2115
  if ( $this->has_paid_plan() ) {
2116
- $this->_add_license_action_link();
2117
-
2118
  global $pagenow;
2119
  if ( 'plugins.php' === $pagenow ) {
2120
- add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) );
 
 
 
 
2121
  }
2122
 
2123
- add_action( 'wp_ajax_activate-license', array( &$this, '_activate_license_ajax_action' ) );
 
 
 
 
 
 
 
2124
  }
2125
  }
2126
 
@@ -2311,6 +2479,21 @@
2311
  return false;
2312
  }
2313
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2314
  /**
2315
  * Handles plugin's code type change (free <--> premium).
2316
  *
@@ -2318,6 +2501,8 @@
2318
  * @since 1.0.9
2319
  */
2320
  function _plugin_code_type_changed() {
 
 
2321
  // Schedule code type changes event.
2322
  // $this->sync_install();
2323
  $this->schedule_install_sync();
@@ -2339,6 +2524,9 @@
2339
  __fs( 'woot', $this->_slug ) . '!'
2340
  );
2341
  } else {
 
 
 
2342
  // Activated free code (after had the premium before).
2343
  $this->do_action( 'after_free_version_reactivation' );
2344
 
@@ -2347,16 +2535,26 @@
2347
  sprintf(
2348
  __fs( 'you-have-x-license', $this->_slug ),
2349
  $this->_site->plan->title
2350
- ) . ' ' . $this->_get_latest_download_link( sprintf(
2351
- __fs( 'download-x-version-now', $this->_slug ),
2352
- $this->_site->plan->title
2353
- ) ),
2354
  'plan_upgraded',
2355
  __fs( 'yee-haw', $this->_slug ) . '!'
2356
  );
2357
  }
2358
  }
2359
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2360
  // Update is_premium of latest version.
2361
  $this->_storage->prev_is_premium = $this->_plugin->is_premium;
2362
  }
@@ -2736,11 +2934,6 @@
2736
  }
2737
  }
2738
 
2739
- if ( ! $this->is_addon() && $this->_has_addons ) {
2740
- // Sync add-ons collection.
2741
- $this->_sync_addons( true );
2742
- }
2743
-
2744
  $this->do_action( 'after_sync_cron' );
2745
  }
2746
 
@@ -3304,6 +3497,8 @@
3304
  return;
3305
  }
3306
 
 
 
3307
  // Clear API cache on activation.
3308
  FS_Api::clear_cache();
3309
 
@@ -3447,6 +3642,10 @@
3447
  $this->_storage->is_plugin_new_install = false;
3448
  }
3449
 
 
 
 
 
3450
  $this->clear_sync_cron();
3451
  $this->clear_install_sync_cron();
3452
 
@@ -3734,7 +3933,8 @@
3734
  }
3735
 
3736
  // Get active theme.
3737
- $active_theme = wp_get_theme();
 
3738
 
3739
  // Check if there's a change in themes.
3740
  $all_themes = wp_get_themes();
@@ -3744,7 +3944,7 @@
3744
 
3745
  $themes_signature = '';
3746
  foreach ( $all_themes as $slug => $data ) {
3747
- $is_active = ( $slug === $active_theme->stylesheet );
3748
  $themes_signature .= $slug . ',' .
3749
  $data->version . ',' .
3750
  ( $is_active ? '1' : '0' ) . ';';
@@ -3760,7 +3960,7 @@
3760
 
3761
  // Update existing themes info.
3762
  foreach ( $all_cached_themes->themes as $slug => $data ) {
3763
- $is_active = ( $slug === $active_theme->stylesheet );
3764
 
3765
  if ( ! isset( $all_themes[ $slug ] ) ) {
3766
  // Plugin uninstalled.
@@ -3786,7 +3986,7 @@
3786
  // Find new themes that weren't yet seen before.
3787
  foreach ( $all_themes as $slug => $data ) {
3788
  if ( ! isset( $all_cached_themes->themes[ $slug ] ) ) {
3789
- $is_active = ( $slug === $active_theme->stylesheet );
3790
 
3791
  // New plugin.
3792
  $new_plugin = array(
@@ -3966,6 +4166,94 @@
3966
  $this->_store_site( true );
3967
  }
3968
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3969
  /**
3970
  * Plugin uninstall hook.
3971
  *
@@ -3981,16 +4269,22 @@
3981
  return;
3982
  }
3983
 
3984
- $params = array();
 
3985
  if ( isset( $this->_storage->uninstall_reason ) ) {
3986
- $params['reason_id'] = $this->_storage->uninstall_reason->id;
3987
- $params['reason_info'] = $this->_storage->uninstall_reason->info;
 
3988
  }
3989
 
3990
- if ( ! $this->is_registered() && isset( $this->_storage->uninstall_reason ) ) {
3991
  // Send anonymous uninstall event only if user submitted a feedback.
3992
- $params['uid'] = $this->get_anonymous_id();
3993
- $this->get_api_plugin_scope()->call( 'uninstall.json', 'put', $params );
 
 
 
 
3994
  } else {
3995
  // Send uninstall event.
3996
  $this->send_install_update( array_merge( $params, array(
@@ -4091,9 +4385,9 @@
4091
 
4092
  /**
4093
  * @author Vova Feldman (@svovaf)
4094
- * @since 1.2.0 When using get_plugin_data() do NOT translate plugin data.
4095
  *
4096
- * @link https://github.com/Freemius/wordpress-sdk/issues/77
4097
  */
4098
  $this->_plugin_data = get_plugin_data(
4099
  $this->_plugin_main_file_path,
@@ -4431,34 +4725,15 @@
4431
  function get_addons() {
4432
  $this->_logger->entrance();
4433
 
4434
- $all_addons = self::get_all_addons();
4435
-
4436
- /**
4437
- * @since 1.1.7.3 If not yet loaded, fetch data from the API.
4438
- */
4439
- if ( ! is_array( $all_addons ) ||
4440
- ! isset( $all_addons[ $this->_plugin->id ] ) ||
4441
- ! is_array( $all_addons[ $this->_plugin->id ] ) ||
4442
- empty( $all_addons[ $this->_plugin->id ] )
4443
- ) {
4444
- if ( $this->_has_addons ) {
4445
- $addons = $this->_sync_addons();
4446
-
4447
- if ( ! empty( $addons ) ) {
4448
- $all_addons = self::get_all_addons();
4449
- }
4450
- }
4451
- }
4452
-
4453
- if ( ! is_array( $all_addons ) ||
4454
- ! isset( $all_addons[ $this->_plugin->id ] ) ||
4455
- ! is_array( $all_addons[ $this->_plugin->id ] ) ||
4456
- empty( $all_addons[ $this->_plugin->id ] )
4457
- ) {
4458
  return false;
4459
  }
4460
 
4461
- return $all_addons[ $this->_plugin->id ];
 
 
 
 
4462
  }
4463
 
4464
  /**
@@ -4541,7 +4816,7 @@
4541
 
4542
  if ( is_array( $addons ) ) {
4543
  foreach ( $addons as $addon ) {
4544
- if ( $slug == $addon->slug ) {
4545
  return $addon;
4546
  }
4547
  }
@@ -4629,7 +4904,7 @@
4629
  return false;
4630
  }
4631
 
4632
- return $this->has_active_license() && ( $this->_site->trial_plan_id == $this->_license->plan_id );
4633
  }
4634
 
4635
  /**
@@ -4668,7 +4943,7 @@
4668
  }
4669
 
4670
  /**
4671
- * Check if the user has an activated and valid paid license on current plugin's install.
4672
  *
4673
  * @since 1.0.9
4674
  *
@@ -4688,7 +4963,7 @@
4688
  return (
4689
  ! $this->is_trial() &&
4690
  'free' !== $this->_site->plan->name &&
4691
- $this->has_features_enabled_license()
4692
  );
4693
  }
4694
 
@@ -4837,10 +5112,12 @@
4837
  * @author Vova Feldman (@svovaf)
4838
  * @since 1.0.6
4839
  *
 
 
4840
  * @return FS_Plugin_License[]|object
4841
  */
4842
- function _sync_licenses() {
4843
- $licenses = $this->_fetch_licenses();
4844
  if ( ! $this->is_api_error( $licenses ) ) {
4845
  $this->_licenses = $licenses;
4846
  $this->_store_licenses();
@@ -4869,7 +5146,7 @@
4869
  return false;
4870
  }
4871
 
4872
- if ( ! is_array( $this->_licenses ) || 0 === count( $this->_licenses ) ) {
4873
  $this->_sync_licenses();
4874
  }
4875
 
@@ -5071,7 +5348,8 @@
5071
  * @return bool
5072
  */
5073
  function has_paid_plan() {
5074
- return $this->_has_paid_plans || FS_Plan_Manager::instance()->has_paid_plan( $this->_plans );
 
5075
  }
5076
 
5077
  /**
@@ -5101,7 +5379,9 @@
5101
  * @return bool
5102
  */
5103
  function has_free_plan() {
5104
- return ! $this->is_only_premium() && FS_Plan_Manager::instance()->has_free_plan( $this->_plans );
 
 
5105
  }
5106
 
5107
  /**
@@ -5113,13 +5393,38 @@
5113
  * @since 1.1.9
5114
  */
5115
  function _add_license_activation_dialog_box() {
5116
- fs_enqueue_local_style( 'fs_license_action', '/admin/license-activation.css' );
5117
-
5118
  $vars = array(
5119
- 'slug' => $this->_slug
5120
  );
5121
 
5122
- fs_require_template( 'license-activation-modal.php', $vars );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5123
  }
5124
 
5125
  /**
@@ -5127,52 +5432,118 @@
5127
  * @since 1.1.9
5128
  */
5129
  function _activate_license_ajax_action() {
5130
- if ( ! isset( $_POST['license-key'] ) ) {
5131
- exit;
5132
- }
5133
 
5134
- $license_key = trim( $_POST['license-key'] );
5135
  if ( empty( $license_key ) ) {
5136
  exit;
5137
  }
5138
 
 
 
 
 
5139
  if ( $this->is_registered() ) {
5140
- $api = $this->get_api_site_scope();
5141
- $api->call( '/', 'put',
5142
  array(
5143
  'license_key' => $license_key
5144
  )
5145
  );
 
 
 
 
5146
  } else {
5147
- $this->opt_in( false, false, false, $license_key );
 
 
 
 
5148
  }
5149
 
5150
- // Print '1' for successful operation.
5151
- echo 1;
5152
- exit;
5153
- }
5154
 
5155
- #region URL Generators
 
 
5156
 
5157
- /**
5158
- * Alias to pricing_url().
5159
- *
5160
- * @author Vova Feldman (@svovaf)
5161
- * @since 1.0.2
5162
- *
5163
- * @uses pricing_url()
5164
- *
5165
- * @param string $period Billing cycle
5166
- * @param bool $is_trial
5167
- *
5168
- * @return string
5169
- */
5170
- function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY, $is_trial = false ) {
5171
- return $this->pricing_url( $period, $is_trial );
5172
  }
5173
 
5174
  /**
5175
- * @author Vova Feldman (@svovaf)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5176
  * @since 1.0.9
5177
  *
5178
  * @uses get_upgrade_url()
@@ -5366,6 +5737,45 @@
5366
  return ( defined( 'DOING_AJAX' ) && DOING_AJAX );
5367
  }
5368
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5369
  /**
5370
  * @author Vova Feldman (@svovaf)
5371
  * @since 1.1.7
@@ -5412,6 +5822,12 @@
5412
  * @return string
5413
  */
5414
  function _get_admin_page_url( $page = '', $params = array() ) {
 
 
 
 
 
 
5415
  if ( ! $this->_menu->is_top_level() ) {
5416
  $parent_slug = $this->_menu->get_parent_slug();
5417
  $menu_file = ( false !== strpos( $parent_slug, '.php' ) ) ?
@@ -5442,6 +5858,30 @@
5442
  }
5443
  }
5444
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5445
 
5446
  /**
5447
  * Plugin's account URL.
@@ -5468,6 +5908,25 @@
5468
  $this->_get_admin_page_url( 'account', $params );
5469
  }
5470
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5471
  /**
5472
  * Plugin's account URL.
5473
  *
@@ -5834,10 +6293,21 @@
5834
  * @param string|bool $first
5835
  * @param string|bool $last
5836
  * @param string|bool $license_key
 
 
 
5837
  *
5838
  * @return bool Is successful opt-in (or set to pending).
 
 
5839
  */
5840
- function opt_in( $email = false, $first = false, $last = false, $license_secret_key = false ) {
 
 
 
 
 
 
5841
  $this->_logger->entrance();
5842
 
5843
  if ( false === $email ) {
@@ -5845,11 +6315,17 @@
5845
  $email = $current_user->user_email;
5846
  }
5847
 
5848
- $fs_user = Freemius::_get_user_by_email( $email );
5849
- if ( is_object( $fs_user ) && ! $this->is_pending_activation() ) {
5850
- $this->install_with_current_user( false );
5851
-
5852
- return true;
 
 
 
 
 
 
5853
  }
5854
 
5855
  $user_info = array();
@@ -5865,8 +6341,15 @@
5865
 
5866
  $params = $this->get_opt_in_params( $user_info );
5867
 
5868
- if ( is_string( $license_secret_key ) ) {
5869
- $params['license_secret_key'] = $license_secret_key;
 
 
 
 
 
 
 
5870
  }
5871
 
5872
  $params['format'] = 'json';
@@ -5907,6 +6390,11 @@
5907
  return false;
5908
  }
5909
 
 
 
 
 
 
5910
  $decoded = @json_decode( $response['body'] );
5911
 
5912
  if ( empty( $decoded ) ) {
@@ -5914,7 +6402,7 @@
5914
  }
5915
 
5916
  if ( isset( $decoded->error ) ) {
5917
- return false;
5918
  } else if ( isset( $decoded->pending_activation ) && $decoded->pending_activation ) {
5919
  // Pending activation, add message.
5920
  $this->set_pending_confirmation( false, false );
@@ -5934,7 +6422,7 @@
5934
  return true;
5935
  }
5936
 
5937
- return false;
5938
  }
5939
 
5940
  /**
@@ -5973,6 +6461,8 @@
5973
  $this->_license = $this->_get_license_by_id( $site->license_id );
5974
  }
5975
 
 
 
5976
  if ( $this->is_pending_activation() ) {
5977
  // Remove pending activation sticky notice (if still exist).
5978
  $this->_admin_notices->remove_sticky( 'activation_pending' );
@@ -5993,10 +6483,7 @@
5993
  sprintf(
5994
  __fs( 'activation-with-plan-x-message', $this->_slug ),
5995
  $this->_site->plan->title
5996
- ) . ' ' . $this->_get_latest_download_link( sprintf(
5997
- __fs( 'download-latest-x-version', $this->_slug ),
5998
- $this->_site->plan->title
5999
- ) ),
6000
  'plan_upgraded',
6001
  __fs( 'yee-haw', $this->_slug ) . '!'
6002
  );
@@ -6012,13 +6499,7 @@
6012
  if ( is_numeric( $plugin_id ) ) {
6013
  if ( $plugin_id != $this->_plugin->id ) {
6014
  // Add-on was installed - sync license right after install.
6015
- if ( $redirect && fs_redirect( fs_nonce_url( $this->_get_admin_page_url(
6016
- 'account',
6017
- array(
6018
- 'fs_action' => $this->_slug . '_sync_license',
6019
- 'plugin_id' => $plugin_id
6020
- )
6021
- ), $this->_slug . '_sync_license' ) )
6022
  ) {
6023
  exit();
6024
  }
@@ -6056,8 +6537,6 @@
6056
  if ( fs_request_is_action( $this->_slug . '_activate_new' ) ) {
6057
  // check_admin_referer( $this->_slug . '_activate_new' );
6058
 
6059
- $this->_admin_notices->remove_sticky( 'connect_account' );
6060
-
6061
  if ( fs_request_has( 'user_secret_key' ) ) {
6062
  $this->install_with_new_user(
6063
  fs_request_get( 'user_id' ),
@@ -6164,10 +6643,10 @@
6164
  * @since 1.1.7.4
6165
  *
6166
  * @param bool $redirect
 
 
6167
  */
6168
  private function install_with_current_user( $redirect = true ) {
6169
- $this->_admin_notices->remove_sticky( 'connect_account' );
6170
-
6171
  // Get current logged WP user.
6172
  $current_user = self::_get_current_wp_user();
6173
 
@@ -6188,7 +6667,7 @@
6188
  $license_key = fs_request_get( 'license_secret_key' );
6189
 
6190
  if ( ! empty( $license_key ) ) {
6191
- $extra_install_params['license_secret_key'] = $license_key;
6192
  }
6193
 
6194
  // Install the plugin.
@@ -6198,7 +6677,7 @@
6198
  $this->get_install_data_for_api( $extra_install_params, false, false )
6199
  );
6200
 
6201
- if ( isset( $install->error ) ) {
6202
  $this->_admin_notices->add(
6203
  sprintf( __fs( 'could-not-activate-x', $this->_slug ), $this->get_plugin_name() ) . ' ' .
6204
  __fs( 'contact-us-with-error-message', $this->_slug ) . ' ' . '<b>' . $install->error->message . '</b>',
@@ -6206,7 +6685,12 @@
6206
  'error'
6207
  );
6208
 
6209
- return;
 
 
 
 
 
6210
  }
6211
 
6212
  $site = new FS_Site( $install );
@@ -6217,6 +6701,8 @@
6217
  // $this->_sync_plans();
6218
 
6219
  $this->setup_account( $this->_user, $this->_site, $redirect );
 
 
6220
  }
6221
 
6222
  /**
@@ -6303,6 +6789,8 @@
6303
  if ( ! $this->has_api_connectivity() && ! $this->is_enable_anonymous() ) {
6304
  $this->_menu->remove_menu_item();
6305
  } else {
 
 
6306
  $this->add_menu_action();
6307
  $this->add_submenu_items();
6308
  }
@@ -6436,6 +6924,30 @@
6436
  }
6437
  }
6438
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6439
  /**
6440
  * @author Vova Feldman (@svovaf)
6441
  * @since 1.0.0
@@ -6457,8 +6969,6 @@
6457
  private function add_submenu_items() {
6458
  $this->_logger->entrance();
6459
 
6460
- $this->do_action( 'before_admin_menu_init' );
6461
-
6462
  if ( ! $this->is_addon() ) {
6463
  if ( ! $this->is_activation_mode() ) {
6464
  if ( $this->is_registered() ) {
@@ -6546,10 +7056,14 @@
6546
  '<span class="fs-submenu-item">%s</span>' :
6547
  '<span class="fs-submenu-item fs-sub">%s</span>';
6548
 
 
 
6549
  ksort( $this->_menu_items );
6550
 
6551
  foreach ( $this->_menu_items as $priority => $items ) {
6552
  foreach ( $items as $item ) {
 
 
6553
  if ( ! isset( $item['url'] ) ) {
6554
  $hook = add_submenu_page(
6555
  $item['show_submenu'] ?
@@ -6557,7 +7071,7 @@
6557
  null,
6558
  $item['page_title'],
6559
  sprintf( $item_template, $item['menu_title'] ),
6560
- $item['capability'],
6561
  $item['menu_slug'],
6562
  $item['render_function']
6563
  );
@@ -6570,7 +7084,7 @@
6570
  $this->get_top_level_menu_slug(),
6571
  $item['page_title'],
6572
  sprintf( $item_template, $item['menu_title'] ),
6573
- $item['capability'],
6574
  $item['menu_slug'],
6575
  array( $this, '' )
6576
  );
@@ -6591,6 +7105,16 @@
6591
 
6592
  $menu_slug = $this->_menu->get_top_level_menu_slug();
6593
 
 
 
 
 
 
 
 
 
 
 
6594
  if ( empty( $submenu[ $menu_slug ] ) ) {
6595
  return;
6596
  }
@@ -6654,7 +7178,7 @@
6654
  $this->apply_filters( 'support_forum_submenu', __fs( 'support-forum', $this->_slug ) ),
6655
  $this->apply_filters( 'support_forum_url', 'https://wordpress.org/support/plugin/' . $this->_slug ),
6656
  'wp-support-forum',
6657
- 'read',
6658
  50
6659
  );
6660
  }
@@ -6783,8 +7307,20 @@
6783
  *
6784
  * @return string
6785
  */
6786
- private function get_action_tag( $tag ) {
6787
- return 'fs_' . $tag . '_' . $this->_slug;
 
 
 
 
 
 
 
 
 
 
 
 
6788
  }
6789
 
6790
  /**
@@ -6829,6 +7365,25 @@
6829
  add_action( $this->get_action_tag( $tag ), $function_to_add, $priority, $accepted_args );
6830
  }
6831
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6832
  /**
6833
  * Apply filter, specific for the current context plugin.
6834
  *
@@ -7157,30 +7712,6 @@
7157
  }
7158
  }
7159
 
7160
- /**
7161
- * @author Vova Feldman (@svovaf)
7162
- * @since 1.0.5
7163
- * @uses FS_Api
7164
- *
7165
- * @param bool $flush
7166
- *
7167
- * @return object|\FS_Site
7168
- */
7169
- private function _fetch_site( $flush = false ) {
7170
- $this->_logger->entrance();
7171
- $api = $this->get_api_site_scope();
7172
-
7173
- $site = $api->get( '/', $flush );
7174
-
7175
- if ( ! isset( $site->error ) ) {
7176
- $site = new FS_Site( $site );
7177
- $site->slug = $this->_slug;
7178
- $site->version = $this->get_plugin_version();
7179
- }
7180
-
7181
- return $site;
7182
- }
7183
-
7184
  /**
7185
  * @param bool $store
7186
  *
@@ -7304,10 +7835,11 @@
7304
  * @uses FS_Api
7305
  *
7306
  * @param number|bool $plugin_id
 
7307
  *
7308
  * @return FS_Plugin_License[]|object
7309
  */
7310
- private function _fetch_licenses( $plugin_id = false ) {
7311
  $this->_logger->entrance();
7312
 
7313
  $api = $this->get_api_user_scope();
@@ -7318,14 +7850,75 @@
7318
 
7319
  $result = $api->get( "/plugins/{$plugin_id}/licenses.json", true );
7320
 
 
 
7321
  if ( ! isset( $result->error ) ) {
7322
  for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
7323
  $result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
 
 
 
 
7324
  }
7325
 
7326
  $result = $result->licenses;
7327
  }
7328
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7329
  return $result;
7330
  }
7331
 
@@ -7419,8 +8012,10 @@
7419
  /**
7420
  * Check if site assigned with active license.
7421
  *
7422
- * @author Vova Feldman (@svovaf)
7423
- * @since 1.0.6
 
 
7424
  */
7425
  function has_active_license() {
7426
  return (
@@ -7430,6 +8025,21 @@
7430
  );
7431
  }
7432
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7433
  /**
7434
  * Check if site assigned with license with enabled features.
7435
  *
@@ -7576,7 +8186,11 @@
7576
  private function _sync_plugin_license( $background = false ) {
7577
  $this->_logger->entrance();
7578
 
7579
- // Sync site info.
 
 
 
 
7580
  $site = $this->send_install_update( array(), true );
7581
 
7582
  $plan_change = 'none';
@@ -7635,8 +8249,11 @@
7635
  $this->_enrich_site_plan( true );
7636
  $this->_store_site();
7637
  } else {
7638
- // Sync licenses.
7639
- $this->_sync_licenses();
 
 
 
7640
 
7641
  // Check if plan / license changed.
7642
  if ( ! FS_Entity::equals( $site->plan, $this->_site->plan ) ||
@@ -7657,7 +8274,7 @@
7657
  // For trial with subscription use-case.
7658
  $new_license = is_null( $site->license_id ) ? null : $this->_get_license_by_id( $site->license_id );
7659
 
7660
- if ( is_object( $new_license ) && ! $new_license->is_expired() ) {
7661
  $this->_site = $site;
7662
  $this->_update_site_license( $new_license );
7663
  $this->_store_licenses();
@@ -7682,7 +8299,7 @@
7682
  null :
7683
  $this->_get_license_by_id( $site->license_id );
7684
 
7685
- if ( $is_free && is_null( $new_license ) && $this->has_license() && $this->_license->is_cancelled ) {
7686
  // License cancelled.
7687
  $this->_site = $site;
7688
  $this->_update_site_license( $new_license );
@@ -7735,18 +8352,17 @@
7735
 
7736
  $this->_admin_notices->add(
7737
  sprintf(
7738
- __fs( 'plan-did-not-change-message', $this->_slug ) . ' ' .
7739
- sprintf(
7740
- '<a href="%s">%s</a>',
7741
- $this->contact_url(
7742
- 'bug',
7743
- sprintf( __fs( 'plan-did-not-change-email-message', $this->_slug ),
7744
- strtoupper( $plan->name )
7745
- )
7746
- ),
7747
- __fs( 'contact-us-here', $this->_slug )
7748
- ),
7749
  '<i><b>' . $plan->title . ( $this->is_trial() ? ' ' . __fs( 'trial', $this->_slug ) : '' ) . '</b></i>'
 
 
 
 
 
 
 
 
 
7750
  ),
7751
  __fs( 'hmm', $this->_slug ) . '...'
7752
  );
@@ -7757,11 +8373,7 @@
7757
  sprintf(
7758
  __fs( 'plan-upgraded-message', $this->_slug ),
7759
  '<i>' . $this->get_plugin_name() . '</i>'
7760
- ) . ( $this->is_premium() ? '' : ' ' . $this->_get_latest_download_link( sprintf(
7761
- __fs( 'download-latest-x-version', $this->_slug ),
7762
- $this->_site->plan->title
7763
- ) )
7764
- ),
7765
  'plan_upgraded',
7766
  __fs( 'yee-haw', $this->_slug ) . '!'
7767
  );
@@ -7823,10 +8435,7 @@
7823
  sprintf(
7824
  __fs( 'trial-started-message', $this->_slug ),
7825
  '<i>' . $this->get_plugin_name() . '</i>'
7826
- ) . ( $this->is_premium() ? '' : ' ' . $this->_get_latest_download_link( sprintf(
7827
- __fs( 'download-latest-x-version', $this->_slug ),
7828
- $this->_storage->trial_plan->title
7829
- ) ) ),
7830
  'trial_started',
7831
  __fs( 'yee-haw', $this->_slug ) . '!'
7832
  );
@@ -7894,14 +8503,28 @@
7894
  return;
7895
  }
7896
 
 
 
 
 
 
 
7897
  $api = $this->get_api_site_scope();
7898
- $license = $api->call( "/licenses/{$premium_license->id}.json", 'put' );
7899
 
7900
  if ( $this->is_api_error( $license ) ) {
7901
  if ( ! $background ) {
7902
- $this->_admin_notices->add(
7903
- __fs( 'license-activation-failed-message', $this->_slug ) . '<br> ' .
7904
- __fs( 'server-error-message', $this->_slug ) . ' ' . var_export( $license, true ),
 
 
 
 
 
 
 
 
7905
  __fs( 'hmm', $this->_slug ) . '...',
7906
  'error'
7907
  );
@@ -7925,10 +8548,7 @@
7925
  if ( ! $background ) {
7926
  $this->_admin_notices->add_sticky(
7927
  __fs( 'license-activated-message', $this->_slug ) .
7928
- ( $this->is_premium() ? '' : ' ' . $this->_get_latest_download_link( sprintf(
7929
- __fs( 'download-latest-x-version', $this->_slug ),
7930
- $this->_site->plan->title
7931
- ) ) ),
7932
  'license_activated',
7933
  __fs( 'yee-haw', $this->_slug ) . '!'
7934
  );
@@ -8250,7 +8870,7 @@
8250
  * @return bool
8251
  */
8252
  private function _can_download_premium() {
8253
- return $this->has_active_license() ||
8254
  ( $this->is_trial() && ! $this->get_trial_plan()->is_free() );
8255
  }
8256
 
@@ -8318,46 +8938,6 @@
8318
 
8319
  #region Download Plugin ------------------------------------------------------------------
8320
 
8321
- /**
8322
- * Download latest plugin version, based on plan.
8323
- * The download will be fetched via the API first.
8324
- *
8325
- * @author Vova Feldman (@svovaf)
8326
- * @since 1.0.4
8327
- *
8328
- * @param bool|number $plugin_id
8329
- *
8330
- * @uses FS_Api
8331
- *
8332
- * @deprecated
8333
- */
8334
- private function _download_latest( $plugin_id = false ) {
8335
- $this->_logger->entrance();
8336
-
8337
- $is_addon = $this->_is_addon_id( $plugin_id );
8338
-
8339
- $is_premium = $this->_can_download_premium();
8340
-
8341
- $latest = $this->get_api_site_scope()->call(
8342
- $this->_get_latest_version_endpoint( $plugin_id, 'zip' )
8343
- );
8344
-
8345
- $slug = $this->_slug;
8346
- if ( $is_addon ) {
8347
- $addon = $this->get_addon( $plugin_id );
8348
- $slug = is_object( $addon ) ? $addon->slug : 'addon';
8349
- }
8350
-
8351
- if ( ! is_object( $latest ) ) {
8352
- header( "Content-Type: application/zip" );
8353
- header( "Content-Disposition: attachment; filename={$slug}" . ( ! $is_addon && $is_premium ? '-premium' : '' ) . ".zip" );
8354
- header( "Content-Length: " . strlen( $latest ) );
8355
- echo $latest;
8356
-
8357
- exit();
8358
- }
8359
- }
8360
-
8361
  /**
8362
  * Download latest plugin version, based on plan.
8363
  *
@@ -8397,6 +8977,24 @@
8397
  );
8398
  }
8399
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8400
  /**
8401
  * Get latest plugin download link.
8402
  *
@@ -8488,7 +9086,7 @@
8488
  * @author Vova Feldman (@svovaf)
8489
  * @since 1.0.4
8490
  *
8491
- * @param bool $flush Since 1.1.7.3 by default add 24 hour cache.
8492
  *
8493
  * @return FS_Plugin[]
8494
  *
@@ -8497,7 +9095,21 @@
8497
  private function _sync_addons( $flush = false ) {
8498
  $this->_logger->entrance();
8499
 
8500
- $result = $this->get_api_site_or_plugin_scope()->get( '/addons.json?enriched=true', $flush );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8501
 
8502
  $addons = array();
8503
  if ( ! $this->is_api_error( $result ) ) {
@@ -8691,10 +9303,12 @@
8691
  * @author Vova Feldman (@svovaf)
8692
  * @since 1.1.2
8693
  *
 
 
8694
  * @return string
8695
  */
8696
- private function get_activation_url() {
8697
- return $this->apply_filters( 'connect_url', $this->_get_admin_page_url() );
8698
  }
8699
 
8700
  /**
@@ -8996,7 +9610,11 @@
8996
  $this->_logger->entrance();
8997
 
8998
  $vars = array( 'slug' => $this->_slug );
8999
- fs_require_once_template( 'account.php', $vars );
 
 
 
 
9000
  }
9001
 
9002
  /**
@@ -9335,18 +9953,6 @@
9335
  private $_action_links_hooked = false;
9336
  private $_action_links = array();
9337
 
9338
- /**
9339
- * @author Vova Feldman (@svovaf)
9340
- * @since 1.0.0
9341
- *
9342
- * @return bool
9343
- */
9344
- private function is_plugin_action_links_hooked() {
9345
- $this->_logger->entrance( json_encode( $this->_action_links_hooked ) );
9346
-
9347
- return $this->_action_links_hooked;
9348
- }
9349
-
9350
  /**
9351
  * Hook to plugin action links filter.
9352
  *
@@ -9443,7 +10049,14 @@
9443
  function _add_license_action_link() {
9444
  $this->_logger->entrance();
9445
 
9446
- $link_text = __fs( $this->is_free_plan() ? 'activate-license' : 'change-license', $this->_slug );
 
 
 
 
 
 
 
9447
 
9448
  $this->add_plugin_action_link(
9449
  $link_text,
@@ -9595,6 +10208,41 @@
9595
  $this->_admin_notices->add_sticky( $message, $id, $title, $type );
9596
  }
9597
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9598
  /* Plugin Auto-Updates (@since 1.0.4)
9599
  ------------------------------------------------------------------------------------------------------------------*/
9600
  /**
227
  */
228
  private static $_instances = array();
229
 
230
+ // Reason IDs
231
+ const REASON_NO_LONGER_NEEDED = 1;
232
+ const REASON_FOUND_A_BETTER_PLUGIN = 2;
233
+ const REASON_NEEDED_FOR_A_SHORT_PERIOD = 3;
234
+ const REASON_BROKE_MY_SITE = 4;
235
+ const REASON_SUDDENLY_STOPPED_WORKING = 5;
236
+ const REASON_CANT_PAY_ANYMORE = 6;
237
+ const REASON_OTHER = 7;
238
+ const REASON_DIDNT_WORK = 8;
239
+ const REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION = 9;
240
+ const REASON_COULDNT_MAKE_IT_WORK = 10;
241
+ const REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE = 11;
242
+ const REASON_NOT_WORKING = 12;
243
+ const REASON_NOT_WHAT_I_WAS_LOOKING_FOR = 13;
244
+ const REASON_DIDNT_WORK_AS_EXPECTED = 14;
245
+ const REASON_TEMPORARY_DEACTIVATION = 15;
246
 
247
  /* Ctor
248
  ------------------------------------------------------------------------------------------------------------------*/
249
 
250
+ /**
251
+ * Main singleton instance.
252
+ *
253
+ * @author Vova Feldman (@svovaf)
254
+ * @since 1.0.0
255
+ *
256
+ * @param string $slug
257
+ * @param bool $is_init Since 1.2.1 Is initiation sequence.
258
+ */
259
+ private function __construct( $slug, $is_init = false ) {
260
  $this->_slug = $slug;
261
 
262
  $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $slug, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
263
 
264
  $this->_storage = FS_Key_Value_Storage::instance( 'plugin_data', $this->_slug );
265
 
266
+ $this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
267
  $this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
268
  $this->_plugin_basename = plugin_basename( $this->_plugin_main_file_path );
269
  $this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
469
  }
470
  }
471
 
 
 
 
472
  if ( ! $this->is_ajax() ) {
473
  if ( ! $this->is_addon() ) {
474
  add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
486
  $this->add_action( 'sdk_version_update', array( &$this, '_data_migration' ), WP_FS__DEFAULT_PRIORITY, 2 );
487
  }
488
 
489
+ /**
490
+ * Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
491
+ * could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
492
+ * plugin will trigger inclusion of the free or premium version and if one of them is active during the
493
+ * uninstallation, a fatal error may occur in case the plugin's class or functions are already defined.
494
+ *
495
+ * @author Leo Fajardo (leorw)
496
+ *
497
+ * @since 1.2.0
498
+ */
499
+ private function unregister_uninstall_hook() {
500
+ $uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
501
+ unset( $uninstallable_plugins[ $this->_free_plugin_basename ] );
502
+ unset( $uninstallable_plugins[ $this->premium_plugin_basename() ] );
503
+
504
+ update_option( 'uninstall_plugins', $uninstallable_plugins );
505
+ }
506
+
507
+ /**
508
+ * @since 1.2.0 Invalidate module's main file cache, otherwise, FS_Plugin_Updater will not fetch updates.
509
+ */
510
+ private function clear_module_main_file_cache() {
511
+ if ( ! isset( $this->_storage->plugin_main_file ) ||
512
+ empty( $this->_storage->plugin_main_file->path )
513
+ ) {
514
+ return;
515
+ }
516
+
517
+ // Store cached path (2nd layer cache).
518
+ $this->_storage->plugin_main_file->prev_path = $this->_storage->plugin_main_file->path;
519
+
520
+ // Clear cached path.
521
+ unset( $this->_storage->plugin_main_file->path );
522
+ }
523
+
524
  /**
525
  * @author Vova Feldman (@svovaf)
526
  * @since 1.0.9
545
  // If user is paying or in trial and have the free version installed,
546
  // assume that the deactivation is for the upgrade process.
547
  if ( ! $this->is_paying_or_trial() || $this->is_premium() ) {
548
+ $this->add_ajax_action(
549
+ 'submit_uninstall_reason',
550
+ array( &$this, '_submit_uninstall_reason_action' )
551
+ );
552
 
553
  global $pagenow;
554
  if ( 'plugins.php' === $pagenow ) {
555
  add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
556
  }
557
  }
558
+
559
+ if ( ! $this->is_addon() ) {
560
+ if ( $this->is_registered() ) {
561
+ $this->add_filter( 'after_code_type_change', array( &$this, '_after_code_type_change' ) );
562
+ }
563
+ }
564
  }
565
  }
566
 
570
  * @author Vova Feldman (@svovaf)
571
  * @since 1.0.6
572
  *
573
+ * @param bool $is_init Is initiation sequence.
574
+ *
575
  * @return string
576
  *
577
  * @uses fs_find_caller_plugin_file
578
  */
579
+ private function _find_caller_plugin_file( $is_init = false ) {
580
  // Try to load the cached value of the file path.
581
  if ( isset( $this->_storage->plugin_main_file ) ) {
582
  if ( file_exists( $this->_storage->plugin_main_file->path ) ) {
584
  }
585
  }
586
 
587
+ /**
588
+ * @since 1.2.1
589
+ *
590
+ * `clear_module_main_file_cache()` is clearing the plugin's cached path on
591
+ * deactivation. Therefore, if any plugin/theme was initiating `Freemius`
592
+ * with that plugin's slug, it was overriding the empty plugin path with a wrong path.
593
+ *
594
+ * So, we've added a special mechanism with a 2nd layer of cache that uses `prev_path`
595
+ * when the class instantiator isn't the module.
596
+ */
597
+ if ( ! $is_init ) {
598
+ // Fetch prev path cache.
599
+ if ( isset( $this->_storage->plugin_main_file ) &&
600
+ isset( $this->_storage->plugin_main_file->prev_path )
601
+ ) {
602
+ if ( file_exists( $this->_storage->plugin_main_file->prev_path ) ) {
603
+ return $this->_storage->plugin_main_file->prev_path;
604
+ }
605
+ }
606
+
607
+ wp_die(
608
+ __fs( 'failed-finding-main-path', $this->_slug ),
609
+ __fs( 'error' ),
610
+ array( 'back_link' => true )
611
+ );
612
+ }
613
+
614
+ /**
615
+ * @since 1.2.1
616
+ *
617
+ * Only the original instantiator that calls dynamic_init can modify the module's path.
618
+ */
619
+ // Find caller module.
620
  $plugin_file = fs_find_caller_plugin_file();
621
 
622
  $this->_storage->plugin_main_file = (object) array(
638
  * @since 1.1.2
639
  */
640
  function _add_deactivation_feedback_dialog_box() {
 
 
641
  /* Check the type of user:
642
  * 1. Long-term (long-term)
643
  * 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
681
  /**
682
  * @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
683
  */
684
+ fs_require_template( 'forms/deactivation/form.php', $vars );
685
  }
686
 
687
  /**
693
  * @return array The uninstall reasons for the specified user type.
694
  */
695
  function _get_uninstall_reasons( $user_type = 'long-term' ) {
696
+ $internal_message_template_var = array(
697
+ 'slug' => $this->_slug
698
+ );
699
+
700
+ if ( $this->is_registered() && false !== $this->get_plan() && $this->get_plan()->has_technical_support() ) {
701
+ $contact_support_template = fs_get_template( 'forms/deactivation/contact.php', $internal_message_template_var );
702
+ } else {
703
+ $contact_support_template = '';
704
+ }
705
+
706
  $reason_found_better_plugin = array(
707
+ 'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
708
  'text' => __fs( 'reason-found-a-better-plugin', $this->_slug ),
709
  'input_type' => 'textfield',
710
  'input_placeholder' => __fs( 'placeholder-plugin-name', $this->_slug )
711
  );
712
 
713
  $reason_temporary_deactivation = array(
714
+ 'id' => self::REASON_TEMPORARY_DEACTIVATION,
715
  'text' => __fs( 'reason-temporary-deactivation', $this->_slug ),
716
  'input_type' => '',
717
  'input_placeholder' => ''
718
  );
719
 
720
  $reason_other = array(
721
+ 'id' => self::REASON_OTHER,
722
  'text' => __fs( 'reason-other', $this->_slug ),
723
  'input_type' => 'textfield',
724
  'input_placeholder' => ''
726
 
727
  $long_term_user_reasons = array(
728
  array(
729
+ 'id' => self::REASON_NO_LONGER_NEEDED,
730
  'text' => __fs( 'reason-no-longer-needed', $this->_slug ),
731
  'input_type' => '',
732
  'input_placeholder' => ''
733
  ),
734
  $reason_found_better_plugin,
735
  array(
736
+ 'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
737
  'text' => __fs( 'reason-needed-for-a-short-period', $this->_slug ),
738
  'input_type' => '',
739
  'input_placeholder' => ''
740
  ),
741
  array(
742
+ 'id' => self::REASON_BROKE_MY_SITE,
743
  'text' => __fs( 'reason-broke-my-site', $this->_slug ),
744
  'input_type' => '',
745
+ 'input_placeholder' => '',
746
+ 'internal_message' => $contact_support_template
747
  ),
748
  array(
749
+ 'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
750
  'text' => __fs( 'reason-suddenly-stopped-working', $this->_slug ),
751
  'input_type' => '',
752
+ 'input_placeholder' => '',
753
+ 'internal_message' => $contact_support_template
754
  )
755
  );
756
 
757
  if ( $this->is_paying() ) {
758
  $long_term_user_reasons[] = array(
759
+ 'id' => self::REASON_CANT_PAY_ANYMORE,
760
  'text' => __fs( 'reason-cant-pay-anymore', $this->_slug ),
761
  'input_type' => 'textfield',
762
  'input_placeholder' => __fs( 'placeholder-comfortable-price', $this->_slug )
763
  );
764
  }
765
 
766
+ $reason_dont_share_info = array(
767
+ 'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
768
+ 'text' => __fs( 'reason-dont-like-to-share-my-information', $this->_slug ),
769
+ 'input_type' => '',
770
+ 'input_placeholder' => ''
771
+ );
772
+
773
+ /**
774
+ * If the current user has selected the "don't share data" reason in the deactivation feedback modal, inform the
775
+ * user by showing additional message that he doesn't have to share data and can just choose to skip the opt-in
776
+ * (the Skip button is included in the message to show). This message will only be shown if anonymous mode is
777
+ * enabled and the user's account is currently not in pending activation state (similar to the way the Skip
778
+ * button in the opt-in form is shown/hidden).
779
+ */
780
+ if ( $this->is_enable_anonymous() && ! $this->is_pending_activation() ) {
781
+ $reason_dont_share_info['internal_message'] = fs_get_template( 'forms/deactivation/retry-skip.php', $internal_message_template_var );
782
+ }
783
 
784
  $uninstall_reasons = array(
785
  'long-term' => $long_term_user_reasons,
786
  'non-registered-and-non-anonymous-short-term' => array(
787
  array(
788
+ 'id' => self::REASON_DIDNT_WORK,
789
  'text' => __fs( 'reason-didnt-work', $this->_slug ),
790
  'input_type' => '',
791
  'input_placeholder' => ''
792
  ),
793
+ $reason_dont_share_info,
794
+ $reason_found_better_plugin
 
 
 
 
 
 
 
795
  ),
796
  'short-term' => array(
797
  array(
798
+ 'id' => self::REASON_COULDNT_MAKE_IT_WORK,
799
  'text' => __fs( 'reason-couldnt-make-it-work', $this->_slug ),
800
  'input_type' => '',
801
+ 'input_placeholder' => '',
802
+ 'internal_message' => $contact_support_template
803
  ),
804
  $reason_found_better_plugin,
805
  array(
806
+ 'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
807
  'text' => __fs( 'reason-great-but-need-specific-feature', $this->_slug ),
808
  'input_type' => 'textarea',
809
  'input_placeholder' => __fs( 'placeholder-feature', $this->_slug )
810
  ),
811
  array(
812
+ 'id' => self::REASON_NOT_WORKING,
813
  'text' => __fs( 'reason-not-working', $this->_slug ),
814
  'input_type' => 'textarea',
815
  'input_placeholder' => __fs( 'placeholder-share-what-didnt-work', $this->_slug )
816
  ),
817
  array(
818
+ 'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
819
  'text' => __fs( 'reason-not-what-i-was-looking-for', $this->_slug ),
820
  'input_type' => 'textarea',
821
  'input_placeholder' => __fs( 'placeholder-what-youve-been-looking-for', $this->_slug )
822
  ),
823
  array(
824
+ 'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
825
  'text' => __fs( 'reason-didnt-work-as-expected', $this->_slug ),
826
  'input_type' => 'textarea',
827
  'input_placeholder' => __fs( 'placeholder-what-did-you-expect', $this->_slug )
828
+ )
 
 
829
  )
830
  );
831
 
832
+ // Randomize the reasons for the current user type.
833
+ shuffle( $uninstall_reasons[ $user_type ] );
834
+
835
+ // Keep the following reasons as the last items in the list.
836
+ $uninstall_reasons[ $user_type ][] = $reason_temporary_deactivation;
837
+ $uninstall_reasons[ $user_type ][] = $reason_other;
838
+
839
  $uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
840
 
841
  return $uninstall_reasons[ $user_type ];
848
  * @since 1.1.2
849
  */
850
  function _submit_uninstall_reason_action() {
851
+ $reason_id = fs_request_get( 'reason_id' );
852
+
853
+ // Check if the given reason ID is an unsigned integer.
854
+ if ( ! ctype_digit( $reason_id ) ) {
855
  exit;
856
  }
857
 
858
+ $reason_info = trim( fs_request_get( 'reason_info', '' ) );
859
+ if ( ! empty( $reason_info ) ) {
860
+ $reason_info = substr( $reason_info, 0, 128 );
861
+ }
862
 
863
  $reason = (object) array(
864
+ 'id' => $reason_id,
865
+ 'info' => $reason_info,
866
+ 'is_anonymous' => fs_request_get_bool( 'is_anonymous' )
867
  );
868
 
869
  $this->_storage->store( 'uninstall_reason', $reason );
883
  * @author Vova Feldman (@svovaf)
884
  * @since 1.0.0
885
  *
886
+ * @param string $slug
887
+ * @param bool $is_init Is initiation sequence.
888
  *
889
  * @return Freemius
890
  */
891
+ static function instance( $slug, $is_init = false ) {
892
  $slug = strtolower( $slug );
893
 
894
  if ( ! isset( self::$_instances[ $slug ] ) ) {
896
  self::_load_required_static();
897
  }
898
 
899
+ self::$_instances[ $slug ] = new Freemius( $slug, $is_init );
900
  }
901
 
902
  return self::$_instances[ $slug ];
1159
 
1160
  add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
1161
 
1162
+ add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
1163
+
1164
  self::$_statics_loaded = true;
1165
  }
1166
 
1167
+ /**
1168
+ * Load framework's text domain.
1169
+ *
1170
+ * @author Vova Feldman (@svovaf)
1171
+ * @since 1.2.1
1172
+ */
1173
+ static function _load_textdomain() {
1174
+ if ( ! is_admin() ) {
1175
+ return;
1176
+ }
1177
+
1178
+ global $fs_active_plugins;
1179
+
1180
+ load_plugin_textdomain(
1181
+ 'freemius',
1182
+ false,
1183
+ $fs_active_plugins->newest->sdk_path . '/languages/'
1184
+ );
1185
+
1186
+ // @todo Load for themes.
1187
+ }
1188
+
1189
  #region Debugging ------------------------------------------------------------------
1190
 
1191
  /**
1265
  $users = self::get_all_users();
1266
  $addons = self::get_all_addons();
1267
  $account_addons = self::get_all_account_addons();
1268
+ $licenses = self::get_all_licenses();
1269
 
1270
  // $plans = self::get_all_plans();
1271
  // $licenses = self::get_all_licenses();
1275
  'users' => $users,
1276
  'addons' => $addons,
1277
  'account_addons' => $account_addons,
1278
+ 'licenses' => $licenses,
1279
  );
1280
 
1281
  fs_enqueue_local_style( 'fs_account', '/admin/debug.css' );
1964
 
1965
  $active_plugin = self::get_active_plugins();
1966
 
1967
+ // Generate the list of active plugins separated by new line.
1968
  $active_plugin_string = '';
1969
  foreach ( $active_plugin as $plugin ) {
1970
  $active_plugin_string .= sprintf(
2090
  // If anonymous mode is disabled, add firewall admin-notice message.
2091
  add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
2092
 
2093
+ $this->add_ajax_action( 'resolve_firewall_issues', array(
2094
  &$this,
2095
  '_email_about_firewall_issue'
2096
  ) );
2097
 
2098
+ $this->add_ajax_action( 'retry_connectivity_test', array(
2099
  &$this,
2100
  '_retry_connectivity_test'
2101
  ) );
2123
  }
2124
  }
2125
 
2126
+ if ( $this->has_api_connectivity() ) {
2127
+ if ( $this->is_cron() ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2128
  $this->hook_callback_to_sync_cron();
2129
+ } else if ( $this->is_user_in_admin() ) {
2130
+ /**
2131
+ * Schedule daily data sync cron if:
2132
+ *
2133
+ * 1. User opted-in (for tracking).
2134
+ * 2. If skipped, but later upgraded (opted-in via upgrade).
2135
+ *
2136
+ * @author Vova Feldman (@svovaf)
2137
+ * @since 1.1.7.3
2138
+ *
2139
+ */
2140
+ if ( $this->is_registered() ) {
2141
+ if ( ! $this->is_sync_cron_on() ) {
2142
+ $this->schedule_sync_cron();
2143
+ }
2144
  }
 
2145
 
2146
+ /**
2147
+ * Check if requested for manual blocking background sync.
2148
+ */
2149
+ if ( fs_request_has( 'background_sync' ) ) {
2150
+ $this->run_manual_sync();
2151
+ }
2152
  }
2153
  }
2154
 
2234
 
2235
  $this->do_action( 'initiated' );
2236
 
2237
+ if ( $this->_storage->prev_is_premium !== $this->_plugin->is_premium ) {
2238
+ if ( isset( $this->_storage->prev_is_premium ) ) {
2239
+ $this->apply_filters(
2240
+ 'after_code_type_change',
2241
+ // New code type.
2242
+ $this->_plugin->is_premium
2243
+ );
2244
+ } else {
2245
+ // Set for code type for the first time.
2246
+ $this->_storage->prev_is_premium = $this->_plugin->is_premium;
2247
+ }
2248
+ }
2249
+
2250
  if ( ! $this->is_addon() ) {
2251
  if ( $this->is_registered() ) {
2252
  // Fix for upgrade from versions < 1.0.9.
2253
  if ( ! isset( $this->_storage->activation_timestamp ) ) {
2254
  $this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME;
2255
  }
 
 
 
 
 
 
 
 
 
 
 
2256
 
2257
  $this->do_action( 'after_init_plugin_registered' );
2258
  } else if ( $this->is_anonymous() ) {
2272
 
2273
  // Add license activation link and AJAX request handler.
2274
  if ( $this->has_paid_plan() ) {
 
 
2275
  global $pagenow;
2276
  if ( 'plugins.php' === $pagenow ) {
2277
+ /**
2278
+ * @since 1.2.0 Add license action link only on plugins page.
2279
+ */
2280
+ $this->_add_license_action_link();
2281
+ $this->_require_license_activation_dialog();
2282
  }
2283
 
2284
+ if ( $this->is_ajax_action( array(
2285
+ 'activate_license',
2286
+ 'resend_license_key'
2287
+ ) )
2288
+ ) {
2289
+ // Hook license activation and resend AJAX callbacks.
2290
+ $this->_require_license_activation_dialog();
2291
+ }
2292
  }
2293
  }
2294
 
2479
  return false;
2480
  }
2481
 
2482
+ /**
2483
+ * Triggered after code type has changed.
2484
+ *
2485
+ * @author Vova Feldman (@svovaf)
2486
+ * @since 1.1.9.1
2487
+ */
2488
+ function _after_code_type_change() {
2489
+ $this->_logger->entrance();
2490
+
2491
+ add_action( is_admin() ? 'admin_init' : 'init', array(
2492
+ &$this,
2493
+ '_plugin_code_type_changed'
2494
+ ) );
2495
+ }
2496
+
2497
  /**
2498
  * Handles plugin's code type change (free <--> premium).
2499
  *
2501
  * @since 1.0.9
2502
  */
2503
  function _plugin_code_type_changed() {
2504
+ $this->_logger->entrance();
2505
+
2506
  // Schedule code type changes event.
2507
  // $this->sync_install();
2508
  $this->schedule_install_sync();
2524
  __fs( 'woot', $this->_slug ) . '!'
2525
  );
2526
  } else {
2527
+ // Remove sticky message related to premium code activation.
2528
+ $this->_admin_notices->remove_sticky( 'premium_activated' );
2529
+
2530
  // Activated free code (after had the premium before).
2531
  $this->do_action( 'after_free_version_reactivation' );
2532
 
2535
  sprintf(
2536
  __fs( 'you-have-x-license', $this->_slug ),
2537
  $this->_site->plan->title
2538
+ ) . $this->get_complete_upgrade_instructions(),
 
 
 
2539
  'plan_upgraded',
2540
  __fs( 'yee-haw', $this->_slug ) . '!'
2541
  );
2542
  }
2543
  }
2544
 
2545
+ /**
2546
+ * Unregister the uninstall hook for the other version of the plugin (with different code type) to avoid
2547
+ * triggering a fatal error when uninstalling that plugin. For example, after deactivating the "free" version
2548
+ * of a specific plugin, its uninstall hook should be unregistered after the "premium" version has been
2549
+ * activated. If we don't do that, a fatal error will occur when we try to uninstall the "free" version since
2550
+ * the main file of the "free" version will be loaded first before calling the hooked callback. Since the
2551
+ * free and premium versions are almost identical (same class or have same functions), a fatal error like
2552
+ * "Cannot redeclare class MyClass" or "Cannot redeclare my_function()" will occur.
2553
+ */
2554
+ $this->unregister_uninstall_hook();
2555
+
2556
+ $this->clear_module_main_file_cache();
2557
+
2558
  // Update is_premium of latest version.
2559
  $this->_storage->prev_is_premium = $this->_plugin->is_premium;
2560
  }
2934
  }
2935
  }
2936
 
 
 
 
 
 
2937
  $this->do_action( 'after_sync_cron' );
2938
  }
2939
 
3497
  return;
3498
  }
3499
 
3500
+ $this->unregister_uninstall_hook();
3501
+
3502
  // Clear API cache on activation.
3503
  FS_Api::clear_cache();
3504
 
3642
  $this->_storage->is_plugin_new_install = false;
3643
  }
3644
 
3645
+ // Hook to plugin uninstall.
3646
+ register_uninstall_hook( $this->_plugin_main_file_path, array( 'Freemius', '_uninstall_plugin_hook' ) );
3647
+
3648
+ $this->clear_module_main_file_cache();
3649
  $this->clear_sync_cron();
3650
  $this->clear_install_sync_cron();
3651
 
3933
  }
3934
 
3935
  // Get active theme.
3936
+ $active_theme = wp_get_theme();
3937
+ $active_theme_stylesheet = $active_theme->get_stylesheet();
3938
 
3939
  // Check if there's a change in themes.
3940
  $all_themes = wp_get_themes();
3944
 
3945
  $themes_signature = '';
3946
  foreach ( $all_themes as $slug => $data ) {
3947
+ $is_active = ( $slug === $active_theme_stylesheet );
3948
  $themes_signature .= $slug . ',' .
3949
  $data->version . ',' .
3950
  ( $is_active ? '1' : '0' ) . ';';
3960
 
3961
  // Update existing themes info.
3962
  foreach ( $all_cached_themes->themes as $slug => $data ) {
3963
+ $is_active = ( $slug === $active_theme_stylesheet );
3964
 
3965
  if ( ! isset( $all_themes[ $slug ] ) ) {
3966
  // Plugin uninstalled.
3986
  // Find new themes that weren't yet seen before.
3987
  foreach ( $all_themes as $slug => $data ) {
3988
  if ( ! isset( $all_cached_themes->themes[ $slug ] ) ) {
3989
+ $is_active = ( $slug === $active_theme_stylesheet );
3990
 
3991
  // New plugin.
3992
  $new_plugin = array(
4166
  $this->_store_site( true );
4167
  }
4168
 
4169
+ /**
4170
+ * Track install's custom event.
4171
+ *
4172
+ * IMPORTANT:
4173
+ * Custom event tracking is currently only supported for specific clients.
4174
+ * If you are not one of them, please don't use this method. If you will,
4175
+ * the API will simply ignore your request based on the plugin ID.
4176
+ *
4177
+ * Need custom tracking for your plugin or theme?
4178
+ * If you are interested in custom event tracking please contact yo@freemius.com
4179
+ * for further details.
4180
+ *
4181
+ * @author Vova Feldman (@svovaf)
4182
+ * @since 1.2.1
4183
+ *
4184
+ * @param string $name Event name.
4185
+ * @param array $properties Associative key/value array with primitive values only
4186
+ * @param bool $process_at A valid future date-time in the following format Y-m-d H:i:s.
4187
+ * @param bool $once If true, event will be tracked only once. IMPORTANT: Still trigger the API call.
4188
+ *
4189
+ * @return object|false Event data or FALSE on failure.
4190
+ *
4191
+ * @throws \Freemius_InvalidArgumentException
4192
+ */
4193
+ public function track_event( $name, $properties = array(), $process_at = false, $once = false ) {
4194
+ $this->_logger->entrance( http_build_query( array( 'name' => $name, 'once' => $once ) ) );
4195
+
4196
+ if ( ! $this->is_registered() ) {
4197
+ return false;
4198
+ }
4199
+
4200
+ $event = array( 'type' => $name );
4201
+
4202
+ if ( is_numeric( $process_at ) && $process_at > time() ) {
4203
+ $event['process_at'] = $process_at;
4204
+ }
4205
+
4206
+ if ( $once ) {
4207
+ $event['once'] = true;
4208
+ }
4209
+
4210
+ if ( ! empty( $properties ) ) {
4211
+ // Verify associative array values are primitive.
4212
+ foreach ( $properties as $k => $v ) {
4213
+ if ( ! is_scalar( $v ) ) {
4214
+ throw new Freemius_InvalidArgumentException( 'The $properties argument must be an associative key/value array with primitive values only.' );
4215
+ }
4216
+ }
4217
+
4218
+ $event['properties'] = $properties;
4219
+ }
4220
+
4221
+ $result = $this->get_api_site_scope()->call( 'events.json', 'post', $event );
4222
+
4223
+ return $this->is_api_error( $result ) ?
4224
+ false :
4225
+ $result;
4226
+ }
4227
+
4228
+ /**
4229
+ * Track install's custom event only once, but it still triggers the API call.
4230
+ *
4231
+ * IMPORTANT:
4232
+ * Custom event tracking is currently only supported for specific clients.
4233
+ * If you are not one of them, please don't use this method. If you will,
4234
+ * the API will simply ignore your request based on the plugin ID.
4235
+ *
4236
+ * Need custom tracking for your plugin or theme?
4237
+ * If you are interested in custom event tracking please contact yo@freemius.com
4238
+ * for further details.
4239
+ *
4240
+ * @author Vova Feldman (@svovaf)
4241
+ * @since 1.2.1
4242
+ *
4243
+ * @param string $name Event name.
4244
+ * @param array $properties Associative key/value array with primitive values only
4245
+ * @param bool $process_at A valid future date-time in the following format Y-m-d H:i:s.
4246
+ *
4247
+ * @return object|false Event data or FALSE on failure.
4248
+ *
4249
+ * @throws \Freemius_InvalidArgumentException
4250
+ *
4251
+ * @user Freemius::track_event()
4252
+ */
4253
+ public function track_event_once( $name, $properties = array(), $process_at = false ) {
4254
+ return $this->track_event( $name, $properties, $process_at, true );
4255
+ }
4256
+
4257
  /**
4258
  * Plugin uninstall hook.
4259
  *
4269
  return;
4270
  }
4271
 
4272
+ $params = array();
4273
+ $uninstall_reason = null;
4274
  if ( isset( $this->_storage->uninstall_reason ) ) {
4275
+ $uninstall_reason = $this->_storage->uninstall_reason;
4276
+ $params['reason_id'] = $uninstall_reason->id;
4277
+ $params['reason_info'] = $uninstall_reason->info;
4278
  }
4279
 
4280
+ if ( ! $this->is_registered() && isset( $uninstall_reason ) ) {
4281
  // Send anonymous uninstall event only if user submitted a feedback.
4282
+ if ( isset( $uninstall_reason->is_anonymous ) && ! $uninstall_reason->is_anonymous ) {
4283
+ $this->opt_in( false, false, false, false, true );
4284
+ } else {
4285
+ $params['uid'] = $this->get_anonymous_id();
4286
+ $this->get_api_plugin_scope()->call( 'uninstall.json', 'put', $params );
4287
+ }
4288
  } else {
4289
  // Send uninstall event.
4290
  $this->send_install_update( array_merge( $params, array(
4385
 
4386
  /**
4387
  * @author Vova Feldman (@svovaf)
4388
+ * @since 1.2.0 When using get_plugin_data() do NOT translate plugin data.
4389
  *
4390
+ * @link https://github.com/Freemius/wordpress-sdk/issues/77
4391
  */
4392
  $this->_plugin_data = get_plugin_data(
4393
  $this->_plugin_main_file_path,
4725
  function get_addons() {
4726
  $this->_logger->entrance();
4727
 
4728
+ if ( ! $this->_has_addons ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4729
  return false;
4730
  }
4731
 
4732
+ $addons = $this->_sync_addons();
4733
+
4734
+ return ( ! is_array( $addons ) || empty( $addons ) ) ?
4735
+ false :
4736
+ $addons;
4737
  }
4738
 
4739
  /**
4816
 
4817
  if ( is_array( $addons ) ) {
4818
  foreach ( $addons as $addon ) {
4819
+ if ( $slug === $addon->slug ) {
4820
  return $addon;
4821
  }
4822
  }
4904
  return false;
4905
  }
4906
 
4907
+ return $this->has_active_valid_license() && ( $this->_site->trial_plan_id == $this->_license->plan_id );
4908
  }
4909
 
4910
  /**
4943
  }
4944
 
4945
  /**
4946
+ * Check if the user has an activate, non-expired license on current plugin's install.
4947
  *
4948
  * @since 1.0.9
4949
  *
4963
  return (
4964
  ! $this->is_trial() &&
4965
  'free' !== $this->_site->plan->name &&
4966
+ $this->has_active_valid_license()
4967
  );
4968
  }
4969
 
5112
  * @author Vova Feldman (@svovaf)
5113
  * @since 1.0.6
5114
  *
5115
+ * @param number|bool $site_license_id
5116
+ *
5117
  * @return FS_Plugin_License[]|object
5118
  */
5119
+ function _sync_licenses( $site_license_id = false ) {
5120
+ $licenses = $this->_fetch_licenses( false, $site_license_id );
5121
  if ( ! $this->is_api_error( $licenses ) ) {
5122
  $this->_licenses = $licenses;
5123
  $this->_store_licenses();
5146
  return false;
5147
  }
5148
 
5149
+ if ( ! $this->has_any_license() ) {
5150
  $this->_sync_licenses();
5151
  }
5152
 
5348
  * @return bool
5349
  */
5350
  function has_paid_plan() {
5351
+ return $this->_has_paid_plans ||
5352
+ FS_Plan_Manager::instance()->has_paid_plan( $this->_plans );
5353
  }
5354
 
5355
  /**
5379
  * @return bool
5380
  */
5381
  function has_free_plan() {
5382
+ return ! $this->is_premium() ||
5383
+ ! $this->is_only_premium() ||
5384
+ FS_Plan_Manager::instance()->has_free_plan( $this->_plans );
5385
  }
5386
 
5387
  /**
5393
  * @since 1.1.9
5394
  */
5395
  function _add_license_activation_dialog_box() {
 
 
5396
  $vars = array(
5397
+ 'slug' => $this->_slug,
5398
  );
5399
 
5400
+ fs_require_template( 'forms/license-activation.php', $vars );
5401
+ fs_require_template( 'forms/resend-key.php', $vars );
5402
+ }
5403
+
5404
+ /**
5405
+ * Prepare page to include all required UI and logic for the license activation dialog.
5406
+ *
5407
+ * @author Vova Feldman (@svovaf)
5408
+ * @since 1.2.0
5409
+ */
5410
+ function _require_license_activation_dialog() {
5411
+ if ( $this->is_ajax() ) {
5412
+ if ( $this->is_ajax_action( 'activate_license' ) ) {
5413
+ // Add license activation AJAX callback.
5414
+ $this->add_ajax_action( 'activate_license', array( &$this, '_activate_license_ajax_action' ) );
5415
+ }
5416
+
5417
+ if ( $this->is_ajax_action( 'resend_license_key' ) ) {
5418
+ // Add resend license AJAX callback.
5419
+ $this->add_ajax_action( 'resend_license_key', array(
5420
+ &$this,
5421
+ '_resend_license_key_ajax_action'
5422
+ ) );
5423
+ }
5424
+ } else {
5425
+ // Inject license activation dialog UI and client side code.
5426
+ add_action( 'admin_footer', array( &$this, '_add_license_activation_dialog_box' ) );
5427
+ }
5428
  }
5429
 
5430
  /**
5432
  * @since 1.1.9
5433
  */
5434
  function _activate_license_ajax_action() {
5435
+ $license_key = trim( fs_request_get( 'license_key' ) );
 
 
5436
 
 
5437
  if ( empty( $license_key ) ) {
5438
  exit;
5439
  }
5440
 
5441
+ $slug = $_POST['slug'];
5442
+ $fs = ( ( $slug === $this->_slug ) ? $this : self::instance( $slug ) );
5443
+ $error = false;
5444
+
5445
  if ( $this->is_registered() ) {
5446
+ $api = $fs->get_api_site_scope();
5447
+ $install = $api->call( '/', 'put',
5448
  array(
5449
  'license_key' => $license_key
5450
  )
5451
  );
5452
+
5453
+ if ( isset( $install->error ) ) {
5454
+ $error = $install->error->message;
5455
+ }
5456
  } else {
5457
+ $install = $this->opt_in( false, false, false, $license_key );
5458
+
5459
+ if ( isset( $install->error ) ) {
5460
+ $error = $install->error;
5461
+ }
5462
  }
5463
 
5464
+ $result = array(
5465
+ 'success' => ( false === $error )
5466
+ );
 
5467
 
5468
+ if ( false !== $error ) {
5469
+ $result['error'] = $error;
5470
+ }
5471
 
5472
+ echo json_encode( $result );
5473
+
5474
+ exit;
 
 
 
 
 
 
 
 
 
 
 
 
5475
  }
5476
 
5477
  /**
5478
+ * @author Leo Fajardo (@leorw)
5479
+ * @since 1.2.0
5480
+ */
5481
+ function _resend_license_key_ajax_action() {
5482
+ if ( ! isset( $_POST['email'] ) ) {
5483
+ exit;
5484
+ }
5485
+
5486
+ $email_address = trim( $_POST['email'] );
5487
+ if ( empty( $email_address ) ) {
5488
+ exit;
5489
+ }
5490
+
5491
+ $error = false;
5492
+
5493
+ $api = $this->get_api_plugin_scope();
5494
+ $result = $api->call( '/licenses/resend.json', 'post',
5495
+ array(
5496
+ 'email' => $email_address,
5497
+ 'is_localhost' => WP_FS__IS_LOCALHOST
5498
+ )
5499
+ );
5500
+
5501
+ if ( is_object( $result ) && isset( $result->error ) ) {
5502
+ $error = $result->error;
5503
+
5504
+ if ( in_array( $error->code, array( 'invalid_email', 'no_user' ) ) ) {
5505
+ $error = __fs( 'email-not-found' );
5506
+ } else if ( 'no_license' === $error->code ) {
5507
+ $error = __fs( 'no-active-licenses' );
5508
+ } else {
5509
+ $error = $error->message;
5510
+ }
5511
+ }
5512
+
5513
+ $licenses = array(
5514
+ 'success' => ( false === $error )
5515
+ );
5516
+
5517
+ if ( false !== $error ) {
5518
+ $licenses['error'] = sprintf( '%s... %s', __fs( 'oops', $this->_slug ), strtolower( $error ) );
5519
+ }
5520
+
5521
+ echo json_encode( $licenses );
5522
+
5523
+ exit;
5524
+ }
5525
+
5526
+ #region URL Generators
5527
+
5528
+ /**
5529
+ * Alias to pricing_url().
5530
+ *
5531
+ * @author Vova Feldman (@svovaf)
5532
+ * @since 1.0.2
5533
+ *
5534
+ * @uses pricing_url()
5535
+ *
5536
+ * @param string $period Billing cycle
5537
+ * @param bool $is_trial
5538
+ *
5539
+ * @return string
5540
+ */
5541
+ function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY, $is_trial = false ) {
5542
+ return $this->pricing_url( $period, $is_trial );
5543
+ }
5544
+
5545
+ /**
5546
+ * @author Vova Feldman (@svovaf)
5547
  * @since 1.0.9
5548
  *
5549
  * @uses get_upgrade_url()
5737
  return ( defined( 'DOING_AJAX' ) && DOING_AJAX );
5738
  }
5739
 
5740
+ /**
5741
+ * Check if it's an AJAX call targeted for the current module.
5742
+ *
5743
+ * @author Vova Feldman (@svovaf)
5744
+ * @since 1.2.0
5745
+ *
5746
+ * @param array|string $actions Collection of AJAX actions.
5747
+ *
5748
+ * @return bool
5749
+ */
5750
+ function is_ajax_action( $actions ) {
5751
+ // Verify it's an ajax call.
5752
+ if ( ! $this->is_ajax() ) {
5753
+ return false;
5754
+ }
5755
+
5756
+ // Verify the call is relevant for the plugin.
5757
+ if ( $this->_slug !== fs_request_get( 'slug' ) ) {
5758
+ return false;
5759
+ }
5760
+
5761
+ // Verify it's one of the specified actions.
5762
+ if ( is_string( $actions ) ) {
5763
+ $actions = explode( ',', $actions );
5764
+ }
5765
+
5766
+ if ( is_array( $actions ) && 0 < count( $actions ) ) {
5767
+ $ajax_action = fs_request_get( 'action' );
5768
+
5769
+ foreach ( $actions as $action ) {
5770
+ if ( $ajax_action === $this->get_action_tag( $action ) ) {
5771
+ return true;
5772
+ }
5773
+ }
5774
+ }
5775
+
5776
+ return false;
5777
+ }
5778
+
5779
  /**
5780
  * @author Vova Feldman (@svovaf)
5781
  * @since 1.1.7
5822
  * @return string
5823
  */
5824
  function _get_admin_page_url( $page = '', $params = array() ) {
5825
+ if ( 0 < count( $params ) ) {
5826
+ foreach ( $params as $k => $v ) {
5827
+ $params[ $k ] = urlencode( $v );
5828
+ }
5829
+ }
5830
+
5831
  if ( ! $this->_menu->is_top_level() ) {
5832
  $parent_slug = $this->_menu->get_parent_slug();
5833
  $menu_file = ( false !== strpos( $parent_slug, '.php' ) ) ?
5858
  }
5859
  }
5860
 
5861
+ /**
5862
+ * Plugin's account page + sync license URL.
5863
+ *
5864
+ * @author Vova Feldman (@svovaf)
5865
+ * @since 1.1.9.1
5866
+ *
5867
+ * @param bool|number $plugin_id
5868
+ * @param bool $add_action_nonce
5869
+ *
5870
+ * @return string
5871
+ */
5872
+ function _get_sync_license_url( $plugin_id = false, $add_action_nonce = true ) {
5873
+ $params = array();
5874
+
5875
+ if ( is_numeric( $plugin_id ) ) {
5876
+ $params['plugin_id'] = $plugin_id;
5877
+ }
5878
+
5879
+ return $this->get_account_url(
5880
+ $this->_slug . '_sync_license',
5881
+ $params,
5882
+ $add_action_nonce
5883
+ );
5884
+ }
5885
 
5886
  /**
5887
  * Plugin's account URL.
5908
  $this->_get_admin_page_url( 'account', $params );
5909
  }
5910
 
5911
+ /**
5912
+ * @author Vova Feldman (@svovaf)
5913
+ * @since 1.2.0
5914
+ *
5915
+ * @param string $tab
5916
+ * @param bool $action
5917
+ * @param array $params
5918
+ * @param bool $add_action_nonce
5919
+ *
5920
+ * @return string
5921
+ *
5922
+ * @uses get_account_url()
5923
+ */
5924
+ function get_account_tab_url( $tab, $action = false, $params = array(), $add_action_nonce = true ) {
5925
+ $params['tab'] = $tab;
5926
+
5927
+ return $this->get_account_url( $action, $params, $add_action_nonce );
5928
+ }
5929
+
5930
  /**
5931
  * Plugin's account URL.
5932
  *
6293
  * @param string|bool $first
6294
  * @param string|bool $last
6295
  * @param string|bool $license_key
6296
+ * @param bool $is_uninstall If "true", this means that the module is currently being uninstalled.
6297
+ * In this case, the user and site info will be sent to the server but no
6298
+ * data will be saved to the WP installation's database.
6299
  *
6300
  * @return bool Is successful opt-in (or set to pending).
6301
+ *
6302
+ * @use WP_Error
6303
  */
6304
+ function opt_in(
6305
+ $email = false,
6306
+ $first = false,
6307
+ $last = false,
6308
+ $license_key = false,
6309
+ $is_uninstall = false
6310
+ ) {
6311
  $this->_logger->entrance();
6312
 
6313
  if ( false === $email ) {
6315
  $email = $current_user->user_email;
6316
  }
6317
 
6318
+ /**
6319
+ * @since 1.2.1 If activating with license key, ignore the context-user
6320
+ * since the user will be automatically loaded from the license.
6321
+ */
6322
+ if (empty($license_key)) {
6323
+ if ( ! $is_uninstall ) {
6324
+ $fs_user = Freemius::_get_user_by_email( $email );
6325
+ if ( is_object( $fs_user ) && ! $this->is_pending_activation() ) {
6326
+ return $this->install_with_current_user( false );
6327
+ }
6328
+ }
6329
  }
6330
 
6331
  $user_info = array();
6341
 
6342
  $params = $this->get_opt_in_params( $user_info );
6343
 
6344
+ if ( is_string( $license_key ) ) {
6345
+ $params['license_secret_key'] = $license_key;
6346
+ }
6347
+
6348
+ if ( $is_uninstall ) {
6349
+ $params['uninstall_params'] = array(
6350
+ 'reason_id' => $this->_storage->uninstall_reason->id,
6351
+ 'reason_info' => $this->_storage->uninstall_reason->info
6352
+ );
6353
  }
6354
 
6355
  $params['format'] = 'json';
6390
  return false;
6391
  }
6392
 
6393
+ // Module is being uninstalled, don't handle the returned data.
6394
+ if ( $is_uninstall ) {
6395
+ return true;
6396
+ }
6397
+
6398
  $decoded = @json_decode( $response['body'] );
6399
 
6400
  if ( empty( $decoded ) ) {
6402
  }
6403
 
6404
  if ( isset( $decoded->error ) ) {
6405
+ return $decoded;
6406
  } else if ( isset( $decoded->pending_activation ) && $decoded->pending_activation ) {
6407
  // Pending activation, add message.
6408
  $this->set_pending_confirmation( false, false );
6422
  return true;
6423
  }
6424
 
6425
+ return $decoded;
6426
  }
6427
 
6428
  /**
6461
  $this->_license = $this->_get_license_by_id( $site->license_id );
6462
  }
6463
 
6464
+ $this->_admin_notices->remove_sticky( 'connect_account' );
6465
+
6466
  if ( $this->is_pending_activation() ) {
6467
  // Remove pending activation sticky notice (if still exist).
6468
  $this->_admin_notices->remove_sticky( 'activation_pending' );
6483
  sprintf(
6484
  __fs( 'activation-with-plan-x-message', $this->_slug ),
6485
  $this->_site->plan->title
6486
+ ) . $this->get_complete_upgrade_instructions(),
 
 
 
6487
  'plan_upgraded',
6488
  __fs( 'yee-haw', $this->_slug ) . '!'
6489
  );
6499
  if ( is_numeric( $plugin_id ) ) {
6500
  if ( $plugin_id != $this->_plugin->id ) {
6501
  // Add-on was installed - sync license right after install.
6502
+ if ( $redirect && fs_redirect( $this->_get_sync_license_url( $plugin_id ) )
 
 
 
 
 
 
6503
  ) {
6504
  exit();
6505
  }
6537
  if ( fs_request_is_action( $this->_slug . '_activate_new' ) ) {
6538
  // check_admin_referer( $this->_slug . '_activate_new' );
6539
 
 
 
6540
  if ( fs_request_has( 'user_secret_key' ) ) {
6541
  $this->install_with_new_user(
6542
  fs_request_get( 'user_id' ),
6643
  * @since 1.1.7.4
6644
  *
6645
  * @param bool $redirect
6646
+ *
6647
+ * @return object|string
6648
  */
6649
  private function install_with_current_user( $redirect = true ) {
 
 
6650
  // Get current logged WP user.
6651
  $current_user = self::_get_current_wp_user();
6652
 
6667
  $license_key = fs_request_get( 'license_secret_key' );
6668
 
6669
  if ( ! empty( $license_key ) ) {
6670
+ $extra_install_params['license_key'] = $license_key;
6671
  }
6672
 
6673
  // Install the plugin.
6677
  $this->get_install_data_for_api( $extra_install_params, false, false )
6678
  );
6679
 
6680
+ if ( $this->is_api_error($install) ) {
6681
  $this->_admin_notices->add(
6682
  sprintf( __fs( 'could-not-activate-x', $this->_slug ), $this->get_plugin_name() ) . ' ' .
6683
  __fs( 'contact-us-with-error-message', $this->_slug ) . ' ' . '<b>' . $install->error->message . '</b>',
6685
  'error'
6686
  );
6687
 
6688
+ if ( $redirect && fs_redirect( $this->get_activation_url( array('error' => $install->error->message) ) )
6689
+ ) {
6690
+ exit();
6691
+ }
6692
+
6693
+ return $install;
6694
  }
6695
 
6696
  $site = new FS_Site( $install );
6701
  // $this->_sync_plans();
6702
 
6703
  $this->setup_account( $this->_user, $this->_site, $redirect );
6704
+
6705
+ return $install;
6706
  }
6707
 
6708
  /**
6789
  if ( ! $this->has_api_connectivity() && ! $this->is_enable_anonymous() ) {
6790
  $this->_menu->remove_menu_item();
6791
  } else {
6792
+ $this->do_action( 'before_admin_menu_init' );
6793
+
6794
  $this->add_menu_action();
6795
  $this->add_submenu_items();
6796
  }
6924
  }
6925
  }
6926
 
6927
+ /**
6928
+ * @author Leo Fajardo (leorw)
6929
+ * @since 1.2.1
6930
+ *
6931
+ * return string
6932
+ */
6933
+ function get_top_level_menu_capability() {
6934
+ global $menu;
6935
+
6936
+ $top_level_menu_slug = $this->get_top_level_menu_slug();
6937
+
6938
+ foreach ( $menu as $menu_info ) {
6939
+ /**
6940
+ * The second element in the menu info array is the capability/role that has access to the menu and the
6941
+ * third element is the menu slug.
6942
+ */
6943
+ if ( $menu_info[2] === $top_level_menu_slug ) {
6944
+ return $menu_info[1];
6945
+ }
6946
+ }
6947
+
6948
+ return 'read';
6949
+ }
6950
+
6951
  /**
6952
  * @author Vova Feldman (@svovaf)
6953
  * @since 1.0.0
6969
  private function add_submenu_items() {
6970
  $this->_logger->entrance();
6971
 
 
 
6972
  if ( ! $this->is_addon() ) {
6973
  if ( ! $this->is_activation_mode() ) {
6974
  if ( $this->is_registered() ) {
7056
  '<span class="fs-submenu-item">%s</span>' :
7057
  '<span class="fs-submenu-item fs-sub">%s</span>';
7058
 
7059
+ $top_level_menu_capability = $this->get_top_level_menu_capability();
7060
+
7061
  ksort( $this->_menu_items );
7062
 
7063
  foreach ( $this->_menu_items as $priority => $items ) {
7064
  foreach ( $items as $item ) {
7065
+ $capability = ( ! empty( $item['capability'] ) ? $item['capability'] : $top_level_menu_capability );
7066
+
7067
  if ( ! isset( $item['url'] ) ) {
7068
  $hook = add_submenu_page(
7069
  $item['show_submenu'] ?
7071
  null,
7072
  $item['page_title'],
7073
  sprintf( $item_template, $item['menu_title'] ),
7074
+ $capability,
7075
  $item['menu_slug'],
7076
  $item['render_function']
7077
  );
7084
  $this->get_top_level_menu_slug(),
7085
  $item['page_title'],
7086
  sprintf( $item_template, $item['menu_title'] ),
7087
+ $capability,
7088
  $item['menu_slug'],
7089
  array( $this, '' )
7090
  );
7105
 
7106
  $menu_slug = $this->_menu->get_top_level_menu_slug();
7107
 
7108
+ /**
7109
+ * Before "admin_menu" fires, WordPress will loop over the default submenus and remove pages for which the user
7110
+ * does not have permissions. So in case a plugin does not have top-level menu but does have submenus under any
7111
+ * of the default menus, only users that have the right role can access its sub-submenus (Account, Contact Us,
7112
+ * Support Forum, etc.) since $submenu[ $menu_slug ] will be empty if the user doesn't have permission.
7113
+ *
7114
+ * In case a plugin does not have submenus under any of the default menus but does have submenus under the menu
7115
+ * of another plugin, only users that have the right role can access its sub-submenus since we will use the
7116
+ * capability needed to access the parent menu as the capability for the submenus that we will add.
7117
+ */
7118
  if ( empty( $submenu[ $menu_slug ] ) ) {
7119
  return;
7120
  }
7178
  $this->apply_filters( 'support_forum_submenu', __fs( 'support-forum', $this->_slug ) ),
7179
  $this->apply_filters( 'support_forum_url', 'https://wordpress.org/support/plugin/' . $this->_slug ),
7180
  'wp-support-forum',
7181
+ null,
7182
  50
7183
  );
7184
  }
7307
  *
7308
  * @return string
7309
  */
7310
+ public function get_action_tag( $tag ) {
7311
+ return "fs_{$tag}_{$this->_slug}";
7312
+ }
7313
+
7314
+ /**
7315
+ * @author Vova Feldman (@svovaf)
7316
+ * @since 1.2.1
7317
+ *
7318
+ * @param string $tag
7319
+ *
7320
+ * @return string
7321
+ */
7322
+ private function get_ajax_action_tag( $tag ) {
7323
+ return 'wp_ajax_' . $this->get_action_tag( $tag );
7324
  }
7325
 
7326
  /**
7365
  add_action( $this->get_action_tag( $tag ), $function_to_add, $priority, $accepted_args );
7366
  }
7367
 
7368
+ /**
7369
+ * Add AJAX action, specific for the current context plugin.
7370
+ *
7371
+ * @author Vova Feldman (@svovaf)
7372
+ * @since 1.2.1
7373
+ *
7374
+ * @param string $tag
7375
+ * @param callable $function_to_add
7376
+ * @param int $priority
7377
+ * @param int $accepted_args
7378
+ *
7379
+ * @uses add_action()
7380
+ */
7381
+ function add_ajax_action( $tag, $function_to_add, $priority = WP_FS__DEFAULT_PRIORITY, $accepted_args = 1 ) {
7382
+ $this->_logger->entrance( $tag );
7383
+
7384
+ add_action( $this->get_ajax_action_tag( $tag ), $function_to_add, $priority, $accepted_args );
7385
+ }
7386
+
7387
  /**
7388
  * Apply filter, specific for the current context plugin.
7389
  *
7712
  }
7713
  }
7714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7715
  /**
7716
  * @param bool $store
7717
  *
7835
  * @uses FS_Api
7836
  *
7837
  * @param number|bool $plugin_id
7838
+ * @param number|bool $site_license_id
7839
  *
7840
  * @return FS_Plugin_License[]|object
7841
  */
7842
+ private function _fetch_licenses( $plugin_id = false, $site_license_id = false ) {
7843
  $this->_logger->entrance();
7844
 
7845
  $api = $this->get_api_user_scope();
7850
 
7851
  $result = $api->get( "/plugins/{$plugin_id}/licenses.json", true );
7852
 
7853
+ $is_site_license_synced = false;
7854
+
7855
  if ( ! isset( $result->error ) ) {
7856
  for ( $i = 0, $len = count( $result->licenses ); $i < $len; $i ++ ) {
7857
  $result->licenses[ $i ] = new FS_Plugin_License( $result->licenses[ $i ] );
7858
+
7859
+ if ( ( ! $is_site_license_synced ) && is_numeric( $site_license_id ) ) {
7860
+ $is_site_license_synced = ( $site_license_id == $result->licenses[ $i ]->id );
7861
+ }
7862
  }
7863
 
7864
  $result = $result->licenses;
7865
  }
7866
 
7867
+ if ( ! $is_site_license_synced ) {
7868
+ $api = $this->get_api_site_scope();
7869
+
7870
+ if ( is_numeric( $site_license_id ) ) {
7871
+ // Try to retrieve a foreign license that is linked to the install.
7872
+ $api_result = $api->call( '/licenses.json' );
7873
+
7874
+ if ( ! isset( $api_result->error ) ) {
7875
+ $licenses = $api_result->licenses;
7876
+
7877
+ if ( ! empty( $licenses ) ) {
7878
+ $result[] = new FS_Plugin_License( $licenses[0] );
7879
+ }
7880
+ }
7881
+ } else if ( is_object( $this->_license ) ) {
7882
+ // Fetch foreign license by ID and license key.
7883
+ $license = $api->get( "/licenses/{$this->_license->id}.json?license_key=" .
7884
+ urlencode( $this->_license->secret_key ) );
7885
+
7886
+ if ( ! isset( $license->error ) ) {
7887
+ $result[] = new FS_Plugin_License( $license );
7888
+ }
7889
+ }
7890
+ }
7891
+
7892
+ return $result;
7893
+ }
7894
+
7895
+ /**
7896
+ * @author Vova Feldman (@svovaf)
7897
+ * @since 1.2.0
7898
+ * @uses FS_Api
7899
+ *
7900
+ * @param number|bool $plugin_id
7901
+ *
7902
+ * @return FS_Payment[]|object
7903
+ */
7904
+ function _fetch_payments( $plugin_id = false ) {
7905
+ $this->_logger->entrance();
7906
+
7907
+ $api = $this->get_api_user_scope();
7908
+
7909
+ if ( ! is_numeric( $plugin_id ) ) {
7910
+ $plugin_id = $this->_plugin->id;
7911
+ }
7912
+
7913
+ $result = $api->get( "/plugins/{$plugin_id}/payments.json", true );
7914
+
7915
+ if ( ! isset( $result->error ) ) {
7916
+ for ( $i = 0, $len = count( $result->payments ); $i < $len; $i ++ ) {
7917
+ $result->payments[ $i ] = new FS_Payment( $result->payments[ $i ] );
7918
+ }
7919
+ $result = $result->payments;
7920
+ }
7921
+
7922
  return $result;
7923
  }
7924
 
8012
  /**
8013
  * Check if site assigned with active license.
8014
  *
8015
+ * @author Vova Feldman (@svovaf)
8016
+ * @since 1.0.6
8017
+ *
8018
+ * @deprecated Please use has_active_valid_license() instead because license can be cancelled.
8019
  */
8020
  function has_active_license() {
8021
  return (
8025
  );
8026
  }
8027
 
8028
+ /**
8029
+ * Check if site assigned with active & valid (not expired) license.
8030
+ *
8031
+ * @author Vova Feldman (@svovaf)
8032
+ * @since 1.2.1
8033
+ */
8034
+ function has_active_valid_license() {
8035
+ return (
8036
+ is_object( $this->_license ) &&
8037
+ is_numeric( $this->_license->id ) &&
8038
+ $this->_license->is_active() &&
8039
+ $this->_license->is_valid()
8040
+ );
8041
+ }
8042
+
8043
  /**
8044
  * Check if site assigned with license with enabled features.
8045
  *
8186
  private function _sync_plugin_license( $background = false ) {
8187
  $this->_logger->entrance();
8188
 
8189
+ /**
8190
+ * Sync site info.
8191
+ *
8192
+ * @todo This line will execute install sync on a daily basis, even if running the free version (for opted-in users). The reason we want to keep it that way is for cases when the user was a paying customer, then there was a failure in subscription payment, and then after some time the payment was successful. This could be heavily optimized. For example, we can skip the $flush if the current install was never associated with a paid version.
8193
+ */
8194
  $site = $this->send_install_update( array(), true );
8195
 
8196
  $plan_change = 'none';
8249
  $this->_enrich_site_plan( true );
8250
  $this->_store_site();
8251
  } else {
8252
+ /**
8253
+ * Sync licenses. Pass the site's license ID so that the foreign licenses will be fetched if the license
8254
+ * associated with that ID is not included in the user's licenses collection.
8255
+ */
8256
+ $this->_sync_licenses( $site->license_id );
8257
 
8258
  // Check if plan / license changed.
8259
  if ( ! FS_Entity::equals( $site->plan, $this->_site->plan ) ||
8274
  // For trial with subscription use-case.
8275
  $new_license = is_null( $site->license_id ) ? null : $this->_get_license_by_id( $site->license_id );
8276
 
8277
+ if ( is_object( $new_license ) && $new_license->is_valid() ) {
8278
  $this->_site = $site;
8279
  $this->_update_site_license( $new_license );
8280
  $this->_store_licenses();
8299
  null :
8300
  $this->_get_license_by_id( $site->license_id );
8301
 
8302
+ if ( $is_free && is_null( $new_license ) && $this->has_any_license() && $this->_license->is_cancelled ) {
8303
  // License cancelled.
8304
  $this->_site = $site;
8305
  $this->_update_site_license( $new_license );
8352
 
8353
  $this->_admin_notices->add(
8354
  sprintf(
8355
+ __fs( 'plan-did-not-change-message', $this->_slug ),
 
 
 
 
 
 
 
 
 
 
8356
  '<i><b>' . $plan->title . ( $this->is_trial() ? ' ' . __fs( 'trial', $this->_slug ) : '' ) . '</b></i>'
8357
+ ) . ' ' . sprintf(
8358
+ '<a href="%s">%s</a>',
8359
+ $this->contact_url(
8360
+ 'bug',
8361
+ sprintf( __fs( 'plan-did-not-change-email-message', $this->_slug ),
8362
+ strtoupper( $plan->name )
8363
+ )
8364
+ ),
8365
+ __fs( 'contact-us-here', $this->_slug )
8366
  ),
8367
  __fs( 'hmm', $this->_slug ) . '...'
8368
  );
8373
  sprintf(
8374
  __fs( 'plan-upgraded-message', $this->_slug ),
8375
  '<i>' . $this->get_plugin_name() . '</i>'
8376
+ ) . $this->get_complete_upgrade_instructions(),
 
 
 
 
8377
  'plan_upgraded',
8378
  __fs( 'yee-haw', $this->_slug ) . '!'
8379
  );
8435
  sprintf(
8436
  __fs( 'trial-started-message', $this->_slug ),
8437
  '<i>' . $this->get_plugin_name() . '</i>'
8438
+ ) . $this->get_complete_upgrade_instructions( $this->_storage->trial_plan->title ),
 
 
 
8439
  'trial_started',
8440
  __fs( 'yee-haw', $this->_slug ) . '!'
8441
  );
8503
  return;
8504
  }
8505
 
8506
+ if ( $this->_site->user_id != $premium_license->user_id ) {
8507
+ $api_request_params = array( 'license_key' => $premium_license->secret_key );
8508
+ } else {
8509
+ $api_request_params = array();
8510
+ }
8511
+
8512
  $api = $this->get_api_site_scope();
8513
+ $license = $api->call( "/licenses/{$premium_license->id}.json", 'put', $api_request_params );
8514
 
8515
  if ( $this->is_api_error( $license ) ) {
8516
  if ( ! $background ) {
8517
+ $this->_admin_notices->add( sprintf(
8518
+ '%s %s',
8519
+ __fs( 'license-activation-failed-message', $this->_slug ),
8520
+ ( is_object( $license ) && isset( $license->error ) ?
8521
+ $license->error->message :
8522
+ sprintf( '%s<br><code>%s</code>',
8523
+ __fs( 'server-error-message', $this->_slug ),
8524
+ var_export( $license, true )
8525
+ )
8526
+ )
8527
+ ),
8528
  __fs( 'hmm', $this->_slug ) . '...',
8529
  'error'
8530
  );
8548
  if ( ! $background ) {
8549
  $this->_admin_notices->add_sticky(
8550
  __fs( 'license-activated-message', $this->_slug ) .
8551
+ $this->get_complete_upgrade_instructions(),
 
 
 
8552
  'license_activated',
8553
  __fs( 'yee-haw', $this->_slug ) . '!'
8554
  );
8870
  * @return bool
8871
  */
8872
  private function _can_download_premium() {
8873
+ return $this->has_active_valid_license() ||
8874
  ( $this->is_trial() && ! $this->get_trial_plan()->is_free() );
8875
  }
8876
 
8938
 
8939
  #region Download Plugin ------------------------------------------------------------------
8940
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8941
  /**
8942
  * Download latest plugin version, based on plan.
8943
  *
8977
  );
8978
  }
8979
 
8980
+ /**
8981
+ * Get payment invoice URL.
8982
+ *
8983
+ * @author Vova Feldman (@svovaf)
8984
+ * @since 1.2.0
8985
+ *
8986
+ * @param bool|number $payment_id
8987
+ *
8988
+ * @return string
8989
+ */
8990
+ function _get_invoice_api_url( $payment_id = false ) {
8991
+ $this->_logger->entrance();
8992
+
8993
+ return $this->get_api_user_scope()->get_signed_url(
8994
+ "/payments/{$payment_id}/invoice.pdf"
8995
+ );
8996
+ }
8997
+
8998
  /**
8999
  * Get latest plugin download link.
9000
  *
9086
  * @author Vova Feldman (@svovaf)
9087
  * @since 1.0.4
9088
  *
9089
+ * @param bool $flush Since 1.1.7.3 add 24 hour cache by default.
9090
  *
9091
  * @return FS_Plugin[]
9092
  *
9095
  private function _sync_addons( $flush = false ) {
9096
  $this->_logger->entrance();
9097
 
9098
+ $api = $this->get_api_site_or_plugin_scope();
9099
+
9100
+ /**
9101
+ * @since 1.2.1
9102
+ *
9103
+ * If there's a cached version of the add-ons and not asking
9104
+ * for a flush, just use the currently stored add-ons.
9105
+ */
9106
+ if ( ! $flush && $api->is_cached( '/addons.json?enriched=true' ) ) {
9107
+ $addons = self::get_all_addons();
9108
+
9109
+ return $addons[ $this->_plugin->id ];
9110
+ }
9111
+
9112
+ $result = $api->get( '/addons.json?enriched=true', $flush );
9113
 
9114
  $addons = array();
9115
  if ( ! $this->is_api_error( $result ) ) {
9303
  * @author Vova Feldman (@svovaf)
9304
  * @since 1.1.2
9305
  *
9306
+ * @param array $params
9307
+ *
9308
  * @return string
9309
  */
9310
+ private function get_activation_url( $params = array() ) {
9311
+ return $this->apply_filters( 'connect_url', $this->_get_admin_page_url( '', $params ) );
9312
  }
9313
 
9314
  /**
9610
  $this->_logger->entrance();
9611
 
9612
  $vars = array( 'slug' => $this->_slug );
9613
+ if ( 'billing' === fs_request_get( 'tab' ) ) {
9614
+ fs_require_once_template( 'billing.php', $vars );
9615
+ } else {
9616
+ fs_require_once_template( 'account.php', $vars );
9617
+ }
9618
  }
9619
 
9620
  /**
9953
  private $_action_links_hooked = false;
9954
  private $_action_links = array();
9955
 
 
 
 
 
 
 
 
 
 
 
 
 
9956
  /**
9957
  * Hook to plugin action links filter.
9958
  *
10049
  function _add_license_action_link() {
10050
  $this->_logger->entrance();
10051
 
10052
+ if ( $this->is_free_plan() && $this->is_addon() ) {
10053
+ return;
10054
+ }
10055
+
10056
+ $link_text = __fs(
10057
+ $this->is_free_plan() ? 'activate-license' : 'change-license',
10058
+ $this->_slug
10059
+ );
10060
 
10061
  $this->add_plugin_action_link(
10062
  $link_text,
10208
  $this->_admin_notices->add_sticky( $message, $id, $title, $type );
10209
  }
10210
 
10211
+ /**
10212
+ * Helper function that returns the final steps for the upgrade completion.
10213
+ *
10214
+ * If the module is already running the premium code, returns an empty string.
10215
+ *
10216
+ * @author Vova Feldman (@svovaf)
10217
+ * @since 1.2.1
10218
+ *
10219
+ * @param string $plan_title
10220
+ *
10221
+ * @return string
10222
+ */
10223
+ private function get_complete_upgrade_instructions( $plan_title = '' ) {
10224
+ if ( $this->is_premium() ) {
10225
+ return '';
10226
+ }
10227
+
10228
+ if ( empty( $plan_title ) ) {
10229
+ $plan_title = $this->_site->plan->title;
10230
+ }
10231
+
10232
+ return sprintf(
10233
+ ' %s: <ol><li>%s.</li><li>%s.</li><li>%s (<a href="%s" target="_blank">%s</a>).</li></ol>',
10234
+ __fs( 'follow-steps-to-complete-upgrade', $this->_slug ),
10235
+ $this->_get_latest_download_link( sprintf(
10236
+ __fs( 'download-latest-x-version', $this->_slug ),
10237
+ $plan_title
10238
+ ) ),
10239
+ __fs( 'deactivate-free-version', $this->_slug ),
10240
+ __fs( 'upload-and-activate', $this->_slug ),
10241
+ '//bit.ly/upload-wp-plugin',
10242
+ __fs( 'howto-upload-activate', $this->_slug )
10243
+ );
10244
+ }
10245
+
10246
  /* Plugin Auto-Updates (@since 1.0.4)
10247
  ------------------------------------------------------------------------------------------------------------------*/
10248
  /**
includes/libs/freemius/includes/class-fs-api.php CHANGED
@@ -258,11 +258,38 @@
258
  return $cached_result;
259
  }
260
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  private function get_cache_key( $path, $method = 'GET', $params = array() ) {
262
  $canonized = $this->_api->CanonizePath( $path );
263
  // $exploded = explode('/', $canonized);
264
  // return $method . '_' . array_pop($exploded) . '_' . md5($canonized . json_encode($params));
265
- return $method . ':' . $canonized . ( ! empty( $params ) ? '#' . md5( json_encode( $params ) ) : '' );
266
  }
267
 
268
  /**
258
  return $cached_result;
259
  }
260
 
261
+ /**
262
+ * Check if there's a cached version of the API request.
263
+ *
264
+ * @author Vova Feldman (@svovaf)
265
+ * @since 1.2.1
266
+ *
267
+ * @param string $path
268
+ * @param string $method
269
+ * @param array $params
270
+ *
271
+ * @return bool
272
+ */
273
+ function is_cached( $path, $method = 'GET', $params = array() )
274
+ {
275
+ $cache_key = $this->get_cache_key( $path, $method, $params );
276
+
277
+ return self::$_cache->has_valid( $cache_key );
278
+ }
279
+
280
+ /**
281
+ * @param string $path
282
+ * @param string $method
283
+ * @param array $params
284
+ *
285
+ * @return string
286
+ * @throws \Freemius_Exception
287
+ */
288
  private function get_cache_key( $path, $method = 'GET', $params = array() ) {
289
  $canonized = $this->_api->CanonizePath( $path );
290
  // $exploded = explode('/', $canonized);
291
  // return $method . '_' . array_pop($exploded) . '_' . md5($canonized . json_encode($params));
292
+ return strtolower($method . ':' . $canonized) . ( ! empty( $params ) ? '#' . md5( json_encode( $params ) ) : '' );
293
  }
294
 
295
  /**
includes/libs/freemius/includes/class-fs-plugin-updater.php CHANGED
@@ -57,7 +57,7 @@
57
  'pre_set_site_transient_update_plugins_filter'
58
  ) );
59
 
60
- if ( ! $this->_fs->has_active_license() ) {
61
  /**
62
  * If user has the premium plugin's code but do NOT have an active license,
63
  * encourage him to upgrade by showing that there's a new release, but instead
@@ -100,6 +100,9 @@
100
  *
101
  * @author Vova Feldman (@svovaf)
102
  * @since 1.1.6
 
 
 
103
  */
104
  function edit_and_echo_plugin_update_row( $file, $plugin_data ) {
105
  $plugin_update_row = ob_get_clean();
@@ -108,7 +111,7 @@
108
  if ( ! isset( $current->response[ $file ] ) ) {
109
  echo $plugin_update_row;
110
 
111
- return false;
112
  }
113
 
114
  $r = $current->response[ $file ];
57
  'pre_set_site_transient_update_plugins_filter'
58
  ) );
59
 
60
+ if ( ! $this->_fs->has_active_valid_license() ) {
61
  /**
62
  * If user has the premium plugin's code but do NOT have an active license,
63
  * encourage him to upgrade by showing that there's a new release, but instead
100
  *
101
  * @author Vova Feldman (@svovaf)
102
  * @since 1.1.6
103
+ *
104
+ * @param string $file
105
+ * @param array $plugin_data
106
  */
107
  function edit_and_echo_plugin_update_row( $file, $plugin_data ) {
108
  $plugin_update_row = ob_get_clean();
111
  if ( ! isset( $current->response[ $file ] ) ) {
112
  echo $plugin_update_row;
113
 
114
+ return;
115
  }
116
 
117
  $r = $current->response[ $file ];
includes/libs/freemius/includes/class-fs-security.php CHANGED
@@ -27,7 +27,11 @@
27
  public static function instance() {
28
  if ( ! isset( self::$_instance ) ) {
29
  self::$_instance = new FS_Security();
30
- self::$_logger = FS_Logger::get_logger( WP_FS__SLUG, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
 
 
 
 
31
  }
32
 
33
  return self::$_instance;
@@ -36,6 +40,13 @@
36
  private function __construct() {
37
  }
38
 
 
 
 
 
 
 
 
39
  function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
40
  return md5(
41
  $timestamp .
@@ -46,6 +57,13 @@
46
  );
47
  }
48
 
 
 
 
 
 
 
 
49
  function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
50
  if ( false === $timestamp ) {
51
  $timestamp = time();
27
  public static function instance() {
28
  if ( ! isset( self::$_instance ) ) {
29
  self::$_instance = new FS_Security();
30
+ self::$_logger = FS_Logger::get_logger(
31
+ WP_FS__SLUG,
32
+ WP_FS__DEBUG_SDK,
33
+ WP_FS__ECHO_DEBUG_SDK
34
+ );
35
  }
36
 
37
  return self::$_instance;
40
  private function __construct() {
41
  }
42
 
43
+ /**
44
+ * @param \FS_Scope_Entity $entity
45
+ * @param int $timestamp
46
+ * @param string $action
47
+ *
48
+ * @return string
49
+ */
50
  function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
51
  return md5(
52
  $timestamp .
57
  );
58
  }
59
 
60
+ /**
61
+ * @param \FS_Scope_Entity $entity
62
+ * @param int|bool $timestamp
63
+ * @param string $action
64
+ *
65
+ * @return array
66
+ */
67
  function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
68
  if ( false === $timestamp ) {
69
  $timestamp = time();
includes/libs/freemius/includes/entities/class-fs-entity.php CHANGED
@@ -39,7 +39,7 @@
39
  public $created;
40
 
41
  /**
42
- * @param bool|stdClass $entity
43
  */
44
  function __construct( $entity = false ) {
45
  if ( ! ( $entity instanceof stdClass ) ) {
39
  public $created;
40
 
41
  /**
42
+ * @param bool|object $entity
43
  */
44
  function __construct( $entity = false ) {
45
  if ( ! ( $entity instanceof stdClass ) ) {
includes/libs/freemius/includes/entities/class-fs-payment.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Payment extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var number
19
+ */
20
+ public $plugin_id;
21
+ /**
22
+ * @var number
23
+ */
24
+ public $user_id;
25
+ /**
26
+ * @var number
27
+ */
28
+ public $install_id;
29
+ /**
30
+ * @var number
31
+ */
32
+ public $subscription_id;
33
+ /**
34
+ * @var number
35
+ */
36
+ public $plan_id;
37
+ /**
38
+ * @var number
39
+ */
40
+ public $license_id;
41
+ /**
42
+ * @var float
43
+ */
44
+ public $gross;
45
+ /**
46
+ * @var number
47
+ */
48
+ public $bound_payment_id;
49
+ /**
50
+ * @var string
51
+ */
52
+ public $external_id;
53
+ /**
54
+ * @var string
55
+ */
56
+ public $gateway;
57
+ /**
58
+ * @var string ISO 3166-1 alpha-2 - two-letter country code.
59
+ *
60
+ * @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
61
+ */
62
+ public $country_code;
63
+ /**
64
+ * @var string
65
+ */
66
+ public $vat_id;
67
+ /**
68
+ * @var float Actual Tax / VAT in $$$
69
+ */
70
+ public $vat;
71
+
72
+ #endregion Properties
73
+
74
+ /**
75
+ * @param object|bool $payment
76
+ */
77
+ function __construct( $payment = false ) {
78
+ parent::__construct( $payment );
79
+ }
80
+
81
+ static function get_type() {
82
+ return 'payment';
83
+ }
84
+
85
+ /**
86
+ * @author Vova Feldman (@svovaf)
87
+ * @since 1.0.0
88
+ *
89
+ * @return bool
90
+ */
91
+ function is_refund() {
92
+ return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
93
+ }
94
+ }
includes/libs/freemius/includes/entities/class-fs-plugin-license.php CHANGED
@@ -46,6 +46,10 @@
46
  * @var string
47
  */
48
  public $expiration;
 
 
 
 
49
  /**
50
  * @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
51
  * license.
@@ -83,10 +87,14 @@
83
  * @return int
84
  */
85
  function left() {
86
- if ( $this->is_expired() ) {
87
  return 0;
88
  }
89
 
 
 
 
 
90
  return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
91
  }
92
 
@@ -112,6 +120,18 @@
112
  return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
113
  }
114
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  /**
116
  * @author Vova Feldman (@svovaf)
117
  * @since 1.0.6
@@ -122,6 +142,16 @@
122
  return is_null( $this->expiration );
123
  }
124
 
 
 
 
 
 
 
 
 
 
 
125
  /**
126
  * Check if license is fully utilized.
127
  *
@@ -137,10 +167,24 @@
137
  $is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
138
  }
139
 
 
 
 
 
140
  return ! ( $this->is_free_localhost && $is_localhost ) &&
141
  ( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
142
  }
143
 
 
 
 
 
 
 
 
 
 
 
144
  /**
145
  * Check if license's plan features are enabled.
146
  *
@@ -153,7 +197,7 @@
153
  * @return bool
154
  */
155
  function is_features_enabled() {
156
- return ( ! $this->is_block_features || ! $this->is_expired() );
157
  }
158
 
159
  /**
46
  * @var string
47
  */
48
  public $expiration;
49
+ /**
50
+ * @var string
51
+ */
52
+ public $secret_key;
53
  /**
54
  * @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
55
  * license.
87
  * @return int
88
  */
89
  function left() {
90
+ if ( ! $this->is_active() || $this->is_expired() ) {
91
  return 0;
92
  }
93
 
94
+ if ( $this->is_unlimited() ) {
95
+ return 999;
96
+ }
97
+
98
  return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
99
  }
100
 
120
  return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
121
  }
122
 
123
+ /**
124
+ * Check if license is not expired.
125
+ *
126
+ * @author Vova Feldman (@svovaf)
127
+ * @since 1.2.1
128
+ *
129
+ * @return bool
130
+ */
131
+ function is_valid() {
132
+ return ! $this->is_expired();
133
+ }
134
+
135
  /**
136
  * @author Vova Feldman (@svovaf)
137
  * @since 1.0.6
142
  return is_null( $this->expiration );
143
  }
144
 
145
+ /**
146
+ * @author Vova Feldman (@svovaf)
147
+ * @since 1.2.0
148
+ *
149
+ * @return bool
150
+ */
151
+ function is_unlimited() {
152
+ return is_null( $this->quota );
153
+ }
154
+
155
  /**
156
  * Check if license is fully utilized.
157
  *
167
  $is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
168
  }
169
 
170
+ if ( $this->is_unlimited() ) {
171
+ return false;
172
+ }
173
+
174
  return ! ( $this->is_free_localhost && $is_localhost ) &&
175
  ( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
176
  }
177
 
178
+ /**
179
+ * @author Vova Feldman (@svovaf)
180
+ * @since 1.2.1
181
+ *
182
+ * @return bool
183
+ */
184
+ function is_active() {
185
+ return ( ! $this->is_cancelled );
186
+ }
187
+
188
  /**
189
  * Check if license's plan features are enabled.
190
  *
197
  * @return bool
198
  */
199
  function is_features_enabled() {
200
+ return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
201
  }
202
 
203
  /**
includes/libs/freemius/includes/entities/class-fs-plugin-plan.php CHANGED
@@ -10,6 +10,11 @@
10
  exit;
11
  }
12
 
 
 
 
 
 
13
  class FS_Plugin_Plan extends FS_Entity {
14
 
15
  #region Properties
@@ -111,6 +116,22 @@
111
  return ( 'free' === $this->name );
112
  }
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
  /**
115
  * @author Vova Feldman (@svovaf)
116
  * @since 1.0.9
10
  exit;
11
  }
12
 
13
+ /**
14
+ * Class FS_Plugin_Plan
15
+ *
16
+ * @property FS_Pricing[] $pricing
17
+ */
18
  class FS_Plugin_Plan extends FS_Entity {
19
 
20
  #region Properties
116
  return ( 'free' === $this->name );
117
  }
118
 
119
+ /**
120
+ * Checks if this plan supports "Technical Support".
121
+ *
122
+ * @author Leo Fajardo (leorw)
123
+ * @since 1.2.0
124
+ *
125
+ * @return bool
126
+ */
127
+ function has_technical_support() {
128
+ return ( ! empty( $this->support_email ) ||
129
+ ! empty( $this->support_skype ) ||
130
+ ! empty( $this->support_phone ) ||
131
+ ! empty( $this->is_success_manager )
132
+ );
133
+ }
134
+
135
  /**
136
  * @author Vova Feldman (@svovaf)
137
  * @since 1.0.9
includes/libs/freemius/includes/fs-core-functions.php CHANGED
@@ -19,6 +19,14 @@
19
  }
20
  }
21
 
 
 
 
 
 
 
 
 
22
  /* Url.
23
  --------------------------------------------------------------------------------------------*/
24
  function fs_get_url_daily_cache_killer() {
@@ -350,7 +358,7 @@
350
  return '';
351
  }
352
 
353
- // Urlencode both keys and values
354
  $keys = fs_urlencode_rfc3986( array_keys( $params ) );
355
  $values = fs_urlencode_rfc3986( array_values( $params ) );
356
  $params = array_combine( $keys, $values );
@@ -364,7 +372,9 @@
364
  $lower_param = strtolower( $parameter );
365
 
366
  // Skip ignore params.
367
- if ( in_array( $lower_param, $ignore_params ) || ( false !== $params_prefix && startsWith( $lower_param, $params_prefix ) ) ) {
 
 
368
  continue;
369
  }
370
 
19
  }
20
  }
21
 
22
+ if ( ! function_exists( 'starts_with' ) ) {
23
+ function starts_with( $haystack, $needle ) {
24
+ $length = strlen( $needle );
25
+
26
+ return ( substr( $haystack, 0, $length ) === $needle );
27
+ }
28
+ }
29
+
30
  /* Url.
31
  --------------------------------------------------------------------------------------------*/
32
  function fs_get_url_daily_cache_killer() {
358
  return '';
359
  }
360
 
361
+ // Url encode both keys and values
362
  $keys = fs_urlencode_rfc3986( array_keys( $params ) );
363
  $values = fs_urlencode_rfc3986( array_values( $params ) );
364
  $params = array_combine( $keys, $values );
372
  $lower_param = strtolower( $parameter );
373
 
374
  // Skip ignore params.
375
+ if ( in_array( $lower_param, $ignore_params ) ||
376
+ ( false !== $params_prefix && starts_with( $lower_param, $params_prefix ) )
377
+ ) {
378
  continue;
379
  }
380
 
includes/libs/freemius/includes/fs-essential-functions.php CHANGED
@@ -354,6 +354,9 @@
354
  function fs_fallback_to_newest_active_sdk() {
355
  global $fs_active_plugins;
356
 
 
 
 
357
  $newest_sdk_data = null;
358
  $newest_sdk_path = null;
359
 
354
  function fs_fallback_to_newest_active_sdk() {
355
  global $fs_active_plugins;
356
 
357
+ /**
358
+ * @var object $newest_sdk_data
359
+ */
360
  $newest_sdk_data = null;
361
  $newest_sdk_path = null;
362
 
includes/libs/freemius/includes/fs-plugin-info-dialog.php CHANGED
@@ -74,14 +74,7 @@
74
  }
75
 
76
  // Find add-on by slug.
77
- $addons = $this->_fs->get_addons();
78
- $selected_addon = false;
79
- foreach ( $addons as $addon ) {
80
- if ( $addon->slug == $args->slug ) {
81
- $selected_addon = $addon;
82
- break;
83
- }
84
- }
85
 
86
  if ( false === $selected_addon ) {
87
  return $data;
@@ -341,7 +334,6 @@
341
  } else if ( ! empty( $api->download_link ) ) {
342
  $status = install_plugin_install_status( $api );
343
 
344
-
345
  // Hosted on WordPress.org.
346
  switch ( $status['status'] ) {
347
  case 'install':
@@ -376,6 +368,8 @@
376
 
377
  }
378
  }
 
 
379
  }
380
 
381
  /**
74
  }
75
 
76
  // Find add-on by slug.
77
+ $selected_addon = $this->_fs->get_addon_by_slug($args->slug);
 
 
 
 
 
 
 
78
 
79
  if ( false === $selected_addon ) {
80
  return $data;
334
  } else if ( ! empty( $api->download_link ) ) {
335
  $status = install_plugin_install_status( $api );
336
 
 
337
  // Hosted on WordPress.org.
338
  switch ( $status['status'] ) {
339
  case 'install':
368
 
369
  }
370
  }
371
+
372
+ return '';
373
  }
374
 
375
  /**
includes/libs/freemius/includes/i18n.php CHANGED
@@ -35,6 +35,7 @@
35
  'account' => __( 'Account', 'freemius' ),
36
  'addon' => __( 'Add On', 'freemius' ),
37
  'contact-us' => __( 'Contact Us', 'freemius' ),
 
38
  'change-ownership' => __( 'Change Ownership', 'freemius' ),
39
  'support' => __( 'Support', 'freemius' ),
40
  'support-forum' => __( 'Support Forum', 'freemius' ),
@@ -53,6 +54,14 @@
53
  'details' => __( 'Details', 'freemius' ),
54
  'account-details' => __( 'Account Details', 'freemius' ),
55
  'delete' => _x( 'Delete', 'verb', 'freemius' ),
 
 
 
 
 
 
 
 
56
  'delete-account' => __( 'Delete Account', 'freemius' ),
57
  'dismiss' => _x( 'Dismiss', 'as close a window', 'freemius' ),
58
  'plan' => _x( 'Plan', 'as product pricing plan', 'freemius' ),
@@ -72,6 +81,7 @@
72
  'license-unlimited' => __( 'Unlimited Licenses', 'freemius' ),
73
  'license-x-sites' => __( 'Up to %s Sites', 'freemius' ),
74
  'renew-license-now' => __( '%sRenew your license now%s to access version %s features and support.', 'freemius' ),
 
75
  'x-plan' => _x( '%s Plan', 'e.g. Professional Plan', 'freemius' ),
76
  'you-are-step-away' => __( 'You are just one step away - %s', 'freemius' ),
77
  'activate-x-now' => _x( 'Complete "%s" Activation Now', '%s - plugin name. As complete "Jetpack" activation now', 'freemius' ),
@@ -95,6 +105,7 @@
95
  'version' => _x( 'Version', 'as plugin version', 'freemius' ),
96
  'name' => __( 'Name', 'freemius' ),
97
  'email' => __( 'Email', 'freemius' ),
 
98
  'verified' => __( 'Verified', 'freemius' ),
99
  'plugin' => __( 'Plugin', 'freemius' ),
100
  'plugins' => __( 'Plugins', 'freemius' ),
@@ -152,6 +163,8 @@
152
  'add-ons-for-x' => __( 'Add Ons for %s', 'freemius' ),
153
  'add-ons-missing' => __( 'We could\'nt load the add-ons list. It\'s probably an issue on our side, please try to come back in few minutes.', 'freemius' ),
154
  #region Plugin Deactivation
 
 
155
  'deactivation-share-reason' => __( 'If you have a moment, please let us know why you are deactivating', 'freemius' ),
156
  'deactivation-modal-button-confirm' => __( 'Yes - Deactivate', 'freemius' ),
157
  'deactivation-modal-button-submit' => __( 'Submit & Deactivate', 'freemius' ),
@@ -178,6 +191,7 @@
178
  'placeholder-what-did-you-expect' => __( "What did you expect?", 'freemius' ),
179
  'reason-didnt-work' => __( "The plugin didn't work", 'freemius' ),
180
  'reason-dont-like-to-share-my-information' => __( "I don't like to share my information with you", 'freemius' ),
 
181
  #endregion Plugin Deactivation
182
 
183
  #region Connect
@@ -206,10 +220,16 @@
206
  'opt-in-connect' => _x( 'Allow & Continue', 'button label', 'freemius' ),
207
  'agree-activate-license' => _x( 'Agree & Activate License', 'button label', 'freemius' ),
208
  'skip' => _x( 'Skip', 'verb', 'freemius' ),
 
209
  'resend-activation-email' => __( 'Re-send activation email', 'freemius' ),
210
  'license-key' => __( 'License key', 'freemius' ),
 
 
211
  'have-license-key' => __( 'Have a license key?', 'freemius' ),
212
  'dont-have-license-key' => __( 'Don\'t have a license key?', 'freemius' ),
 
 
 
213
  #endregion Connect
214
 
215
  #region Screenshots
@@ -268,8 +288,12 @@
268
  'premium-activated-message' => __( 'Premium plugin version was successfully activated.', 'freemius' ),
269
  'successful-version-upgrade-message' => __( 'The upgrade of %s was successfully completed.', 'freemius' ),
270
  'activation-with-plan-x-message' => __( 'Your account was successfully activated with the %s plan.', 'freemius' ),
271
- 'download-latest-x-version' => __( 'Download the latest %s version now', 'freemius' ),
272
- 'download-latest-version' => __( 'Download the latest version now', 'freemius' ),
 
 
 
 
273
  'addon-successfully-purchased-message' => _x( '%s Add-on was successfully purchased.', '%s - product name, e.g. Facebook add-on was successfully...', 'freemius' ),
274
  'addon-successfully-upgraded-message' => __( 'Your %s Add-on plan was successfully upgraded.', 'freemius' ),
275
  'email-verified-message' => __( 'Your email has been successfully verified - you are AWESOME!', 'freemius' ),
@@ -324,6 +348,7 @@
324
  'curl-missing-no-clue-desc' => __( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'freemius' ),
325
  'curl-missing-sysadmin-desc' => __( 'Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the plugin and reactivate it back again.', 'freemius' ),
326
  'happy-to-resolve-issue-asap' => __( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'freemius' ),
 
327
  'fix-issue-title' => __( 'Yes - I\'m giving you a chance to fix it', 'freemius' ),
328
  'fix-issue-desc' => __( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'freemius' ),
329
  'install-previous-title' => __( 'Let\'s try your previous version', 'freemius' ),
35
  'account' => __( 'Account', 'freemius' ),
36
  'addon' => __( 'Add On', 'freemius' ),
37
  'contact-us' => __( 'Contact Us', 'freemius' ),
38
+ 'contact-support' => __( 'Contact Support', 'freemius' ),
39
  'change-ownership' => __( 'Change Ownership', 'freemius' ),
40
  'support' => __( 'Support', 'freemius' ),
41
  'support-forum' => __( 'Support Forum', 'freemius' ),
54
  'details' => __( 'Details', 'freemius' ),
55
  'account-details' => __( 'Account Details', 'freemius' ),
56
  'delete' => _x( 'Delete', 'verb', 'freemius' ),
57
+ 'show' => _x( 'Show', 'verb', 'freemius' ),
58
+ 'hide' => _x( 'Hide', 'verb', 'freemius' ),
59
+ 'edit' => _x( 'Edit', 'verb', 'freemius' ),
60
+ 'date' => __( 'Date', 'freemius' ),
61
+ 'amount' => __( 'Amount', 'freemius' ),
62
+ 'invoice' => __( 'Invoice', 'freemius' ),
63
+ 'billing' => __( 'Billing', 'freemius' ),
64
+ 'payments' => __( 'Payments', 'freemius' ),
65
  'delete-account' => __( 'Delete Account', 'freemius' ),
66
  'dismiss' => _x( 'Dismiss', 'as close a window', 'freemius' ),
67
  'plan' => _x( 'Plan', 'as product pricing plan', 'freemius' ),
81
  'license-unlimited' => __( 'Unlimited Licenses', 'freemius' ),
82
  'license-x-sites' => __( 'Up to %s Sites', 'freemius' ),
83
  'renew-license-now' => __( '%sRenew your license now%s to access version %s features and support.', 'freemius' ),
84
+ 'ask-for-upgrade-email-address' => __( "Enter the email address you've used for the upgrade below and we will resend you the license key.", 'freemius' ),
85
  'x-plan' => _x( '%s Plan', 'e.g. Professional Plan', 'freemius' ),
86
  'you-are-step-away' => __( 'You are just one step away - %s', 'freemius' ),
87
  'activate-x-now' => _x( 'Complete "%s" Activation Now', '%s - plugin name. As complete "Jetpack" activation now', 'freemius' ),
105
  'version' => _x( 'Version', 'as plugin version', 'freemius' ),
106
  'name' => __( 'Name', 'freemius' ),
107
  'email' => __( 'Email', 'freemius' ),
108
+ 'email-address' => __( 'Email address', 'freemius' ),
109
  'verified' => __( 'Verified', 'freemius' ),
110
  'plugin' => __( 'Plugin', 'freemius' ),
111
  'plugins' => __( 'Plugins', 'freemius' ),
163
  'add-ons-for-x' => __( 'Add Ons for %s', 'freemius' ),
164
  'add-ons-missing' => __( 'We could\'nt load the add-ons list. It\'s probably an issue on our side, please try to come back in few minutes.', 'freemius' ),
165
  #region Plugin Deactivation
166
+ 'anonymous-feedback' => __( 'Anonymous feedback', 'freemius' ),
167
+ 'quick-feedback' => __( 'Quick feedback', 'freemius' ),
168
  'deactivation-share-reason' => __( 'If you have a moment, please let us know why you are deactivating', 'freemius' ),
169
  'deactivation-modal-button-confirm' => __( 'Yes - Deactivate', 'freemius' ),
170
  'deactivation-modal-button-submit' => __( 'Submit & Deactivate', 'freemius' ),
191
  'placeholder-what-did-you-expect' => __( "What did you expect?", 'freemius' ),
192
  'reason-didnt-work' => __( "The plugin didn't work", 'freemius' ),
193
  'reason-dont-like-to-share-my-information' => __( "I don't like to share my information with you", 'freemius' ),
194
+ 'dont-have-to-share-any-data' => __( "You might have missed it, but you don't have to share any data and can just %s the opt-in.", 'freemius' ),
195
  #endregion Plugin Deactivation
196
 
197
  #region Connect
220
  'opt-in-connect' => _x( 'Allow & Continue', 'button label', 'freemius' ),
221
  'agree-activate-license' => _x( 'Agree & Activate License', 'button label', 'freemius' ),
222
  'skip' => _x( 'Skip', 'verb', 'freemius' ),
223
+ 'click-here-to-use-plugin-anonymously' => __( 'Click here to use the plugin anonymously', 'freemius' ),
224
  'resend-activation-email' => __( 'Re-send activation email', 'freemius' ),
225
  'license-key' => __( 'License key', 'freemius' ),
226
+ 'send-license-key' => __( 'Send License Key', 'freemius' ),
227
+ 'sending-license-key' => __( 'Sending license key', 'freemius' ),
228
  'have-license-key' => __( 'Have a license key?', 'freemius' ),
229
  'dont-have-license-key' => __( 'Don\'t have a license key?', 'freemius' ),
230
+ 'cant-find-license-key' => __( "Can't find your license key?", 'freemius' ),
231
+ 'email-not-found' => __( "We couldn't find your email address in the system, are you sure it's the right address?" ),
232
+ 'no-active-licenses' => __( "We can't see any active licenses associated with that email address, are you sure it's the right address?" ),
233
  #endregion Connect
234
 
235
  #region Screenshots
288
  'premium-activated-message' => __( 'Premium plugin version was successfully activated.', 'freemius' ),
289
  'successful-version-upgrade-message' => __( 'The upgrade of %s was successfully completed.', 'freemius' ),
290
  'activation-with-plan-x-message' => __( 'Your account was successfully activated with the %s plan.', 'freemius' ),
291
+ 'download-latest-x-version-now' => __( 'Download the latest %s version now', 'freemius' ),
292
+ 'follow-steps-to-complete-upgrade' => __( 'Please follow these steps to complete the upgrade', 'freemius' ),
293
+ 'download-latest-x-version' => __( 'Download the latest %s version', 'freemius' ),
294
+ 'deactivate-free-version' => __( 'Deactivate the free version', 'freemius' ),
295
+ 'upload-and-activate' => __( 'Upload and activate the downloaded version', 'freemius' ),
296
+ 'howto-upload-activate' => __( 'How to upload and activate?', 'freemius' ),
297
  'addon-successfully-purchased-message' => _x( '%s Add-on was successfully purchased.', '%s - product name, e.g. Facebook add-on was successfully...', 'freemius' ),
298
  'addon-successfully-upgraded-message' => __( 'Your %s Add-on plan was successfully upgraded.', 'freemius' ),
299
  'email-verified-message' => __( 'Your email has been successfully verified - you are AWESOME!', 'freemius' ),
348
  'curl-missing-no-clue-desc' => __( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'freemius' ),
349
  'curl-missing-sysadmin-desc' => __( 'Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the plugin and reactivate it back again.', 'freemius' ),
350
  'happy-to-resolve-issue-asap' => __( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'freemius' ),
351
+ 'contact-support-before-deactivation' => __( 'Sorry for the inconvenience and we are here to help if you give us a chance.', 'freemius' ),
352
  'fix-issue-title' => __( 'Yes - I\'m giving you a chance to fix it', 'freemius' ),
353
  'fix-issue-desc' => __( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'freemius' ),
354
  'install-previous-title' => __( 'Let\'s try your previous version', 'freemius' ),
includes/libs/freemius/includes/managers/class-fs-admin-menu-manager.php CHANGED
@@ -58,7 +58,7 @@
58
  /**
59
  * @since 1.1.3
60
  *
61
- * @var string[]bool
62
  */
63
  private $_default_submenu_items;
64
  /**
58
  /**
59
  * @since 1.1.3
60
  *
61
+ * @var array<string,bool>
62
  */
63
  private $_default_submenu_items;
64
  /**
includes/libs/freemius/includes/managers/class-fs-admin-notice-manager.php CHANGED
@@ -61,7 +61,7 @@
61
  if ( 0 < count( $this->_sticky_storage ) ) {
62
  // If there are sticky notices for the current slug, add a callback
63
  // to the AJAX action that handles message dismiss.
64
- add_action( "wp_ajax_{$slug}_dismiss_notice_action", array(
65
  &$this,
66
  'dismiss_notice_ajax_callback'
67
  ) );
61
  if ( 0 < count( $this->_sticky_storage ) ) {
62
  // If there are sticky notices for the current slug, add a callback
63
  // to the AJAX action that handles message dismiss.
64
+ add_action( "wp_ajax_fs_dismiss_notice_action_{$slug}", array(
65
  &$this,
66
  'dismiss_notice_ajax_callback'
67
  ) );
includes/libs/freemius/includes/managers/class-fs-key-value-storage.php CHANGED
@@ -10,6 +10,37 @@
10
  exit;
11
  }
12
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  class FS_Key_Value_Storage implements ArrayAccess, Iterator, Countable {
14
  /**
15
  * @var string
10
  exit;
11
  }
12
 
13
+ /**
14
+ * Class FS_Key_Value_Storage
15
+ *
16
+ * @property int $install_timestamp
17
+ * @property int $activation_timestamp
18
+ * @property int $sync_timestamp
19
+ * @property object $sync_cron
20
+ * @property int $install_sync_timestamp
21
+ * @property array $connectivity_test
22
+ * @property array $is_on
23
+ * @property object $trial_plan
24
+ * @property bool $has_trial_plan
25
+ * @property bool $trial_promotion_shown
26
+ * @property string $sdk_version
27
+ * @property string $sdk_last_version
28
+ * @property bool $sdk_upgrade_mode
29
+ * @property bool $sdk_downgrade_mode
30
+ * @property bool $plugin_upgrade_mode
31
+ * @property bool $plugin_downgrade_mode
32
+ * @property string $plugin_version
33
+ * @property string $plugin_last_version
34
+ * @property bool $is_plugin_new_install
35
+ * @property bool $was_plugin_loaded
36
+ * @property object $plugin_main_file
37
+ * @property bool $prev_is_premium
38
+ * @property array $is_anonymous
39
+ * @property bool $is_pending_activation
40
+ * @property bool $sticky_optin_added
41
+ * @property object $uninstall_reason
42
+ * @property object $subscription
43
+ */
44
  class FS_Key_Value_Storage implements ArrayAccess, Iterator, Countable {
45
  /**
46
  * @var string
includes/libs/freemius/includes/managers/class-fs-license-manager.php CHANGED
@@ -90,6 +90,9 @@
90
  static function has_premium_license( $licenses ) {
91
  if ( is_array( $licenses ) ) {
92
  foreach ( $licenses as $license ) {
 
 
 
93
  if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
94
  return true;
95
  }
90
  static function has_premium_license( $licenses ) {
91
  if ( is_array( $licenses ) ) {
92
  foreach ( $licenses as $license ) {
93
+ /**
94
+ * @var FS_Plugin_License $license
95
+ */
96
  if ( ! $license->is_utilized() && $license->is_features_enabled() ) {
97
  return true;
98
  }
includes/libs/freemius/languages/freemius-en.mo ADDED
Binary file
includes/libs/freemius/languages/freemius-en.po ADDED
@@ -0,0 +1,1396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: \n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: \n"
8
+ "Language: \n"
9
+ "Language-Team: \n"
10
+ "Content-Type: \n"
11
+ "Content-Transfer-Encoding: \n"
12
+ "Plural-Forms: \n"
13
+
14
+ # Copyright (C) 2016 freemius
15
+ # This file is distributed under the same license as the freemius package.
16
+ #: includes/i18n.php:41, includes/i18n.php:55
17
+ msgid "Yes - I'm in!"
18
+ msgstr "Yes - I'm in!"
19
+
20
+ #: includes/i18n.php:43, includes/i18n.php:57
21
+ msgid "Not today"
22
+ msgstr "Not today"
23
+
24
+ #: includes/i18n.php:69
25
+ msgid "Account"
26
+ msgstr "Account"
27
+
28
+ #: includes/i18n.php:71
29
+ msgid "Add On"
30
+ msgstr "Add On"
31
+
32
+ #: includes/i18n.php:73
33
+ msgid "Contact Us"
34
+ msgstr "Contact Us"
35
+
36
+ #: includes/i18n.php:75
37
+ msgid "Contact Support"
38
+ msgstr "Contact Support"
39
+
40
+ #: includes/i18n.php:77
41
+ msgid "Change Ownership"
42
+ msgstr "Change Ownership"
43
+
44
+ #: includes/i18n.php:79
45
+ msgid "Support"
46
+ msgstr "Support"
47
+
48
+ #: includes/i18n.php:81
49
+ msgid "Support Forum"
50
+ msgstr "Support Forum"
51
+
52
+ #: includes/i18n.php:83
53
+ msgid "Add Ons"
54
+ msgstr "Add Ons"
55
+
56
+ #: includes/i18n.php:85
57
+ msgctxt "verb"
58
+ msgid "Upgrade"
59
+ msgstr "Upgrade"
60
+
61
+ #: includes/i18n.php:87
62
+ msgid "Awesome"
63
+ msgstr "Awesome"
64
+
65
+ #: includes/i18n.php:89
66
+ msgctxt "noun"
67
+ msgid "Pricing"
68
+ msgstr "Pricing"
69
+
70
+ #: includes/i18n.php:91
71
+ msgctxt "noun"
72
+ msgid "Price"
73
+ msgstr "Price"
74
+
75
+ #: includes/i18n.php:93
76
+ msgid "Unlimited Updates"
77
+ msgstr "Unlimited Updates"
78
+
79
+ #: includes/i18n.php:95
80
+ msgctxt "verb"
81
+ msgid "Downgrade"
82
+ msgstr "Downgrade"
83
+
84
+ #: includes/i18n.php:97
85
+ msgid "Cancel Trial"
86
+ msgstr "Cancel Trial"
87
+
88
+ #: includes/i18n.php:99
89
+ msgid "Free Trial"
90
+ msgstr "Free Trial"
91
+
92
+ #: includes/i18n.php:101
93
+ msgid "Start my free %s"
94
+ msgstr "Start my free %s"
95
+
96
+ #: includes/i18n.php:103
97
+ msgid "No commitment for %s - cancel anytime"
98
+ msgstr "No commitment for %s - cancel anytime"
99
+
100
+ #: includes/i18n.php:105
101
+ msgid "After your free %s, pay as little as %s"
102
+ msgstr "After your free %s, pay as little as %s"
103
+
104
+ #: includes/i18n.php:107
105
+ msgid "Details"
106
+ msgstr "Details"
107
+
108
+ #: includes/i18n.php:109
109
+ msgid "Account Details"
110
+ msgstr "Account Details"
111
+
112
+ #: includes/i18n.php:111
113
+ msgctxt "verb"
114
+ msgid "Delete"
115
+ msgstr "Delete"
116
+
117
+ #: includes/i18n.php:113
118
+ msgctxt "verb"
119
+ msgid "Show"
120
+ msgstr "Show"
121
+
122
+ #: includes/i18n.php:115
123
+ msgctxt "verb"
124
+ msgid "Hide"
125
+ msgstr "Hide"
126
+
127
+ #: includes/i18n.php:117
128
+ msgctxt "verb"
129
+ msgid "Edit"
130
+ msgstr "Edit"
131
+
132
+ #: includes/i18n.php:119
133
+ msgid "Date"
134
+ msgstr "Date"
135
+
136
+ #: includes/i18n.php:121
137
+ msgid "Amount"
138
+ msgstr "Amount"
139
+
140
+ #: includes/i18n.php:123
141
+ msgid "Invoice"
142
+ msgstr "Invoice"
143
+
144
+ #: includes/i18n.php:125
145
+ msgid "Billing"
146
+ msgstr "Billing"
147
+
148
+ #: includes/i18n.php:127
149
+ msgid "Payments"
150
+ msgstr "Payments"
151
+
152
+ #: includes/i18n.php:129
153
+ msgid "Delete Account"
154
+ msgstr "Delete Account"
155
+
156
+ #: includes/i18n.php:131
157
+ msgctxt "as close a window"
158
+ msgid "Dismiss"
159
+ msgstr "Dismiss"
160
+
161
+ #: includes/i18n.php:133
162
+ msgctxt "as product pricing plan"
163
+ msgid "Plan"
164
+ msgstr "Plan"
165
+
166
+ #: includes/i18n.php:135
167
+ msgid "Change Plan"
168
+ msgstr "Change Plan"
169
+
170
+ #: includes/i18n.php:137
171
+ msgctxt "as download professional version"
172
+ msgid "Download %s Version"
173
+ msgstr "Download %s Version"
174
+
175
+ #: includes/i18n.php:139
176
+ msgctxt "as download professional version now"
177
+ msgid "Download %s version now"
178
+ msgstr "Download %s version now"
179
+
180
+ #: includes/i18n.php:141
181
+ msgctxt "as download latest version"
182
+ msgid "Download Latest"
183
+ msgstr "Download Latest"
184
+
185
+ #: includes/i18n.php:143
186
+ msgctxt "E.g. you have a professional license."
187
+ msgid "You have a %s license."
188
+ msgstr "You have a %s license."
189
+
190
+ #: includes/i18n.php:145
191
+ msgid "New"
192
+ msgstr "New"
193
+
194
+ #: includes/i18n.php:147
195
+ msgid "Free"
196
+ msgstr "Free"
197
+
198
+ #: includes/i18n.php:149
199
+ msgctxt "as trial plan"
200
+ msgid "Trial"
201
+ msgstr "Trial"
202
+
203
+ #: includes/i18n.php:151
204
+ msgctxt "verb"
205
+ msgid "Purchase"
206
+ msgstr "Purchase"
207
+
208
+ #: includes/i18n.php:153
209
+ msgid "Purchase License"
210
+ msgstr "Purchase License"
211
+
212
+ #: includes/i18n.php:155
213
+ msgctxt "verb"
214
+ msgid "Buy"
215
+ msgstr "Buy"
216
+
217
+ #: includes/i18n.php:157
218
+ msgid "Buy License"
219
+ msgstr "Buy License"
220
+
221
+ #: includes/i18n.php:159
222
+ msgid "Single Site License"
223
+ msgstr "Single Site License"
224
+
225
+ #: includes/i18n.php:161
226
+ msgid "Unlimited Licenses"
227
+ msgstr "Unlimited Licenses"
228
+
229
+ #: includes/i18n.php:163
230
+ msgid "Up to %s Sites"
231
+ msgstr "Up to %s Sites"
232
+
233
+ #: includes/i18n.php:165
234
+ msgid "%sRenew your license now%s to access version %s features and support."
235
+ msgstr "%sRenew your license now%s to access version %s features and support."
236
+
237
+ #: includes/i18n.php:167
238
+ msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
239
+ msgstr "Enter the email address you've used for the upgrade below and we will resend you the license key."
240
+
241
+ #: includes/i18n.php:169
242
+ msgctxt "e.g. Professional Plan"
243
+ msgid "%s Plan"
244
+ msgstr "%s Plan"
245
+
246
+ #: includes/i18n.php:171
247
+ msgid "You are just one step away - %s"
248
+ msgstr "You are just one step away - %s"
249
+
250
+ #: includes/i18n.php:173
251
+ msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
252
+ msgid "Complete \"%s\" Activation Now"
253
+ msgstr "Complete \"%s\" Activation Now"
254
+
255
+ #: includes/i18n.php:175
256
+ msgid "We made a few tweaks to the plugin, %s"
257
+ msgstr "We made a few tweaks to the plugin, %s"
258
+
259
+ #: includes/i18n.php:177
260
+ msgid "Opt-in to make \"%s\" Better!"
261
+ msgstr "Opt-in to make \"%s\" Better!"
262
+
263
+ #: includes/i18n.php:179
264
+ msgid "Error"
265
+ msgstr "Error"
266
+
267
+ #: includes/i18n.php:181
268
+ msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
269
+ msgstr "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
270
+
271
+ #: includes/i18n.php:187
272
+ msgctxt "as expiration date"
273
+ msgid "Expiration"
274
+ msgstr "Expiration"
275
+
276
+ #: includes/i18n.php:189
277
+ msgctxt "as software license"
278
+ msgid "License"
279
+ msgstr "License"
280
+
281
+ #: includes/i18n.php:191
282
+ msgid "not verified"
283
+ msgstr "not verified"
284
+
285
+ #: includes/i18n.php:193
286
+ msgid "Verify Email"
287
+ msgstr "Verify Email"
288
+
289
+ #: includes/i18n.php:195
290
+ msgctxt "e.g. expires in 2 months"
291
+ msgid "Expires in %s"
292
+ msgstr "Expires in %s"
293
+
294
+ #: includes/i18n.php:197
295
+ msgctxt "e.g. auto renews in 2 months"
296
+ msgid "Auto renews in %s"
297
+ msgstr "Auto renews in %s"
298
+
299
+ #: includes/i18n.php:199
300
+ msgid "No expiration"
301
+ msgstr "No expiration"
302
+
303
+ #: includes/i18n.php:201
304
+ msgid "Expired"
305
+ msgstr "Expired"
306
+
307
+ #: includes/i18n.php:203
308
+ msgid "Cancelled"
309
+ msgstr "Cancelled"
310
+
311
+ #: includes/i18n.php:205
312
+ msgctxt "e.g. In 2 hours"
313
+ msgid "In %s"
314
+ msgstr "In %s"
315
+
316
+ #: includes/i18n.php:207
317
+ msgctxt "e.g. 2 min ago"
318
+ msgid "%s ago"
319
+ msgstr "%s ago"
320
+
321
+ #: includes/i18n.php:209
322
+ msgctxt "as plugin version"
323
+ msgid "Version"
324
+ msgstr "Version"
325
+
326
+ #: includes/i18n.php:211
327
+ msgid "Name"
328
+ msgstr "Name"
329
+
330
+ #: includes/i18n.php:213
331
+ msgid "Email"
332
+ msgstr "Email"
333
+
334
+ #: includes/i18n.php:215
335
+ msgid "Email address"
336
+ msgstr "Email address"
337
+
338
+ #: includes/i18n.php:217
339
+ msgid "Verified"
340
+ msgstr "Verified"
341
+
342
+ #: includes/i18n.php:219
343
+ msgid "Plugin"
344
+ msgstr "Plugin"
345
+
346
+ #: includes/i18n.php:221
347
+ msgid "Plugins"
348
+ msgstr "Plugins"
349
+
350
+ #: includes/i18n.php:223
351
+ msgid "Themes"
352
+ msgstr "Themes"
353
+
354
+ #: includes/i18n.php:225
355
+ msgctxt "as file/folder path"
356
+ msgid "Path"
357
+ msgstr "Path"
358
+
359
+ #: includes/i18n.php:227
360
+ msgid "Title"
361
+ msgstr "Title"
362
+
363
+ #: includes/i18n.php:229
364
+ msgid "Free version"
365
+ msgstr "Free version"
366
+
367
+ #: includes/i18n.php:231
368
+ msgid "Premium version"
369
+ msgstr "Premium version"
370
+
371
+ #: includes/i18n.php:233
372
+ msgctxt "as WP plugin slug"
373
+ msgid "Slug"
374
+ msgstr "Slug"
375
+
376
+ #: includes/i18n.php:235
377
+ msgid "ID"
378
+ msgstr "ID"
379
+
380
+ #: includes/i18n.php:237
381
+ msgid "Users"
382
+ msgstr "Users"
383
+
384
+ #: includes/i18n.php:239
385
+ msgid "Plugin Installs"
386
+ msgstr "Plugin Installs"
387
+
388
+ #: includes/i18n.php:241
389
+ msgctxt "like websites"
390
+ msgid "Sites"
391
+ msgstr "Sites"
392
+
393
+ #: includes/i18n.php:243
394
+ msgid "User ID"
395
+ msgstr "User ID"
396
+
397
+ #: includes/i18n.php:245
398
+ msgid "Site ID"
399
+ msgstr "Site ID"
400
+
401
+ #: includes/i18n.php:247
402
+ msgid "Public Key"
403
+ msgstr "Public Key"
404
+
405
+ #: includes/i18n.php:249
406
+ msgid "Secret Key"
407
+ msgstr "Secret Key"
408
+
409
+ #: includes/i18n.php:251
410
+ msgctxt "as secret encryption key missing"
411
+ msgid "No Secret"
412
+ msgstr "No Secret"
413
+
414
+ #: includes/i18n.php:253
415
+ msgid "No ID"
416
+ msgstr "No ID"
417
+
418
+ #: includes/i18n.php:255
419
+ msgctxt "as synchronize license"
420
+ msgid "Sync License"
421
+ msgstr "Sync License"
422
+
423
+ #: includes/i18n.php:257
424
+ msgctxt "as synchronize"
425
+ msgid "Sync"
426
+ msgstr "Sync"
427
+
428
+ #: includes/i18n.php:259
429
+ msgid "Activate License"
430
+ msgstr "Activate License"
431
+
432
+ #: includes/i18n.php:261
433
+ msgid "Activate Free Version"
434
+ msgstr "Activate Free Version"
435
+
436
+ #: includes/i18n.php:263
437
+ msgid "Please enter the license key that you received in the email right after the purchase:"
438
+ msgstr "Please enter the license key that you received in the email right after the purchase:"
439
+
440
+ #: includes/i18n.php:265
441
+ msgid "Activating license..."
442
+ msgstr "Activating license..."
443
+
444
+ #: includes/i18n.php:267
445
+ msgid "Change License"
446
+ msgstr "Change License"
447
+
448
+ #: includes/i18n.php:269
449
+ msgid "Update License"
450
+ msgstr "Update License"
451
+
452
+ #: includes/i18n.php:271
453
+ msgid "Deactivate License"
454
+ msgstr "Deactivate License"
455
+
456
+ #: includes/i18n.php:273
457
+ msgid "Activate"
458
+ msgstr "Activate"
459
+
460
+ #: includes/i18n.php:275
461
+ msgid "Deactivate"
462
+ msgstr "Deactivate"
463
+
464
+ #: includes/i18n.php:277
465
+ msgid "Skip & Deactivate"
466
+ msgstr "Skip & Deactivate"
467
+
468
+ #: includes/i18n.php:279
469
+ msgid "No - just deactivate"
470
+ msgstr "No - just deactivate"
471
+
472
+ #: includes/i18n.php:281
473
+ msgid "Yes - do your thing"
474
+ msgstr "Yes - do your thing"
475
+
476
+ #: includes/i18n.php:283
477
+ msgctxt "active mode"
478
+ msgid "Active"
479
+ msgstr "Active"
480
+
481
+ #: includes/i18n.php:285
482
+ msgctxt "is active mode?"
483
+ msgid "Is Active"
484
+ msgstr "Is Active"
485
+
486
+ #: includes/i18n.php:287
487
+ msgid "Install Now"
488
+ msgstr "Install Now"
489
+
490
+ #: includes/i18n.php:289
491
+ msgid "Install Update Now"
492
+ msgstr "Install Update Now"
493
+
494
+ #: includes/i18n.php:291
495
+ msgid "More information about %s"
496
+ msgstr "More information about %s"
497
+
498
+ #: includes/i18n.php:293
499
+ msgid "Localhost"
500
+ msgstr "Localhost"
501
+
502
+ #: includes/i18n.php:295
503
+ msgctxt "as activate Professional plan"
504
+ msgid "Activate %s Plan"
505
+ msgstr "Activate %s Plan"
506
+
507
+ #: includes/i18n.php:297
508
+ msgctxt "as 5 licenses left"
509
+ msgid "%s left"
510
+ msgstr "%s left"
511
+
512
+ #: includes/i18n.php:299
513
+ msgid "Last license"
514
+ msgstr "Last license"
515
+
516
+ #: includes/i18n.php:301
517
+ msgid "What is your %s?"
518
+ msgstr "What is your %s?"
519
+
520
+ #: includes/i18n.php:303
521
+ msgid "Activate this add-on"
522
+ msgstr "Activate this add-on"
523
+
524
+ #: includes/i18n.php:305
525
+ msgid "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
526
+ msgstr "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
527
+
528
+ #: includes/i18n.php:307
529
+ msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
530
+ msgstr "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
531
+
532
+ #: includes/i18n.php:309
533
+ msgid "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?"
534
+ msgstr "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?"
535
+
536
+ #: includes/i18n.php:311
537
+ msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
538
+ msgstr "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
539
+
540
+ #: includes/i18n.php:313
541
+ msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
542
+ msgstr "Cancelling the trial will immediately block access to all premium features. Are you sure?"
543
+
544
+ #: includes/i18n.php:315
545
+ msgid "You can still enjoy all %s features but you will not have access to plugin updates and support."
546
+ msgstr "You can still enjoy all %s features but you will not have access to plugin updates and support."
547
+
548
+ #: includes/i18n.php:317
549
+ msgid "Once your license expire you can still use the Free version but you will NOT have access to the %s features."
550
+ msgstr "Once your license expire you can still use the Free version but you will NOT have access to the %s features."
551
+
552
+ #: includes/i18n.php:319
553
+ msgid "Are you sure you want to proceed?"
554
+ msgstr "Are you sure you want to proceed?"
555
+
556
+ #: includes/i18n.php:325
557
+ msgid "Add Ons for %s"
558
+ msgstr "Add Ons for %s"
559
+
560
+ #: includes/i18n.php:327
561
+ msgid "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
562
+ msgstr "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
563
+
564
+ #: includes/i18n.php:331
565
+ msgid "Anonymous feedback"
566
+ msgstr "Anonymous feedback"
567
+
568
+ #: includes/i18n.php:333
569
+ msgid "Quick feedback"
570
+ msgstr "Quick feedback"
571
+
572
+ #: includes/i18n.php:335
573
+ msgid "If you have a moment, please let us know why you are deactivating"
574
+ msgstr "If you have a moment, please let us know why you are deactivating"
575
+
576
+ #: includes/i18n.php:337
577
+ msgid "Yes - Deactivate"
578
+ msgstr "Yes - Deactivate"
579
+
580
+ #: includes/i18n.php:339
581
+ msgid "Submit & Deactivate"
582
+ msgstr "Submit & Deactivate"
583
+
584
+ #: includes/i18n.php:341
585
+ msgctxt "the text of the cancel button of the plugin deactivation dialog box."
586
+ msgid "Cancel"
587
+ msgstr "Cancel"
588
+
589
+ #: includes/i18n.php:343
590
+ msgid "I no longer need the plugin"
591
+ msgstr "I no longer need the plugin"
592
+
593
+ #: includes/i18n.php:345
594
+ msgid "I found a better plugin"
595
+ msgstr "I found a better plugin"
596
+
597
+ #: includes/i18n.php:347
598
+ msgid "I only needed the plugin for a short period"
599
+ msgstr "I only needed the plugin for a short period"
600
+
601
+ #: includes/i18n.php:349
602
+ msgid "The plugin broke my site"
603
+ msgstr "The plugin broke my site"
604
+
605
+ #: includes/i18n.php:351
606
+ msgid "The plugin suddenly stopped working"
607
+ msgstr "The plugin suddenly stopped working"
608
+
609
+ #: includes/i18n.php:353
610
+ msgid "I can't pay for it anymore"
611
+ msgstr "I can't pay for it anymore"
612
+
613
+ #: includes/i18n.php:355
614
+ msgid "It's a temporary deactivation. I'm just debugging an issue."
615
+ msgstr "It's a temporary deactivation. I'm just debugging an issue."
616
+
617
+ #: includes/i18n.php:357
618
+ msgctxt "the text of the \"other\" reason for deactivating the plugin that is shown in the modal box."
619
+ msgid "Other"
620
+ msgstr "Other"
621
+
622
+ #: includes/i18n.php:359
623
+ msgid "Kindly tell us the reason so we can improve."
624
+ msgstr "Kindly tell us the reason so we can improve."
625
+
626
+ #: includes/i18n.php:361
627
+ msgid "What's the plugin's name?"
628
+ msgstr "What's the plugin's name?"
629
+
630
+ #: includes/i18n.php:363
631
+ msgid "What price would you feel comfortable paying?"
632
+ msgstr "What price would you feel comfortable paying?"
633
+
634
+ #: includes/i18n.php:365
635
+ msgid "I couldn't understand how to make it work"
636
+ msgstr "I couldn't understand how to make it work"
637
+
638
+ #: includes/i18n.php:367
639
+ msgid "The plugin is great, but I need specific feature that you don't support"
640
+ msgstr "The plugin is great, but I need specific feature that you don't support"
641
+
642
+ #: includes/i18n.php:369
643
+ msgid "The plugin is not working"
644
+ msgstr "The plugin is not working"
645
+
646
+ #: includes/i18n.php:371
647
+ msgid "It's not what I was looking for"
648
+ msgstr "It's not what I was looking for"
649
+
650
+ #: includes/i18n.php:373
651
+ msgid "The plugin didn't work as expected"
652
+ msgstr "The plugin didn't work as expected"
653
+
654
+ #: includes/i18n.php:375
655
+ msgid "What feature?"
656
+ msgstr "What feature?"
657
+
658
+ #: includes/i18n.php:377
659
+ msgid "Kindly share what didn't work so we can fix it for future users..."
660
+ msgstr "Kindly share what didn't work so we can fix it for future users..."
661
+
662
+ #: includes/i18n.php:379
663
+ msgid "What you've been looking for?"
664
+ msgstr "What you've been looking for?"
665
+
666
+ #: includes/i18n.php:381
667
+ msgid "What did you expect?"
668
+ msgstr "What did you expect?"
669
+
670
+ #: includes/i18n.php:383
671
+ msgid "The plugin didn't work"
672
+ msgstr "The plugin didn't work"
673
+
674
+ #: includes/i18n.php:385
675
+ msgid "I don't like to share my information with you"
676
+ msgstr "I don't like to share my information with you"
677
+
678
+ #: includes/i18n.php:387
679
+ msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
680
+ msgstr "You might have missed it, but you don't have to share any data and can just %s the opt-in."
681
+
682
+ #: includes/i18n.php:395
683
+ msgctxt "greeting"
684
+ msgid "Hey %s,"
685
+ msgstr "Hey %s,"
686
+
687
+ #: includes/i18n.php:397
688
+ msgctxt "a greeting. E.g. Thanks John!"
689
+ msgid "Thanks %s!"
690
+ msgstr "Thanks %s!"
691
+
692
+ #: includes/i18n.php:399
693
+ msgid "In order to enjoy all our features and functionality, %s needs to connect your user, %s at %s, to %s"
694
+ msgstr "In order to enjoy all our features and functionality, %s needs to connect your user, %s at %s, to %s"
695
+
696
+ #: includes/i18n.php:401
697
+ msgid "Please help us improve %2$s! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that's okay! %2$s will still work just fine."
698
+ msgstr "Please help us improve %2$s! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that's okay! %2$s will still work just fine."
699
+
700
+ #: includes/i18n.php:403
701
+ msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to complete the install."
702
+ msgstr "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to complete the install."
703
+
704
+ #: includes/i18n.php:405
705
+ msgid "Thanks for purchasing %s! To get started, please enter your license key:"
706
+ msgstr "Thanks for purchasing %s! To get started, please enter your license key:"
707
+
708
+ #: includes/i18n.php:407
709
+ msgid "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license."
710
+ msgstr "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license."
711
+
712
+ #: includes/i18n.php:409
713
+ msgid "What permissions are being granted?"
714
+ msgstr "What permissions are being granted?"
715
+
716
+ #: includes/i18n.php:411
717
+ msgid "Your Profile Overview"
718
+ msgstr "Your Profile Overview"
719
+
720
+ #: includes/i18n.php:413
721
+ msgid "Name and email address"
722
+ msgstr "Name and email address"
723
+
724
+ #: includes/i18n.php:415
725
+ msgid "Your Site Overview"
726
+ msgstr "Your Site Overview"
727
+
728
+ #: includes/i18n.php:417
729
+ msgid "Site URL, WP version, PHP info, plugins & themes"
730
+ msgstr "Site URL, WP version, PHP info, plugins & themes"
731
+
732
+ #: includes/i18n.php:419
733
+ msgid "Current Plugin Events"
734
+ msgstr "Current Plugin Events"
735
+
736
+ #: includes/i18n.php:421
737
+ msgid "Activation, deactivation and uninstall"
738
+ msgstr "Activation, deactivation and uninstall"
739
+
740
+ #: includes/i18n.php:423
741
+ msgid "Plugins & Themes"
742
+ msgstr "Plugins & Themes"
743
+
744
+ #: includes/i18n.php:425
745
+ msgid "Titles, versions and state."
746
+ msgstr "Titles, versions and state."
747
+
748
+ #: includes/i18n.php:427
749
+ msgid "Newsletter"
750
+ msgstr "Newsletter"
751
+
752
+ #: includes/i18n.php:429
753
+ msgid "Updates, announcements, marketing, no spam"
754
+ msgstr "Updates, announcements, marketing, no spam"
755
+
756
+ #: includes/i18n.php:431
757
+ msgid "Privacy Policy"
758
+ msgstr "Privacy Policy"
759
+
760
+ #: includes/i18n.php:433
761
+ msgid "Terms of Service"
762
+ msgstr "Terms of Service"
763
+
764
+ #: includes/i18n.php:435
765
+ msgctxt "as activating plugin"
766
+ msgid "Activating"
767
+ msgstr "Activating"
768
+
769
+ #: includes/i18n.php:437
770
+ msgctxt "as in the process of sending an email"
771
+ msgid "Sending email"
772
+ msgstr "Sending email"
773
+
774
+ #: includes/i18n.php:439
775
+ msgctxt "button label"
776
+ msgid "Allow & Continue"
777
+ msgstr "Allow & Continue"
778
+
779
+ #: includes/i18n.php:441
780
+ msgctxt "button label"
781
+ msgid "Agree & Activate License"
782
+ msgstr "Agree & Activate License"
783
+
784
+ #: includes/i18n.php:443
785
+ msgctxt "verb"
786
+ msgid "Skip"
787
+ msgstr "Skip"
788
+
789
+ #: includes/i18n.php:445
790
+ msgid "Click here to use the plugin anonymously"
791
+ msgstr "Click here to use the plugin anonymously"
792
+
793
+ #: includes/i18n.php:447
794
+ msgid "Re-send activation email"
795
+ msgstr "Re-send activation email"
796
+
797
+ #: includes/i18n.php:449
798
+ msgid "License key"
799
+ msgstr "License key"
800
+
801
+ #: includes/i18n.php:451
802
+ msgid "Send License Key"
803
+ msgstr "Send License Key"
804
+
805
+ #: includes/i18n.php:453
806
+ msgid "Sending license key"
807
+ msgstr "Sending license key"
808
+
809
+ #: includes/i18n.php:455
810
+ msgid "Have a license key?"
811
+ msgstr "Have a license key?"
812
+
813
+ #: includes/i18n.php:457
814
+ msgid "Don't have a license key?"
815
+ msgstr "Don't have a license key?"
816
+
817
+ #: includes/i18n.php:459
818
+ msgid "Can't find your license key?"
819
+ msgstr "Can't find your license key?"
820
+
821
+ #: includes/i18n.php:471
822
+ msgid "Screenshots"
823
+ msgstr "Screenshots"
824
+
825
+ #: includes/i18n.php:473
826
+ msgid "Click to view full-size screenshot %d"
827
+ msgstr "Click to view full-size screenshot %d"
828
+
829
+ #: includes/i18n.php:481
830
+ msgid "Freemius Debug"
831
+ msgstr "Freemius Debug"
832
+
833
+ #: includes/i18n.php:483
834
+ msgctxt "as turned on"
835
+ msgid "On"
836
+ msgstr "On"
837
+
838
+ #: includes/i18n.php:485
839
+ msgctxt "as turned off"
840
+ msgid "Off"
841
+ msgstr "Off"
842
+
843
+ #: includes/i18n.php:487
844
+ msgctxt "as code debugging"
845
+ msgid "Debugging"
846
+ msgstr "Debugging"
847
+
848
+ #: includes/i18n.php:489
849
+ msgid "Freemius State"
850
+ msgstr "Freemius State"
851
+
852
+ #: includes/i18n.php:491
853
+ msgctxt "as connection was successful"
854
+ msgid "Connected"
855
+ msgstr "Connected"
856
+
857
+ #: includes/i18n.php:493
858
+ msgctxt "as connection blocked"
859
+ msgid "Blocked"
860
+ msgstr "Blocked"
861
+
862
+ #: includes/i18n.php:495
863
+ msgctxt "as application program interface"
864
+ msgid "API"
865
+ msgstr "API"
866
+
867
+ #: includes/i18n.php:497
868
+ msgctxt "as software development kit versions"
869
+ msgid "SDK"
870
+ msgstr "SDK"
871
+
872
+ #: includes/i18n.php:499
873
+ msgctxt "as software development kit versions"
874
+ msgid "SDK Versions"
875
+ msgstr "SDK Versions"
876
+
877
+ #: includes/i18n.php:501
878
+ msgctxt "as plugin folder path"
879
+ msgid "Plugin Path"
880
+ msgstr "Plugin Path"
881
+
882
+ #: includes/i18n.php:503
883
+ msgctxt "as sdk path"
884
+ msgid "SDK Path"
885
+ msgstr "SDK Path"
886
+
887
+ #: includes/i18n.php:505
888
+ msgid "Add Ons of Plugin %s"
889
+ msgstr "Add Ons of Plugin %s"
890
+
891
+ #: includes/i18n.php:507
892
+ msgid "Are you sure you want to delete all Freemius data?"
893
+ msgstr "Are you sure you want to delete all Freemius data?"
894
+
895
+ #: includes/i18n.php:509
896
+ msgid "Actions"
897
+ msgstr "Actions"
898
+
899
+ #: includes/i18n.php:511
900
+ msgid "Delete All Accounts"
901
+ msgstr "Delete All Accounts"
902
+
903
+ #: includes/i18n.php:513
904
+ msgid "Start Fresh"
905
+ msgstr "Start Fresh"
906
+
907
+ #: includes/i18n.php:515
908
+ msgid "Clear API Cache"
909
+ msgstr "Clear API Cache"
910
+
911
+ #: includes/i18n.php:517
912
+ msgid "Sync Data From Server"
913
+ msgstr "Sync Data From Server"
914
+
915
+ #: includes/i18n.php:519
916
+ msgid "Scheduled Crons"
917
+ msgstr "Scheduled Crons"
918
+
919
+ #: includes/i18n.php:521
920
+ msgid "Plugins & Themes Sync"
921
+ msgstr "Plugins & Themes Sync"
922
+
923
+ #: includes/i18n.php:529
924
+ msgctxt "as congratulations"
925
+ msgid "Congrats"
926
+ msgstr "Congrats"
927
+
928
+ #: includes/i18n.php:531
929
+ msgctxt "exclamation"
930
+ msgid "Oops"
931
+ msgstr "Oops"
932
+
933
+ #: includes/i18n.php:533
934
+ msgctxt "interjection expressing joy or exuberance"
935
+ msgid "Yee-haw"
936
+ msgstr "Yee-haw"
937
+
938
+ #: includes/i18n.php:535
939
+ msgctxt "(especially in electronic communication) used to express elation, enthusiasm, or triumph."
940
+ msgid "W00t"
941
+ msgstr "W00t"
942
+
943
+ #: includes/i18n.php:537
944
+ msgctxt "a positive response"
945
+ msgid "Right on"
946
+ msgstr "Right on"
947
+
948
+ #: includes/i18n.php:539
949
+ msgctxt "something somebody says when they are thinking about what you have just said. "
950
+ msgid "Hmm"
951
+ msgstr "Hmm"
952
+
953
+ #: includes/i18n.php:541
954
+ msgid "O.K"
955
+ msgstr "O.K"
956
+
957
+ #: includes/i18n.php:543
958
+ msgctxt "exclamation"
959
+ msgid "Hey"
960
+ msgstr "Hey"
961
+
962
+ #: includes/i18n.php:545
963
+ msgctxt "advance notice of something that will need attention."
964
+ msgid "Heads up"
965
+ msgstr "Heads up"
966
+
967
+ #: includes/i18n.php:553
968
+ msgid "Seems like you got the latest release."
969
+ msgstr "Seems like you got the latest release."
970
+
971
+ #: includes/i18n.php:555
972
+ msgid "You are all good!"
973
+ msgstr "You are all good!"
974
+
975
+ #: includes/i18n.php:557
976
+ msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
977
+ msgstr "Sorry, we could not complete the email update. Another user with the same email is already registered."
978
+
979
+ #: includes/i18n.php:559
980
+ msgid "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button."
981
+ msgstr "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button."
982
+
983
+ #: includes/i18n.php:561
984
+ msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
985
+ msgstr "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
986
+
987
+ #: includes/i18n.php:563
988
+ msgid "Your name was successfully updated."
989
+ msgstr "Your name was successfully updated."
990
+
991
+ #: includes/i18n.php:565
992
+ msgid "You have successfully updated your %s."
993
+ msgstr "You have successfully updated your %s."
994
+
995
+ #: includes/i18n.php:567
996
+ msgid "Please provide your full name."
997
+ msgstr "Please provide your full name."
998
+
999
+ #: includes/i18n.php:569
1000
+ msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
1001
+ msgstr "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
1002
+
1003
+ #: includes/i18n.php:571
1004
+ msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
1005
+ msgstr "Just letting you know that the add-ons information of %s is being pulled from an external server."
1006
+
1007
+ #: includes/i18n.php:573
1008
+ msgid "No credit card required"
1009
+ msgstr "No credit card required"
1010
+
1011
+ #: includes/i18n.php:575
1012
+ msgid "Premium plugin version was successfully activated."
1013
+ msgstr "Premium plugin version was successfully activated."
1014
+
1015
+ #: includes/i18n.php:577
1016
+ msgid "The upgrade of %s was successfully completed."
1017
+ msgstr "The upgrade of %s was successfully completed."
1018
+
1019
+ #: includes/i18n.php:579
1020
+ msgid "Your account was successfully activated with the %s plan."
1021
+ msgstr "Your account was successfully activated with the %s plan."
1022
+
1023
+ #: includes/i18n.php:581
1024
+ msgid "Download the latest %s version now"
1025
+ msgstr "Download the latest %s version now"
1026
+
1027
+ #: includes/i18n.php:583
1028
+ msgid "Please follow these steps to complete the upgrade"
1029
+ msgstr "Please follow these steps to complete the upgrade"
1030
+
1031
+ #: includes/i18n.php:585
1032
+ msgid "Download the latest %s version"
1033
+ msgstr "Download the latest %s version"
1034
+
1035
+ #: includes/i18n.php:587
1036
+ msgid "Deactivate the free version"
1037
+ msgstr "Deactivate the free version"
1038
+
1039
+ #: includes/i18n.php:589
1040
+ msgid "Upload and activate the downloaded version"
1041
+ msgstr "Upload and activate the downloaded version"
1042
+
1043
+ #: includes/i18n.php:591
1044
+ msgid "How to upload and activate?"
1045
+ msgstr "How to upload and activate?"
1046
+
1047
+ #: includes/i18n.php:593
1048
+ msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
1049
+ msgid "%s Add-on was successfully purchased."
1050
+ msgstr "%s Add-on was successfully purchased."
1051
+
1052
+ #: includes/i18n.php:595
1053
+ msgid "Your %s Add-on plan was successfully upgraded."
1054
+ msgstr "Your %s Add-on plan was successfully upgraded."
1055
+
1056
+ #: includes/i18n.php:597
1057
+ msgid "Your email has been successfully verified - you are AWESOME!"
1058
+ msgstr "Your email has been successfully verified - you are AWESOME!"
1059
+
1060
+ #: includes/i18n.php:599
1061
+ msgid "Your plan was successfully upgraded."
1062
+ msgstr "Your plan was successfully upgraded."
1063
+
1064
+ #: includes/i18n.php:601
1065
+ msgid "Your plan was successfully changed to %s."
1066
+ msgstr "Your plan was successfully changed to %s."
1067
+
1068
+ #: includes/i18n.php:603
1069
+ msgid "Your license has expired. You can still continue using the free plugin forever."
1070
+ msgstr "Your license has expired. You can still continue using the free plugin forever."
1071
+
1072
+ #: includes/i18n.php:605
1073
+ msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
1074
+ msgstr "Your license has been cancelled. If you think it's a mistake, please contact support."
1075
+
1076
+ #: includes/i18n.php:607
1077
+ msgid "Your trial has been successfully started."
1078
+ msgstr "Your trial has been successfully started."
1079
+
1080
+ #: includes/i18n.php:609
1081
+ msgid "Your license was successfully activated."
1082
+ msgstr "Your license was successfully activated."
1083
+
1084
+ #: includes/i18n.php:611
1085
+ msgid "It looks like your site currently doesn't have an active license."
1086
+ msgstr "It looks like your site currently doesn't have an active license."
1087
+
1088
+ #: includes/i18n.php:613
1089
+ msgid "Your license was successfully deactivated, you are back to the %s plan."
1090
+ msgstr "Your license was successfully deactivated, you are back to the %s plan."
1091
+
1092
+ #: includes/i18n.php:615
1093
+ msgid "It looks like the license deactivation failed."
1094
+ msgstr "It looks like the license deactivation failed."
1095
+
1096
+ #: includes/i18n.php:617
1097
+ msgid "It looks like the license could not be activated."
1098
+ msgstr "It looks like the license could not be activated."
1099
+
1100
+ #: includes/i18n.php:619
1101
+ msgid "Error received from the server:"
1102
+ msgstr "Error received from the server:"
1103
+
1104
+ #: includes/i18n.php:621
1105
+ msgid "Your trial has expired. You can still continue using all our free features."
1106
+ msgstr "Your trial has expired. You can still continue using all our free features."
1107
+
1108
+ #: includes/i18n.php:623
1109
+ msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
1110
+ msgstr "Your plan was successfully downgraded. Your %s plan license will expire in %s."
1111
+
1112
+ #: includes/i18n.php:625
1113
+ msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
1114
+ msgstr "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
1115
+
1116
+ #: includes/i18n.php:627
1117
+ msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
1118
+ msgstr "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
1119
+
1120
+ #: includes/i18n.php:629
1121
+ msgid "Your %s free trial was successfully cancelled."
1122
+ msgstr "Your %s free trial was successfully cancelled."
1123
+
1124
+ #: includes/i18n.php:631
1125
+ msgctxt "%s - numeric version number"
1126
+ msgid "Version %s was released."
1127
+ msgstr "Version %s was released."
1128
+
1129
+ #: includes/i18n.php:633
1130
+ msgid "Please download %s."
1131
+ msgstr "Please download %s."
1132
+
1133
+ #: includes/i18n.php:635
1134
+ msgctxt "%s - plan name, as the latest professional version here"
1135
+ msgid "the latest %s version here"
1136
+ msgstr "the latest %s version here"
1137
+
1138
+ #: includes/i18n.php:637
1139
+ msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
1140
+ msgstr "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
1141
+
1142
+ #: includes/i18n.php:639
1143
+ msgctxt "call to action"
1144
+ msgid "Start free trial"
1145
+ msgstr "Start free trial"
1146
+
1147
+ #: includes/i18n.php:641
1148
+ msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
1149
+ msgstr "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
1150
+
1151
+ #: includes/i18n.php:643
1152
+ msgid "You already utilized a trial before."
1153
+ msgstr "You already utilized a trial before."
1154
+
1155
+ #: includes/i18n.php:645
1156
+ msgid "You are already running the plugin in a trial mode."
1157
+ msgstr "You are already running the plugin in a trial mode."
1158
+
1159
+ #: includes/i18n.php:647
1160
+ msgid "Plan %s do not exist, therefore, can't start a trial."
1161
+ msgstr "Plan %s do not exist, therefore, can't start a trial."
1162
+
1163
+ #: includes/i18n.php:649
1164
+ msgid "Plan %s does not support a trial period."
1165
+ msgstr "Plan %s does not support a trial period."
1166
+
1167
+ #: includes/i18n.php:651
1168
+ msgid "None of the plugin's plans supports a trial period."
1169
+ msgstr "None of the plugin's plans supports a trial period."
1170
+
1171
+ #: includes/i18n.php:653
1172
+ msgid "Unexpected API error. Please contact the plugin's author with the following error."
1173
+ msgstr "Unexpected API error. Please contact the plugin's author with the following error."
1174
+
1175
+ #: includes/i18n.php:655
1176
+ msgid "No commitment for %s days - cancel anytime!"
1177
+ msgstr "No commitment for %s days - cancel anytime!"
1178
+
1179
+ #: includes/i18n.php:657
1180
+ msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
1181
+ msgstr "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
1182
+
1183
+ #: includes/i18n.php:659
1184
+ msgid "Couldn't activate %s."
1185
+ msgstr "Couldn't activate %s."
1186
+
1187
+ #: includes/i18n.php:661
1188
+ msgid "Please contact us with the following message:"
1189
+ msgstr "Please contact us with the following message:"
1190
+
1191
+ #: includes/i18n.php:663
1192
+ msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry."
1193
+ msgstr "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry."
1194
+
1195
+ #: includes/i18n.php:665
1196
+ msgid "Please contact us here"
1197
+ msgstr "Please contact us here"
1198
+
1199
+ #: includes/i18n.php:667
1200
+ msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
1201
+ msgstr "I have upgraded my account but when I try to Sync the License, the plan remains %s."
1202
+
1203
+ #: includes/i18n.php:673
1204
+ msgid "From unknown reason, the API connectivity test failed."
1205
+ msgstr "From unknown reason, the API connectivity test failed."
1206
+
1207
+ #: includes/i18n.php:675
1208
+ msgid "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?"
1209
+ msgstr "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?"
1210
+
1211
+ #: includes/i18n.php:677
1212
+ msgid "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server."
1213
+ msgstr "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server."
1214
+
1215
+ #: includes/i18n.php:679
1216
+ msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
1217
+ msgstr "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
1218
+
1219
+ #: includes/i18n.php:681
1220
+ msgctxt "as pluginX requires an access to our API"
1221
+ msgid "%s requires an access to our API."
1222
+ msgstr "%s requires an access to our API."
1223
+
1224
+ #: includes/i18n.php:683
1225
+ msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
1226
+ msgstr "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
1227
+
1228
+ #: includes/i18n.php:685
1229
+ msgid "I don't know what is Squid or ACL, help me!"
1230
+ msgstr "I don't know what is Squid or ACL, help me!"
1231
+
1232
+ #: includes/i18n.php:687, includes/i18n.php:695
1233
+ msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update."
1234
+ msgstr "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update."
1235
+
1236
+ #: includes/i18n.php:689
1237
+ msgid "I'm a system administrator"
1238
+ msgstr "I'm a system administrator"
1239
+
1240
+ #: includes/i18n.php:691
1241
+ msgid "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again."
1242
+ msgstr "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again."
1243
+
1244
+ #: includes/i18n.php:693
1245
+ msgid "I don't know what is cURL or how to install it, help me!"
1246
+ msgstr "I don't know what is cURL or how to install it, help me!"
1247
+
1248
+ #: includes/i18n.php:697
1249
+ msgid "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again."
1250
+ msgstr "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again."
1251
+
1252
+ #: includes/i18n.php:699
1253
+ msgid "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance."
1254
+ msgstr "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance."
1255
+
1256
+ #: includes/i18n.php:701
1257
+ msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
1258
+ msgstr "Sorry for the inconvenience and we are here to help if you give us a chance."
1259
+
1260
+ #: includes/i18n.php:703
1261
+ msgid "Yes - I'm giving you a chance to fix it"
1262
+ msgstr "Yes - I'm giving you a chance to fix it"
1263
+
1264
+ #: includes/i18n.php:705
1265
+ msgid "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update."
1266
+ msgstr "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update."
1267
+
1268
+ #: includes/i18n.php:707
1269
+ msgid "Let's try your previous version"
1270
+ msgstr "Let's try your previous version"
1271
+
1272
+ #: includes/i18n.php:709
1273
+ msgid "Uninstall this version and install the previous one."
1274
+ msgstr "Uninstall this version and install the previous one."
1275
+
1276
+ #: includes/i18n.php:711
1277
+ msgid "That's exhausting, please deactivate"
1278
+ msgstr "That's exhausting, please deactivate"
1279
+
1280
+ #: includes/i18n.php:713
1281
+ msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
1282
+ msgstr "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
1283
+
1284
+ #: includes/i18n.php:715
1285
+ msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience."
1286
+ msgstr "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience."
1287
+
1288
+ #: includes/i18n.php:717
1289
+ msgctxt "%1s - plugin title, %2s - API domain"
1290
+ msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
1291
+ msgstr "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
1292
+
1293
+ #: includes/i18n.php:719
1294
+ msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
1295
+ msgstr "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
1296
+
1297
+ #: includes/i18n.php:725
1298
+ msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder."
1299
+ msgstr "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder."
1300
+
1301
+ #: includes/i18n.php:727
1302
+ msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
1303
+ msgstr "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
1304
+
1305
+ #: includes/i18n.php:729
1306
+ msgid "%s is the new owner of the account."
1307
+ msgstr "%s is the new owner of the account."
1308
+
1309
+ #: includes/i18n.php:733
1310
+ msgctxt "addonX cannot run without pluginY"
1311
+ msgid "%s cannot run without %s."
1312
+ msgstr "%s cannot run without %s."
1313
+
1314
+ #: includes/i18n.php:735
1315
+ msgctxt "addonX cannot run..."
1316
+ msgid "%s cannot run without the plugin."
1317
+ msgstr "%s cannot run without the plugin."
1318
+
1319
+ #: includes/i18n.php:737
1320
+ msgctxt "pluginX activation was successfully..."
1321
+ msgid "%s activation was successfully completed."
1322
+ msgstr "%s activation was successfully completed."
1323
+
1324
+ #: includes/i18n.php:739
1325
+ msgctxt "Plugin installer section title"
1326
+ msgid "Features & Pricing"
1327
+ msgstr "Features & Pricing"
1328
+
1329
+ #: includes/i18n.php:741
1330
+ msgid "Add-on must be deployed to WordPress.org or Freemius."
1331
+ msgstr "Add-on must be deployed to WordPress.org or Freemius."
1332
+
1333
+ #: includes/i18n.php:743
1334
+ msgid "Paid add-on must be deployed to Freemius."
1335
+ msgstr "Paid add-on must be deployed to Freemius."
1336
+
1337
+ #: includes/i18n.php:747
1338
+ msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
1339
+ msgstr "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
1340
+
1341
+ #: includes/i18n.php:749
1342
+ msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license."
1343
+ msgstr "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license."
1344
+
1345
+ #: includes/i18n.php:755
1346
+ msgctxt "as every month"
1347
+ msgid "Monthly"
1348
+ msgstr "Monthly"
1349
+
1350
+ #: includes/i18n.php:757
1351
+ msgctxt "as monthly period"
1352
+ msgid "mo"
1353
+ msgstr "mo"
1354
+
1355
+ #: includes/i18n.php:759
1356
+ msgctxt "as once a year"
1357
+ msgid "Annual"
1358
+ msgstr "Annual"
1359
+
1360
+ #: includes/i18n.php:761
1361
+ msgctxt "as once a year"
1362
+ msgid "Annually"
1363
+ msgstr "Annually"
1364
+
1365
+ #: includes/i18n.php:763
1366
+ msgctxt "as once a year"
1367
+ msgid "Once"
1368
+ msgstr "Once"
1369
+
1370
+ #: includes/i18n.php:765
1371
+ msgctxt "as annual period"
1372
+ msgid "year"
1373
+ msgstr "year"
1374
+
1375
+ #: includes/i18n.php:767
1376
+ msgid "Lifetime"
1377
+ msgstr "Lifetime"
1378
+
1379
+ #: includes/i18n.php:769
1380
+ msgctxt "e.g. the best product"
1381
+ msgid "Best"
1382
+ msgstr "Best"
1383
+
1384
+ #: includes/i18n.php:771
1385
+ msgctxt "e.g. billed monthly"
1386
+ msgid "Billed %s"
1387
+ msgstr "Billed %s"
1388
+
1389
+ #: includes/i18n.php:773
1390
+ msgctxt "as a discount of $5 or 10%"
1391
+ msgid "Save %s"
1392
+ msgstr "Save %s"
1393
+
1394
+ #: includes/i18n.php:777
1395
+ msgid "View details"
1396
+ msgstr "View details"
includes/libs/freemius/languages/freemius-it_IT.mo ADDED
Binary file
includes/libs/freemius/languages/freemius-it_IT.po ADDED
@@ -0,0 +1,1521 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #
2
+ # Translators:
3
+ # Alessandro Benassi <plasmax@gmail.com>, 2016
4
+ # Daniele Scasciafratte Mte90 <mte90net@gmail.com>, 2015
5
+ # Vova Feldman <vova@freemius.com>, 2015
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: WordPress SDK\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "POT-Creation-Date: \n"
11
+ "PO-Revision-Date: 2016-09-13 08:22+0000\n"
12
+ "Last-Translator: Alessandro Benassi <plasmax@gmail.com>\n"
13
+ "Language-Team: Italian (Italy) (http://www.transifex.com/freemius/wordpress-sdk/language/it_IT/)\n"
14
+ "Content-Type: text/plain; charset=UTF-8\n"
15
+ "Content-Transfer-Encoding: \n"
16
+ "Language: it_IT\n"
17
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+
19
+ # Copyright (C) 2016 freemius
20
+ # This file is distributed under the same license as the freemius package.
21
+ #: includes/i18n.php41, includes/i18n.php:55
22
+ msgid "Yes - I'm in!"
23
+ msgstr "Sì, ci sto!"
24
+
25
+ #: includes/i18n.php43, includes/i18n.php:57
26
+ msgid "Not today"
27
+ msgstr "Non oggi"
28
+
29
+ #: includes/i18n.php:69
30
+ msgid "Account"
31
+ msgstr "Account"
32
+
33
+ #: includes/i18n.php:71
34
+ msgid "Add On"
35
+ msgstr "Add-on"
36
+
37
+ #: includes/i18n.php:73
38
+ msgid "Contact Us"
39
+ msgstr "Contattaci"
40
+
41
+ #: includes/i18n.php:75
42
+ msgid "Contact Support"
43
+ msgstr "Contatta il supporto"
44
+
45
+ #: includes/i18n.php:77
46
+ msgid "Change Ownership"
47
+ msgstr "Cambia Proprietario"
48
+
49
+ #: includes/i18n.php:79
50
+ msgid "Support"
51
+ msgstr "Supporto"
52
+
53
+ #: includes/i18n.php:81
54
+ msgid "Support Forum"
55
+ msgstr "Forum di supporto"
56
+
57
+ #: includes/i18n.php:83
58
+ msgid "Add Ons"
59
+ msgstr "Add-on"
60
+
61
+ #: includes/i18n.php:85
62
+ msgctxt "verb"
63
+ msgid "Upgrade"
64
+ msgstr "Aggiornamento"
65
+
66
+ #: includes/i18n.php:87
67
+ msgid "Awesome"
68
+ msgstr "Fantastico"
69
+
70
+ #: includes/i18n.php:89
71
+ msgctxt "noun"
72
+ msgid "Pricing"
73
+ msgstr "Prezzi"
74
+
75
+ #: includes/i18n.php:91
76
+ msgctxt "noun"
77
+ msgid "Price"
78
+ msgstr "Prezzo"
79
+
80
+ #: includes/i18n.php:93
81
+ msgid "Unlimited Updates"
82
+ msgstr "Aggiornamenti Illimitati"
83
+
84
+ #: includes/i18n.php:95
85
+ msgctxt "verb"
86
+ msgid "Downgrade"
87
+ msgstr "Downgrade"
88
+
89
+ #: includes/i18n.php:97
90
+ msgid "Cancel Trial"
91
+ msgstr "Annulla prova gratuita"
92
+
93
+ #: includes/i18n.php:99
94
+ msgid "Free Trial"
95
+ msgstr "Prova gratuita"
96
+
97
+ #: includes/i18n.php:101
98
+ msgid "Start my free %s"
99
+ msgstr "Inizia la mia %s"
100
+
101
+ #: includes/i18n.php:103
102
+ msgid "No commitment for %s - cancel anytime"
103
+ msgstr "Nessun impegno con %s - cancella quando vuoi"
104
+
105
+ #: includes/i18n.php:105
106
+ msgid "After your free %s, pay as little as %s"
107
+ msgstr "Dopo il tuo %s gratuito, paghi solamente %s"
108
+
109
+ #: includes/i18n.php:107
110
+ msgid "Details"
111
+ msgstr "Dettagli"
112
+
113
+ #: includes/i18n.php:109
114
+ msgid "Account Details"
115
+ msgstr "Dettagli dell'account"
116
+
117
+ #: includes/i18n.php:111
118
+ msgctxt "verb"
119
+ msgid "Delete"
120
+ msgstr "Elimina"
121
+
122
+ #: includes/i18n.php:113
123
+ msgctxt "verb"
124
+ msgid "Show"
125
+ msgstr "Mostra"
126
+
127
+ #: includes/i18n.php:115
128
+ msgctxt "verb"
129
+ msgid "Hide"
130
+ msgstr "Nascondi"
131
+
132
+ #: includes/i18n.php:117
133
+ msgctxt "verb"
134
+ msgid "Edit"
135
+ msgstr "Modifica"
136
+
137
+ #: includes/i18n.php:119
138
+ msgid "Date"
139
+ msgstr "Data"
140
+
141
+ #: includes/i18n.php:121
142
+ msgid "Amount"
143
+ msgstr "Importo"
144
+
145
+ #: includes/i18n.php:123
146
+ msgid "Invoice"
147
+ msgstr "Fattura"
148
+
149
+ #: includes/i18n.php:125
150
+ msgid "Billing"
151
+ msgstr "Fatturazione"
152
+
153
+ #: includes/i18n.php:127
154
+ msgid "Payments"
155
+ msgstr "Pagamenti"
156
+
157
+ #: includes/i18n.php:129
158
+ msgid "Delete Account"
159
+ msgstr "Elimina Account"
160
+
161
+ #: includes/i18n.php:131
162
+ msgctxt "as close a window"
163
+ msgid "Dismiss"
164
+ msgstr "Chiudi"
165
+
166
+ #: includes/i18n.php:133
167
+ msgctxt "as product pricing plan"
168
+ msgid "Plan"
169
+ msgstr "Piano"
170
+
171
+ #: includes/i18n.php:135
172
+ msgid "Change Plan"
173
+ msgstr "Cambia piano"
174
+
175
+ #: includes/i18n.php:137
176
+ msgctxt "as download professional version"
177
+ msgid "Download %s Version"
178
+ msgstr "Scarica la versione %s"
179
+
180
+ #: includes/i18n.php:139
181
+ msgctxt "as download professional version now"
182
+ msgid "Download %s version now"
183
+ msgstr "Scarica la versione %s ora"
184
+
185
+ #: includes/i18n.php:141
186
+ msgctxt "as download latest version"
187
+ msgid "Download Latest"
188
+ msgstr "Scarica l'ultima versione"
189
+
190
+ #: includes/i18n.php:143
191
+ msgctxt "E.g. you have a professional license."
192
+ msgid "You have a %s license."
193
+ msgstr "Hai la licenza %s."
194
+
195
+ #: includes/i18n.php:145
196
+ msgid "New"
197
+ msgstr "Nuovo"
198
+
199
+ #: includes/i18n.php:147
200
+ msgid "Free"
201
+ msgstr "Gratuito"
202
+
203
+ #: includes/i18n.php:149
204
+ msgctxt "as trial plan"
205
+ msgid "Trial"
206
+ msgstr "Prova gratuita"
207
+
208
+ #: includes/i18n.php:151
209
+ msgctxt "verb"
210
+ msgid "Purchase"
211
+ msgstr "Acquisto"
212
+
213
+ #: includes/i18n.php:153
214
+ msgid "Purchase License"
215
+ msgstr "Acquista licenza"
216
+
217
+ #: includes/i18n.php:155
218
+ msgctxt "verb"
219
+ msgid "Buy"
220
+ msgstr "Compra"
221
+
222
+ #: includes/i18n.php:157
223
+ msgid "Buy License"
224
+ msgstr "Compra licenza"
225
+
226
+ #: includes/i18n.php:159
227
+ msgid "Single Site License"
228
+ msgstr "Licenza per sito singolo"
229
+
230
+ #: includes/i18n.php:161
231
+ msgid "Unlimited Licenses"
232
+ msgstr "Licenze illimitate"
233
+
234
+ #: includes/i18n.php:163
235
+ msgid "Up to %s Sites"
236
+ msgstr "Fino a %s siti"
237
+
238
+ #: includes/i18n.php:165
239
+ msgid "%sRenew your license now%s to access version %s features and support."
240
+ msgstr "%sRinnova la tua licenza ora%s per accedere a funzionalità e supporto della versione %s."
241
+
242
+ #: includes/i18n.php:167
243
+ msgid ""
244
+ "Enter the email address you've used for the upgrade below and we will resend"
245
+ " you the license key."
246
+ msgstr "Inserisci qui sotto l'indirizzo email che hai usato per registrare l'aggiornamento e ti invieremo di nuovo la chiave di licenza."
247
+
248
+ #: includes/i18n.php:169
249
+ msgctxt "e.g. Professional Plan"
250
+ msgid "%s Plan"
251
+ msgstr "Piano %s"
252
+
253
+ #: includes/i18n.php:171
254
+ msgid "You are just one step away - %s"
255
+ msgstr "Sei a un passo dalla fine - %s"
256
+
257
+ #: includes/i18n.php:173
258
+ msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
259
+ msgid "Complete \"%s\" Activation Now"
260
+ msgstr "Completa l'attivazione di \"%s\" ora"
261
+
262
+ #: includes/i18n.php:175
263
+ msgid "We made a few tweaks to the plugin, %s"
264
+ msgstr "Abbiamo apportato alcune modifiche al plugin, %s"
265
+
266
+ #: includes/i18n.php:177
267
+ msgid "Opt-in to make \"%s\" Better!"
268
+ msgstr "Contribuisci a rendere \"%s\" migliore!"
269
+
270
+ #: includes/i18n.php:179
271
+ msgid "Error"
272
+ msgstr "Errore"
273
+
274
+ #: includes/i18n.php:181
275
+ msgid ""
276
+ "Freemius SDK couldn't find the plugin's main file. Please contact "
277
+ "sdk@freemius.com with the current error."
278
+ msgstr "L'SDK di Freemius non è riuscito a trovare il file principale del plugin. Per favore contatta sdk@freemius.com riportando l'errore."
279
+
280
+ #: includes/i18n.php:187
281
+ msgctxt "as expiration date"
282
+ msgid "Expiration"
283
+ msgstr "Scadenza"
284
+
285
+ #: includes/i18n.php:189
286
+ msgctxt "as software license"
287
+ msgid "License"
288
+ msgstr "Licenza"
289
+
290
+ #: includes/i18n.php:191
291
+ msgid "not verified"
292
+ msgstr "non verificato"
293
+
294
+ #: includes/i18n.php:193
295
+ msgid "Verify Email"
296
+ msgstr "Verifica email"
297
+
298
+ #: includes/i18n.php:195
299
+ msgctxt "e.g. expires in 2 months"
300
+ msgid "Expires in %s"
301
+ msgstr "Scade in %s"
302
+
303
+ #: includes/i18n.php:197
304
+ msgctxt "e.g. auto renews in 2 months"
305
+ msgid "Auto renews in %s"
306
+ msgstr "Rinnovo automatico in %s"
307
+
308
+ #: includes/i18n.php:199
309
+ msgid "No expiration"
310
+ msgstr "Nessuna scadenza"
311
+
312
+ #: includes/i18n.php:201
313
+ msgid "Expired"
314
+ msgstr "Scaduto"
315
+
316
+ #: includes/i18n.php:203
317
+ msgid "Cancelled"
318
+ msgstr "Annullato"
319
+
320
+ #: includes/i18n.php:205
321
+ msgctxt "e.g. In 2 hours"
322
+ msgid "In %s"
323
+ msgstr "In %s"
324
+
325
+ #: includes/i18n.php:207
326
+ msgctxt "e.g. 2 min ago"
327
+ msgid "%s ago"
328
+ msgstr "%s fa"
329
+
330
+ #: includes/i18n.php:209
331
+ msgctxt "as plugin version"
332
+ msgid "Version"
333
+ msgstr "Versione"
334
+
335
+ #: includes/i18n.php:211
336
+ msgid "Name"
337
+ msgstr "Nome"
338
+
339
+ #: includes/i18n.php:213
340
+ msgid "Email"
341
+ msgstr "Email"
342
+
343
+ #: includes/i18n.php:215
344
+ msgid "Email address"
345
+ msgstr "Indirizzo email"
346
+
347
+ #: includes/i18n.php:217
348
+ msgid "Verified"
349
+ msgstr "Verificato"
350
+
351
+ #: includes/i18n.php:219
352
+ msgid "Plugin"
353
+ msgstr "Plugin"
354
+
355
+ #: includes/i18n.php:221
356
+ msgid "Plugins"
357
+ msgstr "Plugin"
358
+
359
+ #: includes/i18n.php:223
360
+ msgid "Themes"
361
+ msgstr "Temi"
362
+
363
+ #: includes/i18n.php:225
364
+ msgctxt "as file/folder path"
365
+ msgid "Path"
366
+ msgstr "Percorso"
367
+
368
+ #: includes/i18n.php:227
369
+ msgid "Title"
370
+ msgstr "Titolo"
371
+
372
+ #: includes/i18n.php:229
373
+ msgid "Free version"
374
+ msgstr "Versione gratuita"
375
+
376
+ #: includes/i18n.php:231
377
+ msgid "Premium version"
378
+ msgstr "Versione premium"
379
+
380
+ #: includes/i18n.php:233
381
+ msgctxt "as WP plugin slug"
382
+ msgid "Slug"
383
+ msgstr "Slug"
384
+
385
+ #: includes/i18n.php:235
386
+ msgid "ID"
387
+ msgstr "ID"
388
+
389
+ #: includes/i18n.php:237
390
+ msgid "Users"
391
+ msgstr "Utenti"
392
+
393
+ #: includes/i18n.php:239
394
+ msgid "Plugin Installs"
395
+ msgstr "Installazioni Plugin"
396
+
397
+ #: includes/i18n.php:241
398
+ msgctxt "like websites"
399
+ msgid "Sites"
400
+ msgstr "Siti"
401
+
402
+ #: includes/i18n.php:243
403
+ msgid "User ID"
404
+ msgstr "ID utente"
405
+
406
+ #: includes/i18n.php:245
407
+ msgid "Site ID"
408
+ msgstr "ID del sito"
409
+
410
+ #: includes/i18n.php:247
411
+ msgid "Public Key"
412
+ msgstr "Chiave pubblica"
413
+
414
+ #: includes/i18n.php:249
415
+ msgid "Secret Key"
416
+ msgstr "Chiave segreta"
417
+
418
+ #: includes/i18n.php:251
419
+ msgctxt "as secret encryption key missing"
420
+ msgid "No Secret"
421
+ msgstr "Nessuna chiave"
422
+
423
+ #: includes/i18n.php:253
424
+ msgid "No ID"
425
+ msgstr "Nessun ID"
426
+
427
+ #: includes/i18n.php:255
428
+ msgctxt "as synchronize license"
429
+ msgid "Sync License"
430
+ msgstr "Sincronizza la licenza"
431
+
432
+ #: includes/i18n.php:257
433
+ msgctxt "as synchronize"
434
+ msgid "Sync"
435
+ msgstr "Sincronizza"
436
+
437
+ #: includes/i18n.php:259
438
+ msgid "Activate License"
439
+ msgstr "Attiva licenza"
440
+
441
+ #: includes/i18n.php:261
442
+ msgid "Activate Free Version"
443
+ msgstr "Attiva versione gratuita"
444
+
445
+ #: includes/i18n.php:263
446
+ msgid ""
447
+ "Please enter the license key that you received in the email right after the "
448
+ "purchase:"
449
+ msgstr "Per favore inserisci la chiave di licenza che hai ricevuto via mail subito dopo l'acquisto:"
450
+
451
+ #: includes/i18n.php:265
452
+ msgid "Activating license..."
453
+ msgstr "Sto attivando la licenza..."
454
+
455
+ #: includes/i18n.php:267
456
+ msgid "Change License"
457
+ msgstr "Cambia licenza"
458
+
459
+ #: includes/i18n.php:269
460
+ msgid "Update License"
461
+ msgstr "Aggiorna licenza"
462
+
463
+ #: includes/i18n.php:271
464
+ msgid "Deactivate License"
465
+ msgstr "Disattiva licenza"
466
+
467
+ #: includes/i18n.php:273
468
+ msgid "Activate"
469
+ msgstr "Attiva"
470
+
471
+ #: includes/i18n.php:275
472
+ msgid "Deactivate"
473
+ msgstr "Disattiva"
474
+
475
+ #: includes/i18n.php:277
476
+ msgid "Skip & Deactivate"
477
+ msgstr "Salta e disattiva"
478
+
479
+ #: includes/i18n.php:279
480
+ msgid "No - just deactivate"
481
+ msgstr "No - disattiva e basta"
482
+
483
+ #: includes/i18n.php:281
484
+ msgid "Yes - do your thing"
485
+ msgstr "Sì - fai pure"
486
+
487
+ #: includes/i18n.php:283
488
+ msgctxt "active mode"
489
+ msgid "Active"
490
+ msgstr "Attiva"
491
+
492
+ #: includes/i18n.php:285
493
+ msgctxt "is active mode?"
494
+ msgid "Is Active"
495
+ msgstr "è attiva"
496
+
497
+ #: includes/i18n.php:287
498
+ msgid "Install Now"
499
+ msgstr "Installa ora"
500
+
501
+ #: includes/i18n.php:289
502
+ msgid "Install Update Now"
503
+ msgstr "Installa l'aggiornamento ora"
504
+
505
+ #: includes/i18n.php:291
506
+ msgid "More information about %s"
507
+ msgstr "Ulteriori informazioni su %s"
508
+
509
+ #: includes/i18n.php:293
510
+ msgid "Localhost"
511
+ msgstr "Localhost"
512
+
513
+ #: includes/i18n.php:295
514
+ msgctxt "as activate Professional plan"
515
+ msgid "Activate %s Plan"
516
+ msgstr "Attivare il piano %s"
517
+
518
+ #: includes/i18n.php:297
519
+ msgctxt "as 5 licenses left"
520
+ msgid "%s left"
521
+ msgstr "%s rimanenti"
522
+
523
+ #: includes/i18n.php:299
524
+ msgid "Last license"
525
+ msgstr "Ultima licenza"
526
+
527
+ #: includes/i18n.php:301
528
+ msgid "What is your %s?"
529
+ msgstr "Qual è il tuo %s?"
530
+
531
+ #: includes/i18n.php:303
532
+ msgid "Activate this add-on"
533
+ msgstr "Attivare questo addon"
534
+
535
+ #: includes/i18n.php:305
536
+ msgid ""
537
+ "Deactivating your license will block all premium features, but will enable "
538
+ "you to activate the license on another site. Are you sure you want to "
539
+ "proceed?"
540
+ msgstr "La disattivazione della licenza bloccherà tutte le funzionalità premium, ma vi permetterà di attivare la licenza su un altro sito. Sei sicuro di voler procedere?"
541
+
542
+ #: includes/i18n.php:307
543
+ msgid ""
544
+ "Deleting the account will automatically deactivate your %s plan license so "
545
+ "you can use it on other sites. If you want to terminate the recurring "
546
+ "payments as well, click the \"Cancel\" button, and first \"Downgrade\" your "
547
+ "account. Are you sure you would like to continue with the deletion?"
548
+ msgstr "L'eliminazione dell'account disattiva automaticamente la tua licenza del piano %s quindi è possibile utilizzarlo su altri siti. Se si desidera anche terminare i pagamenti ricorrenti, fare clic sul pulsante \"Annulla\" ed effettuare il \"Downgrade\" del tuo account. Sei sicuro di voler continuare con l'eliminazione?"
549
+
550
+ #: includes/i18n.php:309
551
+ msgid ""
552
+ "Deletion is not temporary. Only delete if you no longer want to use this "
553
+ "plugin anymore. Are you sure you would like to continue with the deletion?"
554
+ msgstr "L'eliminazione non è temporanea. Cancella solo se non si desidera più utilizzare questo plugin. Sei sicuro di voler continuare con l'eliminazione?"
555
+
556
+ #: includes/i18n.php:311
557
+ msgid ""
558
+ "Downgrading your plan will immediately stop all future recurring payments "
559
+ "and your %s plan license will expire in %s."
560
+ msgstr "Effettuare il downgrade del piano interromperà immediatamente tutti i futuri pagamenti ricorrenti e la licenza del piano %s scadrà in %s."
561
+
562
+ #: includes/i18n.php:313
563
+ msgid ""
564
+ "Cancelling the trial will immediately block access to all premium features. "
565
+ "Are you sure?"
566
+ msgstr "Cancellando il periodo di prova gratuito bloccherai immediatamente l'accesso a tutte le funzionalità premium. Vuoi continuare?"
567
+
568
+ #: includes/i18n.php:315
569
+ msgid ""
570
+ "You can still enjoy all %s features but you will not have access to plugin "
571
+ "updates and support."
572
+ msgstr "Puoi ancora sfruttare tutte le funzionalità di %s, ma non avrai accesso al supporto ed agli aggiornamenti del plugin."
573
+
574
+ #: includes/i18n.php:317
575
+ msgid ""
576
+ "Once your license expire you can still use the Free version but you will NOT"
577
+ " have access to the %s features."
578
+ msgstr "Una volta scaduta la licenza, sarà possibile ancora utilizzare la versione gratuita ma non avrete accesso alle funzionalità di %s."
579
+
580
+ #: includes/i18n.php:319
581
+ msgid "Are you sure you want to proceed?"
582
+ msgstr "Sei sicuro di voler procedere?"
583
+
584
+ #: includes/i18n.php:325
585
+ msgid "Add Ons for %s"
586
+ msgstr "Add-on per %s"
587
+
588
+ #: includes/i18n.php:327
589
+ msgid ""
590
+ "We could'nt load the add-ons list. It's probably an issue on our side, "
591
+ "please try to come back in few minutes."
592
+ msgstr "Non siamo riusciti a caricare la lista degli add-on. Si tratta probabilmente di un problema nel nostro sistema, per favore riprova tra qualche minuto."
593
+
594
+ #: includes/i18n.php:331
595
+ msgid "Anonymous feedback"
596
+ msgstr "Feedback anonimo"
597
+
598
+ #: includes/i18n.php:333
599
+ msgid "Quick feedback"
600
+ msgstr "Feedback veloce"
601
+
602
+ #: includes/i18n.php:335
603
+ msgid "If you have a moment, please let us know why you are deactivating"
604
+ msgstr "Se hai un momento, potresti dirci perché lo hai disattivato?"
605
+
606
+ #: includes/i18n.php:337
607
+ msgid "Yes - Deactivate"
608
+ msgstr "Si - Disattiva"
609
+
610
+ #: includes/i18n.php:339
611
+ msgid "Submit & Deactivate"
612
+ msgstr "Invia & Disattiva"
613
+
614
+ #: includes/i18n.php:341
615
+ msgctxt "the text of the cancel button of the plugin deactivation dialog box."
616
+ msgid "Cancel"
617
+ msgstr "Cancella"
618
+
619
+ #: includes/i18n.php:343
620
+ msgid "I no longer need the plugin"
621
+ msgstr "Non ho piú bisogno di questo plugin"
622
+
623
+ #: includes/i18n.php:345
624
+ msgid "I found a better plugin"
625
+ msgstr "Ho trovato un plugin migliore"
626
+
627
+ #: includes/i18n.php:347
628
+ msgid "I only needed the plugin for a short period"
629
+ msgstr "Avevo bisogno del plugin solo per un breve periodo"
630
+
631
+ #: includes/i18n.php:349
632
+ msgid "The plugin broke my site"
633
+ msgstr "Il plugin ha causato problemi al mio sito"
634
+
635
+ #: includes/i18n.php:351
636
+ msgid "The plugin suddenly stopped working"
637
+ msgstr "Il plugin ha smesso di funzionare"
638
+
639
+ #: includes/i18n.php:353
640
+ msgid "I can't pay for it anymore"
641
+ msgstr "Non posso piú pagarlo"
642
+
643
+ #: includes/i18n.php:355
644
+ msgid "It's a temporary deactivation. I'm just debugging an issue."
645
+ msgstr "È una disattivazione temporanea. Sto solo cercando di risolvere un problema."
646
+
647
+ #: includes/i18n.php:357
648
+ msgctxt ""
649
+ "the text of the \"other\" reason for deactivating the plugin that is shown "
650
+ "in the modal box."
651
+ msgid "Other"
652
+ msgstr "Altro"
653
+
654
+ #: includes/i18n.php:359
655
+ msgid "Kindly tell us the reason so we can improve."
656
+ msgstr "Spiegandoci il motivo ci aiuterai a migliorare."
657
+
658
+ #: includes/i18n.php:361
659
+ msgid "What's the plugin's name?"
660
+ msgstr "Qual è il nome del plugin?"
661
+
662
+ #: includes/i18n.php:363
663
+ msgid "What price would you feel comfortable paying?"
664
+ msgstr "Che prezzo ritieni opportuno pagare?"
665
+
666
+ #: includes/i18n.php:365
667
+ msgid "I couldn't understand how to make it work"
668
+ msgstr "Non capisco come farlo funzionare"
669
+
670
+ #: includes/i18n.php:367
671
+ msgid ""
672
+ "The plugin is great, but I need specific feature that you don't support"
673
+ msgstr "Il plugin é ottimo ma ho bisogno di una funzionalitá specifica che non é supportata"
674
+
675
+ #: includes/i18n.php:369
676
+ msgid "The plugin is not working"
677
+ msgstr "Il plugin non funziona"
678
+
679
+ #: includes/i18n.php:371
680
+ msgid "It's not what I was looking for"
681
+ msgstr "Non é quello che stavo cercando"
682
+
683
+ #: includes/i18n.php:373
684
+ msgid "The plugin didn't work as expected"
685
+ msgstr "Il plugin non funziona come mi aspettavo"
686
+
687
+ #: includes/i18n.php:375
688
+ msgid "What feature?"
689
+ msgstr "Quale funzionalitá?"
690
+
691
+ #: includes/i18n.php:377
692
+ msgid "Kindly share what didn't work so we can fix it for future users..."
693
+ msgstr "Condividi cosa non ha funzionato in modo da migliorare il prodotto per gli utenti futuri..."
694
+
695
+ #: includes/i18n.php:379
696
+ msgid "What you've been looking for?"
697
+ msgstr "Che cosa stai cercando?"
698
+
699
+ #: includes/i18n.php:381
700
+ msgid "What did you expect?"
701
+ msgstr "Che cosa ti aspettavi?"
702
+
703
+ #: includes/i18n.php:383
704
+ msgid "The plugin didn't work"
705
+ msgstr "Il plugin non funziona"
706
+
707
+ #: includes/i18n.php:385
708
+ msgid "I don't like to share my information with you"
709
+ msgstr "Non voglio condividere i miei dati con te"
710
+
711
+ #: includes/i18n.php:387
712
+ msgid ""
713
+ "You might have missed it, but you don't have to share any data and can just "
714
+ "%s the opt-in."
715
+ msgstr "Potresti non averci fatto caso, ma non sei obbligato a condividere i tuoi dati e puoi semplicemente %s la tua partecipazione."
716
+
717
+ #: includes/i18n.php:395
718
+ msgctxt "greeting"
719
+ msgid "Hey %s,"
720
+ msgstr "Hey %s,"
721
+
722
+ #: includes/i18n.php:397
723
+ msgctxt "a greeting. E.g. Thanks John!"
724
+ msgid "Thanks %s!"
725
+ msgstr "Grazie %s!"
726
+
727
+ #: includes/i18n.php:399
728
+ msgid ""
729
+ "In order to enjoy all our features and functionality, %s needs to connect "
730
+ "your user, %s at %s, to %s"
731
+ msgstr "Per poter sfruttare tutte le caratteristiche e funzionalità, %s deve connettere il tuo utente, %s a %s su %s"
732
+
733
+ #: includes/i18n.php:401
734
+ msgid ""
735
+ "Please help us improve %2$s! If you opt-in, some data about your usage of "
736
+ "%2$s will be sent to %5$s. If you skip this, that's okay! %2$s will still "
737
+ "work just fine."
738
+ msgstr "Per favore aiutaci a migliorare %2$s! Se decidi di contribuire, alcuni dei tuoi dati di utilizzo inerenti a %2$s verranno inviati a %5$s. Se salti questo passaggio, non c'è problema! %2$s funzionerà comunque perfettamente."
739
+
740
+ #: includes/i18n.php:403
741
+ msgid ""
742
+ "You should receive an activation email for %s to your mailbox at %s. Please "
743
+ "make sure you click the activation button in that email to complete the "
744
+ "install."
745
+ msgstr "Dovresti ricevere un'email di attivazione di %s all'indirizzo %s. Assicurati di fare clic sul pulsante di attivazione nell'email per completare l'installazione."
746
+
747
+ #: includes/i18n.php:405
748
+ msgid ""
749
+ "Thanks for purchasing %s! To get started, please enter your license key:"
750
+ msgstr "Grazie per aver acquistato %s! Per iniziare, per favore inserisci la tua chiave di licenza:"
751
+
752
+ #: includes/i18n.php:407
753
+ msgid ""
754
+ "The plugin will be periodically sending data to %s to check for plugin "
755
+ "updates and verify the validity of your license."
756
+ msgstr "Il plugin invierà dati periodicamente a %s per controllare l'esistenza di aggiornamenti e verificare la validità della tua licenza."
757
+
758
+ #: includes/i18n.php:409
759
+ msgid "What permissions are being granted?"
760
+ msgstr "Quali autorizzazioni vengono concesse?"
761
+
762
+ #: includes/i18n.php:411
763
+ msgid "Your Profile Overview"
764
+ msgstr "Panoramica del tuo profilo"
765
+
766
+ #: includes/i18n.php:413
767
+ msgid "Name and email address"
768
+ msgstr "Nome ed indirizzo email"
769
+
770
+ #: includes/i18n.php:415
771
+ msgid "Your Site Overview"
772
+ msgstr "Panoramica del tuo sito"
773
+
774
+ #: includes/i18n.php:417
775
+ msgid "Site URL, WP version, PHP info, plugins & themes"
776
+ msgstr "URL del sito, versione di WP, informazioni PHP, plugin e temi"
777
+
778
+ #: includes/i18n.php:419
779
+ msgid "Current Plugin Events"
780
+ msgstr "Eventi correnti del plugin"
781
+
782
+ #: includes/i18n.php:421
783
+ msgid "Activation, deactivation and uninstall"
784
+ msgstr "Attiva, disattivazione e disinstallazione"
785
+
786
+ #: includes/i18n.php:423
787
+ msgid "Plugins & Themes"
788
+ msgstr "Plugin e temi"
789
+
790
+ #: includes/i18n.php:425
791
+ msgid "Titles, versions and state."
792
+ msgstr "Titoli, versioni e stato."
793
+
794
+ #: includes/i18n.php:427
795
+ msgid "Newsletter"
796
+ msgstr "Newsletter"
797
+
798
+ #: includes/i18n.php:429
799
+ msgid "Updates, announcements, marketing, no spam"
800
+ msgstr "Aggiornamenti, annunci, marketing, no spam"
801
+
802
+ #: includes/i18n.php:431
803
+ msgid "Privacy Policy"
804
+ msgstr "Politica sulla privacy"
805
+
806
+ #: includes/i18n.php:433
807
+ msgid "Terms of Service"
808
+ msgstr "Termini del Servizio"
809
+
810
+ #: includes/i18n.php:435
811
+ msgctxt "as activating plugin"
812
+ msgid "Activating"
813
+ msgstr "Attivazione"
814
+
815
+ #: includes/i18n.php:437
816
+ msgctxt "as in the process of sending an email"
817
+ msgid "Sending email"
818
+ msgstr "Invio email"
819
+
820
+ #: includes/i18n.php:439
821
+ msgctxt "button label"
822
+ msgid "Allow & Continue"
823
+ msgstr "Consenti & Continua"
824
+
825
+ #: includes/i18n.php:441
826
+ msgctxt "button label"
827
+ msgid "Agree & Activate License"
828
+ msgstr "Accetta e attiva la licenza"
829
+
830
+ #: includes/i18n.php:443
831
+ msgctxt "verb"
832
+ msgid "Skip"
833
+ msgstr "Salta"
834
+
835
+ #: includes/i18n.php:445
836
+ msgid "Click here to use the plugin anonymously"
837
+ msgstr "Fai clic qui per usare il plugin anonimamente"
838
+
839
+ #: includes/i18n.php:447
840
+ msgid "Re-send activation email"
841
+ msgstr "Invia nuovamente l'email di attivazione"
842
+
843
+ #: includes/i18n.php:449
844
+ msgid "License key"
845
+ msgstr "Chiave di licenza"
846
+
847
+ #: includes/i18n.php:451
848
+ msgid "Send License Key"
849
+ msgstr "Invia chiave di licenza"
850
+
851
+ #: includes/i18n.php:453
852
+ msgid "Sending license key"
853
+ msgstr "Invio chiave di licenza"
854
+
855
+ #: includes/i18n.php:455
856
+ msgid "Have a license key?"
857
+ msgstr "Hai una chiave di licenza?"
858
+
859
+ #: includes/i18n.php:457
860
+ msgid "Don't have a license key?"
861
+ msgstr "Non hai una chiave di licenza?"
862
+
863
+ #: includes/i18n.php:459
864
+ msgid "Can't find your license key?"
865
+ msgstr "Non trovi la tua chiave di licenza?"
866
+
867
+ #: includes/i18n.php:471
868
+ msgid "Screenshots"
869
+ msgstr "Screenshots"
870
+
871
+ #: includes/i18n.php:473
872
+ msgid "Click to view full-size screenshot %d"
873
+ msgstr "Fare clic per visualizzare lo screenshot in grandi dimensioni %d"
874
+
875
+ #: includes/i18n.php:481
876
+ msgid "Freemius Debug"
877
+ msgstr "Debug Freemius"
878
+
879
+ #: includes/i18n.php:483
880
+ msgctxt "as turned on"
881
+ msgid "On"
882
+ msgstr "Attivo"
883
+
884
+ #: includes/i18n.php:485
885
+ msgctxt "as turned off"
886
+ msgid "Off"
887
+ msgstr "Non attivo"
888
+
889
+ #: includes/i18n.php:487
890
+ msgctxt "as code debugging"
891
+ msgid "Debugging"
892
+ msgstr "Debugging"
893
+
894
+ #: includes/i18n.php:489
895
+ msgid "Freemius State"
896
+ msgstr "Stato di Freemius"
897
+
898
+ #: includes/i18n.php:491
899
+ msgctxt "as connection was successful"
900
+ msgid "Connected"
901
+ msgstr "Connesso"
902
+
903
+ #: includes/i18n.php:493
904
+ msgctxt "as connection blocked"
905
+ msgid "Blocked"
906
+ msgstr "Bloccato"
907
+
908
+ #: includes/i18n.php:495
909
+ msgctxt "as application program interface"
910
+ msgid "API"
911
+ msgstr "API"
912
+
913
+ #: includes/i18n.php:497
914
+ msgctxt "as software development kit versions"
915
+ msgid "SDK"
916
+ msgstr "SDK"
917
+
918
+ #: includes/i18n.php:499
919
+ msgctxt "as software development kit versions"
920
+ msgid "SDK Versions"
921
+ msgstr "Versioni SDK"
922
+
923
+ #: includes/i18n.php:501
924
+ msgctxt "as plugin folder path"
925
+ msgid "Plugin Path"
926
+ msgstr "Percorso del plugin"
927
+
928
+ #: includes/i18n.php:503
929
+ msgctxt "as sdk path"
930
+ msgid "SDK Path"
931
+ msgstr "Percorso SDK"
932
+
933
+ #: includes/i18n.php:505
934
+ msgid "Add Ons of Plugin %s"
935
+ msgstr "Add-on del Plugin %s"
936
+
937
+ #: includes/i18n.php:507
938
+ msgid "Are you sure you want to delete all Freemius data?"
939
+ msgstr "Sei sicuro di voler eliminare tutti i dati di Freemius?"
940
+
941
+ #: includes/i18n.php:509
942
+ msgid "Actions"
943
+ msgstr "Azioni"
944
+
945
+ #: includes/i18n.php:511
946
+ msgid "Delete All Accounts"
947
+ msgstr "Eliminare tutti gli account"
948
+
949
+ #: includes/i18n.php:513
950
+ msgid "Start Fresh"
951
+ msgstr "Inizia da capo"
952
+
953
+ #: includes/i18n.php:515
954
+ msgid "Clear API Cache"
955
+ msgstr "Elimina cache API"
956
+
957
+ #: includes/i18n.php:517
958
+ msgid "Sync Data From Server"
959
+ msgstr "Sincronizza i dati dal server"
960
+
961
+ #: includes/i18n.php:519
962
+ msgid "Scheduled Crons"
963
+ msgstr "Azioni programmate"
964
+
965
+ #: includes/i18n.php:521
966
+ msgid "Plugins & Themes Sync"
967
+ msgstr "Sincronizzazione plugin e temi"
968
+
969
+ #: includes/i18n.php:529
970
+ msgctxt "as congratulations"
971
+ msgid "Congrats"
972
+ msgstr "Congratulazioni"
973
+
974
+ #: includes/i18n.php:531
975
+ msgctxt "exclamation"
976
+ msgid "Oops"
977
+ msgstr "Ops"
978
+
979
+ #: includes/i18n.php:533
980
+ msgctxt "interjection expressing joy or exuberance"
981
+ msgid "Yee-haw"
982
+ msgstr "Evvai"
983
+
984
+ #: includes/i18n.php:535
985
+ msgctxt ""
986
+ "(especially in electronic communication) used to express elation, "
987
+ "enthusiasm, or triumph."
988
+ msgid "W00t"
989
+ msgstr "Forte"
990
+
991
+ #: includes/i18n.php:537
992
+ msgctxt "a positive response"
993
+ msgid "Right on"
994
+ msgstr "Sì"
995
+
996
+ #: includes/i18n.php:539
997
+ msgctxt ""
998
+ "something somebody says when they are thinking about what you have just "
999
+ "said. "
1000
+ msgid "Hmm"
1001
+ msgstr "Uhm"
1002
+
1003
+ #: includes/i18n.php:541
1004
+ msgid "O.K"
1005
+ msgstr "OK"
1006
+
1007
+ #: includes/i18n.php:543
1008
+ msgctxt "exclamation"
1009
+ msgid "Hey"
1010
+ msgstr "Hey"
1011
+
1012
+ #: includes/i18n.php:545
1013
+ msgctxt "advance notice of something that will need attention."
1014
+ msgid "Heads up"
1015
+ msgstr "Attenzione"
1016
+
1017
+ #: includes/i18n.php:553
1018
+ msgid "Seems like you got the latest release."
1019
+ msgstr "Sembra che tu abbia la versione più recente."
1020
+
1021
+ #: includes/i18n.php:555
1022
+ msgid "You are all good!"
1023
+ msgstr "Sei fantastico!"
1024
+
1025
+ #: includes/i18n.php:557
1026
+ msgid ""
1027
+ "Sorry, we could not complete the email update. Another user with the same "
1028
+ "email is already registered."
1029
+ msgstr "Siamo spiacenti, non siamo riusciti a completare l'aggiornamento via email. Un altro utente con lo stesso indirizzo email è già registrato."
1030
+
1031
+ #: includes/i18n.php:559
1032
+ msgid ""
1033
+ "If you would like to give up the ownership of the plugin's account to %s "
1034
+ "click the Change Ownership button."
1035
+ msgstr "Se vuoi cedere la proprietá dell'account del plugin a %s clicca su Cambia Proprietà."
1036
+
1037
+ #: includes/i18n.php:561
1038
+ msgid ""
1039
+ "Your email was successfully updated. You should receive an email with "
1040
+ "confirmation instructions in few moments."
1041
+ msgstr "Il tuo indirizzo email è stato aggiornato correttamente. Riceverai un'email con le istruzioni di conferma in pochi istanti."
1042
+
1043
+ #: includes/i18n.php:563
1044
+ msgid "Your name was successfully updated."
1045
+ msgstr "Il tuo nome è stato aggiornato correttamente."
1046
+
1047
+ #: includes/i18n.php:565
1048
+ msgid "You have successfully updated your %s."
1049
+ msgstr "Hai aggiornato con successo il tuo %s."
1050
+
1051
+ #: includes/i18n.php:567
1052
+ msgid "Please provide your full name."
1053
+ msgstr "Per favore inserisci il tuo nome completo."
1054
+
1055
+ #: includes/i18n.php:569
1056
+ msgid ""
1057
+ "Verification mail was just sent to %s. If you can't find it after 5 min, "
1058
+ "please check your spam box."
1059
+ msgstr "L'email di verifica è stata inviata a %s. Se dopo 5 minuti non è ancora arrivata, per favore controlla nella tua casella di posta indesiderata."
1060
+
1061
+ #: includes/i18n.php:571
1062
+ msgid ""
1063
+ "Just letting you know that the add-ons information of %s is being pulled "
1064
+ "from an external server."
1065
+ msgstr "Le informazioni sugli add-on di %s vengono scaricate da un server esterno."
1066
+
1067
+ #: includes/i18n.php:573
1068
+ msgid "No credit card required"
1069
+ msgstr "Nessuna carta di credito richiesta"
1070
+
1071
+ #: includes/i18n.php:575
1072
+ msgid "Premium plugin version was successfully activated."
1073
+ msgstr "La versione Premium del plugin è stata attivata correttamente."
1074
+
1075
+ #: includes/i18n.php:577
1076
+ msgid "The upgrade of %s was successfully completed."
1077
+ msgstr "L'aggiornamento di %s è stato completato con successo."
1078
+
1079
+ #: includes/i18n.php:579
1080
+ msgid "Your account was successfully activated with the %s plan."
1081
+ msgstr "Il tuo account è stato attivato correttamente con il piano %s."
1082
+
1083
+ #: includes/i18n.php:581
1084
+ msgid "Download the latest %s version now"
1085
+ msgstr "Scarica l'ultima versione di %s"
1086
+
1087
+ #: includes/i18n.php:583
1088
+ msgid "Please follow these steps to complete the upgrade"
1089
+ msgstr "Segui i passi seguenti per completare l'aggiornamento"
1090
+
1091
+ #: includes/i18n.php:585
1092
+ msgid "Download the latest %s version"
1093
+ msgstr "Scarica l'ultima versione di %s"
1094
+
1095
+ #: includes/i18n.php:587
1096
+ msgid "Deactivate the free version"
1097
+ msgstr "Disattiva la versione gratuita"
1098
+
1099
+ #: includes/i18n.php:589
1100
+ msgid "Upload and activate the downloaded version"
1101
+ msgstr "Carica e attiva la versione scaricata"
1102
+
1103
+ #: includes/i18n.php:591
1104
+ msgid "How to upload and activate?"
1105
+ msgstr "Come faccio a caricare ed attivare?"
1106
+
1107
+ #: includes/i18n.php:593
1108
+ msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
1109
+ msgid "%s Add-on was successfully purchased."
1110
+ msgstr "L' add-on %s è stato acquistato con successo."
1111
+
1112
+ #: includes/i18n.php:595
1113
+ msgid "Your %s Add-on plan was successfully upgraded."
1114
+ msgstr "Il piano del tuo add-on %s è stato aggiornato con successo."
1115
+
1116
+ #: includes/i18n.php:597
1117
+ msgid "Your email has been successfully verified - you are AWESOME!"
1118
+ msgstr "Il tuo indirizzo email è stato verificato con successo - SEI UN GRANDE!"
1119
+
1120
+ #: includes/i18n.php:599
1121
+ msgid "Your plan was successfully upgraded."
1122
+ msgstr "Il piano è stato aggiornato con successo."
1123
+
1124
+ #: includes/i18n.php:601
1125
+ msgid "Your plan was successfully changed to %s."
1126
+ msgstr "Il piano è stato cambiato con successo a %s."
1127
+
1128
+ #: includes/i18n.php:603
1129
+ msgid ""
1130
+ "Your license has expired. You can still continue using the free plugin "
1131
+ "forever."
1132
+ msgstr "La licenza è scaduta. È comunque possibile continuare ad utilizzare il plugin gratuito per sempre."
1133
+
1134
+ #: includes/i18n.php:605
1135
+ msgid ""
1136
+ "Your license has been cancelled. If you think it's a mistake, please contact"
1137
+ " support."
1138
+ msgstr "La tua licenza è stata cancellata. Se credi sia un errore, per favore contatta il supporto."
1139
+
1140
+ #: includes/i18n.php:607
1141
+ msgid "Your trial has been successfully started."
1142
+ msgstr "La versione di prova è stata avviata correttamente."
1143
+
1144
+ #: includes/i18n.php:609
1145
+ msgid "Your license was successfully activated."
1146
+ msgstr "La tua licenza è stata attivata correttamente."
1147
+
1148
+ #: includes/i18n.php:611
1149
+ msgid "It looks like your site currently doesn't have an active license."
1150
+ msgstr "Sembra che il tuo sito non disponga di alcuna licenza attiva."
1151
+
1152
+ #: includes/i18n.php:613
1153
+ msgid ""
1154
+ "Your license was successfully deactivated, you are back to the %s plan."
1155
+ msgstr "La tua licenza é stata disattivata con successo, sei tornato al piano %s."
1156
+
1157
+ #: includes/i18n.php:615
1158
+ msgid "It looks like the license deactivation failed."
1159
+ msgstr "Sembra che la disattivazione della licenza non sia riuscita."
1160
+
1161
+ #: includes/i18n.php:617
1162
+ msgid "It looks like the license could not be activated."
1163
+ msgstr "Sembra che la licenza non possa essere attivata."
1164
+
1165
+ #: includes/i18n.php:619
1166
+ msgid "Error received from the server:"
1167
+ msgstr "Errore ricevuto dal server:"
1168
+
1169
+ #: includes/i18n.php:621
1170
+ msgid ""
1171
+ "Your trial has expired. You can still continue using all our free features."
1172
+ msgstr "La versione di prova è scaduta. Si può comunque continuare a utilizzare tutte le nostre funzioni gratuite."
1173
+
1174
+ #: includes/i18n.php:623
1175
+ msgid ""
1176
+ "Your plan was successfully downgraded. Your %s plan license will expire in "
1177
+ "%s."
1178
+ msgstr "Il tuo piano è stato declassato con successo. La licenza del piano %s scadrà in %s."
1179
+
1180
+ #: includes/i18n.php:625
1181
+ msgid ""
1182
+ "Seems like we are having some temporary issue with your plan downgrade. "
1183
+ "Please try again in few minutes."
1184
+ msgstr "Stiamo avendo qualche problema temporaneo con il downgrade del piano. Riprova tra qualche minuto."
1185
+
1186
+ #: includes/i18n.php:627
1187
+ msgid ""
1188
+ "It looks like you are not in trial mode anymore so there's nothing to cancel"
1189
+ " :)"
1190
+ msgstr "Sembra che tu non stia più usando la prova gratuita, quindi non c'è niente che tu debba annullare :)"
1191
+
1192
+ #: includes/i18n.php:629
1193
+ msgid "Your %s free trial was successfully cancelled."
1194
+ msgstr "Il tuo periodo di prova gratuito %s è stato annullato con successo."
1195
+
1196
+ #: includes/i18n.php:631
1197
+ msgctxt "%s - numeric version number"
1198
+ msgid "Version %s was released."
1199
+ msgstr "La versione %s é stata rilasciata."
1200
+
1201
+ #: includes/i18n.php:633
1202
+ msgid "Please download %s."
1203
+ msgstr "Scarica %s."
1204
+
1205
+ #: includes/i18n.php:635
1206
+ msgctxt "%s - plan name, as the latest professional version here"
1207
+ msgid "the latest %s version here"
1208
+ msgstr "l'ultima versione %s é quì"
1209
+
1210
+ #: includes/i18n.php:637
1211
+ msgid ""
1212
+ "How do you like %s so far? Test all our %s premium features with a %d-day "
1213
+ "free trial."
1214
+ msgstr "Come sta andando con %s? Prova tutte le funzionalità premium di %s con una prova gratuita di %d giorni."
1215
+
1216
+ #: includes/i18n.php:639
1217
+ msgctxt "call to action"
1218
+ msgid "Start free trial"
1219
+ msgstr "Inizia il periodo di prova gratuito"
1220
+
1221
+ #: includes/i18n.php:641
1222
+ msgid ""
1223
+ "Seems like we are having some temporary issue with your trial cancellation. "
1224
+ "Please try again in few minutes."
1225
+ msgstr "Stiamo avendo qualche problema temporaneo con l'annullamento del periodo di prova. Riprova tra qualche minuto."
1226
+
1227
+ #: includes/i18n.php:643
1228
+ msgid "You already utilized a trial before."
1229
+ msgstr "Hai già utilizzato una prova gratuita in passato."
1230
+
1231
+ #: includes/i18n.php:645
1232
+ msgid "You are already running the plugin in a trial mode."
1233
+ msgstr "Stai già usando il plugin in modalità di prova gratuita."
1234
+
1235
+ #: includes/i18n.php:647
1236
+ msgid "Plan %s do not exist, therefore, can't start a trial."
1237
+ msgstr "Il piano %s non esiste, per questo motivo non è possibile iniziare il periodo di prova."
1238
+
1239
+ #: includes/i18n.php:649
1240
+ msgid "Plan %s does not support a trial period."
1241
+ msgstr "Il piano %s non supporta il periodo di prova."
1242
+
1243
+ #: includes/i18n.php:651
1244
+ msgid "None of the plugin's plans supports a trial period."
1245
+ msgstr "Non esiste alcun piano del plugin che offra il periodo di prova."
1246
+
1247
+ #: includes/i18n.php:653
1248
+ msgid ""
1249
+ "Unexpected API error. Please contact the plugin's author with the following "
1250
+ "error."
1251
+ msgstr "Errore inaspettato dell'API. Per favore contatta l'autore del plugin riportando il seguente errore."
1252
+
1253
+ #: includes/i18n.php:655
1254
+ msgid "No commitment for %s days - cancel anytime!"
1255
+ msgstr "Nessun impegno per %s giorni - puoi annullare in qualsiasi momento!"
1256
+
1257
+ #: includes/i18n.php:657
1258
+ msgid ""
1259
+ "Your license has expired. You can still continue using all the %s features, "
1260
+ "but you'll need to renew your license to continue getting updates and "
1261
+ "support."
1262
+ msgstr "La licenza è scaduta. È comunque possibile continuare a utilizzare tutte le funzionalità di %s, ma sarà necessario rinnovare la licenza per continuare a ricevere gli aggiornamenti ed il supporto."
1263
+
1264
+ #: includes/i18n.php:659
1265
+ msgid "Couldn't activate %s."
1266
+ msgstr "Non é stato possibile attivare %s."
1267
+
1268
+ #: includes/i18n.php:661
1269
+ msgid "Please contact us with the following message:"
1270
+ msgstr "Contattaci con il seguente messaggio:"
1271
+
1272
+ #: includes/i18n.php:663
1273
+ msgid ""
1274
+ "It looks like you are still on the %s plan. If you did upgrade or change "
1275
+ "your plan, it's probably an issue on our side - sorry."
1276
+ msgstr "Sembra che tu sia ancora usando il piano %s. Se hai effettuato un upgrade o cambiato il piano, è probabile che ci sia un problema nei nostri sistemi."
1277
+
1278
+ #: includes/i18n.php:665
1279
+ msgid "Please contact us here"
1280
+ msgstr "Contattaci qui"
1281
+
1282
+ #: includes/i18n.php:667
1283
+ msgid ""
1284
+ "I have upgraded my account but when I try to Sync the License, the plan "
1285
+ "remains %s."
1286
+ msgstr "Ho aggiornato il mio account, ma quando cerco di sincronizzare la licenza, il piano rimane %s."
1287
+
1288
+ #: includes/i18n.php:673
1289
+ msgid "From unknown reason, the API connectivity test failed."
1290
+ msgstr "Il test di connettività dell'API ha fallito per motivi sconosciuti."
1291
+
1292
+ #: includes/i18n.php:675
1293
+ msgid ""
1294
+ "It's probably a temporary issue on our end. Just to be sure, with your "
1295
+ "permission, would it be o.k to run another connectivity test?"
1296
+ msgstr "Si tratta probabilmente di un problema nei nostri sistemi. Per esserne sicuri, potresti darci il permesso di effettuare un ulteriore test della connettività? "
1297
+
1298
+ #: includes/i18n.php:677
1299
+ msgid ""
1300
+ "We use PHP cURL library for the API calls, which is a very common library "
1301
+ "and usually installed out of the box. Unfortunately, cURL is not installed "
1302
+ "on your server."
1303
+ msgstr "Utilizziamo la libreria PHP cURL per le chiamate alla nostra API. Questa libreria è molto comune ed è installata di base. Sfortunatamente cURL non è presente nel tuo server."
1304
+
1305
+ #: includes/i18n.php:679
1306
+ msgid ""
1307
+ "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
1308
+ msgstr "Per un motivo sconosciuto, CloudFlare, il firewall che utilizziamo, blocca la connessione."
1309
+
1310
+ #: includes/i18n.php:681
1311
+ msgctxt "as pluginX requires an access to our API"
1312
+ msgid "%s requires an access to our API."
1313
+ msgstr "%s richiede un accesso alla nostra API."
1314
+
1315
+ #: includes/i18n.php:683
1316
+ msgid ""
1317
+ "It looks like your server is using Squid ACL (access control lists), which "
1318
+ "blocks the connection."
1319
+ msgstr "Sembra che il tuo server stia usando Squid ACL (lista per il controllo degli accessi) il quale blocca la connessione."
1320
+
1321
+ #: includes/i18n.php:685
1322
+ msgid "I don't know what is Squid or ACL, help me!"
1323
+ msgstr "Non ho idea di cosa sia Squid o ACL, aiutami!"
1324
+
1325
+ #: includes/i18n.php687, includes/i18n.php:695
1326
+ msgid ""
1327
+ "We'll make sure to contact your hosting company and resolve the issue. You "
1328
+ "will get a follow-up email to %s once we have an update."
1329
+ msgstr "Contatteremo il tuo hosting e risolveremo il problema. Riceverai un' email a %s non appena ci saranno aggiornamenti."
1330
+
1331
+ #: includes/i18n.php:689
1332
+ msgid "I'm a system administrator"
1333
+ msgstr "Sono un sistemista"
1334
+
1335
+ #: includes/i18n.php:691
1336
+ msgid ""
1337
+ "Great, please whitelist the following domains: %s. Once you done, deactivate"
1338
+ " the plugin and activate it again."
1339
+ msgstr "Perfetto, aggiungi alla whitelist i seguenti domini: %s. Una volta che hai fatto, disattiva il plugin e attivalo di nuovo."
1340
+
1341
+ #: includes/i18n.php:693
1342
+ msgid "I don't know what is cURL or how to install it, help me!"
1343
+ msgstr "Non ho idea di cosa sia cURL o come installarlo, aiutami!"
1344
+
1345
+ #: includes/i18n.php:697
1346
+ msgid ""
1347
+ "Great, please install cURL and enable it in your php.ini file. To make sure "
1348
+ "it was successfully activated, use 'phpinfo()'. Once activated, deactivate "
1349
+ "the plugin and reactivate it back again."
1350
+ msgstr "Perfetto, installa cURL ed attivalo nel tuo file php.ini. Per essere sicuro di averlo attivato con successo, usa \"phpinfo()\". Una volta attivato disattva il plugin e attivalo di nuovo."
1351
+
1352
+ #: includes/i18n.php:699
1353
+ msgid ""
1354
+ "We are sure it's an issue on our side and more than happy to resolve it for "
1355
+ "you ASAP if you give us a chance."
1356
+ msgstr "Siamo sicuri che sia un nostro problema e siamo più che felici di risolverlo per te al più presto. Per poter procedere abbiamo bisogno del tuo consenso."
1357
+
1358
+ #: includes/i18n.php:701
1359
+ msgid ""
1360
+ "Sorry for the inconvenience and we are here to help if you give us a chance."
1361
+ msgstr "Siamo spiacenti per l'inconveniente e siamo qui per aiutarti con il tuo permesso."
1362
+
1363
+ #: includes/i18n.php:703
1364
+ msgid "Yes - I'm giving you a chance to fix it"
1365
+ msgstr "Sì - sto dandovi la possibilità di risolvere il problema"
1366
+
1367
+ #: includes/i18n.php:705
1368
+ msgid ""
1369
+ "We will do our best to whitelist your server and resolve this issue ASAP. "
1370
+ "You will get a follow-up email to %s once we have an update."
1371
+ msgstr "Faremo del nostro meglio per mettere il server in whitelist e risolvere il problema il prima possibile. Avrai un aggiornamento dello stato tramite email all'indirizzo %s."
1372
+
1373
+ #: includes/i18n.php:707
1374
+ msgid "Let's try your previous version"
1375
+ msgstr "Proviamo con la versione precedente"
1376
+
1377
+ #: includes/i18n.php:709
1378
+ msgid "Uninstall this version and install the previous one."
1379
+ msgstr "Disinstalla questa versione e installa quella precedente."
1380
+
1381
+ #: includes/i18n.php:711
1382
+ msgid "That's exhausting, please deactivate"
1383
+ msgstr "È estenuante, disattivalo"
1384
+
1385
+ #: includes/i18n.php:713
1386
+ msgid ""
1387
+ "We feel your frustration and sincerely apologize for the inconvenience. Hope"
1388
+ " to see you again in the future."
1389
+ msgstr "Capiamo la tua frustrazione e ci scusiamo per l'inconveniente. Speriamo di rivederti nuovamente in futuro."
1390
+
1391
+ #: includes/i18n.php:715
1392
+ msgid ""
1393
+ "Thank for giving us the chance to fix it! A message was just sent to our "
1394
+ "technical staff. We will get back to you as soon as we have an update to %s."
1395
+ " Appreciate your patience."
1396
+ msgstr "Grazie per averci dato la possibilità di risolvere il problema! È stato appena inviato un messaggio al nostro staff tecnico. Ti risponderemo non appena avremo un aggiornamento riguardante %s. Grazie per la tua pazienza."
1397
+
1398
+ #: includes/i18n.php:717
1399
+ msgctxt "%1s - plugin title, %2s - API domain"
1400
+ msgid ""
1401
+ "Your server is blocking the access to Freemius' API, which is crucial for "
1402
+ "%1s synchronization. Please contact your host to whitelist %2s"
1403
+ msgstr "Il tuo server sta bloccando l'accesso all'API di Freemius. L'accesso è cruciale per quanto riguarda la la sincronizzazione di %1s. Per favore contatta il tuo host per aggiungere %2s alla whitelist."
1404
+
1405
+ #: includes/i18n.php:719
1406
+ msgid ""
1407
+ "It seems like one of the authentication parameters is wrong. Update your "
1408
+ "Public Key, Secret Key & User ID, and try again."
1409
+ msgstr "Sembra che uno dei parametri di autenticazione sia sbagliato. Aggiorna la tua chiave pubblica, Secret Key & User ID e riprova."
1410
+
1411
+ #: includes/i18n.php:725
1412
+ msgid ""
1413
+ "Please check your mailbox, you should receive an email via %s to confirm the"
1414
+ " ownership change. From security reasons, you must confirm the change within"
1415
+ " the next 15 min. If you cannot find the email, please check your spam "
1416
+ "folder."
1417
+ msgstr "Verifica di aver ricevuto l'email da %s per confermare il cambiamento del proprietario. Per ragioni di sicurezza devi confermare il cambiamento entro 15 minuti. Se non trovi l'email controlla nella posta indesiderata."
1418
+
1419
+ #: includes/i18n.php:727
1420
+ msgid ""
1421
+ "Thanks for confirming the ownership change. An email was just sent to %s for"
1422
+ " final approval."
1423
+ msgstr "Grazie per aver confermato il cambiamento del proprietario. Un' email è stata appena inviata a %s per la conferma finale."
1424
+
1425
+ #: includes/i18n.php:729
1426
+ msgid "%s is the new owner of the account."
1427
+ msgstr "%s è il nuovo proprietario dell'account."
1428
+
1429
+ #: includes/i18n.php:733
1430
+ msgctxt "addonX cannot run without pluginY"
1431
+ msgid "%s cannot run without %s."
1432
+ msgstr "%s non può funzionare senza %s."
1433
+
1434
+ #: includes/i18n.php:735
1435
+ msgctxt "addonX cannot run..."
1436
+ msgid "%s cannot run without the plugin."
1437
+ msgstr "%s non può funzionare senza il plugin."
1438
+
1439
+ #: includes/i18n.php:737
1440
+ msgctxt "pluginX activation was successfully..."
1441
+ msgid "%s activation was successfully completed."
1442
+ msgstr "%s è stato attivato con successo."
1443
+
1444
+ #: includes/i18n.php:739
1445
+ msgctxt "Plugin installer section title"
1446
+ msgid "Features & Pricing"
1447
+ msgstr "Caratteristiche & prezzi"
1448
+
1449
+ #: includes/i18n.php:741
1450
+ msgid "Add-on must be deployed to WordPress.org or Freemius."
1451
+ msgstr "L'add-on dev'essere distribuito da WordPress.org o Freemius."
1452
+
1453
+ #: includes/i18n.php:743
1454
+ msgid "Paid add-on must be deployed to Freemius."
1455
+ msgstr "Gli add-on a pagamento devono essere distribuiti da Freemius."
1456
+
1457
+ #: includes/i18n.php:747
1458
+ msgid ""
1459
+ "%s is a premium only add-on. You have to purchase a license first before "
1460
+ "activating the plugin."
1461
+ msgstr "%s è un add-on premium. Devi comprare una licenza prima di poter attivare il plugin."
1462
+
1463
+ #: includes/i18n.php:749
1464
+ msgid ""
1465
+ "%s free trial was successfully cancelled. Since the add-on is premium only "
1466
+ "it was automatically deactivated. If you like to use it in the future, "
1467
+ "you'll have to purchase a license."
1468
+ msgstr "Il periodo di prova gratuito %s è stato annullato con successo. Siccome l'add-on è premium, è stato disattivato automaticamente. Se vorrai usarlo in futuro, dovrai comprare una licenza."
1469
+
1470
+ #: includes/i18n.php:755
1471
+ msgctxt "as every month"
1472
+ msgid "Monthly"
1473
+ msgstr "Mensilmente"
1474
+
1475
+ #: includes/i18n.php:757
1476
+ msgctxt "as monthly period"
1477
+ msgid "mo"
1478
+ msgstr "mese"
1479
+
1480
+ #: includes/i18n.php:759
1481
+ msgctxt "as once a year"
1482
+ msgid "Annual"
1483
+ msgstr "Annuale"
1484
+
1485
+ #: includes/i18n.php:761
1486
+ msgctxt "as once a year"
1487
+ msgid "Annually"
1488
+ msgstr "Annualmente"
1489
+
1490
+ #: includes/i18n.php:763
1491
+ msgctxt "as once a year"
1492
+ msgid "Once"
1493
+ msgstr "Una volta"
1494
+
1495
+ #: includes/i18n.php:765
1496
+ msgctxt "as annual period"
1497
+ msgid "year"
1498
+ msgstr "anno"
1499
+
1500
+ #: includes/i18n.php:767
1501
+ msgid "Lifetime"
1502
+ msgstr "Tutta la vita"
1503
+
1504
+ #: includes/i18n.php:769
1505
+ msgctxt "e.g. the best product"
1506
+ msgid "Best"
1507
+ msgstr "Migliore"
1508
+
1509
+ #: includes/i18n.php:771
1510
+ msgctxt "e.g. billed monthly"
1511
+ msgid "Billed %s"
1512
+ msgstr "Fatturato %s"
1513
+
1514
+ #: includes/i18n.php:773
1515
+ msgctxt "as a discount of $5 or 10%"
1516
+ msgid "Save %s"
1517
+ msgstr "Risparmia %s"
1518
+
1519
+ #: includes/i18n.php:777
1520
+ msgid "View details"
1521
+ msgstr "Visualizza dettagli"
includes/libs/freemius/languages/freemius.pot ADDED
@@ -0,0 +1,1399 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2016 freemius
2
+ # This file is distributed under the same license as the freemius package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: freemius\n"
6
+ "Report-Msgid-Bugs-To: https://github.com/Freemius/wordpress-sdk/issues\n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=UTF-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
11
+ "Last-Translator: Vova Feldman <vova@freemius.com>\n"
12
+ "Language-Team: Freemius Team <admin@freemius.com>\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "X-Poedit-SourceCharset: UTF-8\n"
15
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPathExcluded-0: *.js\n"
18
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
19
+ #: includes/i18n.php:41, includes/i18n.php:55
20
+ msgid "Yes - I'm in!"
21
+ msgstr ""
22
+
23
+ #: includes/i18n.php:43, includes/i18n.php:57
24
+ msgid "Not today"
25
+ msgstr ""
26
+
27
+ #: includes/i18n.php:69
28
+ msgid "Account"
29
+ msgstr ""
30
+
31
+ #: includes/i18n.php:71
32
+ msgid "Add On"
33
+ msgstr ""
34
+
35
+ #: includes/i18n.php:73
36
+ msgid "Contact Us"
37
+ msgstr ""
38
+
39
+ #: includes/i18n.php:75
40
+ msgid "Contact Support"
41
+ msgstr ""
42
+
43
+ #: includes/i18n.php:77
44
+ msgid "Change Ownership"
45
+ msgstr ""
46
+
47
+ #: includes/i18n.php:79
48
+ msgid "Support"
49
+ msgstr ""
50
+
51
+ #: includes/i18n.php:81
52
+ msgid "Support Forum"
53
+ msgstr ""
54
+
55
+ #: includes/i18n.php:83
56
+ msgid "Add Ons"
57
+ msgstr ""
58
+
59
+ #: includes/i18n.php:85
60
+ msgctxt "verb"
61
+ msgid "Upgrade"
62
+ msgstr ""
63
+
64
+ #: includes/i18n.php:87
65
+ msgid "Awesome"
66
+ msgstr ""
67
+
68
+ #: includes/i18n.php:89
69
+ msgctxt "noun"
70
+ msgid "Pricing"
71
+ msgstr ""
72
+
73
+ #: includes/i18n.php:91
74
+ msgctxt "noun"
75
+ msgid "Price"
76
+ msgstr ""
77
+
78
+ #: includes/i18n.php:93
79
+ msgid "Unlimited Updates"
80
+ msgstr ""
81
+
82
+ #: includes/i18n.php:95
83
+ msgctxt "verb"
84
+ msgid "Downgrade"
85
+ msgstr ""
86
+
87
+ #: includes/i18n.php:97
88
+ msgid "Cancel Trial"
89
+ msgstr ""
90
+
91
+ #: includes/i18n.php:99
92
+ msgid "Free Trial"
93
+ msgstr ""
94
+
95
+ #: includes/i18n.php:101
96
+ msgid "Start my free %s"
97
+ msgstr ""
98
+
99
+ #: includes/i18n.php:103
100
+ msgid "No commitment for %s - cancel anytime"
101
+ msgstr ""
102
+
103
+ #: includes/i18n.php:105
104
+ msgid "After your free %s, pay as little as %s"
105
+ msgstr ""
106
+
107
+ #: includes/i18n.php:107
108
+ msgid "Details"
109
+ msgstr ""
110
+
111
+ #: includes/i18n.php:109
112
+ msgid "Account Details"
113
+ msgstr ""
114
+
115
+ #: includes/i18n.php:111
116
+ msgctxt "verb"
117
+ msgid "Delete"
118
+ msgstr ""
119
+
120
+ #: includes/i18n.php:113
121
+ msgctxt "verb"
122
+ msgid "Show"
123
+ msgstr ""
124
+
125
+ #: includes/i18n.php:115
126
+ msgctxt "verb"
127
+ msgid "Hide"
128
+ msgstr ""
129
+
130
+ #: includes/i18n.php:117
131
+ msgctxt "verb"
132
+ msgid "Edit"
133
+ msgstr ""
134
+
135
+ #: includes/i18n.php:119
136
+ msgid "Date"
137
+ msgstr ""
138
+
139
+ #: includes/i18n.php:121
140
+ msgid "Amount"
141
+ msgstr ""
142
+
143
+ #: includes/i18n.php:123
144
+ msgid "Invoice"
145
+ msgstr ""
146
+
147
+ #: includes/i18n.php:125
148
+ msgid "Billing"
149
+ msgstr ""
150
+
151
+ #: includes/i18n.php:127
152
+ msgid "Payments"
153
+ msgstr ""
154
+
155
+ #: includes/i18n.php:129
156
+ msgid "Delete Account"
157
+ msgstr ""
158
+
159
+ #: includes/i18n.php:131
160
+ msgctxt "as close a window"
161
+ msgid "Dismiss"
162
+ msgstr ""
163
+
164
+ #: includes/i18n.php:133
165
+ msgctxt "as product pricing plan"
166
+ msgid "Plan"
167
+ msgstr ""
168
+
169
+ #: includes/i18n.php:135
170
+ msgid "Change Plan"
171
+ msgstr ""
172
+
173
+ #: includes/i18n.php:137
174
+ msgctxt "as download professional version"
175
+ msgid "Download %s Version"
176
+ msgstr ""
177
+
178
+ #: includes/i18n.php:139
179
+ msgctxt "as download professional version now"
180
+ msgid "Download %s version now"
181
+ msgstr ""
182
+
183
+ #: includes/i18n.php:141
184
+ msgctxt "as download latest version"
185
+ msgid "Download Latest"
186
+ msgstr ""
187
+
188
+ #: includes/i18n.php:143
189
+ msgctxt "E.g. you have a professional license."
190
+ msgid "You have a %s license."
191
+ msgstr ""
192
+
193
+ #: includes/i18n.php:145
194
+ msgid "New"
195
+ msgstr ""
196
+
197
+ #: includes/i18n.php:147
198
+ msgid "Free"
199
+ msgstr ""
200
+
201
+ #: includes/i18n.php:149
202
+ msgctxt "as trial plan"
203
+ msgid "Trial"
204
+ msgstr ""
205
+
206
+ #: includes/i18n.php:151
207
+ msgctxt "verb"
208
+ msgid "Purchase"
209
+ msgstr ""
210
+
211
+ #: includes/i18n.php:153
212
+ msgid "Purchase License"
213
+ msgstr ""
214
+
215
+ #: includes/i18n.php:155
216
+ msgctxt "verb"
217
+ msgid "Buy"
218
+ msgstr ""
219
+
220
+ #: includes/i18n.php:157
221
+ msgid "Buy License"
222
+ msgstr ""
223
+
224
+ #: includes/i18n.php:159
225
+ msgid "Single Site License"
226
+ msgstr ""
227
+
228
+ #: includes/i18n.php:161
229
+ msgid "Unlimited Licenses"
230
+ msgstr ""
231
+
232
+ #: includes/i18n.php:163
233
+ msgid "Up to %s Sites"
234
+ msgstr ""
235
+
236
+ #: includes/i18n.php:165
237
+ msgid "%sRenew your license now%s to access version %s features and support."
238
+ msgstr ""
239
+
240
+ #: includes/i18n.php:167
241
+ msgid "Enter the email address you've used for the upgrade below and we will resend you the license key."
242
+ msgstr ""
243
+
244
+ #: includes/i18n.php:169
245
+ msgctxt "e.g. Professional Plan"
246
+ msgid "%s Plan"
247
+ msgstr ""
248
+
249
+ #: includes/i18n.php:171
250
+ msgid "You are just one step away - %s"
251
+ msgstr ""
252
+
253
+ #: includes/i18n.php:173
254
+ msgctxt "%s - plugin name. As complete \"Jetpack\" activation now"
255
+ msgid "Complete \"%s\" Activation Now"
256
+ msgstr ""
257
+
258
+ #: includes/i18n.php:175
259
+ msgid "We made a few tweaks to the plugin, %s"
260
+ msgstr ""
261
+
262
+ #: includes/i18n.php:177
263
+ msgid "Opt-in to make \"%s\" Better!"
264
+ msgstr ""
265
+
266
+ #: includes/i18n.php:179
267
+ msgid "Error"
268
+ msgstr ""
269
+
270
+ #: includes/i18n.php:181
271
+ msgid "Freemius SDK couldn't find the plugin's main file. Please contact sdk@freemius.com with the current error."
272
+ msgstr ""
273
+
274
+ #: includes/i18n.php:187
275
+ msgctxt "as expiration date"
276
+ msgid "Expiration"
277
+ msgstr ""
278
+
279
+ #: includes/i18n.php:189
280
+ msgctxt "as software license"
281
+ msgid "License"
282
+ msgstr ""
283
+
284
+ #: includes/i18n.php:191
285
+ msgid "not verified"
286
+ msgstr ""
287
+
288
+ #: includes/i18n.php:193
289
+ msgid "Verify Email"
290
+ msgstr ""
291
+
292
+ #: includes/i18n.php:195
293
+ msgctxt "e.g. expires in 2 months"
294
+ msgid "Expires in %s"
295
+ msgstr ""
296
+
297
+ #: includes/i18n.php:197
298
+ msgctxt "e.g. auto renews in 2 months"
299
+ msgid "Auto renews in %s"
300
+ msgstr ""
301
+
302
+ #: includes/i18n.php:199
303
+ msgid "No expiration"
304
+ msgstr ""
305
+
306
+ #: includes/i18n.php:201
307
+ msgid "Expired"
308
+ msgstr ""
309
+
310
+ #: includes/i18n.php:203
311
+ msgid "Cancelled"
312
+ msgstr ""
313
+
314
+ #: includes/i18n.php:205
315
+ msgctxt "e.g. In 2 hours"
316
+ msgid "In %s"
317
+ msgstr ""
318
+
319
+ #: includes/i18n.php:207
320
+ msgctxt "e.g. 2 min ago"
321
+ msgid "%s ago"
322
+ msgstr ""
323
+
324
+ #: includes/i18n.php:209
325
+ msgctxt "as plugin version"
326
+ msgid "Version"
327
+ msgstr ""
328
+
329
+ #: includes/i18n.php:211
330
+ msgid "Name"
331
+ msgstr ""
332
+
333
+ #: includes/i18n.php:213
334
+ msgid "Email"
335
+ msgstr ""
336
+
337
+ #: includes/i18n.php:215
338
+ msgid "Email address"
339
+ msgstr ""
340
+
341
+ #: includes/i18n.php:217
342
+ msgid "Verified"
343
+ msgstr ""
344
+
345
+ #: includes/i18n.php:219
346
+ msgid "Plugin"
347
+ msgstr ""
348
+
349
+ #: includes/i18n.php:221
350
+ msgid "Plugins"
351
+ msgstr ""
352
+
353
+ #: includes/i18n.php:223
354
+ msgid "Themes"
355
+ msgstr ""
356
+
357
+ #: includes/i18n.php:225
358
+ msgctxt "as file/folder path"
359
+ msgid "Path"
360
+ msgstr ""
361
+
362
+ #: includes/i18n.php:227
363
+ msgid "Title"
364
+ msgstr ""
365
+
366
+ #: includes/i18n.php:229
367
+ msgid "Free version"
368
+ msgstr ""
369
+
370
+ #: includes/i18n.php:231
371
+ msgid "Premium version"
372
+ msgstr ""
373
+
374
+ #: includes/i18n.php:233
375
+ msgctxt "as WP plugin slug"
376
+ msgid "Slug"
377
+ msgstr ""
378
+
379
+ #: includes/i18n.php:235
380
+ msgid "ID"
381
+ msgstr ""
382
+
383
+ #: includes/i18n.php:237
384
+ msgid "Users"
385
+ msgstr ""
386
+
387
+ #: includes/i18n.php:239
388
+ msgid "Plugin Installs"
389
+ msgstr ""
390
+
391
+ #: includes/i18n.php:241
392
+ msgctxt "like websites"
393
+ msgid "Sites"
394
+ msgstr ""
395
+
396
+ #: includes/i18n.php:243
397
+ msgid "User ID"
398
+ msgstr ""
399
+
400
+ #: includes/i18n.php:245
401
+ msgid "Site ID"
402
+ msgstr ""
403
+
404
+ #: includes/i18n.php:247
405
+ msgid "Public Key"
406
+ msgstr ""
407
+
408
+ #: includes/i18n.php:249
409
+ msgid "Secret Key"
410
+ msgstr ""
411
+
412
+ #: includes/i18n.php:251
413
+ msgctxt "as secret encryption key missing"
414
+ msgid "No Secret"
415
+ msgstr ""
416
+
417
+ #: includes/i18n.php:253
418
+ msgid "No ID"
419
+ msgstr ""
420
+
421
+ #: includes/i18n.php:255
422
+ msgctxt "as synchronize license"
423
+ msgid "Sync License"
424
+ msgstr ""
425
+
426
+ #: includes/i18n.php:257
427
+ msgctxt "as synchronize"
428
+ msgid "Sync"
429
+ msgstr ""
430
+
431
+ #: includes/i18n.php:259
432
+ msgid "Activate License"
433
+ msgstr ""
434
+
435
+ #: includes/i18n.php:261
436
+ msgid "Activate Free Version"
437
+ msgstr ""
438
+
439
+ #: includes/i18n.php:263
440
+ msgid "Please enter the license key that you received in the email right after the purchase:"
441
+ msgstr ""
442
+
443
+ #: includes/i18n.php:265
444
+ msgid "Activating license..."
445
+ msgstr ""
446
+
447
+ #: includes/i18n.php:267
448
+ msgid "Change License"
449
+ msgstr ""
450
+
451
+ #: includes/i18n.php:269
452
+ msgid "Update License"
453
+ msgstr ""
454
+
455
+ #: includes/i18n.php:271
456
+ msgid "Deactivate License"
457
+ msgstr ""
458
+
459
+ #: includes/i18n.php:273
460
+ msgid "Activate"
461
+ msgstr ""
462
+
463
+ #: includes/i18n.php:275
464
+ msgid "Deactivate"
465
+ msgstr ""
466
+
467
+ #: includes/i18n.php:277
468
+ msgid "Skip & Deactivate"
469
+ msgstr ""
470
+
471
+ #: includes/i18n.php:279
472
+ msgid "No - just deactivate"
473
+ msgstr ""
474
+
475
+ #: includes/i18n.php:281
476
+ msgid "Yes - do your thing"
477
+ msgstr ""
478
+
479
+ #: includes/i18n.php:283
480
+ msgctxt "active mode"
481
+ msgid "Active"
482
+ msgstr ""
483
+
484
+ #: includes/i18n.php:285
485
+ msgctxt "is active mode?"
486
+ msgid "Is Active"
487
+ msgstr ""
488
+
489
+ #: includes/i18n.php:287
490
+ msgid "Install Now"
491
+ msgstr ""
492
+
493
+ #: includes/i18n.php:289
494
+ msgid "Install Update Now"
495
+ msgstr ""
496
+
497
+ #: includes/i18n.php:291
498
+ msgid "More information about %s"
499
+ msgstr ""
500
+
501
+ #: includes/i18n.php:293
502
+ msgid "Localhost"
503
+ msgstr ""
504
+
505
+ #: includes/i18n.php:295
506
+ msgctxt "as activate Professional plan"
507
+ msgid "Activate %s Plan"
508
+ msgstr ""
509
+
510
+ #: includes/i18n.php:297
511
+ msgctxt "as 5 licenses left"
512
+ msgid "%s left"
513
+ msgstr ""
514
+
515
+ #: includes/i18n.php:299
516
+ msgid "Last license"
517
+ msgstr ""
518
+
519
+ #: includes/i18n.php:301
520
+ msgid "What is your %s?"
521
+ msgstr ""
522
+
523
+ #: includes/i18n.php:303
524
+ msgid "Activate this add-on"
525
+ msgstr ""
526
+
527
+ #: includes/i18n.php:305
528
+ msgid "Deactivating your license will block all premium features, but will enable you to activate the license on another site. Are you sure you want to proceed?"
529
+ msgstr ""
530
+
531
+ #: includes/i18n.php:307
532
+ msgid "Deleting the account will automatically deactivate your %s plan license so you can use it on other sites. If you want to terminate the recurring payments as well, click the \"Cancel\" button, and first \"Downgrade\" your account. Are you sure you would like to continue with the deletion?"
533
+ msgstr ""
534
+
535
+ #: includes/i18n.php:309
536
+ msgid "Deletion is not temporary. Only delete if you no longer want to use this plugin anymore. Are you sure you would like to continue with the deletion?"
537
+ msgstr ""
538
+
539
+ #: includes/i18n.php:311
540
+ msgid "Downgrading your plan will immediately stop all future recurring payments and your %s plan license will expire in %s."
541
+ msgstr ""
542
+
543
+ #: includes/i18n.php:313
544
+ msgid "Cancelling the trial will immediately block access to all premium features. Are you sure?"
545
+ msgstr ""
546
+
547
+ #: includes/i18n.php:315
548
+ msgid "You can still enjoy all %s features but you will not have access to plugin updates and support."
549
+ msgstr ""
550
+
551
+ #: includes/i18n.php:317
552
+ msgid "Once your license expire you can still use the Free version but you will NOT have access to the %s features."
553
+ msgstr ""
554
+
555
+ #: includes/i18n.php:319
556
+ msgid "Are you sure you want to proceed?"
557
+ msgstr ""
558
+
559
+ #: includes/i18n.php:325
560
+ msgid "Add Ons for %s"
561
+ msgstr ""
562
+
563
+ #: includes/i18n.php:327
564
+ msgid "We could'nt load the add-ons list. It's probably an issue on our side, please try to come back in few minutes."
565
+ msgstr ""
566
+
567
+ #: includes/i18n.php:331
568
+ msgid "Anonymous feedback"
569
+ msgstr ""
570
+
571
+ #: includes/i18n.php:333
572
+ msgid "Quick feedback"
573
+ msgstr ""
574
+
575
+ #: includes/i18n.php:335
576
+ msgid "If you have a moment, please let us know why you are deactivating"
577
+ msgstr ""
578
+
579
+ #: includes/i18n.php:337
580
+ msgid "Yes - Deactivate"
581
+ msgstr ""
582
+
583
+ #: includes/i18n.php:339
584
+ msgid "Submit & Deactivate"
585
+ msgstr ""
586
+
587
+ #: includes/i18n.php:341
588
+ msgctxt "the text of the cancel button of the plugin deactivation dialog box."
589
+ msgid "Cancel"
590
+ msgstr ""
591
+
592
+ #: includes/i18n.php:343
593
+ msgid "I no longer need the plugin"
594
+ msgstr ""
595
+
596
+ #: includes/i18n.php:345
597
+ msgid "I found a better plugin"
598
+ msgstr ""
599
+
600
+ #: includes/i18n.php:347
601
+ msgid "I only needed the plugin for a short period"
602
+ msgstr ""
603
+
604
+ #: includes/i18n.php:349
605
+ msgid "The plugin broke my site"
606
+ msgstr ""
607
+
608
+ #: includes/i18n.php:351
609
+ msgid "The plugin suddenly stopped working"
610
+ msgstr ""
611
+
612
+ #: includes/i18n.php:353
613
+ msgid "I can't pay for it anymore"
614
+ msgstr ""
615
+
616
+ #: includes/i18n.php:355
617
+ msgid "It's a temporary deactivation. I'm just debugging an issue."
618
+ msgstr ""
619
+
620
+ #: includes/i18n.php:357
621
+ msgctxt "the text of the \"other\" reason for deactivating the plugin that is shown in the modal box."
622
+ msgid "Other"
623
+ msgstr ""
624
+
625
+ #: includes/i18n.php:359
626
+ msgid "Kindly tell us the reason so we can improve."
627
+ msgstr ""
628
+
629
+ #: includes/i18n.php:361
630
+ msgid "What's the plugin's name?"
631
+ msgstr ""
632
+
633
+ #: includes/i18n.php:363
634
+ msgid "What price would you feel comfortable paying?"
635
+ msgstr ""
636
+
637
+ #: includes/i18n.php:365
638
+ msgid "I couldn't understand how to make it work"
639
+ msgstr ""
640
+
641
+ #: includes/i18n.php:367
642
+ msgid "The plugin is great, but I need specific feature that you don't support"
643
+ msgstr ""
644
+
645
+ #: includes/i18n.php:369
646
+ msgid "The plugin is not working"
647
+ msgstr ""
648
+
649
+ #: includes/i18n.php:371
650
+ msgid "It's not what I was looking for"
651
+ msgstr ""
652
+
653
+ #: includes/i18n.php:373
654
+ msgid "The plugin didn't work as expected"
655
+ msgstr ""
656
+
657
+ #: includes/i18n.php:375
658
+ msgid "What feature?"
659
+ msgstr ""
660
+
661
+ #: includes/i18n.php:377
662
+ msgid "Kindly share what didn't work so we can fix it for future users..."
663
+ msgstr ""
664
+
665
+ #: includes/i18n.php:379
666
+ msgid "What you've been looking for?"
667
+ msgstr ""
668
+
669
+ #: includes/i18n.php:381
670
+ msgid "What did you expect?"
671
+ msgstr ""
672
+
673
+ #: includes/i18n.php:383
674
+ msgid "The plugin didn't work"
675
+ msgstr ""
676
+
677
+ #: includes/i18n.php:385
678
+ msgid "I don't like to share my information with you"
679
+ msgstr ""
680
+
681
+ #: includes/i18n.php:387
682
+ msgid "You might have missed it, but you don't have to share any data and can just %s the opt-in."
683
+ msgstr ""
684
+
685
+ #: includes/i18n.php:395
686
+ msgctxt "greeting"
687
+ msgid "Hey %s,"
688
+ msgstr ""
689
+
690
+ #: includes/i18n.php:397
691
+ msgctxt "a greeting. E.g. Thanks John!"
692
+ msgid "Thanks %s!"
693
+ msgstr ""
694
+
695
+ #: includes/i18n.php:399
696
+ msgid "In order to enjoy all our features and functionality, %s needs to connect your user, %s at %s, to %s"
697
+ msgstr ""
698
+
699
+ #: includes/i18n.php:401
700
+ msgid "Please help us improve %2$s! If you opt-in, some data about your usage of %2$s will be sent to %5$s. If you skip this, that's okay! %2$s will still work just fine."
701
+ msgstr ""
702
+
703
+ #: includes/i18n.php:403
704
+ msgid "You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to complete the install."
705
+ msgstr ""
706
+
707
+ #: includes/i18n.php:405
708
+ msgid "Thanks for purchasing %s! To get started, please enter your license key:"
709
+ msgstr ""
710
+
711
+ #: includes/i18n.php:407
712
+ msgid "The plugin will be periodically sending data to %s to check for plugin updates and verify the validity of your license."
713
+ msgstr ""
714
+
715
+ #: includes/i18n.php:409
716
+ msgid "What permissions are being granted?"
717
+ msgstr ""
718
+
719
+ #: includes/i18n.php:411
720
+ msgid "Your Profile Overview"
721
+ msgstr ""
722
+
723
+ #: includes/i18n.php:413
724
+ msgid "Name and email address"
725
+ msgstr ""
726
+
727
+ #: includes/i18n.php:415
728
+ msgid "Your Site Overview"
729
+ msgstr ""
730
+
731
+ #: includes/i18n.php:417
732
+ msgid "Site URL, WP version, PHP info, plugins & themes"
733
+ msgstr ""
734
+
735
+ #: includes/i18n.php:419
736
+ msgid "Current Plugin Events"
737
+ msgstr ""
738
+
739
+ #: includes/i18n.php:421
740
+ msgid "Activation, deactivation and uninstall"
741
+ msgstr ""
742
+
743
+ #: includes/i18n.php:423
744
+ msgid "Plugins & Themes"
745
+ msgstr ""
746
+
747
+ #: includes/i18n.php:425
748
+ msgid "Titles, versions and state."
749
+ msgstr ""
750
+
751
+ #: includes/i18n.php:427
752
+ msgid "Newsletter"
753
+ msgstr ""
754
+
755
+ #: includes/i18n.php:429
756
+ msgid "Updates, announcements, marketing, no spam"
757
+ msgstr ""
758
+
759
+ #: includes/i18n.php:431
760
+ msgid "Privacy Policy"
761
+ msgstr ""
762
+
763
+ #: includes/i18n.php:433
764
+ msgid "Terms of Service"
765
+ msgstr ""
766
+
767
+ #: includes/i18n.php:435
768
+ msgctxt "as activating plugin"
769
+ msgid "Activating"
770
+ msgstr ""
771
+
772
+ #: includes/i18n.php:437
773
+ msgctxt "as in the process of sending an email"
774
+ msgid "Sending email"
775
+ msgstr ""
776
+
777
+ #: includes/i18n.php:439
778
+ msgctxt "button label"
779
+ msgid "Allow & Continue"
780
+ msgstr ""
781
+
782
+ #: includes/i18n.php:441
783
+ msgctxt "button label"
784
+ msgid "Agree & Activate License"
785
+ msgstr ""
786
+
787
+ #: includes/i18n.php:443
788
+ msgctxt "verb"
789
+ msgid "Skip"
790
+ msgstr ""
791
+
792
+ #: includes/i18n.php:445
793
+ msgid "Click here to use the plugin anonymously"
794
+ msgstr ""
795
+
796
+ #: includes/i18n.php:447
797
+ msgid "Re-send activation email"
798
+ msgstr ""
799
+
800
+ #: includes/i18n.php:449
801
+ msgid "License key"
802
+ msgstr ""
803
+
804
+ #: includes/i18n.php:451
805
+ msgid "Send License Key"
806
+ msgstr ""
807
+
808
+ #: includes/i18n.php:453
809
+ msgid "Sending license key"
810
+ msgstr ""
811
+
812
+ #: includes/i18n.php:455
813
+ msgid "Have a license key?"
814
+ msgstr ""
815
+
816
+ #: includes/i18n.php:457
817
+ msgid "Don't have a license key?"
818
+ msgstr ""
819
+
820
+ #: includes/i18n.php:459
821
+ msgid "Can't find your license key?"
822
+ msgstr ""
823
+
824
+ #: includes/i18n.php:471
825
+ msgid "Screenshots"
826
+ msgstr ""
827
+
828
+ #: includes/i18n.php:473
829
+ msgid "Click to view full-size screenshot %d"
830
+ msgstr ""
831
+
832
+ #: includes/i18n.php:481
833
+ msgid "Freemius Debug"
834
+ msgstr ""
835
+
836
+ #: includes/i18n.php:483
837
+ msgctxt "as turned on"
838
+ msgid "On"
839
+ msgstr ""
840
+
841
+ #: includes/i18n.php:485
842
+ msgctxt "as turned off"
843
+ msgid "Off"
844
+ msgstr ""
845
+
846
+ #: includes/i18n.php:487
847
+ msgctxt "as code debugging"
848
+ msgid "Debugging"
849
+ msgstr ""
850
+
851
+ #: includes/i18n.php:489
852
+ msgid "Freemius State"
853
+ msgstr ""
854
+
855
+ #: includes/i18n.php:491
856
+ msgctxt "as connection was successful"
857
+ msgid "Connected"
858
+ msgstr ""
859
+
860
+ #: includes/i18n.php:493
861
+ msgctxt "as connection blocked"
862
+ msgid "Blocked"
863
+ msgstr ""
864
+
865
+ #: includes/i18n.php:495
866
+ msgctxt "as application program interface"
867
+ msgid "API"
868
+ msgstr ""
869
+
870
+ #: includes/i18n.php:497
871
+ msgctxt "as software development kit versions"
872
+ msgid "SDK"
873
+ msgstr ""
874
+
875
+ #: includes/i18n.php:499
876
+ msgctxt "as software development kit versions"
877
+ msgid "SDK Versions"
878
+ msgstr ""
879
+
880
+ #: includes/i18n.php:501
881
+ msgctxt "as plugin folder path"
882
+ msgid "Plugin Path"
883
+ msgstr ""
884
+
885
+ #: includes/i18n.php:503
886
+ msgctxt "as sdk path"
887
+ msgid "SDK Path"
888
+ msgstr ""
889
+
890
+ #: includes/i18n.php:505
891
+ msgid "Add Ons of Plugin %s"
892
+ msgstr ""
893
+
894
+ #: includes/i18n.php:507
895
+ msgid "Are you sure you want to delete all Freemius data?"
896
+ msgstr ""
897
+
898
+ #: includes/i18n.php:509
899
+ msgid "Actions"
900
+ msgstr ""
901
+
902
+ #: includes/i18n.php:511
903
+ msgid "Delete All Accounts"
904
+ msgstr ""
905
+
906
+ #: includes/i18n.php:513
907
+ msgid "Start Fresh"
908
+ msgstr ""
909
+
910
+ #: includes/i18n.php:515
911
+ msgid "Clear API Cache"
912
+ msgstr ""
913
+
914
+ #: includes/i18n.php:517
915
+ msgid "Sync Data From Server"
916
+ msgstr ""
917
+
918
+ #: includes/i18n.php:519
919
+ msgid "Scheduled Crons"
920
+ msgstr ""
921
+
922
+ #: includes/i18n.php:521
923
+ msgid "Plugins & Themes Sync"
924
+ msgstr ""
925
+
926
+ #: includes/i18n.php:529
927
+ msgctxt "as congratulations"
928
+ msgid "Congrats"
929
+ msgstr ""
930
+
931
+ #: includes/i18n.php:531
932
+ msgctxt "exclamation"
933
+ msgid "Oops"
934
+ msgstr ""
935
+
936
+ #: includes/i18n.php:533
937
+ msgctxt "interjection expressing joy or exuberance"
938
+ msgid "Yee-haw"
939
+ msgstr ""
940
+
941
+ #: includes/i18n.php:535
942
+ msgctxt "(especially in electronic communication) used to express elation, enthusiasm, or triumph."
943
+ msgid "W00t"
944
+ msgstr ""
945
+
946
+ #: includes/i18n.php:537
947
+ msgctxt "a positive response"
948
+ msgid "Right on"
949
+ msgstr ""
950
+
951
+ #: includes/i18n.php:539
952
+ msgctxt "something somebody says when they are thinking about what you have just said. "
953
+ msgid "Hmm"
954
+ msgstr ""
955
+
956
+ #: includes/i18n.php:541
957
+ msgid "O.K"
958
+ msgstr ""
959
+
960
+ #: includes/i18n.php:543
961
+ msgctxt "exclamation"
962
+ msgid "Hey"
963
+ msgstr ""
964
+
965
+ #: includes/i18n.php:545
966
+ msgctxt "advance notice of something that will need attention."
967
+ msgid "Heads up"
968
+ msgstr ""
969
+
970
+ #: includes/i18n.php:553
971
+ msgid "Seems like you got the latest release."
972
+ msgstr ""
973
+
974
+ #: includes/i18n.php:555
975
+ msgid "You are all good!"
976
+ msgstr ""
977
+
978
+ #: includes/i18n.php:557
979
+ msgid "Sorry, we could not complete the email update. Another user with the same email is already registered."
980
+ msgstr ""
981
+
982
+ #: includes/i18n.php:559
983
+ msgid "If you would like to give up the ownership of the plugin's account to %s click the Change Ownership button."
984
+ msgstr ""
985
+
986
+ #: includes/i18n.php:561
987
+ msgid "Your email was successfully updated. You should receive an email with confirmation instructions in few moments."
988
+ msgstr ""
989
+
990
+ #: includes/i18n.php:563
991
+ msgid "Your name was successfully updated."
992
+ msgstr ""
993
+
994
+ #: includes/i18n.php:565
995
+ msgid "You have successfully updated your %s."
996
+ msgstr ""
997
+
998
+ #: includes/i18n.php:567
999
+ msgid "Please provide your full name."
1000
+ msgstr ""
1001
+
1002
+ #: includes/i18n.php:569
1003
+ msgid "Verification mail was just sent to %s. If you can't find it after 5 min, please check your spam box."
1004
+ msgstr ""
1005
+
1006
+ #: includes/i18n.php:571
1007
+ msgid "Just letting you know that the add-ons information of %s is being pulled from an external server."
1008
+ msgstr ""
1009
+
1010
+ #: includes/i18n.php:573
1011
+ msgid "No credit card required"
1012
+ msgstr ""
1013
+
1014
+ #: includes/i18n.php:575
1015
+ msgid "Premium plugin version was successfully activated."
1016
+ msgstr ""
1017
+
1018
+ #: includes/i18n.php:577
1019
+ msgid "The upgrade of %s was successfully completed."
1020
+ msgstr ""
1021
+
1022
+ #: includes/i18n.php:579
1023
+ msgid "Your account was successfully activated with the %s plan."
1024
+ msgstr ""
1025
+
1026
+ #: includes/i18n.php:581
1027
+ msgid "Download the latest %s version now"
1028
+ msgstr ""
1029
+
1030
+ #: includes/i18n.php:583
1031
+ msgid "Please follow these steps to complete the upgrade"
1032
+ msgstr ""
1033
+
1034
+ #: includes/i18n.php:585
1035
+ msgid "Download the latest %s version"
1036
+ msgstr ""
1037
+
1038
+ #: includes/i18n.php:587
1039
+ msgid "Deactivate the free version"
1040
+ msgstr ""
1041
+
1042
+ #: includes/i18n.php:589
1043
+ msgid "Upload and activate the downloaded version"
1044
+ msgstr ""
1045
+
1046
+ #: includes/i18n.php:591
1047
+ msgid "How to upload and activate?"
1048
+ msgstr ""
1049
+
1050
+ #: includes/i18n.php:593
1051
+ msgctxt "%s - product name, e.g. Facebook add-on was successfully..."
1052
+ msgid "%s Add-on was successfully purchased."
1053
+ msgstr ""
1054
+
1055
+ #: includes/i18n.php:595
1056
+ msgid "Your %s Add-on plan was successfully upgraded."
1057
+ msgstr ""
1058
+
1059
+ #: includes/i18n.php:597
1060
+ msgid "Your email has been successfully verified - you are AWESOME!"
1061
+ msgstr ""
1062
+
1063
+ #: includes/i18n.php:599
1064
+ msgid "Your plan was successfully upgraded."
1065
+ msgstr ""
1066
+
1067
+ #: includes/i18n.php:601
1068
+ msgid "Your plan was successfully changed to %s."
1069
+ msgstr ""
1070
+
1071
+ #: includes/i18n.php:603
1072
+ msgid "Your license has expired. You can still continue using the free plugin forever."
1073
+ msgstr ""
1074
+
1075
+ #: includes/i18n.php:605
1076
+ msgid "Your license has been cancelled. If you think it's a mistake, please contact support."
1077
+ msgstr ""
1078
+
1079
+ #: includes/i18n.php:607
1080
+ msgid "Your trial has been successfully started."
1081
+ msgstr ""
1082
+
1083
+ #: includes/i18n.php:609
1084
+ msgid "Your license was successfully activated."
1085
+ msgstr ""
1086
+
1087
+ #: includes/i18n.php:611
1088
+ msgid "It looks like your site currently doesn't have an active license."
1089
+ msgstr ""
1090
+
1091
+ #: includes/i18n.php:613
1092
+ msgid "Your license was successfully deactivated, you are back to the %s plan."
1093
+ msgstr ""
1094
+
1095
+ #: includes/i18n.php:615
1096
+ msgid "It looks like the license deactivation failed."
1097
+ msgstr ""
1098
+
1099
+ #: includes/i18n.php:617
1100
+ msgid "It looks like the license could not be activated."
1101
+ msgstr ""
1102
+
1103
+ #: includes/i18n.php:619
1104
+ msgid "Error received from the server:"
1105
+ msgstr ""
1106
+
1107
+ #: includes/i18n.php:621
1108
+ msgid "Your trial has expired. You can still continue using all our free features."
1109
+ msgstr ""
1110
+
1111
+ #: includes/i18n.php:623
1112
+ msgid "Your plan was successfully downgraded. Your %s plan license will expire in %s."
1113
+ msgstr ""
1114
+
1115
+ #: includes/i18n.php:625
1116
+ msgid "Seems like we are having some temporary issue with your plan downgrade. Please try again in few minutes."
1117
+ msgstr ""
1118
+
1119
+ #: includes/i18n.php:627
1120
+ msgid "It looks like you are not in trial mode anymore so there's nothing to cancel :)"
1121
+ msgstr ""
1122
+
1123
+ #: includes/i18n.php:629
1124
+ msgid "Your %s free trial was successfully cancelled."
1125
+ msgstr ""
1126
+
1127
+ #: includes/i18n.php:631
1128
+ msgctxt "%s - numeric version number"
1129
+ msgid "Version %s was released."
1130
+ msgstr ""
1131
+
1132
+ #: includes/i18n.php:633
1133
+ msgid "Please download %s."
1134
+ msgstr ""
1135
+
1136
+ #: includes/i18n.php:635
1137
+ msgctxt "%s - plan name, as the latest professional version here"
1138
+ msgid "the latest %s version here"
1139
+ msgstr ""
1140
+
1141
+ #: includes/i18n.php:637
1142
+ msgid "How do you like %s so far? Test all our %s premium features with a %d-day free trial."
1143
+ msgstr ""
1144
+
1145
+ #: includes/i18n.php:639
1146
+ msgctxt "call to action"
1147
+ msgid "Start free trial"
1148
+ msgstr ""
1149
+
1150
+ #: includes/i18n.php:641
1151
+ msgid "Seems like we are having some temporary issue with your trial cancellation. Please try again in few minutes."
1152
+ msgstr ""
1153
+
1154
+ #: includes/i18n.php:643
1155
+ msgid "You already utilized a trial before."
1156
+ msgstr ""
1157
+
1158
+ #: includes/i18n.php:645
1159
+ msgid "You are already running the plugin in a trial mode."
1160
+ msgstr ""
1161
+
1162
+ #: includes/i18n.php:647
1163
+ msgid "Plan %s do not exist, therefore, can't start a trial."
1164
+ msgstr ""
1165
+
1166
+ #: includes/i18n.php:649
1167
+ msgid "Plan %s does not support a trial period."
1168
+ msgstr ""
1169
+
1170
+ #: includes/i18n.php:651
1171
+ msgid "None of the plugin's plans supports a trial period."
1172
+ msgstr ""
1173
+
1174
+ #: includes/i18n.php:653
1175
+ msgid "Unexpected API error. Please contact the plugin's author with the following error."
1176
+ msgstr ""
1177
+
1178
+ #: includes/i18n.php:655
1179
+ msgid "No commitment for %s days - cancel anytime!"
1180
+ msgstr ""
1181
+
1182
+ #: includes/i18n.php:657
1183
+ msgid "Your license has expired. You can still continue using all the %s features, but you'll need to renew your license to continue getting updates and support."
1184
+ msgstr ""
1185
+
1186
+ #: includes/i18n.php:659
1187
+ msgid "Couldn't activate %s."
1188
+ msgstr ""
1189
+
1190
+ #: includes/i18n.php:661
1191
+ msgid "Please contact us with the following message:"
1192
+ msgstr ""
1193
+
1194
+ #: includes/i18n.php:663
1195
+ msgid "It looks like you are still on the %s plan. If you did upgrade or change your plan, it's probably an issue on our side - sorry."
1196
+ msgstr ""
1197
+
1198
+ #: includes/i18n.php:665
1199
+ msgid "Please contact us here"
1200
+ msgstr ""
1201
+
1202
+ #: includes/i18n.php:667
1203
+ msgid "I have upgraded my account but when I try to Sync the License, the plan remains %s."
1204
+ msgstr ""
1205
+
1206
+ #: includes/i18n.php:673
1207
+ msgid "From unknown reason, the API connectivity test failed."
1208
+ msgstr ""
1209
+
1210
+ #: includes/i18n.php:675
1211
+ msgid "It's probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?"
1212
+ msgstr ""
1213
+
1214
+ #: includes/i18n.php:677
1215
+ msgid "We use PHP cURL library for the API calls, which is a very common library and usually installed out of the box. Unfortunately, cURL is not installed on your server."
1216
+ msgstr ""
1217
+
1218
+ #: includes/i18n.php:679
1219
+ msgid "From unknown reason, CloudFlare, the firewall we use, blocks the connection."
1220
+ msgstr ""
1221
+
1222
+ #: includes/i18n.php:681
1223
+ msgctxt "as pluginX requires an access to our API"
1224
+ msgid "%s requires an access to our API."
1225
+ msgstr ""
1226
+
1227
+ #: includes/i18n.php:683
1228
+ msgid "It looks like your server is using Squid ACL (access control lists), which blocks the connection."
1229
+ msgstr ""
1230
+
1231
+ #: includes/i18n.php:685
1232
+ msgid "I don't know what is Squid or ACL, help me!"
1233
+ msgstr ""
1234
+
1235
+ #: includes/i18n.php:687, includes/i18n.php:695
1236
+ msgid "We'll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update."
1237
+ msgstr ""
1238
+
1239
+ #: includes/i18n.php:689
1240
+ msgid "I'm a system administrator"
1241
+ msgstr ""
1242
+
1243
+ #: includes/i18n.php:691
1244
+ msgid "Great, please whitelist the following domains: %s. Once you done, deactivate the plugin and activate it again."
1245
+ msgstr ""
1246
+
1247
+ #: includes/i18n.php:693
1248
+ msgid "I don't know what is cURL or how to install it, help me!"
1249
+ msgstr ""
1250
+
1251
+ #: includes/i18n.php:697
1252
+ msgid "Great, please install cURL and enable it in your php.ini file. To make sure it was successfully activated, use 'phpinfo()'. Once activated, deactivate the plugin and reactivate it back again."
1253
+ msgstr ""
1254
+
1255
+ #: includes/i18n.php:699
1256
+ msgid "We are sure it's an issue on our side and more than happy to resolve it for you ASAP if you give us a chance."
1257
+ msgstr ""
1258
+
1259
+ #: includes/i18n.php:701
1260
+ msgid "Sorry for the inconvenience and we are here to help if you give us a chance."
1261
+ msgstr ""
1262
+
1263
+ #: includes/i18n.php:703
1264
+ msgid "Yes - I'm giving you a chance to fix it"
1265
+ msgstr ""
1266
+
1267
+ #: includes/i18n.php:705
1268
+ msgid "We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update."
1269
+ msgstr ""
1270
+
1271
+ #: includes/i18n.php:707
1272
+ msgid "Let's try your previous version"
1273
+ msgstr ""
1274
+
1275
+ #: includes/i18n.php:709
1276
+ msgid "Uninstall this version and install the previous one."
1277
+ msgstr ""
1278
+
1279
+ #: includes/i18n.php:711
1280
+ msgid "That's exhausting, please deactivate"
1281
+ msgstr ""
1282
+
1283
+ #: includes/i18n.php:713
1284
+ msgid "We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future."
1285
+ msgstr ""
1286
+
1287
+ #: includes/i18n.php:715
1288
+ msgid "Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience."
1289
+ msgstr ""
1290
+
1291
+ #: includes/i18n.php:717
1292
+ msgctxt "%1s - plugin title, %2s - API domain"
1293
+ msgid "Your server is blocking the access to Freemius' API, which is crucial for %1s synchronization. Please contact your host to whitelist %2s"
1294
+ msgstr ""
1295
+
1296
+ #: includes/i18n.php:719
1297
+ msgid "It seems like one of the authentication parameters is wrong. Update your Public Key, Secret Key & User ID, and try again."
1298
+ msgstr ""
1299
+
1300
+ #: includes/i18n.php:725
1301
+ msgid "Please check your mailbox, you should receive an email via %s to confirm the ownership change. From security reasons, you must confirm the change within the next 15 min. If you cannot find the email, please check your spam folder."
1302
+ msgstr ""
1303
+
1304
+ #: includes/i18n.php:727
1305
+ msgid "Thanks for confirming the ownership change. An email was just sent to %s for final approval."
1306
+ msgstr ""
1307
+
1308
+ #: includes/i18n.php:729
1309
+ msgid "%s is the new owner of the account."
1310
+ msgstr ""
1311
+
1312
+ #: includes/i18n.php:733
1313
+ msgctxt "addonX cannot run without pluginY"
1314
+ msgid "%s cannot run without %s."
1315
+ msgstr ""
1316
+
1317
+ #: includes/i18n.php:735
1318
+ msgctxt "addonX cannot run..."
1319
+ msgid "%s cannot run without the plugin."
1320
+ msgstr ""
1321
+
1322
+ #: includes/i18n.php:737
1323
+ msgctxt "pluginX activation was successfully..."
1324
+ msgid "%s activation was successfully completed."
1325
+ msgstr ""
1326
+
1327
+ #: includes/i18n.php:739
1328
+ msgctxt "Plugin installer section title"
1329
+ msgid "Features & Pricing"
1330
+ msgstr ""
1331
+
1332
+ #: includes/i18n.php:741
1333
+ msgid "Add-on must be deployed to WordPress.org or Freemius."
1334
+ msgstr ""
1335
+
1336
+ #: includes/i18n.php:743
1337
+ msgid "Paid add-on must be deployed to Freemius."
1338
+ msgstr ""
1339
+
1340
+ #: includes/i18n.php:747
1341
+ msgid "%s is a premium only add-on. You have to purchase a license first before activating the plugin."
1342
+ msgstr ""
1343
+
1344
+ #: includes/i18n.php:749
1345
+ msgid "%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you'll have to purchase a license."
1346
+ msgstr ""
1347
+
1348
+ #: includes/i18n.php:755
1349
+ msgctxt "as every month"
1350
+ msgid "Monthly"
1351
+ msgstr ""
1352
+
1353
+ #: includes/i18n.php:757
1354
+ msgctxt "as monthly period"
1355
+ msgid "mo"
1356
+ msgstr ""
1357
+
1358
+ #: includes/i18n.php:759
1359
+ msgctxt "as once a year"
1360
+ msgid "Annual"
1361
+ msgstr ""
1362
+
1363
+ #: includes/i18n.php:761
1364
+ msgctxt "as once a year"
1365
+ msgid "Annually"
1366
+ msgstr ""
1367
+
1368
+ #: includes/i18n.php:763
1369
+ msgctxt "as once a year"
1370
+ msgid "Once"
1371
+ msgstr ""
1372
+
1373
+ #: includes/i18n.php:765
1374
+ msgctxt "as annual period"
1375
+ msgid "year"
1376
+ msgstr ""
1377
+
1378
+ #: includes/i18n.php:767
1379
+ msgid "Lifetime"
1380
+ msgstr ""
1381
+
1382
+ #: includes/i18n.php:769
1383
+ msgctxt "e.g. the best product"
1384
+ msgid "Best"
1385
+ msgstr ""
1386
+
1387
+ #: includes/i18n.php:771
1388
+ msgctxt "e.g. billed monthly"
1389
+ msgid "Billed %s"
1390
+ msgstr ""
1391
+
1392
+ #: includes/i18n.php:773
1393
+ msgctxt "as a discount of $5 or 10%"
1394
+ msgid "Save %s"
1395
+ msgstr ""
1396
+
1397
+ #: includes/i18n.php:777
1398
+ msgid "View details"
1399
+ msgstr ""
includes/libs/freemius/package.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "freemius-wordpress-sdk",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "gulpfile.js",
6
+ "dependencies": {
7
+ "gulp": "^3.9.1",
8
+ "gulp-gettext": "^0.3.0",
9
+ "gulp-pofill": "^1.0.0",
10
+ "gulp-rename": "^1.2.2",
11
+ "gulp-sort": "^2.0.0",
12
+ "gulp-wp-pot": "^1.3.1"
13
+ },
14
+ "scripts": {
15
+ "test": "echo \"Error: no test specified\" && exit 1"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/Freemius/wordpress-sdk.git"
20
+ },
21
+ "author": "Vova Feldman",
22
+ "license": "GPL-2.0",
23
+ "homepage": "https://freemius.com",
24
+ "devDependencies": {
25
+ "gulp": "^3.9.1",
26
+ "gulp-gettext": "^0.3.0",
27
+ "gulp-pofill": "^1.0.0",
28
+ "gulp-rename": "^1.2.2",
29
+ "gulp-sort": "^2.0.0",
30
+ "gulp-wp-pot": "^1.3.1"
31
+ }
32
+ }
includes/libs/freemius/require.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6
+ * @since 1.1.9
7
+ */
8
+
9
+ // Configuration should be loaded first.
10
+ require_once dirname( __FILE__ ) . '/config.php';
11
+
12
+ // Logger must be loaded before any other.
13
+ require_once WP_FS__DIR_INCLUDES . '/class-fs-logger.php';
14
+ require_once WP_FS__DIR_INCLUDES . '/debug/debug-bar-start.php';
15
+
16
+ require_once WP_FS__DIR_INCLUDES . '/fs-core-functions.php';
17
+ // require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-abstract-manager.php';
18
+ require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-option-manager.php';
19
+ require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-cache-manager.php';
20
+ require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-admin-notice-manager.php';
21
+ require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-admin-menu-manager.php';
22
+ require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-key-value-storage.php';
23
+ require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-license-manager.php';
24
+ require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-plan-manager.php';
25
+ require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-plugin-manager.php';
26
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-entity.php';
27
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-scope-entity.php';
28
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-user.php';
29
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-site.php';
30
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin.php';
31
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin-info.php';
32
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin-tag.php';
33
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin-plan.php';
34
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-pricing.php';
35
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-payment.php';
36
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin-license.php';
37
+ require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-subscription.php';
38
+ require_once WP_FS__DIR_INCLUDES . '/class-fs-api.php';
39
+ require_once WP_FS__DIR_INCLUDES . '/class-fs-plugin-updater.php';
40
+ require_once WP_FS__DIR_INCLUDES . '/class-fs-security.php';
41
+ require_once WP_FS__DIR_INCLUDES . '/class-freemius-abstract.php';
42
+ require_once WP_FS__DIR_INCLUDES . '/sdk/Exceptions/Exception.php';
43
+ require_once WP_FS__DIR_INCLUDES . '/class-freemius.php';
includes/libs/freemius/start.php CHANGED
@@ -15,7 +15,7 @@
15
  *
16
  * @var string
17
  */
18
- $this_sdk_version = '1.1.9';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
@@ -260,40 +260,8 @@
260
  define( 'WP_FS__SDK_VERSION', $this_sdk_version );
261
  }
262
 
263
- // Configuration should be loaded first.
264
- require_once dirname( __FILE__ ) . '/config.php';
265
-
266
- // Logger must be loaded before any other.
267
- require_once WP_FS__DIR_INCLUDES . '/class-fs-logger.php';
268
- require_once WP_FS__DIR_INCLUDES . '/debug/debug-bar-start.php';
269
-
270
- require_once WP_FS__DIR_INCLUDES . '/fs-core-functions.php';
271
- // require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-abstract-manager.php';
272
- require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-option-manager.php';
273
- require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-cache-manager.php';
274
- require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-admin-notice-manager.php';
275
- require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-admin-menu-manager.php';
276
- require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-key-value-storage.php';
277
- require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-license-manager.php';
278
- require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-plan-manager.php';
279
- require_once WP_FS__DIR_INCLUDES . '/managers/class-fs-plugin-manager.php';
280
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-entity.php';
281
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-scope-entity.php';
282
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-user.php';
283
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-site.php';
284
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin.php';
285
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin-info.php';
286
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin-tag.php';
287
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin-plan.php';
288
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-pricing.php';
289
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-plugin-license.php';
290
- require_once WP_FS__DIR_INCLUDES . '/entities/class-fs-subscription.php';
291
- require_once WP_FS__DIR_INCLUDES . '/class-fs-api.php';
292
- require_once WP_FS__DIR_INCLUDES . '/class-fs-plugin-updater.php';
293
- require_once WP_FS__DIR_INCLUDES . '/class-fs-security.php';
294
- require_once WP_FS__DIR_INCLUDES . '/class-freemius-abstract.php';
295
- require_once WP_FS__DIR_INCLUDES . '/sdk/Exceptions/Exception.php';
296
- require_once WP_FS__DIR_INCLUDES . '/class-freemius.php';
297
 
298
  /**
299
  * Quick shortcut to get Freemius for specified plugin.
@@ -315,23 +283,25 @@
315
  * @param bool $is_premium Hints freemius if running the premium plugin or not.
316
  *
317
  * @return Freemius
 
 
318
  */
319
  function fs_init( $slug, $plugin_id, $public_key, $is_live = true, $is_premium = true ) {
320
- $fs = Freemius::instance( $slug );
321
  $fs->init( $plugin_id, $public_key, $is_live, $is_premium );
322
 
323
  return $fs;
324
  }
325
 
326
  /**
327
- * @param array [string]string $plugin
328
  *
329
  * @return Freemius
330
  * @throws Freemius_Exception
331
  */
332
- function fs_dynamic_init( $plugin ) {
333
- $fs = Freemius::instance( $plugin['slug'] );
334
- $fs->dynamic_init( $plugin );
335
 
336
  return $fs;
337
  }
15
  *
16
  * @var string
17
  */
18
+ $this_sdk_version = '1.2.1';
19
 
20
  #region SDK Selection Logic --------------------------------------------------------------------
21
 
260
  define( 'WP_FS__SDK_VERSION', $this_sdk_version );
261
  }
262
 
263
+ // Load SDK files.
264
+ require_once dirname( __FILE__ ) . '/require.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
 
266
  /**
267
  * Quick shortcut to get Freemius for specified plugin.
283
  * @param bool $is_premium Hints freemius if running the premium plugin or not.
284
  *
285
  * @return Freemius
286
+ *
287
+ * @deprecated Please use fs_dynamic_init().
288
  */
289
  function fs_init( $slug, $plugin_id, $public_key, $is_live = true, $is_premium = true ) {
290
+ $fs = Freemius::instance( $slug, true );
291
  $fs->init( $plugin_id, $public_key, $is_live, $is_premium );
292
 
293
  return $fs;
294
  }
295
 
296
  /**
297
+ * @param array<string,string> $module Plugin or Theme details.
298
  *
299
  * @return Freemius
300
  * @throws Freemius_Exception
301
  */
302
+ function fs_dynamic_init( $module ) {
303
+ $fs = Freemius::instance( $module['slug'], true );
304
+ $fs->dynamic_init( $module );
305
 
306
  return $fs;
307
  }
includes/libs/freemius/templates/account.php CHANGED
@@ -10,6 +10,9 @@
10
  exit;
11
  }
12
 
 
 
 
13
  $slug = $VARS['slug'];
14
  /**
15
  * @var Freemius $fs
@@ -30,596 +33,659 @@
30
  $plan = $fs->get_plan();
31
  $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() );
32
  $is_paid_trial = $fs->is_paid_trial();
33
- $show_upgrade = ( ! $is_paying && ! $is_paid_trial );
34
- ?>
35
 
36
- <div class="wrap">
37
- <h2 class="nav-tab-wrapper">
38
- <a href="<?php $fs->get_account_url() ?>" class="nav-tab nav-tab-active"><?php _efs( 'account', $slug ) ?></a>
39
- <?php if ( $fs->has_addons() ) : ?>
40
- <a href="<?php echo $fs->_get_admin_page_url( 'addons' ) ?>"
41
- class="nav-tab"><?php _efs( 'add-ons', $slug ) ?></a>
42
- <?php endif ?>
43
- <?php if ( $fs->is_not_paying() && $fs->has_paid_plan() ) : ?>
44
- <a href="<?php echo $fs->get_upgrade_url() ?>" class="nav-tab"><?php _efs( 'upgrade', $slug ) ?></a>
45
- <?php if ( $fs->apply_filters( 'show_trial', true ) && ! $fs->is_trial_utilized() && $fs->has_trial_plan() ) : ?>
46
- <a href="<?php echo $fs->get_trial_url() ?>" class="nav-tab"><?php _efs( 'free-trial', $slug ) ?></a>
47
  <?php endif ?>
48
- <?php endif ?>
49
- </h2>
50
-
51
- <div id="poststuff">
52
- <div id="fs_account">
53
- <div class="has-sidebar has-right-sidebar">
54
- <div class="has-sidebar-content">
55
- <div class="postbox">
56
- <h3><?php _efs('account-details', $slug) ?></h3>
57
-
58
- <div class="fs-header-actions">
59
- <ul>
60
- <li>
61
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>" method="POST">
62
- <input type="hidden" name="fs_action" value="delete_account">
63
- <?php wp_nonce_field('delete_account') ?>
64
- <a href="#" onclick="if (confirm('<?php
65
- if ($is_active_subscription) {
66
- echo esc_attr(sprintf(__fs('delete-account-x-confirm', $slug), $plan->title));
67
- } else {
68
- _efs('delete-account-confirm', $slug);
69
- }
70
- ?>')) this.parentNode.submit(); return false;"><i
71
- class="dashicons dashicons-no"></i> <?php _efs('delete-account', $slug) ?></a>
72
- </form>
73
- </li>
74
- <?php if ($is_paying) : ?>
75
- <li>
76
- &nbsp;•&nbsp;
77
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>" method="POST">
78
- <input type="hidden" name="fs_action" value="deactivate_license">
79
- <?php wp_nonce_field('deactivate_license') ?>
80
- <a href="#"
81
- onclick="if (confirm('<?php _efs('deactivate-license-confirm', $slug) ?>')) this.parentNode.submit(); return false;"><i
82
- class="dashicons dashicons-admin-network"></i> <?php _efs('deactivate-license', $slug) ?>
83
- </a>
84
- </form>
85
- </li>
86
- <?php if (! $license->is_lifetime() &&
87
- $is_active_subscription
88
- ) : ?>
89
- <li>
90
- &nbsp;•&nbsp;
91
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>" method="POST">
92
- <input type="hidden" name="fs_action" value="downgrade_account">
93
- <?php wp_nonce_field('downgrade_account') ?>
94
- <a href="#"
95
- onclick="if (confirm('<?php printf(__fs('downgrade-x-confirm', $slug), $plan->title, human_time_diff(time(), strtotime($license->expiration))) ?> <?php if (! $license->is_block_features) {
96
- printf(__fs('after-downgrade-non-blocking', $slug), $plan->title);
97
- } else {
98
- printf(__fs('after-downgrade-blocking', $slug), $plan->title);
99
- }?> <?php _efs('proceed-confirmation', $slug) ?>')) this.parentNode.submit(); return false;"><i
100
- class="dashicons dashicons-download"></i> <?php _efs('downgrade', $slug) ?></a>
101
- </form>
102
- </li>
103
  <?php endif ?>
104
- <li>
105
- &nbsp;•&nbsp;
106
- <a href="<?php echo $fs->get_upgrade_url() ?>"><i
107
- class="dashicons dashicons-grid-view"></i> <?php _efs('change-plan', $slug) ?></a>
108
- </li>
109
- <?php elseif ($is_paid_trial) : ?>
110
- <li>
111
- &nbsp;•&nbsp;
112
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>" method="POST">
113
- <input type="hidden" name="fs_action" value="cancel_trial">
114
- <?php wp_nonce_field('cancel_trial') ?>
115
- <a href="#"
116
- onclick="if (confirm('<?php _efs('cancel-trial-confirm') ?>')) this.parentNode.submit(); return false;"><i
117
- class="dashicons dashicons-download"></i> <?php _efs('cancel-trial', $slug) ?></a>
118
- </form>
119
- </li>
120
  <?php endif ?>
121
- <li>
122
- &nbsp;•&nbsp;
123
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>" method="POST">
124
- <input type="hidden" name="fs_action" value="<?php echo $slug ?>_sync_license">
125
- <?php wp_nonce_field($slug . '_sync_license') ?>
126
- <a href="#" onclick="this.parentNode.submit(); return false;"><i
127
- class="dashicons dashicons-image-rotate"></i> <?php _efs('sync', $slug) ?></a>
128
- </form>
129
- </li>
130
-
131
- </ul>
132
- </div>
133
- <div class="inside">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  <table id="fs_account_details" cellspacing="0" class="fs-key-value-table">
135
- <?php
136
- $profile = array();
137
- $profile[] = array(
138
- 'id' => 'user_name',
139
- 'title' => __fs('name', $slug),
140
  'value' => $name
141
- );
142
- // if (isset($user->email) && false !== strpos($user->email, '@'))
143
- $profile[] = array(
144
- 'id' => 'email',
145
- 'title' => __fs('email', $slug),
146
  'value' => $user->email
147
- );
148
- if (is_numeric($user->id)) {
149
- $profile[] = array(
150
- 'id' => 'user_id',
151
- 'title' => __fs('user-id', $slug),
152
- 'value' => $user->id
153
- );
154
- }
155
 
 
156
  $profile[] = array(
157
- 'id' => 'site_id',
158
- 'title' => __fs('site-id', $slug),
159
- 'value' => is_string($site->id) ?
160
- $site->id :
161
- __fs('no-id', $slug)
162
  );
 
163
 
164
- $profile[] = array(
165
- 'id' => 'site_public_key',
166
- 'title' => __fs('public-key', $slug),
 
 
 
 
 
 
 
 
167
  'value' => $site->public_key
168
- );
169
 
170
- $profile[] = array(
171
- 'id' => 'site_secret_key',
172
- 'title' => __fs('secret-key', $slug),
173
- 'value' => ((is_string($site->secret_key)) ?
174
- $site->secret_key :
175
- __fs('no-secret', $slug)
176
  )
177
- );
178
 
179
- if ($fs->has_paid_plan()) {
180
- if ($fs->is_trial()) {
181
- $trial_plan = $fs->get_trial_plan();
 
 
182
 
183
- $profile[] = array(
184
- 'id' => 'plan',
185
- 'title' => __fs('plan', $slug),
186
- 'value' => (is_string($trial_plan->name) ?
187
- strtoupper($trial_plan->title) :
188
- __fs('trial', $slug))
189
- );
 
 
 
 
190
  } else {
191
- $profile[] = array(
192
- 'id' => 'plan',
193
- 'title' => __fs('plan', $slug),
194
- 'value' => is_string($site->plan->name) ?
195
- strtoupper($site->plan->title) :
196
- strtoupper(__fs('free', $slug))
197
- );
198
- }
199
- }
200
 
201
- $profile[] = array(
202
- 'id' => 'version',
203
- 'title' => __fs('version', $slug),
204
- 'value' => $fs->get_plugin_version()
205
- );
206
- ?>
207
- <?php $odd = true;
208
- foreach ($profile as $p) : ?>
209
- <?php
210
- if ('plan' === $p['id'] && ! $fs->has_paid_plan()) {
211
- // If plugin don't have any paid plans, there's no reason
212
- // to show current plan.
213
- continue;
214
  }
215
- ?>
216
- <tr class="fs-field-<?php echo $p['id'] ?><?php if ($odd) : ?> alternate<?php endif ?>">
217
- <td>
218
- <nobr><?php echo $p['title'] ?>:</nobr>
219
- </td>
220
- <td>
221
- <code><?php echo htmlspecialchars($p['value']) ?></code>
222
- <?php if ('email' === $p['id'] && ! $user->is_verified()) : ?>
223
- <label class="fs-tag fs-warn"><?php _efs('not-verified', $slug) ?></label>
224
- <?php endif ?>
225
- <?php if ('plan' === $p['id']) : ?>
226
- <?php if ($fs->is_trial()) : ?>
227
- <label class="fs-tag fs-success"><?php _efs('trial', $slug) ?></label>
228
- <?php endif ?>
229
- <?php if (is_object($license) && ! $license->is_lifetime()) : ?>
230
- <?php if (! $is_active_subscription && ! $license->is_first_payment_pending()) : ?>
231
- <label
232
- class="fs-tag fs-warn"><?php printf(__fs('expires-in', $slug), human_time_diff(time(), strtotime($license->expiration))) ?></label>
233
- <?php elseif ($is_active_subscription && ! $subscription->is_first_payment_pending()) : ?>
234
- <label
235
- class="fs-tag fs-success"><?php printf(__fs('renews-in', $slug), human_time_diff(time(), strtotime($subscription->next_payment))) ?></label>
236
- <?php endif ?>
237
- <?php elseif ($fs->is_trial()) : ?>
238
- <label
239
- class="fs-tag fs-warn"><?php printf(__fs('expires-in', $slug), human_time_diff(time(), strtotime($site->trial_ends))) ?></label>
240
- <?php endif ?>
241
- <?php endif ?>
242
- <?php if ('version' === $p['id'] && $fs->has_paid_plan()) : ?>
243
- <?php if ($fs->is_premium()) : ?>
244
- <label
245
- class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>"><?php _efs('premium-version') ?></label>
246
- <?php elseif ($fs->can_use_premium_code()) : ?>
247
- <label class="fs-tag fs-warn"><?php _efs('free-version') ?></label>
248
- <?php endif ?>
249
- <?php endif ?>
250
- </td>
251
- <td class="fs-right">
252
- <?php if ('email' === $p['id'] && ! $user->is_verified()) : ?>
253
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>" method="POST">
254
- <input type="hidden" name="fs_action" value="verify_email">
255
- <?php wp_nonce_field('verify_email') ?>
256
- <input type="submit" class="button button-small"
257
- value="<?php _efs('verify-email', $slug) ?>">
258
- </form>
259
- <?php endif ?>
260
- <?php if ('plan' === $p['id']) : ?>
261
- <div class="button-group">
262
- <?php $license = $fs->is_free_plan() ? $fs->_get_available_premium_license() : false ?>
263
- <?php if (false !== $license && ($license->left() > 0 || ($site->is_localhost() && $license->is_free_localhost))) : ?>
264
- <?php $premium_plan = $fs->_get_plan_by_id($license->plan_id) ?>
265
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>"
266
- method="POST">
267
- <input type="hidden" name="fs_action" value="activate_license">
268
- <input type="hidden" name="license_id" value="<?php echo $license->id ?>">
269
- <?php wp_nonce_field('activate_license') ?>
270
- <input type="submit" class="button button-primary"
271
- value="<?php printf(
272
- __fs( 'activate-x-plan', $slug ) . '%s',
273
- $premium_plan->title,
274
- ( $site->is_localhost() && $license->is_free_localhost ) ?
275
- ' [' . __fs( 'localhost', $slug ) . ']' :
276
- ( $license->is_single_site() ?
277
- '' :
278
- ' [' . ( 1 < $license->left() ?
279
- sprintf( __fs( 'x-left', $slug ), $license->left() ) :
280
- strtolower( __fs( 'last-license', $slug ) ) ) . ']'
281
- )
282
- ) ?> ">
283
- </form>
284
  <?php else : ?>
285
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>"
286
- method="POST" class="button-group">
287
- <input type="submit" class="button"
288
- value="<?php _efs('sync-license', $slug) ?>">
289
- <input type="hidden" name="fs_action"
290
- value="<?php echo $slug ?>_sync_license">
291
- <?php wp_nonce_field($slug . '_sync_license') ?>
292
- <a href="<?php echo $fs->get_upgrade_url() ?>"
293
- class="button<?php if ($show_upgrade) {
294
- echo ' button-primary';
295
- } ?> button-upgrade"><i
296
- class="dashicons dashicons-cart"></i> <?php ($show_upgrade) ?
297
- _efs('upgrade', $slug) :
298
- _efs('change-plan', $slug)
299
- ?></a>
300
- </form>
301
  <?php endif ?>
302
- </div>
303
- <?php elseif ('version' === $p['id']) : ?>
304
- <div class="button-group">
305
- <?php if ($is_paying || $fs->is_trial()) : ?>
306
- <?php if (! $fs->is_allowed_to_install()) : ?>
307
- <a target="_blank" class="button button-primary"
308
- href="<?php echo $fs->_get_latest_download_local_url() ?>"><?php echo sprintf(__fs('download-x-version', $slug), $site->plan->title) . (is_object($update) ? ' [' . $update->version . ']' : '') ?></a>
309
- <?php elseif (is_object($update)) : ?>
310
- <a class="button button-primary"
311
- href="<?php echo wp_nonce_url(self_admin_url('update.php?action=upgrade-plugin&plugin=' . $fs->get_plugin_basename()), 'upgrade-plugin_' . $fs->get_plugin_basename()) ?>"><?php echo __fs('install-update-now', $slug) . ' [' . $update->version . ']' ?></a>
312
  <?php endif ?>
313
- <?php endif; ?>
314
- </div>
315
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  elseif (/*in_array($p['id'], array('site_secret_key', 'site_id', 'site_public_key')) ||*/
317
- (is_string($user->secret_key) && in_array($p['id'], array(
318
- 'email',
319
- 'user_name'
320
- )))
321
  ) : ?>
322
- <form action="<?php echo $fs->_get_admin_page_url('account') ?>" method="POST"
323
- onsubmit="var val = prompt('<?php printf(__fs('what-is-your-x', $slug), $p['title']) ?>', '<?php echo $p['value'] ?>'); if (null == val || '' === val) return false; jQuery('input[name=fs_<?php echo $p['id'] ?>_<?php echo $slug ?>]').val(val); return true;">
324
- <input type="hidden" name="fs_action" value="update_<?php echo $p['id'] ?>">
325
- <input type="hidden" name="fs_<?php echo $p['id'] ?>_<?php echo $slug ?>"
326
- value="">
327
- <?php wp_nonce_field('update_' . $p['id']) ?>
328
- <input type="submit" class="button button-small"
329
- value="<?php _ex('Edit', 'verb', 'freemius') ?>">
330
- </form>
 
 
331
  <?php endif ?>
332
- </td>
333
- </tr>
334
- <?php $odd = ! $odd;
335
- endforeach ?>
336
  </table>
337
- </div>
338
- </div>
339
- <?php
340
- $account_addons = $fs->get_account_addons();
341
- if (! is_array($account_addons)) {
342
- $account_addons = array();
343
- }
 
 
344
 
345
- $installed_addons = $fs->get_installed_addons();
346
- $installed_addons_ids = array();
347
- foreach ($installed_addons as $fs_addon) {
348
- $installed_addons_ids[] = $fs_addon->get_id();
349
- }
350
 
351
- $addons_to_show = array_unique(array_merge($installed_addons_ids, $account_addons));
352
- ?>
353
- <?php if (0 < count($addons_to_show)) : ?>
354
- <div class="postbox">
355
- <div class="">
356
- <!-- <div class="inside">-->
357
- <table id="fs_addons" class="widefat">
358
- <thead>
359
- <tr>
360
- <th><h3><?php _efs('add-ons', $slug) ?></h3></th>
361
- <th><?php _efs('id', $slug) ?></th>
362
- <th><?php _efs('version', $slug) ?></th>
363
- <th><?php _efs('plan', $slug) ?></th>
364
- <th><?php _efs('license', $slug) ?></th>
365
- <th></th>
366
- <?php if (defined('WP_FS__DEV_MODE') && WP_FS__DEV_MODE) : ?>
367
- <th></th>
368
- <?php endif ?>
369
- </tr>
370
- </thead>
371
- <tbody>
372
- <?php $odd = true;
373
- foreach ($addons_to_show as $addon_id) : ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
  <?php
375
- $addon = $fs->get_addon($addon_id);
376
- $is_addon_activated = $fs->is_addon_activated($addon->slug);
377
- $is_addon_connected = $fs->is_addon_connected($addon->slug);
378
-
379
- $fs_addon = $is_addon_connected ? freemius($addon->slug) : false;
380
- if (is_object($fs_addon)) {
381
- $is_paying = $fs_addon->is_paying();
382
- $user = $fs_addon->get_user();
383
- $site = $fs_addon->get_site();
384
- $license = $fs_addon->_get_license();
385
- $subscription = $fs_addon->_get_subscription();
386
- $plan = $fs_addon->get_plan();
387
- $is_active_subscription = (is_object($subscription) && $subscription->is_active());
388
- $is_paid_trial = $fs_addon->is_paid_trial();
389
- $show_upgrade = (! $is_paying && ! $is_paid_trial && ! $fs_addon->_has_premium_license());
390
- $is_current_license_expired = is_object($license) && $license->is_expired();
391
- }
392
 
393
- // var_dump( $is_paid_trial, $license, $site, $subscription );
 
 
 
 
 
 
 
 
 
 
 
 
394
 
395
- ?>
396
- <tr<?php if ($odd) {
397
- echo ' class="alternate"';
398
- } ?>>
399
- <td>
400
- <!-- Title -->
401
- <?php echo $addon->title ?>
402
- </td>
403
- <?php if ($is_addon_connected) : ?>
 
 
404
  <?php // Add-on Installed ?>
405
  <?php $addon_site = $fs_addon->get_site(); ?>
406
- <td>
407
- <!-- ID -->
408
- <?php echo $addon_site->id ?>
409
- </td>
410
- <td>
411
- <!-- Version -->
412
- <?php echo $fs_addon->get_plugin_version() ?>
413
- </td>
414
- <td>
415
- <!-- Plan Title -->
416
- <?php echo is_string($addon_site->plan->name) ? strtoupper($addon_site->plan->title) : 'FREE' ?>
417
- </td>
418
- <td>
419
- <!-- Expiration -->
420
- <?php
421
- $tags = array();
422
 
423
- if ($fs_addon->is_trial()) {
424
- $tags[] = array('label' => __fs('trial', $slug), 'type' => 'success');
425
 
426
- $tags[] = array(
427
- 'label' => sprintf(__fs(($is_paid_trial ? 'renews-in' : 'expires-in'), $slug), human_time_diff(time(), strtotime($site->trial_ends))),
428
- 'type' => ($is_paid_trial ? 'success' : 'warn')
429
- );
430
- } else {
431
- if (is_object($license)) {
432
- if ($license->is_cancelled) {
433
- $tags[] = array(
434
- 'label' => __fs('cancelled', $slug),
435
- 'type' => 'error'
436
- );
437
- } else if ($license->is_expired()) {
438
- $tags[] = array(
439
- 'label' => __fs('expired', $slug),
440
- 'type' => 'error'
441
- );
442
- } else if ($license->is_lifetime()) {
443
- $tags[] = array(
444
- 'label' => __fs('no-expiration', $slug),
445
- 'type' => 'success'
446
- );
447
- } else if (! $is_active_subscription && ! $license->is_first_payment_pending()) {
448
- $tags[] = array(
449
- 'label' => sprintf(__fs('expires-in', $slug), human_time_diff(time(), strtotime($license->expiration))),
450
- 'type' => 'warn'
451
- );
452
- } else if ($is_active_subscription && ! $subscription->is_first_payment_pending()) {
453
- $tags[] = array(
454
- 'label' => sprintf(__fs('renews-in', $slug), human_time_diff(time(), strtotime($subscription->next_payment))),
455
- 'type' => 'success'
456
- );
457
- }
458
- }
459
- }
460
 
461
- foreach ($tags as $t) {
462
- printf('<label class="fs-tag fs-%s">%s</label>' . "\n", $t['type'], $t['label']);
463
- }
464
- ?>
465
- </td>
466
- <?php
467
- $buttons = array();
468
- if ($is_addon_activated) {
469
- if ($is_paying) {
470
- $buttons[] = fs_ui_get_action_button(
471
- $slug,
472
- 'account',
473
- 'deactivate_license',
474
- __fs('deactivate-license', $slug),
475
- array('plugin_id' => $addon_id),
476
- false
477
- );
478
- } else if ($is_paid_trial) {
479
- $buttons[] = fs_ui_get_action_button(
480
- $slug,
481
- 'account',
482
- 'cancel_trial',
483
- __fs('cancel-trial', $slug),
484
- array('plugin_id' => $addon_id),
485
- false,
486
- 'dashicons dashicons-download',
487
- __fs('cancel-trial-confirm', $slug),
488
- 'POST'
489
- );
490
- } else {
491
- $premium_license = $fs_addon->_get_available_premium_license();
492
-
493
- if (is_object($premium_license)) {
494
- $site = $fs_addon->get_site();
495
-
496
- $buttons[] = fs_ui_get_action_button(
497
- $slug,
498
- 'account',
499
- 'activate_license',
500
- sprintf(__fs('activate-x-plan', $slug), $fs_addon->get_plan_title(), ($site->is_localhost() && $premium_license->is_free_localhost) ? '[localhost]' : (1 < $premium_license->left() ? $premium_license->left() . ' left' : '')),
501
- array(
502
- 'plugin_id' => $addon_id,
503
- 'license_id' => $premium_license->id,
504
- )
505
- );
506
- }
507
- }
508
 
509
- if (0 == count($buttons)) {
510
- // Add sync license only if non of the other CTAs are visible.
511
- $buttons[] = fs_ui_get_action_button(
512
- $slug,
513
- 'account',
514
- $slug . '_sync_license',
515
- __fs('sync-license', $slug),
516
- array('plugin_id' => $addon_id),
517
- false
518
- );
519
 
520
- }
521
- } else if (! $show_upgrade) {
522
- if ($fs->is_addon_installed($addon->slug)) {
523
- $addon_file = $fs->get_addon_basename($addon->slug);
524
- $buttons[] = sprintf(
525
- '<a class="button button-primary" href="%s" title="%s" class="edit">%s</a>',
526
- wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $addon_file, 'activate-plugin_' . $addon_file),
527
- esc_attr(__fs('activate-this-addon', $slug)),
528
- __fs('activate', $slug)
529
- );
530
- } else {
531
- if ($fs->is_allowed_to_install()) {
532
- $buttons[] = sprintf(
533
- '<a class="button button-primary" href="%s" class="edit">%s</a>',
534
- wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $addon->slug), 'install-plugin_' . $addon->slug),
535
- __fs('install-now', $slug)
536
- );
537
- } else {
538
- $buttons[] = sprintf(
539
- '<a target="_blank" class="button button-primary" href="%s" class="edit">%s</a>',
540
- $fs->_get_latest_download_local_url($addon_id),
541
- __fs('download-latest', $slug)
542
- );
543
- }
544
- }
545
- }
546
 
547
- if ($show_upgrade) {
548
- $buttons[] = sprintf('<a href="%s" class="thickbox button button-primary" aria-label="%s" data-title="%s"><i class="dashicons dashicons-cart"></i> %s</a>',
549
- esc_url(network_admin_url('plugin-install.php?tab=plugin-information&parent_plugin_id=' . $fs->get_id() . '&plugin=' . $addon->slug .
550
- '&TB_iframe=true&width=600&height=550')),
551
- esc_attr(sprintf(__fs('more-information-about-x', $slug), $addon->title)),
552
- esc_attr($addon->title),
553
- __fs(($fs_addon->has_free_plan() ? 'upgrade' : 'purchase'), $slug)
554
- );
555
- }
 
556
 
557
- $buttons_count = count($buttons);
558
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
 
560
- <td>
561
- <!-- Actions -->
562
- <?php if ($buttons_count > 1) : ?>
563
- <div class="button-group">
564
- <?php endif ?>
565
- <?php foreach ($buttons as $button) : ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  <?php echo $button ?>
567
  <?php endforeach ?>
568
  <?php if ($buttons_count > 1) : ?>
569
- </div>
570
- <?php endif ?>
571
- </td>
572
- <?php else : ?>
573
  <?php // Add-on NOT Installed or was never connected.
574
- ?>
575
- <td colspan="4">
576
- <!-- Action -->
577
- <?php if ($fs->is_addon_installed($addon->slug)) : ?>
578
- <?php $addon_file = $fs->get_addon_basename($addon->slug) ?>
579
- <a class="button button-primary"
580
- href="<?php echo wp_nonce_url('plugins.php?action=activate&amp;plugin=' . $addon_file, 'activate-plugin_' . $addon_file) ?>"
581
- title="<?php esc_attr(__fs('activate-this-addon', $slug)) ?>"
582
- class="edit"><?php _efs('activate', $slug) ?></a>
583
- <?php else : ?>
584
- <?php if ($fs->is_allowed_to_install()) : ?>
585
- <a class="button button-primary"
586
- href="<?php echo wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $addon->slug), 'install-plugin_' . $addon->slug) ?>"><?php _efs('install-now', $slug) ?></a>
587
- <?php else : ?>
588
- <a target="_blank" class="button button-primary"
589
- href="<?php echo $fs->_get_latest_download_local_url($addon_id) ?>"><?php _efs('download-latest', $slug) ?></a>
590
- <?php endif ?>
591
  <?php endif ?>
592
- </td>
593
- <?php endif ?>
594
- <?php if (defined('WP_FS__DEV_MODE') && WP_FS__DEV_MODE) : ?>
595
- <td>
596
- <!-- Optional Delete Action -->
597
- <?php
598
- if ($is_addon_activated) {
599
- fs_ui_action_button(
600
- $slug, 'account',
601
- 'delete_account',
602
- __fs('delete', $slug),
603
- array('plugin_id' => $addon_id),
604
- false
605
- );
606
- }
607
- ?>
608
- </td>
609
- <?php endif ?>
610
- </tr>
611
- <?php $odd = ! $odd;
612
- endforeach ?>
613
- </tbody>
614
- </table>
615
- </div>
616
- </div>
617
- <?php endif ?>
618
-
619
- <?php $fs->do_action('after_account_details') ?>
620
- </div>
621
- </div>
622
- </div>
623
- </div>
624
- </div>
625
- <?php fs_require_template('powered-by.php') ?>
 
 
 
 
 
 
 
 
10
  exit;
11
  }
12
 
13
+ /**
14
+ * @var array $VARS
15
+ */
16
  $slug = $VARS['slug'];
17
  /**
18
  * @var Freemius $fs
33
  $plan = $fs->get_plan();
34
  $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() );
35
  $is_paid_trial = $fs->is_paid_trial();
36
+ $show_upgrade = ( $fs->has_paid_plan() && ! $is_paying && ! $is_paid_trial );
 
37
 
38
+ if ( $show_upgrade ) {
39
+ $fs->_require_license_activation_dialog();
40
+ }
41
+ ?>
42
+ <div class="wrap">
43
+ <h2 class="nav-tab-wrapper">
44
+ <a href="<?php echo $fs->get_account_url() ?>"
45
+ class="nav-tab nav-tab-active"><?php _efs( 'account', $slug ) ?></a>
46
+ <?php if ( $fs->has_addons() ) : ?>
47
+ <a href="<?php echo $fs->_get_admin_page_url( 'addons' ) ?>"
48
+ class="nav-tab"><?php _efs( 'add-ons', $slug ) ?></a>
49
  <?php endif ?>
50
+ <?php if ( $show_upgrade ) : ?>
51
+ <a href="<?php echo $fs->get_upgrade_url() ?>" class="nav-tab"><?php _efs( 'upgrade', $slug ) ?></a>
52
+ <?php if ( $fs->apply_filters( 'show_trial', true ) && ! $fs->is_trial_utilized() && $fs->has_trial_plan() ) : ?>
53
+ <a href="<?php echo $fs->get_trial_url() ?>" class="nav-tab"><?php _efs( 'free-trial', $slug ) ?></a>
54
+ <?php endif ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  <?php endif ?>
56
+ <?php if ( ! $plan->is_free() ) : ?>
57
+ <a href="<?php echo $fs->get_account_tab_url( 'billing' ) ?>"
58
+ class="nav-tab"><?php _efs( 'billing', $slug ) ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  <?php endif ?>
60
+ </h2>
61
+
62
+ <div id="poststuff">
63
+ <div id="fs_account">
64
+ <div class="has-sidebar has-right-sidebar">
65
+ <div class="has-sidebar-content">
66
+ <div class="postbox">
67
+ <h3><?php _efs( 'account-details', $slug ) ?></h3>
68
+
69
+ <div class="fs-header-actions">
70
+ <ul>
71
+ <li>
72
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
73
+ <input type="hidden" name="fs_action" value="delete_account">
74
+ <?php wp_nonce_field( 'delete_account' ) ?>
75
+ <a href="#" onclick="if (confirm('<?php
76
+ if ( $is_active_subscription ) {
77
+ echo esc_attr( sprintf( __fs( 'delete-account-x-confirm', $slug ), $plan->title ) );
78
+ } else {
79
+ _efs( 'delete-account-confirm', $slug );
80
+ }
81
+ ?>')) this.parentNode.submit(); return false;"><i
82
+ class="dashicons dashicons-no"></i> <?php _efs( 'delete-account', $slug ) ?></a>
83
+ </form>
84
+ </li>
85
+ <?php if ( $is_paying ) : ?>
86
+ <li>
87
+ &nbsp;•&nbsp;
88
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
89
+ <input type="hidden" name="fs_action" value="deactivate_license">
90
+ <?php wp_nonce_field( 'deactivate_license' ) ?>
91
+ <a href="#"
92
+ onclick="if (confirm('<?php _efs( 'deactivate-license-confirm', $slug ) ?>')) this.parentNode.submit(); return false;"><i
93
+ class="dashicons dashicons-admin-network"></i> <?php _efs( 'deactivate-license', $slug ) ?>
94
+ </a>
95
+ </form>
96
+ </li>
97
+ <?php if ( ! $license->is_lifetime() &&
98
+ $is_active_subscription
99
+ ) : ?>
100
+ <li>
101
+ &nbsp;•&nbsp;
102
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
103
+ <input type="hidden" name="fs_action" value="downgrade_account">
104
+ <?php wp_nonce_field( 'downgrade_account' ) ?>
105
+ <a href="#"
106
+ onclick="if (confirm('<?php printf( __fs( 'downgrade-x-confirm', $slug ), $plan->title, human_time_diff( time(), strtotime( $license->expiration ) ) ) ?> <?php if ( ! $license->is_block_features ) {
107
+ printf( __fs( 'after-downgrade-non-blocking', $slug ), $plan->title );
108
+ } else {
109
+ printf( __fs( 'after-downgrade-blocking', $slug ), $plan->title );
110
+ }?> <?php _efs( 'proceed-confirmation', $slug ) ?>')) this.parentNode.submit(); return false;"><i
111
+ class="dashicons dashicons-download"></i> <?php _efs( 'downgrade', $slug ) ?></a>
112
+ </form>
113
+ </li>
114
+ <?php endif ?>
115
+ <li>
116
+ &nbsp;•&nbsp;
117
+ <a href="<?php echo $fs->get_upgrade_url() ?>"><i
118
+ class="dashicons dashicons-grid-view"></i> <?php _efs( 'change-plan', $slug ) ?></a>
119
+ </li>
120
+ <?php elseif ( $is_paid_trial ) : ?>
121
+ <li>
122
+ &nbsp;•&nbsp;
123
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
124
+ <input type="hidden" name="fs_action" value="cancel_trial">
125
+ <?php wp_nonce_field( 'cancel_trial' ) ?>
126
+ <a href="#"
127
+ onclick="if (confirm('<?php _efs( 'cancel-trial-confirm' ) ?>')) this.parentNode.submit(); return false;"><i
128
+ class="dashicons dashicons-download"></i> <?php _efs( 'cancel-trial', $slug ) ?></a>
129
+ </form>
130
+ </li>
131
+ <?php endif ?>
132
+ <li>
133
+ &nbsp;•&nbsp;
134
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
135
+ <input type="hidden" name="fs_action" value="<?php echo $slug ?>_sync_license">
136
+ <?php wp_nonce_field( $slug . '_sync_license' ) ?>
137
+ <a href="#" onclick="this.parentNode.submit(); return false;"><i
138
+ class="dashicons dashicons-image-rotate"></i> <?php _efs( 'sync', $slug ) ?></a>
139
+ </form>
140
+ </li>
141
+
142
+ </ul>
143
+ </div>
144
+ <div class="inside">
145
  <table id="fs_account_details" cellspacing="0" class="fs-key-value-table">
146
+ <?php
147
+ $profile = array();
148
+ $profile[] = array(
149
+ 'id' => 'user_name',
150
+ 'title' => __fs( 'name', $slug ),
151
  'value' => $name
152
+ );
153
+ // if (isset($user->email) && false !== strpos($user->email, '@'))
154
+ $profile[] = array(
155
+ 'id' => 'email',
156
+ 'title' => __fs( 'email', $slug ),
157
  'value' => $user->email
158
+ );
 
 
 
 
 
 
 
159
 
160
+ if ( is_numeric( $user->id ) ) {
161
  $profile[] = array(
162
+ 'id' => 'user_id',
163
+ 'title' => __fs( 'user-id', $slug ),
164
+ 'value' => $user->id
 
 
165
  );
166
+ }
167
 
168
+ $profile[] = array(
169
+ 'id' => 'site_id',
170
+ 'title' => __fs( 'site-id', $slug ),
171
+ 'value' => is_string( $site->id ) ?
172
+ $site->id :
173
+ __fs( 'no-id', $slug )
174
+ );
175
+
176
+ $profile[] = array(
177
+ 'id' => 'site_public_key',
178
+ 'title' => __fs( 'public-key', $slug ),
179
  'value' => $site->public_key
180
+ );
181
 
182
+ $profile[] = array(
183
+ 'id' => 'site_secret_key',
184
+ 'title' => __fs( 'secret-key', $slug ),
185
+ 'value' => ( ( is_string( $site->secret_key ) ) ?
186
+ $site->secret_key :
187
+ __fs( 'no-secret', $slug )
188
  )
189
+ );
190
 
191
+ $profile[] = array(
192
+ 'id' => 'version',
193
+ 'title' => __fs( 'version', $slug ),
194
+ 'value' => $fs->get_plugin_version()
195
+ );
196
 
197
+ if ( $fs->has_paid_plan() ) {
198
+ if ( $fs->is_trial() ) {
199
+ $trial_plan = $fs->get_trial_plan();
200
+
201
+ $profile[] = array(
202
+ 'id' => 'plan',
203
+ 'title' => __fs( 'plan', $slug ),
204
+ 'value' => ( is_string( $trial_plan->name ) ?
205
+ strtoupper( $trial_plan->title ) :
206
+ __fs( 'trial', $slug ) )
207
+ );
208
  } else {
209
+ $profile[] = array(
210
+ 'id' => 'plan',
211
+ 'title' => __fs( 'plan', $slug ),
212
+ 'value' => is_string( $site->plan->name ) ?
213
+ strtoupper( $site->plan->title ) :
214
+ strtoupper( __fs( 'free', $slug ) )
215
+ );
 
 
216
 
217
+ if ( is_object( $license ) ) {
218
+ $profile[] = array(
219
+ 'id' => 'license_key',
220
+ 'title' => __fs( 'License Key', $slug ),
221
+ 'value' => $license->secret_key,
222
+ );
223
+ }
 
 
 
 
 
 
224
  }
225
+ }
226
+ ?>
227
+ <?php $odd = true;
228
+ foreach ( $profile as $p ) : ?>
229
+ <?php
230
+ if ( 'plan' === $p['id'] && ! $fs->has_paid_plan() ) {
231
+ // If plugin don't have any paid plans, there's no reason
232
+ // to show current plan.
233
+ continue;
234
+ }
235
+ ?>
236
+ <tr class="fs-field-<?php echo $p['id'] ?><?php if ( $odd ) : ?> alternate<?php endif ?>">
237
+ <td>
238
+ <nobr><?php echo $p['title'] ?>:</nobr>
239
+ </td>
240
+ <td<?php if ( 'plan' === $p['id'] ) { echo ' colspan="2"'; }?>>
241
+ <?php if ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
242
+ <code><?php echo htmlspecialchars( substr( $p['value'], 0, 6 ) ) . str_pad( '', 23 * 6, '&bull;' ) . htmlspecialchars( substr( $p['value'], - 3 ) ) ?></code>
243
+ <input type="text" value="<?php echo htmlspecialchars( $p['value'] ) ?>" style="display: none"
244
+ readonly/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  <?php else : ?>
246
+ <code><?php echo htmlspecialchars( $p['value'] ) ?></code>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
247
  <?php endif ?>
248
+ <?php if ( 'email' === $p['id'] && ! $user->is_verified() ) : ?>
249
+ <label class="fs-tag fs-warn"><?php _efs( 'not-verified', $slug ) ?></label>
 
 
 
 
 
 
 
 
250
  <?php endif ?>
251
+ <?php if ( 'plan' === $p['id'] ) : ?>
252
+ <?php if ( $fs->is_trial() ) : ?>
253
+ <label class="fs-tag fs-success"><?php _efs( 'trial', $slug ) ?></label>
254
+ <?php endif ?>
255
+ <?php if ( is_object( $license ) && ! $license->is_lifetime() ) : ?>
256
+ <?php if ( ! $is_active_subscription && ! $license->is_first_payment_pending() ) : ?>
257
+ <label
258
+ class="fs-tag fs-warn"><?php printf( __fs( 'expires-in', $slug ), human_time_diff( time(), strtotime( $license->expiration ) ) ) ?></label>
259
+ <?php elseif ( $is_active_subscription && ! $subscription->is_first_payment_pending() ) : ?>
260
+ <label
261
+ class="fs-tag fs-success"><?php printf( __fs( 'renews-in', $slug ), human_time_diff( time(), strtotime( $subscription->next_payment ) ) ) ?></label>
262
+ <?php endif ?>
263
+ <?php elseif ( $fs->is_trial() ) : ?>
264
+ <label
265
+ class="fs-tag fs-warn"><?php printf( __fs( 'expires-in', $slug ), human_time_diff( time(), strtotime( $site->trial_ends ) ) ) ?></label>
266
+ <?php endif ?>
267
+ <div class="button-group">
268
+ <?php $available_license = $fs->is_free_plan() ? $fs->_get_available_premium_license() : false ?>
269
+ <?php if ( false !== $available_license && ( $available_license->left() > 0 || ( $site->is_localhost() && $available_license->is_free_localhost ) ) ) : ?>
270
+ <?php $premium_plan = $fs->_get_plan_by_id( $available_license->plan_id ) ?>
271
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>"
272
+ method="POST">
273
+ <input type="hidden" name="fs_action" value="activate_license">
274
+ <input type="hidden" name="license_id" value="<?php echo $available_license->id ?>">
275
+ <?php wp_nonce_field( 'activate_license' ) ?>
276
+ <input type="submit" class="button button-primary"
277
+ value="<?php printf(
278
+ __fs( 'activate-x-plan', $slug ) . '%s',
279
+ $premium_plan->title,
280
+ ( $site->is_localhost() && $available_license->is_free_localhost ) ?
281
+ ' [' . __fs( 'localhost', $slug ) . ']' :
282
+ ( $available_license->is_single_site() ?
283
+ '' :
284
+ ' [' . ( 1 < $available_license->left() ?
285
+ sprintf( __fs( 'x-left', $slug ), $available_license->left() ) :
286
+ strtolower( __fs( 'last-license', $slug ) ) ) . ']'
287
+ )
288
+ ) ?> ">
289
+ </form>
290
+ <?php else : ?>
291
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>"
292
+ method="POST" class="button-group">
293
+ <?php if ($show_upgrade) : ?>
294
+ <a class="button activate-license-trigger <?php echo $slug ?>" href="#"><?php _efs( 'activate-license', $slug ) ?></a>
295
+ <?php endif ?>
296
+ <input type="submit" class="button"
297
+ value="<?php _efs( 'sync-license', $slug ) ?>">
298
+ <input type="hidden" name="fs_action"
299
+ value="<?php echo $slug ?>_sync_license">
300
+ <?php wp_nonce_field( $slug . '_sync_license' ) ?>
301
+ <a href="<?php echo $fs->get_upgrade_url() ?>"
302
+ class="button<?php if ( $show_upgrade ) {
303
+ echo ' button-primary';
304
+ } ?> button-upgrade"><i
305
+ class="dashicons dashicons-cart"></i> <?php ( $show_upgrade ) ?
306
+ _efs( 'upgrade', $slug ) :
307
+ _efs( 'change-plan', $slug )
308
+ ?></a>
309
+ </form>
310
+ <?php endif ?>
311
+ </div>
312
+ <?php elseif ( 'version' === $p['id'] && $fs->has_paid_plan() ) : ?>
313
+ <?php if ( $fs->is_premium() ) : ?>
314
+ <label
315
+ class="fs-tag fs-<?php echo $fs->can_use_premium_code() ? 'success' : 'warn' ?>"><?php _efs( 'premium-version' ) ?></label>
316
+ <?php elseif ( $fs->can_use_premium_code() ) : ?>
317
+ <label class="fs-tag fs-warn"><?php _efs( 'free-version' ) ?></label>
318
+ <?php endif ?>
319
+ <?php endif ?>
320
+ </td>
321
+ <?php if ( 'plan' !== $p['id'] ) : ?>
322
+ <td class="fs-right">
323
+ <?php if ( 'email' === $p['id'] && ! $user->is_verified() ) : ?>
324
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST">
325
+ <input type="hidden" name="fs_action" value="verify_email">
326
+ <?php wp_nonce_field( 'verify_email' ) ?>
327
+ <input type="submit" class="button button-small"
328
+ value="<?php _efs( 'verify-email', $slug ) ?>">
329
+ </form>
330
+ <?php endif ?>
331
+ <?php if ( 'version' === $p['id'] ) : ?>
332
+ <div class="button-group">
333
+ <?php if ( $is_paying || $fs->is_trial() ) : ?>
334
+ <?php if ( ! $fs->is_allowed_to_install() ) : ?>
335
+ <a target="_blank" class="button button-primary"
336
+ href="<?php echo $fs->_get_latest_download_local_url() ?>"><?php echo sprintf( __fs( 'download-x-version', $slug ), ( $fs->is_trial() ? $trial_plan->title : $site->plan->title ) ) . ( is_object( $update ) ? ' [' . $update->version . ']' : '' ) ?></a>
337
+ <?php elseif ( is_object( $update ) ) : ?>
338
+ <a class="button button-primary"
339
+ href="<?php echo wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' . $fs->get_plugin_basename() ), 'upgrade-plugin_' . $fs->get_plugin_basename() ) ?>"><?php echo __fs( 'install-update-now', $slug ) . ' [' . $update->version . ']' ?></a>
340
+ <?php endif ?>
341
+ <?php endif; ?>
342
+ </div>
343
+ <?php
344
+ elseif ( in_array( $p['id'], array( 'license_key', 'site_secret_key' ) ) ) : ?>
345
+ <button class="button button-small"><?php _efs( 'show', $slug ) ?></button>
346
+ <?php
347
  elseif (/*in_array($p['id'], array('site_secret_key', 'site_id', 'site_public_key')) ||*/
348
+ ( is_string( $user->secret_key ) && in_array( $p['id'], array(
349
+ 'email',
350
+ 'user_name'
351
+ ) ) )
352
  ) : ?>
353
+ <form action="<?php echo $fs->_get_admin_page_url( 'account' ) ?>" method="POST"
354
+ onsubmit="var val = prompt('<?php printf( __fs( 'what-is-your-x', $slug ), $p['title'] ) ?>', '<?php echo $p['value'] ?>'); if (null == val || '' === val) return false; jQuery('input[name=fs_<?php echo $p['id'] ?>_<?php echo $slug ?>]').val(val); return true;">
355
+ <input type="hidden" name="fs_action" value="update_<?php echo $p['id'] ?>">
356
+ <input type="hidden" name="fs_<?php echo $p['id'] ?>_<?php echo $slug ?>"
357
+ value="">
358
+ <?php wp_nonce_field( 'update_' . $p['id'] ) ?>
359
+ <input type="submit" class="button button-small"
360
+ value="<?php _efs( 'edit', $slug ) ?>">
361
+ </form>
362
+ <?php endif ?>
363
+ </td>
364
  <?php endif ?>
365
+ </tr>
366
+ <?php $odd = ! $odd;
367
+ endforeach ?>
 
368
  </table>
369
+ </div>
370
+ </div>
371
+ <script type="text/javascript">
372
+ (function ($) {
373
+ $('.fs-field-license_key button, .fs-field-site_secret_key button').click(function () {
374
+ var
375
+ $this = $(this),
376
+ $parent = $this.closest('tr'),
377
+ $input = $parent.find('input');
378
 
379
+ $parent.find('code').toggle();
380
+ $input.toggle();
 
 
 
381
 
382
+ if ($input.is(':visible')) {
383
+ $this.html('<?php _efs( 'hide', $slug ) ?>');
384
+ setTimeout(function () {
385
+ $input.select().focus();
386
+ }, 100);
387
+ }
388
+ else {
389
+ $this.html('<?php _efs( 'show', $slug ) ?>');
390
+ }
391
+ });
392
+ }(jQuery));
393
+
394
+ </script>
395
+
396
+ <?php
397
+ $account_addons = $fs->get_account_addons();
398
+ if ( ! is_array( $account_addons ) ) {
399
+ $account_addons = array();
400
+ }
401
+
402
+ $installed_addons = $fs->get_installed_addons();
403
+ $installed_addons_ids = array();
404
+ foreach ( $installed_addons as $fs_addon ) {
405
+ $installed_addons_ids[] = $fs_addon->get_id();
406
+ }
407
+
408
+ $addons_to_show = array_unique( array_merge( $installed_addons_ids, $account_addons ) );
409
+ ?>
410
+ <?php if ( 0 < count( $addons_to_show ) ) : ?>
411
+ <!-- Add-Ons -->
412
+ <div class="postbox">
413
+ <div class="">
414
+ <!-- <div class="inside">-->
415
+ <table id="fs_addons" class="widefat">
416
+ <thead>
417
+ <tr>
418
+ <th><h3><?php _efs( 'add-ons', $slug ) ?></h3></th>
419
+ <th><?php _efs( 'id', $slug ) ?></th>
420
+ <th><?php _efs( 'version', $slug ) ?></th>
421
+ <th><?php _efs( 'plan', $slug ) ?></th>
422
+ <th><?php _efs( 'license', $slug ) ?></th>
423
+ <th></th>
424
+ <?php if ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE ) : ?>
425
+ <th></th>
426
+ <?php endif ?>
427
+ </tr>
428
+ </thead>
429
+ <tbody>
430
+ <?php $odd = true;
431
+ foreach ( $addons_to_show as $addon_id ) : ?>
432
  <?php
433
+ $addon = $fs->get_addon( $addon_id );
434
+ $is_addon_activated = $fs->is_addon_activated( $addon->slug );
435
+ $is_addon_connected = $fs->is_addon_connected( $addon->slug );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
 
437
+ $fs_addon = $is_addon_connected ? freemius( $addon->slug ) : false;
438
+ if ( is_object( $fs_addon ) ) {
439
+ $is_paying = $fs_addon->is_paying();
440
+ $user = $fs_addon->get_user();
441
+ $site = $fs_addon->get_site();
442
+ $license = $fs_addon->_get_license();
443
+ $subscription = $fs_addon->_get_subscription();
444
+ $plan = $fs_addon->get_plan();
445
+ $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() );
446
+ $is_paid_trial = $fs_addon->is_paid_trial();
447
+ $show_upgrade = ( ! $is_paying && ! $is_paid_trial && ! $fs_addon->_has_premium_license() );
448
+ $is_current_license_expired = is_object( $license ) && $license->is_expired();
449
+ }
450
 
451
+ // var_dump( $is_paid_trial, $license, $site, $subscription );
452
+
453
+ ?>
454
+ <tr<?php if ( $odd ) {
455
+ echo ' class="alternate"';
456
+ } ?>>
457
+ <td>
458
+ <!-- Title -->
459
+ <?php echo $addon->title ?>
460
+ </td>
461
+ <?php if ( $is_addon_connected ) : ?>
462
  <?php // Add-on Installed ?>
463
  <?php $addon_site = $fs_addon->get_site(); ?>
464
+ <td>
465
+ <!-- ID -->
466
+ <?php echo $addon_site->id ?>
467
+ </td>
468
+ <td>
469
+ <!-- Version -->
470
+ <?php echo $fs_addon->get_plugin_version() ?>
471
+ </td>
472
+ <td>
473
+ <!-- Plan Title -->
474
+ <?php echo is_string( $addon_site->plan->name ) ? strtoupper( $addon_site->plan->title ) : 'FREE' ?>
475
+ </td>
476
+ <td>
477
+ <!-- Expiration -->
478
+ <?php
479
+ $tags = array();
480
 
481
+ if ( $fs_addon->is_trial() ) {
482
+ $tags[] = array( 'label' => __fs( 'trial', $slug ), 'type' => 'success' );
483
 
484
+ $tags[] = array(
485
+ 'label' => sprintf( __fs( ( $is_paid_trial ? 'renews-in' : 'expires-in' ), $slug ), human_time_diff( time(), strtotime( $site->trial_ends ) ) ),
486
+ 'type' => ( $is_paid_trial ? 'success' : 'warn' )
487
+ );
488
+ } else {
489
+ if ( is_object( $license ) ) {
490
+ if ( $license->is_cancelled ) {
491
+ $tags[] = array(
492
+ 'label' => __fs( 'cancelled', $slug ),
493
+ 'type' => 'error'
494
+ );
495
+ } else if ( $license->is_expired() ) {
496
+ $tags[] = array(
497
+ 'label' => __fs( 'expired', $slug ),
498
+ 'type' => 'error'
499
+ );
500
+ } else if ( $license->is_lifetime() ) {
501
+ $tags[] = array(
502
+ 'label' => __fs( 'no-expiration', $slug ),
503
+ 'type' => 'success'
504
+ );
505
+ } else if ( ! $is_active_subscription && ! $license->is_first_payment_pending() ) {
506
+ $tags[] = array(
507
+ 'label' => sprintf( __fs( 'expires-in', $slug ), human_time_diff( time(), strtotime( $license->expiration ) ) ),
508
+ 'type' => 'warn'
509
+ );
510
+ } else if ( $is_active_subscription && ! $subscription->is_first_payment_pending() ) {
511
+ $tags[] = array(
512
+ 'label' => sprintf( __fs( 'renews-in', $slug ), human_time_diff( time(), strtotime( $subscription->next_payment ) ) ),
513
+ 'type' => 'success'
514
+ );
515
+ }
516
+ }
517
+ }
518
 
519
+ foreach ( $tags as $t ) {
520
+ printf( '<label class="fs-tag fs-%s">%s</label>' . "\n", $t['type'], $t['label'] );
521
+ }
522
+ ?>
523
+ </td>
524
+ <?php
525
+ $buttons = array();
526
+ if ( $is_addon_activated ) {
527
+ if ( $is_paying ) {
528
+ $buttons[] = fs_ui_get_action_button(
529
+ $slug,
530
+ 'account',
531
+ 'deactivate_license',
532
+ __fs( 'deactivate-license', $slug ),
533
+ array( 'plugin_id' => $addon_id ),
534
+ false
535
+ );
536
+ } else if ( $is_paid_trial ) {
537
+ $buttons[] = fs_ui_get_action_button(
538
+ $slug,
539
+ 'account',
540
+ 'cancel_trial',
541
+ __fs( 'cancel-trial', $slug ),
542
+ array( 'plugin_id' => $addon_id ),
543
+ false,
544
+ 'dashicons dashicons-download',
545
+ __fs( 'cancel-trial-confirm', $slug ),
546
+ 'POST'
547
+ );
548
+ } else {
549
+ $premium_license = $fs_addon->_get_available_premium_license();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
 
551
+ if ( is_object( $premium_license ) ) {
552
+ $site = $fs_addon->get_site();
 
 
 
 
 
 
 
 
553
 
554
+ $buttons[] = fs_ui_get_action_button(
555
+ $slug,
556
+ 'account',
557
+ 'activate_license',
558
+ sprintf( __fs( 'activate-x-plan', $slug ), $fs_addon->get_plan_title(), ( $site->is_localhost() && $premium_license->is_free_localhost ) ? '[localhost]' : ( 1 < $premium_license->left() ? $premium_license->left() . ' left' : '' ) ),
559
+ array(
560
+ 'plugin_id' => $addon_id,
561
+ 'license_id' => $premium_license->id,
562
+ )
563
+ );
564
+ }
565
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
 
567
+ if ( 0 == count( $buttons ) ) {
568
+ // Add sync license only if non of the other CTAs are visible.
569
+ $buttons[] = fs_ui_get_action_button(
570
+ $slug,
571
+ 'account',
572
+ $slug . '_sync_license',
573
+ __fs( 'sync-license', $slug ),
574
+ array( 'plugin_id' => $addon_id ),
575
+ false
576
+ );
577
 
578
+ }
579
+ } else if ( ! $show_upgrade ) {
580
+ if ( $fs->is_addon_installed( $addon->slug ) ) {
581
+ $addon_file = $fs->get_addon_basename( $addon->slug );
582
+ $buttons[] = sprintf(
583
+ '<a class="button button-primary" href="%s" title="%s" class="edit">%s</a>',
584
+ wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $addon_file, 'activate-plugin_' . $addon_file ),
585
+ esc_attr( __fs( 'activate-this-addon', $slug ) ),
586
+ __fs( 'activate', $slug )
587
+ );
588
+ } else {
589
+ if ( $fs->is_allowed_to_install() ) {
590
+ $buttons[] = sprintf(
591
+ '<a class="button button-primary" href="%s" class="edit">%s</a>',
592
+ wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $addon->slug ), 'install-plugin_' . $addon->slug ),
593
+ __fs( 'install-now', $slug )
594
+ );
595
+ } else {
596
+ $buttons[] = sprintf(
597
+ '<a target="_blank" class="button button-primary" href="%s" class="edit">%s</a>',
598
+ $fs->_get_latest_download_local_url( $addon_id ),
599
+ __fs( 'download-latest', $slug )
600
+ );
601
+ }
602
+ }
603
+ }
604
 
605
+ if ( $show_upgrade ) {
606
+ $buttons[] = sprintf( '<a href="%s" class="thickbox button button-primary" aria-label="%s" data-title="%s"><i class="dashicons dashicons-cart"></i> %s</a>',
607
+ esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&parent_plugin_id=' . $fs->get_id() . '&plugin=' . $addon->slug .
608
+ '&TB_iframe=true&width=600&height=550' ) ),
609
+ esc_attr( sprintf( __fs( 'more-information-about-x', $slug ), $addon->title ) ),
610
+ esc_attr( $addon->title ),
611
+ __fs( ( $fs_addon->has_free_plan() ? 'upgrade' : 'purchase' ), $slug )
612
+ );
613
+ }
614
+
615
+ $buttons_count = count( $buttons );
616
+ ?>
617
+
618
+ <td>
619
+ <!-- Actions -->
620
+ <?php if ($buttons_count > 1) : ?>
621
+ <div class="button-group">
622
+ <?php endif ?>
623
+ <?php foreach ( $buttons as $button ) : ?>
624
  <?php echo $button ?>
625
  <?php endforeach ?>
626
  <?php if ($buttons_count > 1) : ?>
627
+ </div>
628
+ <?php endif ?>
629
+ </td>
630
+ <?php else : ?>
631
  <?php // Add-on NOT Installed or was never connected.
632
+ ?>
633
+ <td colspan="4">
634
+ <!-- Action -->
635
+ <?php if ( $fs->is_addon_installed( $addon->slug ) ) : ?>
636
+ <?php $addon_file = $fs->get_addon_basename( $addon->slug ) ?>
637
+ <a class="button button-primary"
638
+ href="<?php echo wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $addon_file, 'activate-plugin_' . $addon_file ) ?>"
639
+ title="<?php esc_attr( __fs( 'activate-this-addon', $slug ) ) ?>"
640
+ class="edit"><?php _efs( 'activate', $slug ) ?></a>
641
+ <?php else : ?>
642
+ <?php if ( $fs->is_allowed_to_install() ) : ?>
643
+ <a class="button button-primary"
644
+ href="<?php echo wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=' . $addon->slug ), 'install-plugin_' . $addon->slug ) ?>"><?php _efs( 'install-now', $slug ) ?></a>
645
+ <?php else : ?>
646
+ <a target="_blank" class="button button-primary"
647
+ href="<?php echo $fs->_get_latest_download_local_url( $addon_id ) ?>"><?php _efs( 'download-latest', $slug ) ?></a>
648
+ <?php endif ?>
649
  <?php endif ?>
650
+ </td>
651
+ <?php endif ?>
652
+ <?php if ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE ) : ?>
653
+ <td>
654
+ <!-- Optional Delete Action -->
655
+ <?php
656
+ if ( $is_addon_activated ) {
657
+ fs_ui_action_button(
658
+ $slug, 'account',
659
+ 'delete_account',
660
+ __fs( 'delete', $slug ),
661
+ array( 'plugin_id' => $addon_id ),
662
+ false
663
+ );
664
+ }
665
+ ?>
666
+ </td>
667
+ <?php endif ?>
668
+ </tr>
669
+ <?php $odd = ! $odd;
670
+ endforeach ?>
671
+ </tbody>
672
+ </table>
673
+ </div>
674
+ </div>
675
+ <?php endif ?>
676
+
677
+ <?php $fs->do_action( 'after_account_details' ) ?>
678
+ </div>
679
+ </div>
680
+ </div>
681
+ </div>
682
+ </div>
683
+ <?php
684
+ $params = array(
685
+ 'page' => 'account',
686
+ 'module_id' => $fs->get_id(),
687
+ 'module_slug' => $slug,
688
+ 'module_version' => $fs->get_plugin_version(),
689
+ );
690
+ fs_require_template( 'powered-by.php', $params );
691
+ ?>
includes/libs/freemius/templates/add-ons.php CHANGED
@@ -10,6 +10,9 @@
10
  exit;
11
  }
12
 
 
 
 
13
  $slug = $VARS['slug'];
14
  /**
15
  * @var Freemius
@@ -130,15 +133,22 @@
130
  <?php else : ?>
131
 
132
 
133
- $('.fs-card.fs-addon').mouseover(function(){
134
- $(this).find('.fs-cta .button').addClass('button-primary');
135
- });
136
-
137
- $('.fs-card.fs-addon').mouseout(function(){
138
- $(this).find('.fs-cta .button').removeClass('button-primary');
139
- });
140
 
141
  <?php endif ?>
142
  })(jQuery);
143
  </script>
144
- <?php fs_require_template( 'powered-by.php' ) ?>
 
 
 
 
 
 
 
 
10
  exit;
11
  }
12
 
13
+ /**
14
+ * @var array $VARS
15
+ */
16
  $slug = $VARS['slug'];
17
  /**
18
  * @var Freemius
133
  <?php else : ?>
134
 
135
 
136
+ $('.fs-card.fs-addon')
137
+ .mouseover(function () {
138
+ $(this).find('.fs-cta .button').addClass('button-primary');
139
+ }).mouseout(function () {
140
+ $(this).find('.fs-cta .button').removeClass('button-primary');
141
+ });
 
142
 
143
  <?php endif ?>
144
  })(jQuery);
145
  </script>
146
+ <?php
147
+ $params = array(
148
+ 'page' => 'addons',
149
+ 'module_id' => $fs->get_id(),
150
+ 'module_slug' => $slug,
151
+ 'module_version' => $fs->get_plugin_version(),
152
+ );
153
+ fs_require_template( 'powered-by.php', $params );
154
+ ?>
includes/libs/freemius/templates/all-admin-notice.php CHANGED
@@ -9,6 +9,10 @@
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  exit;
11
  }
 
 
 
 
12
  ?>
13
  <div class="<?php
14
  switch ($VARS['type']) {
9
  if ( ! defined( 'ABSPATH' ) ) {
10
  exit;
11
  }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ */
16
  ?>
17
  <div class="<?php
18
  switch ($VARS['type']) {
includes/libs/freemius/templates/billing.php ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6
+ * @since 1.2.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ */
16
+ $slug = $VARS['slug'];
17
+ /**
18
+ * @var Freemius $fs
19
+ */
20
+ $fs = freemius( $slug );
21
+
22
+ /**
23
+ * @var FS_Plugin_Tag $update
24
+ */
25
+ $update = $fs->get_update( false, false );
26
+
27
+ $is_paying = $fs->is_paying();
28
+ $user = $fs->get_user();
29
+ $site = $fs->get_site();
30
+ $name = $user->get_name();
31
+ $license = $fs->_get_license();
32
+ $subscription = $fs->_get_subscription();
33
+ $plan = $fs->get_plan();
34
+ $is_active_subscription = ( is_object( $subscription ) && $subscription->is_active() );
35
+ $is_paid_trial = $fs->is_paid_trial();
36
+ $show_upgrade = ( ! $is_paying && ! $is_paid_trial );
37
+ ?>
38
+
39
+ <div id="fs_account" class="wrap">
40
+ <h2 class="nav-tab-wrapper">
41
+ <a href="<?php echo $fs->get_account_url() ?>" class="nav-tab"><?php _efs( 'account', $slug ) ?></a>
42
+ <?php if ( $fs->has_addons() ) : ?>
43
+ <a href="<?php echo $fs->_get_admin_page_url( 'addons' ) ?>"
44
+ class="nav-tab"><?php _efs( 'add-ons', $slug ) ?></a>
45
+ <?php endif ?>
46
+ <?php if ( $fs->is_not_paying() && $fs->has_paid_plan() ) : ?>
47
+ <a href="<?php echo $fs->get_upgrade_url() ?>" class="nav-tab"><?php _efs( 'upgrade', $slug ) ?></a>
48
+ <?php if ( $fs->apply_filters( 'show_trial', true ) && ! $fs->is_trial_utilized() && $fs->has_trial_plan() ) : ?>
49
+ <a href="<?php echo $fs->get_trial_url() ?>"
50
+ class="nav-tab"><?php _efs( 'free-trial', $slug ) ?></a>
51
+ <?php endif ?>
52
+ <?php endif ?>
53
+ <?php if ( ! $plan->is_free() ) : ?>
54
+ <a href="<?php echo $fs->get_account_tab_url( 'billing' ) ?>"
55
+ class="nav-tab nav-tab-active"><?php _efs( 'billing', $slug ) ?></a>
56
+ <?php endif ?>
57
+ </h2>
58
+
59
+ <div id="poststuff">
60
+ <div>
61
+ <div class="has-sidebar has-right-sidebar">
62
+ <div class="has-sidebar-content">
63
+ <div class="postbox">
64
+ <h3><?php _efs( 'payments', $slug ) ?></h3>
65
+
66
+ <?php
67
+ $payments = $fs->_fetch_payments();
68
+ ?>
69
+
70
+ <div class="inside">
71
+ <table class="widefat">
72
+ <thead>
73
+ <tr>
74
+ <th><?php _efs( 'id', $slug ) ?></th>
75
+ <th><?php _efs( 'date', $slug ) ?></th>
76
+ <!-- <th>--><?php //_efs( 'transaction' ) ?><!--</th>-->
77
+ <th><?php _efs( 'amount', $slug ) ?></th>
78
+ <th><?php _efs( 'invoice', $slug ) ?></th>
79
+ </tr>
80
+ </thead>
81
+ <tbody>
82
+ <?php $odd = true ?>
83
+ <?php foreach ( $payments as $payment ) : ?>
84
+ <tr<?php echo $odd ? ' class="alternate"' : '' ?>>
85
+ <td><?php echo $payment->id ?></td>
86
+ <td><?php echo date( 'M j, Y', strtotime( $payment->created ) ) ?></td>
87
+ <td>$<?php echo $payment->gross ?></td>
88
+ <td><a href="<?php echo $fs->_get_invoice_api_url($payment->id) ?>" class="button button-small"
89
+ target="_blank"><?php _efs( 'invoice', $slug ) ?></a></td>
90
+ </tr>
91
+ <?php $odd = ! $odd; endforeach ?>
92
+ </tbody>
93
+ </table>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ </div>
99
+ </div>
100
+ </div>
101
+ <?php
102
+ $params = array(
103
+ 'page' => 'account',
104
+ 'module_id' => $fs->get_id(),
105
+ 'module_slug' => $slug,
106
+ 'module_version' => $fs->get_plugin_version(),
107
+ );
108
+ fs_require_template( 'powered-by.php', $params );
109
+ ?>
includes/libs/freemius/templates/checkout.php CHANGED
@@ -16,6 +16,9 @@
16
  fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
17
  fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
18
 
 
 
 
19
  $slug = $VARS['slug'];
20
  $fs = freemius( $slug );
21
 
@@ -95,27 +98,18 @@
95
  }
96
  }
97
 
98
- $return_url = fs_nonce_url( $fs->_get_admin_page_url(
99
- 'account',
100
- array(
101
- 'fs_action' => $slug . '_sync_license',
102
- 'plugin_id' => isset( $_GET['plugin_id'] ) ? $_GET['plugin_id'] : $fs->get_id()
103
- )
104
- ), $slug . '_sync_license' );
105
 
106
  $query_params = array_merge( $context_params, $_GET, array(
107
  // Current plugin version.
108
  'plugin_version' => $fs->get_plugin_version(),
 
109
  'return_url' => $return_url,
110
  // Admin CSS URL for style/design competability.
111
  // 'wp_admin_css' => get_bloginfo('wpurl') . "/wp-admin/load-styles.php?c=1&load=buttons,wp-admin,dashicons",
112
  ) );
113
  ?>
114
- <div class="fs-secure-notice">
115
- <i class="dashicons dashicons-lock"></i>
116
- <span><b>Secure HTTPS Checkout</b> - PCI compliant, running via iframe from external domain</span>
117
- </div>
118
- <div id="fs_contact" class="wrap" style="margin: 40px 0 -65px -20px;">
119
  <div id="iframe"></div>
120
  <script type="text/javascript">
121
  // http://stackoverflow.com/questions/4583703/jquery-post-request-not-ajax
@@ -179,12 +173,14 @@
179
  iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>')
180
  .appendTo('#iframe');
181
 
182
- FS.PostMessage.init(base_url);
183
  FS.PostMessage.receiveOnce('height', function (data) {
184
  var h = data.height;
185
  if (!isNaN(h) && h > 0 && h != iframe_height) {
186
  iframe_height = h;
187
- $("#iframe iframe").height(iframe_height + 'px');
 
 
188
  }
189
  });
190
 
@@ -257,4 +253,12 @@
257
  })(jQuery);
258
  </script>
259
  </div>
260
- <?php fs_require_template( 'powered-by.php' ) ?>
 
 
 
 
 
 
 
 
16
  fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
17
  fs_enqueue_local_style( 'fs_common', '/admin/common.css' );
18
 
19
+ /**
20
+ * @var array $VARS
21
+ */
22
  $slug = $VARS['slug'];
23
  $fs = freemius( $slug );
24
 
98
  }
99
  }
100
 
101
+ $return_url = $fs->_get_sync_license_url( isset( $_GET['plugin_id'] ) ? $_GET['plugin_id'] : $fs->get_id() );
 
 
 
 
 
 
102
 
103
  $query_params = array_merge( $context_params, $_GET, array(
104
  // Current plugin version.
105
  'plugin_version' => $fs->get_plugin_version(),
106
+ 'sdk_version' => WP_FS__SDK_VERSION,
107
  'return_url' => $return_url,
108
  // Admin CSS URL for style/design competability.
109
  // 'wp_admin_css' => get_bloginfo('wpurl') . "/wp-admin/load-styles.php?c=1&load=buttons,wp-admin,dashicons",
110
  ) );
111
  ?>
112
+ <div id="fs_checkout" class="wrap" style="margin: 0 0 -65px -20px;">
 
 
 
 
113
  <div id="iframe"></div>
114
  <script type="text/javascript">
115
  // http://stackoverflow.com/questions/4583703/jquery-post-request-not-ajax
173
  iframe = $('<iframe " src="' + src + '" width="100%" height="' + iframe_height + 'px" scrolling="no" frameborder="0" style="background: transparent;"><\/iframe>')
174
  .appendTo('#iframe');
175
 
176
+ FS.PostMessage.init(base_url, [iframe[0]]);
177
  FS.PostMessage.receiveOnce('height', function (data) {
178
  var h = data.height;
179
  if (!isNaN(h) && h > 0 && h != iframe_height) {
180
  iframe_height = h;
181
+ iframe.height(iframe_height + 'px');
182
+
183
+ FS.PostMessage.postScroll(iframe[0]);
184
  }
185
  });
186
 
253
  })(jQuery);
254
  </script>
255
  </div>
256
+ <?php
257
+ $params = array(
258
+ 'page' => 'checkout',
259
+ 'module_id' => $fs->get_id(),
260
+ 'module_slug' => $slug,
261
+ 'module_version' => $fs->get_plugin_version(),
262
+ );
263
+ fs_require_template( 'powered-by.php', $params );
264
+ ?>
includes/libs/freemius/templates/connect.php CHANGED
@@ -10,6 +10,9 @@
10
  exit;
11
  }
12
 
 
 
 
13
  $slug = $VARS['slug'];
14
  $fs = freemius( $slug );
15
  $is_pending_activation = $fs->is_pending_activation();
@@ -39,7 +42,8 @@
39
  'https://freemius.com/wordpress/usage-tracking/';
40
 
41
  $freemius_site_url .= '?' . http_build_query( array(
42
- 'plugin_id' => $fs->get_id(),
 
43
  ) );
44
 
45
  $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" tabindex="1">freemius.com</a>';
@@ -48,6 +52,14 @@
48
 
49
  $require_license_key = $is_premium_only ||
50
  ( $is_freemium && $is_premium_code && fs_request_get_bool( 'require_license', true ) );
 
 
 
 
 
 
 
 
51
  ?>
52
  <div id="fs_connect"
53
  class="wrap<?php if ( ! $fs->is_enable_anonymous() || $is_pending_activation || $require_license_key ) {
@@ -129,6 +141,8 @@
129
  <input id="fs_license_key" name="fs_key" type="text" required maxlength="32"
130
  placeholder="<?php _efs( 'license-key', $slug ) ?>" tabindex="1"/>
131
  <i class="dashicons dashicons-admin-network"></i>
 
 
132
  </div>
133
  <?php endif ?>
134
  </div>
@@ -310,12 +324,14 @@
310
  * @author Vova Feldman (@svovaf)
311
  * @since 1.1.9
312
  */
313
- $licenseKeyInput.on('keyup', function () {
314
- if ('' === $(this).val()) {
315
- $primaryCta.attr('disabled', 'disabled');
316
- } else {
317
- $primaryCta.prop('disabled', false);
318
- }
 
 
319
  }).focus();
320
  }
321
 
10
  exit;
11
  }
12
 
13
+ /**
14
+ * @var array $VARS
15
+ */
16
  $slug = $VARS['slug'];
17
  $fs = freemius( $slug );
18
  $is_pending_activation = $fs->is_pending_activation();
42
  'https://freemius.com/wordpress/usage-tracking/';
43
 
44
  $freemius_site_url .= '?' . http_build_query( array(
45
+ 'id' => $fs->get_id(),
46
+ 'slug' => $slug,
47
  ) );
48
 
49
  $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" tabindex="1">freemius.com</a>';
52
 
53
  $require_license_key = $is_premium_only ||
54
  ( $is_freemium && $is_premium_code && fs_request_get_bool( 'require_license', true ) );
55
+
56
+ if ( $is_pending_activation ) {
57
+ $require_license_key = false;
58
+ }
59
+
60
+ if ( $require_license_key ) {
61
+ $fs->_require_license_activation_dialog();
62
+ }
63
  ?>
64
  <div id="fs_connect"
65
  class="wrap<?php if ( ! $fs->is_enable_anonymous() || $is_pending_activation || $require_license_key ) {
141
  <input id="fs_license_key" name="fs_key" type="text" required maxlength="32"
142
  placeholder="<?php _efs( 'license-key', $slug ) ?>" tabindex="1"/>
143
  <i class="dashicons dashicons-admin-network"></i>
144
+ <a class="show-license-resend-modal show-license-resend-modal-<?php echo $slug; ?>"
145
+ href="#"><?php _efs( 'cant-find-license-key' ); ?></a>
146
  </div>
147
  <?php endif ?>
148
  </div>
324
  * @author Vova Feldman (@svovaf)
325
  * @since 1.1.9
326
  */
327
+ $licenseKeyInput.on('keyup paste delete cut', function () {
328
+ setTimeout(function () {
329
+ if ('' === $licenseKeyInput.val()) {
330
+ $primaryCta.attr('disabled', 'disabled');
331
+ } else {
332
+ $primaryCta.prop('disabled', false);
333
+ }
334
+ }, 100);
335
  }).focus();
336
  }
337
 
includes/libs/freemius/templates/contact.php CHANGED
@@ -16,6 +16,9 @@
16
  fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
17
  fs_enqueue_local_style( 'fs_checkout', '/admin/common.css' );
18
 
 
 
 
19
  $slug = $VARS['slug'];
20
  $fs = freemius( $slug );
21
 
@@ -74,4 +77,12 @@
74
  })(jQuery);
75
  </script>
76
  </div>
77
- <?php fs_require_template( 'powered-by.php' ) ?>
 
 
 
 
 
 
 
 
16
  fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
17
  fs_enqueue_local_style( 'fs_checkout', '/admin/common.css' );
18
 
19
+ /**
20
+ * @var array $VARS
21
+ */
22
  $slug = $VARS['slug'];
23
  $fs = freemius( $slug );
24
 
77
  })(jQuery);
78
  </script>
79
  </div>
80
+ <?php
81
+ $params = array(
82
+ 'page' => 'contact',
83
+ 'module_id' => $fs->get_id(),
84
+ 'module_slug' => $slug,
85
+ 'module_version' => $fs->get_plugin_version(),
86
+ );
87
+ fs_require_template( 'powered-by.php', $params );
88
+ ?>
includes/libs/freemius/templates/debug.php CHANGED
@@ -148,6 +148,7 @@
148
  <?php endif ?>
149
  <?php
150
  /**
 
151
  * @var FS_Site[] $sites
152
  */
153
  $sites = $VARS['sites'];
@@ -239,7 +240,7 @@
239
  <tr>
240
  <td><?php echo $user->id ?></td>
241
  <td><?php echo $user->get_name() ?></td>
242
- <td><a href="mailto:<?php esc_attr_e($user->email) ?>"><?php echo $user->email ?></a></td>
243
  <td><?php echo json_encode( $user->is_verified ) ?></td>
244
  <td><?php echo $user->public_key ?></td>
245
  <td><?php echo $user->secret_key ?></td>
@@ -247,4 +248,49 @@
247
  <?php endforeach ?>
248
  </tbody>
249
  </table>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  <?php endif ?>
148
  <?php endif ?>
149
  <?php
150
  /**
151
+ * @var array $VARS
152
  * @var FS_Site[] $sites
153
  */
154
  $sites = $VARS['sites'];
240
  <tr>
241
  <td><?php echo $user->id ?></td>
242
  <td><?php echo $user->get_name() ?></td>
243
+ <td><a href="mailto:<?php esc_attr_e( $user->email ) ?>"><?php echo $user->email ?></a></td>
244
  <td><?php echo json_encode( $user->is_verified ) ?></td>
245
  <td><?php echo $user->public_key ?></td>
246
  <td><?php echo $user->secret_key ?></td>
248
  <?php endforeach ?>
249
  </tbody>
250
  </table>
251
+ <?php endif ?>
252
+ <?php
253
+ /**
254
+ * @var FS_Plugin_License[] $licenses
255
+ */
256
+ $licenses = $VARS['licenses'];
257
+ ?>
258
+ <?php if ( is_array( $licenses ) && 0 < count( $licenses ) ) : ?>
259
+ <h2><?php _efs( 'licenses' ) ?></h2>
260
+ <table id="fs_users" class="widefat">
261
+ <thead>
262
+ <tr>
263
+ <th><?php _efs( 'id' ) ?></th>
264
+ <th><?php _efs( 'plugin-id' ) ?></th>
265
+ <th><?php _efs( 'user-id' ) ?></th>
266
+ <th><?php _efs( 'plan-id' ) ?></th>
267
+ <th><?php _efs( 'quota' ) ?></th>
268
+ <th><?php _efs( 'activated' ) ?></th>
269
+ <th><?php _efs( 'blocking' ) ?></th>
270
+ <th><?php _efs( 'license-key' ) ?></th>
271
+ <th><?php _efs( 'expiration' ) ?></th>
272
+ </tr>
273
+ </thead>
274
+ <tbody>
275
+ <?php foreach ( $licenses as $slug => $module_licenses ) : ?>
276
+ <?php foreach ( $module_licenses as $id => $licenses ) : ?>
277
+ <?php if ( is_array( $licenses ) && 0 < count( $licenses ) ) : ?>
278
+ <?php foreach ( $licenses as $license ) : ?>
279
+ <tr>
280
+ <td><?php echo $license->id ?></td>
281
+ <td><?php echo $license->plugin_id ?></td>
282
+ <td><?php echo $license->user_id ?></td>
283
+ <td><?php echo $license->plan_id ?></td>
284
+ <td><?php echo $license->is_unlimited() ? 'Unlimited' : ( $license->is_single_site() ? 'Single Site' : $license->quota ) ?></td>
285
+ <td><?php echo $license->activated ?></td>
286
+ <td><?php echo $license->is_block_features ? 'Blocking' : 'Flexible' ?></td>
287
+ <td><?php echo htmlentities( $license->secret_key ) ?></td>
288
+ <td><?php echo $license->expiration ?></td>
289
+ </tr>
290
+ <?php endforeach ?>
291
+ <?php endif ?>
292
+ <?php endforeach ?>
293
+ <?php endforeach ?>
294
+ </tbody>
295
+ </table>
296
  <?php endif ?>
includes/libs/freemius/templates/debug/logger.php CHANGED
@@ -30,11 +30,17 @@
30
 
31
  <?php $i = 0;
32
  foreach ( $log_book as $log ) : ?>
 
 
 
 
 
 
33
  <tr<?php if ( $i % 2 ) {
34
  echo ' class="alternate"';
35
  } ?>>
36
  <td><?php echo $log['cnt'] ?>.</td>
37
- <td><?php echo $log['logger']->get_id() ?></td>
38
  <td><?php echo $log['type'] ?></td>
39
  <td><b><code style="color: blue;"><?php echo $log['function'] ?></code></b></td>
40
  <td>
@@ -50,7 +56,7 @@
50
  </td>
51
  <td><?php
52
  if ( isset( $log['file'] ) ) {
53
- echo substr( $log['file'], $log['logger']->get_file() ) . ':' . $log['line'] . ')';
54
  }
55
  ?></td>
56
  <td><?php echo number_format( 100 * ( $log['timestamp'] - WP_FS__SCRIPT_START_TIME ), 2 ) . ' ' . __fs( 'ms' ) ?></td>
30
 
31
  <?php $i = 0;
32
  foreach ( $log_book as $log ) : ?>
33
+ <?php
34
+ /**
35
+ * @var FS_Logger $logger
36
+ */
37
+ $logger = $log['logger'];
38
+ ?>
39
  <tr<?php if ( $i % 2 ) {
40
  echo ' class="alternate"';
41
  } ?>>
42
  <td><?php echo $log['cnt'] ?>.</td>
43
+ <td><?php echo $logger->get_id() ?></td>
44
  <td><?php echo $log['type'] ?></td>
45
  <td><b><code style="color: blue;"><?php echo $log['function'] ?></code></b></td>
46
  <td>
56
  </td>
57
  <td><?php
58
  if ( isset( $log['file'] ) ) {
59
+ echo substr( $log['file'], $logger->get_file() ) . ':' . $log['line'] . ')';
60
  }
61
  ?></td>
62
  <td><?php echo number_format( 100 * ( $log['timestamp'] - WP_FS__SCRIPT_START_TIME ), 2 ) . ' ' . __fs( 'ms' ) ?></td>
includes/libs/freemius/templates/debug/scheduled-crons.php CHANGED
@@ -15,32 +15,41 @@
15
  $scheduled_crons = array();
16
  if ( is_array( $plugins ) && 0 < count( $plugins ) ) {
17
  foreach ( $plugins as $slug => $data ) {
18
- $fs = freemius( $slug );
 
 
 
 
 
 
19
 
20
- $next_execution = $fs->next_sync_cron();
21
- $last_execution = $fs->last_sync_cron();
22
 
23
- if ( false !== $next_execution ) {
24
- $scheduled_crons[ $slug ][] = array(
25
- 'name' => $fs->get_plugin_name(),
26
- 'slug' => $slug,
27
- 'type' => 'sync_cron',
28
- 'last' => $last_execution,
29
- 'next' => $next_execution,
30
- );
31
- }
32
 
33
- $next_install_execution = $fs->next_install_sync();
34
- $last_install_execution = $fs->last_install_sync();
35
 
36
- if ( false !== $next_install_execution || false !== $last_install_execution ) {
37
- $scheduled_crons[ $slug ][] = array(
38
- 'name' => $fs->get_plugin_name(),
39
- 'slug' => $slug,
40
- 'type' => 'install_sync',
41
- 'last' => $last_install_execution,
42
- 'next' => $next_install_execution,
43
- );
 
 
 
44
  }
45
  }
46
  }
@@ -64,7 +73,7 @@
64
  <td><?php echo $cron['name'] ?></td>
65
  <td><?php echo $cron['type'] ?></td>
66
  <td><?php
67
- if (is_numeric($cron['last'])) {
68
  $diff = abs( WP_FS__SCRIPT_START_TIME - $cron['last'] );
69
  $human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
70
  $diff . ' ' . __fs( 'sec' ) :
@@ -80,7 +89,7 @@
80
  }
81
  ?></td>
82
  <td><?php
83
- if (is_numeric($cron['next'])) {
84
  $diff = abs( WP_FS__SCRIPT_START_TIME - $cron['next'] );
85
  $human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
86
  $diff . ' ' . __fs( 'sec' ) :
15
  $scheduled_crons = array();
16
  if ( is_array( $plugins ) && 0 < count( $plugins ) ) {
17
  foreach ( $plugins as $slug => $data ) {
18
+ /**
19
+ * @author Vova Feldman
20
+ *
21
+ * @since 1.2.1 Don't load data from inactive modules.
22
+ */
23
+ if ( is_plugin_active( $data->file ) ) {
24
+ $fs = freemius( $slug );
25
 
26
+ $next_execution = $fs->next_sync_cron();
27
+ $last_execution = $fs->last_sync_cron();
28
 
29
+ if ( false !== $next_execution ) {
30
+ $scheduled_crons[ $slug ][] = array(
31
+ 'name' => $fs->get_plugin_name(),
32
+ 'slug' => $slug,
33
+ 'type' => 'sync_cron',
34
+ 'last' => $last_execution,
35
+ 'next' => $next_execution,
36
+ );
37
+ }
38
 
39
+ $next_install_execution = $fs->next_install_sync();
40
+ $last_install_execution = $fs->last_install_sync();
41
 
42
+ if ( false !== $next_install_execution ||
43
+ false !== $last_install_execution
44
+ ) {
45
+ $scheduled_crons[ $slug ][] = array(
46
+ 'name' => $fs->get_plugin_name(),
47
+ 'slug' => $slug,
48
+ 'type' => 'install_sync',
49
+ 'last' => $last_install_execution,
50
+ 'next' => $next_install_execution,
51
+ );
52
+ }
53
  }
54
  }
55
  }
73
  <td><?php echo $cron['name'] ?></td>
74
  <td><?php echo $cron['type'] ?></td>
75
  <td><?php
76
+ if ( is_numeric( $cron['last'] ) ) {
77
  $diff = abs( WP_FS__SCRIPT_START_TIME - $cron['last'] );
78
  $human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
79
  $diff . ' ' . __fs( 'sec' ) :
89
  }
90
  ?></td>
91
  <td><?php
92
+ if ( is_numeric( $cron['next'] ) ) {
93
  $diff = abs( WP_FS__SCRIPT_START_TIME - $cron['next'] );
94
  $human_diff = ( $diff < MINUTE_IN_SECONDS ) ?
95
  $diff . ' ' . __fs( 'sec' ) :
includes/libs/freemius/templates/email.php CHANGED
@@ -10,6 +10,9 @@
10
  exit;
11
  }
12
 
 
 
 
13
  $sections = $VARS['sections'];
14
  ?>
15
  <table>
10
  exit;
11
  }
12
 
13
+ /**
14
+ * @var array $VARS
15
+ */
16
  $sections = $VARS['sections'];
17
  ?>
18
  <table>
includes/libs/freemius/templates/firewall-issues-js.php CHANGED
@@ -23,7 +23,7 @@
23
  slug = notice.attr('data-slug');
24
 
25
  var data = {
26
- action : slug + '_resolve_firewall_issues',
27
  slug : slug,
28
  error_type: error_type
29
  };
@@ -40,7 +40,7 @@
40
  }
41
 
42
  if ('retry_ping' === error_type) {
43
- data.action = slug + '_retry_connectivity_test';
44
  }
45
 
46
  $(this).css({'cursor': 'wait'});
23
  slug = notice.attr('data-slug');
24
 
25
  var data = {
26
+ action : 'fs_resolve_firewall_issues_' + slug,
27
  slug : slug,
28
  error_type: error_type
29
  };
40
  }
41
 
42
  if ('retry_ping' === error_type) {
43
+ data.action = 'fs_retry_connectivity_test_' + slug;
44
  }
45
 
46
  $(this).css({'cursor': 'wait'});
includes/libs/freemius/templates/forms/deactivation/contact.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6
+ * @since 1.2.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ */
16
+ $slug = $VARS['slug'];
17
+ $fs = freemius( $slug );
18
+
19
+ echo __fs( 'contact-support-before-deactivation', $slug )
20
+ . sprintf(" <a href='%s' class='button button-small button-primary'>%s</a>",
21
+ $fs->contact_url( 'technical_support' ),
22
+ __fs( 'contact-support', $slug )
23
+ );
includes/libs/freemius/templates/{deactivation-feedback-modal.php → forms/deactivation/form.php} RENAMED
@@ -10,6 +10,9 @@
10
  exit;
11
  }
12
 
 
 
 
13
  $slug = $VARS['slug'];
14
  $fs = freemius( $slug );
15
 
@@ -20,29 +23,71 @@
20
  $reasons_list_items_html = '';
21
 
22
  foreach ( $reasons as $reason ) {
23
- $list_item_classes = 'reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' );
24
- $reasons_list_items_html .= '<li class="' . $list_item_classes . '" data-input-type="' . $reason['input_type'] . '" data-input-placeholder="' . $reason['input_placeholder'] . '"><label><span><input type="radio" name="selected-reason" value="' . $reason['id'] . '"/></span><span>' . $reason['text'] . '</span></label></li>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
 
 
 
 
 
 
 
 
 
 
 
 
26
  ?>
27
  <script type="text/javascript">
28
  (function ($) {
29
  var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ); ?>,
30
  modalHtml =
31
- '<div class="fs-modal<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
32
  + ' <div class="fs-modal-dialog">'
 
 
 
33
  + ' <div class="fs-modal-body">'
34
  + ' <div class="fs-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
35
  + ' <div class="fs-modal-panel active" data-panel-id="reasons"><h3><strong><?php printf( __fs( 'deactivation-share-reason' , $slug ) ); ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
36
  + ' </div>'
37
  + ' <div class="fs-modal-footer">'
 
38
  + ' <a href="#" class="button button-secondary button-deactivate"></a>'
39
- + ' <a href="#" class="button button-primary button-close"><?php printf( __fs( 'deactivation-modal-button-cancel' , $slug ) ); ?></a>'
40
  + ' </div>'
41
  + ' </div>'
42
  + '</div>',
43
- $modal = $(modalHtml),
44
- $deactivateLink = $('#the-list .deactivate > [data-slug=<?php echo $VARS['slug']; ?>].fs-slug').prev(),
45
- selectedReasonID = false;
 
 
 
 
46
 
47
  $modal.appendTo($('body'));
48
 
@@ -91,7 +136,7 @@
91
  }, 150);
92
  });
93
 
94
- $modal.on('click', '.button', function (evt) {
95
  evt.preventDefault();
96
 
97
  if ($(this).hasClass('disabled')) {
@@ -122,13 +167,14 @@
122
  url : ajaxurl,
123
  method : 'POST',
124
  data : {
125
- 'action' : 'submit-uninstall-reason',
126
- 'reason_id' : $radio.val(),
127
- 'reason_info': userReason
 
128
  },
129
  beforeSend: function () {
130
- _parent.find('.button').addClass('disabled');
131
- _parent.find('.button-secondary').text('Processing...');
132
  },
133
  complete : function () {
134
  // Do not show the dialog box, deactivate the plugin.
@@ -152,13 +198,26 @@
152
 
153
  selectedReasonID = $selectedReasonOption.val();
154
 
 
 
 
 
 
 
 
 
155
  var _parent = $(this).parents('li:first');
156
 
157
  $modal.find('.reason-input').remove();
 
158
  $modal.find('.button-deactivate').text('<?php printf( __fs( 'deactivation-modal-button-submit' , $slug ) ); ?>');
159
 
160
  enableDeactivateButton();
161
 
 
 
 
 
162
  if (_parent.hasClass('has-input')) {
163
  var inputType = _parent.data('input-type'),
164
  inputPlaceholder = _parent.data('input-placeholder'),
@@ -189,15 +248,27 @@
189
  }
190
 
191
  closeModal();
 
192
  });
193
  }
194
 
195
- function isOtherReasonSelected() {
 
 
 
 
 
 
 
 
196
  // Get the selected radio input element.
197
- var $selectedReasonOption = $modal.find('input[type="radio"]:checked'),
198
- selectedReason = $selectedReasonOption.parent().next().text().trim();
199
 
200
- return ( 'Other' === selectedReason );
 
 
 
 
201
  }
202
 
203
  function showModal() {
@@ -228,6 +299,13 @@
228
 
229
  $modal.find('.message').hide();
230
 
 
 
 
 
 
 
 
231
  var $deactivateButton = $modal.find('.button-deactivate');
232
 
233
  /*
10
  exit;
11
  }
12
 
13
+ /**
14
+ * @var array $VARS
15
+ */
16
  $slug = $VARS['slug'];
17
  $fs = freemius( $slug );
18
 
23
  $reasons_list_items_html = '';
24
 
25
  foreach ( $reasons as $reason ) {
26
+ $list_item_classes = 'reason' . ( ! empty( $reason['input_type'] ) ? ' has-input' : '' );
27
+
28
+ if ( isset( $reason['internal_message'] ) && ! empty( $reason['internal_message'] ) ) {
29
+ $list_item_classes .= ' has-internal-message';
30
+ $reason_internal_message = $reason['internal_message'];
31
+ } else {
32
+ $reason_internal_message = '';
33
+ }
34
+
35
+ $reason_list_item_html = <<< HTML
36
+ <li class="{$list_item_classes}"
37
+ data-input-type="{$reason['input_type']}"
38
+ data-input-placeholder="{$reason['input_placeholder']}">
39
+ <label>
40
+ <span>
41
+ <input type="radio" name="selected-reason" value="{$reason['id']}"/>
42
+ </span>
43
+ <span>{$reason['text']}</span>
44
+ </label>
45
+ <div class="internal-message">{$reason_internal_message}</div>
46
+ </li>
47
+ HTML;
48
+
49
+ $reasons_list_items_html .= $reason_list_item_html;
50
  }
51
+
52
+ $is_anonymous = ( ! $fs->is_registered() );
53
+ if ( $is_anonymous ) {
54
+ $anonymous_feedback_checkbox_html =
55
+ '<label class="anonymous-feedback-label"><input type="checkbox" class="anonymous-feedback-checkbox"> '
56
+ . __fs( 'anonymous-feedback', $slug )
57
+ . '</label>';
58
+ } else {
59
+ $anonymous_feedback_checkbox_html = '';
60
+ }
61
+
62
+ fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' );
63
  ?>
64
  <script type="text/javascript">
65
  (function ($) {
66
  var reasonsHtml = <?php echo json_encode( $reasons_list_items_html ); ?>,
67
  modalHtml =
68
+ '<div class="fs-modal fs-modal-deactivation-feedback<?php echo empty( $confirmation_message ) ? ' no-confirmation-message' : ''; ?>">'
69
  + ' <div class="fs-modal-dialog">'
70
+ + ' <div class="fs-modal-header">'
71
+ + ' <h4><?php _efs('quick-feedback' , $slug) ?></h4>'
72
+ + ' </div>'
73
  + ' <div class="fs-modal-body">'
74
  + ' <div class="fs-modal-panel" data-panel-id="confirm"><p><?php echo $confirmation_message; ?></p></div>'
75
  + ' <div class="fs-modal-panel active" data-panel-id="reasons"><h3><strong><?php printf( __fs( 'deactivation-share-reason' , $slug ) ); ?>:</strong></h3><ul id="reasons-list">' + reasonsHtml + '</ul></div>'
76
  + ' </div>'
77
  + ' <div class="fs-modal-footer">'
78
+ + ' <?php echo $anonymous_feedback_checkbox_html ?>'
79
  + ' <a href="#" class="button button-secondary button-deactivate"></a>'
80
+ + ' <a href="#" class="button button-primary button-close"><?php printf( __fs( 'deactivation-modal-button-cancel' , $slug ) ) ?></a>'
81
  + ' </div>'
82
  + ' </div>'
83
  + '</div>',
84
+ $modal = $(modalHtml),
85
+ $deactivateLink = $('#the-list .deactivate > [data-slug=<?php echo $VARS['slug']; ?>].fs-slug').prev(),
86
+ $anonymousFeedback = $modal.find( '.anonymous-feedback-label' ),
87
+ isAnonymous = <?php echo ( $is_anonymous ? 'true' : 'false' ); ?>,
88
+ selectedReasonID = false,
89
+ otherReasonID = <?php echo Freemius::REASON_OTHER; ?>,
90
+ dontShareDataReasonID = <?php echo Freemius::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION; ?>;
91
 
92
  $modal.appendTo($('body'));
93
 
136
  }, 150);
137
  });
138
 
139
+ $modal.on('click', '.fs-modal-footer .button', function (evt) {
140
  evt.preventDefault();
141
 
142
  if ($(this).hasClass('disabled')) {
167
  url : ajaxurl,
168
  method : 'POST',
169
  data : {
170
+ 'action' : '<?php echo $fs->get_action_tag( 'submit_uninstall_reason' ) ?>',
171
+ 'reason_id' : $radio.val(),
172
+ 'reason_info' : userReason,
173
+ 'is_anonymous': isAnonymousFeedback()
174
  },
175
  beforeSend: function () {
176
+ _parent.find('.fs-modal-footer .button').addClass('disabled');
177
+ _parent.find('.fs-modal-footer .button-secondary').text('Processing...');
178
  },
179
  complete : function () {
180
  // Do not show the dialog box, deactivate the plugin.
198
 
199
  selectedReasonID = $selectedReasonOption.val();
200
 
201
+ if ( isAnonymous ) {
202
+ if ( isReasonSelected( dontShareDataReasonID ) ) {
203
+ $anonymousFeedback.hide();
204
+ } else {
205
+ $anonymousFeedback.show();
206
+ }
207
+ }
208
+
209
  var _parent = $(this).parents('li:first');
210
 
211
  $modal.find('.reason-input').remove();
212
+ $modal.find( '.internal-message' ).hide();
213
  $modal.find('.button-deactivate').text('<?php printf( __fs( 'deactivation-modal-button-submit' , $slug ) ); ?>');
214
 
215
  enableDeactivateButton();
216
 
217
+ if ( _parent.hasClass( 'has-internal-message' ) ) {
218
+ _parent.find( '.internal-message' ).show();
219
+ }
220
+
221
  if (_parent.hasClass('has-input')) {
222
  var inputType = _parent.data('input-type'),
223
  inputPlaceholder = _parent.data('input-placeholder'),
248
  }
249
 
250
  closeModal();
251
+ return false;
252
  });
253
  }
254
 
255
+ function isAnonymousFeedback() {
256
+ if ( ! isAnonymous ) {
257
+ return false;
258
+ }
259
+
260
+ return ( isReasonSelected( dontShareDataReasonID ) || $anonymousFeedback.find( 'input' ).prop( 'checked' ) );
261
+ }
262
+
263
+ function isReasonSelected( reasonID ) {
264
  // Get the selected radio input element.
265
+ var $selectedReasonOption = $modal.find('input[type="radio"]:checked');
 
266
 
267
+ return ( reasonID == $selectedReasonOption.val() );
268
+ }
269
+
270
+ function isOtherReasonSelected() {
271
+ return isReasonSelected( otherReasonID );
272
  }
273
 
274
  function showModal() {
299
 
300
  $modal.find('.message').hide();
301
 
302
+ if ( isAnonymous ) {
303
+ $anonymousFeedback.find( 'input' ).prop( 'checked', false );
304
+
305
+ // Hide, since by default there is no selected reason.
306
+ $anonymousFeedback.hide();
307
+ }
308
+
309
  var $deactivateButton = $modal.find('.button-deactivate');
310
 
311
  /*
includes/libs/freemius/templates/forms/deactivation/retry-skip.php ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6
+ * @since 1.2.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ */
16
+ $slug = $VARS['slug'];
17
+ $fs = freemius( $slug );
18
+
19
+ $skip_url = wp_nonce_url( $fs->_get_admin_page_url( '', array( 'fs_action' => $slug . '_skip_activation' ) ), $slug . '_skip_activation' );
20
+ $skip_text = strtolower( __fs( 'skip', $slug ) );
21
+ $use_plugin_anonymously_text = __fs( 'click-here-to-use-plugin-anonymously', $slug );
22
+
23
+ echo sprintf( __fs( 'dont-have-to-share-any-data', $slug ), "<a href='{$skip_url}'>{$skip_text}</a>" )
24
+ . " <a href='{$skip_url}' class='button button-small button-secondary'>{$use_plugin_anonymously_text}</a>";
includes/libs/freemius/templates/forms/license-activation.php ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6
+ * @since 1.1.9
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ */
16
+ $slug = $VARS['slug'];
17
+ $fs = freemius( $slug );
18
+
19
+ if ($fs->is_registered()) {
20
+ // The URL to redirect to after successfully activating the license from the "Plugins" page.
21
+ if ( $fs->is_addon() ) {
22
+ $sync_license_url = $fs->get_parent_instance()->_get_sync_license_url( $fs->get_id(), true );
23
+ } else {
24
+ $sync_license_url = $fs->_get_sync_license_url( $fs->get_id(), true );
25
+ }
26
+
27
+ /**
28
+ * Trigger license sync after valid license activation.
29
+ */
30
+ $after_license_activation_url = $sync_license_url;
31
+ }
32
+ else
33
+ {
34
+ /**
35
+ * If user not yet registered, the license activation triggers
36
+ * an opt-in, which automatically sync the license.
37
+ */
38
+ $after_license_activation_url = $fs->get_account_url();
39
+ }
40
+
41
+ $cant_find_license_key_text = __fs( 'cant-find-license-key', $slug );
42
+ $message_above_input_field = __fs( 'activate-license-message', $slug );
43
+ $message_below_input_field = '';
44
+
45
+ $header_title = __fs( $fs->is_free_plan() ? 'activate-license' : 'update-license', $slug );
46
+
47
+ if ( $fs->is_registered() ) {
48
+ $activate_button_text = $header_title;
49
+ } else {
50
+ $freemius_site_url = $fs->has_paid_plan() ?
51
+ 'https://freemius.com/wordpress/' :
52
+ // Insights platform information.
53
+ 'https://freemius.com/wordpress/usage-tracking/';
54
+
55
+ $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank" tabindex="0">freemius.com</a>';
56
+
57
+ $message_below_input_field = sprintf( __fs( 'license-sync-disclaimer', $slug ), $freemius_link );
58
+
59
+ $activate_button_text = __fs( 'agree-activate-license', $slug );
60
+ }
61
+
62
+ $license_key_text = __fs( 'license-key' , $slug );
63
+
64
+ $modal_content_html = <<< HTML
65
+ <div class="notice notice-error inline license-activation-message"><p></p></div>
66
+ <p>{$message_above_input_field}</p>
67
+ <input class="license_key" type="text" placeholder="{$license_key_text}" tabindex="1" />
68
+ <a class="show-license-resend-modal show-license-resend-modal-{$slug}" href="!#" tabindex="2">{$cant_find_license_key_text}</a>
69
+ <p>{$message_below_input_field}</p>
70
+ HTML;
71
+
72
+ fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' );
73
+ ?>
74
+ <script type="text/javascript">
75
+ (function( $ ) {
76
+ $( document ).ready(function() {
77
+ var modalContentHtml = <?php echo json_encode($modal_content_html); ?>,
78
+ modalHtml =
79
+ '<div class="fs-modal fs-modal-license-activation">'
80
+ + ' <div class="fs-modal-dialog">'
81
+ + ' <div class="fs-modal-header">'
82
+ + ' <h4><?php echo $header_title ?></h4>'
83
+ + ' <a href="!#" class="fs-close"><i class="dashicons dashicons-no" title="<?php _efs( 'dismiss' ) ?>"></i></a>'
84
+ + ' </div>'
85
+ + ' <div class="fs-modal-body">'
86
+ + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
87
+ + ' </div>'
88
+ + ' <div class="fs-modal-footer">'
89
+ + ' <button class="button button-secondary button-close" tabindex="4"><?php _efs('deactivation-modal-button-cancel', $slug); ?></button>'
90
+ + ' <button class="button button-primary button-activate-license" tabindex="3"><?php echo $activate_button_text; ?></button>'
91
+ + ' </div>'
92
+ + ' </div>'
93
+ + '</div>',
94
+ $modal = $(modalHtml),
95
+ $activateLicenseLink = $('span.activate-license.<?php echo $VARS['slug'] ?> a, .activate-license-trigger.<?php echo $VARS['slug'] ?>'),
96
+ $activateLicenseButton = $modal.find('.button-activate-license'),
97
+ $licenseKeyInput = $modal.find('input.license_key'),
98
+ $licenseActivationMessage = $modal.find( '.license-activation-message' ),
99
+ pluginSlug = '<?php echo $slug ?>',
100
+ afterActivationUrl = '<?php echo $after_license_activation_url ?>';
101
+
102
+ $modal.appendTo($('body'));
103
+
104
+ function registerEventHandlers() {
105
+ $activateLicenseLink.click(function (evt) {
106
+ evt.preventDefault();
107
+
108
+ showModal();
109
+ });
110
+
111
+ $modal.on('input propertychange', 'input.license_key', function () {
112
+
113
+ var licenseKey = $(this).val().trim();
114
+
115
+ /**
116
+ * If license key is not empty, enable the license activation button.
117
+ */
118
+ if (licenseKey.length > 0) {
119
+ enableActivateLicenseButton();
120
+ }
121
+ });
122
+
123
+ $modal.on('blur', 'input.license_key', function () {
124
+ var licenseKey = $(this).val().trim();
125
+
126
+ /**
127
+ * If license key is empty, disable the license activation button.
128
+ */
129
+ if (0 === licenseKey.length) {
130
+ disableActivateLicenseButton();
131
+ }
132
+ });
133
+
134
+ $modal.on('click', '.button-activate-license', function (evt) {
135
+ evt.preventDefault();
136
+
137
+ if ($(this).hasClass('disabled')) {
138
+ return;
139
+ }
140
+
141
+ var licenseKey = $licenseKeyInput.val().trim();
142
+
143
+ disableActivateLicenseButton();
144
+
145
+ if (0 === licenseKey.length) {
146
+ return;
147
+ }
148
+
149
+ $.ajax({
150
+ url: ajaxurl,
151
+ method: 'POST',
152
+ data: {
153
+ action : 'fs_activate_license_' + pluginSlug,
154
+ slug : pluginSlug,
155
+ license_key: licenseKey
156
+ },
157
+ beforeSend: function () {
158
+ $activateLicenseButton.text( '<?php _efs( 'activating-license', $slug ); ?>' );
159
+ },
160
+ success: function( result ) {
161
+ var resultObj = $.parseJSON( result );
162
+ if ( resultObj.success ) {
163
+ closeModal();
164
+
165
+ // Redirect to the "Account" page and sync the license.
166
+ window.location.href = afterActivationUrl;
167
+ } else {
168
+ showError( resultObj.error );
169
+ resetActivateLicenseButton();
170
+ }
171
+ }
172
+ });
173
+ });
174
+
175
+ // If the user has clicked outside the window, close the modal.
176
+ $modal.on('click', '.fs-close, .button-secondary', function () {
177
+ closeModal();
178
+ return false;
179
+ });
180
+ }
181
+
182
+ registerEventHandlers();
183
+
184
+ function showModal() {
185
+ resetModal();
186
+
187
+ // Display the dialog box.
188
+ $modal.addClass('active');
189
+ $('body').addClass('has-fs-modal');
190
+
191
+ $licenseKeyInput.focus();
192
+ }
193
+
194
+ function closeModal() {
195
+ $modal.removeClass('active');
196
+ $('body').removeClass('has-fs-modal');
197
+ }
198
+
199
+ function resetActivateLicenseButton() {
200
+ enableActivateLicenseButton();
201
+ $activateLicenseButton.text( '<?php echo $activate_button_text; ?>' );
202
+ }
203
+
204
+ function resetModal() {
205
+ hideError();
206
+ resetActivateLicenseButton();
207
+ $licenseKeyInput.val( '' );
208
+ }
209
+
210
+ function enableActivateLicenseButton() {
211
+ $activateLicenseButton.removeClass( 'disabled' );
212
+ }
213
+
214
+ function disableActivateLicenseButton() {
215
+ $activateLicenseButton.addClass( 'disabled' );
216
+ }
217
+
218
+ function hideError() {
219
+ $licenseActivationMessage.hide();
220
+ }
221
+
222
+ function showError( msg ) {
223
+ $licenseActivationMessage.find( ' > p' ).html( msg );
224
+ $licenseActivationMessage.show();
225
+ }
226
+ });
227
+ })( jQuery );
228
+ </script>
includes/libs/freemius/templates/forms/resend-key.php ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6
+ * @since 1.2.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * @var array $VARS
15
+ */
16
+ $slug = $VARS['slug'];
17
+ $fs = freemius( $slug );
18
+
19
+ $message_above_input_field = __fs( 'ask-for-upgrade-email-address', $slug );
20
+ $send_button_text = __fs( 'send-license-key', $slug );
21
+ $cancel_button_text = __fs( 'deactivation-modal-button-cancel', $slug );
22
+ $email_address_placeholder = __fs( 'email-address', $slug );
23
+
24
+ $modal_content_html = <<< HTML
25
+ <div class="notice notice-error inline license-resend-message"><p></p></div>
26
+ <p>{$message_above_input_field}</p>
27
+ <div class="input-container">
28
+ <div class="button-container">
29
+ <a href="#" class="button button-primary button-send-license-key disabled" tabindex="2">{$send_button_text}</a>
30
+ </div>
31
+ <div class="email-address-container">
32
+ <input class="email-address" type="text" placeholder="{$email_address_placeholder}" tabindex="1">
33
+ </div>
34
+ </div>
35
+ HTML;
36
+
37
+ fs_enqueue_local_style( 'dialog-boxes', '/admin/dialog-boxes.css' );
38
+ ?>
39
+ <script type="text/javascript">
40
+ (function ($) {
41
+ $(document).ready(function () {
42
+ var modalContentHtml = <?php echo json_encode( $modal_content_html ); ?>,
43
+ modalHtml =
44
+ '<div class="fs-modal fs-modal-license-key-resend">'
45
+ + ' <div class="fs-modal-dialog">'
46
+ + ' <div class="fs-modal-header">'
47
+ + ' <h4><?php echo $send_button_text ?></h4>'
48
+ + ' <a href="#!" class="fs-close" tabindex="3" title="Close"><i class="dashicons dashicons-no" title="<?php _efs( 'dismiss' ) ?>"></i></a>'
49
+ + ' </div>'
50
+ + ' <div class="fs-modal-body">'
51
+ + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
52
+ + ' </div>'
53
+ + ' </div>'
54
+ + '</div>',
55
+ $modal = $(modalHtml),
56
+ $sendLicenseKeyButton = $modal.find('.button-send-license-key'),
57
+ $emailAddressInput = $modal.find('input.email-address'),
58
+ $licenseResendMessage = $modal.find('.license-resend-message'),
59
+ moduleSlug = '<?php echo $slug; ?>',
60
+ isChild = false;
61
+
62
+ $modal.appendTo($('body'));
63
+
64
+ registerEventHandlers();
65
+
66
+ function registerEventHandlers() {
67
+ $('a.show-license-resend-modal-' + moduleSlug).click(function (evt) {
68
+ evt.preventDefault();
69
+
70
+ showModal();
71
+ });
72
+
73
+ $modal.on('input propertychange', 'input.email-address', function () {
74
+
75
+ var emailAddress = $(this).val().trim();
76
+
77
+ /**
78
+ * If email address is not empty, enable the send license key button.
79
+ */
80
+ if (emailAddress.length > 0) {
81
+ enableSendLicenseKeyButton();
82
+ }
83
+ });
84
+
85
+ $modal.on('blur', 'input.email-address', function () {
86
+ var emailAddress = $(this).val().trim();
87
+
88
+ /**
89
+ * If email address is empty, disable the send license key button.
90
+ */
91
+ if (0 === emailAddress.length) {
92
+ disableSendLicenseKeyButton();
93
+ }
94
+ });
95
+
96
+ $modal.on('click', '.fs-close', function (){
97
+ closeModal();
98
+ return false;
99
+ });
100
+
101
+ $modal.on('click', '.button', function (evt) {
102
+ evt.preventDefault();
103
+
104
+ if ($(this).hasClass('disabled')) {
105
+ return;
106
+ }
107
+
108
+ var emailAddress = $emailAddressInput.val().trim();
109
+
110
+ disableSendLicenseKeyButton();
111
+
112
+ if (0 === emailAddress.length) {
113
+ return;
114
+ }
115
+
116
+ $.ajax({
117
+ url : ajaxurl,
118
+ method : 'POST',
119
+ data : {
120
+ action: '<?php echo $fs->get_action_tag( 'resend_license_key' ) ?>',
121
+ slug : moduleSlug,
122
+ email : emailAddress
123
+ },
124
+ beforeSend: function () {
125
+ $sendLicenseKeyButton.text('<?php _efs( 'sending-license-key', $slug ) ?>...');
126
+ },
127
+ success : function (result) {
128
+ var resultObj = $.parseJSON(result);
129
+ if (resultObj.success) {
130
+ closeModal();
131
+ } else {
132
+ showError(resultObj.error);
133
+ resetSendLicenseKeyButton();
134
+ }
135
+ }
136
+ });
137
+ });
138
+ }
139
+
140
+ function showModal() {
141
+ resetModal();
142
+
143
+ // Display the dialog box.
144
+ $modal.addClass('active');
145
+ $emailAddressInput.focus();
146
+
147
+ var $body = $('body');
148
+
149
+ isChild = $body.hasClass('has-fs-modal');
150
+ if (isChild) {
151
+ return;
152
+ }
153
+
154
+ $body.addClass('has-fs-modal');
155
+ }
156
+
157
+ function closeModal() {
158
+ $modal.removeClass('active');
159
+
160
+ // If child modal, do not remove the "has-fs-modal" class of the <body> element to keep its scrollbars hidden.
161
+ if (isChild) {
162
+ return;
163
+ }
164
+
165
+ $('body').removeClass('has-fs-modal');
166
+ }
167
+
168
+ function resetSendLicenseKeyButton() {
169
+ enableSendLicenseKeyButton();
170
+ $sendLicenseKeyButton.text('<?php echo $send_button_text; ?>');
171
+ }
172
+
173
+ function resetModal() {
174
+ hideError();
175
+ resetSendLicenseKeyButton();
176
+ $emailAddressInput.val('');
177
+ }
178
+
179
+ function enableSendLicenseKeyButton() {
180
+ $sendLicenseKeyButton.removeClass('disabled');
181
+ }
182
+
183
+ function disableSendLicenseKeyButton() {
184
+ $sendLicenseKeyButton.addClass('disabled');
185
+ }
186
+
187
+ function hideError() {
188
+ $licenseResendMessage.hide();
189
+ }
190
+
191
+ function showError(msg) {
192
+ $licenseResendMessage.find(' > p').html(msg);
193
+ $licenseResendMessage.show();
194
+ }
195
+ });
196
+ })(jQuery);
197
+ </script>
includes/libs/freemius/templates/license-activation-modal.php DELETED
@@ -1,177 +0,0 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
6
- * @since 1.1.9
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- $slug = $VARS['slug'];
14
- $fs = freemius( $slug );
15
-
16
- $message_above_input_field = __fs( 'activate-license-message', $slug );
17
- $message_below_input_field = '';
18
-
19
- if ( $fs->is_registered() ) {
20
- $activate_button_text = __fs( $fs->is_free_plan() ? 'activate-license' : 'update-license', $slug );
21
- } else {
22
- $freemius_site_url = $fs->has_paid_plan() ?
23
- 'https://freemius.com/wordpress/' :
24
- // Insights platform information.
25
- 'https://freemius.com/wordpress/usage-tracking/';
26
-
27
- $freemius_link = '<a href="' . $freemius_site_url . '" target="_blank">freemius.com</a>';
28
-
29
- $message_below_input_field = sprintf( __fs( 'license-sync-disclaimer', $slug ), $freemius_link );
30
-
31
- $activate_button_text = __fs( 'agree-activate-license', $slug );
32
- }
33
-
34
- $license_key_text = __fs( 'license-key' , $slug );
35
-
36
- $modal_content_html = <<< HTML
37
- <p>{$message_above_input_field}</p>
38
- <input class="license_key" type="text" placeholder="{$license_key_text}" />
39
- <p>{$message_below_input_field}</p>
40
- HTML;
41
- ?>
42
- <script type="text/javascript">
43
- (function( $ ) {
44
- $( document ).ready(function() {
45
- var modalContentHtml = <?php echo json_encode($modal_content_html); ?>,
46
- modalHtml =
47
- '<div class="fs-modal">'
48
- + ' <div class="fs-modal-dialog">'
49
- + ' <div class="fs-modal-body">'
50
- + ' <div class="fs-modal-panel active">' + modalContentHtml + '</div>'
51
- + ' </div>'
52
- + ' <div class="fs-modal-footer">'
53
- + ' <a href="#" class="button button-secondary button-close"><?php _efs('deactivation-modal-button-cancel', $slug); ?></a>'
54
- + ' <a href="#" class="button button-primary button-activate-license"><?php echo $activate_button_text; ?></a>'
55
- + ' </div>'
56
- + ' </div>'
57
- + '</div>',
58
- $modal = $(modalHtml),
59
- $activateLicenseLink = $('span.activate-license.<?php echo $VARS['slug']; ?>').find('a');
60
-
61
- $modal.appendTo($('body'));
62
-
63
- registerEventHandlers();
64
-
65
- function registerEventHandlers() {
66
- $activateLicenseLink.click(function (evt) {
67
- evt.preventDefault();
68
-
69
- showModal();
70
- });
71
-
72
- $modal.on('input propertychange', 'input.license_key', function () {
73
-
74
- var licenseKey = $(this).val().trim();
75
-
76
- /**
77
- * If license key is not empty, enable the license activation button.
78
- */
79
- if (licenseKey.length > 0) {
80
- enableActivateLicenseButton();
81
- }
82
- });
83
-
84
- $modal.on('blur', 'input.license_key', function () {
85
- var licenseKey = $(this).val().trim();
86
-
87
- /**
88
- * If license key is empty, disable the license activation button.
89
- */
90
- if (0 === licenseKey.length) {
91
- disableActivateLicenseButton();
92
- }
93
- });
94
-
95
- $modal.on('click', '.button', function (evt) {
96
- evt.preventDefault();
97
-
98
- if ($(this).hasClass('disabled')) {
99
- return;
100
- }
101
-
102
- var
103
- activateButton = $('.button-activate-license'),
104
- licenseKey = $('input.license_key').val().trim();
105
-
106
- activateButton.addClass('disabled');
107
-
108
- if (0 === licenseKey.length) {
109
- return;
110
- }
111
-
112
- $.ajax({
113
- url: ajaxurl,
114
- method: 'POST',
115
- data: {
116
- 'action': 'activate-license',
117
- 'license-key': licenseKey
118
- },
119
- beforeSend: function () {
120
- activateButton.text('<?php _efs('activating-license', $slug); ?>');
121
- },
122
- complete: function () {
123
- closeModal();
124
- }
125
- });
126
- });
127
-
128
- // If the user has clicked outside the window, close the modal.
129
- $modal.on('click', function (evt) {
130
- var $target = $(evt.target);
131
-
132
- // If the user has clicked anywhere in the modal dialog, just return.
133
- if ($target.hasClass('fs-modal-body') || $target.hasClass('fs-modal-footer')) {
134
- return;
135
- }
136
-
137
- // If the user has not clicked the close button and the clicked element is inside the modal dialog, just return.
138
- if (( !$target.hasClass('button-close') ) && ( $target.parents('.fs-modal-body').length > 0 || $target.parents('.fs-modal-footer').length > 0 )) {
139
- return;
140
- }
141
-
142
- closeModal();
143
- });
144
- }
145
-
146
- function showModal() {
147
- resetModal();
148
-
149
- // Display the dialog box.
150
- $modal.addClass('active');
151
- $('body').addClass('has-fs-modal');
152
-
153
- $('input.license_key').focus();
154
- }
155
-
156
- function closeModal() {
157
- $modal.removeClass('active');
158
- $('body').removeClass('has-fs-modal');
159
- }
160
-
161
- function resetModal() {
162
- $('input.license_key').val('');
163
-
164
- enableActivateLicenseButton();
165
- $modal.find('.button-activate-license').text('<?php echo $activate_button_text; ?>');
166
- }
167
-
168
- function enableActivateLicenseButton() {
169
- $modal.find('.button-activate-license').removeClass('disabled');
170
- }
171
-
172
- function disableActivateLicenseButton() {
173
- $modal.find('.button-activate-license').addClass('disabled');
174
- }
175
- });
176
- })( jQuery );
177
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/libs/freemius/templates/plugin-icon.php CHANGED
@@ -10,6 +10,9 @@
10
  exit;
11
  }
12
 
 
 
 
13
  $slug = $VARS['slug'];
14
  $fs = freemius( $slug );
15
 
10
  exit;
11
  }
12
 
13
+ /**
14
+ * @var array $VARS
15
+ */
16
  $slug = $VARS['slug'];
17
  $fs = freemius( $slug );
18
 
includes/libs/freemius/templates/plugin-info/description.php CHANGED
@@ -11,6 +11,8 @@
11
  }
12
 
13
  /**
 
 
14
  * @var FS_Plugin $plugin
15
  */
16
  $plugin = $VARS['plugin'];
11
  }
12
 
13
  /**
14
+ * @var array $VARS
15
+ *
16
  * @var FS_Plugin $plugin
17
  */
18
  $plugin = $VARS['plugin'];
includes/libs/freemius/templates/plugin-info/features.php CHANGED
@@ -11,6 +11,8 @@
11
  }
12
 
13
  /**
 
 
14
  * @var FS_Plugin $plugin
15
  */
16
  $plugin = $VARS['plugin'];
11
  }
12
 
13
  /**
14
+ * @var array $VARS
15
+ *
16
  * @var FS_Plugin $plugin
17
  */
18
  $plugin = $VARS['plugin'];
includes/libs/freemius/templates/plugin-info/screenshots.php CHANGED
@@ -11,6 +11,8 @@
11
  }
12
 
13
  /**
 
 
14
  * @var FS_Plugin $plugin
15
  */
16
  $plugin = $VARS['plugin'];
11
  }
12
 
13
  /**
14
+ * @var array $VARS
15
+ *
16
  * @var FS_Plugin $plugin
17
  */
18
  $plugin = $VARS['plugin'];
includes/libs/freemius/templates/powered-by.php CHANGED
@@ -10,9 +10,7 @@
10
  exit;
11
  }
12
 
13
- /**
14
- * KEEP THE POWERED BY TAB AND GET ADDITIONAL - 1% - OFF THE COMMISSION
15
- */
16
 
17
  wp_enqueue_script( 'jquery' );
18
  wp_enqueue_script( 'json2' );
@@ -26,7 +24,7 @@
26
  $(function () {
27
  var
28
  base_url = '<?php echo WP_FS__ADDRESS ?>',
29
- piframe = $('<iframe id="fs_promo_tab" src="' + base_url + '/promotional-tab/?page=contact#' + encodeURIComponent(document.location.href) + '" height="350" width="60" frameborder="0" style=" background: transparent; position: fixed; top: 20%; right: 0;" scrolling="no"></iframe>')
30
  .appendTo('#piframe');
31
 
32
  FS.PostMessage.init(base_url);
10
  exit;
11
  }
12
 
13
+ $VARS = isset($VARS) ? $VARS : array();
 
 
14
 
15
  wp_enqueue_script( 'jquery' );
16
  wp_enqueue_script( 'json2' );
24
  $(function () {
25
  var
26
  base_url = '<?php echo WP_FS__ADDRESS ?>',
27
+ piframe = $('<iframe id="fs_promo_tab" src="' + base_url + '/promotional-tab/?<?php echo http_build_query($VARS) ?>#' + encodeURIComponent(document.location.href) + '" height="350" width="60" frameborder="0" style=" background: transparent; position: fixed; top: 20%; right: 0;" scrolling="no"></iframe>')
28
  .appendTo('#piframe');
29
 
30
  FS.PostMessage.init(base_url);
includes/libs/freemius/templates/pricing.php CHANGED
@@ -15,6 +15,9 @@
15
  fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
16
  fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
17
 
 
 
 
18
  $slug = $VARS['slug'];
19
  $fs = freemius( $slug );
20
  $timestamp = time();
@@ -44,7 +47,7 @@
44
  }
45
 
46
  $query_params = array_merge( $context_params, $_GET, array(
47
- 'next' => $fs->_get_admin_page_url( 'account', array( 'fs_action' => $slug . '_sync_license' ) ),
48
  'plugin_version' => $fs->get_plugin_version(),
49
  // Billing cycle.
50
  'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
@@ -97,4 +100,12 @@
97
  })(jQuery);
98
  </script>
99
  </div>
100
- <?php fs_require_template( 'powered-by.php' ) ?>
 
 
 
 
 
 
 
 
15
  fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
16
  fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
17
 
18
+ /**
19
+ * @var array $VARS
20
+ */
21
  $slug = $VARS['slug'];
22
  $fs = freemius( $slug );
23
  $timestamp = time();
47
  }
48
 
49
  $query_params = array_merge( $context_params, $_GET, array(
50
+ 'next' => $fs->_get_sync_license_url( false, false ),
51
  'plugin_version' => $fs->get_plugin_version(),
52
  // Billing cycle.
53
  'billing_cycle' => fs_request_get( 'billing_cycle', WP_FS__PERIOD_ANNUALLY ),
100
  })(jQuery);
101
  </script>
102
  </div>
103
+ <?php
104
+ $params = array(
105
+ 'page' => 'pricing',
106
+ 'module_id' => $fs->get_id(),
107
+ 'module_slug' => $slug,
108
+ 'module_version' => $fs->get_plugin_version(),
109
+ );
110
+ fs_require_template( 'powered-by.php', $params );
111
+ ?>
includes/libs/freemius/templates/sticky-admin-notice-js.php CHANGED
@@ -23,7 +23,7 @@
23
 
24
  notice.fadeOut('fast', function(){
25
  var data = {
26
- action: slug + '_dismiss_notice_action',
27
  slug: slug,
28
  message_id: id
29
  };
23
 
24
  notice.fadeOut('fast', function(){
25
  var data = {
26
+ action: 'fs_dismiss_notice_action_' + slug,
27
  slug: slug,
28
  message_id: id
29
  };
includes/scripts.php CHANGED
@@ -36,6 +36,8 @@ function popmake_load_site_scripts() {
36
  // Deprecated. No longer used. Here for older versions of some extensions.
37
  wp_register_script( 'jquery-cookie', $js_dir . 'jquery.cookie' . $suffix, array( 'jquery' ), '1.4.1', true );
38
 
 
 
39
  wp_register_script( 'popup-maker-site', $dep_js_dir . 'site' . $suffix . '?defer', array(
40
  'jquery',
41
  'jquery-ui-core',
36
  // Deprecated. No longer used. Here for older versions of some extensions.
37
  wp_register_script( 'jquery-cookie', $js_dir . 'jquery.cookie' . $suffix, array( 'jquery' ), '1.4.1', true );
38
 
39
+ wp_register_script( 'mobile-detect', $js_dir . 'mobile-detect' . $suffix, null, '1.3.3', true );
40
+
41
  wp_register_script( 'popup-maker-site', $dep_js_dir . 'site' . $suffix . '?defer', array(
42
  'jquery',
43
  'jquery-ui-core',
includes/shortcodes/class-pum-shortcode-popup-close.php CHANGED
@@ -58,6 +58,12 @@ class PUM_Shortcode_Popup_Close extends PUM_Shortcode {
58
  'desc' => __( 'Add additional classes for styling.', 'popup-maker' ),
59
  'priority' => 15,
60
  ),
 
 
 
 
 
 
61
  )
62
  );
63
  }
@@ -73,6 +79,7 @@ class PUM_Shortcode_Popup_Close extends PUM_Shortcode {
73
  public function handler( $atts, $content = null ) {
74
  $atts = shortcode_atts( array(
75
  'tag' => 'span',
 
76
  'class' => '',
77
  'classes' => '',
78
  ), $atts, 'popup_close' );
@@ -82,7 +89,7 @@ class PUM_Shortcode_Popup_Close extends PUM_Shortcode {
82
  unset( $atts['class'] );
83
  }
84
 
85
- $return = '<' . $atts['tag'] . ' class="pum-close popmake-close' . ' ' . $atts['classes'] . '">';
86
  $return .= do_shortcode( $content );
87
  $return .= '</' . $atts['tag'] . '>';
88
 
58
  'desc' => __( 'Add additional classes for styling.', 'popup-maker' ),
59
  'priority' => 15,
60
  ),
61
+ 'do_default' => array(
62
+ 'type' => 'checkbox',
63
+ 'label' => __( 'Do not prevent the default click functionality.', 'popup-maker' ),
64
+ 'desc' => __( 'This prevents us from disabling the browsers default action when a close button is clicked. It can be used to allow a link to a file to both close a popup and still download the file.', 'popup-maker' ),
65
+ 'priority' => 20,
66
+ ),
67
  )
68
  );
69
  }
79
  public function handler( $atts, $content = null ) {
80
  $atts = shortcode_atts( array(
81
  'tag' => 'span',
82
+ 'do_default' => false,
83
  'class' => '',
84
  'classes' => '',
85
  ), $atts, 'popup_close' );
89
  unset( $atts['class'] );
90
  }
91
 
92
+ $return = '<' . $atts['tag'] . ' class="pum-close popmake-close' . ' ' . $atts['classes'] . '" data-do-default="' . esc_attr( $atts['do_default'] ) . '">';
93
  $return .= do_shortcode( $content );
94
  $return .= '</' . $atts['tag'] . '>';
95
 
includes/shortcodes/class-pum-shortcode-popup-trigger.php CHANGED
@@ -71,6 +71,13 @@ class PUM_Shortcode_Popup_Trigger extends PUM_Shortcode {
71
  'desc' => __( 'Add additional classes for styling.', 'popup-maker' ),
72
  'priority' => 15,
73
  ),
 
 
 
 
 
 
 
74
  ),
75
  );
76
  }
@@ -87,6 +94,7 @@ class PUM_Shortcode_Popup_Trigger extends PUM_Shortcode {
87
  $atts = shortcode_atts( array(
88
  'id' => "",
89
  'tag' => 'span',
 
90
  'class' => '',
91
  'classes' => '',
92
  ), $atts, 'popup_trigger' );
@@ -96,7 +104,7 @@ class PUM_Shortcode_Popup_Trigger extends PUM_Shortcode {
96
  unset( $atts['class'] );
97
  }
98
 
99
- $return = '<' . $atts['tag'] . ' class="popmake-' . $atts['id'] . ' ' . $atts['classes'] . '">';
100
  $return .= do_shortcode( $content );
101
  $return .= '</' . $atts['tag'] . '>';
102
 
71
  'desc' => __( 'Add additional classes for styling.', 'popup-maker' ),
72
  'priority' => 15,
73
  ),
74
+ 'do_default' => array(
75
+ 'type' => 'checkbox',
76
+ 'label' => __( 'Do not prevent the default click functionality.', 'popup-maker' ),
77
+ 'desc' => __( 'This prevents us from disabling the browsers default action when a trigger is clicked. It can be used to allow a link to a file to both trigger a popup and still download the file.', 'popup-maker' ),
78
+ 'priority' => 20,
79
+ ),
80
+
81
  ),
82
  );
83
  }
94
  $atts = shortcode_atts( array(
95
  'id' => "",
96
  'tag' => 'span',
97
+ 'do_default' => false,
98
  'class' => '',
99
  'classes' => '',
100
  ), $atts, 'popup_trigger' );
104
  unset( $atts['class'] );
105
  }
106
 
107
+ $return = '<' . $atts['tag'] . ' class="popmake-' . $atts['id'] . ' ' . $atts['classes'] . '" data-do-default="' . esc_attr( $atts['do_default'] ) . '">';
108
  $return .= do_shortcode( $content );
109
  $return .= '</' . $atts['tag'] . '>';
110
 
languages/popup-maker.pot CHANGED
@@ -60,11 +60,11 @@ msgstr ""
60
  msgid "A Popup Preview"
61
  msgstr ""
62
 
63
- #: includes/admin/class-pum-admin-helpers.php:14, includes/scripts.php:204
64
  msgid "Cancel"
65
  msgstr ""
66
 
67
- #: includes/admin/class-pum-admin-helpers.php:16, includes/scripts.php:200
68
  msgid "Add"
69
  msgstr ""
70
 
@@ -711,7 +711,7 @@ msgstr ""
711
  msgid "Popup Maker Settings"
712
  msgstr ""
713
 
714
- #: includes/admin/settings/settings-page.php:52, includes/admin/settings/settings-page.php:58, includes/admin/tools/tools-page.php:54, includes/admin/tools/tools-page.php:61, includes/scripts.php:201
715
  msgid "Save"
716
  msgstr ""
717
 
@@ -955,7 +955,7 @@ msgstr ""
955
  msgid "Choose a corner radius for your close button."
956
  msgstr ""
957
 
958
- #: includes/class-pum-condition.php:67
959
  msgid "Condition"
960
  msgstr ""
961
 
@@ -987,15 +987,15 @@ msgstr ""
987
  msgid "Submit"
988
  msgstr ""
989
 
990
- #: includes/class-pum-freemius.php:97
991
  msgid "Usage Statistics"
992
  msgstr ""
993
 
994
- #: includes/class-pum-freemius.php:98
995
  msgid "Popup & Theme Counts, Open Counts"
996
  msgstr ""
997
 
998
- #: includes/class-pum-freemius.php:121
999
  msgid "Allow %3$sPopup Maker%4$s​ to collect some usage data with %2$s to make the plugin even more awesome. If you skip this, that's okay! ​%3$sPopup Maker%4$s will still work just fine."
1000
  msgstr ""
1001
 
@@ -1155,7 +1155,7 @@ msgstr ""
1155
  msgid "Google Web Fonts&#10549;"
1156
  msgstr ""
1157
 
1158
- #: includes/input-options.php:26, includes/input-options.php:115, includes/scripts.php:212
1159
  msgid "None"
1160
  msgstr ""
1161
 
@@ -1687,39 +1687,39 @@ msgstr ""
1687
  msgid "This allows custom css classes, ids or selector strings to trigger the popup when clicked. Separate multiple selectors using commas."
1688
  msgstr ""
1689
 
1690
- #: includes/pum-trigger-functions.php:117
1691
  msgid "Do not prevent the default click functionality."
1692
  msgstr ""
1693
 
1694
- #: includes/pum-trigger-functions.php:118
1695
  msgid "This prevents us from disabling the browsers default action when a trigger is clicked. It can be used to allow a link to a file to both trigger a popup and still download the file."
1696
  msgstr ""
1697
 
1698
- #: includes/scripts.php:57
1699
  msgid "Powered By Popup Maker"
1700
  msgstr ""
1701
 
1702
- #: includes/scripts.php:202
1703
  msgid "Update"
1704
  msgstr ""
1705
 
1706
- #: includes/scripts.php:203
1707
  msgid "Insert"
1708
  msgstr ""
1709
 
1710
- #: includes/scripts.php:205
1711
  msgid "Popup Maker Shortcodes"
1712
  msgstr ""
1713
 
1714
- #: includes/scripts.php:206
1715
  msgid "Are you sure you want to delete this trigger?"
1716
  msgstr ""
1717
 
1718
- #: includes/scripts.php:207
1719
  msgid "Are you sure you want to delete this cookie?"
1720
  msgstr ""
1721
 
1722
- #: includes/scripts.php:213
1723
  msgid "Are you sure you want to reset the open count?"
1724
  msgstr ""
1725
 
@@ -1755,6 +1755,10 @@ msgstr ""
1755
  msgid "Add additional classes for styling."
1756
  msgstr ""
1757
 
 
 
 
 
1758
  #: includes/shortcodes/class-pum-shortcode-popup-trigger.php:24
1759
  msgid "Popup Trigger"
1760
  msgstr ""
60
  msgid "A Popup Preview"
61
  msgstr ""
62
 
63
+ #: includes/admin/class-pum-admin-helpers.php:14, includes/scripts.php:206
64
  msgid "Cancel"
65
  msgstr ""
66
 
67
+ #: includes/admin/class-pum-admin-helpers.php:16, includes/scripts.php:202
68
  msgid "Add"
69
  msgstr ""
70
 
711
  msgid "Popup Maker Settings"
712
  msgstr ""
713
 
714
+ #: includes/admin/settings/settings-page.php:52, includes/admin/settings/settings-page.php:58, includes/admin/tools/tools-page.php:54, includes/admin/tools/tools-page.php:61, includes/scripts.php:203
715
  msgid "Save"
716
  msgstr ""
717
 
955
  msgid "Choose a corner radius for your close button."
956
  msgstr ""
957
 
958
+ #: includes/class-pum-condition.php:75
959
  msgid "Condition"
960
  msgstr ""
961
 
987
  msgid "Submit"
988
  msgstr ""
989
 
990
+ #: includes/class-pum-freemius.php:96
991
  msgid "Usage Statistics"
992
  msgstr ""
993
 
994
+ #: includes/class-pum-freemius.php:97
995
  msgid "Popup & Theme Counts, Open Counts"
996
  msgstr ""
997
 
998
+ #: includes/class-pum-freemius.php:120
999
  msgid "Allow %3$sPopup Maker%4$s​ to collect some usage data with %2$s to make the plugin even more awesome. If you skip this, that's okay! ​%3$sPopup Maker%4$s will still work just fine."
1000
  msgstr ""
1001
 
1155
  msgid "Google Web Fonts&#10549;"
1156
  msgstr ""
1157
 
1158
+ #: includes/input-options.php:26, includes/input-options.php:115, includes/scripts.php:214
1159
  msgid "None"
1160
  msgstr ""
1161
 
1687
  msgid "This allows custom css classes, ids or selector strings to trigger the popup when clicked. Separate multiple selectors using commas."
1688
  msgstr ""
1689
 
1690
+ #: includes/pum-trigger-functions.php:117, includes/shortcodes/class-pum-shortcode-popup-close.php:63, includes/shortcodes/class-pum-shortcode-popup-trigger.php:76
1691
  msgid "Do not prevent the default click functionality."
1692
  msgstr ""
1693
 
1694
+ #: includes/pum-trigger-functions.php:118, includes/shortcodes/class-pum-shortcode-popup-trigger.php:77
1695
  msgid "This prevents us from disabling the browsers default action when a trigger is clicked. It can be used to allow a link to a file to both trigger a popup and still download the file."
1696
  msgstr ""
1697
 
1698
+ #: includes/scripts.php:59
1699
  msgid "Powered By Popup Maker"
1700
  msgstr ""
1701
 
1702
+ #: includes/scripts.php:204
1703
  msgid "Update"
1704
  msgstr ""
1705
 
1706
+ #: includes/scripts.php:205
1707
  msgid "Insert"
1708
  msgstr ""
1709
 
1710
+ #: includes/scripts.php:207
1711
  msgid "Popup Maker Shortcodes"
1712
  msgstr ""
1713
 
1714
+ #: includes/scripts.php:208
1715
  msgid "Are you sure you want to delete this trigger?"
1716
  msgstr ""
1717
 
1718
+ #: includes/scripts.php:209
1719
  msgid "Are you sure you want to delete this cookie?"
1720
  msgstr ""
1721
 
1722
+ #: includes/scripts.php:215
1723
  msgid "Are you sure you want to reset the open count?"
1724
  msgstr ""
1725
 
1755
  msgid "Add additional classes for styling."
1756
  msgstr ""
1757
 
1758
+ #: includes/shortcodes/class-pum-shortcode-popup-close.php:64
1759
+ msgid "This prevents us from disabling the browsers default action when a close button is clicked. It can be used to allow a link to a file to both close a popup and still download the file."
1760
+ msgstr ""
1761
+
1762
  #: includes/shortcodes/class-pum-shortcode-popup-trigger.php:24
1763
  msgid "Popup Trigger"
1764
  msgstr ""
popup-maker.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wppopupmaker.com/
5
  * Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
6
  * Author: WP Popup Maker
7
- * Version: 1.4.18
8
  * Author URI: https://wppopupmaker.com/
9
  * Text Domain: popup-maker
10
  *
4
  * Plugin URI: https://wppopupmaker.com/
5
  * Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
6
  * Author: WP Popup Maker
7
+ * Version: 1.4.19
8
  * Author URI: https://wppopupmaker.com/
9
  * Text Domain: popup-maker
10
  *
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === Popup Maker ===
2
- Contributors: danieliser, wppopupmaker
3
  Author URI: https://wppopupmaker.com/?utm_source=WordPress+Page&utm_medium=Readme+Link&utm_campaign=Author+URI
4
  Plugin URI: https://wppopupmaker.com/?utm_source=WordPress+Page&utm_medium=Readme+Link&utm_campaign=Plugin+URI
5
  Donate link:
6
  Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
7
  Requires at least: 3.6
8
  Tested up to: 4.6
9
- Stable tag: 1.4.18
10
  License: GNU Version 3 or Any Later Version
11
 
12
  Easily create attractive popups. Customize nearly every aspect of your popups, from theme & position, to targeting & cookies.
@@ -90,6 +90,14 @@ There are several common causes for this which include:
90
 
91
  == Changelog ==
92
 
 
 
 
 
 
 
 
 
93
  = v1.4.18 - 8/15/2016 =
94
  * Fix: Bug with PHP 5.2 compatibility.
95
  * Fix: Added missing post_type index condition callback.
@@ -100,7 +108,7 @@ There are several common causes for this which include:
100
  = v1.4.16 - 8/14/2016 =
101
  * Feature: New Condition: Pages: With Template. Thanks @cedmund.
102
  * Feature: Option to Disable reposition on window resize/scroll.
103
- * Improvement: Enable Visual Composer for Popups by default (VC 4.8+).
104
  * Improvement: Replaced usage of gif hex code with loading of an actual tracking gif to prevent security scanners from throwing false positives.
105
  * Improvement: Changed default analytics response with a 204 no content heading, saving the need to load & return a tracking gif.
106
  * Fix: Missing condition value bug fixed by adding sanity checks to conditions on get.
1
  === Popup Maker ===
2
+ Contributors: danieliser, wppopupmaker, waltmesser
3
  Author URI: https://wppopupmaker.com/?utm_source=WordPress+Page&utm_medium=Readme+Link&utm_campaign=Author+URI
4
  Plugin URI: https://wppopupmaker.com/?utm_source=WordPress+Page&utm_medium=Readme+Link&utm_campaign=Plugin+URI
5
  Donate link:
6
  Tags: responsive popup, promotion, popover, pop-up, pop over, marketing, lightbox, advertising, conversion, modal, popup, popups
7
  Requires at least: 3.6
8
  Tested up to: 4.6
9
+ Stable tag: 1.4.19
10
  License: GNU Version 3 or Any Later Version
11
 
12
  Easily create attractive popups. Customize nearly every aspect of your popups, from theme & position, to targeting & cookies.
90
 
91
  == Changelog ==
92
 
93
+ = v1.4.19 - 9/30/2016 =
94
+ * Feature: Added a do_default parameter to the trigger & close shortcodes. This allows making close buttons that also download a file.
95
+ * Improvement: Added support for JS (advanced) conditions & condition processing after checking for cookies.
96
+ * Improvement: Upgraded from jQuery-Cookie (modified) to JS-Cookie (modified) for more flexibility.
97
+ * Fix: Bug where color didn't update properly when first clicked in theme editor.
98
+ * Fix: Added prefix to admin pages to prevent conflicts.
99
+ * Fix: Removed usage of deprecated filter.
100
+
101
  = v1.4.18 - 8/15/2016 =
102
  * Fix: Bug with PHP 5.2 compatibility.
103
  * Fix: Added missing post_type index condition callback.
108
  = v1.4.16 - 8/14/2016 =
109
  * Feature: New Condition: Pages: With Template. Thanks @cedmund.
110
  * Feature: Option to Disable reposition on window resize/scroll.
111
+ * Improvement: Enable Visual Composer for Popups by default (VC 4.8+). Thanks @NoahjChampion.
112
  * Improvement: Replaced usage of gif hex code with loading of an actual tracking gif to prevent security scanners from throwing false positives.
113
  * Improvement: Changed default analytics response with a 204 no content heading, saving the need to load & return a tracking gif.
114
  * Fix: Missing condition value bug fixed by adding sanity checks to conditions on get.