@mypixia/simplex-designer 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var $t=Object.create;var xt=Object.defineProperty;var Jt=Object.getOwnPropertyDescriptor;var Yt=Object.getOwnPropertyNames;var Kt=Object.getPrototypeOf,Xt=Object.prototype.hasOwnProperty;var qt=(j,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Yt(t))!Xt.call(j,l)&&l!==i&&xt(j,l,{get:()=>t[l],enumerable:!(o=Jt(t,l))||o.enumerable});return j};var Qt=(j,t,i)=>(i=j!=null?$t(Kt(j)):{},qt(t||!j||!j.__esModule?xt(i,"default",{value:j,enumerable:!0}):i,j));const h=require("react"),_=require("fabric"),be=require("axios"),Zt=require("qrcode"),er=require("react-barcode"),ne=require("react-share"),tr=require("react-dom");var st={exports:{}},tt={};/**
1
+ "use strict";require('./index.css');var $t=Object.create;var xt=Object.defineProperty;var Jt=Object.getOwnPropertyDescriptor;var Yt=Object.getOwnPropertyNames;var Kt=Object.getPrototypeOf,Xt=Object.prototype.hasOwnProperty;var qt=(j,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of Yt(t))!Xt.call(j,l)&&l!==i&&xt(j,l,{get:()=>t[l],enumerable:!(o=Jt(t,l))||o.enumerable});return j};var Qt=(j,t,i)=>(i=j!=null?$t(Kt(j)):{},qt(t||!j||!j.__esModule?xt(i,"default",{value:j,enumerable:!0}):i,j));const h=require("react"),_=require("fabric"),be=require("axios"),Zt=require("qrcode"),er=require("react-barcode"),ne=require("react-share"),tr=require("react-dom");var st={exports:{}},tt={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
package/dist/index.es.js CHANGED
@@ -5,7 +5,7 @@ import Jt from "qrcode";
5
5
  import Yt from "react-barcode";
6
6
  import { FacebookShareButton as Kt, FacebookIcon as Xt, TwitterShareButton as Qt, XIcon as qt, TelegramShareButton as Zt, TelegramIcon as er, WhatsappShareButton as tr, WhatsappIcon as rr, LinkedinShareButton as nr, LinkedinIcon as sr, PinterestShareButton as or, PinterestIcon as ir, RedditShareButton as cr, RedditIcon as lr, InstapaperShareButton as ar, InstapaperIcon as dr } from "react-share";
7
7
  import hr from "react-dom";
8
- var st = { exports: {} }, rt = {};
8
+ import './index.css';var st = { exports: {} }, rt = {};
9
9
  /**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
package/dist/index.umd.js CHANGED
@@ -1,4 +1,5 @@
1
- (function(a,M){typeof exports=="object"&&typeof module<"u"?module.exports=M(require("react"),require("fabric"),require("axios"),require("qrcode"),require("react-barcode"),require("react-share"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","fabric","axios","qrcode","react-barcode","react-share","react-dom"],M):(a=typeof globalThis<"u"?globalThis:a||self,a.Mypixia=M(a.React,a.fabric,a.axios,a.qrcode,a.ReactBarcode,a.ReactShare,a.ReactDOM))})(this,function(a,M,ge,Bt,Dt,re,Ft){"use strict";var st={exports:{}},qe={};/**
1
+ (function(l,z){typeof exports=="object"&&typeof module<"u"?module.exports=z(require("react"),require("fabric"),require("axios"),require("qrcode"),require("react-barcode"),require("react-share"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","fabric","axios","qrcode","react-barcode","react-share","react-dom"],z):(l=typeof globalThis<"u"?globalThis:l||self,l.Mypixia=z(l.React,l.fabric,l.axios,l.qrcode,l.ReactBarcode,l.ReactShare,l.ReactDOM))})(this,function(l,z,ge,Dt,Ft,re,Pt){"use strict";var dt=document.createElement("style");dt.textContent=`.apc-mpc-widget-colums{display:flex;flex-direction:row}.apc-mpc-widget-colum-modules-container{border:1px solid #ccc;flex-basis:8%;cursor:pointer;width:10%}.apc-mpc-widget-colum-features-container{border:1px solid #ccc;flex-basis:20%;text-align:center;overflow:auto;width:20%;height:140vh}.apc-mpc-widget-colum-editor-container{border:1px solid #ccc;flex-basis:72%;min-height:60vh;background-color:#ccc;width:70%}.apc-mpx-tooltip-container{position:relative;display:inline-block;z-index:3000}.apc-mpx-hover-div{color:#fff;text-align:center;width:auto}.apc-mpx-tooltip-text{position:absolute;top:100%;left:50%;transform:translate(-50%);background-color:#333;color:#fff;padding:5px;border-radius:4px;opacity:0;visibility:hidden;transition:opacity .3s ease-in-out;font-size:10px}.apc-mpx-tooltip-container:hover .apc-mpx-tooltip-text{opacity:1;visibility:visible}.apc-mpx-widget-secondary-icon{font-size:30px;cursor:pointer}.apc-mpx-widget-button-group-container{position:relative}.apc-mpx-widget-effects-button{text-transform:none;color:#fff}.apc-mpx-widget-popper-container{position:absolute;z-index:10000;background-color:#fff;color:#000;width:auto;border:solid 1px #d3d3d3;margin-left:-120px;padding:.8em}.apc-mpx-widget-popper-li{list-style:none}.apc-mpc-widget-input{height:35px;border-radius:3px;width:80%;font-size:18px;font-weight:500;padding:5px}.apc-mpc-widget-btn{height:25px;border:none;cursor:pointer;font-weight:600;padding-right:3px;padding-left:3px;border-radius:4px}.apc-mpx-widget-custom-chip{border-radius:16px;cursor:pointer;padding:5px;font-weight:700;font-size:11px}.canvas-container{background-color:#e5e7eb}.apc-mpx-widget-accordion{width:100%}.apc-mpx-widget-accordion-item{border:1px solid #ccc;margin-bottom:5px}.apc-mpx-widget-accordion-title{display:flex;justify-content:space-between;padding:10px;cursor:pointer;background-color:#f0f0f0}.apc-mpx-widget-accordion-content{padding:10px}.apc-mpx-widget-modal{display:flex;flex-direction:column;max-height:80vh;width:80%;overflow:hidden}.apc-mpx-widget-modal-close-btn{position:absolute;top:10px;right:10px;background:none;border:none;cursor:pointer;padding:5px 10px;border-radius:4px;font-size:14px;color:#333}.apc-mpx-widget-responsive-image-container{max-width:100%;height:auto;position:relative;overflow:hidden;cursor:pointer}.apc-mpx-widget-responsive-image{width:100%;height:auto;display:block;cursor:pointer}.apc-mpx-widget-circle{width:25px;height:25px;border-radius:50%}.tab{overflow:hidden;border:1px solid #ccc;background-color:#f1f1f1}.tab button{background-color:inherit;float:left;border:none;outline:none;cursor:pointer;padding:14px 16px;transition:.3s}.tab button:hover{background-color:#ddd}.tab button.active{background-color:#ccc}.tabcontent{display:none;padding:6px 12px;border:1px solid #ccc;border-top:none}#info-div{display:none;position:absolute;background:#f0f0f0;border:1px solid #ccc;padding:10px}.apc-mpx-widget-generic-icon{font-size:20px;cursor:pointer}.apc-mpx-widget-secondary-icons{display:flex;flex-wrap:wrap;gap:10px}.apc-mpx-widget-secondary-icon{flex:0 0 23%;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:10px}.apc-mpx-widget-secondary-icons-mobile{display:flex;flex-wrap:wrap;gap:6px}.apc-mpx-widget-secondary-icons-mobile .apc-mpx-widget-secondary-icon{flex:0 0 22%}.apc-mpx-widget-modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;overflow:auto;background:#00000080;z-index:4000}.apc-mpx-widget-modal{position:relative;width:90%;max-width:600px;max-height:75vh;background-color:#fff;display:flex;flex-direction:column;border-radius:8px;box-shadow:0 2px 6px #0000004d}.apc-mpx-widget-modal-close-btn{padding:8px 12px;background-color:transparent;border:none;outline:none;cursor:pointer;font-size:16px;position:sticky;top:0;z-index:500;align-self:flex-end;border-bottom:1px solid #eee}.apc-mpx-widget-modal-content{padding:10px;overflow-y:Scroll;flex:1}.apc-mypixia-widget-primary-nav-container{display:flex;gap:2px;flex-direction:column;text-align:center}@media screen and (max-width: 600px){.apc-mpc-widget-colum-features-container{display:none}.apc-mpc-widget-colum-modules-container{flex-basis:8%;width:10%}.apc-mpc-widget-colum-features-container{flex-basis:0;width:auto}.apc-mpc-widget-colum-editor-container{flex-basis:100%;width:100%}.apc-mpc-widget-colum-modules-container{flex-basis:0;width:auto}.apc-mypixia-widget-primary-nav-container{position:fixed;bottom:0;left:0;right:0;width:100%;height:60px;flex-direction:row;justify-content:space-around;align-items:center;z-index:2000;box-shadow:0 -2px 4px #0000001a;overflow:auto}.apc-mypixia-widget-primary-nav-container>div{padding:5px!important;font-size:10px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;cursor:pointer;min-width:50px}.apc-mypixia-widget-primary-nav-container .apc-mypixia-widget-primary-nav-svg{width:20px!important;height:20px!important}.apc-mypixia-widget-primary-nav-container div div{margin-top:2px}}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px;height:100%;min-height:200px}.spinner{position:relative;width:60px;height:60px}.spinner-circle{position:absolute;border:4px solid rgba(0,0,0,.1);border-top:4px solid #000000;border-radius:50%;width:100%;height:100%;animation:spin 1.2s cubic-bezier(.5,.1,.5,.9) infinite}.spinner-circle-inner{position:absolute;border:4px solid transparent;border-right:4px solid #f39c12;border-radius:50%;width:70%;height:70%;top:15%;left:15%;animation:spin-reverse .8s linear infinite}.loading-text{margin-top:15px;font-size:14px;color:#555;font-weight:500}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin-reverse{0%{transform:rotate(0)}to{transform:rotate(-360deg)}}@media (prefers-color-scheme: dark){.loading-text{color:#b0b0b0}.spinner-circle{border-color:#ffffff1a;border-top-color:#000}}
2
+ /*$vite$:1*/`,document.head.appendChild(dt);var nt={exports:{}},qe={};/**
2
3
  * @license React
3
4
  * react-jsx-runtime.production.min.js
4
5
  *
@@ -6,7 +7,7 @@
6
7
  *
7
8
  * This source code is licensed under the MIT license found in the
8
9
  * LICENSE file in the root directory of this source tree.
9
- */var dt;function Pt(){if(dt)return qe;dt=1;var w=a,t=Symbol.for("react.element"),i=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,d=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function x(h,b,l){var v,u={},y=null,n=null;l!==void 0&&(y=""+l),b.key!==void 0&&(y=""+b.key),b.ref!==void 0&&(n=b.ref);for(v in b)o.call(b,v)&&!f.hasOwnProperty(v)&&(u[v]=b[v]);if(h&&h.defaultProps)for(v in b=h.defaultProps,b)u[v]===void 0&&(u[v]=b[v]);return{$$typeof:t,type:h,key:y,ref:n,props:u,_owner:d.current}}return qe.Fragment=i,qe.jsx=x,qe.jsxs=x,qe}var Xe={};/**
10
+ */var pt;function Ht(){if(pt)return qe;pt=1;var y=l,t=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,d=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function x(p,b,a){var v,u={},w=null,i=null;a!==void 0&&(w=""+a),b.key!==void 0&&(w=""+b.key),b.ref!==void 0&&(i=b.ref);for(v in b)s.call(b,v)&&!f.hasOwnProperty(v)&&(u[v]=b[v]);if(p&&p.defaultProps)for(v in b=p.defaultProps,b)u[v]===void 0&&(u[v]=b[v]);return{$$typeof:t,type:p,key:w,ref:i,props:u,_owner:d.current}}return qe.Fragment=o,qe.jsx=x,qe.jsxs=x,qe}var Xe={};/**
10
11
  * @license React
11
12
  * react-jsx-runtime.development.js
12
13
  *
@@ -14,21 +15,21 @@
14
15
  *
15
16
  * This source code is licensed under the MIT license found in the
16
17
  * LICENSE file in the root directory of this source tree.
17
- */var ht;function Ht(){return ht||(ht=1,process.env.NODE_ENV!=="production"&&function(){var w=a,t=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),h=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),n=Symbol.for("react.offscreen"),m=Symbol.iterator,p="@@iterator";function j(r){if(r===null||typeof r!="object")return null;var g=m&&r[m]||r[p];return typeof g=="function"?g:null}var s=w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(r){{for(var g=arguments.length,S=new Array(g>1?g-1:0),L=1;L<g;L++)S[L-1]=arguments[L];B("error",r,S)}}function B(r,g,S){{var L=s.ReactDebugCurrentFrame,U=L.getStackAddendum();U!==""&&(g+="%s",S=S.concat([U]));var W=S.map(function(H){return String(H)});W.unshift("Warning: "+g),Function.prototype.apply.call(console[r],console,W)}}var I=!1,_=!1,F=!1,E=!1,T=!1,V;V=Symbol.for("react.module.reference");function Y(r){return!!(typeof r=="string"||typeof r=="function"||r===o||r===f||T||r===d||r===l||r===v||E||r===n||I||_||F||typeof r=="object"&&r!==null&&(r.$$typeof===y||r.$$typeof===u||r.$$typeof===x||r.$$typeof===h||r.$$typeof===b||r.$$typeof===V||r.getModuleId!==void 0))}function J(r,g,S){var L=r.displayName;if(L)return L;var U=g.displayName||g.name||"";return U!==""?S+"("+U+")":S}function oe(r){return r.displayName||"Context"}function se(r){if(r==null)return null;if(typeof r.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case o:return"Fragment";case i:return"Portal";case f:return"Profiler";case d:return"StrictMode";case l:return"Suspense";case v:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case h:var g=r;return oe(g)+".Consumer";case x:var S=r;return oe(S._context)+".Provider";case b:return J(r,r.render,"ForwardRef");case u:var L=r.displayName||null;return L!==null?L:se(r.type)||"Memo";case y:{var U=r,W=U._payload,H=U._init;try{return se(H(W))}catch{return null}}}return null}var ne=Object.assign,ue=0,Te,we,Qe,Me,ee,Ve,Re;function Ue(){}Ue.__reactDisabledLog=!0;function ze(){{if(ue===0){Te=console.log,we=console.info,Qe=console.warn,Me=console.error,ee=console.group,Ve=console.groupCollapsed,Re=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Ue,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}ue++}}function We(){{if(ue--,ue===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},r,{value:Te}),info:ne({},r,{value:we}),warn:ne({},r,{value:Qe}),error:ne({},r,{value:Me}),group:ne({},r,{value:ee}),groupCollapsed:ne({},r,{value:Ve}),groupEnd:ne({},r,{value:Re})})}ue<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ce=s.ReactCurrentDispatcher,me;function G(r,g,S){{if(me===void 0)try{throw Error()}catch(U){var L=U.stack.trim().match(/\n( *(at )?)/);me=L&&L[1]||""}return`
18
- `+me+r}}var Le=!1,Oe;{var X=typeof WeakMap=="function"?WeakMap:Map;Oe=new X}function Ge(r,g){if(!r||Le)return"";{var S=Oe.get(r);if(S!==void 0)return S}var L;Le=!0;var U=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var W;W=Ce.current,Ce.current=null,ze();try{if(g){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(ce){L=ce}Reflect.construct(r,[],H)}else{try{H.call()}catch(ce){L=ce}r.call(H.prototype)}}else{try{throw Error()}catch(ce){L=ce}r()}}catch(ce){if(ce&&L&&typeof ce.stack=="string"){for(var P=ce.stack.split(`
19
- `),ie=L.stack.split(`
20
- `),q=P.length-1,Z=ie.length-1;q>=1&&Z>=0&&P[q]!==ie[Z];)Z--;for(;q>=1&&Z>=0;q--,Z--)if(P[q]!==ie[Z]){if(q!==1||Z!==1)do if(q--,Z--,Z<0||P[q]!==ie[Z]){var de=`
21
- `+P[q].replace(" at new "," at ");return r.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",r.displayName)),typeof r=="function"&&Oe.set(r,de),de}while(q>=1&&Z>=0);break}}}finally{Le=!1,Ce.current=W,We(),Error.prepareStackTrace=U}var Ke=r?r.displayName||r.name:"",De=Ke?G(Ke):"";return typeof r=="function"&&Oe.set(r,De),De}function ae(r,g,S){return Ge(r,!1)}function fe(r){var g=r.prototype;return!!(g&&g.isReactComponent)}function Se(r,g,S){if(r==null)return"";if(typeof r=="function")return Ge(r,fe(r));if(typeof r=="string")return G(r);switch(r){case l:return G("Suspense");case v:return G("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case b:return ae(r.render);case u:return Se(r.type,g,S);case y:{var L=r,U=L._payload,W=L._init;try{return Se(W(U),g,S)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,$e={},ke=s.ReactDebugCurrentFrame;function Ae(r){if(r){var g=r._owner,S=Se(r.type,r._source,g?g.type:null);ke.setExtraStackFrame(S)}else ke.setExtraStackFrame(null)}function Je(r,g,S,L,U){{var W=Function.call.bind(ve);for(var H in r)if(W(r,H)){var P=void 0;try{if(typeof r[H]!="function"){var ie=Error((L||"React class")+": "+S+" type `"+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[H]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ie.name="Invariant Violation",ie}P=r[H](g,H,L,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){P=q}P&&!(P instanceof Error)&&(Ae(U),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",L||"React class",S,H,typeof P),Ae(null)),P instanceof Error&&!(P.message in $e)&&($e[P.message]=!0,Ae(U),C("Failed %s type: %s",S,P.message),Ae(null))}}}var Ze=Array.isArray;function _e(r){return Ze(r)}function et(r){{var g=typeof Symbol=="function"&&Symbol.toStringTag,S=g&&r[Symbol.toStringTag]||r.constructor.name||"Object";return S}}function tt(r){try{return Ie(r),!1}catch{return!0}}function Ie(r){return""+r}function k(r){if(tt(r))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",et(r)),Ie(r)}var O=s.ReactCurrentOwner,$={key:!0,ref:!0,__self:!0,__source:!0},D,Q;function xe(r){if(ve.call(r,"ref")){var g=Object.getOwnPropertyDescriptor(r,"ref").get;if(g&&g.isReactWarning)return!1}return r.ref!==void 0}function je(r){if(ve.call(r,"key")){var g=Object.getOwnPropertyDescriptor(r,"key").get;if(g&&g.isReactWarning)return!1}return r.key!==void 0}function te(r,g){typeof r.ref=="string"&&O.current}function Ye(r,g){{var S=function(){D||(D=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g))};S.isReactWarning=!0,Object.defineProperty(r,"key",{get:S,configurable:!0})}}function Be(r,g){{var S=function(){Q||(Q=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g))};S.isReactWarning=!0,Object.defineProperty(r,"ref",{get:S,configurable:!0})}}var be=function(r,g,S,L,U,W,H){var P={$$typeof:t,type:r,key:g,ref:S,props:H,_owner:W};return P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(P,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(P,"_source",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P};function c(r,g,S,L,U){{var W,H={},P=null,ie=null;S!==void 0&&(k(S),P=""+S),je(g)&&(k(g.key),P=""+g.key),xe(g)&&(ie=g.ref,te(g,U));for(W in g)ve.call(g,W)&&!$.hasOwnProperty(W)&&(H[W]=g[W]);if(r&&r.defaultProps){var q=r.defaultProps;for(W in q)H[W]===void 0&&(H[W]=q[W])}if(P||ie){var Z=typeof r=="function"?r.displayName||r.name||"Unknown":r;P&&Ye(H,Z),ie&&Be(H,Z)}return be(r,P,ie,U,L,O.current,H)}}var A=s.ReactCurrentOwner,z=s.ReactDebugCurrentFrame;function N(r){if(r){var g=r._owner,S=Se(r.type,r._source,g?g.type:null);z.setExtraStackFrame(S)}else z.setExtraStackFrame(null)}var le;le=!1;function R(r){return typeof r=="object"&&r!==null&&r.$$typeof===t}function K(){{if(A.current){var r=se(A.current.type);if(r)return`
18
+ */var ht;function Vt(){return ht||(ht=1,process.env.NODE_ENV!=="production"&&function(){var y=l,t=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),p=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),i=Symbol.for("react.offscreen"),m=Symbol.iterator,h="@@iterator";function j(r){if(r===null||typeof r!="object")return null;var g=m&&r[m]||r[h];return typeof g=="function"?g:null}var n=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(r){{for(var g=arguments.length,S=new Array(g>1?g-1:0),L=1;L<g;L++)S[L-1]=arguments[L];B("error",r,S)}}function B(r,g,S){{var L=n.ReactDebugCurrentFrame,U=L.getStackAddendum();U!==""&&(g+="%s",S=S.concat([U]));var W=S.map(function(H){return String(H)});W.unshift("Warning: "+g),Function.prototype.apply.call(console[r],console,W)}}var I=!1,_=!1,F=!1,E=!1,T=!1,V;V=Symbol.for("react.module.reference");function Y(r){return!!(typeof r=="string"||typeof r=="function"||r===s||r===f||T||r===d||r===a||r===v||E||r===i||I||_||F||typeof r=="object"&&r!==null&&(r.$$typeof===w||r.$$typeof===u||r.$$typeof===x||r.$$typeof===p||r.$$typeof===b||r.$$typeof===V||r.getModuleId!==void 0))}function J(r,g,S){var L=r.displayName;if(L)return L;var U=g.displayName||g.name||"";return U!==""?S+"("+U+")":S}function se(r){return r.displayName||"Context"}function ne(r){if(r==null)return null;if(typeof r.tag=="number"&&C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case s:return"Fragment";case o:return"Portal";case f:return"Profiler";case d:return"StrictMode";case a:return"Suspense";case v:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case p:var g=r;return se(g)+".Consumer";case x:var S=r;return se(S._context)+".Provider";case b:return J(r,r.render,"ForwardRef");case u:var L=r.displayName||null;return L!==null?L:ne(r.type)||"Memo";case w:{var U=r,W=U._payload,H=U._init;try{return ne(H(W))}catch{return null}}}return null}var ie=Object.assign,ue=0,Te,ye,Qe,ze,ee,Ve,Re;function Ue(){}Ue.__reactDisabledLog=!0;function Me(){{if(ue===0){Te=console.log,ye=console.info,Qe=console.warn,ze=console.error,ee=console.group,Ve=console.groupCollapsed,Re=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Ue,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}ue++}}function We(){{if(ue--,ue===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ie({},r,{value:Te}),info:ie({},r,{value:ye}),warn:ie({},r,{value:Qe}),error:ie({},r,{value:ze}),group:ie({},r,{value:ee}),groupCollapsed:ie({},r,{value:Ve}),groupEnd:ie({},r,{value:Re})})}ue<0&&C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ce=n.ReactCurrentDispatcher,me;function $(r,g,S){{if(me===void 0)try{throw Error()}catch(U){var L=U.stack.trim().match(/\n( *(at )?)/);me=L&&L[1]||""}return`
19
+ `+me+r}}var Le=!1,Oe;{var X=typeof WeakMap=="function"?WeakMap:Map;Oe=new X}function $e(r,g){if(!r||Le)return"";{var S=Oe.get(r);if(S!==void 0)return S}var L;Le=!0;var U=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var W;W=Ce.current,Ce.current=null,Me();try{if(g){var H=function(){throw Error()};if(Object.defineProperty(H.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(H,[])}catch(ce){L=ce}Reflect.construct(r,[],H)}else{try{H.call()}catch(ce){L=ce}r.call(H.prototype)}}else{try{throw Error()}catch(ce){L=ce}r()}}catch(ce){if(ce&&L&&typeof ce.stack=="string"){for(var P=ce.stack.split(`
20
+ `),oe=L.stack.split(`
21
+ `),q=P.length-1,Z=oe.length-1;q>=1&&Z>=0&&P[q]!==oe[Z];)Z--;for(;q>=1&&Z>=0;q--,Z--)if(P[q]!==oe[Z]){if(q!==1||Z!==1)do if(q--,Z--,Z<0||P[q]!==oe[Z]){var de=`
22
+ `+P[q].replace(" at new "," at ");return r.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",r.displayName)),typeof r=="function"&&Oe.set(r,de),de}while(q>=1&&Z>=0);break}}}finally{Le=!1,Ce.current=W,We(),Error.prepareStackTrace=U}var Ke=r?r.displayName||r.name:"",De=Ke?$(Ke):"";return typeof r=="function"&&Oe.set(r,De),De}function le(r,g,S){return $e(r,!1)}function fe(r){var g=r.prototype;return!!(g&&g.isReactComponent)}function Se(r,g,S){if(r==null)return"";if(typeof r=="function")return $e(r,fe(r));if(typeof r=="string")return $(r);switch(r){case a:return $("Suspense");case v:return $("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case b:return le(r.render);case u:return Se(r.type,g,S);case w:{var L=r,U=L._payload,W=L._init;try{return Se(W(U),g,S)}catch{}}}return""}var ve=Object.prototype.hasOwnProperty,Ge={},ke=n.ReactDebugCurrentFrame;function Ae(r){if(r){var g=r._owner,S=Se(r.type,r._source,g?g.type:null);ke.setExtraStackFrame(S)}else ke.setExtraStackFrame(null)}function Je(r,g,S,L,U){{var W=Function.call.bind(ve);for(var H in r)if(W(r,H)){var P=void 0;try{if(typeof r[H]!="function"){var oe=Error((L||"React class")+": "+S+" type `"+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[H]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw oe.name="Invariant Violation",oe}P=r[H](g,H,L,S,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(q){P=q}P&&!(P instanceof Error)&&(Ae(U),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",L||"React class",S,H,typeof P),Ae(null)),P instanceof Error&&!(P.message in Ge)&&(Ge[P.message]=!0,Ae(U),C("Failed %s type: %s",S,P.message),Ae(null))}}}var Ze=Array.isArray;function _e(r){return Ze(r)}function et(r){{var g=typeof Symbol=="function"&&Symbol.toStringTag,S=g&&r[Symbol.toStringTag]||r.constructor.name||"Object";return S}}function tt(r){try{return Ie(r),!1}catch{return!0}}function Ie(r){return""+r}function k(r){if(tt(r))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",et(r)),Ie(r)}var O=n.ReactCurrentOwner,G={key:!0,ref:!0,__self:!0,__source:!0},D,Q;function xe(r){if(ve.call(r,"ref")){var g=Object.getOwnPropertyDescriptor(r,"ref").get;if(g&&g.isReactWarning)return!1}return r.ref!==void 0}function je(r){if(ve.call(r,"key")){var g=Object.getOwnPropertyDescriptor(r,"key").get;if(g&&g.isReactWarning)return!1}return r.key!==void 0}function te(r,g){typeof r.ref=="string"&&O.current}function Ye(r,g){{var S=function(){D||(D=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g))};S.isReactWarning=!0,Object.defineProperty(r,"key",{get:S,configurable:!0})}}function Be(r,g){{var S=function(){Q||(Q=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",g))};S.isReactWarning=!0,Object.defineProperty(r,"ref",{get:S,configurable:!0})}}var be=function(r,g,S,L,U,W,H){var P={$$typeof:t,type:r,key:g,ref:S,props:H,_owner:W};return P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(P,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(P,"_source",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P};function c(r,g,S,L,U){{var W,H={},P=null,oe=null;S!==void 0&&(k(S),P=""+S),je(g)&&(k(g.key),P=""+g.key),xe(g)&&(oe=g.ref,te(g,U));for(W in g)ve.call(g,W)&&!G.hasOwnProperty(W)&&(H[W]=g[W]);if(r&&r.defaultProps){var q=r.defaultProps;for(W in q)H[W]===void 0&&(H[W]=q[W])}if(P||oe){var Z=typeof r=="function"?r.displayName||r.name||"Unknown":r;P&&Ye(H,Z),oe&&Be(H,Z)}return be(r,P,oe,U,L,O.current,H)}}var A=n.ReactCurrentOwner,M=n.ReactDebugCurrentFrame;function N(r){if(r){var g=r._owner,S=Se(r.type,r._source,g?g.type:null);M.setExtraStackFrame(S)}else M.setExtraStackFrame(null)}var ae;ae=!1;function R(r){return typeof r=="object"&&r!==null&&r.$$typeof===t}function K(){{if(A.current){var r=ne(A.current.type);if(r)return`
22
23
 
23
- Check the render method of \``+r+"`."}return""}}function rt(r){return""}var Tt={};function Kr(r){{var g=K();if(!g){var S=typeof r=="string"?r:r.displayName||r.name;S&&(g=`
24
+ Check the render method of \``+r+"`."}return""}}function rt(r){return""}var zt={};function qr(r){{var g=K();if(!g){var S=typeof r=="string"?r:r.displayName||r.name;S&&(g=`
24
25
 
25
- Check the top-level render call using <`+S+">.")}return g}}function Mt(r,g){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var S=Kr(g);if(Tt[S])return;Tt[S]=!0;var L="";r&&r._owner&&r._owner!==A.current&&(L=" It was passed a child from "+se(r._owner.type)+"."),N(r),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,L),N(null)}}function zt(r,g){{if(typeof r!="object")return;if(_e(r))for(var S=0;S<r.length;S++){var L=r[S];R(L)&&Mt(L,g)}else if(R(r))r._store&&(r._store.validated=!0);else if(r){var U=j(r);if(typeof U=="function"&&U!==r.entries)for(var W=U.call(r),H;!(H=W.next()).done;)R(H.value)&&Mt(H.value,g)}}}function qr(r){{var g=r.type;if(g==null||typeof g=="string")return;var S;if(typeof g=="function")S=g.propTypes;else if(typeof g=="object"&&(g.$$typeof===b||g.$$typeof===u))S=g.propTypes;else return;if(S){var L=se(g);Je(S,r.props,"prop",L,r)}else if(g.PropTypes!==void 0&&!le){le=!0;var U=se(g);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",U||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xr(r){{for(var g=Object.keys(r.props),S=0;S<g.length;S++){var L=g[S];if(L!=="children"&&L!=="key"){N(r),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),N(null);break}}r.ref!==null&&(N(r),C("Invalid attribute `ref` supplied to `React.Fragment`."),N(null))}}var Lt={};function _t(r,g,S,L,U,W){{var H=Y(r);if(!H){var P="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(P+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ie=rt();ie?P+=ie:P+=K();var q;r===null?q="null":_e(r)?q="array":r!==void 0&&r.$$typeof===t?(q="<"+(se(r.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):q=typeof r,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,P)}var Z=c(r,g,S,U,W);if(Z==null)return Z;if(H){var de=g.children;if(de!==void 0)if(L)if(_e(de)){for(var Ke=0;Ke<de.length;Ke++)zt(de[Ke],r);Object.freeze&&Object.freeze(de)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else zt(de,r)}if(ve.call(g,"key")){var De=se(r),ce=Object.keys(g).filter(function(ss){return ss!=="key"}),at=ce.length>0?"{key: someKey, "+ce.join(": ..., ")+": ...}":"{key: someKey}";if(!Lt[De+at]){var rs=ce.length>0?"{"+ce.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
26
+ Check the top-level render call using <`+S+">.")}return g}}function Mt(r,g){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var S=qr(g);if(zt[S])return;zt[S]=!0;var L="";r&&r._owner&&r._owner!==A.current&&(L=" It was passed a child from "+ne(r._owner.type)+"."),N(r),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',S,L),N(null)}}function Lt(r,g){{if(typeof r!="object")return;if(_e(r))for(var S=0;S<r.length;S++){var L=r[S];R(L)&&Mt(L,g)}else if(R(r))r._store&&(r._store.validated=!0);else if(r){var U=j(r);if(typeof U=="function"&&U!==r.entries)for(var W=U.call(r),H;!(H=W.next()).done;)R(H.value)&&Mt(H.value,g)}}}function Xr(r){{var g=r.type;if(g==null||typeof g=="string")return;var S;if(typeof g=="function")S=g.propTypes;else if(typeof g=="object"&&(g.$$typeof===b||g.$$typeof===u))S=g.propTypes;else return;if(S){var L=ne(g);Je(S,r.props,"prop",L,r)}else if(g.PropTypes!==void 0&&!ae){ae=!0;var U=ne(g);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",U||"Unknown")}typeof g.getDefaultProps=="function"&&!g.getDefaultProps.isReactClassApproved&&C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Qr(r){{for(var g=Object.keys(r.props),S=0;S<g.length;S++){var L=g[S];if(L!=="children"&&L!=="key"){N(r),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),N(null);break}}r.ref!==null&&(N(r),C("Invalid attribute `ref` supplied to `React.Fragment`."),N(null))}}var _t={};function Bt(r,g,S,L,U,W){{var H=Y(r);if(!H){var P="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(P+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var oe=rt();oe?P+=oe:P+=K();var q;r===null?q="null":_e(r)?q="array":r!==void 0&&r.$$typeof===t?(q="<"+(ne(r.type)||"Unknown")+" />",P=" Did you accidentally export a JSX literal instead of a component?"):q=typeof r,C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",q,P)}var Z=c(r,g,S,U,W);if(Z==null)return Z;if(H){var de=g.children;if(de!==void 0)if(L)if(_e(de)){for(var Ke=0;Ke<de.length;Ke++)Lt(de[Ke],r);Object.freeze&&Object.freeze(de)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Lt(de,r)}if(ve.call(g,"key")){var De=ne(r),ce=Object.keys(g).filter(function(on){return on!=="key"}),lt=ce.length>0?"{key: someKey, "+ce.join(": ..., ")+": ...}":"{key: someKey}";if(!_t[De+lt]){var nn=ce.length>0?"{"+ce.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
26
27
  let props = %s;
27
28
  <%s {...props} />
28
29
  React keys must be passed directly to JSX without using spread:
29
30
  let props = %s;
30
- <%s key={someKey} {...props} />`,at,De,rs,De),Lt[De+at]=!0}}return r===o?Xr(Z):qr(Z),Z}}function Qr(r,g,S){return _t(r,g,S,!0)}function Zr(r,g,S){return _t(r,g,S,!1)}var es=Zr,ts=Qr;Xe.Fragment=o,Xe.jsx=es,Xe.jsxs=ts}()),Xe}var pt;function Vt(){return pt||(pt=1,process.env.NODE_ENV==="production"?st.exports=Pt():st.exports=Ht()),st.exports}var e=Vt();const Rt={primaryColor:"#f88300",primaryColorLight:"#6858c1",secondaryColor:"#005a53",tertiaryColor:"#FFFFFF"},Ut="M80 160c0-35.3 28.7-64 64-64h32c35.3 0 64 28.7 64 64v3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74V320c0 17.7 14.3 32 32 32s32-14.3 32-32v-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7V160c0-70.7-57.3-128-128-128H144C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z",Wt="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z",Gt="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z",$t="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z",Jt="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z",Yt="M160 64c0-8.8 7.2-16 16-16s16 7.2 16 16V200c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c8.8 0 16 7.2 16 16c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c7.8 0 14.3 5.6 15.7 13c1.6 8.2 7.3 15.1 15.1 18s16.7 1.6 23.3-3.6c2.7-2.1 6.1-3.4 9.9-3.4c8.8 0 16 7.2 16 16l0 16V392c0 39.8-32.2 72-72 72H272 212.3h-.9c-37.4 0-72.4-18.7-93.2-49.9L50.7 312.9c-4.9-7.4-2.9-17.3 4.4-22.2s17.3-2.9 22.2 4.4L116 353.2c5.9 8.8 16.8 12.7 26.9 9.7s17-12.4 17-23V320 64zM176 0c-35.3 0-64 28.7-64 64V261.7C91.2 238 55.5 232.8 28.5 250.7C-.9 270.4-8.9 310.1 10.8 339.5L78.3 440.8c29.7 44.5 79.6 71.2 133.1 71.2h.9H272h56c66.3 0 120-53.7 120-120V288l0-16c0-35.3-28.7-64-64-64c-4.5 0-8.8 .5-13 1.3c-11.7-15.4-30.2-25.3-51-25.3c-6.9 0-13.5 1.1-19.7 3.1C288.7 170.7 269.6 160 248 160c-2.7 0-5.4 .2-8 .5V64c0-35.3-28.7-64-64-64zm48 304c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304zm48-16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304c0-8.8-7.2-16-16-16zm80 16c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304z",Kt="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z",qt="M160 0c17.7 0 32 14.3 32 32V67.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V445.1c-.4-.1-.9-.1-1.3-.2l-.2 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11V32c0-17.7 14.3-32 32-32z",ut="M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z",ft="M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6C495 83.4 512 107.5 512 134.6V377.4c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4V134.6c0-27 17-51.2 42.5-60.3l192-68.6zM256 66L82.3 128 256 190l173.7-62L256 66zm32 368.6l160-57.1v-188L288 246.6v188z",lt="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z",xt="M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9v28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5V291.9c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z",Xt="M184 48H328c4.4 0 8 3.6 8 8V96H176V56c0-4.4 3.6-8 8-8zm-56 8V96H64C28.7 96 0 124.7 0 160v96H192 352h8.2c32.3-39.1 81.1-64 135.8-64c5.4 0 10.7 .2 16 .7V160c0-35.3-28.7-64-64-64H384V56c0-30.9-25.1-56-56-56H184c-30.9 0-56 25.1-56 56zM320 352H224c-17.7 0-32-14.3-32-32V288H0V416c0 35.3 28.7 64 64 64H360.2C335.1 449.6 320 410.5 320 368c0-5.4 .2-10.7 .7-16l-.7 0zm320 16a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zM496 288c8.8 0 16 7.2 16 16v48h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H496c-8.8 0-16-7.2-16-16V304c0-8.8 7.2-16 16-16z",Qt="M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.7 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z",Zt="M323.8 34.8c-38.2-10.9-78.1 11.2-89 49.4l-5.7 20c-3.7 13-10.4 25-19.5 35l-51.3 56.4c-8.9 9.8-8.2 25 1.6 33.9s25 8.2 33.9-1.6l51.3-56.4c14.1-15.5 24.4-34 30.1-54.1l5.7-20c3.6-12.7 16.9-20.1 29.7-16.5s20.1 16.9 16.5 29.7l-5.7 20c-5.7 19.9-14.7 38.7-26.6 55.5c-5.2 7.3-5.8 16.9-1.7 24.9s12.3 13 21.3 13L448 224c8.8 0 16 7.2 16 16c0 6.8-4.3 12.7-10.4 15c-7.4 2.8-13 9-14.9 16.7s.1 15.8 5.3 21.7c2.5 2.8 4 6.5 4 10.6c0 7.8-5.6 14.3-13 15.7c-8.2 1.6-15.1 7.3-18 15.1s-1.6 16.7 3.6 23.3c2.1 2.7 3.4 6.1 3.4 9.9c0 6.7-4.2 12.6-10.2 14.9c-11.5 4.5-17.7 16.9-14.4 28.8c.4 1.3 .6 2.8 .6 4.3c0 8.8-7.2 16-16 16H286.5c-12.6 0-25-3.7-35.5-10.7l-61.7-41.1c-11-7.4-25.9-4.4-33.3 6.7s-4.4 25.9 6.7 33.3l61.7 41.1c18.4 12.3 40 18.8 62.1 18.8H384c34.7 0 62.9-27.6 64-62c14.6-11.7 24-29.7 24-50c0-4.5-.5-8.8-1.3-13c15.4-11.7 25.3-30.2 25.3-51c0-6.5-1-12.8-2.8-18.7C504.8 273.7 512 257.7 512 240c0-35.3-28.6-64-64-64l-92.3 0c4.7-10.4 8.7-21.2 11.8-32.2l5.7-20c10.9-38.2-11.2-78.1-49.4-89zM32 192c-17.7 0-32 14.3-32 32V448c0 17.7 14.3 32 32 32H96c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32H32z",er="M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z",gt="M123.6 391.3c12.9-9.4 29.6-11.8 44.6-6.4c26.5 9.6 56.2 15.1 87.8 15.1c124.7 0 208-80.5 208-160s-83.3-160-208-160S48 160.5 48 240c0 32 12.4 62.8 35.7 89.2c8.6 9.7 12.8 22.5 11.8 35.5c-1.4 18.1-5.7 34.7-11.3 49.4c17-7.9 31.1-16.7 39.4-22.7zM21.2 431.9c1.8-2.7 3.5-5.4 5.1-8.1c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208s-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6c-15.1 6.6-32.3 12.6-50.1 16.1c-.8 .2-1.6 .3-2.4 .5c-4.4 .8-8.7 1.5-13.2 1.9c-.2 0-.5 .1-.7 .1c-5.1 .5-10.2 .8-15.3 .8c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c4.1-4.2 7.8-8.7 11.3-13.5c1.7-2.3 3.3-4.6 4.8-6.9c.1-.2 .2-.3 .3-.5z",mt="M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z",vt="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z",jt="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z",bt="M225.8 468.2l-2.5-2.3L48.1 303.2C17.4 274.7 0 234.7 0 192.8v-3.3c0-70.4 50-130.8 119.2-144C158.6 37.9 198.9 47 231 69.6c9 6.4 17.4 13.8 25 22.3c4.2-4.8 8.7-9.2 13.5-13.3c3.7-3.2 7.5-6.2 11.5-9c0 0 0 0 0 0C313.1 47 353.4 37.9 392.8 45.4C462 58.6 512 119.1 512 189.5v3.3c0 41.9-17.4 81.9-48.1 110.4L288.7 465.9l-2.5 2.3c-8.2 7.6-19 11.9-30.2 11.9s-22-4.2-30.2-11.9zM239.1 145c-.4-.3-.7-.7-1-1.1l-17.8-20c0 0-.1-.1-.1-.1c0 0 0 0 0 0c-23.1-25.9-58-37.7-92-31.2C81.6 101.5 48 142.1 48 189.5v3.3c0 28.5 11.9 55.8 32.8 75.2L256 430.7 431.2 268c20.9-19.4 32.8-46.7 32.8-75.2v-3.3c0-47.3-33.6-88-80.1-96.9c-34-6.5-69 5.4-92 31.2c0 0 0 0-.1 .1s0 0-.1 .1l-17.8 20c-.3 .4-.7 .7-1 1.1c-4.5 4.5-10.6 7-16.9 7s-12.4-2.5-16.9-7z",tr="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z",yt="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z",wt="M0 336c0 79.5 64.5 144 144 144H512c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z",Ct="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM164.1 325.5C182 346.2 212.6 368 256 368s74-21.8 91.9-42.5c5.8-6.7 15.9-7.4 22.6-1.6s7.4 15.9 1.6 22.6C349.8 372.1 311.1 400 256 400s-93.8-27.9-116.1-53.5c-5.8-6.7-5.1-16.8 1.6-22.6s16.8-5.1 22.6 1.6zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z",St="M48 256C48 141.1 141.1 48 256 48c63.1 0 119.6 28.1 157.8 72.5c8.6 10.1 23.8 11.2 33.8 2.6s11.2-23.8 2.6-33.8C403.3 34.6 333.7 0 256 0C114.6 0 0 114.6 0 256v40c0 13.3 10.7 24 24 24s24-10.7 24-24V256zm458.5-52.9c-2.7-13-15.5-21.3-28.4-18.5s-21.3 15.5-18.5 28.4c2.9 13.9 4.5 28.3 4.5 43.1v40c0 13.3 10.7 24 24 24s24-10.7 24-24V256c0-18.1-1.9-35.8-5.5-52.9zM256 80c-19 0-37.4 3-54.5 8.6c-15.2 5-18.7 23.7-8.3 35.9c7.1 8.3 18.8 10.8 29.4 7.9c10.6-2.9 21.8-4.4 33.4-4.4c70.7 0 128 57.3 128 128v24.9c0 25.2-1.5 50.3-4.4 75.3c-1.7 14.6 9.4 27.8 24.2 27.8c11.8 0 21.9-8.6 23.3-20.3c3.3-27.4 5-55 5-82.7V256c0-97.2-78.8-176-176-176zM150.7 148.7c-9.1-10.6-25.3-11.4-33.9-.4C93.7 178 80 215.4 80 256v24.9c0 24.2-2.6 48.4-7.8 71.9C68.8 368.4 80.1 384 96.1 384c10.5 0 19.9-7 22.2-17.3c6.4-28.1 9.7-56.8 9.7-85.8V256c0-27.2 8.5-52.4 22.9-73.1c7.2-10.4 8-24.6-.2-34.2zM256 160c-53 0-96 43-96 96v24.9c0 35.9-4.6 71.5-13.8 106.1c-3.8 14.3 6.7 29 21.5 29c9.5 0 17.9-6.2 20.4-15.4c10.5-39 15.9-79.2 15.9-119.7V256c0-28.7 23.3-52 52-52s52 23.3 52 52v24.9c0 36.3-3.5 72.4-10.4 107.9c-2.7 13.9 7.7 27.2 21.8 27.2c10.2 0 19-7 21-17c7.7-38.8 11.6-78.3 11.6-118.1V256c0-53-43-96-96-96zm24 96c0-13.3-10.7-24-24-24s-24 10.7-24 24v24.9c0 59.9-11 119.3-32.5 175.2l-5.9 15.3c-4.8 12.4 1.4 26.3 13.8 31s26.3-1.4 31-13.8l5.9-15.3C267.9 411.9 280 346.7 280 280.9V256z",rr="M315.4 15.5C309.7 5.9 299.2 0 288 0s-21.7 5.9-27.4 15.5l-96 160c-5.9 9.9-6.1 22.2-.4 32.2s16.3 16.2 27.8 16.2H384c11.5 0 22.2-6.2 27.8-16.2s5.5-22.3-.4-32.2l-96-160zM288 312V456c0 22.1 17.9 40 40 40H472c22.1 0 40-17.9 40-40V312c0-22.1-17.9-40-40-40H328c-22.1 0-40 17.9-40 40zM128 512a128 128 0 1 0 0-256 128 128 0 1 0 0 256z",sr="M116.7 219.4a15.7 15.7 0 0 0 22.7 0l96.8-99.8c28.2-29 26.5-77.1-4.9-103.9C203.8-7.7 163-3.5 137.9 22.4L128 32.6l-9.9-10.1C93.1-3.5 52.3-7.7 24.9 15.6c-31.4 26.8-33 74.9-5 103.9zm143.9 100.5h-48l-7.1-14.2a27.4 27.4 0 0 0 -25.7-17.8h-71.7a27.4 27.4 0 0 0 -25.7 17.8l-7 14.2h-48A27.5 27.5 0 0 0 0 347.3v137.3A27.4 27.4 0 0 0 27.4 512h233.1A27.5 27.5 0 0 0 288 484.6V347.3a27.5 27.5 0 0 0 -27.4-27.5zM144 468a52 52 0 1 1 52-52 52 52 0 0 1 -52 52zm355.4-115.9h-60.6l22.4-50.8c2.1-6.7-3.9-13.2-12.2-13.2h-75.6c-6.3 0-11.7 3.9-12.5 9.1l-16.8 106.9c-1 6.3 4.9 11.9 12.5 11.9h62.3l-24.2 83c-1.9 6.7 4.2 12.9 12.2 12.9a13.3 13.3 0 0 0 10.9-5.3l92.4-138.9c4.9-6.9-1.2-15.7-10.9-15.7zM478.1 .3L329.5 23.2C314.9 25.4 304 38.9 304 54.8V161.6a83.3 83.3 0 0 0 -16-1.7c-35.4 0-64 21.5-64 48s28.7 48 64 48c35.2 0 63.7-21.3 64-47.7V99.7l112-17.2v47.2a83.3 83.3 0 0 0 -16-1.7c-35.4 0-64 21.5-64 48s28.7 48 64 48c35.2 0 63.7-21.3 64-47.7V32c0-19.5-16-34.4-33.9-31.7z",nr="M432 416h-23.4L277.9 53.7A32 32 0 0 0 247.6 32h-47.2a32 32 0 0 0 -30.3 21.7L39.4 416H16a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0 -16-16h-19.6l23.3-64h152.6l23.3 64H304a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0 -16-16zM176.9 272L224 142.5 271.2 272z",ir="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",or="M608 0H160a32 32 0 0 0 -32 32v96h160V64h192v320h128a32 32 0 0 0 32-32V32a32 32 0 0 0 -32-32zM232 103a9 9 0 0 1 -9 9h-30a9 9 0 0 1 -9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm352 208a9 9 0 0 1 -9 9h-30a9 9 0 0 1 -9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1 -9 9h-30a9 9 0 0 1 -9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1 -9 9h-30a9 9 0 0 1 -9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm-168 57H32a32 32 0 0 0 -32 32v288a32 32 0 0 0 32 32h384a32 32 0 0 0 32-32V192a32 32 0 0 0 -32-32zM96 224a32 32 0 1 1 -32 32 32 32 0 0 1 32-32zm288 224H64v-32l64-64 32 32 128-128 96 96z",cr="M0 224h192V32H0v192zM64 96h64v64H64V96zm192-64v192h192V32H256zm128 128h-64V96h64v64zM0 480h192V288H0v192zm64-128h64v64H64v-64zm352-64h32v128h-96v-32h-32v96h-64V288h96v32h64v-32zm0 160h32v32h-32v-32zm-64 0h32v32h-32v-32z",lr="M0 448V64h18v384H0zm26.9-.3V64H36v383.7h-9.1zm27.1 0V64h8.9v383.7H54zm44.9 0V64h8.9v383.7h-8.9zm36 0V64h17.7v383.7h-17.7zm44.9 0V64h8.9v383.7h-8.9zm18 0V64h8.9v383.7h-8.9zm18 0V64h8.9v383.7h-8.9zm35.7 0V64h18v383.7h-18zm44.9 0V64h18v383.7h-18zm36 0V64h18v383.7h-18zm36 0V64h18v383.7h-18zm26.9 0V64h18v383.7h-18zm45.1 0V64h26.9v383.7h-26.9zm35.7 0V64h9.1v383.7H476zm18 .3V64h18v384h-18z",ar="M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z",kt="M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1 -32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1 -32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1 -32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.7 23.7 0 0 0 -21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0 -16-16z",dr="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z",hr="M576 128c0-35.3-28.7-64-64-64H205.3c-17 0-33.3 6.7-45.3 18.7L9.4 233.4c-6 6-9.4 14.1-9.4 22.6s3.4 16.6 9.4 22.6L160 429.3c12 12 28.3 18.7 45.3 18.7H512c35.3 0 64-28.7 64-64V128zM271 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z",pr="M 6 3.6 V 0 L 0 6 l 6 6 V 8 c 6 -0.27 7.53 3.76 7.88 5.77 a 0.27 0.27 0 0 0 0.53 0 C 17.08 2.86 6 3.6 6 3.6 Z",ur="M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z",fr="M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z",xr="M254 52.8C249.3 40.3 237.3 32 224 32s-25.3 8.3-30 20.8L57.8 416 32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-1.8 0 18-48 159.6 0 18 48-1.8 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-25.8 0L254 52.8zM279.8 304l-111.6 0L224 155.1 279.8 304z",gr="M448 256c0-106-86-192-192-192l0 384c106 0 192-86 192-192zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z",mr="M256 0L576 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64l0-224c0-35.3 28.7-64 64-64zM476 106.7C471.5 100 464 96 456 96s-15.5 4-20 10.7l-56 84L362.7 169c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l80 0 48 0 144 0c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144zM336 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM64 128l96 0 0 256 0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32 160 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zm8 64c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm336 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z",vr="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z",jr="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z",Nt="M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",br="M134.1 296H436c6.6 0 12-5.4 12-12v-56c0-6.6-5.4-12-12-12H134.1v-46.1c0-21.4-25.9-32.1-41-17L7 239c-9.4 9.4-9.4 24.6 0 33.9l86.1 86.1c15.1 15.1 41 4.4 41-17V296z",yr="apcDB",ye="APCObjectStore",wr=1;function nt(){return new Promise((w,t)=>{const i=indexedDB.open(yr,wr);i.onupgradeneeded=function(o){let d=o.target.result,f;d.objectStoreNames.contains(ye)?f=i.transaction.objectStore(ye):f=d.createObjectStore(ye,{keyPath:"id"}),f.indexNames.contains("nameIndex")||f.createIndex("nameIndex","name",{unique:!1})},i.onsuccess=function(o){w(o.target.result)},i.onerror=function(o){t("Database error: "+o.target.errorCode)}})}function Ee(w,t,i,o){return nt().then(d=>new Promise((f,x)=>{const h=d.transaction(["APCObjectStore"],"readwrite"),b=h.objectStore("APCObjectStore"),l={id:w,classification:t,content:i,misc:o},v=b.put(l);v.onsuccess=()=>f(v.result),v.onerror=()=>x(v.error),h.oncomplete=()=>d.close()}))}function Fe(w){return nt().then(t=>new Promise((i,o)=>{const d=t.transaction([ye],"readonly"),x=d.objectStore(ye).get(w);x.onsuccess=()=>i(x.result),x.onerror=()=>o(x.error),d.oncomplete=()=>t.close()}))}function Cr(w){return nt().then(t=>new Promise((i,o)=>{const d=t.transaction([ye],"readwrite"),x=d.objectStore(ye).delete(w);x.onsuccess=()=>i(),x.onerror=()=>o(x.error),d.oncomplete=()=>t.close()}))}function Ne(w=null){return nt().then(t=>new Promise((i,o)=>{const d=t.transaction([ye],"readonly"),x=d.objectStore(ye).openCursor(),h=[];x.onsuccess=b=>{const l=b.target.result;l?((!w||w(l.value))&&h.push(l.value),l.continue()):i(h)},x.onerror=b=>{o("Failed to retrieve items: "+b.target.errorCode)},d.oncomplete=()=>{t.close()}}))}function Sr(w){const{currentTabNo:t,theme:i,apcCanvasInstance:o,apiEndpoint:d,reloadTabs:f,updateActiveSection:x,initCategory:h,initInstance:b,apiKey:l,setActiveTab:v}=w,[u,y]=a.useState(),[n,m]=a.useState(h||"Hats"),[p,j]=a.useState(!1),[s,C]=a.useState(),B=`${d}/api/v1/designer`;a.useEffect(()=>{I()},[]),a.useEffect(()=>{o&&b&&b.fabricID&&_(b.fabricID)},[b]);const I=()=>{j(!0);const E=`${B}/search-designs-images/${n}`;ge.get(E).then(T=>{j(!1),T.data.object.length>0?y(T.data):C("No matching results found")}).catch(T=>{j(!1),console.error("Error fetching data:",T)})},_=E=>{const T=B+"/find-public-design/"+E;ge.get(T).then(V=>{const{object:Y}=V==null?void 0:V.data;Y&&(window.location.href=`/design-center/${Y.pdid}`)}).catch(V=>{console.error("Error fetching data:",V)})},F=()=>u?u.object.map((E,T)=>e.jsx(a.Fragment,{children:e.jsxs("div",{style:{position:"relative",backgroundColor:"#ffffff",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",borderRadius:"2px",overflow:"hidden",marginBottom:"9px"},tabIndex:0,className:"apc-mpx-widget-responsive-image-container",onClick:()=>_(E.fabricID),children:[e.jsxs("div",{style:{position:"absolute",top:0,right:0,backgroundColor:i.secondaryColor,padding:"5px",zIndex:1,color:"#ffffff"},children:["$",E.product.price]}),e.jsx("img",{src:E.imageURL,alt:E.description,className:"apc-mpx-widget-responsive-image"}),e.jsx("div",{children:E.product.name})]})},T)):null;return e.jsxs(a.Fragment,{children:[e.jsx("br",{}),e.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.jsx("div",{children:e.jsx("input",{placeholder:"Search templates",type:"text",onChange:E=>m(E.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${i.primaryColor}`,height:"40px"}})}),e.jsx("div",{children:e.jsx("button",{className:"apc-mpc-widget-btn",onClick:()=>I(),style:{backgroundColor:i.primaryColor,color:"#ffffff",height:"35px"},children:p?"...Processing":"Search"})})]}),s?e.jsxs("div",{style:{color:"orangered",fontWeight:"bold"},children:[e.jsx("br",{}),s]}):null,e.jsx("br",{})," ",e.jsx("br",{})," ",e.jsx("br",{}),F()]})}const kr={fontFamily:"Arial",fontSize:"40px",color:"transparent",background:"linear-gradient(to bottom, red 0%, yellow 100%)",WebkitBackgroundClip:"text",backgroundClip:"text",cursor:"pointer"},Nr={fontFamily:"comic sans ms",fontSize:"40px",color:"#000",width:"300px",textShadow:`
31
+ <%s key={someKey} {...props} />`,lt,De,nn,De),_t[De+lt]=!0}}return r===s?Qr(Z):Xr(Z),Z}}function Zr(r,g,S){return Bt(r,g,S,!0)}function en(r,g,S){return Bt(r,g,S,!1)}var tn=en,rn=Zr;Xe.Fragment=s,Xe.jsx=tn,Xe.jsxs=rn}()),Xe}var ut;function Rt(){return ut||(ut=1,process.env.NODE_ENV==="production"?nt.exports=Ht():nt.exports=Vt()),nt.exports}var e=Rt();const Ut={primaryColor:"#f88300",primaryColorLight:"#6858c1",secondaryColor:"#005a53",tertiaryColor:"#FFFFFF"},Wt="M80 160c0-35.3 28.7-64 64-64h32c35.3 0 64 28.7 64 64v3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74V320c0 17.7 14.3 32 32 32s32-14.3 32-32v-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7V160c0-70.7-57.3-128-128-128H144C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z",$t="M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z",Gt="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z",Jt="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z",Yt="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z",Kt="M160 64c0-8.8 7.2-16 16-16s16 7.2 16 16V200c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c8.8 0 16 7.2 16 16c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c7.8 0 14.3 5.6 15.7 13c1.6 8.2 7.3 15.1 15.1 18s16.7 1.6 23.3-3.6c2.7-2.1 6.1-3.4 9.9-3.4c8.8 0 16 7.2 16 16l0 16V392c0 39.8-32.2 72-72 72H272 212.3h-.9c-37.4 0-72.4-18.7-93.2-49.9L50.7 312.9c-4.9-7.4-2.9-17.3 4.4-22.2s17.3-2.9 22.2 4.4L116 353.2c5.9 8.8 16.8 12.7 26.9 9.7s17-12.4 17-23V320 64zM176 0c-35.3 0-64 28.7-64 64V261.7C91.2 238 55.5 232.8 28.5 250.7C-.9 270.4-8.9 310.1 10.8 339.5L78.3 440.8c29.7 44.5 79.6 71.2 133.1 71.2h.9H272h56c66.3 0 120-53.7 120-120V288l0-16c0-35.3-28.7-64-64-64c-4.5 0-8.8 .5-13 1.3c-11.7-15.4-30.2-25.3-51-25.3c-6.9 0-13.5 1.1-19.7 3.1C288.7 170.7 269.6 160 248 160c-2.7 0-5.4 .2-8 .5V64c0-35.3-28.7-64-64-64zm48 304c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304zm48-16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304c0-8.8-7.2-16-16-16zm80 16c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304z",qt="M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z",Xt="M160 0c17.7 0 32 14.3 32 32V67.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V445.1c-.4-.1-.9-.1-1.3-.2l-.2 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11V32c0-17.7 14.3-32 32-32z",ft="M47.6 300.4L228.3 469.1c7.5 7 17.4 10.9 27.7 10.9s20.2-3.9 27.7-10.9L464.4 300.4c30.4-28.3 47.6-68 47.6-109.5v-5.8c0-69.9-50.5-129.5-119.4-141C347 36.5 300.6 51.4 268 84L256 96 244 84c-32.6-32.6-79-47.5-124.6-39.9C50.5 55.6 0 115.2 0 185.1v5.8c0 41.5 17.2 81.2 47.6 109.5z",xt="M234.5 5.7c13.9-5 29.1-5 43.1 0l192 68.6C495 83.4 512 107.5 512 134.6V377.4c0 27-17 51.2-42.5 60.3l-192 68.6c-13.9 5-29.1 5-43.1 0l-192-68.6C17 428.6 0 404.5 0 377.4V134.6c0-27 17-51.2 42.5-60.3l192-68.6zM256 66L82.3 128 256 190l173.7-62L256 66zm32 368.6l160-57.1v-188L288 246.6v188z",at="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z",gt="M320 32c-8.1 0-16.1 1.4-23.7 4.1L15.8 137.4C6.3 140.9 0 149.9 0 160s6.3 19.1 15.8 22.6l57.9 20.9C57.3 229.3 48 259.8 48 291.9v28.1c0 28.4-10.8 57.7-22.3 80.8c-6.5 13-13.9 25.8-22.5 37.6C0 442.7-.9 448.3 .9 453.4s6 8.9 11.2 10.2l64 16c4.2 1.1 8.7 .3 12.4-2s6.3-6.1 7.1-10.4c8.6-42.8 4.3-81.2-2.1-108.7C90.3 344.3 86 329.8 80 316.5V291.9c0-30.2 10.2-58.7 27.9-81.5c12.9-15.5 29.6-28 49.2-35.7l157-61.7c8.2-3.2 17.5 .8 20.7 9s-.8 17.5-9 20.7l-157 61.7c-12.4 4.9-23.3 12.4-32.2 21.6l159.6 57.6c7.6 2.7 15.6 4.1 23.7 4.1s16.1-1.4 23.7-4.1L624.2 182.6c9.5-3.4 15.8-12.5 15.8-22.6s-6.3-19.1-15.8-22.6L343.7 36.1C336.1 33.4 328.1 32 320 32zM128 408c0 35.3 86 72 192 72s192-36.7 192-72L496.7 262.6 354.5 314c-11.1 4-22.8 6-34.5 6s-23.5-2-34.5-6L143.3 262.6 128 408z",Qt="M184 48H328c4.4 0 8 3.6 8 8V96H176V56c0-4.4 3.6-8 8-8zm-56 8V96H64C28.7 96 0 124.7 0 160v96H192 352h8.2c32.3-39.1 81.1-64 135.8-64c5.4 0 10.7 .2 16 .7V160c0-35.3-28.7-64-64-64H384V56c0-30.9-25.1-56-56-56H184c-30.9 0-56 25.1-56 56zM320 352H224c-17.7 0-32-14.3-32-32V288H0V416c0 35.3 28.7 64 64 64H360.2C335.1 449.6 320 410.5 320 368c0-5.4 .2-10.7 .7-16l-.7 0zm320 16a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zM496 288c8.8 0 16 7.2 16 16v48h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H496c-8.8 0-16-7.2-16-16V304c0-8.8 7.2-16 16-16z",Zt="M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.7 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z",er="M323.8 34.8c-38.2-10.9-78.1 11.2-89 49.4l-5.7 20c-3.7 13-10.4 25-19.5 35l-51.3 56.4c-8.9 9.8-8.2 25 1.6 33.9s25 8.2 33.9-1.6l51.3-56.4c14.1-15.5 24.4-34 30.1-54.1l5.7-20c3.6-12.7 16.9-20.1 29.7-16.5s20.1 16.9 16.5 29.7l-5.7 20c-5.7 19.9-14.7 38.7-26.6 55.5c-5.2 7.3-5.8 16.9-1.7 24.9s12.3 13 21.3 13L448 224c8.8 0 16 7.2 16 16c0 6.8-4.3 12.7-10.4 15c-7.4 2.8-13 9-14.9 16.7s.1 15.8 5.3 21.7c2.5 2.8 4 6.5 4 10.6c0 7.8-5.6 14.3-13 15.7c-8.2 1.6-15.1 7.3-18 15.1s-1.6 16.7 3.6 23.3c2.1 2.7 3.4 6.1 3.4 9.9c0 6.7-4.2 12.6-10.2 14.9c-11.5 4.5-17.7 16.9-14.4 28.8c.4 1.3 .6 2.8 .6 4.3c0 8.8-7.2 16-16 16H286.5c-12.6 0-25-3.7-35.5-10.7l-61.7-41.1c-11-7.4-25.9-4.4-33.3 6.7s-4.4 25.9 6.7 33.3l61.7 41.1c18.4 12.3 40 18.8 62.1 18.8H384c34.7 0 62.9-27.6 64-62c14.6-11.7 24-29.7 24-50c0-4.5-.5-8.8-1.3-13c15.4-11.7 25.3-30.2 25.3-51c0-6.5-1-12.8-2.8-18.7C504.8 273.7 512 257.7 512 240c0-35.3-28.6-64-64-64l-92.3 0c4.7-10.4 8.7-21.2 11.8-32.2l5.7-20c10.9-38.2-11.2-78.1-49.4-89zM32 192c-17.7 0-32 14.3-32 32V448c0 17.7 14.3 32 32 32H96c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32H32z",tr="M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z",mt="M123.6 391.3c12.9-9.4 29.6-11.8 44.6-6.4c26.5 9.6 56.2 15.1 87.8 15.1c124.7 0 208-80.5 208-160s-83.3-160-208-160S48 160.5 48 240c0 32 12.4 62.8 35.7 89.2c8.6 9.7 12.8 22.5 11.8 35.5c-1.4 18.1-5.7 34.7-11.3 49.4c17-7.9 31.1-16.7 39.4-22.7zM21.2 431.9c1.8-2.7 3.5-5.4 5.1-8.1c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208s-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6c-15.1 6.6-32.3 12.6-50.1 16.1c-.8 .2-1.6 .3-2.4 .5c-4.4 .8-8.7 1.5-13.2 1.9c-.2 0-.5 .1-.7 .1c-5.1 .5-10.2 .8-15.3 .8c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c4.1-4.2 7.8-8.7 11.3-13.5c1.7-2.3 3.3-4.6 4.8-6.9c.1-.2 .2-.3 .3-.5z",vt="M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z",jt="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z",bt="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z",wt="M225.8 468.2l-2.5-2.3L48.1 303.2C17.4 274.7 0 234.7 0 192.8v-3.3c0-70.4 50-130.8 119.2-144C158.6 37.9 198.9 47 231 69.6c9 6.4 17.4 13.8 25 22.3c4.2-4.8 8.7-9.2 13.5-13.3c3.7-3.2 7.5-6.2 11.5-9c0 0 0 0 0 0C313.1 47 353.4 37.9 392.8 45.4C462 58.6 512 119.1 512 189.5v3.3c0 41.9-17.4 81.9-48.1 110.4L288.7 465.9l-2.5 2.3c-8.2 7.6-19 11.9-30.2 11.9s-22-4.2-30.2-11.9zM239.1 145c-.4-.3-.7-.7-1-1.1l-17.8-20c0 0-.1-.1-.1-.1c0 0 0 0 0 0c-23.1-25.9-58-37.7-92-31.2C81.6 101.5 48 142.1 48 189.5v3.3c0 28.5 11.9 55.8 32.8 75.2L256 430.7 431.2 268c20.9-19.4 32.8-46.7 32.8-75.2v-3.3c0-47.3-33.6-88-80.1-96.9c-34-6.5-69 5.4-92 31.2c0 0 0 0-.1 .1s0 0-.1 .1l-17.8 20c-.3 .4-.7 .7-1 1.1c-4.5 4.5-10.6 7-16.9 7s-12.4-2.5-16.9-7z",rr="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z",yt="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z",Ct="M0 336c0 79.5 64.5 144 144 144H512c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z",St="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM164.1 325.5C182 346.2 212.6 368 256 368s74-21.8 91.9-42.5c5.8-6.7 15.9-7.4 22.6-1.6s7.4 15.9 1.6 22.6C349.8 372.1 311.1 400 256 400s-93.8-27.9-116.1-53.5c-5.8-6.7-5.1-16.8 1.6-22.6s16.8-5.1 22.6 1.6zM144.4 208a32 32 0 1 1 64 0 32 32 0 1 1 -64 0zm192-32a32 32 0 1 1 0 64 32 32 0 1 1 0-64z",kt="M48 256C48 141.1 141.1 48 256 48c63.1 0 119.6 28.1 157.8 72.5c8.6 10.1 23.8 11.2 33.8 2.6s11.2-23.8 2.6-33.8C403.3 34.6 333.7 0 256 0C114.6 0 0 114.6 0 256v40c0 13.3 10.7 24 24 24s24-10.7 24-24V256zm458.5-52.9c-2.7-13-15.5-21.3-28.4-18.5s-21.3 15.5-18.5 28.4c2.9 13.9 4.5 28.3 4.5 43.1v40c0 13.3 10.7 24 24 24s24-10.7 24-24V256c0-18.1-1.9-35.8-5.5-52.9zM256 80c-19 0-37.4 3-54.5 8.6c-15.2 5-18.7 23.7-8.3 35.9c7.1 8.3 18.8 10.8 29.4 7.9c10.6-2.9 21.8-4.4 33.4-4.4c70.7 0 128 57.3 128 128v24.9c0 25.2-1.5 50.3-4.4 75.3c-1.7 14.6 9.4 27.8 24.2 27.8c11.8 0 21.9-8.6 23.3-20.3c3.3-27.4 5-55 5-82.7V256c0-97.2-78.8-176-176-176zM150.7 148.7c-9.1-10.6-25.3-11.4-33.9-.4C93.7 178 80 215.4 80 256v24.9c0 24.2-2.6 48.4-7.8 71.9C68.8 368.4 80.1 384 96.1 384c10.5 0 19.9-7 22.2-17.3c6.4-28.1 9.7-56.8 9.7-85.8V256c0-27.2 8.5-52.4 22.9-73.1c7.2-10.4 8-24.6-.2-34.2zM256 160c-53 0-96 43-96 96v24.9c0 35.9-4.6 71.5-13.8 106.1c-3.8 14.3 6.7 29 21.5 29c9.5 0 17.9-6.2 20.4-15.4c10.5-39 15.9-79.2 15.9-119.7V256c0-28.7 23.3-52 52-52s52 23.3 52 52v24.9c0 36.3-3.5 72.4-10.4 107.9c-2.7 13.9 7.7 27.2 21.8 27.2c10.2 0 19-7 21-17c7.7-38.8 11.6-78.3 11.6-118.1V256c0-53-43-96-96-96zm24 96c0-13.3-10.7-24-24-24s-24 10.7-24 24v24.9c0 59.9-11 119.3-32.5 175.2l-5.9 15.3c-4.8 12.4 1.4 26.3 13.8 31s26.3-1.4 31-13.8l5.9-15.3C267.9 411.9 280 346.7 280 280.9V256z",nr="M315.4 15.5C309.7 5.9 299.2 0 288 0s-21.7 5.9-27.4 15.5l-96 160c-5.9 9.9-6.1 22.2-.4 32.2s16.3 16.2 27.8 16.2H384c11.5 0 22.2-6.2 27.8-16.2s5.5-22.3-.4-32.2l-96-160zM288 312V456c0 22.1 17.9 40 40 40H472c22.1 0 40-17.9 40-40V312c0-22.1-17.9-40-40-40H328c-22.1 0-40 17.9-40 40zM128 512a128 128 0 1 0 0-256 128 128 0 1 0 0 256z",ir="M116.7 219.4a15.7 15.7 0 0 0 22.7 0l96.8-99.8c28.2-29 26.5-77.1-4.9-103.9C203.8-7.7 163-3.5 137.9 22.4L128 32.6l-9.9-10.1C93.1-3.5 52.3-7.7 24.9 15.6c-31.4 26.8-33 74.9-5 103.9zm143.9 100.5h-48l-7.1-14.2a27.4 27.4 0 0 0 -25.7-17.8h-71.7a27.4 27.4 0 0 0 -25.7 17.8l-7 14.2h-48A27.5 27.5 0 0 0 0 347.3v137.3A27.4 27.4 0 0 0 27.4 512h233.1A27.5 27.5 0 0 0 288 484.6V347.3a27.5 27.5 0 0 0 -27.4-27.5zM144 468a52 52 0 1 1 52-52 52 52 0 0 1 -52 52zm355.4-115.9h-60.6l22.4-50.8c2.1-6.7-3.9-13.2-12.2-13.2h-75.6c-6.3 0-11.7 3.9-12.5 9.1l-16.8 106.9c-1 6.3 4.9 11.9 12.5 11.9h62.3l-24.2 83c-1.9 6.7 4.2 12.9 12.2 12.9a13.3 13.3 0 0 0 10.9-5.3l92.4-138.9c4.9-6.9-1.2-15.7-10.9-15.7zM478.1 .3L329.5 23.2C314.9 25.4 304 38.9 304 54.8V161.6a83.3 83.3 0 0 0 -16-1.7c-35.4 0-64 21.5-64 48s28.7 48 64 48c35.2 0 63.7-21.3 64-47.7V99.7l112-17.2v47.2a83.3 83.3 0 0 0 -16-1.7c-35.4 0-64 21.5-64 48s28.7 48 64 48c35.2 0 63.7-21.3 64-47.7V32c0-19.5-16-34.4-33.9-31.7z",or="M432 416h-23.4L277.9 53.7A32 32 0 0 0 247.6 32h-47.2a32 32 0 0 0 -30.3 21.7L39.4 416H16a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0 -16-16h-19.6l23.3-64h152.6l23.3 64H304a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0 -16-16zM176.9 272L224 142.5 271.2 272z",sr="M464 32H336c-26.5 0-48 21.5-48 48v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48zm-288 0H48C21.5 32 0 53.5 0 80v128c0 26.5 21.5 48 48 48h80v64c0 35.3-28.7 64-64 64h-8c-13.3 0-24 10.7-24 24v48c0 13.3 10.7 24 24 24h8c88.4 0 160-71.6 160-160V80c0-26.5-21.5-48-48-48z",cr="M608 0H160a32 32 0 0 0 -32 32v96h160V64h192v320h128a32 32 0 0 0 32-32V32a32 32 0 0 0 -32-32zM232 103a9 9 0 0 1 -9 9h-30a9 9 0 0 1 -9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm352 208a9 9 0 0 1 -9 9h-30a9 9 0 0 1 -9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1 -9 9h-30a9 9 0 0 1 -9-9v-30a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm0-104a9 9 0 0 1 -9 9h-30a9 9 0 0 1 -9-9V73a9 9 0 0 1 9-9h30a9 9 0 0 1 9 9zm-168 57H32a32 32 0 0 0 -32 32v288a32 32 0 0 0 32 32h384a32 32 0 0 0 32-32V192a32 32 0 0 0 -32-32zM96 224a32 32 0 1 1 -32 32 32 32 0 0 1 32-32zm288 224H64v-32l64-64 32 32 128-128 96 96z",ar="M0 224h192V32H0v192zM64 96h64v64H64V96zm192-64v192h192V32H256zm128 128h-64V96h64v64zM0 480h192V288H0v192zm64-128h64v64H64v-64zm352-64h32v128h-96v-32h-32v96h-64V288h96v32h64v-32zm0 160h32v32h-32v-32zm-64 0h32v32h-32v-32z",lr="M0 448V64h18v384H0zm26.9-.3V64H36v383.7h-9.1zm27.1 0V64h8.9v383.7H54zm44.9 0V64h8.9v383.7h-8.9zm36 0V64h17.7v383.7h-17.7zm44.9 0V64h8.9v383.7h-8.9zm18 0V64h8.9v383.7h-8.9zm18 0V64h8.9v383.7h-8.9zm35.7 0V64h18v383.7h-18zm44.9 0V64h18v383.7h-18zm36 0V64h18v383.7h-18zm36 0V64h18v383.7h-18zm26.9 0V64h18v383.7h-18zm45.1 0V64h26.9v383.7h-26.9zm35.7 0V64h9.1v383.7H476zm18 .3V64h18v384h-18z",dr="M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z",Nt="M32 464a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128H32zm272-256a16 16 0 0 1 32 0v224a16 16 0 0 1 -32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1 -32 0zm-96 0a16 16 0 0 1 32 0v224a16 16 0 0 1 -32 0zM432 32H312l-9.4-18.7A24 24 0 0 0 281.1 0H166.8a23.7 23.7 0 0 0 -21.4 13.3L136 32H16A16 16 0 0 0 0 48v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16V48a16 16 0 0 0 -16-16z",pr="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z",hr="M576 128c0-35.3-28.7-64-64-64H205.3c-17 0-33.3 6.7-45.3 18.7L9.4 233.4c-6 6-9.4 14.1-9.4 22.6s3.4 16.6 9.4 22.6L160 429.3c12 12 28.3 18.7 45.3 18.7H512c35.3 0 64-28.7 64-64V128zM271 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z",ur="M 6 3.6 V 0 L 0 6 l 6 6 V 8 c 6 -0.27 7.53 3.76 7.88 5.77 a 0.27 0.27 0 0 0 0.53 0 C 17.08 2.86 6 3.6 6 3.6 Z",fr="M352 224c53 0 96-43 96-96s-43-96-96-96s-96 43-96 96c0 4 .2 8 .7 11.9l-94.1 47C145.4 170.2 121.9 160 96 160c-53 0-96 43-96 96s43 96 96 96c25.9 0 49.4-10.2 66.6-26.9l94.1 47c-.5 3.9-.7 7.8-.7 11.9c0 53 43 96 96 96s96-43 96-96s-43-96-96-96c-25.9 0-49.4 10.2-66.6 26.9l-94.1-47c.5-3.9 .7-7.8 .7-11.9s-.2-8-.7-11.9l94.1-47C302.6 213.8 326.1 224 352 224z",xr="M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z",gr="M254 52.8C249.3 40.3 237.3 32 224 32s-25.3 8.3-30 20.8L57.8 416 32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-1.8 0 18-48 159.6 0 18 48-1.8 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-25.8 0L254 52.8zM279.8 304l-111.6 0L224 155.1 279.8 304z",mr="M448 256c0-106-86-192-192-192l0 384c106 0 192-86 192-192zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z",vr="M256 0L576 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64l0-224c0-35.3 28.7-64 64-64zM476 106.7C471.5 100 464 96 456 96s-15.5 4-20 10.7l-56 84L362.7 169c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l80 0 48 0 144 0c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144zM336 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM64 128l96 0 0 256 0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32 160 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zm8 64c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm336 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z",jr="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z",br="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z",Ot="M296 384h-80c-13.3 0-24-10.7-24-24V192h-87.7c-17.8 0-26.7-21.5-14.1-34.1L242.3 5.7c7.5-7.5 19.8-7.5 27.3 0l152.2 152.2c12.6 12.6 3.7 34.1-14.1 34.1H320v168c0 13.3-10.7 24-24 24zm216-8v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h136v8c0 30.9 25.1 56 56 56h80c30.9 0 56-25.1 56-56v-8h136c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z",wr="M134.1 296H436c6.6 0 12-5.4 12-12v-56c0-6.6-5.4-12-12-12H134.1v-46.1c0-21.4-25.9-32.1-41-17L7 239c-9.4 9.4-9.4 24.6 0 33.9l86.1 86.1c15.1 15.1 41 4.4 41-17V296z",yr="apcDB",we="APCObjectStore",Cr=1;function it(){return new Promise((y,t)=>{const o=indexedDB.open(yr,Cr);o.onupgradeneeded=function(s){let d=s.target.result,f;d.objectStoreNames.contains(we)?f=o.transaction.objectStore(we):f=d.createObjectStore(we,{keyPath:"id"}),f.indexNames.contains("nameIndex")||f.createIndex("nameIndex","name",{unique:!1})},o.onsuccess=function(s){y(s.target.result)},o.onerror=function(s){t("Database error: "+s.target.errorCode)}})}function Ee(y,t,o,s){return it().then(d=>new Promise((f,x)=>{const p=d.transaction(["APCObjectStore"],"readwrite"),b=p.objectStore("APCObjectStore"),a={id:y,classification:t,content:o,misc:s},v=b.put(a);v.onsuccess=()=>f(v.result),v.onerror=()=>x(v.error),p.oncomplete=()=>d.close()}))}function Fe(y){return it().then(t=>new Promise((o,s)=>{const d=t.transaction([we],"readonly"),x=d.objectStore(we).get(y);x.onsuccess=()=>o(x.result),x.onerror=()=>s(x.error),d.oncomplete=()=>t.close()}))}function Sr(y){return it().then(t=>new Promise((o,s)=>{const d=t.transaction([we],"readwrite"),x=d.objectStore(we).delete(y);x.onsuccess=()=>o(),x.onerror=()=>s(x.error),d.oncomplete=()=>t.close()}))}function Ne(y=null){return it().then(t=>new Promise((o,s)=>{const d=t.transaction([we],"readonly"),x=d.objectStore(we).openCursor(),p=[];x.onsuccess=b=>{const a=b.target.result;a?((!y||y(a.value))&&p.push(a.value),a.continue()):o(p)},x.onerror=b=>{s("Failed to retrieve items: "+b.target.errorCode)},d.oncomplete=()=>{t.close()}}))}function kr(y){const{currentTabNo:t,theme:o,apcCanvasInstance:s,apiEndpoint:d,reloadTabs:f,updateActiveSection:x,initCategory:p,initInstance:b,apiKey:a,setActiveTab:v}=y,[u,w]=l.useState(),[i,m]=l.useState(p||"Hats"),[h,j]=l.useState(!1),[n,C]=l.useState(),B=`${d}/api/v1/designer`;l.useEffect(()=>{I()},[]),l.useEffect(()=>{s&&b&&b.fabricID&&_(b.fabricID)},[b]);const I=()=>{j(!0);const E=`${B}/search-designs-images/${i}`;ge.get(E).then(T=>{j(!1),T.data.object.length>0?w(T.data):C("No matching results found")}).catch(T=>{j(!1),console.error("Error fetching data:",T)})},_=E=>{const T=B+"/find-public-design/"+E;ge.get(T).then(V=>{const{object:Y}=V==null?void 0:V.data;Y&&(window.location.href=`/design-center/${Y.pdid}`)}).catch(V=>{console.error("Error fetching data:",V)})},F=()=>u?u.object.map((E,T)=>e.jsx(l.Fragment,{children:e.jsxs("div",{style:{position:"relative",backgroundColor:"#ffffff",boxShadow:"0 4px 8px rgba(0, 0, 0, 0.1)",borderRadius:"2px",overflow:"hidden",marginBottom:"9px"},tabIndex:0,className:"apc-mpx-widget-responsive-image-container",onClick:()=>_(E.fabricID),children:[e.jsxs("div",{style:{position:"absolute",top:0,right:0,backgroundColor:o.secondaryColor,padding:"5px",zIndex:1,color:"#ffffff"},children:["$",E.product.price]}),e.jsx("img",{src:E.imageURL,alt:E.description,className:"apc-mpx-widget-responsive-image"}),e.jsx("div",{children:E.product.name})]})},T)):null;return e.jsxs(l.Fragment,{children:[e.jsx("br",{}),e.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.jsx("div",{children:e.jsx("input",{placeholder:"Search templates",type:"text",onChange:E=>m(E.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${o.primaryColor}`,height:"40px"}})}),e.jsx("div",{children:e.jsx("button",{className:"apc-mpc-widget-btn",onClick:()=>I(),style:{backgroundColor:o.primaryColor,color:"#ffffff",height:"35px"},children:h?"...Processing":"Search"})})]}),n?e.jsxs("div",{style:{color:"orangered",fontWeight:"bold"},children:[e.jsx("br",{}),n]}):null,e.jsx("br",{})," ",e.jsx("br",{})," ",e.jsx("br",{}),F()]})}const Nr={fontFamily:"Arial",fontSize:"40px",color:"transparent",background:"linear-gradient(to bottom, red 0%, yellow 100%)",WebkitBackgroundClip:"text",backgroundClip:"text",cursor:"pointer"},Or={fontFamily:"comic sans ms",fontSize:"40px",color:"#000",width:"300px",textShadow:`
31
32
  -1px -1px 0 #ff0000,
32
33
  1px -1px 0 #ff0000,
33
34
  -1px 1px 0 #ff0000,
34
- 1px 1px 0 #ff0000`,cursor:"pointer"},Or={fontFamily:"Arial",fontSize:"40px",color:"#000",width:"300px",transform:"skewX(20deg) skewY(10deg)",textAlign:"center",cursor:"pointer"},Ar={fontFamily:"Arial",fontSize:"40px",color:"#000",textShadow:"0 0 10px green",textAlign:"center",cursor:"pointer"},Ir={fontFamily:"Arial",fontSize:"40px",color:"#000",backgroundColor:"orange",borderRadius:"5px",cursor:"pointer"},Er={color:"black",fontSize:"40px",opacity:"0.5",fontFamily:"Arial, sans-serif",cursor:"pointer"};function Tr(w){const{apcCanvasInstance:t,isMobile:i,closeMobileModalSecondaryPanel:o}=w,d=(n,m)=>{const p=new M.fabric.Textbox("Stay Humble!",{width:300,left:200,top:200,fontFamily:n,fill:m,hasControls:!0});t.add(p),t.setActiveObject(p),i&&o(!0)},f=({primaryTextLabel:n,primaryTextFontFamily:m,primaryTextColor:p,secondaryTextLabel:j,SecondaryTextFontFamily:s,secondaryTextColor:C})=>{const B=new M.fabric.Textbox(n,{fontFamily:m,width:300,left:200,top:200,fill:p}),I=new M.fabric.Textbox(j,{fontFamily:s,fill:C,fontSize:12,width:150});I.top=B.top+B.height+10,I.left=B.left,t.add(B),t.add(I),t.setActiveObject(B),i&&o(!0)},x=(n,m)=>{const p=new M.fabric.Textbox("Adventure Awaits!",{width:300,left:200,top:200,fontFamily:n,fill:m}),j={color:"rgba(0,0,0,0.5)",blur:10,offsetX:5,offsetY:5};p.shadow=j,t.add(p),t.setActiveObject(p),i&&o(!0)},h=()=>{const n=new M.fabric.Textbox("Love More",{left:100,top:100,width:300,fontFamily:"Arial",fill:new M.fabric.Gradient({type:"linear",gradientUnits:"pixels",coords:{x1:0,y1:0,x2:0,y2:50},colorStops:[{offset:0,color:"red"},{offset:1,color:"yellow"}]})});t.add(n),t.setActiveObject(n),i&&o(!0)},b=()=>{const n=new M.fabric.Textbox("Good Vibes Only",{left:150,top:150,fontFamily:"comic sans ms",fontSize:40,width:300,fill:"#000",stroke:"#ff0000",strokeWidth:2});t.add(n),t.setActiveObject(n),i&&o(!0)},l=()=>{const n=new M.fabric.Textbox("Dream Big",{left:300,top:300,width:300,fontFamily:"Arial",fill:"#000",skewX:20,skewY:10});t.add(n),t.setActiveObject(n),i&&o(!0)},v=()=>{const n=new M.fabric.Textbox("Choose Joy",{left:350,top:350,fontFamily:"Arial",fill:"#000",opacity:.5});t.add(n),t.setActiveObject(n),i&&o(!0)},u=()=>{const n=new M.fabric.Textbox("Find Your Fire",{left:550,top:550,fontFamily:"Arial",fill:"#000",shadow:"yellow 0 0 10px"});t.add(n),t.setActiveObject(n),i&&o(!0)},y=()=>{const n=new M.fabric.Textbox("Be Kind",{left:650,top:650,fontFamily:"Arial",fill:"#000",backgroundColor:"orange"});t.add(n),t.setActiveObject(n),i&&o(!0)};return e.jsx(a.Fragment,{children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[e.jsx("div",{style:{fontSize:"20px",cursor:"pointer"},onClick:()=>d("Arial, sans-serif","#6a45d2"),children:e.jsx("span",{style:{color:"#6a45d2",fontFamily:"Arial, sans-serif",fontSize:"30px"},children:"Stay Humble "})}),e.jsx("div",{style:{fontSize:"20px",cursor:"pointer"},onClick:()=>f({primaryTextLabel:"Life is full of",primaryTextFontFamily:"Rock Salt, cursive",primaryTextColor:"black",secondaryTextLabel:"surprises",SecondaryTextFontFamily:"Arial, sans-serif",secondaryTextColor:"black"}),children:e.jsxs("span",{style:{color:"black",fontFamily:"Rock Salt, cursive",fontSize:"30px"},children:["Life is full of ",e.jsx("div",{style:{fontFamily:"Arial, sans-serif",fontSize:"14px"},children:"surprises"})," "]})}),e.jsx("div",{style:{fontSize:"20px",cursor:"pointer",paddingLeft:"20px"},onClick:()=>f({primaryTextLabel:"You are invited!",primaryTextFontFamily:"Bilbao Swash Caps",primaryTextColor:"green",secondaryTextLabel:"Taste the best wines from the best makers",SecondaryTextFontFamily:"Arial, sans-serif",secondaryTextColor:"green"}),children:e.jsxs("span",{style:{color:"green",fontFamily:"Bilbao Swash Caps",fontSize:"30px"},children:["You are invited! ",e.jsx("div",{style:{color:"green",fontFamily:"Arial, sans-serif",fontSize:"14px",textAlign:"right"},children:"Taste the best wines from the best makers"})," "]})}),e.jsx("div",{style:{fontSize:"20px",cursor:"pointer",paddingLeft:"20px"},onClick:()=>x("aclonica","#6a45d2"),children:e.jsx("span",{style:{color:"#6a45d2",fontFamily:"aclonica",fontSize:"30px",textShadow:"2px 2px 4px rgba(0, 0, 0, 2)"},children:"Adventure Awaits "})}),e.jsx("div",{onClick:()=>h(),style:kr,children:"Love More"}),e.jsx("div",{onClick:()=>b(),style:Nr,children:"Good Vibes Only"}),e.jsx("div",{onClick:()=>l(),style:Or,children:"Dream Big"}),e.jsx("div",{onClick:()=>u(),style:Ar,children:"Find Your Fire"}),e.jsx("div",{onClick:()=>y(),style:Ir,children:"Be Kind"}),e.jsx("div",{onClick:()=>v(),style:Er,children:"Choose Joy"})]})})}const Ot=async w=>{try{const i=await(await fetch(w)).blob();return new Promise((o,d)=>{const f=new FileReader;f.onloadend=()=>o(f.result),f.onerror=d,f.readAsDataURL(i)})}catch(t){throw console.error("Error converting image to base64:",t),t}};function Mr({apcCanvasInstance:w,theme:t}){const[i,o]=a.useState(!1),d=l=>{const v=l.target.files[0];if(v){const u=new FileReader;u.onload=y=>x(y.target.result),u.readAsDataURL(v)}},f=l=>{l.preventDefault(),o(!1);const v=l.dataTransfer.files[0];if(v){const u=new FileReader;u.onload=y=>x(y.target.result),u.readAsDataURL(v)}},x=l=>{M.fabric.Image.fromURL(l,v=>{v.set({left:100,top:100,scaleX:.5,scaleY:.5}),w.add(v)})},h=l=>{l.preventDefault(),o(!0)},b=()=>{o(!1)};return e.jsxs("div",{style:{border:i?"2px dashed #4CAF50":"2px dashed #ccc",padding:"40px",margin:"20px",borderRadius:"10px",textAlign:"center",backgroundColor:i?"#f0fff4":"#f9f9f9",transition:"background-color 0.3s",cursor:"pointer",position:"relative"},onDragOver:h,onDragLeave:b,onDrop:f,onClick:()=>document.getElementById("file-input").click(),children:[e.jsx("input",{type:"file",accept:"image/*",style:{display:"none"},id:"file-input",onChange:d}),e.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:i?"#4CAF50":"#ccc",fontSize:"48px"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"18",viewBox:"0 0 512 512",style:{fill:t.primaryColor},children:e.jsx("path",{d:Nt})}),e.jsx("br",{})," ",e.jsx("br",{})]}),e.jsx("label",{htmlFor:"file-input",style:{display:"block",marginTop:"80px",fontSize:"16px",color:"#333"},children:"Click or drag & drop to upload an image"}),e.jsx("div",{style:{fontSize:"12px",color:"#888"},children:"Supports PNG, JPG, WEBP formats"})]})}function it(w){const{featureText:t}=w;return e.jsxs("div",{style:{padding:"10px"},children:[t??"This is a premium feature. Get API key here","  ",e.jsx("a",{href:"https://mypixia.com/api-key",target:"_blank",children:"https://mypixia.com/api-key"}),e.jsx("br",{})]})}function ot(){return e.jsxs("div",{className:"loading-container",children:[e.jsxs("div",{className:"spinner",children:[e.jsx("div",{className:"spinner-circle"}),e.jsx("div",{className:"spinner-circle-inner"})]}),e.jsx("p",{className:"loading-text",children:"Loading..."})]})}function zr(w){const{apcCanvasInstance:t,theme:i,apiKey:o,apiEndpoint:d,isMobile:f,closeMobileModalSecondaryPanel:x}=w,[h,b]=a.useState("flowers"),[l,v]=a.useState(!1),[u,y]=a.useState(),[n,m]=a.useState(!1),[p,j]=a.useState(!1),s=sessionStorage.getItem("apc_x_sub_status"),C=`${d}/api/v1/designer`;a.useEffect(()=>{I()},[]),a.useEffect(()=>{(async()=>{s==="active"?(m(!0),j(!0)):(v(!0),await B())})()},[]);const B=()=>{v(!0);const T=`${C}/get-subscription-status/${o}`;ge.get(T).then(V=>{V.data.object&&V.data.object==="active"&&(sessionStorage.setItem("apc_x_sub_status","active"),m(!0))}).catch(V=>{sessionStorage.setItem("apc_x_sub_status","")}).finally(()=>{v(!1),j(!0)})},I=()=>{v(!0);const T={"X-Api-Key":o},V=`${C}/get-images/${h}`;ge.get(V,{headers:T}).then(Y=>{var J;v(!1),y((J=Y.data)==null?void 0:J.object)}).catch(Y=>{console.error("Error fetching data:",Y),v(!1)})},_=async T=>{const V=await Ot(T);V&&M.fabric.Image.fromURL(V,Y=>{Y.set({left:0,top:0,scaleX:.3,scaleY:.3}),t.add(Y)}),f&&x(!0)},F=()=>u?e.jsx("div",{children:u.map(T=>e.jsx("div",{onClick:()=>_(T.urls.regular),style:{cursor:"pointer"},children:e.jsx("img",{height:300,width:300,src:T.urls.regular,alt:T.description||"No description"})},T.id))}):null,E=()=>!n&&!l&&p?e.jsx(it,{featureText:"Get premium AI images with subscription at "}):n&&!l&&p?e.jsxs("div",{children:[e.jsx("strong",{children:"- OR -"}),e.jsxs("div",{children:[e.jsx("input",{type:"text",onChange:T=>b(T.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${i.primaryColor}`}}),e.jsx("br",{})," ",e.jsx("br",{}),e.jsx("button",{className:"apc-mpc-widget-btn",onClick:()=>I(),style:{backgroundColor:i.primaryColor,color:"#ffffff"},children:l?"...Processing":"Search"})]}),e.jsx("br",{}),e.jsx("br",{}),F()]}):e.jsx(ot,{});return e.jsxs(a.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),e.jsx(Mr,{apcCanvasInstance:t,theme:i}),e.jsx("br",{}),e.jsx("br",{}),E()]})}function At(w){const{apcCanvasInstance:t,theme:i,isMobile:o,closeMobileModalSecondaryPanel:d}=w,f=j=>{const s=new M.fabric.Rect({width:100,height:60,left:200,top:200,fill:"",stroke:i.primaryColor});t.add(s),t.setActiveObject(s),o&&d(!0)},x=j=>{const s=new M.fabric.Circle({radius:30,fill:"",stroke:i.primaryColor,left:200,top:200});t.add(s),t.setActiveObject(s),o&&d(!0)},h=j=>{const s=new M.fabric.Triangle({width:40,height:50,fill:"",stroke:i.primaryColor,left:200,top:200});t.add(s),t.setActiveObject(s),o&&d(!0)},b=j=>{const s=new M.fabric.Line([50,10,250,10],{fill:"",stroke:i.primaryColor,left:200,top:200});t.add(s),t.setActiveObject(s),o&&d(!0)},l=(j,s,C)=>{const B=s,I=s,_=Math.PI/j;let F=[],E=0;for(let T=0;T<j;T++){let V=B+Math.cos(E)*s,Y=I+Math.sin(E)*s;F.push({x:V,y:Y}),E+=_,V=B+Math.cos(E)*C,Y=I+Math.sin(E)*C,F.push({x:V,y:Y}),E+=_}return F},v=(j,s)=>{const C=Math.PI*2/j,B=s,I=s,_=[];for(let F=0;F<j;F++){const E=B+s*Math.cos(F*C),T=I+s*Math.sin(F*C);_.push({x:E,y:T})}return _},u=j=>{const s=l(5,60,30),C=new M.fabric.Polygon(s,{left:200,top:200,fill:"",stroke:i.primaryColor,strokeWidth:2,strokeLineJoin:"bevil"},!1);t.add(C),t.setActiveObject(C),o&&d(!0)},y=j=>{const s=v(6,30),C=new M.fabric.Polygon(s,{left:200,top:200,fill:"",stroke:i.primaryColor,strokeWidth:2,strokeLineJoin:"bevil"},!1);t.add(C),t.setActiveObject(C),o&&d(!0)},n=j=>{const s=new M.fabric.Path(ut,{fill:"",stroke:i.primaryColor,left:200,top:200});t.add(s),t.setActiveObject(s),o&&d(!0)},m=j=>{const s=new M.fabric.Path(ft,{fill:"",stroke:i.primaryColor,left:200,top:200});t.add(s),t.setActiveObject(s),o&&d(!0)},p=j=>{const s=new M.fabric.Path(lt,{fill:"",stroke:i.primaryColor,left:200,top:200});t.add(s),t.setActiveObject(s),o&&d(!0)};return t?e.jsxs(a.Fragment,{children:[e.jsx("br",{}),e.jsx("div",{onClick:j=>f(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"76",width:"76",viewBox:"0 0 712 712",fill:"none",strokeWidth:"4",stroke:i.primaryColor,children:e.jsx("path",{d:"M512 512H0V0h512v512z"})})}),e.jsx("div",{onClick:j=>x(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"66",width:"66",viewBox:"0 0 512 512",fill:"none",strokeWidth:"4",stroke:i.primaryColor,children:e.jsx("path",{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"})})}),e.jsx("div",{onClick:j=>h(),draggable:!0,style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"106",width:"106",viewBox:"0 0 320 512",fill:"none",strokeWidth:"4",stroke:i.primaryColor,children:e.jsx("path",{d:"M288.7 352H31.3c-17.8 0-26.7-21.5-14.1-34.1l128.7-128.7c7.8-7.8 20.5-7.8 28.3 0l128.7 128.7c12.6 12.6 3.7 34.1-14.1 34.1z"})})}),e.jsx("div",{onClick:j=>u(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"86",width:"86",viewBox:"0 0 576 512",fill:"none",strokeWidth:"4",stroke:i.primaryColor,children:e.jsx("path",{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"})})}),e.jsx("div",{onClick:j=>y(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",strokeWidth:"4",stroke:i.primaryColor,height:"80px",width:"80px",version:"1.1",id:"Capa_1",viewBox:"0 0 184.751 184.751",children:e.jsx("path",{d:"M0,92.375l46.188-80h92.378l46.185,80l-46.185,80H46.188L0,92.375z"})})}),e.jsx("div",{onClick:j=>b(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",strokeWidth:"4",stroke:i.primaryColor,id:"Capa_1",width:"86px",height:"86px",viewBox:"0 0 290.658 290.658",children:e.jsx("g",{children:e.jsx("g",{children:e.jsx("rect",{y:"139.474",style:{fill:i.primaryColor},width:"290.658",height:"1.711"})})})})}),e.jsx("div",{onClick:j=>n(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"86",width:"86",viewBox:"0 0 512 512",fill:"none",strokeWidth:"4",stroke:i.primaryColor,children:e.jsx("path",{d:ut})})}),e.jsx("div",{onClick:j=>m(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"86",width:"86",viewBox:"0 0 512 512",fill:"none",strokeWidth:"4",stroke:i.primaryColor,children:e.jsx("path",{d:ft})})}),e.jsx("div",{onClick:j=>p(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"86",width:"86",viewBox:"0 0 448 512",fill:"none",strokeWidth:"4",stroke:i.primaryColor,children:e.jsx("path",{d:lt})})})]}):null}function Lr(w){const{apcCanvasInstance:t,theme:i,isMobile:o,closeMobileModalSecondaryPanel:d}=w,f=h=>{const b=new M.fabric.Path(h,{left:200,top:200,fill:i.primaryColor,scaleX:.1,scaleY:.1});t.add(b),t.setActiveObject(b),o&&d(!0)},x=h=>{switch(h){case"icon-phone":f(Wt);break;case"icon-question":f(Ut);break;case"icon-clock":f(Gt);break;case"icon-twitter":f($t);break;case"icon-check":f(Jt);break;case"icon-pointer":f(Yt);break;case"icon-mail":f(Kt);break;case"icon-dollar":f(qt);break;case"icon-graduation":f(xt);break;case"icon-business-suit":f(Xt);break;case"icon-chat":f(Qt);break;case"icon-thumbs-up":f(Zt);break;case"icon-wifi":f(er);break;case"icon-info":f(vt);break;case"icon-cart":f(mt);break;case"icon-comment":f(gt);break;case"icon-location-map":f(jt);break;case"icon-heart-1":f(bt);break;case"icon-arrow-right-1":f(lt);break;case"icon-xmark":f(yt);break;case"icon-cloud":f(wt);break;case"icon-smile":f(Ct);break;case"icon-like":f(St);break;default:console.log("no matching type")}};return e.jsx(a.Fragment,{children:e.jsxs("div",{style:{padding:"5px"},className:o?"apc-mpx-widget-secondary-icons-mobile":"apc-mpx-widget-secondary-icons",children:[e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-phone"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:"M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-question"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 320 512",children:e.jsx("path",{fill:i.primaryColor,d:"M80 160c0-35.3 28.7-64 64-64h32c35.3 0 64 28.7 64 64v3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74V320c0 17.7 14.3 32 32 32s32-14.3 32-32v-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7V160c0-70.7-57.3-128-128-128H144C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-clock"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-twitter"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-check"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:i.primaryColor,d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-pointer"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:i.primaryColor,d:"M160 64c0-8.8 7.2-16 16-16s16 7.2 16 16V200c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c8.8 0 16 7.2 16 16c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c7.8 0 14.3 5.6 15.7 13c1.6 8.2 7.3 15.1 15.1 18s16.7 1.6 23.3-3.6c2.7-2.1 6.1-3.4 9.9-3.4c8.8 0 16 7.2 16 16l0 16V392c0 39.8-32.2 72-72 72H272 212.3h-.9c-37.4 0-72.4-18.7-93.2-49.9L50.7 312.9c-4.9-7.4-2.9-17.3 4.4-22.2s17.3-2.9 22.2 4.4L116 353.2c5.9 8.8 16.8 12.7 26.9 9.7s17-12.4 17-23V320 64zM176 0c-35.3 0-64 28.7-64 64V261.7C91.2 238 55.5 232.8 28.5 250.7C-.9 270.4-8.9 310.1 10.8 339.5L78.3 440.8c29.7 44.5 79.6 71.2 133.1 71.2h.9H272h56c66.3 0 120-53.7 120-120V288l0-16c0-35.3-28.7-64-64-64c-4.5 0-8.8 .5-13 1.3c-11.7-15.4-30.2-25.3-51-25.3c-6.9 0-13.5 1.1-19.7 3.1C288.7 170.7 269.6 160 248 160c-2.7 0-5.4 .2-8 .5V64c0-35.3-28.7-64-64-64zm48 304c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304zm48-16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304c0-8.8-7.2-16-16-16zm80 16c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-mail"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:"M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-dollar"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 320 512",children:e.jsx("path",{fill:i.primaryColor,d:"M160 0c17.7 0 32 14.3 32 32V67.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V445.1c-.4-.1-.9-.1-1.3-.2l-.2 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11V32c0-17.7 14.3-32 32-32z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-graduation"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:i.primaryColor,d:xt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-business-suit"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:i.primaryColor,d:"M184 48H328c4.4 0 8 3.6 8 8V96H176V56c0-4.4 3.6-8 8-8zm-56 8V96H64C28.7 96 0 124.7 0 160v96H192 352h8.2c32.3-39.1 81.1-64 135.8-64c5.4 0 10.7 .2 16 .7V160c0-35.3-28.7-64-64-64H384V56c0-30.9-25.1-56-56-56H184c-30.9 0-56 25.1-56 56zM320 352H224c-17.7 0-32-14.3-32-32V288H0V416c0 35.3 28.7 64 64 64H360.2C335.1 449.6 320 410.5 320 368c0-5.4 .2-10.7 .7-16l-.7 0zm320 16a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zM496 288c8.8 0 16 7.2 16 16v48h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H496c-8.8 0-16-7.2-16-16V304c0-8.8 7.2-16 16-16z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-chat"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:i.primaryColor,d:"M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.7 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-thumbs-up"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:"M323.8 34.8c-38.2-10.9-78.1 11.2-89 49.4l-5.7 20c-3.7 13-10.4 25-19.5 35l-51.3 56.4c-8.9 9.8-8.2 25 1.6 33.9s25 8.2 33.9-1.6l51.3-56.4c14.1-15.5 24.4-34 30.1-54.1l5.7-20c3.6-12.7 16.9-20.1 29.7-16.5s20.1 16.9 16.5 29.7l-5.7 20c-5.7 19.9-14.7 38.7-26.6 55.5c-5.2 7.3-5.8 16.9-1.7 24.9s12.3 13 21.3 13L448 224c8.8 0 16 7.2 16 16c0 6.8-4.3 12.7-10.4 15c-7.4 2.8-13 9-14.9 16.7s.1 15.8 5.3 21.7c2.5 2.8 4 6.5 4 10.6c0 7.8-5.6 14.3-13 15.7c-8.2 1.6-15.1 7.3-18 15.1s-1.6 16.7 3.6 23.3c2.1 2.7 3.4 6.1 3.4 9.9c0 6.7-4.2 12.6-10.2 14.9c-11.5 4.5-17.7 16.9-14.4 28.8c.4 1.3 .6 2.8 .6 4.3c0 8.8-7.2 16-16 16H286.5c-12.6 0-25-3.7-35.5-10.7l-61.7-41.1c-11-7.4-25.9-4.4-33.3 6.7s-4.4 25.9 6.7 33.3l61.7 41.1c18.4 12.3 40 18.8 62.1 18.8H384c34.7 0 62.9-27.6 64-62c14.6-11.7 24-29.7 24-50c0-4.5-.5-8.8-1.3-13c15.4-11.7 25.3-30.2 25.3-51c0-6.5-1-12.8-2.8-18.7C504.8 273.7 512 257.7 512 240c0-35.3-28.6-64-64-64l-92.3 0c4.7-10.4 8.7-21.2 11.8-32.2l5.7-20c10.9-38.2-11.2-78.1-49.4-89zM32 192c-17.7 0-32 14.3-32 32V448c0 17.7 14.3 32 32 32H96c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32H32z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-wifi"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:i.primaryColor,d:"M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-info"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:vt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-cart"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 576 512",children:e.jsx("path",{fill:i.primaryColor,d:mt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-comment"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:gt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-location-map"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 384 512",children:e.jsx("path",{fill:i.primaryColor,d:jt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-heart-1"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:bt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-arrow-right-1"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:i.primaryColor,d:tr})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-xmark"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 384 512",children:e.jsx("path",{fill:i.primaryColor,d:yt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-cloud"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:i.primaryColor,d:wt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-smile"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:Ct})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:h=>x("icon-like"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:i.primaryColor,d:St})})})]})})}const Pe=({defaultValue:w,size:t,ariaLabel:i,onChange:o})=>{const[d,f]=a.useState(w),x=h=>{const b=h.target.value;f(b),o(b)};return e.jsx("input",{type:"range",value:d,min:"0",max:"100",step:"1",className:`slider ${t}`,"aria-label":i,onChange:x})};function It(w){const{apcCanvasInstance:t,theme:i}=w,[o,d]=a.useState(!1),f=a.useRef(null),x=()=>{d(n=>!n)},h=n=>{f.current&&f.current.contains(n.target)||d(!1)};a.useEffect(()=>(document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}),[]);const b=(n,m)=>{if(t.getActiveObject()){if(m==="family"&&t.getActiveObject().set({fontFamily:n}),m==="bold"&&t.getActiveObject().set({fontWeight:n}),m==="italic"&&t.getActiveObject().set({fontStyle:n}),m==="underline"&&t.getActiveObject().set({underline:n}),m==="line-through"&&t.getActiveObject().set({linethrough:n}),m==="overline"&&t.getActiveObject().set({overline:n}),m==="color"&&t.getActiveObject().set({fill:n}),m==="shadow"){const p=document.getElementById("apc-text-shadow-color").value;let j=document.getElementById("apc-text-shadow-horiz").value,s=document.getElementById("apc-text-shadow-vert").value,C=document.getElementById("apc-text-shadow-blur").value;j||(j=5),s||(s=5),C||(C=5),t.getActiveObject().set({shadow:p+" "+j+" "+s+" "+C})}if(m==="stroke"){const p=document.getElementById("apc-text-stroke-color").value;let j=document.getElementById("apc-text-stroke-width").value;j||(j=1),t.getActiveObject().set({stroke:p,strokeWidth:j})}m==="bg-color"&&t.getActiveObject().set({textBackgroundColor:n}),m==="font-size"&&t.getActiveObject().set({fontSize:n}),t&&t.renderAll()}},l=n=>{if(t.getActiveObject()){const m=parseFloat(n/100);t.getActiveObject().set({opacity:m.toFixed(1)}),t&&t.renderAll()}},v=({color:n,x:m,y:p,blur:j})=>{if(t.getActiveObject()){const s=t.getActiveObject().shadow;n||(n=s?s.color:"#6a45d2"),m||(m=s?s.offsetX:5),p||(p=s?s.offsetY:5),j||(j=s?s.blur:5),t.getActiveObject().set({shadow:n+" "+m+" "+p+" "+j}),t&&t.renderAll()}},u=()=>e.jsxs("div",{className:"apc-mpx-widget-button-group-container",children:[" ",e.jsx("button",{className:"apc-mpx-widget-effects-button",onClick:x,style:{color:i.primaryColor,cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",height:"15px",width:"15px",children:e.jsx("path",{fill:i.primaryColor,d:xr})})}),o&&e.jsxs("div",{className:"apc-mpx-widget-popper-container",ref:f,children:[e.jsx("div",{className:"apc-mpx-widget-popper-arrow-up"}),e.jsxs("ul",{id:"split-button-menu",autoFocus:!0,children:[e.jsx("li",{className:"apc-mpx-widget-popper-li",children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("div",{style:{fontWeight:"bold",color:"purple"},children:"Background"}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:n=>b(n.target.value,"bg-color")})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Opacity",e.jsx("div",{children:e.jsx(Pe,{defaultValue:100,size:"small","aria-label":"Opacity",onChange:n=>l(n)})})]})]})}),e.jsx("li",{className:"apc-mpx-widget-popper-li",children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("div",{style:{fontWeight:"bold",color:"purple"},children:"Shadow"}),e.jsxs("div",{style:{marginLeft:"10px"},children:["Blur ",e.jsx("input",{type:"text",style:{height:"22px",width:"20px"},onChange:n=>v({blur:n.target.value})})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:n=>v({color:n.target.value})})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Offset X",e.jsx("div",{children:e.jsx(Pe,{defaultValue:0,size:"small","aria-label":"Opacity",onChange:n=>v({x:n})})})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Offset Y",e.jsx("div",{children:e.jsx(Pe,{defaultValue:0,size:"small","aria-label":"Opacity",onChange:n=>v({y:n})})})]})]})})]})]})]});return e.jsx(a.Fragment,{children:e.jsxs("div",{style:{display:"flex",flexDirection:"row",color:"#ffffff"},children:[e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px"},children:e.jsx("input",{style:{height:"20px",width:"30px",border:"solid 0px #ffffff"},type:"color",onChange:n=>b(n.target.value,"color")})})," ",e.jsx("div",{style:{marginTop:"4px"},children:e.jsxs("select",{style:{height:"20px",border:"solid 0px #ffffff"},id:"ffamily",onChange:n=>b(n.target.value,"family"),children:[e.jsx("option",{value:"comic sans ms",children:"Comic Sans MS"}),e.jsx("option",{value:"frankruehl",children:"FrankRuehl"}),e.jsx("option",{value:"lucida Bright",children:"Lucida Bright"}),e.jsx("option",{value:"bradley Hand",children:"Bradley Hand"}),e.jsx("option",{value:"Times New Roman",children:"Times New Roman"}),e.jsx("option",{value:"Georgia",children:"Georgia"}),e.jsx("option",{value:"Garamond",children:"Garamond"}),e.jsx("option",{value:"Baskerville",children:"Baskerville"}),e.jsx("option",{value:"Palatino",children:"Palatino"}),e.jsx("option",{value:"Book Antiqua",children:"Book Antiqua"}),e.jsx("option",{value:"Arial",children:"Arial"}),e.jsx("option",{value:"Helvetica",children:"Helvetica"}),e.jsx("option",{value:"Verdana",children:"Verdana"}),e.jsx("option",{value:"Tahoma",children:"Tahoma"}),e.jsx("option",{value:"Futura",children:"Futura"}),e.jsx("option",{value:"Calibri",children:"Calibri"}),e.jsx("option",{value:"Courier New",children:"Courier New"}),e.jsx("option",{value:"Consolas",children:"Consolas"}),e.jsx("option",{value:"Monaco",children:"Monaco"}),e.jsx("option",{value:"Brush Script",children:"Brush Script"}),e.jsx("option",{value:"Lucida Handwriting",children:"Lucida Handwriting"}),e.jsx("option",{value:"Zapfino",children:"Zapfino"}),e.jsx("option",{value:"Impact",children:"Impact"}),e.jsx("option",{value:"Cooper Black",children:"Cooper Black"}),e.jsx("option",{value:"Papyrus",children:"Papyrus"}),e.jsx("option",{value:"Comic Sans MS",children:"Comic Sans MS"}),e.jsx("option",{value:"Gotham",children:"Gotham"}),e.jsx("option",{value:"Franklin Gothic",children:"Franklin Gothic"}),e.jsx("option",{value:"DIN",children:"DIN"}),e.jsx("option",{value:"Rockwell",children:"Rockwell"}),e.jsx("option",{value:"Century Gothic",children:"Century Gothic"}),e.jsx("option",{value:"Trebuchet MS",children:"Trebuchet MS"}),e.jsx("option",{value:"Lobster",children:"Lobster"}),e.jsx("option",{value:"Roboto",children:"Roboto"}),e.jsx("option",{value:"Myriad Pro",children:"Myriad Pro"}),e.jsx("option",{value:"Gill Sans",children:"Gill Sans"}),e.jsx("option",{value:"Bodoni",children:"Bodoni"}),e.jsx("option",{value:"Perpetua",children:"Perpetua"}),e.jsx("option",{value:"Akzidenz-Grotesk",children:"Akzidenz-Grotesk"}),e.jsx("option",{value:"Source Sans Pro",children:"Source Sans Pro"}),e.jsx("option",{value:"Lato",children:"Lato"}),e.jsx("option",{value:"Noto Sans",children:"Noto Sans"}),e.jsx("option",{value:"Open Sans",children:"Open Sans"}),e.jsx("option",{value:"Montserrat",children:"Montserrat"})]})})," ",e.jsx("div",{style:{marginTop:"4px"},children:e.jsx("input",{defaultValue:40,style:{width:"50px",height:"20px",border:"solid 0px #ffffff"},type:"number",onChange:n=>b(n.target.value,"font-size")})}),e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px",cursor:"pointer"},role:"button",onClick:n=>t.getActiveObject().fontWeight==="normal"?b("bold","bold"):b("normal","bold"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",viewBox:"0 0 384 512",children:e.jsx("path",{fill:"#ffffff",d:"M333.5 238a122 122 0 0 0 27-65.2C367.9 96.5 308 32 233.4 32H34a16 16 0 0 0 -16 16v48a16 16 0 0 0 16 16h31.9v288H34a16 16 0 0 0 -16 16v48a16 16 0 0 0 16 16h209.3c70.8 0 134.1-51.8 141-122.4 4.7-48.5-16.4-92.1-50.8-119.6zM145.7 112h87.8a48 48 0 0 1 0 96h-87.8zm87.8 288h-87.8V288h87.8a56 56 0 0 1 0 112z"})})}),e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px",cursor:"pointer"},role:"button",onClick:n=>t.getActiveObject().fontStyle==="normal"?b("italic","italic"):b("normal","italic"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",viewBox:"0 0 320 512",children:e.jsx("path",{fill:"#ffffff",d:"M320 48v32a16 16 0 0 1 -16 16h-62.8l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1 -16 16H16a16 16 0 0 1 -16-16v-32a16 16 0 0 1 16-16h62.8l80-320H112a16 16 0 0 1 -16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z"})})}),e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px",cursor:"pointer"},role:"button",onClick:n=>t.getActiveObject().underline?b(!1,"underline"):b(!0,"underline"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",viewBox:"0 0 448 512",children:e.jsx("path",{fill:"#ffffff",d:"M32 64h32v160c0 88.2 71.8 160 160 160s160-71.8 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0 -16-16H272a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1 -160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0 -16-16H32a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0 -16-16z"})})}),e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px",cursor:"pointer"},role:"button","aria-label":"Italics",onClick:n=>t.getActiveObject().linethrough?b(!1,"line-through"):b(!0,"line-through"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",viewBox:"0 0 512 512",children:e.jsx("path",{fill:"#ffffff",d:"M496 224H293.9l-87.2-26.8A43.6 43.6 0 0 1 219.6 112h66.8A49.9 49.9 0 0 1 331 139.6a16 16 0 0 0 21.5 7.2l42.9-21.5a16 16 0 0 0 7.2-21.5l-.5-1A128 128 0 0 0 287.5 32h-68a123.7 123.7 0 0 0 -123 135.6c2 20.9 10.1 39.8 21.8 56.4H16a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h480a16 16 0 0 0 16-16v-32a16 16 0 0 0 -16-16zm-180.2 96A43 43 0 0 1 336 356.5 43.6 43.6 0 0 1 292.5 400h-66.8A49.9 49.9 0 0 1 181 372.4a16 16 0 0 0 -21.5-7.2l-42.9 21.5a16 16 0 0 0 -7.2 21.5l.5 1A128 128 0 0 0 224.5 480h68a123.7 123.7 0 0 0 123-135.6 114.3 114.3 0 0 0 -5.3-24.4z"})})}),e.jsx("div",{children:u()})]})})}function He(w){const{apcCanvasInstance:t,theme:i}=w,o=a.useRef(null),[d,f]=a.useState(!1),x=()=>{f(u=>!u)},h=(u,y)=>{if(t&&t.getActiveObject()){if(u==="bg-color"&&t.getActiveObject().set({fill:y}),u==="border-color"&&t.getActiveObject().set({stroke:y}),u==="gradient-bg-color1"||u==="gradient-bg-color2"){let n=document.getElementById("apc-object-bg-gradient-color1").value,m=document.getElementById("apc-object-bg-gradient-color2").value;const p=new M.fabric.Gradient({type:"linear",gradientUnits:"pixels",coords:{x1:0,y1:0,x2:0,y2:t.getActiveObject().height},colorStops:[{offset:0,color:n||"#000"},{offset:1,color:m||"#fff"}]});t.getActiveObject().set({fill:p})}t&&t.renderAll()}},b=u=>{if(t.getActiveObject()){const y=parseFloat(u/100);t.getActiveObject().set({opacity:y.toFixed(1)}),t&&t.renderAll()}},l=({color:u,x:y,y:n,blur:m})=>{if(t.getActiveObject()){const p=t.getActiveObject().shadow;u||(u=p?p.color:"#6a45d2"),y||(y=p?p.offsetX:5),n||(n=p?p.offsetY:5),m||(m=p?p.blur:5),t.getActiveObject().set({shadow:u+" "+y+" "+n+" "+m}),t&&t.renderAll()}};return e.jsx(a.Fragment,{children:e.jsxs("div",{className:"apc-mpx-widget-button-group-container",children:[e.jsx("button",{className:"apc-mpx-widget-effects-button",onClick:x,style:{color:i.primaryColor,fontWeight:"bold",cursor:"pointer",borderRadius:"25px"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"22px",width:"22px",children:e.jsx("path",{fill:i.primaryColor,d:gr})})}),d&&e.jsxs("div",{className:"apc-mpx-widget-popper-container",ref:o,style:{marginLeft:"20%"},children:[e.jsx("div",{className:"apc-mpx-widget-popper-arrow-up"}),e.jsxs("ul",{id:"split-button-menu",autoFocus:!0,children:[e.jsx("li",{className:"apc-mpx-widget-popper-li",children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("div",{style:{fontWeight:"bold",color:"purple"},children:"Background"}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:u=>h("bg-color",u.target.value)})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:["Gradient:",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},className:"editor-color-input-selector",id:"apc-object-bg-gradient-color1",type:"color",onChange:u=>h("gradient-bg-color1",u.target.value)}),e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},className:"editor-color-input-selector",id:"apc-object-bg-gradient-color2",type:"color",onChange:u=>h("gradient-bg-color2",u.target.value)})]}),e.jsx("div",{style:{marginLeft:"10px"},children:e.jsxs("div",{children:["Opacity: ",e.jsx(Pe,{defaultValue:100,size:"small","aria-label":"Opacity",onChange:u=>b(u)})]})}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Border color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:u=>h("border-color",u.target.value)})]})]})}),e.jsx("li",{className:"apc-mpx-widget-popper-li",children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("div",{style:{fontWeight:"bold",color:"purple"},children:"Shadow"}),e.jsxs("div",{style:{marginLeft:"10px"},children:["Blur width ",e.jsx("input",{type:"text",style:{height:"22px",width:"25px"},onChange:u=>l({blur:u.target.value})})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:u=>l({color:u.target.value})})]}),e.jsx("div",{style:{marginLeft:"10px"},children:e.jsxs("div",{children:["Offset X: ",e.jsx(Pe,{defaultValue:0,size:"small","aria-label":"Opacity",onChange:u=>l({x:u})})]})}),e.jsx("div",{style:{marginLeft:"10px"},children:e.jsxs("div",{children:["Offset Y: ",e.jsx(Pe,{defaultValue:0,size:"small","aria-label":"Opacity",onChange:u=>l({y:u})})]})})]})})]})]})]})})}function _r(w){const{apcCanvasInstance:t,apiEndpoint:i,apiKey:o}=w,[d,f]=a.useState("art"),[x,h]=a.useState(),[b,l]=a.useState(!1),v=i+"/api/v1/designer";a.useEffect(()=>{u()},[]);const u=()=>{l(!0);const p={"X-Api-Key":o},j=`${v}/get-quote/${d}`;ge.get(j,{headers:p}).then(s=>{var C;l(!1),h((C=s.data)==null?void 0:C.object)}).catch(s=>{console.error("Error fetching data:",s),l(!1)})},y=(p,j,s)=>{const C=new M.fabric.Textbox(j,{width:500,left:100,top:200,fontSize:16}),B=new M.fabric.Textbox(s,{fontSize:14,width:200,fontWeight:"bold"});B.top=C.top+C.height+10,B.left=C.left,t.add(C),t.add(B),t.setActiveObject(C)},n=p=>{l(!0),f(p),u()},m=()=>x?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:5},children:x.map((p,j)=>e.jsxs("div",{onClick:s=>y(s,p.quote,p.author),style:{cursor:"pointer",padding:"3px",textAlign:"left",color:"#210080",fontFamily:"ui-monospace",border:"1px solid #dedcdc",borderRadius:"8px"},children:[e.jsx("div",{children:p.quote}),e.jsx("div",{children:e.jsx("strong",{children:e.jsx("i",{children:p.author})})}),e.jsx("br",{})]},j))}):null;return e.jsxs(a.Fragment,{children:[e.jsx("h3",{children:"Quotes"}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{children:m()}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("br",{}),e.jsxs("div",{style:{padding:"3px"},children:[e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("best"),children:[d==="best"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Best"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("business"),children:[d==="business"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Business"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("car"),children:[d==="car"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Car"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("change"),children:[d==="change"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Change"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("computers"),children:[d==="computers"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Computers"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("cool"),children:[d==="cool"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Cool"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("courage"),children:[d==="courage"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Courage"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("dad"),children:[d==="dad"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Dad"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("dating"),children:[d==="dating"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Date"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("death"),children:[d==="death"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Death"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("design"),children:[d==="design"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Design"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("dreams"),children:[d==="dreams"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Dreams"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("education"),children:[d==="education"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Education"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("inspirational"),children:[d==="inspirational"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Inspirational"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("happiness"),children:[d==="happiness"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Happiness"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("health"),children:[d==="health"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Health"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("humor"),children:[d==="humor"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Humor"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("marriage"),children:[d==="marriage"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Marriage"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("money"),children:[d==="money"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Money"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("graduation"),children:[d==="graduation"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Graduation"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("hope"),children:[d==="hope"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Hope"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("love"),children:[d==="love"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Love"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("god"),children:[d==="god"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"God"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("equality"),children:[d==="equality"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Equality"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("failure"),children:[d==="failure"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Failure"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("fear"),children:[d==="fear"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Fear"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("legal"),children:[d==="legal"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Legal"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("attitude"),children:[d==="attitude"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Attitude"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("beauty"),children:[d==="beauty"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Beauty"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("age"),children:[d==="age"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Age"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("art"),children:[d==="art"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Art"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>n("birthday"),children:[d==="birthday"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Birthday"]}),e.jsx("br",{})]})]})}function Br(w){const{apcCanvasInstance:t,theme:i,apiKey:o,apiEndpoint:d,updateActiveSection:f,reloadTabs:x,currentTabNo:h,isMobile:b,closeMobileModalSecondaryPanel:l}=w,[v,u]=a.useState("background"),[y,n]=a.useState(!1),[m,p]=a.useState(),j=d+"/api/v1/designer";a.useEffect(()=>{C()},[]);const s=_=>{const F=document.getElementById("img-default-id"),E=new M.fabric.Image(F,T=>{T.set({left:100,top:200,scaleX:.5,scaleY:.5,imageSmoothing:!0})});t.add(E),b&&l(!0)},C=()=>{n(!0);const _={"X-Api-Key":o},F=`${j}/get-images/${v}`;ge.get(F,{headers:_}).then(E=>{var T;n(!1),p((T=E.data)==null?void 0:T.object)}).catch(E=>{console.error("Error fetching data:",E),n(!1)})},B=_=>{M.fabric.Image.fromURL(_,function(F){F.width=t.width,F.height=t.height,F.scaleToWidth(t.width),F.scaleToHeight(t.height),t.setBackgroundImage(F);const E=localStorage.getItem("apc_x_activeTab"),T=JSON.stringify(t);Ee(E,"general",T,null).then(V=>{x(h+1),t&&t.renderAll()})},{crossOrigin:"anonymous"})},I=()=>m?e.jsx("div",{children:m.map(_=>e.jsx("div",{onClick:()=>B(_.urls.regular),style:{cursor:"pointer"},children:e.jsx("img",{height:300,width:300,src:_.urls.regular,alt:_.description||"No description"})},_.id))}):null;return e.jsxs(a.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),e.jsxs("div",{style:{cursor:"pointer"},onClick:()=>s(),children:[e.jsx("img",{alt:"sample-image",id:"img-default-id",src:"https://mypixia.com/images/img-default.png",height:"200",width:"300"})," ",e.jsx("br",{}),"From my device"]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("strong",{children:"- OR -"}),e.jsxs("div",{children:[e.jsx("input",{type:"text",onChange:_=>u(_.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${i.primaryColor}`}}),e.jsx("br",{})," ",e.jsx("br",{}),e.jsx("button",{className:"apc-mpc-widget-btn",onClick:()=>C(),style:{backgroundColor:i.primaryColor,color:"#ffffff"},children:y?"...Processing":"Search"})]}),e.jsx("br",{}),e.jsx("br",{}),I()]})}function Dr(w){const[t,i]=a.useState(""),[o,d]=a.useState(""),[f,x]=a.useState(!1),[h,b]=a.useState(!1),[l,v]=a.useState(!1),{apcCanvasInstance:u,theme:y,isMobile:n,closeMobileModalSecondaryPanel:m,apiKey:p,apiEndpoint:j}=w,s=`${j}/api/v1/designer`,C=sessionStorage.getItem("apc_x_sub_status");a.useEffect(()=>{(async()=>{C==="active"?(b(!0),v(!0)):(x(!0),await B())})()},[]);const B=()=>{x(!0);const F=`${s}/get-subscription-status/${p}`;ge.get(F).then(E=>{E.data.object&&E.data.object==="active"&&(sessionStorage.setItem("apc_x_sub_status","active"),b(!0))}).catch(E=>{sessionStorage.setItem("apc_x_sub_status","")}).finally(()=>{x(!1),v(!0)})},I=()=>{Bt.toDataURL(t,{width:300},(F,E)=>{F&&console.error(F),d(E)})},_=F=>{const E=document.getElementById("apc-qr-code-img"),T=new M.fabric.Image(E,V=>{V.set({left:200,top:200,scaleX:.5,scaleY:.5,imageSmoothing:!0})});u.add(T),u.setActiveObject(T),n&&m(!0)};return!h&&!f&&l?e.jsx(it,{}):h&&!f&&l?e.jsxs(a.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),"Enter data such as url",e.jsx("br",{}),e.jsx("input",{className:"apc-mpc-widget-input",style:{border:`solid 3px ${y.primaryColor}`},type:"text",onChange:F=>i(F.target.value)}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("button",{className:"apc-mpc-widget-btn",style:{backgroundColor:y.primaryColor,color:"#ffffff"},disabled:!t,onClick:I,children:"Generate QR code"}),e.jsx("br",{}),e.jsx("br",{}),o&&e.jsxs("div",{className:"generated-view",onClick:()=>_(),style:{cursor:"pointer"},children:[e.jsx("img",{src:o,alt:"qr code",id:"apc-qr-code-img"}),e.jsx("a",{href:o})]})]}):e.jsx("div",{children:e.jsx(ot,{})})}function Fr(w){const{apcCanvasInstance:t,theme:i,isMobile:o,closeMobileModalSecondaryPanel:d,apiKey:f,apiEndpoint:x}=w,[h,b]=a.useState(""),[l,v]=a.useState(null),[u,y]=a.useState("CODE128"),n=a.useRef(null),[m,p]=a.useState(""),[j,s]=a.useState(!1),[C,B]=a.useState(!1),[I,_]=a.useState(!1),F=sessionStorage.getItem("apc_x_sub_status"),E=`${x}/api/v1/designer`;a.useEffect(()=>{(async()=>{F==="active"?(B(!0),_(!0)):(s(!0),await T())})()},[]);const T=()=>{s(!0);const J=`${E}/get-subscription-status/${f}`;ge.get(J).then(oe=>{oe.data.object&&oe.data.object==="active"&&(sessionStorage.setItem("apc_x_sub_status","active"),B(!0))}).catch(oe=>{sessionStorage.setItem("apc_x_sub_status","")}).finally(()=>{s(!1),_(!0)})},V=()=>{v(e.jsx(Dt,{value:h,format:u,id:"barcode-element"}));const J=document.getElementById("barcode-element");J&&p(J.innerHTML)},Y=J=>{if(n.current.innerHTML){const oe=n.current.innerHTML;let se=new Image;se.src="data:image/svg+xml,"+encodeURIComponent(oe),se.onload=function(){const ne=new M.fabric.Image(se,{left:200,top:200});t.add(ne),t.setActiveObject(ne)}}o&&d(!0)};return!C&&!j&&I?e.jsx(it,{}):C&&!j&&I?e.jsxs(a.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),"Enter number",e.jsx("input",{type:"text",onChange:J=>b(J.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${i.primaryColor}`}}),e.jsx("br",{}),e.jsx("br",{}),"Code type",e.jsxs("select",{value:u,onChange:J=>y(J.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${i.primaryColor}`},children:[e.jsx("option",{value:"CODE128",children:"CODE128"}),e.jsx("option",{value:"EAN13",children:"EAN / UPC"}),e.jsx("option",{value:"CODE39",children:"CODE39"}),e.jsx("option",{value:"ITF14",children:"ITF-14"}),e.jsx("option",{value:"MSI10",children:"MSI10"}),e.jsx("option",{value:"pharmacode",children:"Pharmacode"}),e.jsx("option",{value:"codabar",children:"Codabar"})]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("button",{className:"apc-mpc-widget-btn",disabled:!h,onClick:()=>V(),style:{backgroundColor:i.primaryColor,color:"#ffffff"},children:"Generate Barcode"}),e.jsx("br",{}),e.jsx("br",{})," ",e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{children:l&&e.jsx("div",{ref:n,onClick:J=>Y(),style:{cursor:"pointer"},children:l})})]}):e.jsxs("div",{children:[" ",e.jsx(ot,{})]})}function Pr(w){const{apcCanvasInstance:t,theme:i}=w,[o,d]=a.useState(),[f,x]=a.useState(),[h,b]=a.useState(""),l=(y,n)=>{if(t){if(y==="bg-color"&&n.target.value&&t.set({backgroundColor:n.target.value}),y==="image"&&n.target.value){const m=n.target.files[0],p=new FileReader;p.onload=function(j){const s=j.target.result;M.fabric.Image.fromURL(s,function(C){t.setBackgroundImage(C,t.renderAll.bind(t),{})})},p.readAsDataURL(m)}y==="height"&&n.target.value&&(d(n.target.value),t.setHeight(n.target.value)),y==="width"&&n.target.value&&(x(n.target.value),t.setWidth(n.target.value)),t&&t.renderAll()}},v=(y,n,m)=>{x(n),d(y),t.setWidth(n),t.setHeight(y),b(m)},u=()=>e.jsxs("div",{children:[e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row"},children:e.jsxs("div",{children:["Height(px)",e.jsx("input",{type:"number",value:t.height,onChange:y=>l("height",y),className:"apc-mpc-widget-input",style:{border:`solid 3px ${i.primaryColor}`}})]})})," ",e.jsx("div",{style:{display:"flex",flexDirection:"row"},children:e.jsxs("div",{children:["Width(px)",e.jsx("input",{color:"info",type:"number",value:t.width,onChange:y=>l("width",y),className:"apc-mpc-widget-input",style:{border:`solid 3px ${i.primaryColor}`}})]})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{style:{textAlign:"left"},children:e.jsx("h3",{children:"Standard dimensions"})}),e.jsx("br",{})," ",e.jsx("br",{}),e.jsxs("div",{children:[e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1440,2560,"YOUC"),children:[h==="YOUC"?e.jsx("span",{style:{color:"green"},children:"✓"}):null," Youtube Channel : 2560 x 1440 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1080,1920,"FULLHD"),children:[h==="FULLHD"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Full HD : 1920 x 1080 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1080,1080,"INSTAP"),children:[h==="INSTAP"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Instagram Post:1080 x 1080 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1920,1080,"INSTAS"),children:[h==="INSTAS"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Instagram Story: 1080 x 1920 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1080,1080,"INSTAA"),children:[h==="INSTAA"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Instagram Ad: 1080 x 1080 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(788,940,"FACEP"),children:[h==="FACEP"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Facebook Post: 940 x 788 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(315,851,"FACEC"),children:[h==="FACEC"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Facebook Cover: 851 x 315 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(628,1200,"FACEA"),children:[h==="FACEA"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Facebook Ad: 1200 x 628 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(720,1280,"YOUT"),children:[h==="YOUT"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Youtube Thumbnail: 1280 x 720 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(534,534,"INVITE"),children:[h==="INVITE"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Invitation : 14 x 14 cm"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1112,788,"A4"),children:[h==="A4"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"A4 : 788 x 1112 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(192,336,"BUSINESSCARD"),children:[h==="BUSINESSCARD"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Business card 3.5 x 2 in"]})})]})]});return e.jsx("div",{children:u()})}const he=(w,t,i,o="png",d)=>new Promise((f,x)=>{const h=document.createElement("canvas"),b=JSON.parse(w),l=crypto.randomUUID();h.width=i,h.height=t;const v=new M.fabric.StaticCanvas(h,{selection:!1,height:b.height,width:b.width});v.loadFromJSON(b,function(){v.renderAll();const u=(y,n)=>{const m=URL.createObjectURL(y),p=document.createElement("a");p.href=m,p.download=n,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(m)};if(o.toLowerCase()==="svg"){const y=v.toSVG(),n=new Blob([y],{type:"image/svg+xml"});d&&u(n,"mypixia.svg"),f(new File([n],`${l}.svg`,{type:"image/svg+xml"}))}else if(o.toLowerCase()==="pdf"){const y=v.toDataURL("image/jpeg",1);import("jspdf").then(n=>{const m=new n.jsPDF({orientation:"landscape",unit:"px",format:[h.width,h.height]});m.addImage(y,"JPEG",0,0,h.width,h.height);const j=m.output("datauristring").split(",")[1],s=Hr(j,"application/pdf"),C=new File([s],`${l}.pdf`,{type:"application/pdf"}),B=`${l}.pdf`;d&&u(C,B),f(C)}).catch(n=>{console.error("Error loading jsPDF: ",n),x(n)})}else{let y,n="image/png",m="png";switch(o.toLowerCase()){case"jpeg":y=v.toDataURL("image/jpeg",1),n="image/jpeg",m="jpg";break;case"webp":y=v.toDataURL("image/webp",1),n="image/webp",m="webp";break;default:y=v.toDataURL("image/png",1);break}const p=atob(y.split(",")[1]),j=new Array(p.length);for(let I=0;I<p.length;I++)j[I]=p.charCodeAt(I);const s=new Uint8Array(j),C=new File([s],`${l}.${m}`,{type:n}),B=`${l}.${m}`;d&&u(C,B),f(C)}})});function Hr(w,t){const i=atob(w),o=new Array(i.length);for(let f=0;f<i.length;f++)o[f]=i.charCodeAt(f);const d=new Uint8Array(o);return new Blob([d],{type:t})}const Vr=({children:w})=>Ft.createPortal(w,document.getElementById("apc-mpx-editor-modal-root"));function ct(w){const{isOpen:t,onClose:i,children:o}=w;return t?e.jsx(Vr,{children:e.jsx("div",{className:"apc-mpx-widget-modal-overlay",children:e.jsxs("div",{className:"apc-mpx-widget-modal",children:[e.jsx("button",{style:{color:"red"},className:"apc-mpx-widget-modal-close-btn",onClick:i,children:"Close"}),e.jsx("div",{className:"apc-mpx-widget-modal-content",children:o})]})})}):null}const pe=(w,t)=>{w=w.startsWith("#")?w:`#${w}`;let i=parseInt(w.slice(1,3),16),o=parseInt(w.slice(3,5),16),d=parseInt(w.slice(5,7),16);return i=parseInt(i*(100-t)/100),o=parseInt(o*(100-t)/100),d=parseInt(d*(100-t)/100),i=i.toString(16).padStart(2,"0"),o=o.toString(16).padStart(2,"0"),d=d.toString(16).padStart(2,"0"),`#${i}${o}${d}`};function Et(w){const[t,i]=a.useState(""),{apcCanvasJSON:o,height:d,width:f}=w;return a.useEffect(()=>{const x=document.createElement("canvas"),h=JSON.parse(o);x.width=f,x.height=d;const b=new M.fabric.StaticCanvas(x,{selection:!1,height:h.height,width:h.width});b.loadFromJSON(h,function(){b.renderAll();const l=b.toDataURL("image/png",1);i(l)})},[]),t?e.jsx("div",{children:e.jsx("div",{className:"apc-mpx-widget-responsive-image-container",style:{cursor:"pointer",maxHeight:"500px",maxWidth:"500px"},children:e.jsx("img",{src:t,alt:"mypixia cool design",className:"apc-mpx-widget-responsive-image"})})}):"...processing"}function Rr(w){const{theme:t,apcCanvasInstance:i}=w,[o,d]=a.useState(!1),[f,x]=a.useState(),h=()=>{d(!0)},b=()=>{d(!1)},l=()=>{if(!i)return null;const v=JSON.stringify(i);return e.jsxs(ct,{isOpen:o,onClose:b,children:[e.jsx(Et,{apcCanvasJSON:v,height:i.height,width:i.width}),e.jsx("div",{children:e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:5},children:[e.jsx("div",{children:e.jsx(re.FacebookShareButton,{url:f,children:e.jsx(re.FacebookIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.TwitterShareButton,{url:f,title:"Hello",children:e.jsx(re.XIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.TelegramShareButton,{url:f,title:"Hello",children:e.jsx(re.TelegramIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.WhatsappShareButton,{url:f,title:"Hello",separator:":: ",children:e.jsx(re.WhatsappIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.LinkedinShareButton,{url:f,children:e.jsx(re.LinkedinIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.PinterestShareButton,{url:"https://static.mypixia.com",media:f,children:e.jsx(re.PinterestIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.RedditShareButton,{url:f,title:"Hello",windowWidth:660,windowHeight:460,children:e.jsx(re.RedditIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.InstapaperShareButton,{url:f,title:"Hello",children:e.jsx(re.InstapaperIcon,{size:32,round:!0})})})]})}),e.jsx("hr",{}),e.jsx("br",{}),e.jsx("button",{autoFocus:!0,type:"button",className:"apc-mpc-widget-btn",onClick:()=>b(),style:{backgroundColor:"red",color:"#ffffff",float:"right"},children:"Close"})]})};return e.jsxs(a.Fragment,{children:[e.jsxs("button",{className:"apc-mpc-widget-btn",onClick:()=>h(),role:"dialog",style:{backgroundColor:pe(t.primaryColor,40),color:"#ffffff",float:"right"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:"#ffffff",d:ur})}),"  Share"]}),l()]})}function Ur(w){const{theme:t,apiKey:i,apcCanvasInstance:o,updateSelectedSections:d,updateActiveSection:f,accesories:x,getDesignFormats:h}=w,[b,l]=a.useState(!1),[v,u]=a.useState(),y=()=>{l(!0)},n=()=>{l(!1)},m=()=>({getPDF:()=>{const j=JSON.stringify(o);return he(j,o.height,o.width,"pdf",!0).then(s=>s)},getPNG:()=>{const j=JSON.stringify(o);return he(j,o.height,o.width,"png",!0).then(s=>s)},getSVG:()=>{const j=JSON.stringify(o);return he(j,o.height,o.width,"svg",!0).then(s=>s)},getJPEG:()=>{const j=JSON.stringify(o);return he(j,o.height,o.width,"jpeg",!0).then(s=>s)},getWEBP:()=>{const j=JSON.stringify(o);return he(j,o.height,o.width,"webp",!0).then(s=>s)}}),p=()=>{if(!o)return null;const j=JSON.stringify(o);return e.jsxs(ct,{isOpen:b,onClose:n,children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("h3",{style:{float:"left"},children:"Download"}),e.jsx("div",{children:e.jsx(Et,{apcCanvasJSON:j,height:o.height,width:o.width})}),e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:5},children:[e.jsx("div",{style:{color:pe(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getPDF(),children:"PDF"}),e.jsx("div",{style:{color:pe(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getSVG(),children:"SVG"}),e.jsx("div",{style:{color:pe(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getPNG(),children:"PNG"}),e.jsx("div",{style:{color:pe(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getJPEG(),children:"JPEG"}),e.jsx("div",{style:{color:pe(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getWEBP(),children:"WEBP"})]})]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("hr",{}),e.jsx("br",{}),e.jsx("button",{autoFocus:!0,type:"button",className:"apc-mpc-widget-btn",onClick:()=>n(),style:{backgroundColor:"red",color:"#ffffff",float:"right"},children:"Close"})]})};return e.jsxs(a.Fragment,{children:[e.jsxs("button",{className:"apc-mpc-widget-btn",onClick:()=>y(),role:"dialog",style:{backgroundColor:pe(t.primaryColor,40),color:"#ffffff",float:"right"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:"#ffffff",d:fr})}),"  Download"]}),p()]})}function Wr(w){var Ie;const{theme:t,activeSection:i,selectedObjectType:o,renderQuickActions:d,renderActionItems:f,canvasEl:x,zoomIn:h,zoomOut:b,apcCanvasInstance:l,setActiveSection:v,saveActiveDesign:u,reloadTabs:y,initProductName:n,historyRef:m,currentState:p,setCurrentState:j,setHistory:s,activeTabName:C,isPlainColor:B,selectedProduct:I,isMobile:_,supportedProductColors:F}=w,[E,T]=a.useState(),[V,Y]=a.useState([]),[J,oe]=a.useState(0),[se,ne]=a.useState(!1),ue=a.useRef(null),[Te,we]=a.useState(!1),[Qe,Me]=a.useState(null),[ee,Ve]=a.useState(),[Re,Ue]=a.useState(),[ze,We]=a.useState(),[Ce,me]=a.useState(!0),[G,Le]=a.useState(),Oe=()=>{we(!0),ne(!1)},X=()=>{we(!1)},Ge=()=>{ne(k=>!k)};a.useEffect(()=>{const k=O=>{ue.current&&ue.current.contains(O.target)||ne(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]),a.useEffect(()=>{(async()=>{var O,$;if(E)try{const D=await Fe(E);We(D),(O=D==null?void 0:D.misc)!=null&&O.colorSettings&&Ve(D.misc.colorSettings),(($=D==null?void 0:D.misc)==null?void 0:$.type)!=="subsection"&&Le(D)}catch(D){console.error("Error fetching tab data: ",D)}})()},[E,y]),a.useEffect(()=>{(async()=>{const O=await Ne();let $=O?O.filter(D=>{var Q;return D.classification!=="cart"&&((Q=D.misc)==null?void 0:Q.type)!=="subsection"}).map(D=>D.id):[];$.length===0&&$.push("design"),J===0&&T($[0]),Y($)})()},[J,y]);const ae=()=>{l&&(l.clear(),l.renderAll())},fe=k=>{if(!l)return;l.backgroundColor="transparent",l&&l.requestRenderAll();let O=l.backgroundImage;O&&(O.filters=[],O.filters.push(new M.fabric.Image.filters.BlendColor({color:k})),O.applyFilters(),l&&l.requestRenderAll(),Ue(k),u(l,ze))},Se=()=>{if(!(!ee||(ee==null?void 0:ee.length)<=1))return ee.map((k,O)=>e.jsxs(a.Fragment,{children:[e.jsx("div",{role:"button",className:"apc-mpx-widget-circle",style:{backgroundColor:k,cursor:"pointer",border:"solid 1px #ffffff"},onClick:()=>fe(k)})," "]},O))},ve=async(k,O)=>{var xe,je;const $=(je=(xe=l==null?void 0:l.backgroundImage)==null?void 0:xe.filters[0])==null?void 0:je.color,D=await Fe(k);if(!D)return;const Q=D!=null&&D.content?JSON.parse(D.content):null;Q&&l?(l.clear(),l.setBackgroundImage(null),l.loadFromJSON(Q,()=>{var te;l.renderAll(),v(D),((te=D==null?void 0:D.misc)==null?void 0:te.type)!=="subsection"?(localStorage.setItem("apc_x_activeTab",k),me(!0)):(me(!1),$&&fe($)),T(k)})):console.error("Failed to load JSON content for section:",k)},$e=()=>V.map(k=>e.jsx("button",{className:`tablinks ${E===k?"active":null}`,onClick:()=>ve(k),children:k},k)),ke=()=>{Ne().then(k=>{if(k&&k.length>0){const O=k[0],$=JSON.parse(O.content);l.loadFromJSON($,function(){l.off("object:modified"),l.on({"object:modified":D=>{u(l,O)}}),T(O.id),localStorage.setItem("apc_x_activeTab",O.id),v(O),oe(J+1),l&&l.renderAll()})}else{let O="design";const $=JSON.stringify(l);Ee(O,"general",$,null).then(D=>{Fe(O).then(Q=>{const xe=JSON.parse(Q.content);l.loadFromJSON(xe,function(){l.off("object:modified"),l.on({"object:modified":je=>{u(l,Q)}}),T(O),localStorage.setItem("apc_x_activeTab",O),v(Q),oe(J+1),l&&l.renderAll()})})})}})},Ae=()=>{Cr(E).then(k=>{X(),ke()})},Je=()=>l?e.jsxs(ct,{isOpen:Te,onClose:X,children:[e.jsx("div",{children:e.jsxs("h3",{style:{marginLeft:"30%",color:"green"},children:["Are you sure you want to delete ",e.jsx("u",{children:E})," ?"]})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("hr",{}),e.jsx("br",{}),e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:10},children:[e.jsx("div",{children:e.jsx("button",{autoFocus:!0,type:"button",className:"apc-mpc-widget-btn",onClick:()=>Ae(),style:{backgroundColor:"green",color:"#ffffff"},children:"Yes"})}),e.jsx("div",{children:e.jsx("button",{autoFocus:!0,type:"button",className:"apc-mpc-widget-btn",onClick:()=>X(),style:{backgroundColor:"red",color:"#ffffff",float:"right"},children:"Close"})})]})]}):null,Ze=()=>e.jsxs("div",{className:"apc-mpx-widget-button-group-container",children:[e.jsx("div",{className:"apc-mpx-widget-generic-icon",onClick:Ge,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:"#ffffff",d:dr})})}),se&&e.jsxs("div",{className:"apc-mpx-widget-popper-container",ref:ue,children:[e.jsx("div",{className:"apc-mpx-widget-popper-arrow-up"}),e.jsxs("ul",{autoFocus:!0,style:{paddingInlineStart:"2px",marginBlockStart:"6px",marginBlockEnd:"2px",fontSize:"13px",padding:"3px",color:pe(t.primaryColor,80),width:"max-content"},children:[e.jsxs("li",{className:"apc-mpx-widget-popper-li",style:{height:"25px",cursor:"pointer",borderBottom:"1px solid #d7d7d7"},onClick:()=>Oe(),role:"dialog",children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",children:e.jsx("path",{d:kt,fill:pe(t.primaryColor,80)})}),"  Delete"]}),e.jsxs("li",{className:"apc-mpx-widget-popper-li",style:{height:"25px",cursor:"pointer",marginBlockStart:"5px"},onClick:()=>ae(),role:"dialog",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",className:"apc-mpx-hover-div",width:"14",viewBox:"0 0 576 512",children:e.jsx("path",{d:hr,fill:pe(t.primaryColor,80)})}),"  Clear"]})]})]})]}),_e=k=>{var je,te,Ye,Be;const O=l.width*5,$=l.height*5,D=JSON.parse(G.content),Q=(te=(je=D==null?void 0:D.backgroundImage)==null?void 0:je.filters[0])==null?void 0:te.color,xe=(Be=(Ye=l==null?void 0:l.backgroundImage)==null?void 0:Ye.filters[0])==null?void 0:Be.color;Fe(k.sectionName).then(async be=>{if(be){const c=be!=null&&be.content?JSON.parse(be.content):null;c&&l?(await l.loadFromJSON(c,()=>{l.renderAll(),v(be),T(k.sectionName);const A=JSON.stringify(l),z={};z.id=k.sectionName,z.classification=I==null?void 0:I.name,z.json=A,z.misc={sectionName:k.sectionName,sectionImage:k.sectionImage,type:k.type},l.off("object:modified"),l.on({"object:modified":N=>{u(l,z)}})}),fe(xe),Ce||me(!0)):console.error("Failed to load JSON content for section:",k.sectionName)}else l&&l.clear(),k.type="subsection",M.fabric.Image.fromURL(k.sectionImage,function(c){c.width=O,c.height=$,c.scaleToWidth(O),c.scaleToHeight($),l.setBackgroundImage(c),(Re||Q)&&(c.filters=[],c.filters.push(new M.fabric.Image.filters.BlendColor({color:Re||Q})),c.applyFilters());const A=JSON.stringify(l),z={};z.id=k.sectionName,z.classification=G.id,z.json=A,z.misc={sectionName:k.sectionName,sectionImage:k.sectionImage,type:k.type},l.off("object:modified"),l.on({"object:modified":N=>{u(l,z)}}),Ee(k.sectionName,E,A,{...k}).then(N=>{l&&(l.renderAll(),Ce&&me(!1),T(k.sectionName),oe(J+1))})},{crossOrigin:"anonymous"})})},et=()=>{if(!ze)return null;let k=[];if(I){const O=I.sections.map($=>({...$,type:"subsection"}));k.push(...O),k.push({sectionName:I==null?void 0:I.name,sectionImage:I==null?void 0:I.mainImage,type:"main"})}return k=k==null?void 0:k.map(O=>({...O,active:O.sectionName===E})),(k==null?void 0:k.length)<1?null:k==null?void 0:k.map((O,$)=>{var D,Q;return e.jsxs("div",{onClick:()=>_e(O),style:{position:"relative",backgroundColor:"#ff000026",border:"solid 1px #ffffff",padding:"2px",borderRadius:"6px",cursor:"pointer",textAlign:"center"},children:[O.active&&e.jsx("div",{style:{position:"absolute",top:"5px",right:"5px",width:"12px",height:"12px",backgroundColor:"green",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("span",{style:{color:"white",fontSize:"8px",fontWeight:"bold"},children:"✓"})}),!_&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"5px"},children:e.jsx("img",{src:O==null?void 0:O.sectionImage,width:50,height:50,alt:(O==null?void 0:O.sectionName)||"section image",style:{borderRadius:"6px"}})}),e.jsx("div",{style:{fontSize:"12px",color:"#333"},children:((D=O==null?void 0:O.sectionName)==null?void 0:D.length)>5?`${(Q=O==null?void 0:O.sectionName)==null?void 0:Q.substring(0,5)}...`:(O==null?void 0:O.sectionName)||"view"})]},$)})},tt=()=>{if(m.current.length>0){const k=m.current.pop();l.loadFromJSON(k,()=>{l.renderAll(),j(k)})}};return e.jsxs(a.Fragment,{children:[e.jsx("div",{className:"tab",children:$e()}),e.jsxs("div",{style:{display:"flex",backgroundColor:t.primaryColor,flexDirection:"row",padding:"3px",color:"#ffffff",minHeight:"30px"},children:[e.jsx("div",{style:{flexBasis:"40%",marginTop:"8px"},children:e.jsx("div",{style:{display:"flex",flexDirection:"row"},children:e.jsxs("div",{children:[e.jsx("button",{style:{border:"none",backgroundColor:"transparent",color:"#ffffff",fontWeight:"bold",cursor:"pointer",height:"12px"},onClick:()=>tt(),title:"UNDO",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"25",className:"apc-mpx-hover-div",width:"25",viewBox:"0 0 16 16",children:e.jsx("path",{d:pr,fill:"#ffffff"})})})," "]})})}),e.jsx("div",{style:{flexBasis:"20%"},children:o?d():null}),e.jsx("div",{style:{flexBasis:"40%",marginTop:"8px"},children:o?f():null}),Ze()]}),e.jsxs("div",{id:"apc-mpx-editor-canvas-container",style:{minHeight:"90vh",padding:"3px",overflowX:"hidden",position:"relative"},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.jsx("div",{children:e.jsx("div",{style:{zIndex:1e3,overflow:"hidden",position:"absolute",marginLeft:"1%",display:"flex",flexDirection:"row"},children:((Ie=I==null?void 0:I.sections)==null?void 0:Ie.length)>0?et():null})}),e.jsx("div",{children:e.jsx("canvas",{id:"apc-mpx-editor-canvas",ref:x,height:1e3})}),ee&&(B||(i==null?void 0:i.plainColor)==="Y")&&Ce&&(ee==null?void 0:ee.length)>1?e.jsxs("div",{style:{zIndex:1e3,overflow:"hidden",position:"absolute",marginLeft:"90%"},children:[e.jsx("br",{}),e.jsx("div",{style:{backgroundColor:"#ff000026",border:"solid 1px #ccc",padding:"3px",borderRadius:"6px"},children:ee&&(ee==null?void 0:ee.length)>1?Se():null})]}):null]}),e.jsxs("div",{style:{marginLeft:"45%"},children:[e.jsx("br",{}),e.jsx("button",{style:{height:"35px",width:"65px",cursor:"pointer"},"aria-label":"zoom in",onClick:()=>h(),children:"+"}),e.jsx("button",{style:{height:"35px",width:"65px",cursor:"pointer"},"aria-label":"zoom out",onClick:()=>b(),children:"-"})]})]}),Je()]})}function Gr({data:w,theme:t,apcCanvasInstance:i,closeMobileModalSecondaryPanel:o,isMobile:d}){const[f,x]=a.useState({}),h=u=>{x(y=>({...y,[u]:!y[u]}))},b=async u=>{const y=await Ot(u);y&&M.fabric.Image.fromURL(y,n=>{n.set({left:100,top:100,scaleX:.3,scaleY:.3}),i.add(n),i.renderAll(),d&&o(!0)})},l=(u,y="",n=0)=>e.jsx("ul",{style:{listStyleType:"none",paddingLeft:`${n*20}px`,margin:"0"},children:Object.keys(u).map(m=>{const p=`${y}/${m}`,j=f[p];return u[m].type==="image"?e.jsx("li",{children:e.jsx("div",{onClick:()=>b(u[m].url),style:{cursor:"pointer"},children:e.jsx("img",{src:u[m].url,alt:m,style:{width:"100px",height:"auto"}})})},p):e.jsxs("li",{children:[e.jsxs("div",{onClick:()=>h(p),style:{cursor:"pointer",display:"flex",alignItems:"center",fontWeight:"bold",color:t.primaryColorLight},children:[e.jsx("div",{style:{marginRight:"5px"},children:j?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:15,width:15,children:e.jsx("path",{d:vr,fill:t.primaryColorLight})}):e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:15,width:15,children:e.jsx("path",{d:jr,fill:t.primaryColorLight})})}),m]}),j&&l(u[m],p,n+1)]},p)})}),v=$r(w);return e.jsx("div",{children:l(v)})}function $r(w){const t={};return w.forEach(i=>{const o=i.name.split("/");let d=t;o.forEach((f,x)=>{d[f]||(d[f]=x===o.length-1?i:{}),d=d[f]})}),t}function Jr(w){const{apcCanvasInstance:t,theme:i,apiEndpoint:o,isMobile:d,closeMobileModalSecondaryPanel:f,apiKey:x}=w,h=`${o}/api/v1/designer`,[b,l]=a.useState([]),[v,u]=a.useState(!1),[y,n]=a.useState(!1),[m,p]=a.useState(!1),j=sessionStorage.getItem("apc_x_sub_status"),s=sessionStorage.getItem("apc_x_stickers");a.useEffect(()=>{u(!0),(async()=>{j==="active"?n(!0):await B(),s?(l(JSON.parse(s)),u(!1)):await C()})()},[]);const C=()=>{u(!0);const I=`${h}/get-stickers`;ge.get(I).then(_=>{_.data.object&&(l(_.data.object.contents),sessionStorage.setItem("apc_x_stickers",JSON.stringify(_.data.object.contents)))}).catch(_=>{console.error("Error fetching data:",_)}).finally(()=>{u(!1)})},B=()=>{u(!0);const I=`${h}/get-subscription-status/${x}`;ge.get(I).then(_=>{_.data.object&&_.data.object==="active"&&(sessionStorage.setItem("apc_x_sub_status","active"),n(!0))}).catch(_=>{sessionStorage.setItem("apc_x_sub_status","")}).finally(()=>{u(!1),p(!0)})};return!y&&!v&&m?e.jsx(it,{}):y&&b.length>0&&!v?e.jsx(a.Fragment,{children:e.jsx("div",{style:{padding:"10px"},children:e.jsx(Gr,{data:b,theme:i,apcCanvasInstance:t,isMobile:d,closeMobileModalSecondaryPanel:f})})}):e.jsx("div",{children:e.jsx(ot,{})})}function Yr(w){const{theme:t=Rt,readOnly:i=!1,apiKey:o=null,handleSaveClick:d,handleCartClick:f,apiEndpoint:x,enabledModules:h=["TXT","STICKERS","SHAPES","ICONS","IMAGE","QUOTE","BACKGROUND","QRCODE","BARCODE"],actionButtons:b={share:!0,download:!0,submit:!0,addToCart:!0},initInstance:l=null,initCategory:v=null,additionalActionButton:u=null,initProductName:y,isPlainColor:n,product:m={name:"Premium Crew Neck T-Shirt",category:"Tshirts",description:"Men's crew neck t-shirts",plainColor:"Y",mainImage:"https://static.mypixia.com/prod/products/96ca4acb-c426-4619-a2c4-7acd95b78451.png",colorSettings:["#FF0000","#0000FF","#008000","#000000","#FFFFFF","#808080","#FFFF00"],sections:[{sectionName:"Sleeve-left",sectionImage:"https://static.mypixia.com/prod/products/27b8c138-af4e-4ea0-833d-88b10fbd3cf7.png"},{sectionName:"Back",sectionImage:"https://static.mypixia.com/prod/products/d4c53776-7b7d-41c5-a6b5-2bf5876cd26e.png"}]}}=w,[p,j]=a.useState(h[0]),[s,C]=a.useState(),B=a.useRef(null),[I,_]=a.useState(),[F,E]=a.useState(!1),[T,V]=a.useState(1),Y=.1,[J,oe]=a.useState(1),[se,ne]=a.useState([]),[ue,Te]=a.useState(null),[we,Qe]=a.useState(null),[Me,ee]=a.useState(0),[Ve,Re]=a.useState(),[Ue,ze]=a.useState(null),We=a.useRef([]),[Ce,me]=a.useState(null),[G,Le]=a.useState(!1),[Oe,X]=a.useState(!1);a.useEffect(()=>{const c=()=>Le(window.innerWidth<600);return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),a.useEffect(()=>{const c=document.getElementById("apc-mpx-editor-canvas-container"),A=document.getElementById("apc-mpx-editor-canvas-container");if(!B.current||!c||!A){console.error("Canvas element is not mounted yet!");return}const z={isDrawingMode:!1,selection:!0,selectionBorderColor:"#008000",height:A.offsetHeight,width:c.offsetWidth,enableRetinaScaling:!0};let N,le;if(i)N=new M.fabric.StaticCanvas(B.current,z);else if(N=new M.fabric.Canvas(B.current,z),we)le=JSON.parse(we),N.loadFromJSON(le,function(){});else if(l){let R;try{R=JSON.parse(l)}catch(K){console.error("Failed to parse initInstance",K)}N&&R?N.loadFromJSON(R,function(){}):console.error("Canvas or InitInstance is not properly initialized")}else{const R=new M.fabric.Textbox("Something cool!",{width:300,left:250,top:300,fontFamily:"aclonica",fill:"#6a45d2",rotate:20});R.shadow={color:"rgba(0,0,0,0.5)",blur:10,offsetX:5,offsetY:5},N.add(R),m!=null&&m.mainImage&&M.fabric.Image.fromURL(m.mainImage,function(K){K.height=A.offsetHeight,K.width=c.offsetWidth,K.scaleToWidth(A.offsetHeight),K.scaleToHeight(c.offsetWidth),N.setBackgroundImage(K),N.setActiveObject(R),fe(R),N.renderAll(),k(N)},{crossOrigin:"anonymous"})}return N.on({"selection:updated":R=>{const K=N.getActiveObject();fe(K)},"selection:created":R=>{const K=N.getActiveObject();fe(K)},"selection:cleared":R=>{Se()},"object:modified":R=>{k(N),ae(N)},"object:added":R=>{ae(N)},"object:removed":R=>{ae(N)},"object:created":R=>{ae(N)}}),C(N),oe(c.offsetWidth),()=>{C(null),N.off({"selection:updated":R=>{const K=N.getActiveObject();fe(K)},"selection:created":R=>{const K=N.getActiveObject();fe(K)},"selection:cleared":R=>{Se()},"object:modified":R=>{k(N),ae(N)},"object:added":R=>{ae(N)},"object:removed":R=>{ae(N)},"object:created":R=>{ae(N)}}),N.dispose()}},[we]),a.useEffect(()=>(Ge(),document.addEventListener("keydown",c=>Ie(c)),()=>{document.removeEventListener("keydown",c=>Ie(c))}),[s]),a.useEffect(()=>{if(s){const c=document.getElementById("apc-mpx-editor-canvas-container"),A=()=>{const z=c.offsetWidth/J;s.setZoom(z)};return window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}}},[s,T]),a.useEffect(()=>{const c=()=>{if(s&&B.current){const A=s.getWidth(),z=s.getHeight(),N=window.innerWidth,le=window.innerHeight,R=N/A,K=le/z,rt=Math.min(R,K);s.setZoom(rt/1.4),s.renderAll()}};return G&&(c(),window.addEventListener("resize",c)),()=>window.removeEventListener("resize",c)},[s,G]);const Ge=()=>{Ne().then(c=>{if(c&&c.length>0){const A=c[0].content;y===c[0].id&&Qe(A)}})},ae=c=>{if(c){const A=c.toJSON();ze(z=>(We.current.push(z),A))}},fe=c=>{_(c.type)},Se=()=>{_(null)},ve=()=>{s.getActiveObject()&&s.remove(s.getActiveObject())},$e=()=>{const c=s.getActiveObject(),A=M.fabric.util.object.clone(c);A.set({left:c.left+20,top:c.top+20}),s.add(A)},ke=c=>{Te(c)},Ae=c=>{let A=se;A.push(c),ne(A)},Je=c=>{c==="lock"?s.getActiveObject().set({lockMovementX:!0,lockMovementY:!0}):s.getActiveObject().set({lockMovementX:!1,lockMovementY:!1})},Ze=()=>{s&&(s.getActiveObject().bringForward(),s.renderAll())},_e=()=>{s&&(s.getActiveObject().sendBackwards(),s.renderAll())},et=()=>{const c=T+Y;V(c),s.setZoom(c)},tt=()=>{const c=Math.max(T-Y,Y);V(c),s.setZoom(c)},Ie=c=>{s&&s.getActiveObject()&&s.getActiveObject().type!=="textbox"&&c.keyCode===8&&ve()},k=c=>{const A=localStorage.getItem("apc_x_activeTab");if(A)Fe(A).then(z=>{if(z){const N=JSON.stringify(c);Ee(z.id,z.classification,N,z.misc).then(le=>{})}else{const N=JSON.stringify(c);Ee(m.name??"design","general",N,m).then(le=>{})}});else{const z=JSON.stringify(c);Ee(m.name??"design","general",z,m).then(N=>{})}},O=(c,A)=>{const z=JSON.stringify(c);Ee(A.id,A.classification,z,A.misc).then(N=>{})},$=()=>({getPDF:()=>Ne().then(c=>{let A=[];for(let z in c)he(c[z].content,s.height,s.width,"pdf").then(N=>{A.push(N)});return A}),getPNG:()=>Ne().then(c=>{let A=[];for(let z in c)he(c[z].content,s.height,s.width,"png").then(N=>{A.push(N)});return A}),getSVG:()=>Ne().then(c=>{let A=[];for(let z in c)he(c[z].content,s.height,s.width,"svg").then(N=>{A.push(N)});return A}),getJPEG:()=>Ne().then(c=>{let A=[];for(let z in c)he(c[z].content,s.height,s.width,"jpeg").then(N=>{A.push(N)});return A}),getWEBP:()=>Ne().then(c=>{let A=[];for(let z in c)he(c[z].content,s.height,s.width,"webp").then(N=>{A.push(N)});return A}),getImageActiveTab:()=>{const c=localStorage.getItem("apc_x_activeTab");return Fe(c).then(A=>he(A.content,s.height,s.width,"png").then(z=>{let N={};return N.file=z,N.height=s.height,N.width=s.width,N}))}}),D=()=>e.jsxs("div",{style:{marginTop:"6px",fontWeight:"bold"},children:["Replace Image: ",e.jsx("input",{type:"file",accept:"image/*",onChange:c=>Q(c)}),e.jsx("br",{})]}),Q=(c,A)=>{{const z=s.getActiveObject(),N=c.target.files[0],le=new FileReader;le.onload=function(R){const K=R.target.result;z.setSrc(K,function(rt){rt.set({angle:30}),s&&s.renderAll()})},le.readAsDataURL(N)}s&&s.renderAll()},xe=()=>{switch(p){case"ICONS":return e.jsx(Lr,{apcCanvasInstance:s,theme:t,apiKey:o,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"TEMPLATES":return e.jsx(Sr,{apcCanvasInstance:s,theme:t,apiKey:o,apiEndpoint:x,reloadTabs:c=>ee(c),updateActiveSection:c=>ke(c),initCategory:v,currentTabNo:Me,initInstance:l,setActiveTab:c=>me(c),isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"TXT":return e.jsx(Tr,{apcCanvasInstance:s,theme:t,apiKey:o,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"IMAGE":return e.jsx(zr,{apcCanvasInstance:s,theme:t,apiKey:o,apiEndpoint:x,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"STICKERS":return e.jsx(Jr,{apcCanvasInstance:s,theme:t,apiEndpoint:x,isMobile:G,apiKey:o,closeMobileModalSecondaryPanel:c=>X(!c)});case"SHAPES":return e.jsx(At,{apcCanvasInstance:s,theme:t,apiKey:o,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"QUOTE":return e.jsx(_r,{apcCanvasInstance:s,theme:t,apiKey:o,apiEndpoint:x,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"BACKGROUND":return e.jsx(Br,{apcCanvasInstance:s,theme:t,apiKey:o,apiEndpoint:x,updateActiveSection:c=>ke(c),reloadTabs:c=>ee(c),currentTabNo:Me,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"QRCODE":return e.jsx(Dr,{apcCanvasInstance:s,theme:t,apiKey:o,apiEndpoint:x,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"BARCODE":return e.jsx(Fr,{apcCanvasInstance:s,theme:t,apiKey:o,apiEndpoint:x,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});case"SIZE":return e.jsx(Pr,{apcCanvasInstance:s,theme:t,apiKey:o,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)});default:return e.jsx(At,{apcCanvasInstance:s,theme:t,apiKey:o,isMobile:G,closeMobileModalSecondaryPanel:c=>X(!c)})}},je=()=>{if(!I)return null;switch(I){case"text":return e.jsx(It,{apcCanvasInstance:s,theme:t,apiKey:o});case"textbox":return e.jsx(It,{apcCanvasInstance:s,theme:t,apiKey:o});case"rect":return e.jsx(He,{apcCanvasInstance:s,theme:t,apiKey:o});case"circle":return e.jsx(He,{apcCanvasInstance:s,theme:t,apiKey:o});case"triangle":return e.jsx(He,{apcCanvasInstance:s,theme:t,apiKey:o});case"line":return e.jsx(He,{apcCanvasInstance:s,theme:t,apiKey:o});case"path":return e.jsx(He,{apcCanvasInstance:s,theme:t,apiKey:o});case"polygon":return e.jsx(He,{apcCanvasInstance:s,theme:t,apiKey:o});case"image":return D();default:return null}},te=c=>{j(c),G&&X(!0)},Ye=()=>e.jsx("div",{id:"selectionRectangle",style:{marginLeft:"auto",position:"relative"},children:e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:10,marginTop:"8px"},children:[e.jsxs("div",{className:"apc-mpx-tooltip-container",role:"button",onClick:()=>ve(),style:{cursor:"pointer"},children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",children:e.jsx("path",{d:kt,fill:"#d8d4d4"})}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Delete"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",role:"button",onClick:()=>_e(),style:{cursor:"pointer"},children:[e.jsxs("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",fill:"#d8d4d4",width:"20px",height:"20px",viewBox:"0 0 32 32",children:[e.jsx("path",{d:"M28,10H22V4a2,2,0,0,0-2-2H4A2,2,0,0,0,2,4V20a2,2,0,0,0,2,2h6v6a2.0023,2.0023,0,0,0,2,2H28a2.0023,2.0023,0,0,0,2-2V12A2.0023,2.0023,0,0,0,28,10ZM12,28V12H28l.0015,16Z"}),e.jsx("rect",{style:{fill:"none"},width:"32",height:"32"})]}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Send to back"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",role:"button",onClick:()=>Ze(),style:{cursor:"pointer"},children:[e.jsxs("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",fill:"#d8d4d4",width:"20px",height:"20px",viewBox:"0 0 32 32",children:[e.jsx("path",{d:"M28,10H22V4a2.0023,2.0023,0,0,0-2-2H4A2.0023,2.0023,0,0,0,2,4V20a2.0023,2.0023,0,0,0,2,2h6v6a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V12A2,2,0,0,0,28,10ZM4,20,3.9985,4H20v6H12a2,2,0,0,0-2,2v8Z"}),e.jsx("rect",{style:{fill:"none"},height:"32",width:"32"})]}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Bring to front"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",onClick:()=>Je("lock"),style:{cursor:"pointer"},children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",children:e.jsx("path",{fill:"#d8d4d4",d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"})}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Lock"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",onClick:()=>Je("unlock"),style:{cursor:"pointer"},children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"18",viewBox:"0 0 576 512",children:e.jsx("path",{fill:"#d8d4d4",d:"M423.5 0C339.5 .3 272 69.5 272 153.5V224H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48h-48v-71.1c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v80c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-80C576 68 507.5-.3 423.5 0z"})}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Unlock"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",onClick:()=>$e(),style:{cursor:"pointer"},children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",children:e.jsx("path",{fill:"#d8d4d4",d:"M464 0c26.5 0 48 21.5 48 48v288c0 26.5-21.5 48-48 48H176c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48h288M176 416c-44.1 0-80-35.9-80-80V128H48c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-48H176z"})}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Duplicate"})]})]})}),Be=()=>s?e.jsx("div",{style:{height:"10vh",overflow:"auto"},children:e.jsx(ct,{isOpen:Oe,onClose:()=>X(!1),children:xe()})}):null,be=()=>s?G?Be():xe():null;return e.jsxs("div",{className:"apc-mpc-widget-wrapper",children:[e.jsxs("div",{style:{display:"flex",backgroundColor:pe(t.primaryColor,70),flexDirection:"row",padding:"3px",color:"#ffffff",minHeight:"30px"},children:[e.jsx("div",{style:{flexBasis:"40%"},children:e.jsx("div",{style:{float:"left"},children:e.jsxs("button",{onClick:()=>window.history.back(),style:{backgroundColor:"transparent",color:"#ffffff",border:"solid #ffffff 1px",padding:"4px",width:"auto",borderRadius:"4px",fontWeight:"bold"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:"#ffffff",d:br})})," Back"]})})}),e.jsx("div",{style:{flexBasis:"20%"}}),e.jsx("div",{style:{flexBasis:"40%"},children:e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:10},children:e.jsx("div",{children:e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:5},children:[e.jsx("div",{children:s&&b.share?e.jsx("div",{children:e.jsx(Rr,{apcCanvasInstance:s,theme:t})}):null}),e.jsx("div",{children:s&&b.download?e.jsx("div",{children:e.jsx(Ur,{apcCanvasInstance:s,theme:t,apiKey:o,updateSelectedSections:c=>Ae(c),updateActiveSection:c=>ke(c),accesories,getDesignFormats:$()})}):null}),e.jsx("div",{children:s&&u?e.jsx("div",{children:e.jsx("button",{className:"apc-mpc-widget-btn",onClick:()=>d($()),style:{backgroundColor:u.btnColor??t.primaryColorLight,color:"#ffffff",border:"solid #ffffff 1px"},children:u.btnLabel})}):null})]})})})})]}),e.jsxs("div",{className:"apc-mpc-widget-colums",children:[e.jsx("div",{className:"apc-mpc-widget-colum-modules-container",children:e.jsxs("div",{className:"apc-mypixia-widget-primary-nav-container",children:[h.indexOf("TXT")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("TXT"),style:{padding:"10px",backgroundColor:p==="TXT"?t.primaryColorLight:"inherit",color:p==="TXT"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",style:{fill:p==="TXT"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:nr})}),e.jsx("div",{children:"Text"})]}):null,h.indexOf("STICKERS")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("STICKERS"),style:{padding:"10px",backgroundColor:p==="STICKERS"?t.primaryColorLight:"inherit",color:p==="STICKERS"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"20",viewBox:"0 0 640 512",style:{fill:p==="STICKERS"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:mr})}),e.jsx("div",{children:"Stickers"})]}):null,h.indexOf("SHAPES")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("SHAPES"),style:{padding:"10px",backgroundColor:p==="SHAPES"?t.primaryColorLight:"inherit",color:p==="SHAPES"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",style:{fill:p==="SHAPES"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:rr})}),e.jsx("div",{children:"Shapes"})]}):null,h.indexOf("ICONS")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("ICONS"),style:{padding:"10px",backgroundColor:p==="ICONS"?t.primaryColorLight:"inherit",color:p==="ICONS"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",style:{fill:p==="ICONS"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:sr})}),e.jsx("div",{children:"Icons"})]}):null,h.indexOf("IMAGE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("IMAGE"),style:{padding:"10px",backgroundColor:p==="IMAGE"?t.primaryColorLight:"inherit",color:p==="IMAGE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"18",viewBox:"0 0 512 512",style:{fill:p==="IMAGE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:Nt})}),e.jsx("div",{children:"Upload"})]}):null,h.indexOf("QUOTE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("QUOTE"),style:{padding:"10px",backgroundColor:p==="QUOTE"?t.primaryColorLight:"inherit",color:p==="QUOTE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",style:{fill:p==="QUOTE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:ir})}),e.jsx("div",{children:"Quote"})]}):null,h.indexOf("BACKGROUND")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("BACKGROUND"),style:{padding:"10px",backgroundColor:p==="BACKGROUND"?t.primaryColorLight:"inherit",color:p==="BACKGROUND"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"20",viewBox:"0 0 640 512",style:{fill:p==="BACKGROUND"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:or})}),e.jsx("div",{children:"Background"})]}):null,h.indexOf("QRCODE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("QRCODE"),style:{padding:"10px",backgroundColor:p==="QRCODE"?t.primaryColorLight:"inherit",color:p==="QRCODE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"20",viewBox:"0 0 640 512",style:{fill:p==="QRCODE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:cr})}),e.jsx("div",{children:"QR Code"})]}):null,h.indexOf("BARCODE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("BARCODE"),style:{padding:"10px",backgroundColor:p==="BARCODE"?t.primaryColorLight:"inherit",color:p==="BARCODE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",style:{fill:p==="BARCODE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:lr})}),e.jsx("div",{children:"Barcode"})]}):null,h.indexOf("SIZE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("SIZE"),style:{padding:"10px",backgroundColor:p==="SIZE"?t.primaryColorLight:"inherit",color:p==="SIZE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",style:{fill:p==="SIZE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:ar})}),e.jsx("div",{children:"Size"})]}):null]})}),e.jsx("div",{className:"apc-mpc-widget-colum-features-container",children:be()}),e.jsx("div",{className:"apc-mpc-widget-colum-editor-container",children:e.jsx(Wr,{theme:t,activeSection:ue,selectedObjectType:I,renderQuickActions:Ye,renderActionItems:je,canvasEl:B,zoomIn:()=>et(),zoomOut:()=>tt(),apcCanvasInstance:s,setActiveSection:c=>Te(c),updateActiveDesignSection:c=>ke(c),saveActiveDesign:(c,A)=>O(c,A),reloadTabs:Me,activeTabName:Ce,supportedColors:Ve,initProductName:y,historyRef:We,currentState:Ue,setCurrentState:c=>ze(c),isPlainColor:n,selectedProduct:m,isMobile:G})})]}),e.jsx("div",{id:"apc-mpx-editor-modal-root"}),G?Be():null]})}return Yr});
35
+ 1px 1px 0 #ff0000`,cursor:"pointer"},Ar={fontFamily:"Arial",fontSize:"40px",color:"#000",width:"300px",transform:"skewX(20deg) skewY(10deg)",textAlign:"center",cursor:"pointer"},Ir={fontFamily:"Arial",fontSize:"40px",color:"#000",textShadow:"0 0 10px green",textAlign:"center",cursor:"pointer"},Er={fontFamily:"Arial",fontSize:"40px",color:"#000",backgroundColor:"orange",borderRadius:"5px",cursor:"pointer"},Tr={color:"black",fontSize:"40px",opacity:"0.5",fontFamily:"Arial, sans-serif",cursor:"pointer"};function zr(y){const{apcCanvasInstance:t,isMobile:o,closeMobileModalSecondaryPanel:s}=y,d=(i,m)=>{const h=new z.fabric.Textbox("Stay Humble!",{width:300,left:200,top:200,fontFamily:i,fill:m,hasControls:!0});t.add(h),t.setActiveObject(h),o&&s(!0)},f=({primaryTextLabel:i,primaryTextFontFamily:m,primaryTextColor:h,secondaryTextLabel:j,SecondaryTextFontFamily:n,secondaryTextColor:C})=>{const B=new z.fabric.Textbox(i,{fontFamily:m,width:300,left:200,top:200,fill:h}),I=new z.fabric.Textbox(j,{fontFamily:n,fill:C,fontSize:12,width:150});I.top=B.top+B.height+10,I.left=B.left,t.add(B),t.add(I),t.setActiveObject(B),o&&s(!0)},x=(i,m)=>{const h=new z.fabric.Textbox("Adventure Awaits!",{width:300,left:200,top:200,fontFamily:i,fill:m}),j={color:"rgba(0,0,0,0.5)",blur:10,offsetX:5,offsetY:5};h.shadow=j,t.add(h),t.setActiveObject(h),o&&s(!0)},p=()=>{const i=new z.fabric.Textbox("Love More",{left:100,top:100,width:300,fontFamily:"Arial",fill:new z.fabric.Gradient({type:"linear",gradientUnits:"pixels",coords:{x1:0,y1:0,x2:0,y2:50},colorStops:[{offset:0,color:"red"},{offset:1,color:"yellow"}]})});t.add(i),t.setActiveObject(i),o&&s(!0)},b=()=>{const i=new z.fabric.Textbox("Good Vibes Only",{left:150,top:150,fontFamily:"comic sans ms",fontSize:40,width:300,fill:"#000",stroke:"#ff0000",strokeWidth:2});t.add(i),t.setActiveObject(i),o&&s(!0)},a=()=>{const i=new z.fabric.Textbox("Dream Big",{left:300,top:300,width:300,fontFamily:"Arial",fill:"#000",skewX:20,skewY:10});t.add(i),t.setActiveObject(i),o&&s(!0)},v=()=>{const i=new z.fabric.Textbox("Choose Joy",{left:350,top:350,fontFamily:"Arial",fill:"#000",opacity:.5});t.add(i),t.setActiveObject(i),o&&s(!0)},u=()=>{const i=new z.fabric.Textbox("Find Your Fire",{left:550,top:550,fontFamily:"Arial",fill:"#000",shadow:"yellow 0 0 10px"});t.add(i),t.setActiveObject(i),o&&s(!0)},w=()=>{const i=new z.fabric.Textbox("Be Kind",{left:650,top:650,fontFamily:"Arial",fill:"#000",backgroundColor:"orange"});t.add(i),t.setActiveObject(i),o&&s(!0)};return e.jsx(l.Fragment,{children:e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[e.jsx("div",{style:{fontSize:"20px",cursor:"pointer"},onClick:()=>d("Arial, sans-serif","#6a45d2"),children:e.jsx("span",{style:{color:"#6a45d2",fontFamily:"Arial, sans-serif",fontSize:"30px"},children:"Stay Humble "})}),e.jsx("div",{style:{fontSize:"20px",cursor:"pointer"},onClick:()=>f({primaryTextLabel:"Life is full of",primaryTextFontFamily:"Rock Salt, cursive",primaryTextColor:"black",secondaryTextLabel:"surprises",SecondaryTextFontFamily:"Arial, sans-serif",secondaryTextColor:"black"}),children:e.jsxs("span",{style:{color:"black",fontFamily:"Rock Salt, cursive",fontSize:"30px"},children:["Life is full of ",e.jsx("div",{style:{fontFamily:"Arial, sans-serif",fontSize:"14px"},children:"surprises"})," "]})}),e.jsx("div",{style:{fontSize:"20px",cursor:"pointer",paddingLeft:"20px"},onClick:()=>f({primaryTextLabel:"You are invited!",primaryTextFontFamily:"Bilbao Swash Caps",primaryTextColor:"green",secondaryTextLabel:"Taste the best wines from the best makers",SecondaryTextFontFamily:"Arial, sans-serif",secondaryTextColor:"green"}),children:e.jsxs("span",{style:{color:"green",fontFamily:"Bilbao Swash Caps",fontSize:"30px"},children:["You are invited! ",e.jsx("div",{style:{color:"green",fontFamily:"Arial, sans-serif",fontSize:"14px",textAlign:"right"},children:"Taste the best wines from the best makers"})," "]})}),e.jsx("div",{style:{fontSize:"20px",cursor:"pointer",paddingLeft:"20px"},onClick:()=>x("aclonica","#6a45d2"),children:e.jsx("span",{style:{color:"#6a45d2",fontFamily:"aclonica",fontSize:"30px",textShadow:"2px 2px 4px rgba(0, 0, 0, 2)"},children:"Adventure Awaits "})}),e.jsx("div",{onClick:()=>p(),style:Nr,children:"Love More"}),e.jsx("div",{onClick:()=>b(),style:Or,children:"Good Vibes Only"}),e.jsx("div",{onClick:()=>a(),style:Ar,children:"Dream Big"}),e.jsx("div",{onClick:()=>u(),style:Ir,children:"Find Your Fire"}),e.jsx("div",{onClick:()=>w(),style:Er,children:"Be Kind"}),e.jsx("div",{onClick:()=>v(),style:Tr,children:"Choose Joy"})]})})}const At=async y=>{try{const o=await(await fetch(y)).blob();return new Promise((s,d)=>{const f=new FileReader;f.onloadend=()=>s(f.result),f.onerror=d,f.readAsDataURL(o)})}catch(t){throw console.error("Error converting image to base64:",t),t}};function Mr({apcCanvasInstance:y,theme:t}){const[o,s]=l.useState(!1),d=a=>{const v=a.target.files[0];if(v){const u=new FileReader;u.onload=w=>x(w.target.result),u.readAsDataURL(v)}},f=a=>{a.preventDefault(),s(!1);const v=a.dataTransfer.files[0];if(v){const u=new FileReader;u.onload=w=>x(w.target.result),u.readAsDataURL(v)}},x=a=>{z.fabric.Image.fromURL(a,v=>{v.set({left:100,top:100,scaleX:.5,scaleY:.5}),y.add(v)})},p=a=>{a.preventDefault(),s(!0)},b=()=>{s(!1)};return e.jsxs("div",{style:{border:o?"2px dashed #4CAF50":"2px dashed #ccc",padding:"40px",margin:"20px",borderRadius:"10px",textAlign:"center",backgroundColor:o?"#f0fff4":"#f9f9f9",transition:"background-color 0.3s",cursor:"pointer",position:"relative"},onDragOver:p,onDragLeave:b,onDrop:f,onClick:()=>document.getElementById("file-input").click(),children:[e.jsx("input",{type:"file",accept:"image/*",style:{display:"none"},id:"file-input",onChange:d}),e.jsxs("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:o?"#4CAF50":"#ccc",fontSize:"48px"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"18",viewBox:"0 0 512 512",style:{fill:t.primaryColor},children:e.jsx("path",{d:Ot})}),e.jsx("br",{})," ",e.jsx("br",{})]}),e.jsx("label",{htmlFor:"file-input",style:{display:"block",marginTop:"80px",fontSize:"16px",color:"#333"},children:"Click or drag & drop to upload an image"}),e.jsx("div",{style:{fontSize:"12px",color:"#888"},children:"Supports PNG, JPG, WEBP formats"})]})}function ot(y){const{featureText:t}=y;return e.jsxs("div",{style:{padding:"10px"},children:[t??"This is a premium feature. Get API key here","  ",e.jsx("a",{href:"https://mypixia.com/api-key",target:"_blank",children:"https://mypixia.com/api-key"}),e.jsx("br",{})]})}function st(){return e.jsxs("div",{className:"loading-container",children:[e.jsxs("div",{className:"spinner",children:[e.jsx("div",{className:"spinner-circle"}),e.jsx("div",{className:"spinner-circle-inner"})]}),e.jsx("p",{className:"loading-text",children:"Loading..."})]})}function Lr(y){const{apcCanvasInstance:t,theme:o,apiKey:s,apiEndpoint:d,isMobile:f,closeMobileModalSecondaryPanel:x}=y,[p,b]=l.useState("flowers"),[a,v]=l.useState(!1),[u,w]=l.useState(),[i,m]=l.useState(!1),[h,j]=l.useState(!1),n=sessionStorage.getItem("apc_x_sub_status"),C=`${d}/api/v1/designer`;l.useEffect(()=>{I()},[]),l.useEffect(()=>{(async()=>{n==="active"?(m(!0),j(!0)):(v(!0),await B())})()},[]);const B=()=>{v(!0);const T=`${C}/get-subscription-status/${s}`;ge.get(T).then(V=>{V.data.object&&V.data.object==="active"&&(sessionStorage.setItem("apc_x_sub_status","active"),m(!0))}).catch(V=>{sessionStorage.setItem("apc_x_sub_status","")}).finally(()=>{v(!1),j(!0)})},I=()=>{v(!0);const T={"X-Api-Key":s},V=`${C}/get-images/${p}`;ge.get(V,{headers:T}).then(Y=>{var J;v(!1),w((J=Y.data)==null?void 0:J.object)}).catch(Y=>{console.error("Error fetching data:",Y),v(!1)})},_=async T=>{const V=await At(T);V&&z.fabric.Image.fromURL(V,Y=>{Y.set({left:0,top:0,scaleX:.3,scaleY:.3}),t.add(Y)}),f&&x(!0)},F=()=>u?e.jsx("div",{children:u.map(T=>e.jsx("div",{onClick:()=>_(T.urls.regular),style:{cursor:"pointer"},children:e.jsx("img",{height:300,width:300,src:T.urls.regular,alt:T.description||"No description"})},T.id))}):null,E=()=>!i&&!a&&h?e.jsx(ot,{featureText:"Get premium AI images with subscription at "}):i&&!a&&h?e.jsxs("div",{children:[e.jsx("strong",{children:"- OR -"}),e.jsxs("div",{children:[e.jsx("input",{type:"text",onChange:T=>b(T.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${o.primaryColor}`}}),e.jsx("br",{})," ",e.jsx("br",{}),e.jsx("button",{className:"apc-mpc-widget-btn",onClick:()=>I(),style:{backgroundColor:o.primaryColor,color:"#ffffff"},children:a?"...Processing":"Search"})]}),e.jsx("br",{}),e.jsx("br",{}),F()]}):e.jsx(st,{});return e.jsxs(l.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),e.jsx(Mr,{apcCanvasInstance:t,theme:o}),e.jsx("br",{}),e.jsx("br",{}),E()]})}function It(y){const{apcCanvasInstance:t,theme:o,isMobile:s,closeMobileModalSecondaryPanel:d}=y,f=j=>{const n=new z.fabric.Rect({width:100,height:60,left:200,top:200,fill:"",stroke:o.primaryColor});t.add(n),t.setActiveObject(n),s&&d(!0)},x=j=>{const n=new z.fabric.Circle({radius:30,fill:"",stroke:o.primaryColor,left:200,top:200});t.add(n),t.setActiveObject(n),s&&d(!0)},p=j=>{const n=new z.fabric.Triangle({width:40,height:50,fill:"",stroke:o.primaryColor,left:200,top:200});t.add(n),t.setActiveObject(n),s&&d(!0)},b=j=>{const n=new z.fabric.Line([50,10,250,10],{fill:"",stroke:o.primaryColor,left:200,top:200});t.add(n),t.setActiveObject(n),s&&d(!0)},a=(j,n,C)=>{const B=n,I=n,_=Math.PI/j;let F=[],E=0;for(let T=0;T<j;T++){let V=B+Math.cos(E)*n,Y=I+Math.sin(E)*n;F.push({x:V,y:Y}),E+=_,V=B+Math.cos(E)*C,Y=I+Math.sin(E)*C,F.push({x:V,y:Y}),E+=_}return F},v=(j,n)=>{const C=Math.PI*2/j,B=n,I=n,_=[];for(let F=0;F<j;F++){const E=B+n*Math.cos(F*C),T=I+n*Math.sin(F*C);_.push({x:E,y:T})}return _},u=j=>{const n=a(5,60,30),C=new z.fabric.Polygon(n,{left:200,top:200,fill:"",stroke:o.primaryColor,strokeWidth:2,strokeLineJoin:"bevil"},!1);t.add(C),t.setActiveObject(C),s&&d(!0)},w=j=>{const n=v(6,30),C=new z.fabric.Polygon(n,{left:200,top:200,fill:"",stroke:o.primaryColor,strokeWidth:2,strokeLineJoin:"bevil"},!1);t.add(C),t.setActiveObject(C),s&&d(!0)},i=j=>{const n=new z.fabric.Path(ft,{fill:"",stroke:o.primaryColor,left:200,top:200});t.add(n),t.setActiveObject(n),s&&d(!0)},m=j=>{const n=new z.fabric.Path(xt,{fill:"",stroke:o.primaryColor,left:200,top:200});t.add(n),t.setActiveObject(n),s&&d(!0)},h=j=>{const n=new z.fabric.Path(at,{fill:"",stroke:o.primaryColor,left:200,top:200});t.add(n),t.setActiveObject(n),s&&d(!0)};return t?e.jsxs(l.Fragment,{children:[e.jsx("br",{}),e.jsx("div",{onClick:j=>f(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"76",width:"76",viewBox:"0 0 712 712",fill:"none",strokeWidth:"4",stroke:o.primaryColor,children:e.jsx("path",{d:"M512 512H0V0h512v512z"})})}),e.jsx("div",{onClick:j=>x(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"66",width:"66",viewBox:"0 0 512 512",fill:"none",strokeWidth:"4",stroke:o.primaryColor,children:e.jsx("path",{d:"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8z"})})}),e.jsx("div",{onClick:j=>p(),draggable:!0,style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"106",width:"106",viewBox:"0 0 320 512",fill:"none",strokeWidth:"4",stroke:o.primaryColor,children:e.jsx("path",{d:"M288.7 352H31.3c-17.8 0-26.7-21.5-14.1-34.1l128.7-128.7c7.8-7.8 20.5-7.8 28.3 0l128.7 128.7c12.6 12.6 3.7 34.1-14.1 34.1z"})})}),e.jsx("div",{onClick:j=>u(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"86",width:"86",viewBox:"0 0 576 512",fill:"none",strokeWidth:"4",stroke:o.primaryColor,children:e.jsx("path",{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"})})}),e.jsx("div",{onClick:j=>w(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",strokeWidth:"4",stroke:o.primaryColor,height:"80px",width:"80px",version:"1.1",id:"Capa_1",viewBox:"0 0 184.751 184.751",children:e.jsx("path",{d:"M0,92.375l46.188-80h92.378l46.185,80l-46.185,80H46.188L0,92.375z"})})}),e.jsx("div",{onClick:j=>b(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",strokeWidth:"4",stroke:o.primaryColor,id:"Capa_1",width:"86px",height:"86px",viewBox:"0 0 290.658 290.658",children:e.jsx("g",{children:e.jsx("g",{children:e.jsx("rect",{y:"139.474",style:{fill:o.primaryColor},width:"290.658",height:"1.711"})})})})}),e.jsx("div",{onClick:j=>i(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"86",width:"86",viewBox:"0 0 512 512",fill:"none",strokeWidth:"4",stroke:o.primaryColor,children:e.jsx("path",{d:ft})})}),e.jsx("div",{onClick:j=>m(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"86",width:"86",viewBox:"0 0 512 512",fill:"none",strokeWidth:"4",stroke:o.primaryColor,children:e.jsx("path",{d:xt})})}),e.jsx("div",{onClick:j=>h(),style:{fontSize:"50px",cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"86",width:"86",viewBox:"0 0 448 512",fill:"none",strokeWidth:"4",stroke:o.primaryColor,children:e.jsx("path",{d:at})})})]}):null}function _r(y){const{apcCanvasInstance:t,theme:o,isMobile:s,closeMobileModalSecondaryPanel:d}=y,f=p=>{const b=new z.fabric.Path(p,{left:200,top:200,fill:o.primaryColor,scaleX:.1,scaleY:.1});t.add(b),t.setActiveObject(b),s&&d(!0)},x=p=>{switch(p){case"icon-phone":f($t);break;case"icon-question":f(Wt);break;case"icon-clock":f(Gt);break;case"icon-twitter":f(Jt);break;case"icon-check":f(Yt);break;case"icon-pointer":f(Kt);break;case"icon-mail":f(qt);break;case"icon-dollar":f(Xt);break;case"icon-graduation":f(gt);break;case"icon-business-suit":f(Qt);break;case"icon-chat":f(Zt);break;case"icon-thumbs-up":f(er);break;case"icon-wifi":f(tr);break;case"icon-info":f(jt);break;case"icon-cart":f(vt);break;case"icon-comment":f(mt);break;case"icon-location-map":f(bt);break;case"icon-heart-1":f(wt);break;case"icon-arrow-right-1":f(at);break;case"icon-xmark":f(yt);break;case"icon-cloud":f(Ct);break;case"icon-smile":f(St);break;case"icon-like":f(kt);break;default:console.log("no matching type")}};return e.jsx(l.Fragment,{children:e.jsxs("div",{style:{padding:"5px"},className:s?"apc-mpx-widget-secondary-icons-mobile":"apc-mpx-widget-secondary-icons",children:[e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-phone"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:"M164.9 24.6c-7.7-18.6-28-28.5-47.4-23.2l-88 24C12.1 30.2 0 46 0 64C0 311.4 200.6 512 448 512c18 0 33.8-12.1 38.6-29.5l24-88c5.3-19.4-4.6-39.7-23.2-47.4l-96-40c-16.3-6.8-35.2-2.1-46.3 11.6L304.7 368C234.3 334.7 177.3 277.7 144 207.3L193.3 167c13.7-11.2 18.4-30 11.6-46.3l-40-96z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-question"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 320 512",children:e.jsx("path",{fill:o.primaryColor,d:"M80 160c0-35.3 28.7-64 64-64h32c35.3 0 64 28.7 64 64v3.6c0 21.8-11.1 42.1-29.4 53.8l-42.2 27.1c-25.2 16.2-40.4 44.1-40.4 74V320c0 17.7 14.3 32 32 32s32-14.3 32-32v-1.4c0-8.2 4.2-15.8 11-20.2l42.2-27.1c36.6-23.6 58.8-64.1 58.8-107.7V160c0-70.7-57.3-128-128-128H144C73.3 32 16 89.3 16 160c0 17.7 14.3 32 32 32s32-14.3 32-32zm80 320a40 40 0 1 0 0-80 40 40 0 1 0 0 80z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-clock"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-twitter"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-check"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:o.primaryColor,d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-pointer"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:o.primaryColor,d:"M160 64c0-8.8 7.2-16 16-16s16 7.2 16 16V200c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c8.8 0 16 7.2 16 16c0 10.3 6.6 19.5 16.4 22.8s20.6-.1 26.8-8.3c3-3.9 7.6-6.4 12.8-6.4c7.8 0 14.3 5.6 15.7 13c1.6 8.2 7.3 15.1 15.1 18s16.7 1.6 23.3-3.6c2.7-2.1 6.1-3.4 9.9-3.4c8.8 0 16 7.2 16 16l0 16V392c0 39.8-32.2 72-72 72H272 212.3h-.9c-37.4 0-72.4-18.7-93.2-49.9L50.7 312.9c-4.9-7.4-2.9-17.3 4.4-22.2s17.3-2.9 22.2 4.4L116 353.2c5.9 8.8 16.8 12.7 26.9 9.7s17-12.4 17-23V320 64zM176 0c-35.3 0-64 28.7-64 64V261.7C91.2 238 55.5 232.8 28.5 250.7C-.9 270.4-8.9 310.1 10.8 339.5L78.3 440.8c29.7 44.5 79.6 71.2 133.1 71.2h.9H272h56c66.3 0 120-53.7 120-120V288l0-16c0-35.3-28.7-64-64-64c-4.5 0-8.8 .5-13 1.3c-11.7-15.4-30.2-25.3-51-25.3c-6.9 0-13.5 1.1-19.7 3.1C288.7 170.7 269.6 160 248 160c-2.7 0-5.4 .2-8 .5V64c0-35.3-28.7-64-64-64zm48 304c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304zm48-16c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304c0-8.8-7.2-16-16-16zm80 16c0-8.8-7.2-16-16-16s-16 7.2-16 16v96c0 8.8 7.2 16 16 16s16-7.2 16-16V304z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-mail"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:"M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-dollar"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 320 512",children:e.jsx("path",{fill:o.primaryColor,d:"M160 0c17.7 0 32 14.3 32 32V67.7c1.6 .2 3.1 .4 4.7 .7c.4 .1 .7 .1 1.1 .2l48 8.8c17.4 3.2 28.9 19.9 25.7 37.2s-19.9 28.9-37.2 25.7l-47.5-8.7c-31.3-4.6-58.9-1.5-78.3 6.2s-27.2 18.3-29 28.1c-2 10.7-.5 16.7 1.2 20.4c1.8 3.9 5.5 8.3 12.8 13.2c16.3 10.7 41.3 17.7 73.7 26.3l2.9 .8c28.6 7.6 63.6 16.8 89.6 33.8c14.2 9.3 27.6 21.9 35.9 39.5c8.5 17.9 10.3 37.9 6.4 59.2c-6.9 38-33.1 63.4-65.6 76.7c-13.7 5.6-28.6 9.2-44.4 11V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V445.1c-.4-.1-.9-.1-1.3-.2l-.2 0 0 0c-24.4-3.8-64.5-14.3-91.5-26.3c-16.1-7.2-23.4-26.1-16.2-42.2s26.1-23.4 42.2-16.2c20.9 9.3 55.3 18.5 75.2 21.6c31.9 4.7 58.2 2 76-5.3c16.9-6.9 24.6-16.9 26.8-28.9c1.9-10.6 .4-16.7-1.3-20.4c-1.9-4-5.6-8.4-13-13.3c-16.4-10.7-41.5-17.7-74-26.3l-2.8-.7 0 0C119.4 279.3 84.4 270 58.4 253c-14.2-9.3-27.5-22-35.8-39.6c-8.4-17.9-10.1-37.9-6.1-59.2C23.7 116 52.3 91.2 84.8 78.3c13.3-5.3 27.9-8.9 43.2-11V32c0-17.7 14.3-32 32-32z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-graduation"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:o.primaryColor,d:gt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-business-suit"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:o.primaryColor,d:"M184 48H328c4.4 0 8 3.6 8 8V96H176V56c0-4.4 3.6-8 8-8zm-56 8V96H64C28.7 96 0 124.7 0 160v96H192 352h8.2c32.3-39.1 81.1-64 135.8-64c5.4 0 10.7 .2 16 .7V160c0-35.3-28.7-64-64-64H384V56c0-30.9-25.1-56-56-56H184c-30.9 0-56 25.1-56 56zM320 352H224c-17.7 0-32-14.3-32-32V288H0V416c0 35.3 28.7 64 64 64H360.2C335.1 449.6 320 410.5 320 368c0-5.4 .2-10.7 .7-16l-.7 0zm320 16a144 144 0 1 0 -288 0 144 144 0 1 0 288 0zM496 288c8.8 0 16 7.2 16 16v48h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H496c-8.8 0-16-7.2-16-16V304c0-8.8 7.2-16 16-16z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-chat"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:o.primaryColor,d:"M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.7 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-thumbs-up"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:"M323.8 34.8c-38.2-10.9-78.1 11.2-89 49.4l-5.7 20c-3.7 13-10.4 25-19.5 35l-51.3 56.4c-8.9 9.8-8.2 25 1.6 33.9s25 8.2 33.9-1.6l51.3-56.4c14.1-15.5 24.4-34 30.1-54.1l5.7-20c3.6-12.7 16.9-20.1 29.7-16.5s20.1 16.9 16.5 29.7l-5.7 20c-5.7 19.9-14.7 38.7-26.6 55.5c-5.2 7.3-5.8 16.9-1.7 24.9s12.3 13 21.3 13L448 224c8.8 0 16 7.2 16 16c0 6.8-4.3 12.7-10.4 15c-7.4 2.8-13 9-14.9 16.7s.1 15.8 5.3 21.7c2.5 2.8 4 6.5 4 10.6c0 7.8-5.6 14.3-13 15.7c-8.2 1.6-15.1 7.3-18 15.1s-1.6 16.7 3.6 23.3c2.1 2.7 3.4 6.1 3.4 9.9c0 6.7-4.2 12.6-10.2 14.9c-11.5 4.5-17.7 16.9-14.4 28.8c.4 1.3 .6 2.8 .6 4.3c0 8.8-7.2 16-16 16H286.5c-12.6 0-25-3.7-35.5-10.7l-61.7-41.1c-11-7.4-25.9-4.4-33.3 6.7s-4.4 25.9 6.7 33.3l61.7 41.1c18.4 12.3 40 18.8 62.1 18.8H384c34.7 0 62.9-27.6 64-62c14.6-11.7 24-29.7 24-50c0-4.5-.5-8.8-1.3-13c15.4-11.7 25.3-30.2 25.3-51c0-6.5-1-12.8-2.8-18.7C504.8 273.7 512 257.7 512 240c0-35.3-28.6-64-64-64l-92.3 0c4.7-10.4 8.7-21.2 11.8-32.2l5.7-20c10.9-38.2-11.2-78.1-49.4-89zM32 192c-17.7 0-32 14.3-32 32V448c0 17.7 14.3 32 32 32H96c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32H32z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-wifi"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:o.primaryColor,d:"M54.2 202.9C123.2 136.7 216.8 96 320 96s196.8 40.7 265.8 106.9c12.8 12.2 33 11.8 45.2-.9s11.8-33-.9-45.2C549.7 79.5 440.4 32 320 32S90.3 79.5 9.8 156.7C-2.9 169-3.3 189.2 8.9 202s32.5 13.2 45.2 .9zM320 256c56.8 0 108.6 21.1 148.2 56c13.3 11.7 33.5 10.4 45.2-2.8s10.4-33.5-2.8-45.2C459.8 219.2 393 192 320 192s-139.8 27.2-190.5 72c-13.3 11.7-14.5 31.9-2.8 45.2s31.9 14.5 45.2 2.8c39.5-34.9 91.3-56 148.2-56zm64 160a64 64 0 1 0 -128 0 64 64 0 1 0 128 0z"})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-info"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:jt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-cart"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 576 512",children:e.jsx("path",{fill:o.primaryColor,d:vt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-comment"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:mt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-location-map"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 384 512",children:e.jsx("path",{fill:o.primaryColor,d:bt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-heart-1"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:wt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-arrow-right-1"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:o.primaryColor,d:rr})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-xmark"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 384 512",children:e.jsx("path",{fill:o.primaryColor,d:yt})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-cloud"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 640 512",children:e.jsx("path",{fill:o.primaryColor,d:Ct})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-smile"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:St})})}),e.jsx("div",{className:"apc-mpx-widget-secondary-icon",onClick:p=>x("icon-like"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:o.primaryColor,d:kt})})})]})})}const Pe=({defaultValue:y,size:t,ariaLabel:o,onChange:s})=>{const[d,f]=l.useState(y),x=p=>{const b=p.target.value;f(b),s(b)};return e.jsx("input",{type:"range",value:d,min:"0",max:"100",step:"1",className:`slider ${t}`,"aria-label":o,onChange:x})};function Et(y){const{apcCanvasInstance:t,theme:o}=y,[s,d]=l.useState(!1),f=l.useRef(null),x=()=>{d(i=>!i)},p=i=>{f.current&&f.current.contains(i.target)||d(!1)};l.useEffect(()=>(document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}),[]);const b=(i,m)=>{if(t.getActiveObject()){if(m==="family"&&t.getActiveObject().set({fontFamily:i}),m==="bold"&&t.getActiveObject().set({fontWeight:i}),m==="italic"&&t.getActiveObject().set({fontStyle:i}),m==="underline"&&t.getActiveObject().set({underline:i}),m==="line-through"&&t.getActiveObject().set({linethrough:i}),m==="overline"&&t.getActiveObject().set({overline:i}),m==="color"&&t.getActiveObject().set({fill:i}),m==="shadow"){const h=document.getElementById("apc-text-shadow-color").value;let j=document.getElementById("apc-text-shadow-horiz").value,n=document.getElementById("apc-text-shadow-vert").value,C=document.getElementById("apc-text-shadow-blur").value;j||(j=5),n||(n=5),C||(C=5),t.getActiveObject().set({shadow:h+" "+j+" "+n+" "+C})}if(m==="stroke"){const h=document.getElementById("apc-text-stroke-color").value;let j=document.getElementById("apc-text-stroke-width").value;j||(j=1),t.getActiveObject().set({stroke:h,strokeWidth:j})}m==="bg-color"&&t.getActiveObject().set({textBackgroundColor:i}),m==="font-size"&&t.getActiveObject().set({fontSize:i}),t&&t.renderAll()}},a=i=>{if(t.getActiveObject()){const m=parseFloat(i/100);t.getActiveObject().set({opacity:m.toFixed(1)}),t&&t.renderAll()}},v=({color:i,x:m,y:h,blur:j})=>{if(t.getActiveObject()){const n=t.getActiveObject().shadow;i||(i=n?n.color:"#6a45d2"),m||(m=n?n.offsetX:5),h||(h=n?n.offsetY:5),j||(j=n?n.blur:5),t.getActiveObject().set({shadow:i+" "+m+" "+h+" "+j}),t&&t.renderAll()}},u=()=>e.jsxs("div",{className:"apc-mpx-widget-button-group-container",children:[" ",e.jsx("button",{className:"apc-mpx-widget-effects-button",onClick:x,style:{color:o.primaryColor,cursor:"pointer"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",height:"15px",width:"15px",children:e.jsx("path",{fill:o.primaryColor,d:gr})})}),s&&e.jsxs("div",{className:"apc-mpx-widget-popper-container",ref:f,children:[e.jsx("div",{className:"apc-mpx-widget-popper-arrow-up"}),e.jsxs("ul",{id:"split-button-menu",autoFocus:!0,children:[e.jsx("li",{className:"apc-mpx-widget-popper-li",children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("div",{style:{fontWeight:"bold",color:"purple"},children:"Background"}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:i=>b(i.target.value,"bg-color")})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Opacity",e.jsx("div",{children:e.jsx(Pe,{defaultValue:100,size:"small","aria-label":"Opacity",onChange:i=>a(i)})})]})]})}),e.jsx("li",{className:"apc-mpx-widget-popper-li",children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("div",{style:{fontWeight:"bold",color:"purple"},children:"Shadow"}),e.jsxs("div",{style:{marginLeft:"10px"},children:["Blur ",e.jsx("input",{type:"text",style:{height:"22px",width:"20px"},onChange:i=>v({blur:i.target.value})})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:i=>v({color:i.target.value})})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Offset X",e.jsx("div",{children:e.jsx(Pe,{defaultValue:0,size:"small","aria-label":"Opacity",onChange:i=>v({x:i})})})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Offset Y",e.jsx("div",{children:e.jsx(Pe,{defaultValue:0,size:"small","aria-label":"Opacity",onChange:i=>v({y:i})})})]})]})})]})]})]});return e.jsx(l.Fragment,{children:e.jsxs("div",{style:{display:"flex",flexDirection:"row",color:"#ffffff"},children:[e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px"},children:e.jsx("input",{style:{height:"20px",width:"30px",border:"solid 0px #ffffff"},type:"color",onChange:i=>b(i.target.value,"color")})})," ",e.jsx("div",{style:{marginTop:"4px"},children:e.jsxs("select",{style:{height:"20px",border:"solid 0px #ffffff"},id:"ffamily",onChange:i=>b(i.target.value,"family"),children:[e.jsx("option",{value:"comic sans ms",children:"Comic Sans MS"}),e.jsx("option",{value:"frankruehl",children:"FrankRuehl"}),e.jsx("option",{value:"lucida Bright",children:"Lucida Bright"}),e.jsx("option",{value:"bradley Hand",children:"Bradley Hand"}),e.jsx("option",{value:"Times New Roman",children:"Times New Roman"}),e.jsx("option",{value:"Georgia",children:"Georgia"}),e.jsx("option",{value:"Garamond",children:"Garamond"}),e.jsx("option",{value:"Baskerville",children:"Baskerville"}),e.jsx("option",{value:"Palatino",children:"Palatino"}),e.jsx("option",{value:"Book Antiqua",children:"Book Antiqua"}),e.jsx("option",{value:"Arial",children:"Arial"}),e.jsx("option",{value:"Helvetica",children:"Helvetica"}),e.jsx("option",{value:"Verdana",children:"Verdana"}),e.jsx("option",{value:"Tahoma",children:"Tahoma"}),e.jsx("option",{value:"Futura",children:"Futura"}),e.jsx("option",{value:"Calibri",children:"Calibri"}),e.jsx("option",{value:"Courier New",children:"Courier New"}),e.jsx("option",{value:"Consolas",children:"Consolas"}),e.jsx("option",{value:"Monaco",children:"Monaco"}),e.jsx("option",{value:"Brush Script",children:"Brush Script"}),e.jsx("option",{value:"Lucida Handwriting",children:"Lucida Handwriting"}),e.jsx("option",{value:"Zapfino",children:"Zapfino"}),e.jsx("option",{value:"Impact",children:"Impact"}),e.jsx("option",{value:"Cooper Black",children:"Cooper Black"}),e.jsx("option",{value:"Papyrus",children:"Papyrus"}),e.jsx("option",{value:"Comic Sans MS",children:"Comic Sans MS"}),e.jsx("option",{value:"Gotham",children:"Gotham"}),e.jsx("option",{value:"Franklin Gothic",children:"Franklin Gothic"}),e.jsx("option",{value:"DIN",children:"DIN"}),e.jsx("option",{value:"Rockwell",children:"Rockwell"}),e.jsx("option",{value:"Century Gothic",children:"Century Gothic"}),e.jsx("option",{value:"Trebuchet MS",children:"Trebuchet MS"}),e.jsx("option",{value:"Lobster",children:"Lobster"}),e.jsx("option",{value:"Roboto",children:"Roboto"}),e.jsx("option",{value:"Myriad Pro",children:"Myriad Pro"}),e.jsx("option",{value:"Gill Sans",children:"Gill Sans"}),e.jsx("option",{value:"Bodoni",children:"Bodoni"}),e.jsx("option",{value:"Perpetua",children:"Perpetua"}),e.jsx("option",{value:"Akzidenz-Grotesk",children:"Akzidenz-Grotesk"}),e.jsx("option",{value:"Source Sans Pro",children:"Source Sans Pro"}),e.jsx("option",{value:"Lato",children:"Lato"}),e.jsx("option",{value:"Noto Sans",children:"Noto Sans"}),e.jsx("option",{value:"Open Sans",children:"Open Sans"}),e.jsx("option",{value:"Montserrat",children:"Montserrat"})]})})," ",e.jsx("div",{style:{marginTop:"4px"},children:e.jsx("input",{defaultValue:40,style:{width:"50px",height:"20px",border:"solid 0px #ffffff"},type:"number",onChange:i=>b(i.target.value,"font-size")})}),e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px",cursor:"pointer"},role:"button",onClick:i=>t.getActiveObject().fontWeight==="normal"?b("bold","bold"):b("normal","bold"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",viewBox:"0 0 384 512",children:e.jsx("path",{fill:"#ffffff",d:"M333.5 238a122 122 0 0 0 27-65.2C367.9 96.5 308 32 233.4 32H34a16 16 0 0 0 -16 16v48a16 16 0 0 0 16 16h31.9v288H34a16 16 0 0 0 -16 16v48a16 16 0 0 0 16 16h209.3c70.8 0 134.1-51.8 141-122.4 4.7-48.5-16.4-92.1-50.8-119.6zM145.7 112h87.8a48 48 0 0 1 0 96h-87.8zm87.8 288h-87.8V288h87.8a56 56 0 0 1 0 112z"})})}),e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px",cursor:"pointer"},role:"button",onClick:i=>t.getActiveObject().fontStyle==="normal"?b("italic","italic"):b("normal","italic"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",viewBox:"0 0 320 512",children:e.jsx("path",{fill:"#ffffff",d:"M320 48v32a16 16 0 0 1 -16 16h-62.8l-80 320H208a16 16 0 0 1 16 16v32a16 16 0 0 1 -16 16H16a16 16 0 0 1 -16-16v-32a16 16 0 0 1 16-16h62.8l80-320H112a16 16 0 0 1 -16-16V48a16 16 0 0 1 16-16h192a16 16 0 0 1 16 16z"})})}),e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px",cursor:"pointer"},role:"button",onClick:i=>t.getActiveObject().underline?b(!1,"underline"):b(!0,"underline"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",viewBox:"0 0 448 512",children:e.jsx("path",{fill:"#ffffff",d:"M32 64h32v160c0 88.2 71.8 160 160 160s160-71.8 160-160V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0 -16-16H272a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h32v160a80 80 0 0 1 -160 0V64h32a16 16 0 0 0 16-16V16a16 16 0 0 0 -16-16H32a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16zm400 384H16a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h416a16 16 0 0 0 16-16v-32a16 16 0 0 0 -16-16z"})})}),e.jsx("div",{style:{marginTop:"4px",marginLeft:"2px",cursor:"pointer"},role:"button","aria-label":"Italics",onClick:i=>t.getActiveObject().linethrough?b(!1,"line-through"):b(!0,"line-through"),children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16px",width:"16px",viewBox:"0 0 512 512",children:e.jsx("path",{fill:"#ffffff",d:"M496 224H293.9l-87.2-26.8A43.6 43.6 0 0 1 219.6 112h66.8A49.9 49.9 0 0 1 331 139.6a16 16 0 0 0 21.5 7.2l42.9-21.5a16 16 0 0 0 7.2-21.5l-.5-1A128 128 0 0 0 287.5 32h-68a123.7 123.7 0 0 0 -123 135.6c2 20.9 10.1 39.8 21.8 56.4H16a16 16 0 0 0 -16 16v32a16 16 0 0 0 16 16h480a16 16 0 0 0 16-16v-32a16 16 0 0 0 -16-16zm-180.2 96A43 43 0 0 1 336 356.5 43.6 43.6 0 0 1 292.5 400h-66.8A49.9 49.9 0 0 1 181 372.4a16 16 0 0 0 -21.5-7.2l-42.9 21.5a16 16 0 0 0 -7.2 21.5l.5 1A128 128 0 0 0 224.5 480h68a123.7 123.7 0 0 0 123-135.6 114.3 114.3 0 0 0 -5.3-24.4z"})})}),e.jsx("div",{children:u()})]})})}function He(y){const{apcCanvasInstance:t,theme:o}=y,s=l.useRef(null),[d,f]=l.useState(!1),x=()=>{f(u=>!u)},p=(u,w)=>{if(t&&t.getActiveObject()){if(u==="bg-color"&&t.getActiveObject().set({fill:w}),u==="border-color"&&t.getActiveObject().set({stroke:w}),u==="gradient-bg-color1"||u==="gradient-bg-color2"){let i=document.getElementById("apc-object-bg-gradient-color1").value,m=document.getElementById("apc-object-bg-gradient-color2").value;const h=new z.fabric.Gradient({type:"linear",gradientUnits:"pixels",coords:{x1:0,y1:0,x2:0,y2:t.getActiveObject().height},colorStops:[{offset:0,color:i||"#000"},{offset:1,color:m||"#fff"}]});t.getActiveObject().set({fill:h})}t&&t.renderAll()}},b=u=>{if(t.getActiveObject()){const w=parseFloat(u/100);t.getActiveObject().set({opacity:w.toFixed(1)}),t&&t.renderAll()}},a=({color:u,x:w,y:i,blur:m})=>{if(t.getActiveObject()){const h=t.getActiveObject().shadow;u||(u=h?h.color:"#6a45d2"),w||(w=h?h.offsetX:5),i||(i=h?h.offsetY:5),m||(m=h?h.blur:5),t.getActiveObject().set({shadow:u+" "+w+" "+i+" "+m}),t&&t.renderAll()}};return e.jsx(l.Fragment,{children:e.jsxs("div",{className:"apc-mpx-widget-button-group-container",children:[e.jsx("button",{className:"apc-mpx-widget-effects-button",onClick:x,style:{color:o.primaryColor,fontWeight:"bold",cursor:"pointer",borderRadius:"25px"},children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"22px",width:"22px",children:e.jsx("path",{fill:o.primaryColor,d:mr})})}),d&&e.jsxs("div",{className:"apc-mpx-widget-popper-container",ref:s,style:{marginLeft:"20%"},children:[e.jsx("div",{className:"apc-mpx-widget-popper-arrow-up"}),e.jsxs("ul",{id:"split-button-menu",autoFocus:!0,children:[e.jsx("li",{className:"apc-mpx-widget-popper-li",children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("div",{style:{fontWeight:"bold",color:"purple"},children:"Background"}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:u=>p("bg-color",u.target.value)})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:["Gradient:",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},className:"editor-color-input-selector",id:"apc-object-bg-gradient-color1",type:"color",onChange:u=>p("gradient-bg-color1",u.target.value)}),e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},className:"editor-color-input-selector",id:"apc-object-bg-gradient-color2",type:"color",onChange:u=>p("gradient-bg-color2",u.target.value)})]}),e.jsx("div",{style:{marginLeft:"10px"},children:e.jsxs("div",{children:["Opacity: ",e.jsx(Pe,{defaultValue:100,size:"small","aria-label":"Opacity",onChange:u=>b(u)})]})}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Border color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:u=>p("border-color",u.target.value)})]})]})}),e.jsx("li",{className:"apc-mpx-widget-popper-li",children:e.jsxs("div",{style:{textAlign:"left"},children:[e.jsx("div",{style:{fontWeight:"bold",color:"purple"},children:"Shadow"}),e.jsxs("div",{style:{marginLeft:"10px"},children:["Blur width ",e.jsx("input",{type:"text",style:{height:"22px",width:"25px"},onChange:u=>a({blur:u.target.value})})]}),e.jsxs("div",{style:{marginLeft:"10px"},children:[" Color",e.jsx("input",{style:{height:"25px",width:"25px",border:"none"},type:"color",onChange:u=>a({color:u.target.value})})]}),e.jsx("div",{style:{marginLeft:"10px"},children:e.jsxs("div",{children:["Offset X: ",e.jsx(Pe,{defaultValue:0,size:"small","aria-label":"Opacity",onChange:u=>a({x:u})})]})}),e.jsx("div",{style:{marginLeft:"10px"},children:e.jsxs("div",{children:["Offset Y: ",e.jsx(Pe,{defaultValue:0,size:"small","aria-label":"Opacity",onChange:u=>a({y:u})})]})})]})})]})]})]})})}function Br(y){const{apcCanvasInstance:t,apiEndpoint:o,apiKey:s}=y,[d,f]=l.useState("art"),[x,p]=l.useState(),[b,a]=l.useState(!1),v=o+"/api/v1/designer";l.useEffect(()=>{u()},[]);const u=()=>{a(!0);const h={"X-Api-Key":s},j=`${v}/get-quote/${d}`;ge.get(j,{headers:h}).then(n=>{var C;a(!1),p((C=n.data)==null?void 0:C.object)}).catch(n=>{console.error("Error fetching data:",n),a(!1)})},w=(h,j,n)=>{const C=new z.fabric.Textbox(j,{width:500,left:100,top:200,fontSize:16}),B=new z.fabric.Textbox(n,{fontSize:14,width:200,fontWeight:"bold"});B.top=C.top+C.height+10,B.left=C.left,t.add(C),t.add(B),t.setActiveObject(C)},i=h=>{a(!0),f(h),u()},m=()=>x?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:5},children:x.map((h,j)=>e.jsxs("div",{onClick:n=>w(n,h.quote,h.author),style:{cursor:"pointer",padding:"3px",textAlign:"left",color:"#210080",fontFamily:"ui-monospace",border:"1px solid #dedcdc",borderRadius:"8px"},children:[e.jsx("div",{children:h.quote}),e.jsx("div",{children:e.jsx("strong",{children:e.jsx("i",{children:h.author})})}),e.jsx("br",{})]},j))}):null;return e.jsxs(l.Fragment,{children:[e.jsx("h3",{children:"Quotes"}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{children:m()}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("br",{}),e.jsxs("div",{style:{padding:"3px"},children:[e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("best"),children:[d==="best"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Best"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("business"),children:[d==="business"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Business"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("car"),children:[d==="car"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Car"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("change"),children:[d==="change"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Change"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("computers"),children:[d==="computers"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Computers"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("cool"),children:[d==="cool"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Cool"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("courage"),children:[d==="courage"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Courage"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("dad"),children:[d==="dad"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Dad"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("dating"),children:[d==="dating"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Date"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("death"),children:[d==="death"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Death"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("design"),children:[d==="design"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Design"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("dreams"),children:[d==="dreams"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Dreams"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("education"),children:[d==="education"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Education"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("inspirational"),children:[d==="inspirational"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Inspirational"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("happiness"),children:[d==="happiness"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Happiness"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("health"),children:[d==="health"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Health"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("humor"),children:[d==="humor"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Humor"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("marriage"),children:[d==="marriage"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Marriage"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("money"),children:[d==="money"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Money"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("graduation"),children:[d==="graduation"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Graduation"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("hope"),children:[d==="hope"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Hope"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("love"),children:[d==="love"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Love"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("god"),children:[d==="god"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"God"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("equality"),children:[d==="equality"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Equality"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("failure"),children:[d==="failure"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Failure"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("fear"),children:[d==="fear"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Fear"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("legal"),children:[d==="legal"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Legal"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("attitude"),children:[d==="attitude"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Attitude"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("beauty"),children:[d==="beauty"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Beauty"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("age"),children:[d==="age"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Age"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("art"),children:[d==="art"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Art"]}),e.jsx("br",{}),e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>i("birthday"),children:[d==="birthday"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Birthday"]}),e.jsx("br",{})]})]})}function Dr(y){const{apcCanvasInstance:t,theme:o,apiKey:s,apiEndpoint:d,updateActiveSection:f,reloadTabs:x,currentTabNo:p,isMobile:b,closeMobileModalSecondaryPanel:a}=y,[v,u]=l.useState("background"),[w,i]=l.useState(!1),[m,h]=l.useState(),j=d+"/api/v1/designer";l.useEffect(()=>{C()},[]);const n=_=>{const F=document.getElementById("img-default-id"),E=new z.fabric.Image(F,T=>{T.set({left:100,top:200,scaleX:.5,scaleY:.5,imageSmoothing:!0})});t.add(E),b&&a(!0)},C=()=>{i(!0);const _={"X-Api-Key":s},F=`${j}/get-images/${v}`;ge.get(F,{headers:_}).then(E=>{var T;i(!1),h((T=E.data)==null?void 0:T.object)}).catch(E=>{console.error("Error fetching data:",E),i(!1)})},B=_=>{z.fabric.Image.fromURL(_,function(F){F.width=t.width,F.height=t.height,F.scaleToWidth(t.width),F.scaleToHeight(t.height),t.setBackgroundImage(F);const E=localStorage.getItem("apc_x_activeTab"),T=JSON.stringify(t);Ee(E,"general",T,null).then(V=>{x(p+1),t&&t.renderAll()})},{crossOrigin:"anonymous"})},I=()=>m?e.jsx("div",{children:m.map(_=>e.jsx("div",{onClick:()=>B(_.urls.regular),style:{cursor:"pointer"},children:e.jsx("img",{height:300,width:300,src:_.urls.regular,alt:_.description||"No description"})},_.id))}):null;return e.jsxs(l.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),e.jsxs("div",{style:{cursor:"pointer"},onClick:()=>n(),children:[e.jsx("img",{alt:"sample-image",id:"img-default-id",src:"https://mypixia.com/images/img-default.png",height:"200",width:"300"})," ",e.jsx("br",{}),"From my device"]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("strong",{children:"- OR -"}),e.jsxs("div",{children:[e.jsx("input",{type:"text",onChange:_=>u(_.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${o.primaryColor}`}}),e.jsx("br",{})," ",e.jsx("br",{}),e.jsx("button",{className:"apc-mpc-widget-btn",onClick:()=>C(),style:{backgroundColor:o.primaryColor,color:"#ffffff"},children:w?"...Processing":"Search"})]}),e.jsx("br",{}),e.jsx("br",{}),I()]})}function Fr(y){const[t,o]=l.useState(""),[s,d]=l.useState(""),[f,x]=l.useState(!1),[p,b]=l.useState(!1),[a,v]=l.useState(!1),{apcCanvasInstance:u,theme:w,isMobile:i,closeMobileModalSecondaryPanel:m,apiKey:h,apiEndpoint:j}=y,n=`${j}/api/v1/designer`,C=sessionStorage.getItem("apc_x_sub_status");l.useEffect(()=>{(async()=>{C==="active"?(b(!0),v(!0)):(x(!0),await B())})()},[]);const B=()=>{x(!0);const F=`${n}/get-subscription-status/${h}`;ge.get(F).then(E=>{E.data.object&&E.data.object==="active"&&(sessionStorage.setItem("apc_x_sub_status","active"),b(!0))}).catch(E=>{sessionStorage.setItem("apc_x_sub_status","")}).finally(()=>{x(!1),v(!0)})},I=()=>{Dt.toDataURL(t,{width:300},(F,E)=>{F&&console.error(F),d(E)})},_=F=>{const E=document.getElementById("apc-qr-code-img"),T=new z.fabric.Image(E,V=>{V.set({left:200,top:200,scaleX:.5,scaleY:.5,imageSmoothing:!0})});u.add(T),u.setActiveObject(T),i&&m(!0)};return!p&&!f&&a?e.jsx(ot,{}):p&&!f&&a?e.jsxs(l.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),"Enter data such as url",e.jsx("br",{}),e.jsx("input",{className:"apc-mpc-widget-input",style:{border:`solid 3px ${w.primaryColor}`},type:"text",onChange:F=>o(F.target.value)}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("button",{className:"apc-mpc-widget-btn",style:{backgroundColor:w.primaryColor,color:"#ffffff"},disabled:!t,onClick:I,children:"Generate QR code"}),e.jsx("br",{}),e.jsx("br",{}),s&&e.jsxs("div",{className:"generated-view",onClick:()=>_(),style:{cursor:"pointer"},children:[e.jsx("img",{src:s,alt:"qr code",id:"apc-qr-code-img"}),e.jsx("a",{href:s})]})]}):e.jsx("div",{children:e.jsx(st,{})})}function Pr(y){const{apcCanvasInstance:t,theme:o,isMobile:s,closeMobileModalSecondaryPanel:d,apiKey:f,apiEndpoint:x}=y,[p,b]=l.useState(""),[a,v]=l.useState(null),[u,w]=l.useState("CODE128"),i=l.useRef(null),[m,h]=l.useState(""),[j,n]=l.useState(!1),[C,B]=l.useState(!1),[I,_]=l.useState(!1),F=sessionStorage.getItem("apc_x_sub_status"),E=`${x}/api/v1/designer`;l.useEffect(()=>{(async()=>{F==="active"?(B(!0),_(!0)):(n(!0),await T())})()},[]);const T=()=>{n(!0);const J=`${E}/get-subscription-status/${f}`;ge.get(J).then(se=>{se.data.object&&se.data.object==="active"&&(sessionStorage.setItem("apc_x_sub_status","active"),B(!0))}).catch(se=>{sessionStorage.setItem("apc_x_sub_status","")}).finally(()=>{n(!1),_(!0)})},V=()=>{v(e.jsx(Ft,{value:p,format:u,id:"barcode-element"}));const J=document.getElementById("barcode-element");J&&h(J.innerHTML)},Y=J=>{if(i.current.innerHTML){const se=i.current.innerHTML;let ne=new Image;ne.src="data:image/svg+xml,"+encodeURIComponent(se),ne.onload=function(){const ie=new z.fabric.Image(ne,{left:200,top:200});t.add(ie),t.setActiveObject(ie)}}s&&d(!0)};return!C&&!j&&I?e.jsx(ot,{}):C&&!j&&I?e.jsxs(l.Fragment,{children:[e.jsx("br",{}),e.jsx("br",{}),"Enter number",e.jsx("input",{type:"text",onChange:J=>b(J.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${o.primaryColor}`}}),e.jsx("br",{}),e.jsx("br",{}),"Code type",e.jsxs("select",{value:u,onChange:J=>w(J.target.value),className:"apc-mpc-widget-input",style:{border:`solid 3px ${o.primaryColor}`},children:[e.jsx("option",{value:"CODE128",children:"CODE128"}),e.jsx("option",{value:"EAN13",children:"EAN / UPC"}),e.jsx("option",{value:"CODE39",children:"CODE39"}),e.jsx("option",{value:"ITF14",children:"ITF-14"}),e.jsx("option",{value:"MSI10",children:"MSI10"}),e.jsx("option",{value:"pharmacode",children:"Pharmacode"}),e.jsx("option",{value:"codabar",children:"Codabar"})]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("button",{className:"apc-mpc-widget-btn",disabled:!p,onClick:()=>V(),style:{backgroundColor:o.primaryColor,color:"#ffffff"},children:"Generate Barcode"}),e.jsx("br",{}),e.jsx("br",{})," ",e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{children:a&&e.jsx("div",{ref:i,onClick:J=>Y(),style:{cursor:"pointer"},children:a})})]}):e.jsxs("div",{children:[" ",e.jsx(st,{})]})}function Hr(y){const{apcCanvasInstance:t,theme:o}=y,[s,d]=l.useState(),[f,x]=l.useState(),[p,b]=l.useState(""),a=(w,i)=>{if(t){if(w==="bg-color"&&i.target.value&&t.set({backgroundColor:i.target.value}),w==="image"&&i.target.value){const m=i.target.files[0],h=new FileReader;h.onload=function(j){const n=j.target.result;z.fabric.Image.fromURL(n,function(C){t.setBackgroundImage(C,t.renderAll.bind(t),{})})},h.readAsDataURL(m)}w==="height"&&i.target.value&&(d(i.target.value),t.setHeight(i.target.value)),w==="width"&&i.target.value&&(x(i.target.value),t.setWidth(i.target.value)),t&&t.renderAll()}},v=(w,i,m)=>{x(i),d(w),t.setWidth(i),t.setHeight(w),b(m)},u=()=>e.jsxs("div",{children:[e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row"},children:e.jsxs("div",{children:["Height(px)",e.jsx("input",{type:"number",value:t.height,onChange:w=>a("height",w),className:"apc-mpc-widget-input",style:{border:`solid 3px ${o.primaryColor}`}})]})})," ",e.jsx("div",{style:{display:"flex",flexDirection:"row"},children:e.jsxs("div",{children:["Width(px)",e.jsx("input",{color:"info",type:"number",value:t.width,onChange:w=>a("width",w),className:"apc-mpc-widget-input",style:{border:`solid 3px ${o.primaryColor}`}})]})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("div",{style:{textAlign:"left"},children:e.jsx("h3",{children:"Standard dimensions"})}),e.jsx("br",{})," ",e.jsx("br",{}),e.jsxs("div",{children:[e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1440,2560,"YOUC"),children:[p==="YOUC"?e.jsx("span",{style:{color:"green"},children:"✓"}):null," Youtube Channel : 2560 x 1440 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1080,1920,"FULLHD"),children:[p==="FULLHD"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Full HD : 1920 x 1080 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1080,1080,"INSTAP"),children:[p==="INSTAP"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Instagram Post:1080 x 1080 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1920,1080,"INSTAS"),children:[p==="INSTAS"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Instagram Story: 1080 x 1920 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1080,1080,"INSTAA"),children:[p==="INSTAA"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Instagram Ad: 1080 x 1080 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(788,940,"FACEP"),children:[p==="FACEP"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Facebook Post: 940 x 788 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(315,851,"FACEC"),children:[p==="FACEC"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Facebook Cover: 851 x 315 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(628,1200,"FACEA"),children:[p==="FACEA"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Facebook Ad: 1200 x 628 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(720,1280,"YOUT"),children:[p==="YOUT"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Youtube Thumbnail: 1280 x 720 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(534,534,"INVITE"),children:[p==="INVITE"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Invitation : 14 x 14 cm"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(1112,788,"A4"),children:[p==="A4"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"A4 : 788 x 1112 px"]})}),e.jsx("br",{}),e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:20},children:e.jsxs("div",{style:{backgroundColor:"#e0e0e0"},className:"apc-mpx-widget-custom-chip",onClick:()=>v(192,336,"BUSINESSCARD"),children:[p==="BUSINESSCARD"?e.jsx("span",{style:{color:"green"},children:"✓"}):null,"Business card 3.5 x 2 in"]})})]})]});return e.jsx("div",{children:u()})}const pe=(y,t,o,s="png",d)=>new Promise((f,x)=>{const p=document.createElement("canvas"),b=JSON.parse(y),a=crypto.randomUUID();p.width=o,p.height=t;const v=new z.fabric.StaticCanvas(p,{selection:!1,height:b.height,width:b.width});v.loadFromJSON(b,function(){v.renderAll();const u=(w,i)=>{const m=URL.createObjectURL(w),h=document.createElement("a");h.href=m,h.download=i,document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(m)};if(s.toLowerCase()==="svg"){const w=v.toSVG(),i=new Blob([w],{type:"image/svg+xml"});d&&u(i,"mypixia.svg"),f(new File([i],`${a}.svg`,{type:"image/svg+xml"}))}else if(s.toLowerCase()==="pdf"){const w=v.toDataURL("image/jpeg",1);import("jspdf").then(i=>{const m=new i.jsPDF({orientation:"landscape",unit:"px",format:[p.width,p.height]});m.addImage(w,"JPEG",0,0,p.width,p.height);const j=m.output("datauristring").split(",")[1],n=Vr(j,"application/pdf"),C=new File([n],`${a}.pdf`,{type:"application/pdf"}),B=`${a}.pdf`;d&&u(C,B),f(C)}).catch(i=>{console.error("Error loading jsPDF: ",i),x(i)})}else{let w,i="image/png",m="png";switch(s.toLowerCase()){case"jpeg":w=v.toDataURL("image/jpeg",1),i="image/jpeg",m="jpg";break;case"webp":w=v.toDataURL("image/webp",1),i="image/webp",m="webp";break;default:w=v.toDataURL("image/png",1);break}const h=atob(w.split(",")[1]),j=new Array(h.length);for(let I=0;I<h.length;I++)j[I]=h.charCodeAt(I);const n=new Uint8Array(j),C=new File([n],`${a}.${m}`,{type:i}),B=`${a}.${m}`;d&&u(C,B),f(C)}})});function Vr(y,t){const o=atob(y),s=new Array(o.length);for(let f=0;f<o.length;f++)s[f]=o.charCodeAt(f);const d=new Uint8Array(s);return new Blob([d],{type:t})}const Rr=({children:y})=>Pt.createPortal(y,document.getElementById("apc-mpx-editor-modal-root"));function ct(y){const{isOpen:t,onClose:o,children:s}=y;return t?e.jsx(Rr,{children:e.jsx("div",{className:"apc-mpx-widget-modal-overlay",children:e.jsxs("div",{className:"apc-mpx-widget-modal",children:[e.jsx("button",{style:{color:"red"},className:"apc-mpx-widget-modal-close-btn",onClick:o,children:"Close"}),e.jsx("div",{className:"apc-mpx-widget-modal-content",children:s})]})})}):null}const he=(y,t)=>{y=y.startsWith("#")?y:`#${y}`;let o=parseInt(y.slice(1,3),16),s=parseInt(y.slice(3,5),16),d=parseInt(y.slice(5,7),16);return o=parseInt(o*(100-t)/100),s=parseInt(s*(100-t)/100),d=parseInt(d*(100-t)/100),o=o.toString(16).padStart(2,"0"),s=s.toString(16).padStart(2,"0"),d=d.toString(16).padStart(2,"0"),`#${o}${s}${d}`};function Tt(y){const[t,o]=l.useState(""),{apcCanvasJSON:s,height:d,width:f}=y;return l.useEffect(()=>{const x=document.createElement("canvas"),p=JSON.parse(s);x.width=f,x.height=d;const b=new z.fabric.StaticCanvas(x,{selection:!1,height:p.height,width:p.width});b.loadFromJSON(p,function(){b.renderAll();const a=b.toDataURL("image/png",1);o(a)})},[]),t?e.jsx("div",{children:e.jsx("div",{className:"apc-mpx-widget-responsive-image-container",style:{cursor:"pointer",maxHeight:"500px",maxWidth:"500px"},children:e.jsx("img",{src:t,alt:"mypixia cool design",className:"apc-mpx-widget-responsive-image"})})}):"...processing"}function Ur(y){const{theme:t,apcCanvasInstance:o}=y,[s,d]=l.useState(!1),[f,x]=l.useState(),p=()=>{d(!0)},b=()=>{d(!1)},a=()=>{if(!o)return null;const v=JSON.stringify(o);return e.jsxs(ct,{isOpen:s,onClose:b,children:[e.jsx(Tt,{apcCanvasJSON:v,height:o.height,width:o.width}),e.jsx("div",{children:e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:5},children:[e.jsx("div",{children:e.jsx(re.FacebookShareButton,{url:f,children:e.jsx(re.FacebookIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.TwitterShareButton,{url:f,title:"Hello",children:e.jsx(re.XIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.TelegramShareButton,{url:f,title:"Hello",children:e.jsx(re.TelegramIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.WhatsappShareButton,{url:f,title:"Hello",separator:":: ",children:e.jsx(re.WhatsappIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.LinkedinShareButton,{url:f,children:e.jsx(re.LinkedinIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.PinterestShareButton,{url:"https://static.mypixia.com",media:f,children:e.jsx(re.PinterestIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.RedditShareButton,{url:f,title:"Hello",windowWidth:660,windowHeight:460,children:e.jsx(re.RedditIcon,{size:32,round:!0})})}),e.jsx("div",{children:e.jsx(re.InstapaperShareButton,{url:f,title:"Hello",children:e.jsx(re.InstapaperIcon,{size:32,round:!0})})})]})}),e.jsx("hr",{}),e.jsx("br",{}),e.jsx("button",{autoFocus:!0,type:"button",className:"apc-mpc-widget-btn",onClick:()=>b(),style:{backgroundColor:"red",color:"#ffffff",float:"right"},children:"Close"})]})};return e.jsxs(l.Fragment,{children:[e.jsxs("button",{className:"apc-mpc-widget-btn",onClick:()=>p(),role:"dialog",style:{backgroundColor:he(t.primaryColor,40),color:"#ffffff",float:"right"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:"#ffffff",d:fr})}),"  Share"]}),a()]})}function Wr(y){const{theme:t,apiKey:o,apcCanvasInstance:s,updateSelectedSections:d,updateActiveSection:f,accesories:x,getDesignFormats:p}=y,[b,a]=l.useState(!1),[v,u]=l.useState(),w=()=>{a(!0)},i=()=>{a(!1)},m=()=>({getPDF:()=>{const j=JSON.stringify(s);return pe(j,s.height,s.width,"pdf",!0).then(n=>n)},getPNG:()=>{const j=JSON.stringify(s);return pe(j,s.height,s.width,"png",!0).then(n=>n)},getSVG:()=>{const j=JSON.stringify(s);return pe(j,s.height,s.width,"svg",!0).then(n=>n)},getJPEG:()=>{const j=JSON.stringify(s);return pe(j,s.height,s.width,"jpeg",!0).then(n=>n)},getWEBP:()=>{const j=JSON.stringify(s);return pe(j,s.height,s.width,"webp",!0).then(n=>n)}}),h=()=>{if(!s)return null;const j=JSON.stringify(s);return e.jsxs(ct,{isOpen:b,onClose:i,children:[e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("h3",{style:{float:"left"},children:"Download"}),e.jsx("div",{children:e.jsx(Tt,{apcCanvasJSON:j,height:s.height,width:s.width})}),e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:5},children:[e.jsx("div",{style:{color:he(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getPDF(),children:"PDF"}),e.jsx("div",{style:{color:he(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getSVG(),children:"SVG"}),e.jsx("div",{style:{color:he(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getPNG(),children:"PNG"}),e.jsx("div",{style:{color:he(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getJPEG(),children:"JPEG"}),e.jsx("div",{style:{color:he(t.primaryColor,50),fontWeight:"bold",textDecoration:"underline",cursor:"pointer"},onClick:()=>m().getWEBP(),children:"WEBP"})]})]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("hr",{}),e.jsx("br",{}),e.jsx("button",{autoFocus:!0,type:"button",className:"apc-mpc-widget-btn",onClick:()=>i(),style:{backgroundColor:"red",color:"#ffffff",float:"right"},children:"Close"})]})};return e.jsxs(l.Fragment,{children:[e.jsxs("button",{className:"apc-mpc-widget-btn",onClick:()=>w(),role:"dialog",style:{backgroundColor:he(t.primaryColor,40),color:"#ffffff",float:"right"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",children:e.jsx("path",{fill:"#ffffff",d:xr})}),"  Download"]}),h()]})}function $r(y){var Ie;const{theme:t,activeSection:o,selectedObjectType:s,renderQuickActions:d,renderActionItems:f,canvasEl:x,zoomIn:p,zoomOut:b,apcCanvasInstance:a,setActiveSection:v,saveActiveDesign:u,reloadTabs:w,initProductName:i,historyRef:m,currentState:h,setCurrentState:j,setHistory:n,activeTabName:C,isPlainColor:B,selectedProduct:I,isMobile:_,supportedProductColors:F}=y,[E,T]=l.useState(),[V,Y]=l.useState([]),[J,se]=l.useState(0),[ne,ie]=l.useState(!1),ue=l.useRef(null),[Te,ye]=l.useState(!1),[Qe,ze]=l.useState(null),[ee,Ve]=l.useState(),[Re,Ue]=l.useState(),[Me,We]=l.useState(),[Ce,me]=l.useState(!0),[$,Le]=l.useState(),Oe=()=>{ye(!0),ie(!1)},X=()=>{ye(!1)},$e=()=>{ie(k=>!k)};l.useEffect(()=>{const k=O=>{ue.current&&ue.current.contains(O.target)||ie(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[]),l.useEffect(()=>{(async()=>{var O,G;if(E)try{const D=await Fe(E);We(D),(O=D==null?void 0:D.misc)!=null&&O.colorSettings&&Ve(D.misc.colorSettings),((G=D==null?void 0:D.misc)==null?void 0:G.type)!=="subsection"&&Le(D)}catch(D){console.error("Error fetching tab data: ",D)}})()},[E,w]),l.useEffect(()=>{(async()=>{const O=await Ne();let G=O?O.filter(D=>{var Q;return D.classification!=="cart"&&((Q=D.misc)==null?void 0:Q.type)!=="subsection"}).map(D=>D.id):[];G.length===0&&G.push("design"),J===0&&T(G[0]),Y(G)})()},[J,w]);const le=()=>{a&&(a.clear(),a.renderAll())},fe=k=>{if(!a)return;a.backgroundColor="transparent",a&&a.requestRenderAll();let O=a.backgroundImage;O&&(O.filters=[],O.filters.push(new z.fabric.Image.filters.BlendColor({color:k})),O.applyFilters(),a&&a.requestRenderAll(),Ue(k),u(a,Me))},Se=()=>{if(!(!ee||(ee==null?void 0:ee.length)<=1))return ee.map((k,O)=>e.jsxs(l.Fragment,{children:[e.jsx("div",{role:"button",className:"apc-mpx-widget-circle",style:{backgroundColor:k,cursor:"pointer",border:"solid 1px #ffffff"},onClick:()=>fe(k)})," "]},O))},ve=async(k,O)=>{var xe,je;const G=(je=(xe=a==null?void 0:a.backgroundImage)==null?void 0:xe.filters[0])==null?void 0:je.color,D=await Fe(k);if(!D)return;const Q=D!=null&&D.content?JSON.parse(D.content):null;Q&&a?(a.clear(),a.setBackgroundImage(null),a.loadFromJSON(Q,()=>{var te;a.renderAll(),v(D),((te=D==null?void 0:D.misc)==null?void 0:te.type)!=="subsection"?(localStorage.setItem("apc_x_activeTab",k),me(!0)):(me(!1),G&&fe(G)),T(k)})):console.error("Failed to load JSON content for section:",k)},Ge=()=>V.map(k=>e.jsx("button",{className:`tablinks ${E===k?"active":null}`,onClick:()=>ve(k),children:k},k)),ke=()=>{Ne().then(k=>{if(k&&k.length>0){const O=k[0],G=JSON.parse(O.content);a.loadFromJSON(G,function(){a.off("object:modified"),a.on({"object:modified":D=>{u(a,O)}}),T(O.id),localStorage.setItem("apc_x_activeTab",O.id),v(O),se(J+1),a&&a.renderAll()})}else{let O="design";const G=JSON.stringify(a);Ee(O,"general",G,null).then(D=>{Fe(O).then(Q=>{const xe=JSON.parse(Q.content);a.loadFromJSON(xe,function(){a.off("object:modified"),a.on({"object:modified":je=>{u(a,Q)}}),T(O),localStorage.setItem("apc_x_activeTab",O),v(Q),se(J+1),a&&a.renderAll()})})})}})},Ae=()=>{Sr(E).then(k=>{X(),ke()})},Je=()=>a?e.jsxs(ct,{isOpen:Te,onClose:X,children:[e.jsx("div",{children:e.jsxs("h3",{style:{marginLeft:"30%",color:"green"},children:["Are you sure you want to delete ",e.jsx("u",{children:E})," ?"]})}),e.jsx("br",{}),e.jsx("br",{}),e.jsx("hr",{}),e.jsx("br",{}),e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:10},children:[e.jsx("div",{children:e.jsx("button",{autoFocus:!0,type:"button",className:"apc-mpc-widget-btn",onClick:()=>Ae(),style:{backgroundColor:"green",color:"#ffffff"},children:"Yes"})}),e.jsx("div",{children:e.jsx("button",{autoFocus:!0,type:"button",className:"apc-mpc-widget-btn",onClick:()=>X(),style:{backgroundColor:"red",color:"#ffffff",float:"right"},children:"Close"})})]})]}):null,Ze=()=>e.jsxs("div",{className:"apc-mpx-widget-button-group-container",children:[e.jsx("div",{className:"apc-mpx-widget-generic-icon",onClick:$e,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:"#ffffff",d:pr})})}),ne&&e.jsxs("div",{className:"apc-mpx-widget-popper-container",ref:ue,children:[e.jsx("div",{className:"apc-mpx-widget-popper-arrow-up"}),e.jsxs("ul",{autoFocus:!0,style:{paddingInlineStart:"2px",marginBlockStart:"6px",marginBlockEnd:"2px",fontSize:"13px",padding:"3px",color:he(t.primaryColor,80),width:"max-content"},children:[e.jsxs("li",{className:"apc-mpx-widget-popper-li",style:{height:"25px",cursor:"pointer",borderBottom:"1px solid #d7d7d7"},onClick:()=>Oe(),role:"dialog",children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",children:e.jsx("path",{d:Nt,fill:he(t.primaryColor,80)})}),"  Delete"]}),e.jsxs("li",{className:"apc-mpx-widget-popper-li",style:{height:"25px",cursor:"pointer",marginBlockStart:"5px"},onClick:()=>le(),role:"dialog",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",className:"apc-mpx-hover-div",width:"14",viewBox:"0 0 576 512",children:e.jsx("path",{d:hr,fill:he(t.primaryColor,80)})}),"  Clear"]})]})]})]}),_e=k=>{var je,te,Ye,Be;const O=a.width*5,G=a.height*5,D=JSON.parse($.content),Q=(te=(je=D==null?void 0:D.backgroundImage)==null?void 0:je.filters[0])==null?void 0:te.color,xe=(Be=(Ye=a==null?void 0:a.backgroundImage)==null?void 0:Ye.filters[0])==null?void 0:Be.color;Fe(k.sectionName).then(async be=>{if(be){const c=be!=null&&be.content?JSON.parse(be.content):null;c&&a?(await a.loadFromJSON(c,()=>{a.renderAll(),v(be),T(k.sectionName);const A=JSON.stringify(a),M={};M.id=k.sectionName,M.classification=I==null?void 0:I.name,M.json=A,M.misc={sectionName:k.sectionName,sectionImage:k.sectionImage,type:k.type},a.off("object:modified"),a.on({"object:modified":N=>{u(a,M)}})}),fe(xe),Ce||me(!0)):console.error("Failed to load JSON content for section:",k.sectionName)}else a&&a.clear(),k.type="subsection",z.fabric.Image.fromURL(k.sectionImage,function(c){c.width=O,c.height=G,c.scaleToWidth(O),c.scaleToHeight(G),a.setBackgroundImage(c),(Re||Q)&&(c.filters=[],c.filters.push(new z.fabric.Image.filters.BlendColor({color:Re||Q})),c.applyFilters());const A=JSON.stringify(a),M={};M.id=k.sectionName,M.classification=$.id,M.json=A,M.misc={sectionName:k.sectionName,sectionImage:k.sectionImage,type:k.type},a.off("object:modified"),a.on({"object:modified":N=>{u(a,M)}}),Ee(k.sectionName,E,A,{...k}).then(N=>{a&&(a.renderAll(),Ce&&me(!1),T(k.sectionName),se(J+1))})},{crossOrigin:"anonymous"})})},et=()=>{if(!Me)return null;let k=[];if(I){const O=I.sections.map(G=>({...G,type:"subsection"}));k.push(...O),k.push({sectionName:I==null?void 0:I.name,sectionImage:I==null?void 0:I.mainImage,type:"main"})}return k=k==null?void 0:k.map(O=>({...O,active:O.sectionName===E})),(k==null?void 0:k.length)<1?null:k==null?void 0:k.map((O,G)=>{var D,Q;return e.jsxs("div",{onClick:()=>_e(O),style:{position:"relative",backgroundColor:"#ff000026",border:"solid 1px #ffffff",padding:"2px",borderRadius:"6px",cursor:"pointer",textAlign:"center"},children:[O.active&&e.jsx("div",{style:{position:"absolute",top:"5px",right:"5px",width:"12px",height:"12px",backgroundColor:"green",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx("span",{style:{color:"white",fontSize:"8px",fontWeight:"bold"},children:"✓"})}),!_&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"5px"},children:e.jsx("img",{src:O==null?void 0:O.sectionImage,width:50,height:50,alt:(O==null?void 0:O.sectionName)||"section image",style:{borderRadius:"6px"}})}),e.jsx("div",{style:{fontSize:"12px",color:"#333"},children:((D=O==null?void 0:O.sectionName)==null?void 0:D.length)>5?`${(Q=O==null?void 0:O.sectionName)==null?void 0:Q.substring(0,5)}...`:(O==null?void 0:O.sectionName)||"view"})]},G)})},tt=()=>{if(m.current.length>0){const k=m.current.pop();a.loadFromJSON(k,()=>{a.renderAll(),j(k)})}};return e.jsxs(l.Fragment,{children:[e.jsx("div",{className:"tab",children:Ge()}),e.jsxs("div",{style:{display:"flex",backgroundColor:t.primaryColor,flexDirection:"row",padding:"3px",color:"#ffffff",minHeight:"30px"},children:[e.jsx("div",{style:{flexBasis:"40%",marginTop:"8px"},children:e.jsx("div",{style:{display:"flex",flexDirection:"row"},children:e.jsxs("div",{children:[e.jsx("button",{style:{border:"none",backgroundColor:"transparent",color:"#ffffff",fontWeight:"bold",cursor:"pointer",height:"12px"},onClick:()=>tt(),title:"UNDO",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"25",className:"apc-mpx-hover-div",width:"25",viewBox:"0 0 16 16",children:e.jsx("path",{d:ur,fill:"#ffffff"})})})," "]})})}),e.jsx("div",{style:{flexBasis:"20%"},children:s?d():null}),e.jsx("div",{style:{flexBasis:"40%",marginTop:"8px"},children:s?f():null}),Ze()]}),e.jsxs("div",{id:"apc-mpx-editor-canvas-container",style:{minHeight:"90vh",padding:"3px",overflowX:"hidden",position:"relative"},children:[e.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.jsx("div",{children:e.jsx("div",{style:{zIndex:1e3,overflow:"hidden",position:"absolute",marginLeft:"1%",display:"flex",flexDirection:"row"},children:((Ie=I==null?void 0:I.sections)==null?void 0:Ie.length)>0?et():null})}),e.jsx("div",{children:e.jsx("canvas",{id:"apc-mpx-editor-canvas",ref:x,height:1e3})}),ee&&(B||(o==null?void 0:o.plainColor)==="Y")&&Ce&&(ee==null?void 0:ee.length)>1?e.jsxs("div",{style:{zIndex:1e3,overflow:"hidden",position:"absolute",marginLeft:"90%"},children:[e.jsx("br",{}),e.jsx("div",{style:{backgroundColor:"#ff000026",border:"solid 1px #ccc",padding:"3px",borderRadius:"6px"},children:ee&&(ee==null?void 0:ee.length)>1?Se():null})]}):null]}),e.jsxs("div",{style:{marginLeft:"45%"},children:[e.jsx("br",{}),e.jsx("button",{style:{height:"35px",width:"65px",cursor:"pointer"},"aria-label":"zoom in",onClick:()=>p(),children:"+"}),e.jsx("button",{style:{height:"35px",width:"65px",cursor:"pointer"},"aria-label":"zoom out",onClick:()=>b(),children:"-"})]})]}),Je()]})}function Gr({data:y,theme:t,apcCanvasInstance:o,closeMobileModalSecondaryPanel:s,isMobile:d}){const[f,x]=l.useState({}),p=u=>{x(w=>({...w,[u]:!w[u]}))},b=async u=>{const w=await At(u);w&&z.fabric.Image.fromURL(w,i=>{i.set({left:100,top:100,scaleX:.3,scaleY:.3}),o.add(i),o.renderAll(),d&&s(!0)})},a=(u,w="",i=0)=>e.jsx("ul",{style:{listStyleType:"none",paddingLeft:`${i*20}px`,margin:"0"},children:Object.keys(u).map(m=>{const h=`${w}/${m}`,j=f[h];return u[m].type==="image"?e.jsx("li",{children:e.jsx("div",{onClick:()=>b(u[m].url),style:{cursor:"pointer"},children:e.jsx("img",{src:u[m].url,alt:m,style:{width:"100px",height:"auto"}})})},h):e.jsxs("li",{children:[e.jsxs("div",{onClick:()=>p(h),style:{cursor:"pointer",display:"flex",alignItems:"center",fontWeight:"bold",color:t.primaryColorLight},children:[e.jsx("div",{style:{marginRight:"5px"},children:j?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:15,width:15,children:e.jsx("path",{d:jr,fill:t.primaryColorLight})}):e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:15,width:15,children:e.jsx("path",{d:br,fill:t.primaryColorLight})})}),m]}),j&&a(u[m],h,i+1)]},h)})}),v=Jr(y);return e.jsx("div",{children:a(v)})}function Jr(y){const t={};return y.forEach(o=>{const s=o.name.split("/");let d=t;s.forEach((f,x)=>{d[f]||(d[f]=x===s.length-1?o:{}),d=d[f]})}),t}function Yr(y){const{apcCanvasInstance:t,theme:o,apiEndpoint:s,isMobile:d,closeMobileModalSecondaryPanel:f,apiKey:x}=y,p=`${s}/api/v1/designer`,[b,a]=l.useState([]),[v,u]=l.useState(!1),[w,i]=l.useState(!1),[m,h]=l.useState(!1),j=sessionStorage.getItem("apc_x_sub_status"),n=sessionStorage.getItem("apc_x_stickers");l.useEffect(()=>{u(!0),(async()=>{j==="active"?i(!0):await B(),n?(a(JSON.parse(n)),u(!1)):await C()})()},[]);const C=()=>{u(!0);const I=`${p}/get-stickers`;ge.get(I).then(_=>{_.data.object&&(a(_.data.object.contents),sessionStorage.setItem("apc_x_stickers",JSON.stringify(_.data.object.contents)))}).catch(_=>{console.error("Error fetching data:",_)}).finally(()=>{u(!1)})},B=()=>{u(!0);const I=`${p}/get-subscription-status/${x}`;ge.get(I).then(_=>{_.data.object&&_.data.object==="active"&&(sessionStorage.setItem("apc_x_sub_status","active"),i(!0))}).catch(_=>{sessionStorage.setItem("apc_x_sub_status","")}).finally(()=>{u(!1),h(!0)})};return!w&&!v&&m?e.jsx(ot,{}):w&&b.length>0&&!v?e.jsx(l.Fragment,{children:e.jsx("div",{style:{padding:"10px"},children:e.jsx(Gr,{data:b,theme:o,apcCanvasInstance:t,isMobile:d,closeMobileModalSecondaryPanel:f})})}):e.jsx("div",{children:e.jsx(st,{})})}function Kr(y){const{theme:t=Ut,readOnly:o=!1,apiKey:s=null,handleSaveClick:d,handleCartClick:f,apiEndpoint:x,enabledModules:p=["TXT","STICKERS","SHAPES","ICONS","IMAGE","QUOTE","BACKGROUND","QRCODE","BARCODE"],actionButtons:b={share:!0,download:!0,submit:!0,addToCart:!0},initInstance:a=null,initCategory:v=null,additionalActionButton:u=null,initProductName:w,isPlainColor:i,product:m={name:"Premium Crew Neck T-Shirt",category:"Tshirts",description:"Men's crew neck t-shirts",plainColor:"Y",mainImage:"https://static.mypixia.com/prod/products/96ca4acb-c426-4619-a2c4-7acd95b78451.png",colorSettings:["#FF0000","#0000FF","#008000","#000000","#FFFFFF","#808080","#FFFF00"],sections:[{sectionName:"Sleeve-left",sectionImage:"https://static.mypixia.com/prod/products/27b8c138-af4e-4ea0-833d-88b10fbd3cf7.png"},{sectionName:"Back",sectionImage:"https://static.mypixia.com/prod/products/d4c53776-7b7d-41c5-a6b5-2bf5876cd26e.png"}]}}=y,[h,j]=l.useState(p[0]),[n,C]=l.useState(),B=l.useRef(null),[I,_]=l.useState(),[F,E]=l.useState(!1),[T,V]=l.useState(1),Y=.1,[J,se]=l.useState(1),[ne,ie]=l.useState([]),[ue,Te]=l.useState(null),[ye,Qe]=l.useState(null),[ze,ee]=l.useState(0),[Ve,Re]=l.useState(),[Ue,Me]=l.useState(null),We=l.useRef([]),[Ce,me]=l.useState(null),[$,Le]=l.useState(!1),[Oe,X]=l.useState(!1);l.useEffect(()=>{const c=()=>Le(window.innerWidth<600);return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]),l.useEffect(()=>{const c=document.getElementById("apc-mpx-editor-canvas-container"),A=document.getElementById("apc-mpx-editor-canvas-container");if(!B.current||!c||!A){console.error("Canvas element is not mounted yet!");return}const M={isDrawingMode:!1,selection:!0,selectionBorderColor:"#008000",height:A.offsetHeight,width:c.offsetWidth,enableRetinaScaling:!0};let N,ae;if(o)N=new z.fabric.StaticCanvas(B.current,M);else if(N=new z.fabric.Canvas(B.current,M),ye)ae=JSON.parse(ye),N.loadFromJSON(ae,function(){});else if(a){let R;try{R=JSON.parse(a)}catch(K){console.error("Failed to parse initInstance",K)}N&&R?N.loadFromJSON(R,function(){}):console.error("Canvas or InitInstance is not properly initialized")}else{const R=new z.fabric.Textbox("Something cool!",{width:300,left:250,top:300,fontFamily:"aclonica",fill:"#6a45d2",rotate:20});R.shadow={color:"rgba(0,0,0,0.5)",blur:10,offsetX:5,offsetY:5},N.add(R),m!=null&&m.mainImage&&z.fabric.Image.fromURL(m.mainImage,function(K){K.height=A.offsetHeight,K.width=c.offsetWidth,K.scaleToWidth(A.offsetHeight),K.scaleToHeight(c.offsetWidth),N.setBackgroundImage(K),N.setActiveObject(R),fe(R),N.renderAll(),k(N)},{crossOrigin:"anonymous"})}return N.on({"selection:updated":R=>{const K=N.getActiveObject();fe(K)},"selection:created":R=>{const K=N.getActiveObject();fe(K)},"selection:cleared":R=>{Se()},"object:modified":R=>{k(N),le(N)},"object:added":R=>{le(N)},"object:removed":R=>{le(N)},"object:created":R=>{le(N)}}),C(N),se(c.offsetWidth),()=>{C(null),N.off({"selection:updated":R=>{const K=N.getActiveObject();fe(K)},"selection:created":R=>{const K=N.getActiveObject();fe(K)},"selection:cleared":R=>{Se()},"object:modified":R=>{k(N),le(N)},"object:added":R=>{le(N)},"object:removed":R=>{le(N)},"object:created":R=>{le(N)}}),N.dispose()}},[ye]),l.useEffect(()=>($e(),document.addEventListener("keydown",c=>Ie(c)),()=>{document.removeEventListener("keydown",c=>Ie(c))}),[n]),l.useEffect(()=>{if(n){const c=document.getElementById("apc-mpx-editor-canvas-container"),A=()=>{const M=c.offsetWidth/J;n.setZoom(M)};return window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}}},[n,T]),l.useEffect(()=>{const c=()=>{if(n&&B.current){const A=n.getWidth(),M=n.getHeight(),N=window.innerWidth,ae=window.innerHeight,R=N/A,K=ae/M,rt=Math.min(R,K);n.setZoom(rt/1.4),n.renderAll()}};return $&&(c(),window.addEventListener("resize",c)),()=>window.removeEventListener("resize",c)},[n,$]);const $e=()=>{Ne().then(c=>{if(c&&c.length>0){const A=c[0].content;w===c[0].id&&Qe(A)}})},le=c=>{if(c){const A=c.toJSON();Me(M=>(We.current.push(M),A))}},fe=c=>{_(c.type)},Se=()=>{_(null)},ve=()=>{n.getActiveObject()&&n.remove(n.getActiveObject())},Ge=()=>{const c=n.getActiveObject(),A=z.fabric.util.object.clone(c);A.set({left:c.left+20,top:c.top+20}),n.add(A)},ke=c=>{Te(c)},Ae=c=>{let A=ne;A.push(c),ie(A)},Je=c=>{c==="lock"?n.getActiveObject().set({lockMovementX:!0,lockMovementY:!0}):n.getActiveObject().set({lockMovementX:!1,lockMovementY:!1})},Ze=()=>{n&&(n.getActiveObject().bringForward(),n.renderAll())},_e=()=>{n&&(n.getActiveObject().sendBackwards(),n.renderAll())},et=()=>{const c=T+Y;V(c),n.setZoom(c)},tt=()=>{const c=Math.max(T-Y,Y);V(c),n.setZoom(c)},Ie=c=>{n&&n.getActiveObject()&&n.getActiveObject().type!=="textbox"&&c.keyCode===8&&ve()},k=c=>{const A=localStorage.getItem("apc_x_activeTab");if(A)Fe(A).then(M=>{if(M){const N=JSON.stringify(c);Ee(M.id,M.classification,N,M.misc).then(ae=>{})}else{const N=JSON.stringify(c);Ee(m.name??"design","general",N,m).then(ae=>{})}});else{const M=JSON.stringify(c);Ee(m.name??"design","general",M,m).then(N=>{})}},O=(c,A)=>{const M=JSON.stringify(c);Ee(A.id,A.classification,M,A.misc).then(N=>{})},G=()=>({getPDF:()=>Ne().then(c=>{let A=[];for(let M in c)pe(c[M].content,n.height,n.width,"pdf").then(N=>{A.push(N)});return A}),getPNG:()=>Ne().then(c=>{let A=[];for(let M in c)pe(c[M].content,n.height,n.width,"png").then(N=>{A.push(N)});return A}),getSVG:()=>Ne().then(c=>{let A=[];for(let M in c)pe(c[M].content,n.height,n.width,"svg").then(N=>{A.push(N)});return A}),getJPEG:()=>Ne().then(c=>{let A=[];for(let M in c)pe(c[M].content,n.height,n.width,"jpeg").then(N=>{A.push(N)});return A}),getWEBP:()=>Ne().then(c=>{let A=[];for(let M in c)pe(c[M].content,n.height,n.width,"webp").then(N=>{A.push(N)});return A}),getImageActiveTab:()=>{const c=localStorage.getItem("apc_x_activeTab");return Fe(c).then(A=>pe(A.content,n.height,n.width,"png").then(M=>{let N={};return N.file=M,N.height=n.height,N.width=n.width,N}))}}),D=()=>e.jsxs("div",{style:{marginTop:"6px",fontWeight:"bold"},children:["Replace Image: ",e.jsx("input",{type:"file",accept:"image/*",onChange:c=>Q(c)}),e.jsx("br",{})]}),Q=(c,A)=>{{const M=n.getActiveObject(),N=c.target.files[0],ae=new FileReader;ae.onload=function(R){const K=R.target.result;M.setSrc(K,function(rt){rt.set({angle:30}),n&&n.renderAll()})},ae.readAsDataURL(N)}n&&n.renderAll()},xe=()=>{switch(h){case"ICONS":return e.jsx(_r,{apcCanvasInstance:n,theme:t,apiKey:s,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"TEMPLATES":return e.jsx(kr,{apcCanvasInstance:n,theme:t,apiKey:s,apiEndpoint:x,reloadTabs:c=>ee(c),updateActiveSection:c=>ke(c),initCategory:v,currentTabNo:ze,initInstance:a,setActiveTab:c=>me(c),isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"TXT":return e.jsx(zr,{apcCanvasInstance:n,theme:t,apiKey:s,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"IMAGE":return e.jsx(Lr,{apcCanvasInstance:n,theme:t,apiKey:s,apiEndpoint:x,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"STICKERS":return e.jsx(Yr,{apcCanvasInstance:n,theme:t,apiEndpoint:x,isMobile:$,apiKey:s,closeMobileModalSecondaryPanel:c=>X(!c)});case"SHAPES":return e.jsx(It,{apcCanvasInstance:n,theme:t,apiKey:s,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"QUOTE":return e.jsx(Br,{apcCanvasInstance:n,theme:t,apiKey:s,apiEndpoint:x,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"BACKGROUND":return e.jsx(Dr,{apcCanvasInstance:n,theme:t,apiKey:s,apiEndpoint:x,updateActiveSection:c=>ke(c),reloadTabs:c=>ee(c),currentTabNo:ze,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"QRCODE":return e.jsx(Fr,{apcCanvasInstance:n,theme:t,apiKey:s,apiEndpoint:x,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"BARCODE":return e.jsx(Pr,{apcCanvasInstance:n,theme:t,apiKey:s,apiEndpoint:x,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});case"SIZE":return e.jsx(Hr,{apcCanvasInstance:n,theme:t,apiKey:s,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)});default:return e.jsx(It,{apcCanvasInstance:n,theme:t,apiKey:s,isMobile:$,closeMobileModalSecondaryPanel:c=>X(!c)})}},je=()=>{if(!I)return null;switch(I){case"text":return e.jsx(Et,{apcCanvasInstance:n,theme:t,apiKey:s});case"textbox":return e.jsx(Et,{apcCanvasInstance:n,theme:t,apiKey:s});case"rect":return e.jsx(He,{apcCanvasInstance:n,theme:t,apiKey:s});case"circle":return e.jsx(He,{apcCanvasInstance:n,theme:t,apiKey:s});case"triangle":return e.jsx(He,{apcCanvasInstance:n,theme:t,apiKey:s});case"line":return e.jsx(He,{apcCanvasInstance:n,theme:t,apiKey:s});case"path":return e.jsx(He,{apcCanvasInstance:n,theme:t,apiKey:s});case"polygon":return e.jsx(He,{apcCanvasInstance:n,theme:t,apiKey:s});case"image":return D();default:return null}},te=c=>{j(c),$&&X(!0)},Ye=()=>e.jsx("div",{id:"selectionRectangle",style:{marginLeft:"auto",position:"relative"},children:e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:10,marginTop:"8px"},children:[e.jsxs("div",{className:"apc-mpx-tooltip-container",role:"button",onClick:()=>ve(),style:{cursor:"pointer"},children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",children:e.jsx("path",{d:Nt,fill:"#d8d4d4"})}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Delete"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",role:"button",onClick:()=>_e(),style:{cursor:"pointer"},children:[e.jsxs("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",fill:"#d8d4d4",width:"20px",height:"20px",viewBox:"0 0 32 32",children:[e.jsx("path",{d:"M28,10H22V4a2,2,0,0,0-2-2H4A2,2,0,0,0,2,4V20a2,2,0,0,0,2,2h6v6a2.0023,2.0023,0,0,0,2,2H28a2.0023,2.0023,0,0,0,2-2V12A2.0023,2.0023,0,0,0,28,10ZM12,28V12H28l.0015,16Z"}),e.jsx("rect",{style:{fill:"none"},width:"32",height:"32"})]}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Send to back"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",role:"button",onClick:()=>Ze(),style:{cursor:"pointer"},children:[e.jsxs("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",fill:"#d8d4d4",width:"20px",height:"20px",viewBox:"0 0 32 32",children:[e.jsx("path",{d:"M28,10H22V4a2.0023,2.0023,0,0,0-2-2H4A2.0023,2.0023,0,0,0,2,4V20a2.0023,2.0023,0,0,0,2,2h6v6a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V12A2,2,0,0,0,28,10ZM4,20,3.9985,4H20v6H12a2,2,0,0,0-2,2v8Z"}),e.jsx("rect",{style:{fill:"none"},height:"32",width:"32"})]}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Bring to front"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",onClick:()=>Je("lock"),style:{cursor:"pointer"},children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",children:e.jsx("path",{fill:"#d8d4d4",d:"M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"})}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Lock"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",onClick:()=>Je("unlock"),style:{cursor:"pointer"},children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"18",viewBox:"0 0 576 512",children:e.jsx("path",{fill:"#d8d4d4",d:"M423.5 0C339.5 .3 272 69.5 272 153.5V224H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48h-48v-71.1c0-39.6 31.7-72.5 71.3-72.9 40-.4 72.7 32.1 72.7 72v80c0 13.3 10.7 24 24 24h32c13.3 0 24-10.7 24-24v-80C576 68 507.5-.3 423.5 0z"})}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Unlock"})]}),e.jsxs("div",{className:"apc-mpx-tooltip-container",onClick:()=>Ge(),style:{cursor:"pointer"},children:[e.jsx("svg",{className:"apc-mpx-hover-div",xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",children:e.jsx("path",{fill:"#d8d4d4",d:"M464 0c26.5 0 48 21.5 48 48v288c0 26.5-21.5 48-48 48H176c-26.5 0-48-21.5-48-48V48c0-26.5 21.5-48 48-48h288M176 416c-44.1 0-80-35.9-80-80V128H48c-26.5 0-48 21.5-48 48v288c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48v-48H176z"})}),e.jsx("div",{className:"apc-mpx-tooltip-text",children:"Duplicate"})]})]})}),Be=()=>n?e.jsx("div",{style:{height:"10vh",overflow:"auto"},children:e.jsx(ct,{isOpen:Oe,onClose:()=>X(!1),children:xe()})}):null,be=()=>n?$?Be():xe():null;return e.jsxs("div",{className:"apc-mpc-widget-wrapper",children:[e.jsxs("div",{style:{display:"flex",backgroundColor:he(t.primaryColor,70),flexDirection:"row",padding:"3px",color:"#ffffff",minHeight:"30px"},children:[e.jsx("div",{style:{flexBasis:"40%"},children:e.jsx("div",{style:{float:"left"},children:e.jsxs("button",{onClick:()=>window.history.back(),style:{backgroundColor:"transparent",color:"#ffffff",border:"solid #ffffff 1px",padding:"4px",width:"auto",borderRadius:"4px",fontWeight:"bold"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 448 512",children:e.jsx("path",{fill:"#ffffff",d:wr})})," Back"]})})}),e.jsx("div",{style:{flexBasis:"20%"}}),e.jsx("div",{style:{flexBasis:"40%"},children:e.jsx("div",{style:{display:"flex",flexDirection:"row",gap:10},children:e.jsx("div",{children:e.jsxs("div",{style:{display:"flex",flexDirection:"row",gap:5},children:[e.jsx("div",{children:n&&b.share?e.jsx("div",{children:e.jsx(Ur,{apcCanvasInstance:n,theme:t})}):null}),e.jsx("div",{children:n&&b.download?e.jsx("div",{children:e.jsx(Wr,{apcCanvasInstance:n,theme:t,apiKey:s,updateSelectedSections:c=>Ae(c),updateActiveSection:c=>ke(c),accesories,getDesignFormats:G()})}):null}),e.jsx("div",{children:n&&u?e.jsx("div",{children:e.jsx("button",{className:"apc-mpc-widget-btn",onClick:()=>d(G()),style:{backgroundColor:u.btnColor??t.primaryColorLight,color:"#ffffff",border:"solid #ffffff 1px"},children:u.btnLabel})}):null})]})})})})]}),e.jsxs("div",{className:"apc-mpc-widget-colums",children:[e.jsx("div",{className:"apc-mpc-widget-colum-modules-container",children:e.jsxs("div",{className:"apc-mypixia-widget-primary-nav-container",children:[p.indexOf("TXT")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("TXT"),style:{padding:"10px",backgroundColor:h==="TXT"?t.primaryColorLight:"inherit",color:h==="TXT"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",style:{fill:h==="TXT"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:or})}),e.jsx("div",{children:"Text"})]}):null,p.indexOf("STICKERS")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("STICKERS"),style:{padding:"10px",backgroundColor:h==="STICKERS"?t.primaryColorLight:"inherit",color:h==="STICKERS"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"20",viewBox:"0 0 640 512",style:{fill:h==="STICKERS"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:vr})}),e.jsx("div",{children:"Stickers"})]}):null,p.indexOf("SHAPES")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("SHAPES"),style:{padding:"10px",backgroundColor:h==="SHAPES"?t.primaryColorLight:"inherit",color:h==="SHAPES"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",style:{fill:h==="SHAPES"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:nr})}),e.jsx("div",{children:"Shapes"})]}):null,p.indexOf("ICONS")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("ICONS"),style:{padding:"10px",backgroundColor:h==="ICONS"?t.primaryColorLight:"inherit",color:h==="ICONS"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",style:{fill:h==="ICONS"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:ir})}),e.jsx("div",{children:"Icons"})]}):null,p.indexOf("IMAGE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("IMAGE"),style:{padding:"10px",backgroundColor:h==="IMAGE"?t.primaryColorLight:"inherit",color:h==="IMAGE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"18",viewBox:"0 0 512 512",style:{fill:h==="IMAGE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:Ot})}),e.jsx("div",{children:"Upload"})]}):null,p.indexOf("QUOTE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("QUOTE"),style:{padding:"10px",backgroundColor:h==="QUOTE"?t.primaryColorLight:"inherit",color:h==="QUOTE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",style:{fill:h==="QUOTE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:sr})}),e.jsx("div",{children:"Quote"})]}):null,p.indexOf("BACKGROUND")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("BACKGROUND"),style:{padding:"10px",backgroundColor:h==="BACKGROUND"?t.primaryColorLight:"inherit",color:h==="BACKGROUND"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"20",viewBox:"0 0 640 512",style:{fill:h==="BACKGROUND"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:cr})}),e.jsx("div",{children:"Background"})]}):null,p.indexOf("QRCODE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("QRCODE"),style:{padding:"10px",backgroundColor:h==="QRCODE"?t.primaryColorLight:"inherit",color:h==="QRCODE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"20",viewBox:"0 0 640 512",style:{fill:h==="QRCODE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:ar})}),e.jsx("div",{children:"QR Code"})]}):null,p.indexOf("BARCODE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("BARCODE"),style:{padding:"10px",backgroundColor:h==="BARCODE"?t.primaryColorLight:"inherit",color:h==="BARCODE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"16",viewBox:"0 0 512 512",style:{fill:h==="BARCODE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:lr})}),e.jsx("div",{children:"Barcode"})]}):null,p.indexOf("SIZE")>-1?e.jsxs("div",{tabIndex:"0",role:"button",onClick:()=>te("SIZE"),style:{padding:"10px",backgroundColor:h==="SIZE"?t.primaryColorLight:"inherit",color:h==="SIZE"?"#ffffff":"inherit"},children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",style:{fill:h==="SIZE"?"#ffffff":t.primaryColor},className:"apc-mypixia-widget-primary-nav-svg",children:e.jsx("path",{d:dr})}),e.jsx("div",{children:"Size"})]}):null]})}),e.jsx("div",{className:"apc-mpc-widget-colum-features-container",children:be()}),e.jsx("div",{className:"apc-mpc-widget-colum-editor-container",children:e.jsx($r,{theme:t,activeSection:ue,selectedObjectType:I,renderQuickActions:Ye,renderActionItems:je,canvasEl:B,zoomIn:()=>et(),zoomOut:()=>tt(),apcCanvasInstance:n,setActiveSection:c=>Te(c),updateActiveDesignSection:c=>ke(c),saveActiveDesign:(c,A)=>O(c,A),reloadTabs:ze,activeTabName:Ce,supportedColors:Ve,initProductName:w,historyRef:We,currentState:Ue,setCurrentState:c=>Me(c),isPlainColor:i,selectedProduct:m,isMobile:$})})]}),e.jsx("div",{id:"apc-mpx-editor-modal-root"}),$?Be():null]})}return Kr});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mypixia/simplex-designer",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.esm.js",
6
6
  "unpkg": "dist/index.umd.js",
@@ -13,14 +13,16 @@
13
13
  "fabric": "^5.3.0",
14
14
  "jspdf": "^3.0.1",
15
15
  "qrcode": "^1.5.4",
16
+ "react": "^18.2.0",
16
17
  "react-barcode": "^1.6.1",
17
- "react-share": "^5.2.2",
18
- "react": "^18.0.0 || ^19.0.0",
19
- "react-dom": "^18.0.0 || ^19.0.0"
18
+ "react-dom": "^18.2.0",
19
+ "react-share": "^5.2.2"
20
20
  },
21
21
  "scripts": {
22
22
  "build": "vite build",
23
- "dev": "vite"
23
+ "dev": "vite",
24
+ "storybook": "storybook dev -p 6006",
25
+ "build-storybook": "storybook build"
24
26
  },
25
27
  "publishConfig": {
26
28
  "access": "public"
@@ -36,7 +38,9 @@
36
38
  ],
37
39
  "license": "see license.txt",
38
40
  "devDependencies": {
39
- "vite": "^6.3.5"
41
+ "prop-types": "^15.8.1",
42
+ "vite": "^6.3.5",
43
+ "vite-plugin-lib-inject-css": "^2.2.2"
40
44
  },
41
45
  "dependencies": {
42
46
  "@vitejs/plugin-react": "^4.4.1"
File without changes