3 lines
40 KiB
JavaScript
3 lines
40 KiB
JavaScript
/*! For license information please see oc-cdn-settings.js.LICENSE.txt */
|
|
(()=>{var e={530:()=>{var e=Object.defineProperty,t=(t,n,r)=>(((t,n,r)=>{n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r})(t,"symbol"!=typeof n?n+"":n,r),r);const n={};async function r(e){if(n.hasOwnProperty(e))return n[e];let t;return t=e.startsWith("data:")||!("caches"in self)?fetch(e).then((e=>e.text())):caches.open("gravity").then((async t=>{let n=await t.match(e);return n||(n=await fetch(e),n.ok&&await t.put(e,n.clone())),n.text()})),n[e]=t,t}class o extends HTMLElement{static get observedAttributes(){return["src"]}fetchFlag(e){e&&r(e).then((e=>this.innerHTML=e))}connectedCallback(){this.fetchFlag(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchFlag(n)}}t(o,"TAG_NAME","gv-flag");class a extends HTMLElement{static get observedAttributes(){return["src"]}fetchIcon(e){e&&r(e).then((e=>this.innerHTML=e))}connectedCallback(){this.fetchIcon(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIcon(n)}}t(a,"TAG_NAME","gv-icon");class i extends HTMLElement{static get observedAttributes(){return["src"]}fetchIllustration(e){e&&r(e).then((e=>this.innerHTML=e))}connectedCallback(){this.fetchIllustration(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIllustration(n)}}t(i,"TAG_NAME","gv-illustration");class c extends HTMLElement{static get observedAttributes(){return["src"]}fetchIndicator(e){e&&r(e).then((e=>this.innerHTML=e))}connectedCallback(){this.fetchIndicator(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchIndicator(n)}}t(c,"TAG_NAME","gv-indicator");class s extends HTMLElement{static get observedAttributes(){return["src"]}fetchLoader(e){e&&r(e).then((e=>this.innerHTML=e))}connectedCallback(){this.fetchLoader(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchLoader(n)}}t(s,"TAG_NAME","gv-loader");class l extends HTMLElement{static get observedAttributes(){return["src"]}fetchLogo(e){e&&r(e).then((e=>this.innerHTML=e))}connectedCallback(){this.fetchLogo(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchLogo(n)}}t(l,"TAG_NAME","gv-logo");class u extends HTMLElement{static get observedAttributes(){return["src"]}fetchPayIcon(e){e&&r(e).then((e=>this.innerHTML=e))}connectedCallback(){this.fetchPayIcon(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchPayIcon(n)}}t(u,"TAG_NAME","gv-pay-icon");class d extends HTMLElement{static get observedAttributes(){return["src"]}fetchTile(e){e&&r(e).then((e=>this.innerHTML=e))}connectedCallback(){this.fetchTile(this.getAttribute("src"))}attributeChangedCallback(e,t,n){"src"===e&&t!==n&&this.fetchTile(n)}}function f(e,t){customElements.get(e)||customElements.define(e,t)}t(d,"TAG_NAME","gv-tile"),f(o.TAG_NAME,o),f(a.TAG_NAME,a),f(i.TAG_NAME,i),f(c.TAG_NAME,c),f(s.TAG_NAME,s),f(l.TAG_NAME,l),f(u.TAG_NAME,u),f(d.TAG_NAME,d)},7:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,a),r(n)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,o)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var i=10;function c(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function s(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var o,a,i,l;if(c(n),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),a=e._events),i=a[t]),void 0===i)i=a[t]=n,++e._eventsCount;else if("function"==typeof i?i=a[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),(o=s(e))>0&&i.length>o&&!i.warned){i.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=i.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function f(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):v(o,o.length)}function h(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(a){r.once&&e.removeEventListener(t,o),n(a)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return s(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var o="error"===e,a=this._events;if(void 0!==a)o=o&&void 0===a.error;else if(!o)return!1;if(o){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var c=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw c.context=i,c}var s=a[e];if(void 0===s)return!1;if("function"==typeof s)r(s,this,t);else{var l=s.length,u=v(s,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return c(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return c(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,a,i;if(c(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){i=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,i||t)}return this},a.prototype.off=a.prototype.removeListener,a.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 o,a=Object.keys(n);for(r=0;r<a.length;++r)"removeListener"!==(o=a[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}(()=>{"use strict";const e=wp.element;n(530);const t=new(n(7).EventEmitter),r=function(e){var t=e.type,n=void 0===t?"button":t,r=e.className,o=void 0===r?"gv-button":r,a=e.onClick,i=e.disabled,c=void 0!==i&&i,s=e.children,l=e.iconSrc,u=e.title,d=e.dataUpsell,f=void 0===d?"":d;return React.createElement("button",{type:n,className:o,onClick:a,disabled:c,title:u,"data-upsell-btn-event":f},s,l&&React.createElement("gv-icon",{src:l}))};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(){a=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),c=new j(r||[]);return i(a,"_invoke",{value:R(e,n,c)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var v="suspendedStart",g="suspendedYield",m="executing",p="completed",y={};function b(){}function w(){}function E(){}var C={};d(C,s,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==n&&r.call(x,s)&&(C=x);var S=E.prototype=b.prototype=Object.create(C);function L(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function n(a,i,c,s){var l=h(e[a],e,i);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==o(d)&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,c,s)}),(function(e){n("throw",e,c,s)})):t.resolve(d).then((function(e){u.value=e,c(u)}),(function(e){return n("throw",e,c,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function R(t,n,r){var o=v;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===p){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var s=M(c,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===v)throw o=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var l=h(t,n,r);if("normal"===l.type){if(o=r.done?p:g,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=p,r.method="throw",r.arg=l.arg)}}}function M(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=h(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function n(){for(;++a<t.length;)if(r.call(t,a))return n.value=t[a],n.done=!1,n;return n.value=e,n.done=!0,n};return i.next=i}}throw new TypeError(o(t)+" is not iterable")}return w.prototype=E,i(S,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:w,configurable:!0}),w.displayName=d(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,d(e,u,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},L(N.prototype),d(N.prototype,l,(function(){return this})),t.AsyncIterator=N,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new N(f(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(S),d(S,u,"Generator"),d(S,s,(function(){return this})),d(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],s=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const l=function(n){var o=n.ajaxUrl,s=n.purgeActionNonce,l=n.clearCacheMessage,u=n.isMobilePlaceholder,d=n.buttonTitle,f=void 0===d?"Clear Cache Now":d,h=n.loadingTitle,v=void 0===h?"Clearing Cache":h,g=n.purgeCache,m=void 0===g?1:g,p=n.isCDN,y=void 0!==p&&p,b=c((0,e.useState)(!1),2),w=b[0],E=b[1],C=c((0,e.useState)(window.matchMedia("(max-width: 600px)").matches),2),_=C[0],x=C[1],S="undefined"!=typeof vcacheSettings?vcacheSettings.imageDIR:CdnSettings.imageDIR;(0,e.useEffect)((function(){var e=window.matchMedia("(max-width: 600px)"),t=function(){x(e.matches)};return e.addEventListener("change",t),function(){return e.removeEventListener("change",t)}}),[]);var L=function(){var e,n=(e=a().mark((function e(){var n,r;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return E(!0),e.prev=1,e.next=4,fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"purge_cache",purge_cache:m,_wpnonce:s})});case 4:return n=e.sent,e.next=7,n.json();case 7:r=e.sent,n.ok&&r.success?t.emit("showNotice",{message:l.success,noticeClass:"gv-notice-success",icon:"".concat(S,"assets/images/check_circle.svg")}):t.emit("showNotice",{message:l.failure,noticeClass:"gv-notice-alert",icon:"".concat(S,"assets/images/error.svg")}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.emit("showNotice",{message:l.failure,noticeClass:"gv-notice-alert",icon:"".concat(S,"assets/images/error.svg")});case 14:return e.prev=14,E(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){i(a,r,o,c,s,"next",e)}function s(e){i(a,r,o,c,s,"throw",e)}c(void 0)}))});return function(){return n.apply(this,arguments)}}();return u&&!_||!u&&_?null:React.createElement(React.Fragment,null,_?React.createElement(r,{className:"gv-button gv-button-primary oc-clear-cache-cta gv-desk-hidden gv-tab-hidden\n ".concat(y?"ocwp_ocpc_cdn_cta_cleared_event":"ocwp_ocpc_cache_cta_cleared_event"),onClick:L,disabled:w},w?v:f):React.createElement(r,{className:"gv-button gv-button-primary oc-clear-cache-cta gv-max-mob-hidden ".concat(y?"ocwp_ocpc_cdn_cta_cleared_event":"ocwp_ocpc_cache_cta_cleared_event"),title:"Clear Cache",onClick:L,disabled:w},w?v:f))};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const d=function(){var n,o,a=(n=(0,e.useState)({isVisible:!1,message:"",noticeClass:"",icon:""}),o=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],s=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(n,o)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=a[0],c=a[1];return(0,e.useEffect)((function(){var e=function(e){var t=e.message,n=e.noticeClass,r=e.icon;c({isVisible:!0,message:t,noticeClass:n,icon:r}),setTimeout((function(){var e=document.querySelector(".gv-notice");if(e){var t=e.getBoundingClientRect();(t.top<0||t.bottom>window.innerHeight)&&e.scrollIntoView({behavior:"smooth",block:"start"})}}),100)};return t.on("showNotice",e),function(){t.off("showNotice",e)}}),[]),i.isVisible?React.createElement("div",{className:"gv-notice ".concat(i.noticeClass," gv-mb-lg")},React.createElement("gv-icon",{class:"gv-notice-icon",src:i.icon}),React.createElement("p",{className:"gv-notice-content"},i.message),React.createElement(r,{className:"gv-notice-close",onClick:function(){return c({isVisible:!1,message:"",noticeClass:"",icon:""})},iconSrc:"".concat("undefined"!=typeof CdnSettings?CdnSettings.imageDIR:vcacheSettings.imageDIR,"assets/images/close.svg")})):null},f=function(e){var t=e.selectedValue,n=e.onChange,r=e.activeLabel,o=void 0===r?"Active":r,a=e.inactiveLabel,i=void 0===a?"Inactive":a,c=e.name,s=void 0===c?"statusSelector":c;return React.createElement(React.Fragment,null,React.createElement("p",{className:"gv-text-sm gv-text-bold gv-mb-sm"},"Status"),React.createElement("div",{className:"gv-mode-condensed"},React.createElement("div",{className:"gv-form-option gv-mb-md"},React.createElement("div",{className:"gv-option-inline"},React.createElement("input",{id:"".concat(s,"-active"),type:"radio",name:s,value:"1",className:"gv-radio ".concat("cdnStatus"===s?"ocwp_ocpc_cdn_active_selected_event":"ocwp_ocpc_cache_active_selected_event"),checked:"1"===t,onChange:function(e){n(e.target.value)}}),React.createElement("label",{htmlFor:"".concat(s,"-active"),className:"gv-label"},o))),React.createElement("div",{className:"gv-form-option"},React.createElement("div",{className:"gv-option-inline"},React.createElement("input",{id:"".concat(s,"-inactive"),type:"radio",name:s,className:"gv-radio ".concat("cdnStatus"===s?"ocwp_ocpc_cdn_inactive_selected_event":"ocwp_ocpc_cache_inactive_selected_event"),value:"0",checked:"0"===t,onChange:function(e){n(e.target.value)}}),React.createElement("label",{htmlFor:"".concat(s,"-inactive"),className:"gv-label"},i)))))};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return(t=function(e){var t=function(e){if("object"!=h(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(){p=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:R(e,n,c)}),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",v="suspendedYield",g="executing",m="completed",y={};function b(){}function w(){}function E(){}var C={};l(C,i,(function(){return this}));var _=Object.getPrototypeOf,x=_&&_(_(T([])));x&&x!==n&&r.call(x,i)&&(C=x);var S=E.prototype=b.prototype=Object.create(C);function L(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function n(o,a,i,c){var s=d(e[o],e,a);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==h(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(u).then((function(e){l.value=e,i(l)}),(function(e){return n("throw",e,i,c)}))}c(s.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function R(t,n,r){var o=f;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var s=M(c,r);if(s){if(s===y)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===f)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var l=d(t,n,r);if("normal"===l.type){if(o=r.done?m:v,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function M(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,M(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=d(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(h(t)+" is not iterable")}return w.prototype=E,o(S,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=l(E,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,l(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},L(N.prototype),l(N.prototype,c,(function(){return this})),t.AsyncIterator=N,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new N(u(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(S),l(S,s,"Generator"),l(S,i,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function y(e,t,n,r,o,a,i){try{var c=e[a](i),s=c.value}catch(e){return void n(e)}c.done?t(s):Promise.resolve(s).then(r,o)}var b=function(){var e,n=(e=p().mark((function e(n){var r,o,a,i,c,s,l,u,d,f;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.validateExcludeCdnData,o=n.setIsLoading,a=n.cdnState,i=n.isMWP,c=n.devMode,s=n.devDuration,l=n.excludeCdnMode,u=n.excludeCdnData,r()){e.next=3;break}return e.abrupt("return");case 3:return o(!0),e.prev=4,e.next=7,fetch(CdnSettings.ajax_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(g({action:"oc_handle_cdn_settings",cdn_state:a,oc_csrf:CdnSettings.nonce},i&&{dev_mode:"1"===c?1:0,dev_duration:s,exclude_cdn_mode:"1"===l?1:0,exclude_cdn_data:u}))});case 7:return d=e.sent,e.next=10,d.json();case 10:"success"===(f=e.sent).status?(console.log("Saved successfully:",f),t.emit("showNotice",{message:CdnSettings.settingsSaveMessage.success,icon:"".concat(CdnSettings.imageDIR,"assets/images/check_circle.svg"),noticeClass:"gv-notice-success"})):t.emit("showNotice",{message:CdnSettings.settingsSaveMessage.failure,icon:"".concat(CdnSettings.imageDIR,"assets/images/error.svg"),noticeClass:"gv-notice-alert"}),e.next=18;break;case 14:e.prev=14,e.t0=e.catch(4),console.error("Save failed:",e.t0),t.emit("showNotice",{message:CdnSettings.settingsSaveMessage.failure,icon:"".concat(CdnSettings.imageDIR,"assets/images/error.svg"),noticeClass:"gv-notice-alert"});case 18:return e.prev=18,o(!1),e.finish(18);case 21:case"end":return e.stop()}}),e,null,[[4,14,18,21]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){y(a,r,o,i,c,"next",e)}function c(e){y(a,r,o,i,c,"throw",e)}i(void 0)}))});return function(e){return n.apply(this,arguments)}}(),w=function(e){return["true","1",1].includes(e)?"1":"0"};const E=function(e){var t=e.devMode,n=e.setDevMode,r=e.labelTitle,o=e.description;return React.createElement("div",{className:"gv-mode-condensed"},React.createElement("div",{className:"gv-form-option gv-mt-sm gv-mb-sm"},React.createElement("div",{className:"gv-option-inline"},React.createElement("div",{className:"gv-toggle"},React.createElement("input",{type:"checkbox",className:"ocwp_ocpc_cdn_dev_mode_toggled_event",id:"dev-mode",checked:"1"===t,onChange:function(e){return n(e.target.checked?"1":"0")}}),React.createElement("div",{className:"gv-toggle-slider"})),React.createElement("label",{htmlFor:"dev-mode",className:"gv-label"},React.createElement("span",null,r),React.createElement("span",{className:"gv-description"},o)))))},C=function(e){var t=e.devMode,n=e.devDuration,o=e.setDevDuration,a=e.handleDevDurationChange;return React.createElement("div",{className:"gv-form-option oc-hours-wrap"},React.createElement("label",{htmlFor:"oc-dev-mode-hrs",className:"gv-label gv-text-bold gv-text-on-alternative oc-dev-hrs"},"Hours"),React.createElement("div",{id:"oc-dev-mode-hrs",className:"gv-input gv-input-number ".concat(t?"":"gv-disabled")},React.createElement(r,{className:"gv-subtract",onClick:function(){return o(Math.max(Number(n)-1,1))},disabled:"1"!==t||n<=1,iconSrc:"".concat(CdnSettings.imageDIR,"assets/images/remove.svg")}),React.createElement("input",{type:"number",value:n,onChange:a,disabled:"1"!==t}),React.createElement(r,{className:"gv-add",onClick:function(){return o(Number(n)+1)},disabled:"1"!==t,iconSrc:"".concat(CdnSettings.imageDIR,"assets/images/add.svg")})))},_=function(e){var t=e.excludeCdnMode,n=e.setExcludeCdnMode,r=e.excludeTitle,o=e.excludeDescription;return React.createElement("div",{className:"gv-mode-condensed gv-mt-md gv-mb-sm"},React.createElement("div",{className:"gv-form-option"},React.createElement("div",{className:"gv-option-inline"},React.createElement("div",{className:"gv-toggle"},React.createElement("input",{type:"checkbox",id:"exclude-from-cdn",className:"ocwp_ocpc_cdn_exclude_toggled",checked:"1"===t,onChange:function(e){return n(e.target.checked?"1":"0")}}),React.createElement("div",{className:"gv-toggle-slider"})),React.createElement("label",{htmlFor:"exclude-from-cdn",className:"gv-label"},React.createElement("span",null,r),React.createElement("span",{className:"gv-description gv-mb-sm"},o)))))},x=function(e){var t=e.excludeCdnMode,n=e.excludeCdnData,r=(e.setExcludeCdnData,e.onChange),o=e.excludeCdnError,a=e.excludeCaption;return React.createElement("div",{className:"gv-form-option oc-exclude-data"},React.createElement("label",{htmlFor:"oc-exclude-cdn-list",className:"gv-label gv-text-bold gv-text-on-alternative oc-dev-hrs"},CdnSettings.labelExclude),React.createElement("textarea",{id:"oc-exclude-cdn-list",className:"gv-input gv-input-textarea ".concat(t?"":"gv-disabled"," ").concat(o?"gv-error":""),placeholder:".jpg\nmyfile.jpg\nwp-content/uploads/2025/file.jpg",value:n,onChange:r,disabled:"1"!==t}),o?React.createElement("span",{className:"gv-input-message gv-error"},o):"1"===t&&React.createElement("span",{className:"gv-input-message"},a))},S=function(e){var t=e.heading,n=e.message,o=e.handleUpgradeClick,a=e.overlayIcon;return React.createElement("div",{className:"cdn-overlay"},React.createElement("gv-icon",{src:a}),React.createElement("p",{className:"gv-text-sm gv-text-bold"},t||"This section is disabled for non-MWP users."),React.createElement("p",{className:"gv-text-sm"},n||"Upgrade now to get access to development mode and exclude CDN feature."),React.createElement(r,{className:"gv-button gv-button-cta gv-mt-md ocwp_ocpc_cdn_mwp_upgrade_initiated_event oc-show-modal",dataUpsell:"ocwp_ocpc_cdn_mwp_upgrade_confirmed_event",onClick:o,iconSrc:"".concat(CdnSettings.imageDIR,"assets/images/expand_new.svg")},CdnSettings.upgradeBtn||"Upgrade now"))};function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],s=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return N(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var R=document.getElementById("occdn-notice-placeholder");R&&(0,e.createRoot)(R).render(React.createElement(d,null));var M=document.getElementById("clear-cdn-container-desktop");M&&(0,e.createRoot)(M).render(React.createElement(e.StrictMode,null,React.createElement(l,{ajaxUrl:CdnSettings.ajax_url,purgeActionNonce:CdnSettings.nonce,clearCacheMessage:CdnSettings.clearCacheMessage,isMobilePlaceholder:!1,buttonTitle:CdnSettings.clearCache,loadingTitle:CdnSettings.clearingCache,purgeCache:"cdn",isCDN:!0})));var A=document.getElementById("clear-cdn-container-mobile");A&&(0,e.createRoot)(A).render(React.createElement(e.StrictMode,null,React.createElement(l,{ajaxUrl:CdnSettings.ajax_url,purgeActionNonce:CdnSettings.nonce,clearCacheMessage:CdnSettings.clearCacheMessage,isMobilePlaceholder:!0,buttonTitle:CdnSettings.clearCache,loadingTitle:CdnSettings.clearingCache,purgeCache:"cdn",isCDN:!0})));const O=function(t){t.handleSave;var n=L((0,e.useState)((function(){return w(CdnSettings.CdnStatus)})),2),o=n[0],a=n[1],i=L((0,e.useState)((function(){return w(CdnSettings.devModeStatus)})),2),c=i[0],s=i[1],l=L((0,e.useState)((function(){return w(CdnSettings.excludeCdnStatus)})),2),u=l[0],d=l[1],h=L((0,e.useState)((function(){return CdnSettings.devModeDuration||1})),2),v=h[0],g=h[1],m=L((0,e.useState)((function(){return CdnSettings.excludeCdnData||""})),2),p=m[0],y=m[1],N=L((0,e.useState)(!1),2),R=N[0],M=N[1],A=L((0,e.useState)(""),2),O=A[0],j=A[1],T=CdnSettings.isMWP;return(0,e.useEffect)((function(){"1"!==u&&j("")}),[u]),React.createElement("div",null,React.createElement(f,{selectedValue:o,onChange:a,activeLabel:CdnSettings.lblActive,inactiveLabel:CdnSettings.lblInactive,name:"cdnStatus"}),React.createElement("p",{className:"gv-text-sm gv-text-bold gv-mt-md"},CdnSettings.CdnTitle),React.createElement("div",{className:"cdn-container ".concat(T?"":"oc-cdn-disabled")},!T&&React.createElement(S,{message:CdnSettings.mwpDisabledMessage,heading:CdnSettings.mwpDisabledHeading,handleUpgradeClick:function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"oc_um_overlay",t=document.getElementById(e);t&&(t.style.display="flex")}("oc_um_overlay")},overlayIcon:"".concat(CdnSettings.imageDIR,"assets/images/mwp-lock.svg")}),React.createElement(E,{devMode:c,setDevMode:s,labelTitle:CdnSettings.devModeTitle,description:CdnSettings.devModeDescription}),React.createElement(C,{devMode:c,devDuration:v,setDevDuration:g,handleDevDurationChange:function(e){return function(e,t){var n=parseInt(e.target.value,10);t(isNaN(n)||n<1?1:n)}(e,g)}}),React.createElement(_,{excludeCdnMode:u,setExcludeCdnMode:d,excludeTitle:CdnSettings.excludeTitle,excludeDescription:CdnSettings.excludeDescription}),React.createElement(x,{excludeCdnMode:u,excludeCdnData:p,setExcludeCdnData:y,onChange:function(e){return function(e,t,n){var r=e.target.value;t(r),r.trim()&&n("")}(e,y,j)},excludeCdnError:O,excludeCaption:CdnSettings.excludeCdnMsg})),React.createElement(r,{className:"gv-button gv-button-primary gv-mt-md ocwp_ocpc_cdn_settings_saved",isLoading:R,onClick:function(){b({validateExcludeCdnData:function(){return function(e,t,n,r){return!("1"===e&&!t.trim()&&(n(r),1))}(u,p,j,CdnSettings.excludeValidationMsg)},setIsLoading:M,cdnState:o,isMWP:T,devMode:c,devDuration:v,excludeCdnMode:u,excludeCdnData:p})},disabled:R},R?CdnSettings.labelSaving:CdnSettings.labelSave))};var j=document.getElementById("onecom-cdn-root");j?(0,e.createRoot)(j).render(React.createElement(e.StrictMode,null,React.createElement(O,null))):console.error("Error: onecom-cdn-root not found in the DOM")})()})();
|
|
//# sourceMappingURL=oc-cdn-settings.js.map
|