window.maintenance=function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=500)}({0:function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},1:function(e,t,n){"use strict";t.__esModule=!0;var r=n(19),i=function(e){return e&&e.__esModule?e:{default:e}}(r);t.default=function(){function e(e,t){for(var n=0;n0?r:n)(e)}},4:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},43:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},46:function(e,t,n){var r=n(38);e.exports=function(e){return Object(r(e))}},47:function(e,t,n){var r=n(50)("keys"),i=n(43);e.exports=function(e){return r[e]||(r[e]=i(e))}},48:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},49:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},50:function(e,t,n){var r=n(5),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},500:function(e,t,n){"use strict";var r=n(96),i=function(e){return e&&e.__esModule?e:{default:e}}(r);/** * Copyright since 2007 PrestaShop SA and Contributors * PrestaShop is an International Registered Trademark & Property of PrestaShop SA * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.md. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@prestashop.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://devdocs.prestashop.com/ for more information. * * @author PrestaShop SA and Contributors * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ (0,window.$)(function(){new i.default})},51:function(e,t,n){var r=n(48);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},52:function(e,t){t.f={}.propertyIsEnumerable},53:function(e,t,n){"use strict";function r(e){console&&console.warn&&console.warn(e)}function i(){i.init.call(this)}function o(e){return void 0===e._maxListeners?i.defaultMaxListeners:e._maxListeners}function a(e,t,n,i){var a,s,u;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(s=e._events,void 0===s?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),u=s[t]),void 0===u)u=s[t]=n,++e._eventsCount;else if("function"==typeof u?u=s[t]=i?[n,u]:[u,n]:i?u.unshift(n):u.push(n),(a=o(e))>0&&u.length>a&&!u.warned){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=u.length,r(c)}return e}function s(){for(var e=[],t=0;t0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)m(s,this,t);else for(var u=s.length,c=f(s,u),n=0;n=0;o--)if(n[o]===t||n[o].listener===t){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():p(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r=0;r--)this.removeListener(e,t[r]);return this},i.prototype.listeners=function(e){return c(this,e,!0)},i.prototype.rawListeners=function(e){return c(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):l.call(e,t)},i.prototype.listenerCount=l,i.prototype.eventNames=function(){return this._eventsCount>0?v(this._events):[]}},55:function(e,t,n){var r=n(27),i=n(22),o=n(58)(!1),a=n(47)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},56:function(e,t,n){var r=n(39),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},57:function(e,t){t.f=Object.getOwnPropertySymbols},58:function(e,t,n){var r=n(22),i=n(56),o=n(59);e.exports=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},59:function(e,t,n){var r=n(39),i=Math.max,o=Math.min;e.exports=function(e,t){return e=r(e),e<0?i(e+t,0):o(e,t)}},6:function(e,t,n){var r=n(11),i=n(17),o=n(13),a=Object.defineProperty;t.f=n(2)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},7:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},8:function(e,t,n){var r=n(5),i=n(3),o=n(15),a=n(10),s=function(e,t,n){var u,c,l,f=e&s.F,p=e&s.G,d=e&s.S,v=e&s.P,h=e&s.B,m=e&s.W,y=p?i:i[t]||(i[t]={}),g=y.prototype,_=p?r:d?r[t]:(r[t]||{}).prototype;p&&(n=t);for(u in n)(c=!f&&_&&void 0!==_[u])&&u in y||(l=c?_[u]:n[u],y[u]=p&&"function"!=typeof _[u]?n[u]:h&&c?o(l,r):m&&_[u]==l?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(l):v&&"function"==typeof l?o(Function.call,l):l,v&&((y.virtual||(y.virtual={}))[u]=l,e&s.R&&g&&!g[u]&&a(g,u,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},80:function(e,t,n){e.exports={default:n(81),__esModule:!0}},81:function(e,t,n){n(85),e.exports=n(3).Object.assign},83:function(e,t,n){"use strict";var r=n(34),i=n(57),o=n(52),a=n(46),s=n(51),u=Object.assign;e.exports=!u||n(7)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=a(e),u=arguments.length,c=1,l=i.f,f=o.f;u>c;)for(var p,d=s(arguments[c++]),v=l?r(d).concat(l(d)):r(d),h=v.length,m=0;h>m;)f.call(d,p=v[m++])&&(n[p]=d[p]);return n}:u},85:function(e,t,n){var r=n(8);r(r.S+r.F,"Object",{assign:n(83)})},96:function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(80),o=r(i),a=n(0),s=r(a),u=n(1),c=r(u),l=(n(36),window),f=l.$,p=function(){function e(t){if((0,s.default)(this,e),t=t||{},this.tinyMCELoaded=!1,void 0===t.baseAdminUrl)if(void 0!==window.baseAdminDir)t.baseAdminUrl=window.baseAdminDir;else{var n=window.location.pathname.split("/");n.every(function(e){return""===e||(t.baseAdminUrl="/"+e+"/",!1)})}void 0===t.langIsRtl&&(t.langIsRtl=void 0!==window.lang_is_rtl&&"1"===window.lang_is_rtl),this.setupTinyMCE(t)}return(0,c.default)(e,[{key:"setupTinyMCE",value:function(e){"undefined"==typeof tinyMCE?this.loadAndInitTinyMCE(e):this.initTinyMCE(e)}},{key:"initTinyMCE",value:function(e){var t=this;e=(0,o.default)({selector:".rte",plugins:"align colorpicker link image filemanager table media placeholder advlist code table autoresize",browser_spellcheck:!0,toolbar1:"code,colorpicker,bold,italic,underline,strikethrough,blockquote,link,align,bullist,numlist,table,image,media,formatselect",toolbar2:"",external_filemanager_path:e.baseAdminUrl+"filemanager/",filemanager_title:"File manager",external_plugins:{filemanager:e.baseAdminUrl+"filemanager/plugin.min.js"},language:iso_user,content_style:e.langIsRtl?"body {direction:rtl;}":"",skin:"prestashop",menubar:!1,statusbar:!1,relative_urls:!1,convert_urls:!1,entity_encoding:"raw",extended_valid_elements:"em[class|name|id],@[role|data-*|aria-*]",valid_children:"+*[*]",valid_elements:"*[*]",rel_list:[{title:"nofollow",value:"nofollow"}],editor_selector:"autoload_rte",init_instance_callback:function(){t.changeToMaterial()},setup:function(e){t.setupEditor(e)}},e),void 0!==e.editor_selector&&(e.selector="."+e.editor_selector),f("body").on("click",".mce-btn, .mce-open, .mce-menu-item",function(){t.changeToMaterial()}),tinyMCE.init(e),this.watchTabChanges(e)}},{key:"setupEditor",value:function(e){var t=this;e.on("loadContent",function(e){t.handleCounterTiny(e.target.id)}),e.on("change",function(e){tinyMCE.triggerSave(),t.handleCounterTiny(e.target.id)}),e.on("blur",function(){tinyMCE.triggerSave()})}},{key:"watchTabChanges",value:function(e){f(e.selector).each(function(e,t){var n=f(t).closest(".translation-field"),r=f(t).closest(".translations.tabbable");if(n.length&&r.length){var i=n.data("locale");f('.nav-item a[data-locale="'+i+'"]',r).on("shown.bs.tab",function(){var e=(f(t).closest("form"),tinyMCE.get(t.id));e&&e.setContent(e.getContent())})}})}},{key:"loadAndInitTinyMCE",value:function(e){var t=this;if(!this.tinyMCELoaded){this.tinyMCELoaded=!0;var n=e.baseAdminUrl.split("/");n.splice(n.length-2,2);var r=n.join("/");window.tinyMCEPreInit={},window.tinyMCEPreInit.base=r+"/js/tiny_mce",window.tinyMCEPreInit.suffix=".min",f.getScript(r+"/js/tiny_mce/tinymce.min.js",function(){t.setupTinyMCE(e)})}}},{key:"changeToMaterial",value:function(){var e={"mce-i-code":'code',"mce-i-none":'format_color_text',"mce-i-bold":'format_bold',"mce-i-italic":'format_italic',"mce-i-underline":'format_underlined',"mce-i-strikethrough":'format_strikethrough',"mce-i-blockquote":'format_quote',"mce-i-link":'link',"mce-i-alignleft":'format_align_left',"mce-i-aligncenter":'format_align_center',"mce-i-alignright":'format_align_right',"mce-i-alignjustify":'format_align_justify',"mce-i-bullist":'format_list_bulleted',"mce-i-numlist":'format_list_numbered',"mce-i-image":'image',"mce-i-table":'grid_on',"mce-i-media":'video_library',"mce-i-browse":'attachment',"mce-i-checkbox":''};f.each(e,function(e,t){f("."+e).replaceWith(t)})}},{key:"handleCounterTiny",value:function(e){var t=f("#"+e),n=t.attr("counter"),r=t.attr("counter_type"),i=tinyMCE.activeEditor.getBody().textContent.length;t.parent().find("span.currentLength").text(i),"recommended"!==r&&i>n?t.parent().find("span.maxLength").addClass("text-danger"):t.parent().find("span.maxLength").removeClass("text-danger")}}]),e}();t.default=p}});