!function(){var t={742:function(t,e){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,i=c(t),a=i[0],s=i[1],l=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),u=0,f=s>0?a-4:a;for(n=0;n>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,l[u++]=255&e);1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},e.fromByteArray=function(t){for(var e,r=t.length,o=r%3,i=[],a=16383,c=0,l=r-o;cl?l:c+a));1===o?(e=t[r-1],i.push(n[e>>2]+n[e<<4&63]+"==")):2===o&&(e=(t[r-2]<<8)+t[r-1],i.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function s(t,e,r){for(var o,i,a=[],c=e;c>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},764:function(t,e,n){"use strict"; /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */const r=n(742),o=n(645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function c(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return l(t,e,n)}function l(t,e,n){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|y(t,e);let r=c(n);const o=r.write(t,e);o!==n&&(r=r.slice(0,o));return r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return s.from(r,e,n);const o=function(t){if(s.isBuffer(t)){const e=0|h(t.length),n=c(e);return 0===n.length||t.copy(n,0,0,e),n}if(void 0!==t.length)return"number"!=typeof t.length||X(t.length)?c(0):p(t);if("Buffer"===t.type&&Array.isArray(t.data))return p(t.data)}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return u(t),c(t<0?0:0|h(t))}function p(t){const e=t.length<0?0:0|h(t.length),n=c(e);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function y(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(o)return r?-1:Y(t).length;e=(""+e).toLowerCase(),o=!0}}function m(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return N(this,e,n);case"utf8":case"utf-8":return C(this,e,n);case"ascii":return S(this,e,n);case"latin1":case"binary":return B(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,o){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,o);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,o){let i,a=1,c=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,c/=2,s/=2,n/=2}function l(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){let r=-1;for(i=n;ic&&(n=c-s),i=n;i>=0;i--){let n=!0;for(let r=0;ro&&(r=o):r=o;const i=e.length;let a;for(r>i/2&&(r=i/2),a=0;a>8,o=n%256,i.push(o),i.push(r);return i}(e,t.length-n),t,n,r)}function x(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function C(t,e,n){n=Math.min(t.length,n);const r=[];let o=e;for(;o239?4:e>223?3:e>191?2:1;if(o+a<=n){let n,r,c,s;switch(a){case 1:e<128&&(i=e);break;case 2:n=t[o+1],128==(192&n)&&(s=(31&e)<<6|63&n,s>127&&(i=s));break;case 3:n=t[o+1],r=t[o+2],128==(192&n)&&128==(192&r)&&(s=(15&e)<<12|(63&n)<<6|63&r,s>2047&&(s<55296||s>57343)&&(i=s));break;case 4:n=t[o+1],r=t[o+2],c=t[o+3],128==(192&n)&&128==(192&r)&&128==(192&c)&&(s=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&c,s>65535&&s<1114112&&(i=s))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(t){const e=t.length;if(e<=j)return String.fromCharCode.apply(String,t);let n="",r=0;for(;rr.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(r,o)):Uint8Array.prototype.set.call(r,e,o);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,o)}o+=e.length}return r},s.byteLength=y,s.prototype._isBuffer=!0,s.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;en&&(t+=" ... "),""},i&&(s.prototype[i]=s.prototype.inspect),s.prototype.compare=function(t,e,n,r,o){if(J(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),e<0||n>t.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&e>=n)return 0;if(r>=o)return-1;if(e>=n)return 1;if(this===t)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const c=Math.min(i,a),l=this.slice(r,o),u=t.slice(e,n);for(let t=0;t>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-e;if((void 0===n||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":case"latin1":case"binary":return E(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const j=4096;function S(t,e,n){let r="";n=Math.min(t.length,n);for(let o=e;or)&&(n=r);let o="";for(let r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,n,r,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function L(t,e,n,r,o){$(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i,i>>=8,t[n++]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function I(t,e,n,r,o){$(e,r,o,t,n,7);let i=Number(e&BigInt(4294967295));t[n+7]=i,i>>=8,t[n+6]=i,i>>=8,t[n+5]=i,i>>=8,t[n+4]=i;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function R(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(t,e,n,r,i){return e=+e,n>>>=0,i||R(t,0,n,4),o.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,i){return e=+e,n>>>=0,i||R(t,0,n,8),o.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t],o=1,i=0;for(;++i>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t+--e],o=1;for(;e>0&&(o*=256);)r+=this[t+--e]*o;return r},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||A(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||A(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||A(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||A(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||A(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=Z((function(t){H(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,o=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(o)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],o=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<>>=0,e>>>=0,n||A(t,e,this.length);let r=this[t],o=1,i=0;for(;++i=o&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||A(t,e,this.length);let r=e,o=1,i=this[t+--r];for(;r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},s.prototype.readInt8=function(t,e){return t>>>=0,e||A(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||A(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||A(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||A(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||A(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=Z((function(t){H(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<>>=0,e||A(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||A(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||A(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||A(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e>>>=0,n>>>=0,!r){T(this,t,e,n,Math.pow(2,8*n)-1,0)}let o=1,i=0;for(this[e]=255&t;++i>>=0,n>>>=0,!r){T(this,t,e,n,Math.pow(2,8*n)-1,0)}let o=n-1,i=1;for(this[e+o]=255&t;--o>=0&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=Z((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=Z((function(t,e=0){return I(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,t,e,n,r-1,-r)}let o=0,i=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);T(this,t,e,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[e+o]=255&t;--o>=0&&(i*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/i>>0)-a&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||T(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=Z((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=Z((function(t,e=0){return I(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,n){return D(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return D(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function $(t,e,n,r,o,i){if(t>n||t3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new M.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,n){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,o,i)}function H(t,e){if("number"!=typeof t)throw new M.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){if(Math.floor(t)!==t)throw H(t,n),new M.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=F(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=F(o)),o+="n"),r+=` It must be ${e}. Received ${o}`,r}),RangeError);const G=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let n;e=e||1/0;const r=t.length;let o=null;const i=[];for(let a=0;a55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function q(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(G,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){let o;for(o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const K=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)e[r+o]=t[n]+t[o]}return e}();function Z(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},184:function(t,e){var n; /*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t=[],e=0;e */ e.read=function(t,e,n,r,o){var i,a,c=8*o-r-1,s=(1<>1,u=-7,f=n?o-1:0,p=n?-1:1,d=t[e+f];for(f+=p,i=d&(1<<-u)-1,d>>=-u,u+=c;u>0;i=256*i+t[e+f],f+=p,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+t[e+f],f+=p,u-=8);if(0===i)i=1-l;else{if(i===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=l}return(d?-1:1)*a*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var a,c,s,l=8*i-o-1,u=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(c=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+f>=1?p/s:p*Math.pow(2,1-f))*s>=2&&(a++,s/=2),a+f>=u?(c=0,a=u):a+f>=1?(c=(e*s-1)*Math.pow(2,o),a+=f):(c=e*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;t[n+d]=255&c,d+=h,c/=256,o-=8);for(a=a<0;t[n+d]=255&a,d+=h,a/=256,l-=8);t[n+d-h]|=128*y}},496:function(t){for(var e=self.crypto||self.msCrypto,n="-_",r=36;r--;)n+=r.toString(36);for(r=36;r---10;)n+=r.toString(36).toUpperCase();t.exports=function(t){var o="",i=e.getRandomValues(new Uint8Array(t||21));for(r=t||21;r--;)o+=n[63&i[r]];return o}},539:function(t,e){var n,r,o; /*! * php-unserialize-js JavaScript Library * https://github.com/bd808/php-unserialize-js * * Copyright 2013 Bryan Davis and contributors * Released under the MIT license * http://www.opensource.org/licenses/MIT */!function(i,a){"use strict";r=[],void 0===(o="function"==typeof(n=function(){return function(t){var e,n=0,r=[],o=0,i=function(){var e=t.indexOf(":",n),r=t.substring(n,e);return n=e+2,parseInt(r,10)},a=function(){var e=t.indexOf(";",n),r=t.substring(n,e);return n=e+1,parseInt(r,10)},c=function(){var t=a();return r[o++]=t,t},s=function(){var e=t.indexOf(";",n),i=t.substring(n,e);return n=e+1,i=parseFloat(i),r[o++]=i,i},l=function(){var e=t.indexOf(";",n),i=t.substring(n,e);return n=e+1,i="1"===i,r[o++]=i,i},u=function(e='"'){for(var r,o,a=i(),c=0,s=0;s2047?3:2;return t.charAt(n+c)!==e&&(c+=t.indexOf('"',n+c)-n-c),o=t.substring(n,n+c),n+=c+2,o},f=function(){var t=u();return r[o++]=t,t},p=function(){var e=t.charAt(n);return n+=2,e},d=function(){var t=p();switch(t){case"i":return a();case"s":return u();default:throw new Error("Unknown key type '"+t+"' at position "+(n-2))}},h=function(){var t,a,c,s,l,u=i(),f=[],p={},h=f,y=o++;r[y]=h;try{for(c=0;c0)return r=t.substring(1,i),o=t.substr(i+1),"*"===r||e===r?o:r+"::"+o;var a="Expected two characters in non-public property name '"+t+"' at position "+(n-t.length-2);throw new Error(a)}return t},m=function(){var t,a,c,s,l={},f=o++,p=u();r[f]=l,t=i();try{for(s=0;s=0&&t.subscribers.splice(t.subscribers.indexOf(e),1)},t}},382:function(t,e,n){var r=n(313);t.exports=function(t){var e=r.useState(t.id),n=function(){return e[1](t.id)};return r.useEffect((function(){return t.subscribe(n),function(){return t.unsubscribe(n)}}),[]),e[0]}},313:function(t){"use strict";t.exports=window.React},61:function(t,e,n){var r=n(698).default;function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=o=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},i=Object.prototype,a=i.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",f=s.toStringTag||"@@toStringTag";function p(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,n){return t[e]=n}}function d(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new T(r||[]);return c(i,"_invoke",{value:B(t,n,a)}),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=d;var y="suspendedStart",m="suspendedYield",g="executing",b="completed",v={};function w(){}function _(){}function E(){}var O={};p(O,l,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(L([])));x&&x!==i&&a.call(x,l)&&(O=x);var C=E.prototype=w.prototype=Object.create(O);function j(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function n(o,i,c,s){var l=h(t[o],t,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==r(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return n("throw",t,c,s)}))}s(l.arg)}var o;c(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function B(t,n,r){var o=y;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=N(c,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=g;var l=h(t,n,r);if("normal"===l.type){if(o=r.done?b:m,l.arg===v)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=b,r.method="throw",r.arg=l.arg)}}}function N(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,N(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var i=h(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[l];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function n(){for(;++o=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},n}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},698:function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},687:function(t,e,n){var r=n(61)();t.exports=r;try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=window.wp.element,e=window.wp.components;function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0&&void 0!==arguments[0]?arguments[0]:null,n=(0,t.useContext)(T),r=n.isAdvancedMode,o=n.remoteConditions,i=n.allLanguages,a=o;return{isAdvancedMode:r,allRules:a.reduce((function(t,e){var n=e.rules,r=e.title;return[].concat(s(t),s(n.map((function(t){return y(y({},t),{},{group:r})}))))}),[]).reduce((function(t,n){var r=n.title,o=n.id,i=n.sub_ids,a=void 0===i?[]:i,c=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.includes(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r0&&a.find((function(t){return t.id===e.rule}))?e.rule:o,value:r,sub_ids:a},c)])}),[]),rulesToUse:a,allLanguages:i}};function g(){return g=Object.assign?Object.assign.bind():function(t){for(var e=1;e(r.payload.end?new Date(r.payload.end).getTime():(new Date).getTime())&&(r.payload.end=t),n(v(v({},r),{},{payload:v(v(v({},r.payload),r.payload.start?{}:{start:_}),{},f({},s,t))}))}})),document.body))},_=window.wp.date;function E(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function O(t){for(var e=1;e0||p&&p.is_custom_rule&&p.has_text_field||p&&p.is_custom_rule&&p.choices;return(0,t.createElement)("div",{className:d()("ct-condition-group",r,{"ct-cols-3":h,"ct-cols-2":!h})},(0,t.createElement)(c.Select,{key:"first",option:{inputClassName:"ct-condition-type",selectInputStart:function(){return"include"===o.type?(0,t.createElement)("span",{className:"ct-include"},(0,t.createElement)("svg",{width:"8",height:"8",fill:"currentColor",viewBox:"0 0 20 20"},(0,t.createElement)("path",{d:"M20,11h-9v9H9v-9H0V9h9V0h2v9h9V11z"}))):"exclude"===o.type?(0,t.createElement)("span",{className:"ct-exclude"},(0,t.createElement)("svg",{width:"8",height:"8",fill:"currentColor",viewBox:"0 0 20 20"},(0,t.createElement)("path",{d:"M20,9v2H0V9H20z"}))):null},placeholder:(0,a.__)("Select variation","blocksy-companion"),choices:{include:(0,a.__)("Include","blocksy-companion"),exclude:(0,a.__)("Exclude","blocksy-companion")}},value:o.type,onChange:function(t){s(C(C({},o),{},{type:t}))}}),(0,t.createElement)(c.Select,{key:"second",option:{appendToBody:!0,placeholder:(0,a.__)("Select rule","blocksy-companion"),choices:u,search:!0},value:o.rule,onChange:function(t){var e=u.find((function(e){return e.key===t}));e.sub_ids&&e.sub_ids.length>0?s(C(C({},o),{},{rule:e.sub_ids[0].id})):s(C(C({},o),{},{rule:t}))}}),("post_ids"===o.rule||"custom_post_type_ids"===o.rule||"product_ids"===o.rule||"page_ids"===o.rule)&&(0,t.createElement)(c.EntityIdPicker,{option:{placeholder:"post_ids"===o.rule?(0,a.__)("Select post","blocksy-companion"):"page_ids"===o.rule?(0,a.__)("Select page","blocksy-companion"):"product_ids"===o.rule?(0,a.__)("Select product","blocksy-companion"):(0,a.__)("Custom Post Type ID","blocksy-companion"),entity:"posts",post_type:{post_ids:"post",page_ids:"page",product_ids:"product",custom_post_type_ids:"ct_cpt"}[o.rule]},value:(o.payload||{}).post_id||"",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{post_id:t})}))}}),("taxonomy_ids"===o.rule||"post_with_taxonomy_ids"===o.rule||"card_post_with_taxonomy_ids"===o.rule)&&(0,t.createElement)(c.EntityIdPicker,{option:{placeholder:(0,a.__)("Select taxonomy","blocksy-companion"),entity:"taxonomies"},value:(o.payload||{}).taxonomy_id||"",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{taxonomy_id:t})}))}}),("product_with_taxonomy_ids"===o.rule||"product_taxonomy_ids"===o.rule||"card_product_with_taxonomy_ids"===o.rule)&&(0,t.createElement)(c.EntityIdPicker,{option:{placeholder:(0,a.__)("Select taxonomy","blocksy-companion"),entity:"taxonomies",post_type:"product"},value:(o.payload||{}).taxonomy_id||"",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{taxonomy_id:t})}))}}),"current_language"===o.rule&&(0,t.createElement)(c.Select,{option:{appendToBody:!0,defaultToFirstItem:!1,placeholder:(0,a.__)("Select language","blocksy-companion"),choices:f.map((function(t){return{key:t.id,value:t.name}})),search:!0},value:(o.payload||{}).language||"",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{language:t})}))}}),"user_post_author_id"===o.rule&&(0,t.createElement)(c.EntityIdPicker,{option:{placeholder:(0,a.__)("Select user","blocksy-companion"),entity:"users",additionOptions:[{key:"current_user",value:(0,a.__)("Current user","blocksy-companion")}]},value:(o.payload||{}).user_id||"",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{user_id:t})}))}}),"author"===o.rule&&(0,t.createElement)(c.EntityIdPicker,{option:{placeholder:(0,a.__)("Select user","blocksy-companion"),entity:"users",additionOptions:[{key:"all_users",value:(0,a.__)("All authors","blocksy-companion")}]},value:(o.payload||{}).user_id||"all_users",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{user_id:t})}))}}),p&&p.sub_ids&&p.sub_ids.length>0&&(0,t.createElement)(c.Select,{option:{appendToBody:!0,placeholder:(0,a.__)("Select sub field","blocksy-companion"),choices:p.sub_ids.map((function(t){return{key:t.id,value:t.title}})),search:!0,inputClassName:"ct-dropdown-normal-width"},value:o.rule,onChange:function(t){s(C(C({},o),{},{rule:t}))}}),"start_end_date"===o.rule&&(0,t.createElement)(w,{condition:o,onChange:s}),"schedule_date"===o.rule&&(0,t.createElement)(k,{condition:o,onChange:s}),"request_referer"===o.rule&&(0,t.createElement)("div",{className:"ct-option-input"},(0,t.createElement)("input",{type:"text",placeholder:"website.com",value:o.payload.referer,onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{referer:t.target.value})}))}}),(0,t.createElement)("span",{className:"ct-condition-info","data-tooltip-reveal":"top"},(0,t.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},(0,t.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})),(0,t.createElement)("i",{className:"ct-tooltip"},(0,a.__)("Display based on referer domain","blocksy-companion")))),"request_cookie"===o.rule&&(0,t.createElement)("div",{className:"ct-option-input"},(0,t.createElement)("input",{type:"text",placeholder:"cookie_name",value:(o.payload||{}).cookie||"",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{cookie:t.target.value})}))}}),(0,t.createElement)("span",{className:"ct-condition-info","data-tooltip-reveal":"top"},(0,t.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},(0,t.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})),(0,t.createElement)("i",{className:"ct-tooltip"},(0,a.__)("Display if cookie is present","blocksy-companion")))),"request_url"===o.rule&&(0,t.createElement)("div",{className:"ct-option-input"},(0,t.createElement)("input",{type:"text",placeholder:"example=campaignID",value:o.payload.url||"",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{url:t.target.value})}))}}),(0,t.createElement)("span",{className:"ct-condition-info","data-tooltip-reveal":"top"},(0,t.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 24 24"},(0,t.createElement)("path",{d:"M12,2C6.477,2,2,6.477,2,12s4.477,10,10,10s10-4.477,10-10S17.523,2,12,2z M12,17L12,17c-0.552,0-1-0.448-1-1v-4 c0-0.552,0.448-1,1-1h0c0.552,0,1,0.448,1,1v4C13,16.552,12.552,17,12,17z M12.5,9h-1C11.224,9,11,8.776,11,8.5v-1 C11,7.224,11.224,7,11.5,7h1C12.776,7,13,7.224,13,7.5v1C13,8.776,12.776,9,12.5,9z"})),(0,t.createElement)("i",{className:"ct-tooltip"},(0,a.__)("Display if query string is present in URL","blocksy-companion")))),p&&p.is_custom_rule&&p.has_text_field&&(0,t.createElement)("div",{className:"ct-option-input"},(0,t.createElement)("input",{type:"text",placeholder:"",value:o.payload.value||"",onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{value:t.target.value})}))}})),p&&p.is_custom_rule&&p.choices&&(0,t.createElement)(c.Select,{option:{appendToBody:!0,placeholder:(0,a.__)("Select value","blocksy-companion"),choices:p.choices,search:!0,inputClassName:"ct-dropdown-normal-width"},value:o.payload.value||p.choices[0].key,onChange:function(t){s(C(C({},o),{},{payload:C(C({},o.payload),{},{value:t})}))}}),(0,t.createElement)("button",{type:"button",className:"ct-remove-condition-group",onClick:function(t){t.preventDefault(),i()}},(0,t.createElement)("svg",{width:"7px",height:"7px",fill:"currentColor",viewBox:"0 0 24 24"},(0,t.createElement)("path",{d:"m12 14.7 9.3 9.3 2.7-2.7-9.3-9.3L24 2.7 21.3 0 12 9.3 2.7 0 0 2.7 9.3 12 0 21.3 2.7 24l9.3-9.3z"}))))};function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function B(t){for(var e=1;e0?[B(B({},n),{},{conditions:e})]:[]),s(r.conditions.slice(i+1))))},onChange:function(t){0===t.length?o([].concat(s(r.conditions.slice(0,i)),s(r.conditions.slice(i+1)))):o(r.conditions.map((function(e,n){return B({},n===i?B(B({},e),{},{conditions:t}):e)})))}})),n.relation||(a=(0,t.createElement)(j,{className:l,condition:n,onChange:function(t){o(r.conditions.map((function(e,n){return B({},n===i?t:e)})))},onAdd:function(){"OR"!==r.relation?o([].concat(s(r.conditions),[{type:"include",rule:g[0].rules[0].id,payload:{}}])):o(r.conditions.map((function(t,e){return B({},e===i?{relation:"AND",conditions:[t,{type:"include",rule:g[0].rules[0].id,payload:{}}]}:t)})))},onRemove:function(){o([].concat(s(r.conditions.slice(0,i)),s(r.conditions.slice(i+1))))}})),(0,t.createElement)(t.Fragment,{key:i},b&&i>0&&(0,t.createElement)("div",{className:d()("ct-condition-relation",{"ct-hovered":p===i})},(0,t.createElement)("ul",{onMouseEnter:function(){h(i)},onMouseLeave:function(){h(null)}},"AND"===r.relation&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("li",{onClick:function(){c&&(h(null),c(i))}},(0,t.createElement)("span",null,"OR")),(0,t.createElement)("li",{className:"active"},(0,t.createElement)("span",null,"AND"))),"OR"===r.relation&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("li",{className:"active"},(0,t.createElement)("span",null,"OR")),(0,t.createElement)("li",{onClick:function(){h(null),o([].concat(s(r.conditions.slice(0,i-1)),[{relation:"AND",conditions:r.conditions.slice(i-1,i+1).reduce((function(t,e){return[].concat(s(t),s(e.conditions?e.conditions:[e]))}),[])}],s(r.conditions.slice(i+1,r.conditions.length))))}},(0,t.createElement)("span",null,"AND"))))),a)}));return"OR"===r.relation&&1===r.conditions.length||!b?v:(0,t.createElement)("div",{className:d()("ct-relation-group",u),"data-relation":r.relation},v,"AND"===r.relation&&(0,t.createElement)("div",{className:"ct-condition-relation ct-add-and-relation"},(0,t.createElement)("span",{onClick:function(){o([].concat(s(r.conditions),[{type:"include",rule:g[0].rules[0].id,payload:{}}]))}},(0,t.createElement)("svg",{width:"8",height:"8",fill:"currentColor",viewBox:"0 0 20 20"},(0,t.createElement)("path",{d:"M20,11h-9v9H9v-9H0V9h9V0h2v9h9V11z"})))))};function P(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function A(t){for(var e=1;e1||w.conditions.find((function(t){return t.relation})))&&(0,t.createElement)("span",null,(0,a.__)("Advanced Mode","blocksy-companion"),(0,t.createElement)(c.Switch,{value:_,onChange:function(t){w.conditions.find((function(t){return t.relation}))&&r(A(A({},w),{},{conditions:w.conditions.reduce((function(t,e){return[].concat(s(t),s(e.conditions?e.conditions:[e]))}),[])})),v(t)},option:{behavior:"boolean"}})))))},D=function(e){var n=e.option,r=n.display,o=void 0===r?"inline":r,s=n.filter,l=void 0===s?"all":s,u=n.modalTitle,f=void 0===u?(0,a.__)("Transparent Header Display Conditions","blocksy-companion"):u,p=n.modalDescription,d=void 0===p?(0,a.__)("Add one or more conditions to display the transparent header.","blocksy-companion"):p,h=n.addConditionButtonLabel,y=void 0===h?(0,a.__)("Add Display Condition","blocksy-companion"):h,m=e.value,g=e.onChange,b=i((0,t.useState)(!1),2),v=b[0],w=b[1],_=i((0,t.useState)(null),2),E=_[0],O=_[1];return"inline"===o?(0,t.createElement)(R,{filter:l,value:m,onChange:g,addConditionButtonLabel:y}):(0,t.createElement)(t.Fragment,null,(0,t.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(t){t.preventDefault(),w(!0),O(null)}},Object.keys(m).length>0?(0,a.__)("Edit Conditions","blocksy-companion"):(0,a.__)("Add Conditions","blocksy-companion")),(0,t.createElement)(c.Overlay,{items:v,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){w(!1),O(null)},render:function(){return(0,t.createElement)("div",{className:"ct-modal-content"},(0,t.createElement)("h2",null,f),(0,t.createElement)("p",null,d),(0,t.createElement)("div",{className:"ct-modal-scroll"},(0,t.createElement)(R,{filter:l,value:E||m,onChange:function(t){O(t)},addConditionButtonLabel:y})),(0,t.createElement)("div",{className:"ct-modal-actions has-divider"},(0,t.createElement)("button",{className:"button-primary",disabled:!E,onClick:function(){g(E),w(!1)}},(0,a.__)("Save Conditions","blocksy-companion"))))}}))},U="object"===("undefined"==typeof window?"undefined":l(window))&&window.window===window?window:"object"===("undefined"==typeof self?"undefined":l(self))&&self.self===self?self:"object"===(void 0===n.g?"undefined":l(n.g))&&n.g.global===n.g?n.g:void 0;function M(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){$(r.response,e,n)},r.onerror=function(){console.error("could not download file")},r.send()}function z(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function F(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(n){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var $="object"!==("undefined"==typeof window?"undefined":l(window))||window!==U?function(){}:"download"in HTMLAnchorElement.prototype?function(t,e,n){var r=U.URL||U.webkitURL,o=document.createElement("a");e=e||t.name||"download",o.download=e,o.rel="noopener","string"==typeof t?(o.href=t,o.origin!==location.origin?z(o.href)?M(t,e,n):F(o,o.target="_blank"):F(o)):(o.href=r.createObjectURL(t),setTimeout((function(){r.revokeObjectURL(o.href)}),4e4),setTimeout((function(){F(o)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download","string"==typeof t)if(z(t))M(t,e,n);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout((function(){F(r)}))}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!==l(e)&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),e)}:function(t,e,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return M(t,e,n);var o="application/octet-stream"===t.type,i=/constructor/i.test(U.HTMLElement)||U.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||o&&i)&&"object"===("undefined"==typeof FileReader?"undefined":l(FileReader))){var c=new FileReader;c.onloadend=function(){var t=c.result;t=a?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=t:location=t,r=null},c.readAsDataURL(t)}else{var s=U.URL||U.webkitURL,u=s.createObjectURL(t);r?r.location=u:location.href=u,r=null,setTimeout((function(){s.revokeObjectURL(u)}),4e4)}},H=$,V=n(539),G=n.n(V),Y=n(764).Buffer,q=function(){return new Promise((function(t){var e=new FormData;e.append("action","blocksy_customizer_wipe_caches"),e.append("wp_customize","on"),fetch(window.ajaxurl,{method:"POST",body:e}).then((function(e){200===e.status&&e.json().then((function(e){e.success,e.data;t()}))}))}))},W=function(){var e=i((0,t.useState)(null),2),n=e[0],r=e[1],o=i((0,t.useState)(null),2),l=o[0],u=o[1],f=i((0,t.useState)(!1),2),p=f[0],h=f[1],y=i((0,t.useState)(!1),2),m=y[0],g=y[1],b=i((0,t.useState)(!1),2),v=b[0],w=b[1],_=i((0,t.useState)(["options"]),2),E=_[0],O=_[1],k=(0,t.useRef)(),x=(0,t.useRef)();return(0,t.useEffect)((function(){var t=function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy",h(!0)},e=function(t){t.stopPropagation(),t.preventDefault(),h(!1)},n=function(t){t.stopPropagation(),t.preventDefault(),h(!1);var e=Array.from(t.dataTransfer.files||[]);if(Array.from(t.dataTransfer.items||[]).length>0){var n=t.dataTransfer.items[0].getAsFile();r(n)}else e.length>0&&r(e[0])};return x.current.addEventListener("dragover",t,!1),x.current.addEventListener("dragleave",e,!1),x.current.addEventListener("drop",n,!1),function(){x.current&&(x.current.removeEventListener("dragover",t,!1),x.current.removeEventListener("dragleave",e,!1),x.current.removeEventListener("drop",n,!1))}}),[]),(0,t.createElement)("div",{className:"ct-import-export"},(0,t.createElement)("div",{className:"ct-title","data-type":"simple"},(0,t.createElement)("h3",null,(0,a.__)("Export Options","blocksy-companion")),(0,t.createElement)("div",{className:"ct-option-description"},(0,a.__)("Easily export the theme customizer settings.","blocksy-companion"))),(0,t.createElement)("div",{className:"ct-control","data-design":"block"},(0,t.createElement)("header",null),(0,t.createElement)("section",null,(0,t.createElement)("button",{className:"button-primary",onClick:function(t){t.preventDefault(),g(!0)}},(0,a.__)("Export Customizations","blocksy-companion")))),(0,t.createElement)("div",{className:"ct-title","data-type":"simple"},(0,t.createElement)("h3",null,(0,a.__)("Import Options","blocksy-companion")),(0,t.createElement)("div",{className:"ct-option-description"},(0,a.__)("Easily import the theme customizer settings.","blocksy-companion"))),(0,t.createElement)("div",{className:"ct-control","data-design":"block"},(0,t.createElement)("header",null),(0,t.createElement)("section",null,(0,t.createElement)("div",{className:"ct-file-upload"},(0,t.createElement)("div",{className:"ct-attachment"},(0,t.createElement)("button",{type:"button",className:d()("ct-upload-button",{active:p}),ref:x,onClick:function(){k.current.click()}},n?n.name:(0,a.__)("Click or drop to upload a file...","blocksy-companion"))),(0,t.createElement)("input",{ref:k,type:"file",onChange:function(t){var e=i(t.target.files,1)[0];r(e)}}),(0,t.createElement)("button",{className:d()("button-primary",{"ct-loading":v}),disabled:!n,onClick:function(t){if(t.preventDefault(),n){w(!0);var e=new FileReader;e.readAsText(n,"UTF-8"),e.onload=function(t){var e,n,r=(e=t.target.result,n=e.replace(/s:([0-9]+):"([\s\S]*?)";/g,(function(t,e,n){var r=Y.byteLength(n,"utf8");return"s:".concat(r,':"').concat(n,'";')})),G()(n));try{fetch("".concat(window.ajaxurl,"?action=blocksy_customizer_import&wp_customize=on&nonce=").concat(ct_customizer_localizations.customizer_reset_none),{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(r)}).then((function(t){200===t.status&&t.json().then((function(t){t.success,t.data;q().then((function(){location.reload()}))}))}))}catch(t){}}}}},v?(0,t.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 100 100"},(0,t.createElement)("g",{transform:"translate(50,50)"},(0,t.createElement)("g",{transform:"scale(1)"},(0,t.createElement)("circle",{cx:"0",cy:"0",r:"50",fill:"currentColor"}),(0,t.createElement)("circle",{cx:"0",cy:"-26",r:"12",fill:"var(--ui-accent-color)",transform:"rotate(161.634)"},(0,t.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 0 0;360 0 0",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))))):(0,a.__)("Import Customizations","blocksy-companion"))))),ct_customizer_localizations.has_child_theme&&(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"ct-title","data-type":"simple"},(0,t.createElement)("h3",null,(0,a.__)("Copy Options","blocksy-companion")),(0,t.createElement)("div",{className:"ct-option-description"},(0,a.__)("Copy and import your customizations from parent or child theme.","blocksy-companion"))),ct_customizer_localizations.is_parent_theme&&(0,t.createElement)("div",{className:"ct-control","data-design":"block"},(0,t.createElement)("header",null),(0,t.createElement)("section",null,(0,t.createElement)("button",{className:"button-primary",onClick:function(t){t.preventDefault(),u("child")}},(0,a.__)("Copy From Child Theme","blocksy-companion")))),!ct_customizer_localizations.is_parent_theme&&(0,t.createElement)("div",{className:"ct-control","data-design":"block"},(0,t.createElement)("header",null),(0,t.createElement)("section",null,(0,t.createElement)("button",{className:"button-primary",onClick:function(t){t.preventDefault(),u("parent")}},(0,a.__)("Copy From Parent Theme","blocksy-companion"))))),(0,t.createElement)(c.Overlay,{items:l,className:"ct-admin-modal ct-import-export-modal",onDismiss:function(){return u(!1)},render:function(){return(0,t.createElement)("div",{className:"ct-modal-content"},(0,t.createElement)("h2",{className:"ct-modal-title"},!ct_customizer_localizations.is_parent_theme&&(0,a.__)("Copy From Parent Theme","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&(0,a.__)("Copy From Child Theme","blocksy-companion")),(0,t.createElement)("p",null,!ct_customizer_localizations.is_parent_theme&&(0,a.__)("You are about to copy all the settings from your parent theme into the child theme. Are you sure you want to continue?","blocksy-companion"),ct_customizer_localizations.is_parent_theme&&(0,a.__)("You are about to copy all the settings from your child theme into the parent theme. Are you sure you want to continue?","blocksy-companion")),(0,t.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,t.createElement)("button",{onClick:function(t){t.preventDefault(),t.stopPropagation(),u(!1)},className:"button"},(0,a.__)("Cancel","blocksy-companion")),(0,t.createElement)("button",{className:"button button-primary",onClick:function(t){t.preventDefault();var e=new FormData;e.append("action","blocksy_customizer_copy_options"),e.append("wp_customize","on"),e.append("strategy",l);try{fetch(window.ajaxurl,{method:"POST",body:e}).then((function(t){200===t.status&&t.json().then((function(t){t.success,t.data;q().then((function(){location.reload()}))}))}))}catch(t){}}},(0,a.__)("Yes, I am sure","blocksy-companion"))))}}),(0,t.createElement)(c.Overlay,{items:m,className:"ct-admin-modal ct-export-modal",onDismiss:function(){return g(!1)},render:function(){return(0,t.createElement)("div",{className:"ct-modal-content"},(0,t.createElement)("h2",{className:"ct-modal-title"},(0,a.__)("Export Settings","blocksy-companion")),(0,t.createElement)("p",null,(0,a.__)("Choose what set of settings you want to export.","blocksy-companion")),(0,t.createElement)("div",{className:"ct-checkboxes-container","data-type":"grid:bordered"},["options","widgets"].map((function(e){return(0,t.createElement)("div",{className:"ct-checkbox-container",onClick:function(){1===E.length&&E[0]===e||O((function(t){return t.includes(e)?t.filter((function(t){return t!==e})):[].concat(s(t),[e])}))}},(0,t.createElement)("span",{className:d()("ct-checkbox",{active:E.includes(e)})},(0,t.createElement)("svg",{width:"10",height:"8",viewBox:"0 0 11.2 9.1"},(0,t.createElement)("polyline",{className:"check",points:"1.2,4.8 4.4,7.9 9.9,1.2 "}))),{options:(0,a.__)("Customizer settings","blocksy-companion"),widgets:(0,a.__)("Widgets settings","blocksy-companion")}[e])}))),(0,t.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,t.createElement)("button",{onClick:function(t){t.preventDefault(),t.stopPropagation(),g(!1)},className:"button"},(0,a.__)("Cancel","blocksy-companion")),(0,t.createElement)("button",{className:"button button-primary",onClick:function(t){t.preventDefault();var e=new FormData;e.append("action","blocksy_customizer_export"),e.append("strategy",E.join(":")),e.append("wp_customize","on");try{fetch(window.ajaxurl,{method:"POST",body:e}).then((function(t){200===t.status&&t.json().then((function(t){var e=t.success,n=t.data;if(e){var r=new Blob([n.data],{type:"application/octet-stream;charset=utf-8"});H(r,"".concat(n.site_url.replace("http://","").replace("https://","").replace(".","-").replace("/","-"),"-export.dat")),g(!1)}}))}))}catch(t){}}},(0,a.__)("Export","blocksy-companion"))))}}))},J=window.ctEvents,X=n.n(J),K=window.wp.hooks;function Z(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}var Q=n(687),tt=n.n(Q),et=n(459),nt=n.n(et),rt=n(616),ot=n.n(rt),it=n(382),at=n.n(it),ct=ot()(),st=function(e){e.forcedEdit;var n,r,o=e.headerId,l=i((0,t.useState)(!1),2),u=l[0],p=l[1],d=i((0,t.useState)(null),2),h=d[0],y=d[1],m=(0,t.useContext)(c.PlacementsDragDropContext),g=(m.builderValueCollection,m.builderValueDispatch,(0,t.useRef)()),b=at()(ct),v=nt()("".concat(blocksy_admin.ajax_url,"?action=blocksy_header_get_all_conditions"),{method:"POST",formatter:(n=tt().mark((function t(e){var n,r,o;return tt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.json();case 2:if(n=t.sent,r=n.success,o=n.data,r&&o.conditions){t.next=7;break}throw new Error;case 7:return t.abrupt("return",o.conditions);case 8:case"end":return t.stop()}}),t)})),r=function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(t){Z(i,r,o,a,c,"next",t)}function c(t){Z(i,r,o,a,c,"throw",t)}a(void 0)}))},function(t){return r.apply(this,arguments)}),depends:[b]}),w=v.data,_=v.isLoading;v.error;return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("button",{className:"button-primary",style:{width:"100%"},onClick:function(t){t.preventDefault(),t.stopPropagation(),_||p(!0)}},(0,a.__)("Add/Edit Conditions","blocksy-companion")),(0,t.createElement)(c.Overlay,{items:u,initialFocusRef:g,className:"ct-admin-modal ct-builder-conditions-modal",onDismiss:function(){p(!1),y(null)},render:function(){var e;return(0,t.createElement)("div",{className:"ct-modal-content",ref:g},(0,t.createElement)("h2",null,sprintf((0,a.__)("Display Conditions","blocksy-companion"))),(0,t.createElement)("p",null,(0,a.__)("Add one or more conditions in order to display your header.","blocksy-companion")),(0,t.createElement)("div",{className:"ct-modal-scroll"},(0,t.createElement)(c.OptionsPanel,{onChange:function(t,e){y((function(t){return[].concat(s((t||w).filter((function(t){return t.id!==o}))),[{id:o,conditions:e}])}))},options:{conditions:(e={type:"blocksy-display-condition",design:"none",value:[]},f(e,"design","none"),f(e,"label",!1),e)},value:{conditions:((h||w).find((function(t){return t.id===o}))||{conditions:[]}).conditions},hasRevertButton:!1})),(0,t.createElement)("div",{className:"ct-modal-actions has-divider"},(0,t.createElement)("button",{className:"button-primary",disabled:!h,onClick:function(){fetch("".concat(wp.ajax.settings.url,"?action=blocksy_header_update_all_conditions"),{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(h)}).then((function(t){return t.json()})).then((function(){ct(),p(!1)}))}},(0,a.__)("Save Conditions","blocksy-companion"))))}}))};function lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ut(t){for(var e=1;e-1?{conditions_button:{label:(0,a.__)("Edit Conditions","blocksy-companion"),type:"jsx",design:"block",render:function(){return(0,t.createElement)(st,{headerId:r})}},divider:{type:"ct-divider"}}:{}),f)};return(0,t.createElement)(c.PanelMetaWrapper,g({id:s,key:r,option:h},p,{getActualOption:function(e){var n=e.open;return(0,t.createElement)(t.Fragment,null,r===u.id&&(0,t.createElement)(c.Panel,{id:s,getValues:function(){return ut({id:r},u.settings||{})},option:h,onChangeFor:function(t,e){l({type:"BUILDER_GLOBAL_SETTING_ON_CHANGE",payload:{optionId:t,optionValue:e,values:(0,c.getValueFromInput)(f,Array.isArray(u.settings)?{}:u.settings||{})}})},view:"simple"}),(0,t.createElement)("li",{className:d()({active:r===u.id,"ct-global":"type-1"===r}),onClick:function(){r===u.id?n():l({type:"PICK_BUILDER_SECTION",payload:{id:r}})}},(0,t.createElement)("span",{className:"ct-panel-name"},i),r.indexOf("ct-custom")>-1&&r!==u.id&&(0,t.createElement)("span",{className:"ct-remove-instance","data-tooltip-reveal":"top",onClick:function(t){t.preventDefault(),t.stopPropagation(),o(r)}},(0,t.createElement)("svg",{width:"11px",height:"11px",viewBox:"0 0 24 24"},(0,t.createElement)("path",{d:"M9.6,0l0,1.2H1.2v2.4h21.6V1.2h-8.4l0-1.2H9.6z M2.8,6l1.8,15.9C4.8,23.1,5.9,24,7.1,24h9.9c1.2,0,2.2-0.9,2.4-2.1L21.2,6H2.8z"})),(0,t.createElement)("i",{className:"ct-tooltip"},(0,a.__)("Remove header","blocksy-companion")))))}}))}))),(0,t.createElement)(e.Slot,{name:"PlacementsBuilderPanelsManagerAfter"},(function(t){return 0===t.length?null:t})),(0,t.createElement)(c.Overlay,{items:r,className:"ct-admin-modal ct-reset-options",onDismiss:function(){return o(!1)},render:function(){return(0,t.createElement)("div",{className:"ct-modal-content"},(0,t.createElement)("h2",{className:"ct-modal-title"},(0,a.__)("Remove Header","blocksy-companion")),(0,t.createElement)("p",null,(0,a.__)("You are about to remove a custom header, are you sure you want to continue?","blocksy-companion")),(0,t.createElement)("div",{className:"ct-modal-actions has-divider","data-buttons":"2"},(0,t.createElement)("button",{onClick:function(t){t.preventDefault(),t.stopPropagation(),o(!1)},className:"button"},(0,a.__)("Cancel","blocksy-companion")),(0,t.createElement)("button",{className:"button button-primary",onClick:function(t){t.preventDefault(),l({type:"REMOVE_BUILDER_SECTION",payload:{id:r}}),o(!1)}},(0,a.__)("Confirm","blocksy-companion"))))}}))};X().on("blocksy:options:before-option",(function(n){if(n.option&&"ct-header-builder"===n.option.type){var r=n.content;n.content=(0,t.createElement)(t.Fragment,null,r,(0,t.createElement)(e.Fill,{name:"PlacementsBuilderPanelsManager"},(0,t.createElement)(ft,null)))}})),X().on("blocksy:options:register",(function(t){t["blocksy-display-condition"]=D,t["blocksy-customizer-options-manager"]=W}))}()}();