@resulticks/trustsignal-wa-hsm 0.12.0 → 0.13.0

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("react"),Me=async(a,s={})=>{try{return await $e(a.apiKey,s)}catch(r){return console.error("API Error:",r),{status:"error",message:r instanceof Error?r.message:"Failed to fetch templates"}}},$e=async(a,s={})=>{const r=s.limit||100,t=s.offset?Math.floor(s.offset/r)+1:1,n=await fetch(`https://wpapi.trustsignal.io/api/v1/template?page=${t}&limit=${r}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const l=await n.json();if(!l.success)throw new Error(l.message||"Failed to fetch templates");return{status:"success",data:l.templates.map(p=>({id:p.id,name:p.name,category:p.category,language:p.lang,type:p.temptype||"TEXT",body:p.temp_var_data||"",status:p.status,creation_time:new Date(p.created_at).getTime(),updation_time:new Date(p.modified_at).getTime(),medialist:p.medialist,shortlink:p.shortlink})),meta:{total:l.totalrecords,page:l.page,limit:l.limit}}};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("react"),Me=async(a,s={})=>{try{return await $e(a.apiKey,s)}catch(r){return console.error("API Error:",r),{status:"error",message:r instanceof Error?r.message:"Failed to fetch templates"}}},$e=async(a,s={})=>{const r=s.limit||100,t=s.offset?Math.floor(s.offset/r)+1:1,n=await fetch(`https://wpapi.trustsignal.io/api/v1/template?page=${t}&limit=${r}`,{method:"GET",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const l=await n.json();if(!l.success)throw new Error(l.message||"Failed to fetch templates");return{status:"success",data:l.templates.map(p=>({id:p.id,name:p.name,category:p.category,language:p.lang,type:p.temptype||"TEXT",body:p.temp_var_data||"",status:p.status,creation_time:new Date(p.created_at).getTime(),updation_time:new Date(p.modified_at).getTime(),medialist:p.medialist,shortlink:p.shortlink})),meta:{total:l.totalrecords,page:l.page,limit:l.limit}}};/**
2
2
  * @license lucide-react v0.344.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const qe=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),J=(a,s)=>{const r=v.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:p="",children:f,...m},w)=>v.createElement("svg",{ref:w,...He,width:n,height:n,stroke:t,strokeWidth:i?Number(l)*24/Number(n):l,className:["lucide",`lucide-${qe(a)}`,p].join(" "),...m},[...s.map(([U,o])=>v.createElement(U,o)),...Array.isArray(f)?f:[f]]));return r.displayName=`${a}`,r};/**
11
+ */const qe=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),J=(a,s)=>{const r=j.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:l=2,absoluteStrokeWidth:i,className:p="",children:f,...m},w)=>j.createElement("svg",{ref:w,...He,width:n,height:n,stroke:t,strokeWidth:i?Number(l)*24/Number(n):l,className:["lucide",`lucide-${qe(a)}`,p].join(" "),...m},[...s.map(([U,o])=>j.createElement(U,o)),...Array.isArray(f)?f:[f]]));return r.displayName=`${a}`,r};/**
12
12
  * @license lucide-react v0.344.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
@@ -98,7 +98,7 @@
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const ne=J("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function me({isOpen:a,onClose:s,title:r,children:t}){const n=v.useRef(null);return v.useEffect(()=>{const l=i=>{n.current&&!n.current.contains(i.target)&&s()};return a&&document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[a,s]),a?e.jsx("div",{className:"rsp-fixed rsp-inset-0 rsp-bg-black rsp-bg-opacity-50 rsp-flex rsp-items-center rsp-justify-center rsp-p-4 rsp-z-50",children:e.jsxs("div",{ref:n,className:"rsp-bg-white rsp-rounded-lg rsp-shadow-xl rsp-w-full rsp-max-w-[600px] rsp-animate-modal-appear",style:{backgroundColor:"#f5f7fc"},children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-px-6 rsp-py-4 rsp-border-b",children:[e.jsx("h2",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900 rsp-text-center rsp-w-full rsp-break-words rsp-break-all rsp-whitespace-pre-wrap",children:r}),e.jsx("button",{onClick:s,className:"rsp-p-1 hover:rsp-bg-gray-100 rsp-rounded-full",children:e.jsx(ne,{className:"rsp-w-5 rsp-h-5 rsp-text-gray-500"})})]}),e.jsx("div",{className:"rsp-px-6 rsp-py-4 rsp-overflow-y-auto rsp-max-h-[70vh] rsp-break-words rsp-whitespace-pre-wrap",children:t})]})}):null}const Re=v.createContext({});function sa({apiKey:a,pConfig:s,children:r}){const t=v.useMemo(()=>({apiKey:a,resulMeta:s}),[a,s]),n=v.useRef(null);return v.useEffect(()=>{if(typeof window>"u"||a===void 0&&!s)return;let l={};try{const f=localStorage.getItem("account");f&&(l=JSON.parse(f))}catch(f){console.error("TrustSignalProvider: Failed to read account from storage",f)}const i={...l,...a!==void 0?{apiKey:a}:{},...s?{resulMeta:s}:{}},p=JSON.stringify(i);if(p!==n.current)try{localStorage.setItem("account",p),n.current=p}catch(f){console.error("TrustSignalProvider: Failed to persist account to storage",f)}},[a,s]),e.jsx(Re.Provider,{value:t,children:r})}function ra(){return v.useContext(Re)}const oe=a=>a?/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(a):!1;function na({onCreateTemplate:a,onEditTemplate:s}){const[r,t]=v.useState([]),[n,l]=v.useTransition(),[i,p]=v.useState([]),[f,m]=v.useState(!1),[w,U]=v.useState(()=>{const d=localStorage.getItem("account");return d?JSON.parse(d):{apiKey:""}}),{resulMeta:o}=ra(),[j,E]=v.useState(!1);v.useEffect(()=>{if(!o)return;(async()=>{m(!0);try{const I={"Content-Type":"application/json",reqs:`${o.token}`},W={clientId:o.clientId,departmentId:o.departmentId,userId:o.userId,senderId:0},Z=await(await fetch("https://wiz.resul.io/Communication/GetServiceProviderWA",{method:"POST",headers:I,body:JSON.stringify(W)})).json();console.log("WA Sender Details:",Z);const ee=((Z==null?void 0:Z.data)||[]).filter(ce=>String((ce==null?void 0:ce.ServiceProviderName)||"").toLowerCase().includes("trustsignal"));l(()=>{p(Array.isArray(ee)?ee:[])}),console.log("filterData",ee)}catch(I){console.error("Error fetching WA sender details:",I),l(()=>{p([])})}finally{m(!1)}})()},[o,l]);const[y,g]=v.useState(()=>{const d=localStorage.getItem("account"),I=d?JSON.parse(d).apiKey:"";return oe(I)}),[x,h]=v.useState(!1),[u,k]=v.useState(null),[A,V]=v.useState(null),[b,N]=v.useState({isOpen:!1}),M=v.useRef(null),[B,P]=v.useState(""),[G,c]=v.useState("all"),[C,L]=v.useState("all"),[S,R]=v.useState("all"),[D,_]=v.useState(1),$=20;v.useEffect(()=>{_(1)},[B,G,C,S]);const[X,se]=v.useState({isOpen:!1});v.useEffect(()=>{(async()=>{var W;const I=w.apiKey;if(!oe(I)){M.current&&I!==M.current&&(l(()=>{t([])}),M.current=null),g(!1),h(!1);return}h(!0),k(null);try{const F=await Me(w,{limit:1});if((F==null?void 0:F.status)==="error")throw new Error(F.message||"Template list error");const Z=(W=F==null?void 0:F.meta)==null?void 0:W.total;if(!Z||Z===0){l(()=>{t([])}),M.current=I,g(!1),h(!1);return}const ee=await Me(w,{limit:Z});if((ee==null?void 0:ee.status)==="error")throw new Error(ee.message||"Template list error");l(()=>{t(Array.isArray(ee.data)?ee.data:[])}),M.current=I,g(!1)}catch(F){k(F instanceof Error?F.message:"Failed to fetch templates"),M.current||l(()=>{t([])}),M.current=null,g(!1)}finally{h(!1)}})()},[w,l]);const T=d=>{const I=d.target.value,W={...w,apiKey:I};l(()=>{U(W)}),localStorage.setItem("account",JSON.stringify(W))},ae=(d,I)=>{se({isOpen:!0,url:d,templateName:I}),E(!0)},O=()=>{se({isOpen:!1}),E(!1)},xe=async d=>{try{const I=localStorage.getItem("account"),W=I?JSON.parse(I):{apiKey:""};if(!W.apiKey){k("Please enter your TrustSignal API key");return}V(String(d));const{deleteTemplateById:F}=await Promise.resolve().then(()=>require("./delete-CZKt5rSC.cjs")),Z=await F(W.apiKey,d);if(!Z.success)throw new Error(Z.message||"Delete failed");t(ee=>ee.filter(ce=>String(ce.id)!==String(d))),N({isOpen:!1})}catch(I){k(I instanceof Error?I.message:"Failed to delete template")}finally{V(null)}},H=r.filter(d=>{const I=B.trim(),W=I.toLowerCase(),F=d.id!=null?String(d.id):"",Z=d.name?String(d.name).toLowerCase():"",ee=I===""||F.includes(I)||Z.includes(W),ce=G==="all"||String(d.status||"").toLowerCase()===G.toLowerCase(),_e=C==="all"||String(d.category||"").toLowerCase()===C.toLowerCase(),Fe=S==="all"||String(d.language||"").toLowerCase()===S.toLowerCase();return ee&&ce&&_e&&Fe}),ie=Array.from(new Set(r.map(d=>d.language).filter(Boolean))).sort(),re=Array.from(new Set(r.map(d=>d.category).filter(Boolean))).sort(),Y=Array.from(new Set(r.map(d=>d.status).filter(Boolean))).sort(),z=Math.max(1,Math.ceil(H.length/$)),Q=(D-1)*$,K=Q+$,q=H.slice(Q,K);return e.jsxs("div",{className:"rsp-container rsp-mx-auto rsp-px-4 rsp-py-1 rsp-bg-[#f5f7fc] rsp-rounded-lg rsp-shadow-sm",children:[e.jsx("div",{className:"rsp-flex rsp-justify-end rsp-items-center"}),e.jsx("div",{className:" rsp-p-4 rsp-pl-0 rsp-rounded-lg rsp-shadow-sm rsp-mb-6",children:e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-1",children:"TrustSignal Account"}),e.jsxs("div",{className:"rsp-flex rsp-items-end rsp-gap-2",children:[e.jsx("div",{className:"rsp-relative rsp-flex-1",children:e.jsxs("div",{className:"rsp-relative",children:[(x||f)&&e.jsx("div",{className:"rsp-absolute rsp-right-2 rsp-top-1/2 -rsp-translate-y-1/2 rsp-z-10",children:e.jsx(fe,{className:"rsp-w-4 rsp-h-4 rsp-text-blue-600 rsp-animate-spin"})}),e.jsxs("select",{name:"trustsignalAccount",value:w.apiKey,onChange:T,disabled:x||f,className:"rsp-w-full rsp-h-[50px] rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent disabled:rsp-opacity-70 disabled:rsp-cursor-wait rsp-transition-all",children:[e.jsx("option",{value:"",children:f?"Loading senders...":"Select TrustSignal sender"}),i.map(d=>{const I=d.SenderID??d.UserName??"trustsignal-sender",W=d.SenderName??d.ServiceProviderName??"TrustSignal Sender",F=d.UserName??"";return oe(F)?e.jsx("option",{value:F,children:W},I):null})]})]})}),e.jsx("div",{className:"rsp-p-2",children:e.jsx("button",{onClick:()=>a==null?void 0:a(),className:"rsp-bg-blue-600 rsp-text-white rsp-p-1 rsp-rounded-full hover:rsp-bg-blue-700 rsp-flex rsp-items-center rsp-gap-2",children:e.jsx(je,{className:"rsp-w-6 rsp-h-6"})})})]})]})}),u&&e.jsx("div",{className:"rsp-bg-red-50 rsp-border-l-4 rsp-border-red-500 rsp-p-4 rsp-mb-6",children:e.jsxs("div",{className:"rsp-flex",children:[e.jsx("div",{className:"rsp-flex-shrink-0",children:e.jsx(ve,{className:"rsp-h-5 rsp-w-5 rsp-text-red-400"})}),e.jsx("div",{className:"rsp-ml-3",children:e.jsx("p",{className:"rsp-text-sm rsp-text-red-700",children:u})})]})}),e.jsx("div",{className:"rsp-mb-6",children:e.jsx("div",{className:"rsp-relative",children:e.jsx("input",{type:"text",placeholder:"Search by name or ID...",value:B,onChange:d=>P(d.target.value),className:"rsp-w-full rsp-px-0 rsp-py-3 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent"})})}),e.jsxs("div",{className:"rsp-bg-white rsp-rounded-lg rsp-shadow-sm rsp-border rsp-border-gray-200 rsp-overflow-hidden rsp-relative",children:[(x||n)&&e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-white/60 rsp-backdrop-blur-sm rsp-z-10 rsp-flex rsp-items-center rsp-justify-center rsp-transition-opacity",children:e.jsxs("div",{className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-2",children:[e.jsx(fe,{className:"rsp-w-6 rsp-h-6 rsp-text-blue-600 rsp-animate-spin"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:"Loading templates..."})]})}),e.jsx("div",{className:"rsp-overflow-x-auto",children:e.jsxs("table",{className:`rsp-min-w-full rsp-transition-opacity ${n?"rsp-opacity-70":"rsp-opacity-100"}`,children:[e.jsx("thead",{children:e.jsxs("tr",{className:"rsp-bg-blue-600 rsp-text-white",children:[e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"ID"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Name"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-gap-2",children:[e.jsx("span",{children:"Category"}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-center rsp-min-w-[120px]",children:[e.jsxs("select",{value:C,onChange:d=>L(d.target.value),className:"rsp-pr-7 rsp-pl-2 rsp-py-1 rsp-border rsp-border-white rsp-border-opacity-30 rsp-rounded-md rsp-text-sm rsp-bg-blue-400 rsp-bg-opacity-30 rsp-appearance-none rsp-h-auto rsp-leading-normal focus:rsp-outline-none focus:rsp-border-opacity-60 focus:rsp-bg-opacity-50 rsp-cursor-pointer rsp-text-white hover:rsp-bg-opacity-40 hover:rsp-border-opacity-50 rsp-transition-all",onClick:d=>d.stopPropagation(),children:[e.jsx("option",{value:"all",className:"rsp-text-gray-900 rsp-bg-white",children:"All"}),re.map(d=>e.jsx("option",{value:d.toLowerCase(),className:"rsp-text-gray-900 rsp-bg-white",children:d.charAt(0).toUpperCase()+d.slice(1)},d))]}),e.jsx(pe,{className:"rsp-absolute rsp-right-1.5 rsp-w-4 rsp-h-4 rsp-text-white rsp-pointer-events-none"})]})]})}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-gap-2",children:[e.jsx("span",{children:"Language"}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-center rsp-min-w-[120px]",children:[e.jsxs("select",{value:S,onChange:d=>R(d.target.value),className:"rsp-pr-7 rsp-pl-2 rsp-py-1 rsp-border rsp-border-white rsp-border-opacity-30 rsp-rounded-md rsp-text-sm rsp-bg-blue-400 rsp-bg-opacity-30 rsp-appearance-none rsp-h-auto rsp-leading-normal focus:rsp-outline-none focus:rsp-border-opacity-60 focus:rsp-bg-opacity-50 rsp-cursor-pointer rsp-text-white hover:rsp-bg-opacity-40 hover:rsp-border-opacity-50 rsp-transition-all",onClick:d=>d.stopPropagation(),children:[e.jsx("option",{value:"all",className:"rsp-text-gray-900 rsp-bg-white",children:"All"}),ie.map(d=>e.jsx("option",{value:d,className:"rsp-text-gray-900 rsp-bg-white",children:String(d).toUpperCase()},d))]}),e.jsx(pe,{className:"rsp-absolute rsp-right-1.5 rsp-w-4 rsp-h-4 rsp-text-white rsp-pointer-events-none"})]})]})}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Type"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-gap-2",children:[e.jsx("span",{children:"Status"}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-center rsp-min-w-[120px]",children:[e.jsxs("select",{value:G,onChange:d=>c(d.target.value),className:"rsp-pr-7 rsp-pl-2 rsp-py-1 rsp-border rsp-border-white rsp-border-opacity-30 rsp-rounded-md rsp-text-sm rsp-bg-blue-400 rsp-bg-opacity-30 rsp-appearance-none rsp-h-auto rsp-leading-normal focus:rsp-outline-none focus:rsp-border-opacity-60 focus:rsp-bg-opacity-50 rsp-cursor-pointer rsp-text-white hover:rsp-bg-opacity-40 hover:rsp-border-opacity-50 rsp-transition-all",onClick:d=>d.stopPropagation(),children:[e.jsx("option",{value:"all",className:"rsp-text-gray-900 rsp-bg-white",children:"All"}),Y.map(d=>e.jsx("option",{value:d.toLowerCase(),className:"rsp-text-gray-900 rsp-bg-white",children:d.charAt(0).toUpperCase()+d.slice(1)},d))]}),e.jsx(pe,{className:"rsp-absolute rsp-right-1.5 rsp-w-4 rsp-h-4 rsp-text-white rsp-pointer-events-none"})]})]})}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Created"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Updated"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Media"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Actions"})]})}),e.jsx("tbody",{children:y&&q.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:9,className:"rsp-px-6 rsp-py-12 rsp-text-center",children:e.jsxs("div",{className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-3",children:[e.jsx(fe,{className:"rsp-w-8 rsp-h-8 rsp-text-blue-600 rsp-animate-spin"}),e.jsx("span",{className:"rsp-text-gray-600",children:"Loading templates..."})]})})}):q.length>0?q.map((d,I)=>{const W=String(d.status||"").toLowerCase();return e.jsxs("tr",{className:`rsp-border-b rsp-border-gray-200 ${I%2===0?"rsp-bg-white":"rsp-bg-blue-50"} hover:rsp-bg-blue-100 rsp-transition-colors`,children:[e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-900",children:d.id??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-900 rsp-font-medium",children:d.name??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700 rsp-capitalize",children:d.category??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.language??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.type??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4",children:e.jsx("span",{className:`rsp-inline-flex rsp-px-3 rsp-py-1 rsp-rounded-full rsp-text-xs rsp-font-medium
102
- ${W==="approved"?"rsp-bg-green-100 rsp-text-green-800":W==="rejected"?"rsp-bg-red-100 rsp-text-red-800":"rsp-bg-yellow-100 rsp-text-yellow-800"}`,children:d.status??"Unknown"})}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.creation_time?new Date(d.creation_time).toLocaleDateString():"N/A"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.updation_time?new Date(d.updation_time).toLocaleDateString():"N/A"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.medialist&&typeof d.medialist=="object"&&"header"in d.medialist&&d.medialist.header?e.jsxs("button",{onClick:()=>ae(String(d.medialist.header||""),d.name||""),className:"rsp-inline-flex rsp-items-center rsp-px-3 rsp-py-1 rsp-rounded rsp-text-xs rsp-font-medium rsp-bg-blue-100 rsp-text-blue-800 hover:rsp-bg-blue-200 rsp-transition-colors",children:[e.jsxs("svg",{className:"rsp-w-3 rsp-h-3 rsp-mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),e.jsx("span",{children:"View Media"})]}):e.jsx("span",{className:"rsp-inline-flex rsp-px-2 rsp-py-1 rsp-rounded-full rsp-text-xs rsp-font-medium rsp-bg-gray-100 rsp-text-gray-800",children:"No Media"})}),e.jsx("td",{className:"rsp-px-6 rsp-py-4",children:e.jsxs("div",{className:"rsp-flex rsp-gap-2",children:[e.jsx("button",{onClick:()=>s==null?void 0:s(String(d.id)),className:"rsp-inline-flex rsp-items-center rsp-justify-center rsp-w-8 rsp-h-8 rsp-rounded rsp-bg-blue-600 rsp-text-white hover:rsp-bg-blue-700 rsp-transition-colors",title:"Update",children:e.jsx(Ye,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("button",{onClick:()=>N({isOpen:!0,templateId:String(d.id),templateName:d.name}),disabled:A===String(d.id),className:`rsp-inline-flex rsp-items-center rsp-justify-center rsp-w-8 rsp-h-8 rsp-rounded rsp-text-white rsp-transition-colors ${A===String(d.id)?"rsp-bg-red-400":"rsp-bg-red-600 hover:rsp-bg-red-700"}`,title:A===String(d.id)?"Deleting...":"Delete",children:e.jsx(Ze,{className:"rsp-w-4 rsp-h-4"})})]})})]},String(d.id)||I)}):y?null:e.jsx("tr",{children:e.jsx("td",{colSpan:9,className:"rsp-px-6 rsp-py-8 rsp-text-center rsp-text-gray-500",children:oe(w.apiKey)?"No templates found":"Please select a TrustSignal account"})})})]})})]}),q.length>0&&e.jsxs("div",{className:"rsp-flex rsp-justify-between rsp-items-center rsp-mt-6 rsp-px-6 rsp-py-4 rsp-bg-white rsp-rounded-lg rsp-shadow-sm rsp-border rsp-border-gray-200",children:[e.jsxs("div",{className:"rsp-text-sm rsp-text-gray-700",children:["Showing ",e.jsx("span",{className:"rsp-font-medium",children:Q+1})," to ",e.jsx("span",{className:"rsp-font-medium",children:Math.min(K,H.length)})," of ",e.jsx("span",{className:"rsp-font-medium",children:H.length})," results"]}),e.jsxs("div",{className:"rsp-flex rsp-gap-2",children:[e.jsx("button",{onClick:()=>_(d=>Math.max(d-1,1)),disabled:D===1,className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-bg-white rsp-border rsp-border-gray-300 rsp-rounded-md hover:rsp-bg-gray-50 disabled:rsp-opacity-50 disabled:rsp-cursor-not-allowed rsp-transition-colors",children:"Previous"}),e.jsxs("span",{className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-gray-700",children:["Page ",D," of ",z]}),e.jsx("button",{onClick:()=>_(d=>Math.min(d+1,z)),disabled:D===z,className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-bg-white rsp-border rsp-border-gray-300 rsp-rounded-md hover:rsp-bg-gray-50 disabled:rsp-opacity-50 disabled:rsp-cursor-not-allowed rsp-transition-colors",children:"Next"})]})]}),e.jsx(me,{isOpen:X.isOpen,onClose:O,title:`Media - ${X.templateName||"Template"}`,children:e.jsxs("div",{className:"rsp-space-y-4",children:[X.url&&e.jsxs("div",{className:"rsp-text-center",children:[e.jsxs("div",{className:"rsp-relative rsp-bg-gray-50 rsp-rounded-lg rsp-p-4 rsp-min-h-[200px] rsp-flex rsp-items-center rsp-justify-center",children:[e.jsx("img",{src:X.url,alt:"Template media",className:"rsp-max-w-full rsp-max-h-[400px] rsp-mx-auto rsp-rounded-lg rsp-shadow-md rsp-object-contain",onLoad:()=>{E(!1)},onError:()=>{E(!1)}}),j&&e.jsx("div",{className:"loading-placeholder rsp-absolute rsp-inset-0 rsp-flex rsp-items-center rsp-justify-center",children:e.jsx("div",{className:"rsp-text-gray-500 rsp-text-sm",children:"Loading media..."})}),!j&&e.jsxs("div",{className:"error-placeholder rsp-absolute rsp-inset-0 rsp-flex rsp-flex-col rsp-items-center rsp-justify-center",style:{display:"none"},children:[e.jsx("svg",{className:"rsp-w-[100%] rsp-h-12 rsp-text-gray-400 rsp-m-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e.jsx("p",{className:"rsp-text-gray-500 rsp-text-sm rsp-mb-2",children:"Load media on new tab"})]})]}),e.jsxs("div",{className:"rsp-mt-4 rsp-p-3 rsp-bg-gray-50 rsp-rounded-lg",children:[e.jsx("p",{className:"rsp-text-xs rsp-text-gray-600 rsp-mb-1",children:"Media URL:"}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-800 rsp-break-all rsp-font-mono",children:X.url})]})]}),e.jsx("div",{className:"rsp-flex rsp-justify-end rsp-pt-4",children:e.jsxs("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:"rsp-inline-flex rsp-items-center rsp-px-4 rsp-py-2 rsp-bg-blue-600 rsp-text-white rsp-text-sm rsp-font-medium rsp-rounded-md hover:rsp-bg-blue-700 rsp-transition-colors",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),"Open in New Tab"]})})]})}),e.jsx(me,{isOpen:b.isOpen,onClose:()=>N({isOpen:!1}),title:"Delete Template",children:e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsxs("p",{className:"rsp-text-sm rsp-text-gray-700",children:["Are you sure you want to delete the template ",e.jsx("span",{className:"rsp-font-medium",children:b.templateName}),"?"]}),e.jsxs("div",{className:"rsp-flex rsp-justify-end rsp-gap-3",children:[e.jsx("button",{onClick:()=>N({isOpen:!1}),className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-bg-white rsp-border rsp-border-gray-300 rsp-rounded-md hover:rsp-bg-gray-50",children:"Cancel"}),e.jsx("button",{onClick:()=>b.templateId&&xe(b.templateId),className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-white rsp-bg-red-600 rsp-rounded-md hover:rsp-bg-red-700",children:"Delete"})]})]})})]})}const ta=async(a,s)=>{var r,t,n,l,i,p,f;try{console.log("Creating template with data:",s);const m=s.language,w=s.headerType==="MEDIA"&&s.mediaType==="DOCUMENT",U=s.type==="CAROUSEL";let o="";w?o=Be(s,m):U?o=Oe(s,m):o=Pe(s,m),console.log("Raw JSON string being sent:",o);const j={method:"POST",headers:{"Content-Type":"application/json"},body:o,redirect:"follow"};console.log("Making request to:",`https://wpapi.trustsignal.io/api/v1/template?api_key=${a}`),console.log("Request options:",j);const E=await fetch(`https://wpapi.trustsignal.io/api/v1/template?api_key=${a}`,j);console.log("Response status:",E.status),console.log("Response headers:",Object.fromEntries(E.headers.entries()));const y=await E.text();console.log("Raw response:",y);let g;try{g=JSON.parse(y)}catch(x){throw new Error(`Invalid JSON response from TrustSignal API: ${x instanceof Error?x.message:"Unknown error"}`)}if(console.log("Parsed response:",g),!g.success)throw new Error(g.message||"Template creation failed");return{status:"success",message:"Template created successfully",data:{template:g.template,details:[{template_name:((r=g.template)==null?void 0:r.name)||s.name,template_id:((t=g.template)==null?void 0:t.id)||"unknown",meta_tid:(n=g.template)==null?void 0:n.meta_tid,status:(l=g.template)==null?void 0:l.status,quality:(i=g.template)==null?void 0:i.quality,temp_route:(p=g.template)==null?void 0:p.temp_route,temptype:(f=g.template)==null?void 0:f.temptype}]}}}catch(m){return console.error("TrustSignal API Error:",m),{status:"error",message:m instanceof Error?m.message:"Failed to create template"}}};function ia(a){const s=a.language,r=a.headerType==="MEDIA"&&a.mediaType==="DOCUMENT",t=a.type==="CAROUSEL";return r?Be(a,s):t?Oe(a,s):Pe(a,s)}const Be=(a,s)=>{var l,i;const r={name:a.name,lang:s,category:a.category,components:[]};a.headerType==="MEDIA"&&a.mediaUrl&&(r.media={header:a.mediaUrl},r.components.push({type:"HEADER",format:"DOCUMENT"}));const t=le(a.body),n={type:"BODY",text:a.body};if(t.length>0&&((l=a.sampleContent)!=null&&l.bodyVariables)){const p=Ce(a,t);n.example={body_text:[p]}}if(r.components.push(n),(i=a.footer)!=null&&i.trim()&&r.components.push({type:"FOOTER",text:a.footer}),a.buttons&&a.buttons.length>0){const p=a.buttons.map(f=>{var w;const m={type:f.type==="CALL"?"PHONE_NUMBER":f.type,text:f.text};if(f.type==="URL"&&f.value&&(m.url=f.value,f.urlType==="dynamic"&&f.value.includes("{{"))){const U=le(f.value);if(U.length>0&&((w=a.sampleContent)!=null&&w.buttonVariables)){const o=U.map(({number:j})=>{var E,y;return((y=(E=a.sampleContent)==null?void 0:E.buttonVariables)==null?void 0:y[j])||`sample${j}`});m.example=o}}return(f.type==="CALL"||f.type==="PHONE_NUMBER")&&f.value&&(m.phone_number=Ne(f.value)),m});r.components.push({type:"BUTTONS",buttons:p})}return JSON.stringify(r)},Oe=(a,s)=>{var i,p,f;const r={name:a.name,lang:s,category:a.category,shortlink:a.enableClickTracking?"1":"0",components:[]};(i=a.carousel)!=null&&i.cards.length&&(r.media={},a.carousel.cards.forEach((m,w)=>{m.mediaUrl&&(r.media[`card${w}header`]=m.mediaUrl)}));const t=[],n=le(a.body),l={type:"BODY",text:a.body,...n.length>0&&((p=a.sampleContent)==null?void 0:p.bodyVariables)&&{example:{body_text:[Ce(a,n)]}}};if(t.push(l),(f=a.carousel)!=null&&f.cards.length){const m={type:"CAROUSEL",cards:a.carousel.cards.map(w=>{var U;return{components:[{type:"HEADER",format:((U=a.carousel)==null?void 0:U.type)||"IMAGE"},{type:"BODY",text:w.body,...le(w.body).length>0&&{example:{body_text:[la(w)]}}},...w.buttons.length>0?[{type:"BUTTONS",buttons:w.buttons.map(o=>{var E;const j={type:o.type==="CALL"?"PHONE_NUMBER":o.type,text:o.text};if(o.type==="URL"&&o.value&&(j.url=o.value,o.urlType==="dynamic"&&o.value.includes("{{"))){const y=le(o.value);if(y.length>0){const g=((E=w==null?void 0:w.sampleContent)==null?void 0:E.buttonVariables)||{},x=y.map(({number:h})=>g[h]||`sample${h}`);j.example=x}}return(o.type==="CALL"||o.type==="PHONE_NUMBER")&&o.value&&(j.phone_number=Ne(o.value)),console.log("Carousel card button data:",j),j})}]:[]]}})};t.push(m)}return r.components=t,JSON.stringify(r)},la=a=>{var t;const s=le(a.body||""),r=((t=a==null?void 0:a.sampleContent)==null?void 0:t.bodyVariables)||{};return s.map(({number:n})=>r[n]||`Sample ${n}`)},Pe=(a,s)=>{var i,p;const r={name:a.name,lang:s,category:a.category,shortlink:a.enableClickTracking?"1":"0",components:[]};a.headerType==="MEDIA"&&a.mediaUrl&&a.mediaType!=="DOCUMENT"&&(r.media={header:a.mediaUrl});const t=[];if(a.type!=="CAROUSEL"){if(a.headerType==="TEXT"&&a.headerText){const f=le(a.headerText),m={type:"HEADER",format:"TEXT",text:a.headerText,...f.length>0&&((i=a.sampleContent)==null?void 0:i.headerVariables)&&{example:{header_text:xa(a,f)}}};t.push(m)}else if(a.headerType==="MEDIA"){const f={type:"HEADER",format:a.mediaType||"IMAGE"};t.push(f)}}const n=le(a.body),l={type:"BODY",text:a.body,...n.length>0&&((p=a.sampleContent)==null?void 0:p.bodyVariables)&&{example:{body_text:[Ce(a,n)]}}};if(t.push(l),a.footer&&a.type!=="CAROUSEL"&&t.push({type:"FOOTER",text:a.footer}),a.buttons.length>0){const f=a.buttons.map(m=>{var U;const w={type:m.type==="CALL"?"PHONE_NUMBER":m.type,text:m.text};if(m.type==="URL"&&m.value&&(w.url=m.value,m.urlType==="dynamic"&&m.value.includes("{{"))){const o=le(m.value);if(o.length>0&&((U=a.sampleContent)!=null&&U.buttonVariables)){const j=o.map(({number:E})=>{var y,g;return((g=(y=a.sampleContent)==null?void 0:y.buttonVariables)==null?void 0:g[E])||`sample${E}`});w.example=j}}return(m.type==="CALL"||m.type==="PHONE_NUMBER")&&m.value&&(w.phone_number=Ne(m.value)),w});t.push({type:"BUTTONS",buttons:f})}return r.components=t,JSON.stringify(r)},le=a=>(a.match(/\{\{(\d+)\}\}/g)||[]).map(r=>({variable:r.replace(/[{}]/g,""),number:r.replace(/[{}]/g,"")})),Ne=a=>a.startsWith("+")?a:`+${a}`,xa=(a,s)=>s.map(({number:r})=>{var t,n;return((n=(t=a.sampleContent)==null?void 0:t.headerVariables)==null?void 0:n[r])||`Sample ${r}`}),Ce=(a,s)=>s.map(({number:r})=>{var t,n;return((n=(t=a.sampleContent)==null?void 0:t.bodyVariables)==null?void 0:n[r])||`Sample ${r}`}),ca="https://wiz.resul.io",da="/communication/SaveWATemplate_new",Le={departmentId:1,clientId:3850,createdBy:7874,userId:7874,serviceproviderId:3,senderId:31},oa=async(a,s)=>{const r=a.type==="CAROUSEL"?va(a):wa(a),n={waTemplateId:typeof(s==null?void 0:s.waTemplateId)=="number"?s.waTemplateId:r.templateType,...pa(s),templateData:r},l=await fetch(fa(s),{method:"POST",headers:{"Content-Type":"application/json",...s!=null&&s.token?{Reqs:s.token}:{}},body:JSON.stringify(n)});if(!l.ok){const i=await ma(l);throw new Error(`SaveWATemplate_new failed with status ${l.status}: ${i}`)}},ma=async a=>{try{return await a.text()}catch{return"Unable to read response body"}},pa=a=>{if(!a)return{...Le};const{departmentId:s,clientId:r,createdBy:t,userId:n,serviceproviderId:l,senderId:i}=a;return{...Le,...typeof s=="number"?{departmentId:s}:{},...typeof r=="number"?{clientId:r}:{},...typeof t=="number"?{createdBy:t}:{},...typeof n=="number"?{userId:n}:{},...typeof l=="number"?{serviceproviderId:l}:{},...typeof i=="number"?{senderId:i}:{}}},fa=a=>{var r;return`${((r=a==null?void 0:a.baseUrl)==null?void 0:r.replace(/\/+$/,""))||ca}${da}`},De=a=>a.headerType==="TEXT"?a.headerText.trim().length>0:a.headerType==="MEDIA"?!!a.mediaUrl:!1,ha=a=>!!(te(a.body).length>0||a.headerType==="TEXT"&&te(a.headerText).length>0||a.footer&&te(a.footer).length>0),ua=a=>a.buttons.some(s=>s.type==="URL"&&s.urlType==="dynamic"&&s.value),ze=a=>{if(a.type==="CAROUSEL")return 11;const s=ha(a);if(ua(a))return s?9:10;if(a.headerType==="MEDIA")switch(a.mediaType){case"IMAGE":return s?2:6;case"DOCUMENT":return s?3:7;case"VIDEO":return s?4:8;default:return s?1:5}return s?1:5},ba=a=>De(a)?a.headerType==="TEXT"?"text":a.mediaType==="DOCUMENT"?"pdf":a.mediaType==="VIDEO"?"video":"image":"",ga=a=>a.headerType==="TEXT"?a.headerText||"":a.headerType==="MEDIA"&&a.mediaUrl||"",te=a=>a?(a.match(/\{\{?(\d+)\}\}?/g)||[]).map(r=>r.replace(/[{}]/g,"")):[],Te=(a,s)=>{const r=a.value||a.dynamicUrl||"",t=a.type==="URL"&&a.urlType==="dynamic",n=t?te(r):[];return{actionIndex:s,isNameEditable:!1,actionNameParam:[],actionName:a.text,actionType:ya(a),isValueEditable:t,actionValueParam:n,value:r,...a.type==="URL"&&{urlType:a.urlType==="dynamic"?"dynamic":"static"}}},ya=a=>{switch(a.type){case"URL":return"url";case"CALL":case"PHONE_NUMBER":return"call phone number";case"QUICK_REPLY":return"quick reply";case"FLOW":return"flow";default:return"unknown"}},wa=a=>{const s=te(a.body),r=a.headerType==="TEXT"?te(a.headerText):[],t=a.footer||"",n=t.trim().length>0,l=n?te(t):[],i=n&&l.length>0,p=De(a),f=a.mediaType?a.mediaType.toLowerCase():"",m=a.mediaUrl||"";return{templateName:a.name,templateType:ze(a),templateContent:a.body,bodyTags:s,languageId:a.language||"en",isUnicode:!0,isBodyEditable:s.length>0,bodyMaxLength:1024,isAction:a.buttons.length>0,actions:a.buttons.map(Te),isCarousel:!1,carousel:[],isHeader:p,isHeaderEditable:a.headerType==="TEXT"&&r.length>0,isHeaderType:ba(a),header:ga(a),headerTags:r,headerMaxLength:60,isFooter:n,isFooterEditable:i,footer:n?t:"",footerTags:l,footerMaxLength:60,isMedia:a.headerType==="MEDIA"&&!!m,isMediaEditable:!1,isMediaTypeEditable:!1,mediaType:f,mediaURL:m,mediaURLTags:[],mediaSizeInMB:10,mediaUrlMaxLength:1040}},va=a=>{var p;const s=te(a.body),r=a.footer||"",t=r.trim().length>0,n=t?te(r):[],l=((p=a.carousel)==null?void 0:p.cards)||[],i=ka(a);return{templateName:a.name,templateType:ze(a),templateContent:a.body,bodyTags:s,languageId:a.language||"en",isUnicode:!0,isBodyEditable:s.length>0,bodyMaxLength:1024,isAction:a.buttons.length>0,actions:a.buttons.map(Te),isCarousel:!0,carousel:l.map((f,m)=>ja(f,m,i)),isHeader:!1,isHeaderEditable:!1,isHeaderType:"",header:"",headerTags:[],headerMaxLength:60,isFooter:t,isFooterEditable:t&&n.length>0,footer:t?r:"",footerTags:n,footerMaxLength:60,isMedia:!1,isMediaEditable:!1,isMediaTypeEditable:!0,mediaType:"",mediaURL:"",mediaURLTags:[],mediaSizeInMB:10,mediaUrlMaxLength:1040}},ja=(a,s,r)=>{const t=te(a.body),n=r.toLowerCase(),l=a.mediaUrl||"";return{cardIndex:s,isUnicode:!0,bodyMaxLength:1024,cardBody:a.body,bodyTags:t,isCardBodyEditable:t.length>0,isMediaTypeEditable:!1,mediaType:n,mediaValue:l,actions:a.buttons.map(Te)}},ka=a=>{var n,l;const s=(n=a.carousel)==null?void 0:n.type;return s==="VIDEO"?"VIDEO":s==="IMAGE"?"IMAGE":(((l=a.carousel)==null?void 0:l.cards)||[]).some(i=>(i.mediaType||"").toUpperCase()==="VIDEO"?!0:i.mediaUrl?!!i.mediaUrl.toLowerCase().match(/\.(mp4|mov|m4v|avi|wmv|flv)(\?|$)/):!1)?"VIDEO":"IMAGE"},Na=async(a,s)=>{try{if(!s.name||!s.body)throw new Error("Missing required template fields: name and body are required");if(s.type==="CAROUSEL"&&(!s.carousel||!s.carousel.cards||s.carousel.cards.length===0))throw new Error("Carousel templates must have at least one card");if(!a.apiKey)throw new Error("Missing TrustSignal API key");const r=await ta(a.apiKey,s);if(r.status==="error")return r;try{await oa(s,a.resulMeta)}catch(t){console.error("Resul template submission failed (non-critical):",t)}return r}catch(r){return console.error("API Error:",r),{status:"error",message:r instanceof Error?r.message:"An unexpected error occurred while creating the template"}}};async function Ca(a,s,r){const t=ia(r),l={method:"POST",headers:{"Content-Type":"application/json"},body:t,redirect:"follow"},i=`https://wpapi.trustsignal.io/v1/user-templates/update/${encodeURIComponent(s)}?api_key=${encodeURIComponent(a)}`,p=await fetch(i,l),f=await p.text();if(!p.ok)return{success:!1,message:`Update failed (${p.status}): ${f}`,raw:t};try{const m=JSON.parse(f);return{success:!!((m==null?void 0:m.success)??!0),message:m==null?void 0:m.message,raw:t}}catch{return{success:!0,raw:t}}}async function Ta(a,s){var p;const r=`https://wpapi.trustsignal.io/api/v1/template/${encodeURIComponent(s)}?api_key=${encodeURIComponent(a)}`,t=await fetch(r,{method:"GET",redirect:"follow"});if(!t.ok)throw new Error(`Failed to fetch template ${s}: ${t.status}`);const n=await t.text(),l=JSON.parse(n),i=l.template||((p=l.data)==null?void 0:p.template)||l;if(!i)throw new Error("Invalid template details response");return Ea(i)}function Ea(a){var w,U;const s={headerVariables:{},bodyVariables:{},buttonVariables:{}};let r="NONE",t="",n,l,i="",p="";const f=[];if(a.jsonstruct)try{const o=JSON.parse(a.jsonstruct);if(o!=null&&o.header){const j=o.header.format;j&&j!=="TEXT"?(r="MEDIA",n=j,l=o.header.url||((w=a.medialist)==null?void 0:w.header)):j==="TEXT"&&(r="TEXT",t=o.header.text||"")}if(o!=null&&o.body&&(i=o.body.text||""),(U=o==null?void 0:o.buttons)!=null&&U.buttons&&Array.isArray(o.buttons.buttons))for(const j of o.buttons.buttons){if(!j||!j.type||!j.text)continue;const E={id:ue(),type:j.type==="PHONE_NUMBER"?"PHONE_NUMBER":j.type,text:j.text};j.type==="URL"&&(E.value=j.url,typeof j.url=="string"&&j.url.includes("{{")&&Array.isArray(j.example)?(Se(j.url).forEach((g,x)=>{s.buttonVariables[g]=j.example[x]??""}),E.urlType="dynamic"):E.urlType="static"),(j.type==="CALL"||j.type==="PHONE_NUMBER")&&(E.value=j.phone_number||""),f.push(E)}if(o!=null&&o.carousel){const j=Object.keys(o.carousel).filter(h=>/^card\d+$/.test(h));j.sort((h,u)=>{const k=parseInt(h.replace("card",""),10),A=parseInt(u.replace("card",""),10);return k-A});const E=j.map(h=>{const u=o.carousel[h]||{},k=u.header||{},A=u.body||{},V=u.buttons&&Array.isArray(u.buttons.buttons)?u.buttons.buttons:[],b=k.format,N=b==="IMAGE"||b==="VIDEO"||b==="DOCUMENT"?b:void 0,B=`card${h.replace("card","")}header`,P=k.url||(a.medialist&&typeof a.medialist=="object"&&B in a.medialist?a.medialist[B]:void 0),G=A.text||"",c=[];for(const C of V){if(!C||!C.type||!C.text)continue;const L={id:ue(),type:C.type==="PHONE_NUMBER"?"PHONE_NUMBER":C.type,text:C.text};C.type==="URL"&&(L.value=C.url,typeof C.url=="string"&&C.url.includes("{{")&&Array.isArray(C.example)?(Se(C.url).forEach((R,D)=>{}),L.urlType="dynamic"):L.urlType="static"),(C.type==="CALL"||C.type==="PHONE_NUMBER")&&(L.value=C.phone_number||""),c.push(L)}return{id:ue(),headerType:N?"MEDIA":"NONE",mediaType:N,mediaUrl:P,body:G,buttons:c,sampleContent:{headerVariables:{},bodyVariables:{},buttonVariables:{}}}});let y="IMAGE";const g=E[0];(g==null?void 0:g.mediaType)==="VIDEO"&&(y="VIDEO");const x={type:y,cards:E};return{name:a.name,category:a.category==="MARKETING"||a.category==="UTILITY"?a.category:"MARKETING",type:"CAROUSEL",language:a.lang||"en",enableClickTracking:!1,headerType:"NONE",headerText:"",body:i,footer:p,buttons:[],sampleContent:s,carousel:x}}}catch(o){console.warn("Failed to parse jsonstruct; falling back",o)}return{name:a.name,category:a.category==="MARKETING"||a.category==="UTILITY"?a.category:"MARKETING",type:"BASIC",language:a.lang||"en",enableClickTracking:!1,headerType:r,headerText:t,mediaType:n,mediaUrl:l,body:i,footer:p,buttons:f,sampleContent:s}}function Se(a){if(!a)return[];const s=a.match(/\{\{(\d+)\}\}/g)||[];return[...new Set(s.map(r=>r.replace(/[{}]/g,"")))]}function ue(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"id-"+Math.random().toString(36).slice(2)}const Ma=[{value:"af",label:"Afrikaans"},{value:"sq",label:"Albanian"},{value:"ar",label:"Arabic"},{value:"az",label:"Azerbaijani"},{value:"bn",label:"Bengali"},{value:"bg",label:"Bulgarian"},{value:"ca",label:"Catalan"},{value:"zh_CN",label:"Chinese (CHN)"},{value:"zh_HK",label:"Chinese (HKG)"},{value:"zh_TW",label:"Chinese (TAI)"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"en_GB",label:"English (UK)"},{value:"en_US",label:"English (US)"},{value:"en",label:"English"},{value:"et",label:"Estonian"},{value:"fil",label:"Filipino"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"id",label:"Indonesian"},{value:"ga",label:"Irish"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"ko",label:"Korean"},{value:"lo",label:"Lao"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"},{value:"mk",label:"Macedonian"},{value:"ms",label:"Malay"},{value:"mr",label:"Marathi"},{value:"nb",label:"Norwegian"},{value:"fa",label:"Persian"},{value:"pl",label:"Polish"},{value:"pt_BR",label:"Portuguese (BR)"},{value:"pt_PT",label:"Portuguese (POR)"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"es",label:"Spanish"},{value:"es_AR",label:"Spanish (ARG)"},{value:"es_ES",label:"Spanish (SPA)"},{value:"es_MX",label:"Spanish (MEX)"},{value:"sw",label:"Swahili"},{value:"sv",label:"Swedish"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"uz",label:"Uzbek"},{value:"vi",label:"Vietnamese"}],La=[{value:"NONE",label:"None"},{value:"TEXT",label:"Text"},{value:"MEDIA",label:"Media"}],Sa=[{value:"IMAGE",label:"Image"},{value:"VIDEO",label:"Video"},{value:"DOCUMENT",label:"Document"}],Aa=5*1024*1024,Ua=16*1024*1024,Va=100*1024*1024,be=["jpg","jpeg","png"],ge=["mp4","3gpp"],ye=["pdf","docx","xlsx","pptx","txt"];function Ia({template:a,setTemplate:s,onFileUpload:r}){var A,V;const[t,n]=v.useState(null),[l,i]=v.useState(!1),[p,f]=v.useState(null),[m,w]=v.useState(null),U=()=>{const N=(a.headerText||"").match(/{{\d+}}/g);if(!N)return 0;const M=N.map(B=>{const P=B.match(/{{(\d+)}}/);return P?parseInt(P[1],10):0});return M.length>0?Math.max(...M):0},o=()=>{const M=`{{${U()+1}}}`;if(p&&a.headerText.length+M.length<=60){const B=p.selectionStart||a.headerText.length,P=a.headerText.substring(0,B),G=a.headerText.substring(B),c=P+M+G;s({...a,headerText:c}),setTimeout(()=>{if(p){const C=B+M.length;p.setSelectionRange(C,C),p.focus()}},0)}},j=b=>{s(N=>({...N,headerType:b,headerText:b==="TEXT"?N.headerText:"",mediaType:b==="MEDIA"?N.mediaType||"IMAGE":void 0,mediaUrl:b==="MEDIA"?N.mediaUrl:void 0})),b!=="MEDIA"&&(n(null),w(null))},E=b=>{var N;return((N=b.split("?")[0].split(".").pop())==null?void 0:N.toLowerCase())||""},y=(b,N)=>{const M=E(b.name);switch(N){case"IMAGE":if(!be.includes(M))return"Invalid format. Only JPG, JPEG, PNG are allowed.";if(b.size>Aa)return"File is too large. Max size is 5 MB.";break;case"VIDEO":if(!ge.includes(M))return"Invalid format. Only MP4, 3GPP are allowed.";if(b.size>Ua)return"File is too large. Max size is 16 MB.";break;case"DOCUMENT":if(!ye.includes(M))return"Invalid format. Allowed types: PDF, DOCX, XLSX, PPTX, TXT.";if(b.size>Va)return"File is too large. Max size is 100 MB.";break;default:return"Invalid media type."}return null},g=(b,N)=>{if(!b)return null;const M=E(b);switch(N){case"IMAGE":if(!be.includes(M))return"URL does not point to a valid image (JPG, JPEG, PNG).";break;case"VIDEO":if(!ge.includes(M))return"URL does not point to a valid video (MP4, 3GPP).";break;case"DOCUMENT":if(!ye.includes(M))return"URL does not point to a valid document.";break}return null},x=()=>{n(null),s({...a,mediaUrl:""}),w(null)},h=async b=>{var B;const N=(B=b.target.files)==null?void 0:B[0];if(!N||!a.mediaType)return;w(null);const M=y(N,a.mediaType);if(M){w(M);return}i(!0),n(N);try{const P=await r(N);s({...a,mediaUrl:P})}catch(P){console.error("File upload failed:",P),x();const G=P instanceof Error?P.message:"File upload failed. Please try again.";w(G)}finally{i(!1)}},u=b=>{const N=b.target.value;if(n(null),s({...a,mediaUrl:N}),a.mediaType){const M=g(N,a.mediaType);w(M)}},k=()=>{switch(a.mediaType){case"IMAGE":return be.map(b=>`.${b}`).join(",");case"VIDEO":return ge.map(b=>`.${b}`).join(",");case"DOCUMENT":return ye.map(b=>`.${b}`).join(",");default:return"*/*"}};return e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Header Type"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("select",{value:a.headerType,onChange:b=>j(b.target.value),className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:La.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500"})]})]}),a.headerType==="TEXT"&&e.jsxs("div",{className:"rsp-animate-fade-in",children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Header Text"}),e.jsx("div",{className:"rsp-relative",children:e.jsx("input",{ref:f,type:"text",value:a.headerText,onChange:b=>s({...a,headerText:b.target.value}),maxLength:60,className:"rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",placeholder:"Add a 60 character title to your message"})}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mt-2",children:[e.jsx("button",{onClick:o,className:"rsp-px-2 rsp-py-1 rsp-text-xs hover:rsp-bg-gray-100 rsp-rounded rsp-text-gray-500 rsp-flex rsp-items-center rsp-gap-1",title:"Add variable to header",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-500",children:[a.headerText.length,"/60"]})]}),(()=>{const b=[...new Set((a.headerText.match(/\{\{(\d+)\}\}/g)||[]).map(N=>N.replace(/[{}]/g,"")))];return b.length===0?null:e.jsxs("div",{className:"rsp-mt-3",children:[e.jsx("p",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-2",children:"Sample Values"}),e.jsx("div",{className:"rsp-grid rsp-grid-cols-3 rsp-gap-2",children:b.map(N=>{var M,B;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("label",{className:"rsp-text-xs rsp-text-gray-500 rsp-whitespace-nowrap",children:[`{{${N}}}`,":"]}),e.jsx("input",{type:"text",value:((B=(M=a.sampleContent)==null?void 0:M.headerVariables)==null?void 0:B[N])||"",onChange:P=>{var c,C,L;const G={...a.sampleContent,headerVariables:{...(c=a.sampleContent)==null?void 0:c.headerVariables,[N]:P.target.value},bodyVariables:((C=a.sampleContent)==null?void 0:C.bodyVariables)||{},buttonVariables:((L=a.sampleContent)==null?void 0:L.buttonVariables)||{}};s({...a,sampleContent:G})},className:"rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500",placeholder:"Sample"}),e.jsx("button",{type:"button",onClick:()=>{var C,L,S;const P=new RegExp(`\\{\\{${N}\\}\\}`,"g"),G=(a.headerText||"").replace(P,""),c=Object.fromEntries(Object.entries(((C=a.sampleContent)==null?void 0:C.headerVariables)||{}).filter(([R])=>R!==N));s({...a,headerText:G,sampleContent:{...a.sampleContent,headerVariables:c,bodyVariables:((L=a.sampleContent)==null?void 0:L.bodyVariables)||{},buttonVariables:((S=a.sampleContent)==null?void 0:S.buttonVariables)||{}}})},className:"rsp-px-2 rsp-py-1 rsp-text-xs rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`header-sample-${N}`)})})]})})()]}),a.headerType==="MEDIA"&&e.jsxs("div",{className:"rsp-space-y-6 rsp-animate-fade-in",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Media Type"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("select",{value:a.mediaType||"IMAGE",onChange:b=>{s(N=>({...N,mediaType:b.target.value,mediaUrl:""})),n(null),w(null)},className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:Sa.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700",children:"Media"}),a.mediaUrl?e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-p-3 rsp-bg-gray-50 rsp-border rsp-border-gray-200 rsp-rounded-md",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-space-x-3 overflow-hidden",children:[a.mediaType==="IMAGE"&&e.jsx("img",{src:a.mediaUrl,alt:"Preview",className:"rsp-w-12 rsp-h-12 rsp-object-cover rsp-rounded",onError:b=>{b.currentTarget.style.display="none",m||w("Could not load image preview from URL.")},onLoad:()=>{m!=null&&m.includes("Could not load")&&w(null)}}),a.mediaType==="VIDEO"&&e.jsx("div",{className:"rsp-w-12 rsp-h-12 rsp-bg-gray-200 rsp-rounded rsp-flex rsp-items-center rsp-justify-center flex-shrink-0",children:e.jsx(Xe,{className:"rsp-w-6 rsp-h-6 rsp-text-gray-500"})}),a.mediaType==="DOCUMENT"&&e.jsx("div",{className:"rsp-w-12 rsp-h-12 rsp-bg-gray-200 rsp-rounded rsp-flex rsp-items-center rsp-justify-center flex-shrink-0",children:e.jsx(Ke,{className:"rsp-w-6 rsp-h-6 rsp-text-gray-500"})}),e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("p",{className:"rsp-text-sm rsp-font-medium rsp-text-gray-900 rsp-truncate",children:t?t.name:a.mediaUrl}),t&&e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500",children:`${(t.size/1024/1024).toFixed(2)} MB`})]})]}),e.jsx("button",{onClick:x,className:"rsp-p-1 rsp-text-gray-400 hover:rsp-text-red-500 rsp-transition-colors flex-shrink-0",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}):e.jsxs("div",{children:[e.jsx("input",{type:"file",accept:k(),onChange:h,className:"rsp-hidden",id:"media-upload",disabled:l}),e.jsxs("label",{htmlFor:"media-upload",className:`rsp-w-full rsp-px-4 rsp-py-3 rsp-border-2 rsp-border-dashed rsp-border-gray-300 rsp-rounded-md rsp-flex rsp-flex-col rsp-items-center rsp-justify-center rsp-cursor-pointer rsp-transition-colors hover:rsp-border-gray-400 hover:rsp-bg-gray-50 ${l?"rsp-opacity-50 rsp-cursor-not-allowed":""}`,children:[e.jsx(ea,{className:"rsp-w-6 rsp-h-6 rsp-text-gray-400 rsp-mb-2"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:l?"Uploading...":`Upload ${((A=a.mediaType)==null?void 0:A.toLowerCase())||"file"}`}),e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-400 rsp-mt-1",children:[a.mediaType==="IMAGE"&&"JPG, PNG up to 5MB",a.mediaType==="VIDEO"&&"MP4, 3GPP up to 16MB",a.mediaType==="DOCUMENT"&&"PDF, DOCX, etc. up to 100MB"]})]})]}),m&&e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2 rsp-text-xs rsp-text-red-600",children:[e.jsx(ve,{className:"rsp-w-4 rsp-h-4"}),e.jsx("span",{children:m})]}),e.jsxs("div",{className:"rsp-flex rsp-items-center",children:[e.jsx("div",{className:"rsp-flex-1 rsp-border-t rsp-border-gray-300"}),e.jsx("span",{className:"rsp-px-3 rsp-text-sm rsp-text-gray-500",children:"OR"}),e.jsx("div",{className:"rsp-flex-1 rsp-border-t rsp-border-gray-300"})]}),e.jsx("div",{className:"rsp-relative",children:e.jsx("input",{type:"url",value:a.mediaUrl||"",onChange:u,className:"rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",placeholder:`Enter ${(V=a.mediaType)==null?void 0:V.toLowerCase()} URL`})})]})]})]})}const Ae=[{name:"grinning-face",hexadecimal:"&#x1f600;"},{name:"grinning-face-with-smiling-eyes",hexadecimal:"&#x1f601;"},{name:"face-with-tears-of-joy",hexadecimal:"&#x1f602;"},{name:"rolling-on-the-floor-laughing",hexadecimal:"&#x1f923;"},{name:"smiling-face-with-open-mouth",hexadecimal:"&#x1f603;"},{name:"smiling-face-with-open-mouth-and-smiling-eyes",hexadecimal:"&#x1f604;"},{name:"smiling-face-with-open-mouth-and-cold-sweat",hexadecimal:"&#x1f605;"},{name:"smiling-face-with-open-mouth-and-tightly-closed-eyes",hexadecimal:"&#x1f606;"},{name:"winking-face",hexadecimal:"&#x1f609;"},{name:"smiling-face-with-smiling-eyes",hexadecimal:"&#x1f60a;"},{name:"face-savouring-delicious-food",hexadecimal:"&#x1f60b;"},{name:"smiling-face-with-sunglasses",hexadecimal:"&#x1f60e;"},{name:"smiling-face-with-heart-shaped-eyes",hexadecimal:"&#x1f60d;"},{name:"face-throwing-a-kiss",hexadecimal:"&#x1f618;"},{name:"kissing-face",hexadecimal:"&#x1f617;"},{name:"kissing-face-with-smiling-eyes",hexadecimal:"&#x1f619;"},{name:"kissing-face-with-closed-eyes",hexadecimal:"&#x1f61a;"},{name:"slightly-smiling-face",hexadecimal:"&#x1f642;"},{name:"hugging-face",hexadecimal:"&#x1f917;"},{name:"thinking-face",hexadecimal:"&#x1f914;"},{name:"neutral-face",hexadecimal:"&#x1f610;"},{name:"expressionless-face",hexadecimal:"&#x1f611;"},{name:"face-without-mouth",hexadecimal:"&#x1f636;"},{name:"face-with-rolling-eyes",hexadecimal:"&#x1f644;"},{name:"smirking-face",hexadecimal:"&#x1f60f;"},{name:"persevering-face",hexadecimal:"&#x1f623;"},{name:"disappointed-but-relieved-face",hexadecimal:"&#x1f625;"},{name:"face-with-open-mouth",hexadecimal:"&#x1f62e;"},{name:"zipper-mouth-face",hexadecimal:"&#x1f910;"},{name:"hushed-face",hexadecimal:"&#x1f62f;"},{name:"sleepy-face",hexadecimal:"&#x1f62a;"},{name:"tired-face",hexadecimal:"&#x1f62b;"},{name:"sleeping-face",hexadecimal:"&#x1f634;"},{name:"relieved-face",hexadecimal:"&#x1f60c;"},{name:"nerd-face",hexadecimal:"&#x1f913;"},{name:"face-with-stuck-out-tongue",hexadecimal:"&#x1f61b;"},{name:"face-with-stuck-out-tongue-and-winking-eye",hexadecimal:"&#x1f61c;"},{name:"face-with-stuck-out-tongue-and-tightly-closed-eyes",hexadecimal:"&#x1f61d;"},{name:"drooling-face",hexadecimal:"&#x1f924;"},{name:"unamused-face",hexadecimal:"&#x1f612;"},{name:"face-with-cold-sweat",hexadecimal:"&#x1f613;"},{name:"pensive-face",hexadecimal:"&#x1f614;"},{name:"confused-face",hexadecimal:"&#x1f615;"},{name:"upside-down-face",hexadecimal:"&#x1f643;"},{name:"money-mouth-face",hexadecimal:"&#x1f911;"},{name:"astonished-face",hexadecimal:"&#x1f632;"},{name:"slightly-frowning-face",hexadecimal:"&#x1f641;"},{name:"confounded-face",hexadecimal:"&#x1f616;"},{name:"disappointed-face",hexadecimal:"&#x1f61e;"},{name:"worried-face",hexadecimal:"&#x1f61f;"},{name:"face-with-look-of-triumph",hexadecimal:"&#x1f624;"},{name:"crying-face",hexadecimal:"&#x1f622;"},{name:"loudly-crying-face",hexadecimal:"&#x1f62d;"},{name:"frowning-face-with-open-mouth",hexadecimal:"&#x1f626;"},{name:"anguished-face",hexadecimal:"&#x1f627;"},{name:"fearful-face",hexadecimal:"&#x1f628;"},{name:"weary-face",hexadecimal:"&#x1f629;"},{name:"grimacing-face",hexadecimal:"&#x1f62c;"},{name:"face-with-open-mouth-and-cold-sweat",hexadecimal:"&#x1f630;"},{name:"face-screaming-in-fear",hexadecimal:"&#x1f631;"},{name:"flushed-face",hexadecimal:"&#x1f633;"},{name:"dizzy-face",hexadecimal:"&#x1f635;"},{name:"pouting-face",hexadecimal:"&#x1f621;"},{name:"angry-face",hexadecimal:"&#x1f620;"},{name:"smiling-face-with-halo",hexadecimal:"&#x1f607;"},{name:"face-with-cowboy-hat",hexadecimal:"&#x1f920;"},{name:"clown-face",hexadecimal:"&#x1f921;"},{name:"lying-face",hexadecimal:"&#x1f925;"},{name:"face-with-medical-mask",hexadecimal:"&#x1f637;"},{name:"face-with-thermometer",hexadecimal:"&#x1f912;"},{name:"face-with-head-bandage",hexadecimal:"&#x1f915;"},{name:"nauseated-face",hexadecimal:"&#x1f922;"},{name:"sneezing-face",hexadecimal:"&#x1f927;"},{name:"smiling-face-with-horns",hexadecimal:"&#x1f608;"},{name:"imp",hexadecimal:"&#x1f47f;"},{name:"japanese-ogre",hexadecimal:"&#x1f479;"},{name:"japanese-goblin",hexadecimal:"&#x1f47a;"},{name:"skull",hexadecimal:"&#x1f480;"},{name:"skull-and-crossbones",hexadecimal:"&#x2620;"},{name:"ghost",hexadecimal:"&#x1f47b;"},{name:"extraterrestrial-alien",hexadecimal:"&#x1f47d;"},{name:"alien-monster",hexadecimal:"&#x1f47e;"},{name:"robot-face",hexadecimal:"&#x1f916;"},{name:"pile-of-poo",hexadecimal:"&#x1f4a9;"},{name:"smiling-cat-face-with-open-mouth",hexadecimal:"&#x1f63a;"},{name:"grinning-cat-face-with-smiling-eyes",hexadecimal:"&#x1f638;"},{name:"cat-face-with-tears-of-joy",hexadecimal:"&#x1f639;"},{name:"smiling-cat-face-with-heart-shaped-eyes",hexadecimal:"&#x1f63b;"},{name:"cat-face-with-wry-smile",hexadecimal:"&#x1f63c;"},{name:"kissing-cat-face-with-closed-eyes",hexadecimal:"&#x1f63d;"},{name:"weary-cat-face",hexadecimal:"&#x1f640;"},{name:"crying-cat-face",hexadecimal:"&#x1f63f;"},{name:"pouting-cat-face",hexadecimal:"&#x1f63e;"},{name:"see-no-evil-monkey",hexadecimal:"&#x1f648;"},{name:"hear-no-evil-monkey",hexadecimal:"&#x1f649;"},{name:"speak-no-evil-monkey",hexadecimal:"&#x1f64a;"},{name:"boy",hexadecimal:"&#x1f466;"},{name:"boy-type-1-2",hexadecimal:"&#x1f466;&#x1f3fb;"},{name:"boy-type-3",hexadecimal:"&#x1f466;&#x1f3fc;"},{name:"boy-type-4",hexadecimal:"&#x1f466;&#x1f3fd;"},{name:"boy-type-5",hexadecimal:"&#x1f466;&#x1f3fe;"},{name:"boy-type-6",hexadecimal:"&#x1f466;&#x1f3ff;"},{name:"girl",hexadecimal:"&#x1f467;"},{name:"girl-type-1-2",hexadecimal:"&#x1f467;&#x1f3fb;"},{name:"girl-type-3",hexadecimal:"&#x1f467;&#x1f3fc;"},{name:"girl-type-4",hexadecimal:"&#x1f467;&#x1f3fd;"},{name:"girl-type-5",hexadecimal:"&#x1f467;&#x1f3fe;"},{name:"girl-type-6",hexadecimal:"&#x1f467;&#x1f3ff;"},{name:"man",hexadecimal:"&#x1f468;"},{name:"man-type-1-2",hexadecimal:"&#x1f468;&#x1f3fb;"},{name:"man-type-3",hexadecimal:"&#x1f468;&#x1f3fc;"},{name:"man-type-4",hexadecimal:"&#x1f468;&#x1f3fd;"},{name:"man-type-5",hexadecimal:"&#x1f468;&#x1f3fe;"},{name:"man-type-6",hexadecimal:"&#x1f468;&#x1f3ff;"},{name:"woman",hexadecimal:"&#x1f469;"},{name:"woman-type-1-2",hexadecimal:"&#x1f469;&#x1f3fb;"},{name:"woman-type-3",hexadecimal:"&#x1f469;&#x1f3fc;"},{name:"woman-type-4",hexadecimal:"&#x1f469;&#x1f3fd;"},{name:"woman-type-5",hexadecimal:"&#x1f469;&#x1f3fe;"},{name:"woman-type-6",hexadecimal:"&#x1f469;&#x1f3ff;"},{name:"older-man",hexadecimal:"&#x1f474;"},{name:"old-man-type-1-2",hexadecimal:"&#x1f474;&#x1f3fb;"},{name:"old-man-type-3",hexadecimal:"&#x1f474;&#x1f3fc;"},{name:"old-man-type-4",hexadecimal:"&#x1f474;&#x1f3fd;"},{name:"old-man-type-5",hexadecimal:"&#x1f474;&#x1f3fe;"},{name:"old-man-type-6",hexadecimal:"&#x1f474;&#x1f3ff;"},{name:"older-woman",hexadecimal:"&#x1f475;"},{name:"old-woman-type-1-2",hexadecimal:"&#x1f475;&#x1f3fb;"},{name:"old-woman-type-3",hexadecimal:"&#x1f475;&#x1f3fc;"},{name:"old-woman-type-4",hexadecimal:"&#x1f475;&#x1f3fd;"},{name:"old-woman-type-5",hexadecimal:"&#x1f475;&#x1f3fe;"},{name:"old-woman-type-6",hexadecimal:"&#x1f475;&#x1f3ff;"},{name:"baby",hexadecimal:"&#x1f476;"},{name:"baby-type-1-2",hexadecimal:"&#x1f476;&#x1f3fb;"},{name:"baby-type-3",hexadecimal:"&#x1f476;&#x1f3fc;"},{name:"baby-type-4",hexadecimal:"&#x1f476;&#x1f3fd;"},{name:"baby-type-5",hexadecimal:"&#x1f476;&#x1f3fe;"},{name:"baby-type-6",hexadecimal:"&#x1f476;&#x1f3ff;"},{name:"baby-angel",hexadecimal:"&#x1f47c;"},{name:"baby-angel-type-1-2",hexadecimal:"&#x1f47c;&#x1f3fb;"},{name:"baby-angel-type-3",hexadecimal:"&#x1f47c;&#x1f3fc;"},{name:"baby-angel-type-4",hexadecimal:"&#x1f47c;&#x1f3fd;"},{name:"baby-angel-type-5",hexadecimal:"&#x1f47c;&#x1f3fe;"},{name:"baby-angel-type-6",hexadecimal:"&#x1f47c;&#x1f3ff;"},{name:"police-officer",hexadecimal:"&#x1f46e;"},{name:"police-officer-type-1-2",hexadecimal:"&#x1f46e;&#x1f3fb;"},{name:"police-officer-type-3",hexadecimal:"&#x1f46e;&#x1f3fc;"},{name:"police-officer-type-4",hexadecimal:"&#x1f46e;&#x1f3fd;"},{name:"police-officer-type-5",hexadecimal:"&#x1f46e;&#x1f3fe;"},{name:"police-officer-type-6",hexadecimal:"&#x1f46e;&#x1f3ff;"},{name:"sleuth-or-spy",hexadecimal:"&#x1f575;"},{name:"detective-type-1-2",hexadecimal:"&#x1f575;&#x1f3fb;"},{name:"detective-type-3",hexadecimal:"&#x1f575;&#x1f3fc;"},{name:"detective-type-4",hexadecimal:"&#x1f575;&#x1f3fd;"},{name:"detective-type-5",hexadecimal:"&#x1f575;&#x1f3fe;"},{name:"detective-type-6",hexadecimal:"&#x1f575;&#x1f3ff;"},{name:"guardsman",hexadecimal:"&#x1f482;"},{name:"guardsman-type-1-2",hexadecimal:"&#x1f482;&#x1f3fb;"},{name:"guardsman-type-3",hexadecimal:"&#x1f482;&#x1f3fc;"},{name:"guardsman-type-4",hexadecimal:"&#x1f482;&#x1f3fd;"},{name:"guardsman-type-5",hexadecimal:"&#x1f482;&#x1f3fe;"},{name:"guardsman-type-6",hexadecimal:"&#x1f482;&#x1f3ff;"},{name:"construction-worker",hexadecimal:"&#x1f477;"},{name:"construction-worker-type-1-2",hexadecimal:"&#x1f477;&#x1f3fb;"},{name:"construction-worker-type-3",hexadecimal:"&#x1f477;&#x1f3fc;"},{name:"construction-worker-type-4",hexadecimal:"&#x1f477;&#x1f3fd;"},{name:"construction-worker-type-5",hexadecimal:"&#x1f477;&#x1f3fe;"},{name:"construction-worker-type-6",hexadecimal:"&#x1f477;&#x1f3ff;"},{name:"man-with-turban",hexadecimal:"&#x1f473;"},{name:"person-with-turban-type-1-2",hexadecimal:"&#x1f473;&#x1f3fb;"},{name:"person-with-turban-type-3",hexadecimal:"&#x1f473;&#x1f3fc;"},{name:"person-with-turban-type-4",hexadecimal:"&#x1f473;&#x1f3fd;"},{name:"person-with-turban-type-5",hexadecimal:"&#x1f473;&#x1f3fe;"},{name:"person-with-turban-type-6",hexadecimal:"&#x1f473;&#x1f3ff;"},{name:"person-with-blond-hair",hexadecimal:"&#x1f471;"},{name:"blond-person-type-1-2",hexadecimal:"&#x1f471;&#x1f3fb;"},{name:"blond-person-type-3",hexadecimal:"&#x1f471;&#x1f3fc;"},{name:"blond-person-type-4",hexadecimal:"&#x1f471;&#x1f3fd;"},{name:"blond-person-type-5",hexadecimal:"&#x1f471;&#x1f3fe;"},{name:"blond-person-type-6",hexadecimal:"&#x1f471;&#x1f3ff;"},{name:"father-christmas",hexadecimal:"&#x1f385;"},{name:"santa-claus-type-1-2",hexadecimal:"&#x1f385;&#x1f3fb;"},{name:"santa-claus-type-3",hexadecimal:"&#x1f385;&#x1f3fc;"},{name:"santa-claus-type-4",hexadecimal:"&#x1f385;&#x1f3fd;"},{name:"santa-claus-type-5",hexadecimal:"&#x1f385;&#x1f3fe;"},{name:"santa-claus-type-6",hexadecimal:"&#x1f385;&#x1f3ff;"},{name:"mother-christmas",hexadecimal:"&#x1f936;"},{name:"mother-christmas-type-1-2",hexadecimal:"&#x1f936;&#x1f3fb;"},{name:"mother-christmas-type-3",hexadecimal:"&#x1f936;&#x1f3fc;"},{name:"mother-christmas-type-4",hexadecimal:"&#x1f936;&#x1f3fd;"},{name:"mother-christmas-type-5",hexadecimal:"&#x1f936;&#x1f3fe;"},{name:"mother-christmas-type-6",hexadecimal:"&#x1f936;&#x1f3ff;"},{name:"princess",hexadecimal:"&#x1f478;"},{name:"princess-type-1-2",hexadecimal:"&#x1f478;&#x1f3fb;"},{name:"princess-type-3",hexadecimal:"&#x1f478;&#x1f3fc;"},{name:"princess-type-4",hexadecimal:"&#x1f478;&#x1f3fd;"},{name:"princess-type-5",hexadecimal:"&#x1f478;&#x1f3fe;"},{name:"princess-type-6",hexadecimal:"&#x1f478;&#x1f3ff;"},{name:"prince",hexadecimal:"&#x1f934;"},{name:"prince-type-1-2",hexadecimal:"&#x1f934;&#x1f3fb;"},{name:"prince-type-3",hexadecimal:"&#x1f934;&#x1f3fc;"},{name:"prince-type-4",hexadecimal:"&#x1f934;&#x1f3fd;"},{name:"prince-type-5",hexadecimal:"&#x1f934;&#x1f3fe;"},{name:"prince-type-6",hexadecimal:"&#x1f934;&#x1f3ff;"},{name:"bride-with-veil",hexadecimal:"&#x1f470;"},{name:"bride-with-veil-type-1-2",hexadecimal:"&#x1f470;&#x1f3fb;"},{name:"bride-with-veil-type-3",hexadecimal:"&#x1f470;&#x1f3fc;"},{name:"bride-with-veil-type-4",hexadecimal:"&#x1f470;&#x1f3fd;"},{name:"bride-with-veil-type-5",hexadecimal:"&#x1f470;&#x1f3fe;"},{name:"bride-with-veil-type-6",hexadecimal:"&#x1f470;&#x1f3ff;"},{name:"man-in-tuxedo",hexadecimal:"&#x1f935;"},{name:"man-in-tuxedo-type-1-2",hexadecimal:"&#x1f935;&#x1f3fb;"},{name:"man-in-tuxedo-type-3",hexadecimal:"&#x1f935;&#x1f3fc;"},{name:"man-in-tuxedo-type-4",hexadecimal:"&#x1f935;&#x1f3fd;"},{name:"man-in-tuxedo-type-5",hexadecimal:"&#x1f935;&#x1f3fe;"},{name:"man-in-tuxedo-type-6",hexadecimal:"&#x1f935;&#x1f3ff;"},{name:"pregnant-woman",hexadecimal:"&#x1f930;"},{name:"pregnant-woman-type-1-2",hexadecimal:"&#x1f930;&#x1f3fb;"},{name:"pregnant-woman-type-3",hexadecimal:"&#x1f930;&#x1f3fc;"},{name:"pregnant-woman-type-4",hexadecimal:"&#x1f930;&#x1f3fd;"},{name:"pregnant-woman-type-5",hexadecimal:"&#x1f930;&#x1f3fe;"},{name:"pregnant-woman-type-6",hexadecimal:"&#x1f930;&#x1f3ff;"},{name:"man-with-gua-pi-mao",hexadecimal:"&#x1f472;"},{name:"man-with-chinese-cap-type-1-2",hexadecimal:"&#x1f472;&#x1f3fb;"},{name:"man-with-chinese-cap-type-3",hexadecimal:"&#x1f472;&#x1f3fc;"},{name:"man-with-chinese-cap-type-4",hexadecimal:"&#x1f472;&#x1f3fd;"},{name:"man-with-chinese-cap-type-5",hexadecimal:"&#x1f472;&#x1f3fe;"},{name:"man-with-chinese-cap-type-6",hexadecimal:"&#x1f472;&#x1f3ff;"},{name:"person-frowning",hexadecimal:"&#x1f64d;"},{name:"person-frowning-type-1-2",hexadecimal:"&#x1f64d;&#x1f3fb;"},{name:"person-frowning-type-3",hexadecimal:"&#x1f64d;&#x1f3fc;"},{name:"person-frowning-type-4",hexadecimal:"&#x1f64d;&#x1f3fd;"},{name:"person-frowning-type-5",hexadecimal:"&#x1f64d;&#x1f3fe;"},{name:"person-frowning-type-6",hexadecimal:"&#x1f64d;&#x1f3ff;"},{name:"person-with-pouting-face",hexadecimal:"&#x1f64e;"},{name:"person-pouting-type-1-2",hexadecimal:"&#x1f64e;&#x1f3fb;"},{name:"person-pouting-type-3",hexadecimal:"&#x1f64e;&#x1f3fc;"},{name:"person-pouting-type-4",hexadecimal:"&#x1f64e;&#x1f3fd;"},{name:"person-pouting-type-5",hexadecimal:"&#x1f64e;&#x1f3fe;"},{name:"person-pouting-type-6",hexadecimal:"&#x1f64e;&#x1f3ff;"},{name:"face-with-no-good-gesture",hexadecimal:"&#x1f645;"},{name:"person-gesturing-not-ok-type-1-2",hexadecimal:"&#x1f645;&#x1f3fb;"},{name:"person-gesturing-not-ok-type-3",hexadecimal:"&#x1f645;&#x1f3fc;"},{name:"person-gesturing-not-ok-type-4",hexadecimal:"&#x1f645;&#x1f3fd;"},{name:"person-gesturing-not-ok-type-5",hexadecimal:"&#x1f645;&#x1f3fe;"},{name:"person-gesturing-not-ok-type-6",hexadecimal:"&#x1f645;&#x1f3ff;"},{name:"face-with-ok-gesture",hexadecimal:"&#x1f646;"},{name:"person-gesturing-ok-type-1-2",hexadecimal:"&#x1f646;&#x1f3fb;"},{name:"person-gesturing-ok-type-3",hexadecimal:"&#x1f646;&#x1f3fc;"},{name:"person-gesturing-ok-type-4",hexadecimal:"&#x1f646;&#x1f3fd;"},{name:"person-gesturing-ok-type-5",hexadecimal:"&#x1f646;&#x1f3fe;"},{name:"person-gesturing-ok-type-6",hexadecimal:"&#x1f646;&#x1f3ff;"},{name:"information-desk-person",hexadecimal:"&#x1f481;"},{name:"person-tipping-hand-type-1-2",hexadecimal:"&#x1f481;&#x1f3fb;"},{name:"person-tipping-hand-type-3",hexadecimal:"&#x1f481;&#x1f3fc;"},{name:"person-tipping-hand-type-4",hexadecimal:"&#x1f481;&#x1f3fd;"},{name:"person-tipping-hand-type-5",hexadecimal:"&#x1f481;&#x1f3fe;"},{name:"person-tipping-hand-type-6",hexadecimal:"&#x1f481;&#x1f3ff;"},{name:"happy-person-raising-one-hand",hexadecimal:"&#x1f64b;"},{name:"person-raising-hand-type-1-2",hexadecimal:"&#x1f64b;&#x1f3fb;"},{name:"person-raising-hand-type-3",hexadecimal:"&#x1f64b;&#x1f3fc;"},{name:"person-raising-hand-type-4",hexadecimal:"&#x1f64b;&#x1f3fd;"},{name:"person-raising-hand-type-5",hexadecimal:"&#x1f64b;&#x1f3fe;"},{name:"person-raising-hand-type-6",hexadecimal:"&#x1f64b;&#x1f3ff;"},{name:"person-bowing-deeply",hexadecimal:"&#x1f647;"},{name:"person-bowing-type-1-2",hexadecimal:"&#x1f647;&#x1f3fb;"},{name:"person-bowing-type-3",hexadecimal:"&#x1f647;&#x1f3fc;"},{name:"person-bowing-type-4",hexadecimal:"&#x1f647;&#x1f3fd;"},{name:"person-bowing-type-5",hexadecimal:"&#x1f647;&#x1f3fe;"},{name:"person-bowing-type-6",hexadecimal:"&#x1f647;&#x1f3ff;"},{name:"face-palm",hexadecimal:"&#x1f926;"},{name:"person-facepalming-type-1-2",hexadecimal:"&#x1f926;&#x1f3fb;"},{name:"person-facepalming-type-3",hexadecimal:"&#x1f926;&#x1f3fc;"},{name:"person-facepalming-type-4",hexadecimal:"&#x1f926;&#x1f3fd;"},{name:"person-facepalming-type-5",hexadecimal:"&#x1f926;&#x1f3fe;"},{name:"person-facepalming-type-6",hexadecimal:"&#x1f926;&#x1f3ff;"},{name:"shrug",hexadecimal:"&#x1f937;"},{name:"person-shrugging-type-1-2",hexadecimal:"&#x1f937;&#x1f3fb;"},{name:"person-shrugging-type-3",hexadecimal:"&#x1f937;&#x1f3fc;"},{name:"person-shrugging-type-4",hexadecimal:"&#x1f937;&#x1f3fd;"},{name:"person-shrugging-type-5",hexadecimal:"&#x1f937;&#x1f3fe;"},{name:"person-shrugging-type-6",hexadecimal:"&#x1f937;&#x1f3ff;"},{name:"face-massage",hexadecimal:"&#x1f486;"},{name:"person-getting-massage-type-1-2",hexadecimal:"&#x1f486;&#x1f3fb;"},{name:"person-getting-massage-type-3",hexadecimal:"&#x1f486;&#x1f3fc;"},{name:"person-getting-massage-type-4",hexadecimal:"&#x1f486;&#x1f3fd;"},{name:"person-getting-massage-type-5",hexadecimal:"&#x1f486;&#x1f3fe;"},{name:"person-getting-massage-type-6",hexadecimal:"&#x1f486;&#x1f3ff;"},{name:"haircut",hexadecimal:"&#x1f487;"},{name:"person-getting-haircut-type-1-2",hexadecimal:"&#x1f487;&#x1f3fb;"},{name:"person-getting-haircut-type-3",hexadecimal:"&#x1f487;&#x1f3fc;"},{name:"person-getting-haircut-type-4",hexadecimal:"&#x1f487;&#x1f3fd;"},{name:"person-getting-haircut-type-5",hexadecimal:"&#x1f487;&#x1f3fe;"},{name:"person-getting-haircut-type-6",hexadecimal:"&#x1f487;&#x1f3ff;"},{name:"pedestrian",hexadecimal:"&#x1f6b6;"},{name:"person-walking-type-1-2",hexadecimal:"&#x1f6b6;&#x1f3fb;"},{name:"person-walking-type-3",hexadecimal:"&#x1f6b6;&#x1f3fc;"},{name:"person-walking-type-4",hexadecimal:"&#x1f6b6;&#x1f3fd;"},{name:"person-walking-type-5",hexadecimal:"&#x1f6b6;&#x1f3fe;"},{name:"person-walking-type-6",hexadecimal:"&#x1f6b6;&#x1f3ff;"},{name:"runner",hexadecimal:"&#x1f3c3;"},{name:"person-running-type-1-2",hexadecimal:"&#x1f3c3;&#x1f3fb;"},{name:"person-running-type-3",hexadecimal:"&#x1f3c3;&#x1f3fc;"},{name:"person-running-type-4",hexadecimal:"&#x1f3c3;&#x1f3fd;"},{name:"person-running-type-5",hexadecimal:"&#x1f3c3;&#x1f3fe;"},{name:"person-running-type-6",hexadecimal:"&#x1f3c3;&#x1f3ff;"},{name:"dancer",hexadecimal:"&#x1f483;"},{name:"woman-dancing-type-1-2",hexadecimal:"&#x1f483;&#x1f3fb;"},{name:"woman-dancing-type-3",hexadecimal:"&#x1f483;&#x1f3fc;"},{name:"woman-dancing-type-4",hexadecimal:"&#x1f483;&#x1f3fd;"},{name:"woman-dancing-type-5",hexadecimal:"&#x1f483;&#x1f3fe;"},{name:"woman-dancing-type-6",hexadecimal:"&#x1f483;&#x1f3ff;"},{name:"man-dancing",hexadecimal:"&#x1f57a;"},{name:"man-dancing-type-1-2",hexadecimal:"&#x1f57a;&#x1f3fb;"},{name:"man-dancing-type-3",hexadecimal:"&#x1f57a;&#x1f3fc;"},{name:"man-dancing-type-4",hexadecimal:"&#x1f57a;&#x1f3fd;"},{name:"man-dancing-type-5",hexadecimal:"&#x1f57a;&#x1f3fe;"},{name:"man-dancing-type-6",hexadecimal:"&#x1f57a;&#x1f3ff;"},{name:"woman-with-bunny-ears",hexadecimal:"&#x1f46f;"},{name:"man-in-business-suit-levitating",hexadecimal:"&#x1f574;"},{name:"speaking-head-in-silhouette",hexadecimal:"&#x1f5e3;"},{name:"bust-in-silhouette",hexadecimal:"&#x1f464;"},{name:"busts-in-silhouette",hexadecimal:"&#x1f465;"},{name:"man-and-woman-holding-hands",hexadecimal:"&#x1f46b;"},{name:"two-men-holding-hands",hexadecimal:"&#x1f46c;"},{name:"two-women-holding-hands",hexadecimal:"&#x1f46d;"},{name:"kiss",hexadecimal:"&#x1f48f;"},{name:"kiss-woman-man",hexadecimal:"&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f468;"},{name:"kiss-man-man",hexadecimal:"&#x1f468;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f468;"},{name:"kiss-woman-woman",hexadecimal:"&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f469;"},{name:"couple-with-heart",hexadecimal:"&#x1f491;"},{name:"couple-with-heart-woman-man",hexadecimal:"&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f468;"},{name:"couple-with-heart-man-man",hexadecimal:"&#x1f468;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f468;"},{name:"couple-with-heart-woman-woman",hexadecimal:"&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f469;"},{name:"family",hexadecimal:"&#x1f46a;"},{name:"family-man-woman-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f466;"},{name:"family-man-woman-girl",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;"},{name:"family-man-woman-girl-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f466;"},{name:"family-man-woman-boy-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f466;&#x200d;&#x1f466;"},{name:"family-man-woman-girl-girl",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f467;"},{name:"family-man-man-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f466;"},{name:"family-man-man-girl",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;"},{name:"family-man-man-girl-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;&#x200d;&#x1f466;"},{name:"family-man-man-boy-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f466;&#x200d;&#x1f466;"},{name:"family-man-man-girl-girl",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;&#x200d;&#x1f467;"},{name:"family-woman-woman-boy",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f466;"},{name:"family-woman-woman-girl",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;"},{name:"family-woman-woman-girl-boy",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f466;"},{name:"family-woman-woman-boy-boy",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f466;&#x200d;&#x1f466;"},{name:"family-woman-woman-girl-girl",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f467;"},{name:"emoji-modifier-fitzpatrick-type-1-2",hexadecimal:"&#x1f3fb;"},{name:"emoji-modifier-fitzpatrick-type-3",hexadecimal:"&#x1f3fc;"},{name:"emoji-modifier-fitzpatrick-type-4",hexadecimal:"&#x1f3fd;"},{name:"emoji-modifier-fitzpatrick-type-5",hexadecimal:"&#x1f3fe;"},{name:"emoji-modifier-fitzpatrick-type-6",hexadecimal:"&#x1f3ff;"},{name:"flexed-biceps",hexadecimal:"&#x1f4aa;"},{name:"flexed-biceps-type-1-2",hexadecimal:"&#x1f4aa;&#x1f3fb;"},{name:"flexed-biceps-type-3",hexadecimal:"&#x1f4aa;&#x1f3fc;"},{name:"flexed-biceps-type-4",hexadecimal:"&#x1f4aa;&#x1f3fd;"},{name:"flexed-biceps-type-5",hexadecimal:"&#x1f4aa;&#x1f3fe;"},{name:"flexed-biceps-type-6",hexadecimal:"&#x1f4aa;&#x1f3ff;"},{name:"selfie",hexadecimal:"&#x1f933;"},{name:"selfie-type-1-2",hexadecimal:"&#x1f933;&#x1f3fb;"},{name:"selfie-type-3",hexadecimal:"&#x1f933;&#x1f3fc;"},{name:"selfie-type-4",hexadecimal:"&#x1f933;&#x1f3fd;"},{name:"selfie-type-5",hexadecimal:"&#x1f933;&#x1f3fe;"},{name:"selfie-type-6",hexadecimal:"&#x1f933;&#x1f3ff;"},{name:"white-left-pointing-backhand-index",hexadecimal:"&#x1f448;"},{name:"backhand-index-pointing-left-type-1-2",hexadecimal:"&#x1f448;&#x1f3fb;"},{name:"backhand-index-pointing-left-type-3",hexadecimal:"&#x1f448;&#x1f3fc;"},{name:"backhand-index-pointing-left-type-4",hexadecimal:"&#x1f448;&#x1f3fd;"},{name:"backhand-index-pointing-left-type-5",hexadecimal:"&#x1f448;&#x1f3fe;"},{name:"backhand-index-pointing-left-type-6",hexadecimal:"&#x1f448;&#x1f3ff;"},{name:"white-right-pointing-backhand-index",hexadecimal:"&#x1f449;"},{name:"backhand-index-pointing-right-type-1-2",hexadecimal:"&#x1f449;&#x1f3fb;"},{name:"backhand-index-pointing-right-type-3",hexadecimal:"&#x1f449;&#x1f3fc;"},{name:"backhand-index-pointing-right-type-4",hexadecimal:"&#x1f449;&#x1f3fd;"},{name:"backhand-index-pointing-right-type-5",hexadecimal:"&#x1f449;&#x1f3fe;"},{name:"backhand-index-pointing-right-type-6",hexadecimal:"&#x1f449;&#x1f3ff;"},{name:"white-up-pointing-index",hexadecimal:"&#x261d;"},{name:"index-pointing-up-type-1-2",hexadecimal:"&#x261d;&#x1f3fb;"},{name:"index-pointing-up-type-3",hexadecimal:"&#x261d;&#x1f3fc;"},{name:"index-pointing-up-type-4",hexadecimal:"&#x261d;&#x1f3fd;"},{name:"index-pointing-up-type-5",hexadecimal:"&#x261d;&#x1f3fe;"},{name:"index-pointing-up-type-6",hexadecimal:"&#x261d;&#x1f3ff;"},{name:"white-up-pointing-backhand-index",hexadecimal:"&#x1f446;"},{name:"backhand-index-pointing-up-type-1-2",hexadecimal:"&#x1f446;&#x1f3fb;"},{name:"backhand-index-pointing-up-type-3",hexadecimal:"&#x1f446;&#x1f3fc;"},{name:"backhand-index-pointing-up-type-4",hexadecimal:"&#x1f446;&#x1f3fd;"},{name:"backhand-index-pointing-up-type-5",hexadecimal:"&#x1f446;&#x1f3fe;"},{name:"backhand-index-pointing-up-type-6",hexadecimal:"&#x1f446;&#x1f3ff;"},{name:"reversed-hand-with-middle-finger-extended",hexadecimal:"&#x1f595;"},{name:"middle-finger-type-1-2",hexadecimal:"&#x1f595;&#x1f3fb;"},{name:"middle-finger-type-3",hexadecimal:"&#x1f595;&#x1f3fc;"},{name:"middle-finger-type-4",hexadecimal:"&#x1f595;&#x1f3fd;"},{name:"middle-finger-type-5",hexadecimal:"&#x1f595;&#x1f3fe;"},{name:"middle-finger-type-6",hexadecimal:"&#x1f595;&#x1f3ff;"},{name:"white-down-pointing-backhand-index",hexadecimal:"&#x1f447;"},{name:"backhand-index-pointing-down-type-1-2",hexadecimal:"&#x1f447;&#x1f3fb;"},{name:"backhand-index-pointing-down-type-3",hexadecimal:"&#x1f447;&#x1f3fc;"},{name:"backhand-index-pointing-down-type-4",hexadecimal:"&#x1f447;&#x1f3fd;"},{name:"backhand-index-pointing-down-type-5",hexadecimal:"&#x1f447;&#x1f3fe;"},{name:"backhand-index-pointing-down-type-6",hexadecimal:"&#x1f447;&#x1f3ff;"},{name:"victory-hand",hexadecimal:"&#x270c;"},{name:"victory-hand-type-1-2",hexadecimal:"&#x270c;&#x1f3fb;"},{name:"victory-hand-type-3",hexadecimal:"&#x270c;&#x1f3fc;"},{name:"victory-hand-type-4",hexadecimal:"&#x270c;&#x1f3fd;"},{name:"victory-hand-type-5",hexadecimal:"&#x270c;&#x1f3fe;"},{name:"victory-hand-type-6",hexadecimal:"&#x270c;&#x1f3ff;"},{name:"hand-with-index-and-middle-fingers-crossed",hexadecimal:"&#x1f91e;"},{name:"crossed-fingers-type-1-2",hexadecimal:"&#x1f91e;&#x1f3fb;"},{name:"crossed-fingers-type-3",hexadecimal:"&#x1f91e;&#x1f3fc;"},{name:"crossed-fingers-type-4",hexadecimal:"&#x1f91e;&#x1f3fd;"},{name:"crossed-fingers-type-5",hexadecimal:"&#x1f91e;&#x1f3fe;"},{name:"crossed-fingers-type-6",hexadecimal:"&#x1f91e;&#x1f3ff;"},{name:"raised-hand-with-part-between-middle-and-ring-fingers",hexadecimal:"&#x1f596;"},{name:"vulcan-salute-type-1-2",hexadecimal:"&#x1f596;&#x1f3fb;"},{name:"vulcan-salute-type-3",hexadecimal:"&#x1f596;&#x1f3fc;"},{name:"vulcan-salute-type-4",hexadecimal:"&#x1f596;&#x1f3fd;"},{name:"vulcan-salute-type-5",hexadecimal:"&#x1f596;&#x1f3fe;"},{name:"vulcan-salute-type-6",hexadecimal:"&#x1f596;&#x1f3ff;"},{name:"sign-of-the-horns",hexadecimal:"&#x1f918;"},{name:"sign-of-the-horns-type-1-2",hexadecimal:"&#x1f918;&#x1f3fb;"},{name:"sign-of-the-horns-type-3",hexadecimal:"&#x1f918;&#x1f3fc;"},{name:"sign-of-the-horns-type-4",hexadecimal:"&#x1f918;&#x1f3fd;"},{name:"sign-of-the-horns-type-5",hexadecimal:"&#x1f918;&#x1f3fe;"},{name:"sign-of-the-horns-type-6",hexadecimal:"&#x1f918;&#x1f3ff;"},{name:"call-me-hand",hexadecimal:"&#x1f919;"},{name:"call-me-hand-type-1-2",hexadecimal:"&#x1f919;&#x1f3fb;"},{name:"call-me-hand-type-3",hexadecimal:"&#x1f919;&#x1f3fc;"},{name:"call-me-hand-type-4",hexadecimal:"&#x1f919;&#x1f3fd;"},{name:"call-me-hand-type-5",hexadecimal:"&#x1f919;&#x1f3fe;"},{name:"call-me-hand-type-6",hexadecimal:"&#x1f919;&#x1f3ff;"},{name:"raised-hand-with-fingers-splayed",hexadecimal:"&#x1f590;"},{name:"raised-hand-with-fingers-splayed-type-1-2",hexadecimal:"&#x1f590;&#x1f3fb;"},{name:"raised-hand-with-fingers-splayed-type-3",hexadecimal:"&#x1f590;&#x1f3fc;"},{name:"raised-hand-with-fingers-splayed-type-4",hexadecimal:"&#x1f590;&#x1f3fd;"},{name:"raised-hand-with-fingers-splayed-type-5",hexadecimal:"&#x1f590;&#x1f3fe;"},{name:"raised-hand-with-fingers-splayed-type-6",hexadecimal:"&#x1f590;&#x1f3ff;"},{name:"raised-hand",hexadecimal:"&#x270b;"},{name:"raised-hand-type-1-2",hexadecimal:"&#x270b;&#x1f3fb;"},{name:"raised-hand-type-3",hexadecimal:"&#x270b;&#x1f3fc;"},{name:"raised-hand-type-4",hexadecimal:"&#x270b;&#x1f3fd;"},{name:"raised-hand-type-5",hexadecimal:"&#x270b;&#x1f3fe;"},{name:"raised-hand-type-6",hexadecimal:"&#x270b;&#x1f3ff;"},{name:"ok-hand-sign",hexadecimal:"&#x1f44c;"},{name:"ok-hand-type-1-2",hexadecimal:"&#x1f44c;&#x1f3fb;"},{name:"ok-hand-type-3",hexadecimal:"&#x1f44c;&#x1f3fc;"},{name:"ok-hand-type-4",hexadecimal:"&#x1f44c;&#x1f3fd;"},{name:"ok-hand-type-5",hexadecimal:"&#x1f44c;&#x1f3fe;"},{name:"ok-hand-type-6",hexadecimal:"&#x1f44c;&#x1f3ff;"},{name:"thumbs-up-sign",hexadecimal:"&#x1f44d;"},{name:"thumbs-up-type-1-2",hexadecimal:"&#x1f44d;&#x1f3fb;"},{name:"thumbs-up-type-3",hexadecimal:"&#x1f44d;&#x1f3fc;"},{name:"thumbs-up-type-4",hexadecimal:"&#x1f44d;&#x1f3fd;"},{name:"thumbs-up-type-5",hexadecimal:"&#x1f44d;&#x1f3fe;"},{name:"thumbs-up-type-6",hexadecimal:"&#x1f44d;&#x1f3ff;"},{name:"thumbs-down-sign",hexadecimal:"&#x1f44e;"},{name:"thumbs-down-type-1-2",hexadecimal:"&#x1f44e;&#x1f3fb;"},{name:"thumbs-down-type-3",hexadecimal:"&#x1f44e;&#x1f3fc;"},{name:"thumbs-down-type-4",hexadecimal:"&#x1f44e;&#x1f3fd;"},{name:"thumbs-down-type-5",hexadecimal:"&#x1f44e;&#x1f3fe;"},{name:"thumbs-down-type-6",hexadecimal:"&#x1f44e;&#x1f3ff;"},{name:"raised-fist",hexadecimal:"&#x270a;"},{name:"raised-fist-type-1-2",hexadecimal:"&#x270a;&#x1f3fb;"},{name:"raised-fist-type-3",hexadecimal:"&#x270a;&#x1f3fc;"},{name:"raised-fist-type-4",hexadecimal:"&#x270a;&#x1f3fd;"},{name:"raised-fist-type-5",hexadecimal:"&#x270a;&#x1f3fe;"},{name:"raised-fist-type-6",hexadecimal:"&#x270a;&#x1f3ff;"},{name:"fisted-hand-sign",hexadecimal:"&#x1f44a;"},{name:"oncoming-fist-type-1-2",hexadecimal:"&#x1f44a;&#x1f3fb;"},{name:"oncoming-fist-type-3",hexadecimal:"&#x1f44a;&#x1f3fc;"},{name:"oncoming-fist-type-4",hexadecimal:"&#x1f44a;&#x1f3fd;"},{name:"oncoming-fist-type-5",hexadecimal:"&#x1f44a;&#x1f3fe;"},{name:"oncoming-fist-type-6",hexadecimal:"&#x1f44a;&#x1f3ff;"},{name:"left-facing-fist",hexadecimal:"&#x1f91b;"},{name:"left-facing-fist-type-1-2",hexadecimal:"&#x1f91b;&#x1f3fb;"},{name:"left-facing-fist-type-3",hexadecimal:"&#x1f91b;&#x1f3fc;"},{name:"left-facing-fist-type-4",hexadecimal:"&#x1f91b;&#x1f3fd;"},{name:"left-facing-fist-type-5",hexadecimal:"&#x1f91b;&#x1f3fe;"},{name:"left-facing-fist-type-6",hexadecimal:"&#x1f91b;&#x1f3ff;"},{name:"right-facing-fist",hexadecimal:"&#x1f91c;"},{name:"right-facing-fist-type-1-2",hexadecimal:"&#x1f91c;&#x1f3fb;"},{name:"right-facing-fist-type-3",hexadecimal:"&#x1f91c;&#x1f3fc;"},{name:"right-facing-fist-type-4",hexadecimal:"&#x1f91c;&#x1f3fd;"},{name:"right-facing-fist-type-5",hexadecimal:"&#x1f91c;&#x1f3fe;"},{name:"right-facing-fist-type-6",hexadecimal:"&#x1f91c;&#x1f3ff;"},{name:"raised-back-of-hand",hexadecimal:"&#x1f91a;"},{name:"raised-back-of-hand-type-1-2",hexadecimal:"&#x1f91a;&#x1f3fb;"},{name:"raised-back-of-hand-type-3",hexadecimal:"&#x1f91a;&#x1f3fc;"},{name:"raised-back-of-hand-type-4",hexadecimal:"&#x1f91a;&#x1f3fd;"},{name:"raised-back-of-hand-type-5",hexadecimal:"&#x1f91a;&#x1f3fe;"},{name:"raised-back-of-hand-type-6",hexadecimal:"&#x1f91a;&#x1f3ff;"},{name:"waving-hand-sign",hexadecimal:"&#x1f44b;"},{name:"waving-hand-type-1-2",hexadecimal:"&#x1f44b;&#x1f3fb;"},{name:"waving-hand-type-3",hexadecimal:"&#x1f44b;&#x1f3fc;"},{name:"waving-hand-type-4",hexadecimal:"&#x1f44b;&#x1f3fd;"},{name:"waving-hand-type-5",hexadecimal:"&#x1f44b;&#x1f3fe;"},{name:"waving-hand-type-6",hexadecimal:"&#x1f44b;&#x1f3ff;"},{name:"clapping-hands-sign",hexadecimal:"&#x1f44f;"},{name:"clapping-hands-type-1-2",hexadecimal:"&#x1f44f;&#x1f3fb;"},{name:"clapping-hands-type-3",hexadecimal:"&#x1f44f;&#x1f3fc;"},{name:"clapping-hands-type-4",hexadecimal:"&#x1f44f;&#x1f3fd;"},{name:"clapping-hands-type-5",hexadecimal:"&#x1f44f;&#x1f3fe;"},{name:"clapping-hands-type-6",hexadecimal:"&#x1f44f;&#x1f3ff;"},{name:"writing-hand",hexadecimal:"&#x270d;"},{name:"writing-hand-type-1-2",hexadecimal:"&#x270d;&#x1f3fb;"},{name:"writing-hand-type-3",hexadecimal:"&#x270d;&#x1f3fc;"},{name:"writing-hand-type-4",hexadecimal:"&#x270d;&#x1f3fd;"},{name:"writing-hand-type-5",hexadecimal:"&#x270d;&#x1f3fe;"},{name:"writing-hand-type-6",hexadecimal:"&#x270d;&#x1f3ff;"},{name:"open-hands-sign",hexadecimal:"&#x1f450;"},{name:"open-hands-type-1-2",hexadecimal:"&#x1f450;&#x1f3fb;"},{name:"open-hands-type-3",hexadecimal:"&#x1f450;&#x1f3fc;"},{name:"open-hands-type-4",hexadecimal:"&#x1f450;&#x1f3fd;"},{name:"open-hands-type-5",hexadecimal:"&#x1f450;&#x1f3fe;"},{name:"open-hands-type-6",hexadecimal:"&#x1f450;&#x1f3ff;"},{name:"person-raising-both-hands-in-celebration",hexadecimal:"&#x1f64c;"},{name:"person-raising-hands-type-1-2",hexadecimal:"&#x1f64c;&#x1f3fb;"},{name:"person-raising-hands-type-3",hexadecimal:"&#x1f64c;&#x1f3fc;"},{name:"person-raising-hands-type-4",hexadecimal:"&#x1f64c;&#x1f3fd;"},{name:"person-raising-hands-type-5",hexadecimal:"&#x1f64c;&#x1f3fe;"},{name:"person-raising-hands-type-6",hexadecimal:"&#x1f64c;&#x1f3ff;"},{name:"person-with-folded-hands",hexadecimal:"&#x1f64f;"},{name:"folded-hands-type-1-2",hexadecimal:"&#x1f64f;&#x1f3fb;"},{name:"folded-hands-type-3",hexadecimal:"&#x1f64f;&#x1f3fc;"},{name:"folded-hands-type-4",hexadecimal:"&#x1f64f;&#x1f3fd;"},{name:"folded-hands-type-5",hexadecimal:"&#x1f64f;&#x1f3fe;"},{name:"folded-hands-type-6",hexadecimal:"&#x1f64f;&#x1f3ff;"},{name:"handshake",hexadecimal:"&#x1f91d;"},{name:"handshake-type-1-2",hexadecimal:"&#x1f91d;&#x1f3fb;"},{name:"handshake-type-3",hexadecimal:"&#x1f91d;&#x1f3fc;"},{name:"handshake-type-4",hexadecimal:"&#x1f91d;&#x1f3fd;"},{name:"handshake-type-5",hexadecimal:"&#x1f91d;&#x1f3fe;"},{name:"handshake-type-6",hexadecimal:"&#x1f91d;&#x1f3ff;"},{name:"nail-polish",hexadecimal:"&#x1f485;"},{name:"nail-polish-type-1-2",hexadecimal:"&#x1f485;&#x1f3fb;"},{name:"nail-polish-type-3",hexadecimal:"&#x1f485;&#x1f3fc;"},{name:"nail-polish-type-4",hexadecimal:"&#x1f485;&#x1f3fd;"},{name:"nail-polish-type-5",hexadecimal:"&#x1f485;&#x1f3fe;"},{name:"nail-polish-type-6",hexadecimal:"&#x1f485;&#x1f3ff;"},{name:"ear",hexadecimal:"&#x1f442;"},{name:"ear-type-1-2",hexadecimal:"&#x1f442;&#x1f3fb;"},{name:"ear-type-3",hexadecimal:"&#x1f442;&#x1f3fc;"},{name:"ear-type-4",hexadecimal:"&#x1f442;&#x1f3fd;"},{name:"ear-type-5",hexadecimal:"&#x1f442;&#x1f3fe;"},{name:"ear-type-6",hexadecimal:"&#x1f442;&#x1f3ff;"},{name:"nose",hexadecimal:"&#x1f443;"},{name:"nose-type-1-2",hexadecimal:"&#x1f443;&#x1f3fb;"},{name:"nose-type-3",hexadecimal:"&#x1f443;&#x1f3fc;"},{name:"nose-type-4",hexadecimal:"&#x1f443;&#x1f3fd;"},{name:"nose-type-5",hexadecimal:"&#x1f443;&#x1f3fe;"},{name:"nose-type-6",hexadecimal:"&#x1f443;&#x1f3ff;"},{name:"footprints",hexadecimal:"&#x1f463;"},{name:"eyes",hexadecimal:"&#x1f440;"},{name:"eye",hexadecimal:"&#x1f441;"},{name:"eye-left-speech-bubble",hexadecimal:"&#x1f441;&#x200d;&#x1f5e8;"},{name:"tongue",hexadecimal:"&#x1f445;"},{name:"mouth",hexadecimal:"&#x1f444;"},{name:"kiss-mark",hexadecimal:"&#x1f48b;"},{name:"heart-with-arrow",hexadecimal:"&#x1f498;"},{name:"heavy-black-heart",hexadecimal:"&#x2764;"},{name:"beating-heart",hexadecimal:"&#x1f493;"},{name:"broken-heart",hexadecimal:"&#x1f494;"},{name:"two-hearts",hexadecimal:"&#x1f495;"},{name:"sparkling-heart",hexadecimal:"&#x1f496;"},{name:"growing-heart",hexadecimal:"&#x1f497;"},{name:"blue-heart",hexadecimal:"&#x1f499;"},{name:"green-heart",hexadecimal:"&#x1f49a;"},{name:"yellow-heart",hexadecimal:"&#x1f49b;"},{name:"purple-heart",hexadecimal:"&#x1f49c;"},{name:"black-heart",hexadecimal:"&#x1f5a4;"},{name:"heart-with-ribbon",hexadecimal:"&#x1f49d;"},{name:"revolving-hearts",hexadecimal:"&#x1f49e;"},{name:"heart-decoration",hexadecimal:"&#x1f49f;"},{name:"heavy-heart-exclamation-mark-ornament",hexadecimal:"&#x2763;"},{name:"love-letter",hexadecimal:"&#x1f48c;"},{name:"sleeping-symbol",hexadecimal:"&#x1f4a4;"},{name:"anger-symbol",hexadecimal:"&#x1f4a2;"},{name:"bomb",hexadecimal:"&#x1f4a3;"},{name:"collision-symbol",hexadecimal:"&#x1f4a5;"},{name:"splashing-sweat-symbol",hexadecimal:"&#x1f4a6;"},{name:"dash-symbol",hexadecimal:"&#x1f4a8;"},{name:"dizzy-symbol",hexadecimal:"&#x1f4ab;"},{name:"speech-balloon",hexadecimal:"&#x1f4ac;"},{name:"left-speech-bubble",hexadecimal:"&#x1f5e8;"},{name:"right-anger-bubble",hexadecimal:"&#x1f5ef;"},{name:"thought-balloon",hexadecimal:"&#x1f4ad;"},{name:"hole",hexadecimal:"&#x1f573;"},{name:"eyeglasses",hexadecimal:"&#x1f453;"},{name:"dark-sunglasses",hexadecimal:"&#x1f576;"},{name:"necktie",hexadecimal:"&#x1f454;"},{name:"t-shirt",hexadecimal:"&#x1f455;"},{name:"jeans",hexadecimal:"&#x1f456;"},{name:"dress",hexadecimal:"&#x1f457;"},{name:"kimono",hexadecimal:"&#x1f458;"},{name:"bikini",hexadecimal:"&#x1f459;"},{name:"womans-clothes",hexadecimal:"&#x1f45a;"},{name:"purse",hexadecimal:"&#x1f45b;"},{name:"handbag",hexadecimal:"&#x1f45c;"},{name:"pouch",hexadecimal:"&#x1f45d;"},{name:"shopping-bags",hexadecimal:"&#x1f6cd;"},{name:"school-satchel",hexadecimal:"&#x1f392;"},{name:"mans-shoe",hexadecimal:"&#x1f45e;"},{name:"athletic-shoe",hexadecimal:"&#x1f45f;"},{name:"high-heeled-shoe",hexadecimal:"&#x1f460;"},{name:"womans-sandal",hexadecimal:"&#x1f461;"},{name:"womans-boots",hexadecimal:"&#x1f462;"},{name:"crown",hexadecimal:"&#x1f451;"},{name:"womans-hat",hexadecimal:"&#x1f452;"},{name:"top-hat",hexadecimal:"&#x1f3a9;"},{name:"graduation-cap",hexadecimal:"&#x1f393;"},{name:"helmet-with-white-cross",hexadecimal:"&#x26d1;"},{name:"prayer-beads",hexadecimal:"&#x1f4ff;"},{name:"lipstick",hexadecimal:"&#x1f484;"},{name:"ring",hexadecimal:"&#x1f48d;"},{name:"gem-stone",hexadecimal:"&#x1f48e;"},{name:"monkey-face",hexadecimal:"&#x1f435;"},{name:"monkey",hexadecimal:"&#x1f412;"},{name:"gorilla",hexadecimal:"&#x1f98d;"},{name:"dog-face",hexadecimal:"&#x1f436;"},{name:"dog",hexadecimal:"&#x1f415;"},{name:"poodle",hexadecimal:"&#x1f429;"},{name:"wolf-face",hexadecimal:"&#x1f43a;"},{name:"fox-face",hexadecimal:"&#x1f98a;"},{name:"cat-face",hexadecimal:"&#x1f431;"},{name:"cat",hexadecimal:"&#x1f408;"},{name:"lion-face",hexadecimal:"&#x1f981;"},{name:"tiger-face",hexadecimal:"&#x1f42f;"},{name:"tiger",hexadecimal:"&#x1f405;"},{name:"leopard",hexadecimal:"&#x1f406;"},{name:"horse-face",hexadecimal:"&#x1f434;"},{name:"horse",hexadecimal:"&#x1f40e;"},{name:"deer",hexadecimal:"&#x1f98c;"},{name:"unicorn-face",hexadecimal:"&#x1f984;"},{name:"cow-face",hexadecimal:"&#x1f42e;"},{name:"ox",hexadecimal:"&#x1f402;"},{name:"water-buffalo",hexadecimal:"&#x1f403;"},{name:"cow",hexadecimal:"&#x1f404;"},{name:"pig-face",hexadecimal:"&#x1f437;"},{name:"pig",hexadecimal:"&#x1f416;"},{name:"boar",hexadecimal:"&#x1f417;"},{name:"pig-nose",hexadecimal:"&#x1f43d;"},{name:"ram",hexadecimal:"&#x1f40f;"},{name:"sheep",hexadecimal:"&#x1f411;"},{name:"goat",hexadecimal:"&#x1f410;"},{name:"dromedary-camel",hexadecimal:"&#x1f42a;"},{name:"bactrian-camel",hexadecimal:"&#x1f42b;"},{name:"elephant",hexadecimal:"&#x1f418;"},{name:"rhinoceros",hexadecimal:"&#x1f98f;"},{name:"mouse-face",hexadecimal:"&#x1f42d;"},{name:"mouse",hexadecimal:"&#x1f401;"},{name:"rat",hexadecimal:"&#x1f400;"},{name:"hamster-face",hexadecimal:"&#x1f439;"},{name:"rabbit-face",hexadecimal:"&#x1f430;"},{name:"rabbit",hexadecimal:"&#x1f407;"},{name:"chipmunk",hexadecimal:"&#x1f43f;"},{name:"bat",hexadecimal:"&#x1f987;"},{name:"bear-face",hexadecimal:"&#x1f43b;"},{name:"koala",hexadecimal:"&#x1f428;"},{name:"panda-face",hexadecimal:"&#x1f43c;"},{name:"paw-prints",hexadecimal:"&#x1f43e;"},{name:"turkey",hexadecimal:"&#x1f983;"},{name:"chicken",hexadecimal:"&#x1f414;"},{name:"rooster",hexadecimal:"&#x1f413;"},{name:"hatching-chick",hexadecimal:"&#x1f423;"},{name:"baby-chick",hexadecimal:"&#x1f424;"},{name:"front-facing-baby-chick",hexadecimal:"&#x1f425;"},{name:"bird",hexadecimal:"&#x1f426;"},{name:"penguin",hexadecimal:"&#x1f427;"},{name:"dove-of-peace",hexadecimal:"&#x1f54a;"},{name:"eagle",hexadecimal:"&#x1f985;"},{name:"duck",hexadecimal:"&#x1f986;"},{name:"owl",hexadecimal:"&#x1f989;"},{name:"frog-face",hexadecimal:"&#x1f438;"},{name:"crocodile",hexadecimal:"&#x1f40a;"},{name:"turtle",hexadecimal:"&#x1f422;"},{name:"lizard",hexadecimal:"&#x1f98e;"},{name:"snake",hexadecimal:"&#x1f40d;"},{name:"dragon-face",hexadecimal:"&#x1f432;"},{name:"dragon",hexadecimal:"&#x1f409;"},{name:"spouting-whale",hexadecimal:"&#x1f433;"},{name:"whale",hexadecimal:"&#x1f40b;"},{name:"dolphin",hexadecimal:"&#x1f42c;"},{name:"fish",hexadecimal:"&#x1f41f;"},{name:"tropical-fish",hexadecimal:"&#x1f420;"},{name:"blowfish",hexadecimal:"&#x1f421;"},{name:"shark",hexadecimal:"&#x1f988;"},{name:"octopus",hexadecimal:"&#x1f419;"},{name:"spiral-shell",hexadecimal:"&#x1f41a;"},{name:"crab",hexadecimal:"&#x1f980;"},{name:"shrimp",hexadecimal:"&#x1f990;"},{name:"squid",hexadecimal:"&#x1f991;"},{name:"butterfly",hexadecimal:"&#x1f98b;"},{name:"snail",hexadecimal:"&#x1f40c;"},{name:"bug",hexadecimal:"&#x1f41b;"},{name:"ant",hexadecimal:"&#x1f41c;"},{name:"honeybee",hexadecimal:"&#x1f41d;"},{name:"lady-beetle",hexadecimal:"&#x1f41e;"},{name:"spider",hexadecimal:"&#x1f577;"},{name:"spider-web",hexadecimal:"&#x1f578;"},{name:"scorpion",hexadecimal:"&#x1f982;"},{name:"bouquet",hexadecimal:"&#x1f490;"},{name:"cherry-blossom",hexadecimal:"&#x1f338;"},{name:"white-flower",hexadecimal:"&#x1f4ae;"},{name:"rosette",hexadecimal:"&#x1f3f5;"},{name:"rose",hexadecimal:"&#x1f339;"},{name:"wilted-flower",hexadecimal:"&#x1f940;"},{name:"hibiscus",hexadecimal:"&#x1f33a;"},{name:"sunflower",hexadecimal:"&#x1f33b;"},{name:"blossom",hexadecimal:"&#x1f33c;"},{name:"tulip",hexadecimal:"&#x1f337;"},{name:"seedling",hexadecimal:"&#x1f331;"},{name:"evergreen-tree",hexadecimal:"&#x1f332;"},{name:"deciduous-tree",hexadecimal:"&#x1f333;"},{name:"palm-tree",hexadecimal:"&#x1f334;"},{name:"cactus",hexadecimal:"&#x1f335;"},{name:"ear-of-rice",hexadecimal:"&#x1f33e;"},{name:"herb",hexadecimal:"&#x1f33f;"},{name:"shamrock",hexadecimal:"&#x2618;"},{name:"four-leaf-clover",hexadecimal:"&#x1f340;"},{name:"maple-leaf",hexadecimal:"&#x1f341;"},{name:"fallen-leaf",hexadecimal:"&#x1f342;"},{name:"leaf-fluttering-in-wind",hexadecimal:"&#x1f343;"},{name:"grapes",hexadecimal:"&#x1f347;"},{name:"melon",hexadecimal:"&#x1f348;"},{name:"watermelon",hexadecimal:"&#x1f349;"},{name:"tangerine",hexadecimal:"&#x1f34a;"},{name:"lemon",hexadecimal:"&#x1f34b;"},{name:"banana",hexadecimal:"&#x1f34c;"},{name:"pineapple",hexadecimal:"&#x1f34d;"},{name:"red-apple",hexadecimal:"&#x1f34e;"},{name:"green-apple",hexadecimal:"&#x1f34f;"},{name:"pear",hexadecimal:"&#x1f350;"},{name:"peach",hexadecimal:"&#x1f351;"},{name:"cherries",hexadecimal:"&#x1f352;"},{name:"strawberry",hexadecimal:"&#x1f353;"},{name:"kiwifruit",hexadecimal:"&#x1f95d;"},{name:"tomato",hexadecimal:"&#x1f345;"},{name:"avocado",hexadecimal:"&#x1f951;"},{name:"aubergine",hexadecimal:"&#x1f346;"},{name:"potato",hexadecimal:"&#x1f954;"},{name:"carrot",hexadecimal:"&#x1f955;"},{name:"ear-of-maize",hexadecimal:"&#x1f33d;"},{name:"hot-pepper",hexadecimal:"&#x1f336;"},{name:"cucumber",hexadecimal:"&#x1f952;"},{name:"mushroom",hexadecimal:"&#x1f344;"},{name:"peanuts",hexadecimal:"&#x1f95c;"},{name:"chestnut",hexadecimal:"&#x1f330;"},{name:"bread",hexadecimal:"&#x1f35e;"},{name:"croissant",hexadecimal:"&#x1f950;"},{name:"baguette-bread",hexadecimal:"&#x1f956;"},{name:"pancakes",hexadecimal:"&#x1f95e;"},{name:"cheese-wedge",hexadecimal:"&#x1f9c0;"},{name:"meat-on-bone",hexadecimal:"&#x1f356;"},{name:"poultry-leg",hexadecimal:"&#x1f357;"},{name:"bacon",hexadecimal:"&#x1f953;"},{name:"hamburger",hexadecimal:"&#x1f354;"},{name:"french-fries",hexadecimal:"&#x1f35f;"},{name:"slice-of-pizza",hexadecimal:"&#x1f355;"},{name:"hot-dog",hexadecimal:"&#x1f32d;"},{name:"taco",hexadecimal:"&#x1f32e;"},{name:"burrito",hexadecimal:"&#x1f32f;"},{name:"stuffed-flatbread",hexadecimal:"&#x1f959;"},{name:"egg",hexadecimal:"&#x1f95a;"},{name:"cooking",hexadecimal:"&#x1f373;"},{name:"shallow-pan-of-food",hexadecimal:"&#x1f958;"},{name:"pot-of-food",hexadecimal:"&#x1f372;"},{name:"green-salad",hexadecimal:"&#x1f957;"},{name:"popcorn",hexadecimal:"&#x1f37f;"},{name:"bento-box",hexadecimal:"&#x1f371;"},{name:"rice-cracker",hexadecimal:"&#x1f358;"},{name:"rice-ball",hexadecimal:"&#x1f359;"},{name:"cooked-rice",hexadecimal:"&#x1f35a;"},{name:"curry-and-rice",hexadecimal:"&#x1f35b;"},{name:"steaming-bowl",hexadecimal:"&#x1f35c;"},{name:"spaghetti",hexadecimal:"&#x1f35d;"},{name:"roasted-sweet-potato",hexadecimal:"&#x1f360;"},{name:"oden",hexadecimal:"&#x1f362;"},{name:"sushi",hexadecimal:"&#x1f363;"},{name:"fried-shrimp",hexadecimal:"&#x1f364;"},{name:"fish-cake-with-swirl-design",hexadecimal:"&#x1f365;"},{name:"dango",hexadecimal:"&#x1f361;"},{name:"soft-ice-cream",hexadecimal:"&#x1f366;"},{name:"shaved-ice",hexadecimal:"&#x1f367;"},{name:"ice-cream",hexadecimal:"&#x1f368;"},{name:"doughnut",hexadecimal:"&#x1f369;"},{name:"cookie",hexadecimal:"&#x1f36a;"},{name:"birthday-cake",hexadecimal:"&#x1f382;"},{name:"shortcake",hexadecimal:"&#x1f370;"},{name:"chocolate-bar",hexadecimal:"&#x1f36b;"},{name:"candy",hexadecimal:"&#x1f36c;"},{name:"lollipop",hexadecimal:"&#x1f36d;"},{name:"custard",hexadecimal:"&#x1f36e;"},{name:"honey-pot",hexadecimal:"&#x1f36f;"},{name:"baby-bottle",hexadecimal:"&#x1f37c;"},{name:"glass-of-milk",hexadecimal:"&#x1f95b;"},{name:"hot-beverage",hexadecimal:"&#x2615;"},{name:"teacup-without-handle",hexadecimal:"&#x1f375;"},{name:"sake-bottle-and-cup",hexadecimal:"&#x1f376;"},{name:"bottle-with-popping-cork",hexadecimal:"&#x1f37e;"},{name:"wine-glass",hexadecimal:"&#x1f377;"},{name:"cocktail-glass",hexadecimal:"&#x1f378;"},{name:"tropical-drink",hexadecimal:"&#x1f379;"},{name:"beer-mug",hexadecimal:"&#x1f37a;"},{name:"clinking-beer-mugs",hexadecimal:"&#x1f37b;"},{name:"clinking-glasses",hexadecimal:"&#x1f942;"},{name:"tumbler-glass",hexadecimal:"&#x1f943;"},{name:"fork-and-knife-with-plate",hexadecimal:"&#x1f37d;"},{name:"fork-and-knife",hexadecimal:"&#x1f374;"},{name:"spoon",hexadecimal:"&#x1f944;"},{name:"hocho",hexadecimal:"&#x1f52a;"},{name:"amphora",hexadecimal:"&#x1f3fa;"},{name:"earth-globe-europe-africa",hexadecimal:"&#x1f30d;"},{name:"earth-globe-americas",hexadecimal:"&#x1f30e;"},{name:"earth-globe-asia-australia",hexadecimal:"&#x1f30f;"},{name:"globe-with-meridians",hexadecimal:"&#x1f310;"},{name:"world-map",hexadecimal:"&#x1f5fa;"},{name:"silhouette-of-japan",hexadecimal:"&#x1f5fe;"},{name:"snow-capped-mountain",hexadecimal:"&#x1f3d4;"},{name:"mountain",hexadecimal:"&#x26f0;"},{name:"volcano",hexadecimal:"&#x1f30b;"},{name:"mount-fuji",hexadecimal:"&#x1f5fb;"},{name:"camping",hexadecimal:"&#x1f3d5;"},{name:"beach-with-umbrella",hexadecimal:"&#x1f3d6;"},{name:"desert",hexadecimal:"&#x1f3dc;"},{name:"desert-island",hexadecimal:"&#x1f3dd;"},{name:"national-park",hexadecimal:"&#x1f3de;"},{name:"stadium",hexadecimal:"&#x1f3df;"},{name:"classical-building",hexadecimal:"&#x1f3db;"},{name:"building-construction",hexadecimal:"&#x1f3d7;"},{name:"house-buildings",hexadecimal:"&#x1f3d8;"},{name:"cityscape",hexadecimal:"&#x1f3d9;"},{name:"derelict-house-building",hexadecimal:"&#x1f3da;"},{name:"house-building",hexadecimal:"&#x1f3e0;"},{name:"house-with-garden",hexadecimal:"&#x1f3e1;"},{name:"office-building",hexadecimal:"&#x1f3e2;"},{name:"japanese-post-office",hexadecimal:"&#x1f3e3;"},{name:"european-post-office",hexadecimal:"&#x1f3e4;"},{name:"hospital",hexadecimal:"&#x1f3e5;"},{name:"bank",hexadecimal:"&#x1f3e6;"},{name:"hotel",hexadecimal:"&#x1f3e8;"},{name:"love-hotel",hexadecimal:"&#x1f3e9;"},{name:"convenience-store",hexadecimal:"&#x1f3ea;"},{name:"school",hexadecimal:"&#x1f3eb;"},{name:"department-store",hexadecimal:"&#x1f3ec;"},{name:"factory",hexadecimal:"&#x1f3ed;"},{name:"japanese-castle",hexadecimal:"&#x1f3ef;"},{name:"european-castle",hexadecimal:"&#x1f3f0;"},{name:"wedding",hexadecimal:"&#x1f492;"},{name:"tokyo-tower",hexadecimal:"&#x1f5fc;"},{name:"statue-of-liberty",hexadecimal:"&#x1f5fd;"},{name:"church",hexadecimal:"&#x26ea;"},{name:"mosque",hexadecimal:"&#x1f54c;"},{name:"synagogue",hexadecimal:"&#x1f54d;"},{name:"shinto-shrine",hexadecimal:"&#x26e9;"},{name:"kaaba",hexadecimal:"&#x1f54b;"},{name:"fountain",hexadecimal:"&#x26f2;"},{name:"tent",hexadecimal:"&#x26fa;"},{name:"foggy",hexadecimal:"&#x1f301;"},{name:"night-with-stars",hexadecimal:"&#x1f303;"},{name:"sunrise-over-mountains",hexadecimal:"&#x1f304;"},{name:"sunrise",hexadecimal:"&#x1f305;"},{name:"cityscape-at-dusk",hexadecimal:"&#x1f306;"},{name:"sunset-over-buildings",hexadecimal:"&#x1f307;"},{name:"bridge-at-night",hexadecimal:"&#x1f309;"},{name:"hot-springs",hexadecimal:"&#x2668;"},{name:"milky-way",hexadecimal:"&#x1f30c;"},{name:"carousel-horse",hexadecimal:"&#x1f3a0;"},{name:"ferris-wheel",hexadecimal:"&#x1f3a1;"},{name:"roller-coaster",hexadecimal:"&#x1f3a2;"},{name:"barber-pole",hexadecimal:"&#x1f488;"},{name:"circus-tent",hexadecimal:"&#x1f3aa;"},{name:"performing-arts",hexadecimal:"&#x1f3ad;"},{name:"frame-with-picture",hexadecimal:"&#x1f5bc;"},{name:"artist-palette",hexadecimal:"&#x1f3a8;"},{name:"slot-machine",hexadecimal:"&#x1f3b0;"},{name:"steam-locomotive",hexadecimal:"&#x1f682;"},{name:"railway-car",hexadecimal:"&#x1f683;"},{name:"high-speed-train",hexadecimal:"&#x1f684;"},{name:"high-speed-train-with-bullet-nose",hexadecimal:"&#x1f685;"},{name:"train",hexadecimal:"&#x1f686;"},{name:"metro",hexadecimal:"&#x1f687;"},{name:"light-rail",hexadecimal:"&#x1f688;"},{name:"station",hexadecimal:"&#x1f689;"},{name:"tram",hexadecimal:"&#x1f68a;"},{name:"monorail",hexadecimal:"&#x1f69d;"},{name:"mountain-railway",hexadecimal:"&#x1f69e;"},{name:"tram-car",hexadecimal:"&#x1f68b;"},{name:"bus",hexadecimal:"&#x1f68c;"},{name:"oncoming-bus",hexadecimal:"&#x1f68d;"},{name:"trolleybus",hexadecimal:"&#x1f68e;"},{name:"minibus",hexadecimal:"&#x1f690;"},{name:"ambulance",hexadecimal:"&#x1f691;"},{name:"fire-engine",hexadecimal:"&#x1f692;"},{name:"police-car",hexadecimal:"&#x1f693;"},{name:"oncoming-police-car",hexadecimal:"&#x1f694;"},{name:"taxi",hexadecimal:"&#x1f695;"},{name:"oncoming-taxi",hexadecimal:"&#x1f696;"},{name:"automobile",hexadecimal:"&#x1f697;"},{name:"oncoming-automobile",hexadecimal:"&#x1f698;"},{name:"recreational-vehicle",hexadecimal:"&#x1f699;"},{name:"delivery-truck",hexadecimal:"&#x1f69a;"},{name:"articulated-lorry",hexadecimal:"&#x1f69b;"},{name:"tractor",hexadecimal:"&#x1f69c;"},{name:"bicycle",hexadecimal:"&#x1f6b2;"},{name:"scooter",hexadecimal:"&#x1f6f4;"},{name:"motor-scooter",hexadecimal:"&#x1f6f5;"},{name:"racing-car",hexadecimal:"&#x1f3ce;"},{name:"racing-motorcycle",hexadecimal:"&#x1f3cd;"},{name:"bus-stop",hexadecimal:"&#x1f68f;"},{name:"motorway",hexadecimal:"&#x1f6e3;"},{name:"railway-track",hexadecimal:"&#x1f6e4;"},{name:"fuel-pump",hexadecimal:"&#x26fd;"},{name:"police-cars-revolving-light",hexadecimal:"&#x1f6a8;"},{name:"horizontal-traffic-light",hexadecimal:"&#x1f6a5;"},{name:"vertical-traffic-light",hexadecimal:"&#x1f6a6;"},{name:"construction-sign",hexadecimal:"&#x1f6a7;"},{name:"octagonal-sign",hexadecimal:"&#x1f6d1;"},{name:"anchor",hexadecimal:"&#x2693;"},{name:"sailboat",hexadecimal:"&#x26f5;"},{name:"canoe",hexadecimal:"&#x1f6f6;"},{name:"speedboat",hexadecimal:"&#x1f6a4;"},{name:"passenger-ship",hexadecimal:"&#x1f6f3;"},{name:"ferry",hexadecimal:"&#x26f4;"},{name:"motor-boat",hexadecimal:"&#x1f6e5;"},{name:"ship",hexadecimal:"&#x1f6a2;"},{name:"airplane",hexadecimal:"&#x2708;"},{name:"small-airplane",hexadecimal:"&#x1f6e9;"},{name:"airplane-departure",hexadecimal:"&#x1f6eb;"},{name:"airplane-arriving",hexadecimal:"&#x1f6ec;"},{name:"seat",hexadecimal:"&#x1f4ba;"},{name:"helicopter",hexadecimal:"&#x1f681;"},{name:"suspension-railway",hexadecimal:"&#x1f69f;"},{name:"mountain-cableway",hexadecimal:"&#x1f6a0;"},{name:"aerial-tramway",hexadecimal:"&#x1f6a1;"},{name:"rocket",hexadecimal:"&#x1f680;"},{name:"satellite",hexadecimal:"&#x1f6f0;"},{name:"bellhop-bell",hexadecimal:"&#x1f6ce;"},{name:"door",hexadecimal:"&#x1f6aa;"},{name:"sleeping-accommodation",hexadecimal:"&#x1f6cc;"},{name:"bed",hexadecimal:"&#x1f6cf;"},{name:"couch-and-lamp",hexadecimal:"&#x1f6cb;"},{name:"toilet",hexadecimal:"&#x1f6bd;"},{name:"shower",hexadecimal:"&#x1f6bf;"},{name:"bath",hexadecimal:"&#x1f6c0;"},{name:"person-taking-bath-type-1-2",hexadecimal:"&#x1f6c0;&#x1f3fb;"},{name:"person-taking-bath-type-3",hexadecimal:"&#x1f6c0;&#x1f3fc;"},{name:"person-taking-bath-type-4",hexadecimal:"&#x1f6c0;&#x1f3fd;"},{name:"person-taking-bath-type-5",hexadecimal:"&#x1f6c0;&#x1f3fe;"},{name:"person-taking-bath-type-6",hexadecimal:"&#x1f6c0;&#x1f3ff;"},{name:"bathtub",hexadecimal:"&#x1f6c1;"},{name:"hourglass",hexadecimal:"&#x231b;"},{name:"hourglass-with-flowing-sand",hexadecimal:"&#x23f3;"},{name:"watch",hexadecimal:"&#x231a;"},{name:"alarm-clock",hexadecimal:"&#x23f0;"},{name:"stopwatch",hexadecimal:"&#x23f1;"},{name:"timer-clock",hexadecimal:"&#x23f2;"},{name:"mantelpiece-clock",hexadecimal:"&#x1f570;"},{name:"clock-face-twelve-oclock",hexadecimal:"&#x1f55b;"},{name:"clock-face-twelve-thirty",hexadecimal:"&#x1f567;"},{name:"clock-face-one-oclock",hexadecimal:"&#x1f550;"},{name:"clock-face-one-thirty",hexadecimal:"&#x1f55c;"},{name:"clock-face-two-oclock",hexadecimal:"&#x1f551;"},{name:"clock-face-two-thirty",hexadecimal:"&#x1f55d;"},{name:"clock-face-three-oclock",hexadecimal:"&#x1f552;"},{name:"clock-face-three-thirty",hexadecimal:"&#x1f55e;"},{name:"clock-face-four-oclock",hexadecimal:"&#x1f553;"},{name:"clock-face-four-thirty",hexadecimal:"&#x1f55f;"},{name:"clock-face-five-oclock",hexadecimal:"&#x1f554;"},{name:"clock-face-five-thirty",hexadecimal:"&#x1f560;"},{name:"clock-face-six-oclock",hexadecimal:"&#x1f555;"},{name:"clock-face-six-thirty",hexadecimal:"&#x1f561;"},{name:"clock-face-seven-oclock",hexadecimal:"&#x1f556;"},{name:"clock-face-seven-thirty",hexadecimal:"&#x1f562;"},{name:"clock-face-eight-oclock",hexadecimal:"&#x1f557;"},{name:"clock-face-eight-thirty",hexadecimal:"&#x1f563;"},{name:"clock-face-nine-oclock",hexadecimal:"&#x1f558;"},{name:"clock-face-nine-thirty",hexadecimal:"&#x1f564;"},{name:"clock-face-ten-oclock",hexadecimal:"&#x1f559;"},{name:"clock-face-ten-thirty",hexadecimal:"&#x1f565;"},{name:"clock-face-eleven-oclock",hexadecimal:"&#x1f55a;"},{name:"clock-face-eleven-thirty",hexadecimal:"&#x1f566;"},{name:"new-moon-symbol",hexadecimal:"&#x1f311;"},{name:"waxing-crescent-moon-symbol",hexadecimal:"&#x1f312;"},{name:"first-quarter-moon-symbol",hexadecimal:"&#x1f313;"},{name:"waxing-gibbous-moon-symbol",hexadecimal:"&#x1f314;"},{name:"full-moon-symbol",hexadecimal:"&#x1f315;"},{name:"waning-gibbous-moon-symbol",hexadecimal:"&#x1f316;"},{name:"last-quarter-moon-symbol",hexadecimal:"&#x1f317;"},{name:"waning-crescent-moon-symbol",hexadecimal:"&#x1f318;"},{name:"crescent-moon",hexadecimal:"&#x1f319;"},{name:"new-moon-with-face",hexadecimal:"&#x1f31a;"},{name:"first-quarter-moon-with-face",hexadecimal:"&#x1f31b;"},{name:"last-quarter-moon-with-face",hexadecimal:"&#x1f31c;"},{name:"thermometer",hexadecimal:"&#x1f321;"},{name:"black-sun-with-rays",hexadecimal:"&#x2600;"},{name:"full-moon-with-face",hexadecimal:"&#x1f31d;"},{name:"sun-with-face",hexadecimal:"&#x1f31e;"},{name:"white-medium-star",hexadecimal:"&#x2b50;"},{name:"glowing-star",hexadecimal:"&#x1f31f;"},{name:"shooting-star",hexadecimal:"&#x1f320;"},{name:"cloud",hexadecimal:"&#x2601;"},{name:"sun-behind-cloud",hexadecimal:"&#x26c5;"},{name:"thunder-cloud-and-rain",hexadecimal:"&#x26c8;"},{name:"white-sun-with-small-cloud",hexadecimal:"&#x1f324;"},{name:"white-sun-behind-cloud",hexadecimal:"&#x1f325;"},{name:"white-sun-behind-cloud-with-rain",hexadecimal:"&#x1f326;"},{name:"cloud-with-rain",hexadecimal:"&#x1f327;"},{name:"cloud-with-snow",hexadecimal:"&#x1f328;"},{name:"cloud-with-lightning",hexadecimal:"&#x1f329;"},{name:"cloud-with-tornado",hexadecimal:"&#x1f32a;"},{name:"fog",hexadecimal:"&#x1f32b;"},{name:"wind-blowing-face",hexadecimal:"&#x1f32c;"},{name:"cyclone",hexadecimal:"&#x1f300;"},{name:"rainbow",hexadecimal:"&#x1f308;"},{name:"closed-umbrella",hexadecimal:"&#x1f302;"},{name:"umbrella",hexadecimal:"&#x2602;"},{name:"umbrella-with-rain-drops",hexadecimal:"&#x2614;"},{name:"umbrella-on-ground",hexadecimal:"&#x26f1;"},{name:"high-voltage-sign",hexadecimal:"&#x26a1;"},{name:"snowflake",hexadecimal:"&#x2744;"},{name:"snowman",hexadecimal:"&#x2603;"},{name:"snowman-without-snow",hexadecimal:"&#x26c4;"},{name:"comet",hexadecimal:"&#x2604;"},{name:"fire",hexadecimal:"&#x1f525;"},{name:"droplet",hexadecimal:"&#x1f4a7;"},{name:"water-wave",hexadecimal:"&#x1f30a;"},{name:"jack-o-lantern",hexadecimal:"&#x1f383;"},{name:"christmas-tree",hexadecimal:"&#x1f384;"},{name:"fireworks",hexadecimal:"&#x1f386;"},{name:"firework-sparkler",hexadecimal:"&#x1f387;"},{name:"sparkles",hexadecimal:"&#x2728;"},{name:"balloon",hexadecimal:"&#x1f388;"},{name:"party-popper",hexadecimal:"&#x1f389;"},{name:"confetti-ball",hexadecimal:"&#x1f38a;"},{name:"tanabata-tree",hexadecimal:"&#x1f38b;"},{name:"pine-decoration",hexadecimal:"&#x1f38d;"},{name:"japanese-dolls",hexadecimal:"&#x1f38e;"},{name:"carp-streamer",hexadecimal:"&#x1f38f;"},{name:"wind-chime",hexadecimal:"&#x1f390;"},{name:"moon-viewing-ceremony",hexadecimal:"&#x1f391;"},{name:"ribbon",hexadecimal:"&#x1f380;"},{name:"wrapped-present",hexadecimal:"&#x1f381;"},{name:"reminder-ribbon",hexadecimal:"&#x1f397;"},{name:"admission-tickets",hexadecimal:"&#x1f39f;"},{name:"ticket",hexadecimal:"&#x1f3ab;"},{name:"military-medal",hexadecimal:"&#x1f396;"},{name:"trophy",hexadecimal:"&#x1f3c6;"},{name:"sports-medal",hexadecimal:"&#x1f3c5;"},{name:"first-place-medal",hexadecimal:"&#x1f947;"},{name:"second-place-medal",hexadecimal:"&#x1f948;"},{name:"third-place-medal",hexadecimal:"&#x1f949;"},{name:"soccer-ball",hexadecimal:"&#x26bd;"},{name:"baseball",hexadecimal:"&#x26be;"},{name:"basketball-and-hoop",hexadecimal:"&#x1f3c0;"},{name:"volleyball",hexadecimal:"&#x1f3d0;"},{name:"american-football",hexadecimal:"&#x1f3c8;"},{name:"rugby-football",hexadecimal:"&#x1f3c9;"},{name:"tennis-racquet-and-ball",hexadecimal:"&#x1f3be;"},{name:"billiards",hexadecimal:"&#x1f3b1;"},{name:"bowling",hexadecimal:"&#x1f3b3;"},{name:"cricket-bat-and-ball",hexadecimal:"&#x1f3cf;"},{name:"field-hockey-stick-and-ball",hexadecimal:"&#x1f3d1;"},{name:"ice-hockey-stick-and-puck",hexadecimal:"&#x1f3d2;"},{name:"table-tennis-paddle-and-ball",hexadecimal:"&#x1f3d3;"},{name:"badminton-racquet-and-shuttlecock",hexadecimal:"&#x1f3f8;"},{name:"boxing-glove",hexadecimal:"&#x1f94a;"},{name:"martial-arts-uniform",hexadecimal:"&#x1f94b;"},{name:"goal-net",hexadecimal:"&#x1f945;"},{name:"direct-hit",hexadecimal:"&#x1f3af;"},{name:"flag-in-hole",hexadecimal:"&#x26f3;"},{name:"ice-skate",hexadecimal:"&#x26f8;"},{name:"fishing-pole-and-fish",hexadecimal:"&#x1f3a3;"},{name:"running-shirt-with-sash",hexadecimal:"&#x1f3bd;"},{name:"ski-and-ski-boot",hexadecimal:"&#x1f3bf;"},{name:"fencer",hexadecimal:"&#x1f93a;"},{name:"horse-racing",hexadecimal:"&#x1f3c7;"},{name:"skier",hexadecimal:"&#x26f7;"},{name:"snowboarder",hexadecimal:"&#x1f3c2;"},{name:"golfer",hexadecimal:"&#x1f3cc;"},{name:"surfer",hexadecimal:"&#x1f3c4;"},{name:"person-surfing-type-1-2",hexadecimal:"&#x1f3c4;&#x1f3fb;"},{name:"person-surfing-type-3",hexadecimal:"&#x1f3c4;&#x1f3fc;"},{name:"person-surfing-type-4",hexadecimal:"&#x1f3c4;&#x1f3fd;"},{name:"person-surfing-type-5",hexadecimal:"&#x1f3c4;&#x1f3fe;"},{name:"person-surfing-type-6",hexadecimal:"&#x1f3c4;&#x1f3ff;"},{name:"rowboat",hexadecimal:"&#x1f6a3;"},{name:"person-rowing-boat-type-1-2",hexadecimal:"&#x1f6a3;&#x1f3fb;"},{name:"person-rowing-boat-type-3",hexadecimal:"&#x1f6a3;&#x1f3fc;"},{name:"person-rowing-boat-type-4",hexadecimal:"&#x1f6a3;&#x1f3fd;"},{name:"person-rowing-boat-type-5",hexadecimal:"&#x1f6a3;&#x1f3fe;"},{name:"person-rowing-boat-type-6",hexadecimal:"&#x1f6a3;&#x1f3ff;"},{name:"swimmer",hexadecimal:"&#x1f3ca;"},{name:"person-swimming-type-1-2",hexadecimal:"&#x1f3ca;&#x1f3fb;"},{name:"person-swimming-type-3",hexadecimal:"&#x1f3ca;&#x1f3fc;"},{name:"person-swimming-type-4",hexadecimal:"&#x1f3ca;&#x1f3fd;"},{name:"person-swimming-type-5",hexadecimal:"&#x1f3ca;&#x1f3fe;"},{name:"person-swimming-type-6",hexadecimal:"&#x1f3ca;&#x1f3ff;"},{name:"person-with-ball",hexadecimal:"&#x26f9;"},{name:"person-with-ball-type-1-2",hexadecimal:"&#x26f9;&#x1f3fb;"},{name:"person-with-ball-type-3",hexadecimal:"&#x26f9;&#x1f3fc;"},{name:"person-with-ball-type-4",hexadecimal:"&#x26f9;&#x1f3fd;"},{name:"person-with-ball-type-5",hexadecimal:"&#x26f9;&#x1f3fe;"},{name:"person-with-ball-type-6",hexadecimal:"&#x26f9;&#x1f3ff;"},{name:"weight-lifter",hexadecimal:"&#x1f3cb;"},{name:"person-weight-lifting-type-1-2",hexadecimal:"&#x1f3cb;&#x1f3fb;"},{name:"person-weight-lifting-type-3",hexadecimal:"&#x1f3cb;&#x1f3fc;"},{name:"person-weight-lifting-type-4",hexadecimal:"&#x1f3cb;&#x1f3fd;"},{name:"person-weight-lifting-type-5",hexadecimal:"&#x1f3cb;&#x1f3fe;"},{name:"person-weight-lifting-type-6",hexadecimal:"&#x1f3cb;&#x1f3ff;"},{name:"bicyclist",hexadecimal:"&#x1f6b4;"},{name:"person-biking-type-1-2",hexadecimal:"&#x1f6b4;&#x1f3fb;"},{name:"person-biking-type-3",hexadecimal:"&#x1f6b4;&#x1f3fc;"},{name:"person-biking-type-4",hexadecimal:"&#x1f6b4;&#x1f3fd;"},{name:"person-biking-type-5",hexadecimal:"&#x1f6b4;&#x1f3fe;"},{name:"person-biking-type-6",hexadecimal:"&#x1f6b4;&#x1f3ff;"},{name:"mountain-bicyclist",hexadecimal:"&#x1f6b5;"},{name:"person-mountain-biking-type-1-2",hexadecimal:"&#x1f6b5;&#x1f3fb;"},{name:"person-mountain-biking-type-3",hexadecimal:"&#x1f6b5;&#x1f3fc;"},{name:"person-mountain-biking-type-4",hexadecimal:"&#x1f6b5;&#x1f3fd;"},{name:"person-mountain-biking-type-5",hexadecimal:"&#x1f6b5;&#x1f3fe;"},{name:"person-mountain-biking-type-6",hexadecimal:"&#x1f6b5;&#x1f3ff;"},{name:"person-doing-cartwheel",hexadecimal:"&#x1f938;"},{name:"person-doing-cartwheel-type-1-2",hexadecimal:"&#x1f938;&#x1f3fb;"},{name:"person-doing-cartwheel-type-3",hexadecimal:"&#x1f938;&#x1f3fc;"},{name:"person-doing-cartwheel-type-4",hexadecimal:"&#x1f938;&#x1f3fd;"},{name:"person-doing-cartwheel-type-5",hexadecimal:"&#x1f938;&#x1f3fe;"},{name:"person-doing-cartwheel-type-6",hexadecimal:"&#x1f938;&#x1f3ff;"},{name:"wrestlers",hexadecimal:"&#x1f93c;"},{name:"people-wrestling-type-1-2",hexadecimal:"&#x1f93c;&#x1f3fb;"},{name:"people-wrestling-type-3",hexadecimal:"&#x1f93c;&#x1f3fc;"},{name:"people-wrestling-type-4",hexadecimal:"&#x1f93c;&#x1f3fd;"},{name:"people-wrestling-type-5",hexadecimal:"&#x1f93c;&#x1f3fe;"},{name:"people-wrestling-type-6",hexadecimal:"&#x1f93c;&#x1f3ff;"},{name:"water-polo",hexadecimal:"&#x1f93d;"},{name:"person-playing-water-polo-type-1-2",hexadecimal:"&#x1f93d;&#x1f3fb;"},{name:"person-playing-water-polo-type-3",hexadecimal:"&#x1f93d;&#x1f3fc;"},{name:"person-playing-water-polo-type-4",hexadecimal:"&#x1f93d;&#x1f3fd;"},{name:"person-playing-water-polo-type-5",hexadecimal:"&#x1f93d;&#x1f3fe;"},{name:"person-playing-water-polo-type-6",hexadecimal:"&#x1f93d;&#x1f3ff;"},{name:"handball",hexadecimal:"&#x1f93e;"},{name:"person-playing-handball-type-1-2",hexadecimal:"&#x1f93e;&#x1f3fb;"},{name:"person-playing-handball-type-3",hexadecimal:"&#x1f93e;&#x1f3fc;"},{name:"person-playing-handball-type-4",hexadecimal:"&#x1f93e;&#x1f3fd;"},{name:"person-playing-handball-type-5",hexadecimal:"&#x1f93e;&#x1f3fe;"},{name:"person-playing-handball-type-6",hexadecimal:"&#x1f93e;&#x1f3ff;"},{name:"juggling",hexadecimal:"&#x1f939;"},{name:"person-juggling-type-1-2",hexadecimal:"&#x1f939;&#x1f3fb;"},{name:"person-juggling-type-3",hexadecimal:"&#x1f939;&#x1f3fc;"},{name:"person-juggling-type-4",hexadecimal:"&#x1f939;&#x1f3fd;"},{name:"person-juggling-type-5",hexadecimal:"&#x1f939;&#x1f3fe;"},{name:"person-juggling-type-6",hexadecimal:"&#x1f939;&#x1f3ff;"},{name:"video-game",hexadecimal:"&#x1f3ae;"},{name:"joystick",hexadecimal:"&#x1f579;"},{name:"game-die",hexadecimal:"&#x1f3b2;"},{name:"black-spade-suit",hexadecimal:"&#x2660;"},{name:"black-heart-suit",hexadecimal:"&#x2665;"},{name:"black-diamond-suit",hexadecimal:"&#x2666;"},{name:"black-club-suit",hexadecimal:"&#x2663;"},{name:"playing-card-black-joker",hexadecimal:"&#x1f0cf;"},{name:"mahjong-tile-red-dragon",hexadecimal:"&#x1f004;"},{name:"flower-playing-cards",hexadecimal:"&#x1f3b4;"},{name:"speaker-with-cancellation-stroke",hexadecimal:"&#x1f507;"},{name:"speaker",hexadecimal:"&#x1f508;"},{name:"speaker-with-one-sound-wave",hexadecimal:"&#x1f509;"},{name:"speaker-with-three-sound-waves",hexadecimal:"&#x1f50a;"},{name:"public-address-loudspeaker",hexadecimal:"&#x1f4e2;"},{name:"cheering-megaphone",hexadecimal:"&#x1f4e3;"},{name:"postal-horn",hexadecimal:"&#x1f4ef;"},{name:"bell",hexadecimal:"&#x1f514;"},{name:"bell-with-cancellation-stroke",hexadecimal:"&#x1f515;"},{name:"musical-score",hexadecimal:"&#x1f3bc;"},{name:"musical-note",hexadecimal:"&#x1f3b5;"},{name:"multiple-musical-notes",hexadecimal:"&#x1f3b6;"},{name:"studio-microphone",hexadecimal:"&#x1f399;"},{name:"level-slider",hexadecimal:"&#x1f39a;"},{name:"control-knobs",hexadecimal:"&#x1f39b;"},{name:"microphone",hexadecimal:"&#x1f3a4;"},{name:"headphone",hexadecimal:"&#x1f3a7;"},{name:"radio",hexadecimal:"&#x1f4fb;"},{name:"saxophone",hexadecimal:"&#x1f3b7;"},{name:"guitar",hexadecimal:"&#x1f3b8;"},{name:"musical-keyboard",hexadecimal:"&#x1f3b9;"},{name:"trumpet",hexadecimal:"&#x1f3ba;"},{name:"violin",hexadecimal:"&#x1f3bb;"},{name:"drum-with-drumsticks",hexadecimal:"&#x1f941;"},{name:"mobile-phone",hexadecimal:"&#x1f4f1;"},{name:"mobile-phone-with-rightwards-arrow-at-left",hexadecimal:"&#x1f4f2;"},{name:"black-telephone",hexadecimal:"&#x260e;"},{name:"telephone-receiver",hexadecimal:"&#x1f4de;"},{name:"pager",hexadecimal:"&#x1f4df;"},{name:"fax-machine",hexadecimal:"&#x1f4e0;"},{name:"battery",hexadecimal:"&#x1f50b;"},{name:"electric-plug",hexadecimal:"&#x1f50c;"},{name:"personal-computer",hexadecimal:"&#x1f4bb;"},{name:"desktop-computer",hexadecimal:"&#x1f5a5;"},{name:"printer",hexadecimal:"&#x1f5a8;"},{name:"keyboard",hexadecimal:"&#x2328;"},{name:"three-button-mouse",hexadecimal:"&#x1f5b1;"},{name:"trackball",hexadecimal:"&#x1f5b2;"},{name:"minidisc",hexadecimal:"&#x1f4bd;"},{name:"floppy-disk",hexadecimal:"&#x1f4be;"},{name:"optical-disc",hexadecimal:"&#x1f4bf;"},{name:"dvd",hexadecimal:"&#x1f4c0;"},{name:"movie-camera",hexadecimal:"&#x1f3a5;"},{name:"film-frames",hexadecimal:"&#x1f39e;"},{name:"film-projector",hexadecimal:"&#x1f4fd;"},{name:"clapper-board",hexadecimal:"&#x1f3ac;"},{name:"television",hexadecimal:"&#x1f4fa;"},{name:"camera",hexadecimal:"&#x1f4f7;"},{name:"camera-with-flash",hexadecimal:"&#x1f4f8;"},{name:"video-camera",hexadecimal:"&#x1f4f9;"},{name:"videocassette",hexadecimal:"&#x1f4fc;"},{name:"left-pointing-magnifying-glass",hexadecimal:"&#x1f50d;"},{name:"right-pointing-magnifying-glass",hexadecimal:"&#x1f50e;"},{name:"microscope",hexadecimal:"&#x1f52c;"},{name:"telescope",hexadecimal:"&#x1f52d;"},{name:"satellite-antenna",hexadecimal:"&#x1f4e1;"},{name:"candle",hexadecimal:"&#x1f56f;"},{name:"electric-light-bulb",hexadecimal:"&#x1f4a1;"},{name:"electric-torch",hexadecimal:"&#x1f526;"},{name:"izakaya-lantern",hexadecimal:"&#x1f3ee;"},{name:"notebook-with-decorative-cover",hexadecimal:"&#x1f4d4;"},{name:"closed-book",hexadecimal:"&#x1f4d5;"},{name:"open-book",hexadecimal:"&#x1f4d6;"},{name:"green-book",hexadecimal:"&#x1f4d7;"},{name:"blue-book",hexadecimal:"&#x1f4d8;"},{name:"orange-book",hexadecimal:"&#x1f4d9;"},{name:"books",hexadecimal:"&#x1f4da;"},{name:"notebook",hexadecimal:"&#x1f4d3;"},{name:"ledger",hexadecimal:"&#x1f4d2;"},{name:"page-with-curl",hexadecimal:"&#x1f4c3;"},{name:"scroll",hexadecimal:"&#x1f4dc;"},{name:"page-facing-up",hexadecimal:"&#x1f4c4;"},{name:"newspaper",hexadecimal:"&#x1f4f0;"},{name:"rolled-up-newspaper",hexadecimal:"&#x1f5de;"},{name:"bookmark-tabs",hexadecimal:"&#x1f4d1;"},{name:"bookmark",hexadecimal:"&#x1f516;"},{name:"label",hexadecimal:"&#x1f3f7;"},{name:"money-bag",hexadecimal:"&#x1f4b0;"},{name:"banknote-with-yen-sign",hexadecimal:"&#x1f4b4;"},{name:"banknote-with-dollar-sign",hexadecimal:"&#x1f4b5;"},{name:"banknote-with-euro-sign",hexadecimal:"&#x1f4b6;"},{name:"banknote-with-pound-sign",hexadecimal:"&#x1f4b7;"},{name:"money-with-wings",hexadecimal:"&#x1f4b8;"},{name:"credit-card",hexadecimal:"&#x1f4b3;"},{name:"chart-with-upwards-trend-and-yen-sign",hexadecimal:"&#x1f4b9;"},{name:"currency-exchange",hexadecimal:"&#x1f4b1;"},{name:"heavy-dollar-sign",hexadecimal:"&#x1f4b2;"},{name:"envelope",hexadecimal:"&#x2709;"},{name:"e-mail-symbol",hexadecimal:"&#x1f4e7;"},{name:"incoming-envelope",hexadecimal:"&#x1f4e8;"},{name:"envelope-with-downwards-arrow-above",hexadecimal:"&#x1f4e9;"},{name:"outbox-tray",hexadecimal:"&#x1f4e4;"},{name:"inbox-tray",hexadecimal:"&#x1f4e5;"},{name:"package",hexadecimal:"&#x1f4e6;"},{name:"closed-mailbox-with-raised-flag",hexadecimal:"&#x1f4eb;"},{name:"closed-mailbox-with-lowered-flag",hexadecimal:"&#x1f4ea;"},{name:"open-mailbox-with-raised-flag",hexadecimal:"&#x1f4ec;"},{name:"open-mailbox-with-lowered-flag",hexadecimal:"&#x1f4ed;"},{name:"postbox",hexadecimal:"&#x1f4ee;"},{name:"ballot-box-with-ballot",hexadecimal:"&#x1f5f3;"},{name:"pencil",hexadecimal:"&#x270f;"},{name:"black-nib",hexadecimal:"&#x2712;"},{name:"lower-left-fountain-pen",hexadecimal:"&#x1f58b;"},{name:"lower-left-ballpoint-pen",hexadecimal:"&#x1f58a;"},{name:"lower-left-paintbrush",hexadecimal:"&#x1f58c;"},{name:"lower-left-crayon",hexadecimal:"&#x1f58d;"},{name:"memo",hexadecimal:"&#x1f4dd;"},{name:"briefcase",hexadecimal:"&#x1f4bc;"},{name:"file-folder",hexadecimal:"&#x1f4c1;"},{name:"open-file-folder",hexadecimal:"&#x1f4c2;"},{name:"card-index-dividers",hexadecimal:"&#x1f5c2;"},{name:"calendar",hexadecimal:"&#x1f4c5;"},{name:"tear-off-calendar",hexadecimal:"&#x1f4c6;"},{name:"spiral-note-pad",hexadecimal:"&#x1f5d2;"},{name:"spiral-calendar-pad",hexadecimal:"&#x1f5d3;"},{name:"card-index",hexadecimal:"&#x1f4c7;"},{name:"chart-with-upwards-trend",hexadecimal:"&#x1f4c8;"},{name:"chart-with-downwards-trend",hexadecimal:"&#x1f4c9;"},{name:"bar-chart",hexadecimal:"&#x1f4ca;"},{name:"clipboard",hexadecimal:"&#x1f4cb;"},{name:"pushpin",hexadecimal:"&#x1f4cc;"},{name:"round-pushpin",hexadecimal:"&#x1f4cd;"},{name:"paperclip",hexadecimal:"&#x1f4ce;"},{name:"linked-paperclips",hexadecimal:"&#x1f587;"},{name:"straight-ruler",hexadecimal:"&#x1f4cf;"},{name:"triangular-ruler",hexadecimal:"&#x1f4d0;"},{name:"black-scissors",hexadecimal:"&#x2702;"},{name:"card-file-box",hexadecimal:"&#x1f5c3;"},{name:"file-cabinet",hexadecimal:"&#x1f5c4;"},{name:"wastebasket",hexadecimal:"&#x1f5d1;"},{name:"lock",hexadecimal:"&#x1f512;"},{name:"open-lock",hexadecimal:"&#x1f513;"},{name:"lock-with-ink-pen",hexadecimal:"&#x1f50f;"},{name:"closed-lock-with-key",hexadecimal:"&#x1f510;"},{name:"key",hexadecimal:"&#x1f511;"},{name:"old-key",hexadecimal:"&#x1f5dd;"},{name:"hammer",hexadecimal:"&#x1f528;"},{name:"pick",hexadecimal:"&#x26cf;"},{name:"hammer-and-pick",hexadecimal:"&#x2692;"},{name:"hammer-and-wrench",hexadecimal:"&#x1f6e0;"},{name:"dagger-knife",hexadecimal:"&#x1f5e1;"},{name:"crossed-swords",hexadecimal:"&#x2694;"},{name:"pistol",hexadecimal:"&#x1f52b;"},{name:"bow-and-arrow",hexadecimal:"&#x1f3f9;"},{name:"shield",hexadecimal:"&#x1f6e1;"},{name:"wrench",hexadecimal:"&#x1f527;"},{name:"nut-and-bolt",hexadecimal:"&#x1f529;"},{name:"gear",hexadecimal:"&#x2699;"},{name:"compression",hexadecimal:"&#x1f5dc;"},{name:"alembic",hexadecimal:"&#x2697;"},{name:"scales",hexadecimal:"&#x2696;"},{name:"link-symbol",hexadecimal:"&#x1f517;"},{name:"chains",hexadecimal:"&#x26d3;"},{name:"syringe",hexadecimal:"&#x1f489;"},{name:"pill",hexadecimal:"&#x1f48a;"},{name:"smoking-symbol",hexadecimal:"&#x1f6ac;"},{name:"coffin",hexadecimal:"&#x26b0;"},{name:"funeral-urn",hexadecimal:"&#x26b1;"},{name:"moyai",hexadecimal:"&#x1f5ff;"},{name:"oil-drum",hexadecimal:"&#x1f6e2;"},{name:"crystal-ball",hexadecimal:"&#x1f52e;"},{name:"shopping-trolley",hexadecimal:"&#x1f6d2;"},{name:"automated-teller-machine",hexadecimal:"&#x1f3e7;"},{name:"put-litter-in-its-place-symbol",hexadecimal:"&#x1f6ae;"},{name:"potable-water-symbol",hexadecimal:"&#x1f6b0;"},{name:"wheelchair-symbol",hexadecimal:"&#x267f;"},{name:"mens-symbol",hexadecimal:"&#x1f6b9;"},{name:"womens-symbol",hexadecimal:"&#x1f6ba;"},{name:"restroom",hexadecimal:"&#x1f6bb;"},{name:"baby-symbol",hexadecimal:"&#x1f6bc;"},{name:"water-closet",hexadecimal:"&#x1f6be;"},{name:"passport-control",hexadecimal:"&#x1f6c2;"},{name:"customs",hexadecimal:"&#x1f6c3;"},{name:"baggage-claim",hexadecimal:"&#x1f6c4;"},{name:"left-luggage",hexadecimal:"&#x1f6c5;"},{name:"warning-sign",hexadecimal:"&#x26a0;"},{name:"children-crossing",hexadecimal:"&#x1f6b8;"},{name:"no-entry",hexadecimal:"&#x26d4;"},{name:"no-entry-sign",hexadecimal:"&#x1f6ab;"},{name:"no-bicycles",hexadecimal:"&#x1f6b3;"},{name:"no-smoking-symbol",hexadecimal:"&#x1f6ad;"},{name:"do-not-litter-symbol",hexadecimal:"&#x1f6af;"},{name:"non-potable-water-symbol",hexadecimal:"&#x1f6b1;"},{name:"no-pedestrians",hexadecimal:"&#x1f6b7;"},{name:"no-mobile-phones",hexadecimal:"&#x1f4f5;"},{name:"no-one-under-eighteen-symbol",hexadecimal:"&#x1f51e;"},{name:"radioactive-sign",hexadecimal:"&#x2622;"},{name:"biohazard-sign",hexadecimal:"&#x2623;"},{name:"upwards-black-arrow",hexadecimal:"&#x2b06;"},{name:"north-east-arrow",hexadecimal:"&#x2197;"},{name:"black-rightwards-arrow",hexadecimal:"&#x27a1;"},{name:"south-east-arrow",hexadecimal:"&#x2198;"},{name:"downwards-black-arrow",hexadecimal:"&#x2b07;"},{name:"south-west-arrow",hexadecimal:"&#x2199;"},{name:"leftwards-black-arrow",hexadecimal:"&#x2b05;"},{name:"north-west-arrow",hexadecimal:"&#x2196;"},{name:"up-down-arrow",hexadecimal:"&#x2195;"},{name:"left-right-arrow",hexadecimal:"&#x2194;"},{name:"leftwards-arrow-with-hook",hexadecimal:"&#x21a9;"},{name:"rightwards-arrow-with-hook",hexadecimal:"&#x21aa;"},{name:"arrow-pointing-rightwards-then-curving-upwards",hexadecimal:"&#x2934;"},{name:"arrow-pointing-rightwards-then-curving-downwards",hexadecimal:"&#x2935;"},{name:"clockwise-downwards-and-upwards-open-circle-arrows",hexadecimal:"&#x1f503;"},{name:"anticlockwise-downwards-and-upwards-open-circle-arrows",hexadecimal:"&#x1f504;"},{name:"back-with-leftwards-arrow-above",hexadecimal:"&#x1f519;"},{name:"end-with-leftwards-arrow-above",hexadecimal:"&#x1f51a;"},{name:"on-with-exclamation-mark-with-left-right-arrow-above",hexadecimal:"&#x1f51b;"},{name:"soon-with-rightwards-arrow-above",hexadecimal:"&#x1f51c;"},{name:"top-with-upwards-arrow-above",hexadecimal:"&#x1f51d;"},{name:"place-of-worship",hexadecimal:"&#x1f6d0;"},{name:"atom-symbol",hexadecimal:"&#x269b;"},{name:"om-symbol",hexadecimal:"&#x1f549;"},{name:"star-of-david",hexadecimal:"&#x2721;"},{name:"wheel-of-dharma",hexadecimal:"&#x2638;"},{name:"yin-yang",hexadecimal:"&#x262f;"},{name:"latin-cross",hexadecimal:"&#x271d;"},{name:"orthodox-cross",hexadecimal:"&#x2626;"},{name:"star-and-crescent",hexadecimal:"&#x262a;"},{name:"peace-symbol",hexadecimal:"&#x262e;"},{name:"menorah-with-nine-branches",hexadecimal:"&#x1f54e;"},{name:"six-pointed-star-with-middle-dot",hexadecimal:"&#x1f52f;"},{name:"black-universal-recycling-symbol",hexadecimal:"&#x267b;"},{name:"name-badge",hexadecimal:"&#x1f4db;"},{name:"fleur-de-lis",hexadecimal:"&#x269c;"},{name:"japanese-symbol-for-beginner",hexadecimal:"&#x1f530;"},{name:"trident-emblem",hexadecimal:"&#x1f531;"},{name:"heavy-large-circle",hexadecimal:"&#x2b55;"},{name:"white-heavy-check-mark",hexadecimal:"&#x2705;"},{name:"ballot-box-with-check",hexadecimal:"&#x2611;"},{name:"heavy-check-mark",hexadecimal:"&#x2714;"},{name:"heavy-multiplication-x",hexadecimal:"&#x2716;"},{name:"cross-mark",hexadecimal:"&#x274c;"},{name:"negative-squared-cross-mark",hexadecimal:"&#x274e;"},{name:"heavy-plus-sign",hexadecimal:"&#x2795;"},{name:"heavy-minus-sign",hexadecimal:"&#x2796;"},{name:"heavy-division-sign",hexadecimal:"&#x2797;"},{name:"curly-loop",hexadecimal:"&#x27b0;"},{name:"double-curly-loop",hexadecimal:"&#x27bf;"},{name:"part-alternation-mark",hexadecimal:"&#x303d;"},{name:"eight-spoked-asterisk",hexadecimal:"&#x2733;"},{name:"eight-pointed-black-star",hexadecimal:"&#x2734;"},{name:"sparkle",hexadecimal:"&#x2747;"},{name:"double-exclamation-mark",hexadecimal:"&#x203c;"},{name:"exclamation-question-mark",hexadecimal:"&#x2049;"},{name:"black-question-mark-ornament",hexadecimal:"&#x2753;"},{name:"white-question-mark-ornament",hexadecimal:"&#x2754;"},{name:"white-exclamation-mark-ornament",hexadecimal:"&#x2755;"},{name:"heavy-exclamation-mark-symbol",hexadecimal:"&#x2757;"},{name:"wavy-dash",hexadecimal:"&#x3030;"},{name:"copyright-sign",hexadecimal:"&#x00a9;"},{name:"registered-sign",hexadecimal:"&#x00ae;"},{name:"trade-mark-sign",hexadecimal:"&#x2122;"},{name:"aries",hexadecimal:"&#x2648;"},{name:"taurus",hexadecimal:"&#x2649;"},{name:"gemini",hexadecimal:"&#x264a;"},{name:"cancer",hexadecimal:"&#x264b;"},{name:"leo",hexadecimal:"&#x264c;"},{name:"virgo",hexadecimal:"&#x264d;"},{name:"libra",hexadecimal:"&#x264e;"},{name:"scorpius",hexadecimal:"&#x264f;"},{name:"sagittarius",hexadecimal:"&#x2650;"},{name:"capricorn",hexadecimal:"&#x2651;"},{name:"aquarius",hexadecimal:"&#x2652;"},{name:"pisces",hexadecimal:"&#x2653;"},{name:"ophiuchus",hexadecimal:"&#x26ce;"},{name:"twisted-rightwards-arrows",hexadecimal:"&#x1f500;"},{name:"clockwise-rightwards-and-leftwards-open-circle-arrows",hexadecimal:"&#x1f501;"},{name:"clockwise-rightwards-and-leftwards-open-circle-arrows-with-circled-one-overlay",hexadecimal:"&#x1f502;"},{name:"black-right-pointing-triangle",hexadecimal:"&#x25b6;"},{name:"black-right-pointing-double-triangle",hexadecimal:"&#x23e9;"},{name:"black-right-pointing-double-triangle-with-vertical-bar",hexadecimal:"&#x23ed;"},{name:"black-right-pointing-triangle-with-double-vertical-bar",hexadecimal:"&#x23ef;"},{name:"black-left-pointing-triangle",hexadecimal:"&#x25c0;"},{name:"black-left-pointing-double-triangle",hexadecimal:"&#x23ea;"},{name:"black-left-pointing-double-triangle-with-vertical-bar",hexadecimal:"&#x23ee;"},{name:"up-pointing-small-red-triangle",hexadecimal:"&#x1f53c;"},{name:"black-up-pointing-double-triangle",hexadecimal:"&#x23eb;"},{name:"down-pointing-small-red-triangle",hexadecimal:"&#x1f53d;"},{name:"black-down-pointing-double-triangle",hexadecimal:"&#x23ec;"},{name:"double-vertical-bar",hexadecimal:"&#x23f8;"},{name:"black-square-for-stop",hexadecimal:"&#x23f9;"},{name:"black-circle-for-record",hexadecimal:"&#x23fa;"},{name:"eject-symbol",hexadecimal:"&#x23cf;"},{name:"cinema",hexadecimal:"&#x1f3a6;"},{name:"low-brightness-symbol",hexadecimal:"&#x1f505;"},{name:"high-brightness-symbol",hexadecimal:"&#x1f506;"},{name:"antenna-with-bars",hexadecimal:"&#x1f4f6;"},{name:"vibration-mode",hexadecimal:"&#x1f4f3;"},{name:"mobile-phone-off",hexadecimal:"&#x1f4f4;"},{name:"keycap-#",hexadecimal:"&#x0023;&#xfe0f;&#x20e3;"},{name:"keycap-*",hexadecimal:"&#x002a;&#xfe0f;&#x20e3;"},{name:"keycap-0",hexadecimal:"&#x0030;&#xfe0f;&#x20e3;"},{name:"keycap-1",hexadecimal:"&#x0031;&#xfe0f;&#x20e3;"},{name:"keycap-2",hexadecimal:"&#x0032;&#xfe0f;&#x20e3;"},{name:"keycap-3",hexadecimal:"&#x0033;&#xfe0f;&#x20e3;"},{name:"keycap-4",hexadecimal:"&#x0034;&#xfe0f;&#x20e3;"},{name:"keycap-5",hexadecimal:"&#x0035;&#xfe0f;&#x20e3;"},{name:"keycap-6",hexadecimal:"&#x0036;&#xfe0f;&#x20e3;"},{name:"keycap-7",hexadecimal:"&#x0037;&#xfe0f;&#x20e3;"},{name:"keycap-8",hexadecimal:"&#x0038;&#xfe0f;&#x20e3;"},{name:"keycap-9",hexadecimal:"&#x0039;&#xfe0f;&#x20e3;"},{name:"keycap-ten",hexadecimal:"&#x1f51f;"},{name:"hundred-points-symbol",hexadecimal:"&#x1f4af;"},{name:"input-symbol-for-latin-capital-letters",hexadecimal:"&#x1f520;"},{name:"input-symbol-for-latin-small-letters",hexadecimal:"&#x1f521;"},{name:"input-symbol-for-numbers",hexadecimal:"&#x1f522;"},{name:"input-symbol-for-symbols",hexadecimal:"&#x1f523;"},{name:"input-symbol-for-latin-letters",hexadecimal:"&#x1f524;"},{name:"negative-squared-latin-capital-letter-a",hexadecimal:"&#x1f170;"},{name:"negative-squared-ab",hexadecimal:"&#x1f18e;"},{name:"negative-squared-latin-capital-letter-b",hexadecimal:"&#x1f171;"},{name:"squared-cl",hexadecimal:"&#x1f191;"},{name:"squared-cool",hexadecimal:"&#x1f192;"},{name:"squared-free",hexadecimal:"&#x1f193;"},{name:"information-source",hexadecimal:"&#x2139;"},{name:"squared-id",hexadecimal:"&#x1f194;"},{name:"circled-latin-capital-letter-m",hexadecimal:"&#x24c2;"},{name:"squared-new",hexadecimal:"&#x1f195;"},{name:"squared-ng",hexadecimal:"&#x1f196;"},{name:"negative-squared-latin-capital-letter-o",hexadecimal:"&#x1f17e;"},{name:"squared-ok",hexadecimal:"&#x1f197;"},{name:"negative-squared-latin-capital-letter-p",hexadecimal:"&#x1f17f;"},{name:"squared-sos",hexadecimal:"&#x1f198;"},{name:"squared-up-with-exclamation-mark",hexadecimal:"&#x1f199;"},{name:"squared-vs",hexadecimal:"&#x1f19a;"},{name:"squared-katakana-koko",hexadecimal:"&#x1f201;"},{name:"squared-katakana-sa",hexadecimal:"&#x1f202;"},{name:"squared-cjk-unified-ideograph-6708",hexadecimal:"&#x1f237;"},{name:"squared-cjk-unified-ideograph-6709",hexadecimal:"&#x1f236;"},{name:"squared-cjk-unified-ideograph-6307",hexadecimal:"&#x1f22f;"},{name:"circled-ideograph-advantage",hexadecimal:"&#x1f250;"},{name:"squared-cjk-unified-ideograph-5272",hexadecimal:"&#x1f239;"},{name:"squared-cjk-unified-ideograph-7121",hexadecimal:"&#x1f21a;"},{name:"squared-cjk-unified-ideograph-7981",hexadecimal:"&#x1f232;"},{name:"circled-ideograph-accept",hexadecimal:"&#x1f251;"},{name:"squared-cjk-unified-ideograph-7533",hexadecimal:"&#x1f238;"},{name:"squared-cjk-unified-ideograph-5408",hexadecimal:"&#x1f234;"},{name:"squared-cjk-unified-ideograph-7a7a",hexadecimal:"&#x1f233;"},{name:"circled-ideograph-congratulation",hexadecimal:"&#x3297;"},{name:"circled-ideograph-secret",hexadecimal:"&#x3299;"},{name:"squared-cjk-unified-ideograph-55b6",hexadecimal:"&#x1f23a;"},{name:"squared-cjk-unified-ideograph-6e80",hexadecimal:"&#x1f235;"},{name:"black-small-square",hexadecimal:"&#x25aa;"},{name:"white-small-square",hexadecimal:"&#x25ab;"},{name:"white-medium-square",hexadecimal:"&#x25fb;"},{name:"black-medium-square",hexadecimal:"&#x25fc;"},{name:"white-medium-small-square",hexadecimal:"&#x25fd;"},{name:"black-medium-small-square",hexadecimal:"&#x25fe;"},{name:"black-large-square",hexadecimal:"&#x2b1b;"},{name:"white-large-square",hexadecimal:"&#x2b1c;"},{name:"large-orange-diamond",hexadecimal:"&#x1f536;"},{name:"large-blue-diamond",hexadecimal:"&#x1f537;"},{name:"small-orange-diamond",hexadecimal:"&#x1f538;"},{name:"small-blue-diamond",hexadecimal:"&#x1f539;"},{name:"up-pointing-red-triangle",hexadecimal:"&#x1f53a;"},{name:"down-pointing-red-triangle",hexadecimal:"&#x1f53b;"},{name:"diamond-shape-with-a-dot-inside",hexadecimal:"&#x1f4a0;"},{name:"radio-button",hexadecimal:"&#x1f518;"},{name:"black-square-button",hexadecimal:"&#x1f532;"},{name:"white-square-button",hexadecimal:"&#x1f533;"},{name:"medium-white-circle",hexadecimal:"&#x26aa;"},{name:"medium-black-circle",hexadecimal:"&#x26ab;"},{name:"large-red-circle",hexadecimal:"&#x1f534;"},{name:"large-blue-circle",hexadecimal:"&#x1f535;"},{name:"chequered-flag",hexadecimal:"&#x1f3c1;"},{name:"triangular-flag-on-post",hexadecimal:"&#x1f6a9;"},{name:"crossed-flags",hexadecimal:"&#x1f38c;"},{name:"waving-black-flag",hexadecimal:"&#x1f3f4;"},{name:"waving-white-flag",hexadecimal:"&#x1f3f3;"},{name:"ascension-island",hexadecimal:"&#x1f1e6;&#x1f1e8;"},{name:"andorra",hexadecimal:"&#x1f1e6;&#x1f1e9;"},{name:"united-arab-emirates",hexadecimal:"&#x1f1e6;&#x1f1ea;"},{name:"afghanistan",hexadecimal:"&#x1f1e6;&#x1f1eb;"},{name:"antigua-&-barbuda",hexadecimal:"&#x1f1e6;&#x1f1ec;"},{name:"anguilla",hexadecimal:"&#x1f1e6;&#x1f1ee;"},{name:"albania",hexadecimal:"&#x1f1e6;&#x1f1f1;"},{name:"armenia",hexadecimal:"&#x1f1e6;&#x1f1f2;"},{name:"angola",hexadecimal:"&#x1f1e6;&#x1f1f4;"},{name:"antarctica",hexadecimal:"&#x1f1e6;&#x1f1f6;"},{name:"argentina",hexadecimal:"&#x1f1e6;&#x1f1f7;"},{name:"american-samoa",hexadecimal:"&#x1f1e6;&#x1f1f8;"},{name:"austria",hexadecimal:"&#x1f1e6;&#x1f1f9;"},{name:"australia",hexadecimal:"&#x1f1e6;&#x1f1fa;"},{name:"aruba",hexadecimal:"&#x1f1e6;&#x1f1fc;"},{name:"ã…land-islands",hexadecimal:"&#x1f1e6;&#x1f1fd;"},{name:"azerbaijan",hexadecimal:"&#x1f1e6;&#x1f1ff;"},{name:"bosnia-&-herzegovina",hexadecimal:"&#x1f1e7;&#x1f1e6;"},{name:"barbados",hexadecimal:"&#x1f1e7;&#x1f1e7;"},{name:"bangladesh",hexadecimal:"&#x1f1e7;&#x1f1e9;"},{name:"belgium",hexadecimal:"&#x1f1e7;&#x1f1ea;"},{name:"burkina-faso",hexadecimal:"&#x1f1e7;&#x1f1eb;"},{name:"bulgaria",hexadecimal:"&#x1f1e7;&#x1f1ec;"},{name:"bahrain",hexadecimal:"&#x1f1e7;&#x1f1ed;"},{name:"burundi",hexadecimal:"&#x1f1e7;&#x1f1ee;"},{name:"benin",hexadecimal:"&#x1f1e7;&#x1f1ef;"},{name:"st.-barthã©lemy",hexadecimal:"&#x1f1e7;&#x1f1f1;"},{name:"bermuda",hexadecimal:"&#x1f1e7;&#x1f1f2;"},{name:"brunei",hexadecimal:"&#x1f1e7;&#x1f1f3;"},{name:"bolivia",hexadecimal:"&#x1f1e7;&#x1f1f4;"},{name:"caribbean-netherlands",hexadecimal:"&#x1f1e7;&#x1f1f6;"},{name:"brazil",hexadecimal:"&#x1f1e7;&#x1f1f7;"},{name:"bahamas",hexadecimal:"&#x1f1e7;&#x1f1f8;"},{name:"bhutan",hexadecimal:"&#x1f1e7;&#x1f1f9;"},{name:"bouvet-island",hexadecimal:"&#x1f1e7;&#x1f1fb;"},{name:"botswana",hexadecimal:"&#x1f1e7;&#x1f1fc;"},{name:"belarus",hexadecimal:"&#x1f1e7;&#x1f1fe;"},{name:"belize",hexadecimal:"&#x1f1e7;&#x1f1ff;"},{name:"canada",hexadecimal:"&#x1f1e8;&#x1f1e6;"},{name:"cocos-(keeling)-islands",hexadecimal:"&#x1f1e8;&#x1f1e8;"},{name:"congo-kinshasa",hexadecimal:"&#x1f1e8;&#x1f1e9;"},{name:"central-african-republic",hexadecimal:"&#x1f1e8;&#x1f1eb;"},{name:"congo-brazzaville",hexadecimal:"&#x1f1e8;&#x1f1ec;"},{name:"switzerland",hexadecimal:"&#x1f1e8;&#x1f1ed;"},{name:"cã´te-d’ivoire",hexadecimal:"&#x1f1e8;&#x1f1ee;"},{name:"cook-islands",hexadecimal:"&#x1f1e8;&#x1f1f0;"},{name:"chile",hexadecimal:"&#x1f1e8;&#x1f1f1;"},{name:"cameroon",hexadecimal:"&#x1f1e8;&#x1f1f2;"},{name:"china",hexadecimal:"&#x1f1e8;&#x1f1f3;"},{name:"colombia",hexadecimal:"&#x1f1e8;&#x1f1f4;"},{name:"clipperton-island",hexadecimal:"&#x1f1e8;&#x1f1f5;"},{name:"costa-rica",hexadecimal:"&#x1f1e8;&#x1f1f7;"},{name:"cuba",hexadecimal:"&#x1f1e8;&#x1f1fa;"},{name:"cape-verde",hexadecimal:"&#x1f1e8;&#x1f1fb;"},{name:"curaã§ao",hexadecimal:"&#x1f1e8;&#x1f1fc;"},{name:"christmas-island",hexadecimal:"&#x1f1e8;&#x1f1fd;"},{name:"cyprus",hexadecimal:"&#x1f1e8;&#x1f1fe;"},{name:"czech-republic",hexadecimal:"&#x1f1e8;&#x1f1ff;"},{name:"germany",hexadecimal:"&#x1f1e9;&#x1f1ea;"},{name:"diego-garcia",hexadecimal:"&#x1f1e9;&#x1f1ec;"},{name:"djibouti",hexadecimal:"&#x1f1e9;&#x1f1ef;"},{name:"denmark",hexadecimal:"&#x1f1e9;&#x1f1f0;"},{name:"dominica",hexadecimal:"&#x1f1e9;&#x1f1f2;"},{name:"dominican-republic",hexadecimal:"&#x1f1e9;&#x1f1f4;"},{name:"algeria",hexadecimal:"&#x1f1e9;&#x1f1ff;"},{name:"ceuta-&-melilla",hexadecimal:"&#x1f1ea;&#x1f1e6;"},{name:"ecuador",hexadecimal:"&#x1f1ea;&#x1f1e8;"},{name:"estonia",hexadecimal:"&#x1f1ea;&#x1f1ea;"},{name:"egypt",hexadecimal:"&#x1f1ea;&#x1f1ec;"},{name:"western-sahara",hexadecimal:"&#x1f1ea;&#x1f1ed;"},{name:"eritrea",hexadecimal:"&#x1f1ea;&#x1f1f7;"},{name:"spain",hexadecimal:"&#x1f1ea;&#x1f1f8;"},{name:"ethiopia",hexadecimal:"&#x1f1ea;&#x1f1f9;"},{name:"european-union",hexadecimal:"&#x1f1ea;&#x1f1fa;"},{name:"finland",hexadecimal:"&#x1f1eb;&#x1f1ee;"},{name:"fiji",hexadecimal:"&#x1f1eb;&#x1f1ef;"},{name:"falkland-islands",hexadecimal:"&#x1f1eb;&#x1f1f0;"},{name:"micronesia",hexadecimal:"&#x1f1eb;&#x1f1f2;"},{name:"faroe-islands",hexadecimal:"&#x1f1eb;&#x1f1f4;"},{name:"france",hexadecimal:"&#x1f1eb;&#x1f1f7;"},{name:"gabon",hexadecimal:"&#x1f1ec;&#x1f1e6;"},{name:"united-kingdom",hexadecimal:"&#x1f1ec;&#x1f1e7;"},{name:"grenada",hexadecimal:"&#x1f1ec;&#x1f1e9;"},{name:"georgia",hexadecimal:"&#x1f1ec;&#x1f1ea;"},{name:"french-guiana",hexadecimal:"&#x1f1ec;&#x1f1eb;"},{name:"guernsey",hexadecimal:"&#x1f1ec;&#x1f1ec;"},{name:"ghana",hexadecimal:"&#x1f1ec;&#x1f1ed;"},{name:"gibraltar",hexadecimal:"&#x1f1ec;&#x1f1ee;"},{name:"greenland",hexadecimal:"&#x1f1ec;&#x1f1f1;"},{name:"gambia",hexadecimal:"&#x1f1ec;&#x1f1f2;"},{name:"guinea",hexadecimal:"&#x1f1ec;&#x1f1f3;"},{name:"guadeloupe",hexadecimal:"&#x1f1ec;&#x1f1f5;"},{name:"equatorial-guinea",hexadecimal:"&#x1f1ec;&#x1f1f6;"},{name:"greece",hexadecimal:"&#x1f1ec;&#x1f1f7;"},{name:"south-georgia-&-south-sandwich-islands",hexadecimal:"&#x1f1ec;&#x1f1f8;"},{name:"guatemala",hexadecimal:"&#x1f1ec;&#x1f1f9;"},{name:"guam",hexadecimal:"&#x1f1ec;&#x1f1fa;"},{name:"guinea-bissau",hexadecimal:"&#x1f1ec;&#x1f1fc;"},{name:"guyana",hexadecimal:"&#x1f1ec;&#x1f1fe;"},{name:"hong-kong-sar-china",hexadecimal:"&#x1f1ed;&#x1f1f0;"},{name:"heard-&-mcdonald-islands",hexadecimal:"&#x1f1ed;&#x1f1f2;"},{name:"honduras",hexadecimal:"&#x1f1ed;&#x1f1f3;"},{name:"croatia",hexadecimal:"&#x1f1ed;&#x1f1f7;"},{name:"haiti",hexadecimal:"&#x1f1ed;&#x1f1f9;"},{name:"hungary",hexadecimal:"&#x1f1ed;&#x1f1fa;"},{name:"canary-islands",hexadecimal:"&#x1f1ee;&#x1f1e8;"},{name:"indonesia",hexadecimal:"&#x1f1ee;&#x1f1e9;"},{name:"ireland",hexadecimal:"&#x1f1ee;&#x1f1ea;"},{name:"israel",hexadecimal:"&#x1f1ee;&#x1f1f1;"},{name:"isle-of-man",hexadecimal:"&#x1f1ee;&#x1f1f2;"},{name:"india",hexadecimal:"&#x1f1ee;&#x1f1f3;"},{name:"british-indian-ocean-territory",hexadecimal:"&#x1f1ee;&#x1f1f4;"},{name:"iraq",hexadecimal:"&#x1f1ee;&#x1f1f6;"},{name:"iran",hexadecimal:"&#x1f1ee;&#x1f1f7;"},{name:"iceland",hexadecimal:"&#x1f1ee;&#x1f1f8;"},{name:"italy",hexadecimal:"&#x1f1ee;&#x1f1f9;"},{name:"jersey",hexadecimal:"&#x1f1ef;&#x1f1ea;"},{name:"jamaica",hexadecimal:"&#x1f1ef;&#x1f1f2;"},{name:"jordan",hexadecimal:"&#x1f1ef;&#x1f1f4;"},{name:"japan",hexadecimal:"&#x1f1ef;&#x1f1f5;"},{name:"kenya",hexadecimal:"&#x1f1f0;&#x1f1ea;"},{name:"kyrgyzstan",hexadecimal:"&#x1f1f0;&#x1f1ec;"},{name:"cambodia",hexadecimal:"&#x1f1f0;&#x1f1ed;"},{name:"kiribati",hexadecimal:"&#x1f1f0;&#x1f1ee;"},{name:"comoros",hexadecimal:"&#x1f1f0;&#x1f1f2;"},{name:"st.-kitts-&-nevis",hexadecimal:"&#x1f1f0;&#x1f1f3;"},{name:"north-korea",hexadecimal:"&#x1f1f0;&#x1f1f5;"},{name:"south-korea",hexadecimal:"&#x1f1f0;&#x1f1f7;"},{name:"kuwait",hexadecimal:"&#x1f1f0;&#x1f1fc;"},{name:"cayman-islands",hexadecimal:"&#x1f1f0;&#x1f1fe;"},{name:"kazakhstan",hexadecimal:"&#x1f1f0;&#x1f1ff;"},{name:"laos",hexadecimal:"&#x1f1f1;&#x1f1e6;"},{name:"lebanon",hexadecimal:"&#x1f1f1;&#x1f1e7;"},{name:"st.-lucia",hexadecimal:"&#x1f1f1;&#x1f1e8;"},{name:"liechtenstein",hexadecimal:"&#x1f1f1;&#x1f1ee;"},{name:"sri-lanka",hexadecimal:"&#x1f1f1;&#x1f1f0;"},{name:"liberia",hexadecimal:"&#x1f1f1;&#x1f1f7;"},{name:"lesotho",hexadecimal:"&#x1f1f1;&#x1f1f8;"},{name:"lithuania",hexadecimal:"&#x1f1f1;&#x1f1f9;"},{name:"luxembourg",hexadecimal:"&#x1f1f1;&#x1f1fa;"},{name:"latvia",hexadecimal:"&#x1f1f1;&#x1f1fb;"},{name:"libya",hexadecimal:"&#x1f1f1;&#x1f1fe;"},{name:"morocco",hexadecimal:"&#x1f1f2;&#x1f1e6;"},{name:"monaco",hexadecimal:"&#x1f1f2;&#x1f1e8;"},{name:"moldova",hexadecimal:"&#x1f1f2;&#x1f1e9;"},{name:"montenegro",hexadecimal:"&#x1f1f2;&#x1f1ea;"},{name:"st.-martin",hexadecimal:"&#x1f1f2;&#x1f1eb;"},{name:"madagascar",hexadecimal:"&#x1f1f2;&#x1f1ec;"},{name:"marshall-islands",hexadecimal:"&#x1f1f2;&#x1f1ed;"},{name:"macedonia",hexadecimal:"&#x1f1f2;&#x1f1f0;"},{name:"mali",hexadecimal:"&#x1f1f2;&#x1f1f1;"},{name:"myanmar-(burma)",hexadecimal:"&#x1f1f2;&#x1f1f2;"},{name:"mongolia",hexadecimal:"&#x1f1f2;&#x1f1f3;"},{name:"macau-sar-china",hexadecimal:"&#x1f1f2;&#x1f1f4;"},{name:"northern-mariana-islands",hexadecimal:"&#x1f1f2;&#x1f1f5;"},{name:"martinique",hexadecimal:"&#x1f1f2;&#x1f1f6;"},{name:"mauritania",hexadecimal:"&#x1f1f2;&#x1f1f7;"},{name:"montserrat",hexadecimal:"&#x1f1f2;&#x1f1f8;"},{name:"malta",hexadecimal:"&#x1f1f2;&#x1f1f9;"},{name:"mauritius",hexadecimal:"&#x1f1f2;&#x1f1fa;"},{name:"maldives",hexadecimal:"&#x1f1f2;&#x1f1fb;"},{name:"malawi",hexadecimal:"&#x1f1f2;&#x1f1fc;"},{name:"mexico",hexadecimal:"&#x1f1f2;&#x1f1fd;"},{name:"malaysia",hexadecimal:"&#x1f1f2;&#x1f1fe;"},{name:"mozambique",hexadecimal:"&#x1f1f2;&#x1f1ff;"},{name:"namibia",hexadecimal:"&#x1f1f3;&#x1f1e6;"},{name:"new-caledonia",hexadecimal:"&#x1f1f3;&#x1f1e8;"},{name:"niger",hexadecimal:"&#x1f1f3;&#x1f1ea;"},{name:"norfolk-island",hexadecimal:"&#x1f1f3;&#x1f1eb;"},{name:"nigeria",hexadecimal:"&#x1f1f3;&#x1f1ec;"},{name:"nicaragua",hexadecimal:"&#x1f1f3;&#x1f1ee;"},{name:"netherlands",hexadecimal:"&#x1f1f3;&#x1f1f1;"},{name:"norway",hexadecimal:"&#x1f1f3;&#x1f1f4;"},{name:"nepal",hexadecimal:"&#x1f1f3;&#x1f1f5;"},{name:"nauru",hexadecimal:"&#x1f1f3;&#x1f1f7;"},{name:"niue",hexadecimal:"&#x1f1f3;&#x1f1fa;"},{name:"new-zealand",hexadecimal:"&#x1f1f3;&#x1f1ff;"},{name:"oman",hexadecimal:"&#x1f1f4;&#x1f1f2;"},{name:"panama",hexadecimal:"&#x1f1f5;&#x1f1e6;"},{name:"peru",hexadecimal:"&#x1f1f5;&#x1f1ea;"},{name:"french-polynesia",hexadecimal:"&#x1f1f5;&#x1f1eb;"},{name:"papua-new-guinea",hexadecimal:"&#x1f1f5;&#x1f1ec;"},{name:"philippines",hexadecimal:"&#x1f1f5;&#x1f1ed;"},{name:"pakistan",hexadecimal:"&#x1f1f5;&#x1f1f0;"},{name:"poland",hexadecimal:"&#x1f1f5;&#x1f1f1;"},{name:"st.-pierre-&-miquelon",hexadecimal:"&#x1f1f5;&#x1f1f2;"},{name:"pitcairn-islands",hexadecimal:"&#x1f1f5;&#x1f1f3;"},{name:"puerto-rico",hexadecimal:"&#x1f1f5;&#x1f1f7;"},{name:"palestinian-territories",hexadecimal:"&#x1f1f5;&#x1f1f8;"},{name:"portugal",hexadecimal:"&#x1f1f5;&#x1f1f9;"},{name:"palau",hexadecimal:"&#x1f1f5;&#x1f1fc;"},{name:"paraguay",hexadecimal:"&#x1f1f5;&#x1f1fe;"},{name:"qatar",hexadecimal:"&#x1f1f6;&#x1f1e6;"},{name:"rã©union",hexadecimal:"&#x1f1f7;&#x1f1ea;"},{name:"romania",hexadecimal:"&#x1f1f7;&#x1f1f4;"},{name:"serbia",hexadecimal:"&#x1f1f7;&#x1f1f8;"},{name:"russia",hexadecimal:"&#x1f1f7;&#x1f1fa;"},{name:"rwanda",hexadecimal:"&#x1f1f7;&#x1f1fc;"},{name:"saudi-arabia",hexadecimal:"&#x1f1f8;&#x1f1e6;"},{name:"solomon-islands",hexadecimal:"&#x1f1f8;&#x1f1e7;"},{name:"seychelles",hexadecimal:"&#x1f1f8;&#x1f1e8;"},{name:"sudan",hexadecimal:"&#x1f1f8;&#x1f1e9;"},{name:"sweden",hexadecimal:"&#x1f1f8;&#x1f1ea;"},{name:"singapore",hexadecimal:"&#x1f1f8;&#x1f1ec;"},{name:"st.-helena",hexadecimal:"&#x1f1f8;&#x1f1ed;"},{name:"slovenia",hexadecimal:"&#x1f1f8;&#x1f1ee;"},{name:"svalbard-&-jan-mayen",hexadecimal:"&#x1f1f8;&#x1f1ef;"},{name:"slovakia",hexadecimal:"&#x1f1f8;&#x1f1f0;"},{name:"sierra-leone",hexadecimal:"&#x1f1f8;&#x1f1f1;"},{name:"san-marino",hexadecimal:"&#x1f1f8;&#x1f1f2;"},{name:"senegal",hexadecimal:"&#x1f1f8;&#x1f1f3;"},{name:"somalia",hexadecimal:"&#x1f1f8;&#x1f1f4;"},{name:"suriname",hexadecimal:"&#x1f1f8;&#x1f1f7;"},{name:"south-sudan",hexadecimal:"&#x1f1f8;&#x1f1f8;"},{name:"sã£o-tomã©-&-prã­ncipe",hexadecimal:"&#x1f1f8;&#x1f1f9;"},{name:"el-salvador",hexadecimal:"&#x1f1f8;&#x1f1fb;"},{name:"sint-maarten",hexadecimal:"&#x1f1f8;&#x1f1fd;"},{name:"syria",hexadecimal:"&#x1f1f8;&#x1f1fe;"},{name:"swaziland",hexadecimal:"&#x1f1f8;&#x1f1ff;"},{name:"tristan-da-cunha",hexadecimal:"&#x1f1f9;&#x1f1e6;"},{name:"turks-&-caicos-islands",hexadecimal:"&#x1f1f9;&#x1f1e8;"},{name:"chad",hexadecimal:"&#x1f1f9;&#x1f1e9;"},{name:"french-southern-territories",hexadecimal:"&#x1f1f9;&#x1f1eb;"},{name:"togo",hexadecimal:"&#x1f1f9;&#x1f1ec;"},{name:"thailand",hexadecimal:"&#x1f1f9;&#x1f1ed;"},{name:"tajikistan",hexadecimal:"&#x1f1f9;&#x1f1ef;"},{name:"tokelau",hexadecimal:"&#x1f1f9;&#x1f1f0;"},{name:"timor-leste",hexadecimal:"&#x1f1f9;&#x1f1f1;"},{name:"turkmenistan",hexadecimal:"&#x1f1f9;&#x1f1f2;"},{name:"tunisia",hexadecimal:"&#x1f1f9;&#x1f1f3;"},{name:"tonga",hexadecimal:"&#x1f1f9;&#x1f1f4;"},{name:"turkey",hexadecimal:"&#x1f1f9;&#x1f1f7;"},{name:"trinidad-&-tobago",hexadecimal:"&#x1f1f9;&#x1f1f9;"},{name:"tuvalu",hexadecimal:"&#x1f1f9;&#x1f1fb;"},{name:"taiwan",hexadecimal:"&#x1f1f9;&#x1f1fc;"},{name:"tanzania",hexadecimal:"&#x1f1f9;&#x1f1ff;"},{name:"ukraine",hexadecimal:"&#x1f1fa;&#x1f1e6;"},{name:"uganda",hexadecimal:"&#x1f1fa;&#x1f1ec;"},{name:"u.s.-outlying-islands",hexadecimal:"&#x1f1fa;&#x1f1f2;"},{name:"united-states",hexadecimal:"&#x1f1fa;&#x1f1f8;"},{name:"uruguay",hexadecimal:"&#x1f1fa;&#x1f1fe;"},{name:"uzbekistan",hexadecimal:"&#x1f1fa;&#x1f1ff;"},{name:"vatican-city",hexadecimal:"&#x1f1fb;&#x1f1e6;"},{name:"st.-vincent-&-grenadines",hexadecimal:"&#x1f1fb;&#x1f1e8;"},{name:"venezuela",hexadecimal:"&#x1f1fb;&#x1f1ea;"},{name:"british-virgin-islands",hexadecimal:"&#x1f1fb;&#x1f1ec;"},{name:"u.s.-virgin-islands",hexadecimal:"&#x1f1fb;&#x1f1ee;"},{name:"vietnam",hexadecimal:"&#x1f1fb;&#x1f1f3;"},{name:"vanuatu",hexadecimal:"&#x1f1fb;&#x1f1fa;"},{name:"wallis-&-futuna",hexadecimal:"&#x1f1fc;&#x1f1eb;"},{name:"samoa",hexadecimal:"&#x1f1fc;&#x1f1f8;"},{name:"kosovo",hexadecimal:"&#x1f1fd;&#x1f1f0;"},{name:"yemen",hexadecimal:"&#x1f1fe;&#x1f1ea;"},{name:"mayotte",hexadecimal:"&#x1f1fe;&#x1f1f9;"},{name:"south-africa",hexadecimal:"&#x1f1ff;&#x1f1e6;"},{name:"zambia",hexadecimal:"&#x1f1ff;&#x1f1f2;"},{name:"zimbabwe",hexadecimal:"&#x1f1ff;&#x1f1fc;"}],Ra=({emojis:a,onSelect:s,onClose:r})=>{const[t,n]=v.useState({start:0,end:80}),l=8,i=40,p=400,f=v.useCallback(o=>{const j=o.currentTarget.scrollTop,E=Math.floor(j/i),y=Math.min(E+Math.ceil(p/i)+2,Math.ceil(a.length/l));n({start:E*l,end:y*l})},[a.length,i,p,l]),m=v.useCallback(o=>{const j=o.match(/&#x([0-9A-Fa-f]+);/g);if(!j)return"";const E=j.map(y=>{const g=y.replace(/&#x|;/g,"");return parseInt(g,16)});return String.fromCodePoint(...E)},[]),w=Math.ceil(a.length/l)*i,U=a.slice(t.start,t.end);return e.jsx("div",{className:"rsp-h-[400px] rsp-overflow-y-auto rsp-relative",onScroll:f,children:e.jsx("div",{style:{height:w},className:"rsp-relative",children:e.jsx("div",{className:"rsp-absolute rsp-w-full rsp-grid rsp-grid-cols-8 rsp-gap-1",style:{top:Math.floor(t.start/l)*i,transform:"translateY(0px)"},children:U.map((o,j)=>{const E=t.start+j;return e.jsx("button",{onClick:()=>{s(m(o.hexadecimal))},className:"rsp-w-10 rsp-h-10 rsp-flex rsp-items-center rsp-justify-center rsp-text-xl hover:rsp-bg-gray-100 rsp-rounded rsp-transition-colors",title:o.name,style:{height:i},children:m(o.hexadecimal)},E)})})})})};function Ee({isOpen:a,onClose:s,onSelect:r}){const[t,n]=v.useState(""),l=v.useMemo(()=>t?Ae.filter(i=>i.name.toLowerCase().includes(t.toLowerCase())):Ae,[t]);return v.useEffect(()=>{a||n("")},[a]),e.jsx(me,{isOpen:a,onClose:s,title:"Select Emoji",children:e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:"text",placeholder:"Search emojis...",value:t,onChange:i=>n(i.target.value),className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500"}),t&&e.jsx("button",{onClick:()=>n(""),className:"rsp-absolute rsp-right-2 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-gray-400 hover:rsp-text-gray-600",children:"×"})]}),e.jsx("div",{className:"rsp-flex rsp-gap-2 rsp-flex-wrap",children:["😀","🎉","❤️","👍","🔥","💯","✨","🎯"].map(i=>e.jsx("button",{onClick:()=>{r(i)},className:"rsp-w-8 rsp-h-8 rsp-flex rsp-items-center rsp-justify-center rsp-text-lg hover:rsp-bg-gray-100 rsp-rounded rsp-transition-colors",children:i},i))}),e.jsxs("div",{className:"rsp-text-sm rsp-text-gray-500",children:[l.length," emojis found"]}),e.jsx(Ra,{emojis:l,onSelect:r,onClose:s})]})})}const de=(a,s,r)=>{if(!a)return{newText:s,cursorPosition:s.length};const t=a.selectionStart||0,n=a.selectionEnd||0,l=s.substring(t,n);let i=s.substring(0,t),p=s.substring(n),f,m;return l?r==="bold"?(f=`${i}*${l}*${p}`,m=t+l.length+2):(f=`${i}_${l}_${p}`,m=t+l.length+2):r==="bold"?(f=`${i}**${p}`,m=t+1):(f=`${i}__${p}`,m=t+1),{newText:f,cursorPosition:m}};function Ba({template:a,setTemplate:s}){const[r,t]=v.useState(!1),[n,l]=v.useState(null),[i,p]=v.useState(null),[f,m]=v.useState(null),[w,U]=v.useState(!1),o=()=>{const x=(a.body||"").match(/{{\d+}}/g);if(!x)return 0;const h=x.map(u=>{const k=u.match(/{{(\d+)}}/);return k?parseInt(k[1],10):0});return h.length>0?Math.max(...h):0},j=()=>{const h=`{{${o()+1}}}`;if(i&&a.body.length+h.length<=1024){const u=i.selectionStart||a.body.length,k=a.body.substring(0,u),A=a.body.substring(u),V=k+h+A;s({...a,body:V}),setTimeout(()=>{if(i){const b=u+h.length;i.setSelectionRange(b,b),i.focus()}},0)}},E=()=>{l("body"),t(!0),setTimeout(()=>{i&&i.focus()},0)},y=g=>{if(n==="body"){if(!i)return;const x=i.selectionStart||a.body.length,h=1024,u=a.body;if(u.length+g.length<=h){const k=u.substring(0,x),A=u.substring(x),V=k+g+A;s({...a,body:V}),setTimeout(()=>{if(i){const b=x+g.length;i.setSelectionRange(b,b),i.focus()}},0)}}else if(n==="footer"){if(!f)return;const x=f.selectionStart||a.footer.length,h=60,u=a.footer;if(u.length+g.length<=h){const k=u.substring(0,x),A=u.substring(x),V=k+g+A;s({...a,footer:V}),setTimeout(()=>{if(f){const b=x+g.length;f.setSelectionRange(b,b),f.focus()}},0)}}};return e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Body"}),e.jsx("div",{className:"rsp-relative",children:e.jsx("textarea",{ref:p,value:a.body,onChange:g=>s({...a,body:g.target.value}),maxLength:1024,rows:6,className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white rsp-resize-none rsp-shadow-sm",placeholder:"Enter the text for your message",onFocus:()=>l("body"),onBlur:()=>U(!0)})}),!a.body&&w&&e.jsx("p",{className:"rsp-text-xs rsp-text-red-600 rsp-mt-1",children:"Body is required."}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mt-2",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("button",{onClick:j,className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Add Variable",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsx("button",{onClick:E,className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Add emoji",children:e.jsx(ke,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("button",{onClick:()=>{if(!i)return;const{newText:g,cursorPosition:x}=de(i,a.body,"bold");s({...a,body:g}),requestAnimationFrame(()=>{setTimeout(()=>{i&&(i.setSelectionRange(x,x),i.focus())},0)})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Bold text (*text*)",children:e.jsxs("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z"})]})}),e.jsx("button",{onClick:()=>{if(!i)return;const{newText:g,cursorPosition:x}=de(i,a.body,"italic");s({...a,body:g}),requestAnimationFrame(()=>{setTimeout(()=>{i&&(i.setSelectionRange(x,x),i.focus())},0)})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Italic text (_text_)",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 4h4M8 20h4M12 4l-2 16"})})})]}),e.jsx("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-500",children:[a.body.length,"/1024 (1 WhatsAppAudience)"]})})]}),(()=>{const g=a.body.match(/\{\{(\d+)\}\}/g)||[],x=[...new Set(g.map(h=>h.replace(/[{}]/g,"")))];return x.length===0?null:e.jsxs("div",{className:"rsp-mt-3",children:[e.jsx("p",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-2",children:"Sample Values"}),e.jsx("div",{className:"rsp-grid rsp-grid-cols-3 rsp-gap-2",children:x.map(h=>{var u,k;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("label",{className:"rsp-text-xs rsp-text-gray-500 rsp-whitespace-nowrap",children:["{{",h,"}}",":"]}),e.jsx("input",{type:"text",value:((k=(u=a.sampleContent)==null?void 0:u.bodyVariables)==null?void 0:k[h])||"",onChange:A=>{var b,N,M;const V={...a.sampleContent,bodyVariables:{...(b=a.sampleContent)==null?void 0:b.bodyVariables,[h]:A.target.value},headerVariables:((N=a.sampleContent)==null?void 0:N.headerVariables)||{},buttonVariables:((M=a.sampleContent)==null?void 0:M.buttonVariables)||{}};s({...a,sampleContent:V})},className:"rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500",placeholder:"Sample"}),e.jsx("button",{type:"button",onClick:()=>{var N,M,B;const A=new RegExp(`\\{\\{${h}\\}\\}`,"g"),V=(a.body||"").replace(A,""),b=Object.fromEntries(Object.entries(((N=a.sampleContent)==null?void 0:N.bodyVariables)||{}).filter(([P])=>P!==h));s({...a,body:V,sampleContent:{...a.sampleContent,bodyVariables:b,headerVariables:((M=a.sampleContent)==null?void 0:M.headerVariables)||{},buttonVariables:((B=a.sampleContent)==null?void 0:B.buttonVariables)||{}}})},className:"rsp-px-2 rsp-py-1 rsp-text-xs rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`body-sample-${h}`)})})]})})()]}),e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Footer (optional)"}),e.jsx("div",{className:"rsp-relative",children:e.jsx("input",{ref:m,type:"text",value:a.footer,onChange:g=>s({...a,footer:g.target.value}),maxLength:60,className:"rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",placeholder:"Footer Text",onFocus:()=>l("footer")})}),e.jsxs("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:[a.footer.length,"/60 characters"]})]}),e.jsx(Ee,{isOpen:r,onClose:()=>t(!1),onSelect:y})]})}function Oa({template:a,setTemplate:s}){var g;const[r,t]=v.useState(null),[n,l]=v.useState(!1),[i,p]=v.useState({text:"",value:"",urlType:"static"}),m={quickReply:a.buttons.filter(x=>x.type==="QUICK_REPLY").length,url:a.buttons.filter(x=>x.type==="URL").length,call:a.buttons.filter(x=>x.type==="CALL").length,flow:a.buttons.filter(x=>x.type==="FLOW").length},w=()=>{p({text:"",value:"",urlType:"static"}),t(null),l(!1)},U=x=>{if(!i.text.trim())return;let h=x==="QUICK_REPLY"?i.text:i.value;x==="CALL"&&h&&!h.startsWith("+")&&(h="+"+h);const u={id:Math.random().toString(36).substr(2,9),type:x,text:i.text,value:h,urlType:x==="URL"?i.urlType:void 0};s({...a,buttons:[...a.buttons,u]}),w()},o=x=>{s({...a,buttons:a.buttons.filter(h=>h.id!==x)})},j=(x,h,u)=>{const k=a.buttons.find(b=>b.id===x),A=h==="text"?25:h==="value"&&(k==null?void 0:k.type)==="URL"?2e3:20;let V=u.slice(0,A);h==="value"&&(k==null?void 0:k.type)==="CALL"&&V&&!V.startsWith("+")&&(V="+"+V),s({...a,buttons:a.buttons.map(b=>b.id===x?{...b,[h]:V}:b)})},E=()=>{const h=[...a.buttons.filter(k=>k.type==="URL"&&k.urlType==="dynamic").map(k=>k.value||""),i.value].join(" ").match(/{{\d+}}/g);if(!h)return 0;const u=h.map(k=>{const A=k.match(/{{(\d+)}}/);return A?parseInt(A[1],10):0});return u.length>0?Math.max(...u):0},y=[{type:"QUICK_REPLY",icon:he,label:"Quick Reply",description:"Add quick response options",limit:10,current:m.quickReply,color:"blue"},{type:"URL",icon:Ge,label:"Web URL",description:"Link to websites or pages",limit:2,current:m.url,color:"green"},{type:"CALL",icon:Ie,label:"Call Button",description:"Add phone number to call",limit:1,current:m.call,color:"purple"}];return e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Interactive Buttons"}),e.jsx("p",{className:"rsp-text-sm rsp-text-gray-500 rsp-mt-1",children:"Add buttons to make your message interactive"})]}),e.jsx("div",{className:"rsp-text-sm rsp-text-gray-500"})]}),e.jsx("div",{className:"rsp-bg-blue-50 rsp-border-l-4 rsp-border-blue-500 rsp-p-4 rsp-rounded-r-md",children:e.jsxs("div",{className:"rsp-flex",children:[e.jsx("div",{className:"rsp-flex-shrink-0",children:e.jsx("svg",{className:"rsp-h-5 rsp-w-5 rsp-text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),e.jsx("div",{className:"rsp-ml-3",children:e.jsx("p",{className:"rsp-text-sm rsp-text-blue-700",children:"We recommend adding the marketing opt-out button. This can help reduce blocks from customers and increase your quality rating."})})]})}),!r&&e.jsx("div",{className:"rsp-grid rsp-grid-cols-1 md:rsp-grid-cols-2 rsp-gap-4",children:y.map(x=>{const h=x.icon,u=x.current>=x.limit;return e.jsxs("button",{onClick:()=>!u&&t(x.type),disabled:u,className:`rsp-group rsp-p-5 rsp-border-2 rsp-rounded-xl rsp-text-left rsp-transition-all rsp-duration-200 rsp-relative rsp-overflow-hidden ${u?"rsp-border-gray-200 rsp-bg-gray-50 rsp-text-gray-400 rsp-cursor-not-allowed rsp-opacity-60":"rsp-cursor-pointer rsp-border-gray-200 rsp-bg-white hover:rsp-border-blue-400 hover:rsp-shadow-lg hover:rsp-shadow-blue-100/50 rsp-shadow-sm"}`,children:[!u&&e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-gradient-to-br rsp-from-blue-50/0 rsp-via-blue-50/0 rsp-to-blue-50/0 group-hover:rsp-from-blue-50/30 group-hover:rsp-via-blue-50/20 group-hover:rsp-to-blue-50/10 rsp-transition-all rsp-duration-200"}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-start rsp-justify-between",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-4",children:[e.jsx("div",{className:`rsp-p-3 rsp-rounded-xl rsp-transition-all rsp-duration-200 ${u?"rsp-bg-gray-200":"rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-blue-100 group-hover:rsp-from-blue-100 group-hover:rsp-to-blue-200 rsp-shadow-sm"}`,children:e.jsx(h,{className:`rsp-w-5 rsp-h-5 rsp-transition-colors ${u?"rsp-text-gray-400":"rsp-text-blue-600"}`})}),e.jsxs("div",{children:[e.jsx("h4",{className:`rsp-font-semibold rsp-text-sm rsp-mb-1 ${u?"rsp-text-gray-400":"rsp-text-gray-900"}`,children:x.label}),e.jsx("p",{className:`rsp-text-xs rsp-mt-1 ${u?"rsp-text-gray-400":"rsp-text-gray-600"}`,children:x.description})]})]}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("span",{className:`rsp-text-xs rsp-font-semibold rsp-px-2.5 rsp-py-1 rsp-rounded-full rsp-transition-colors ${u?"rsp-bg-gray-200 rsp-text-gray-500":"rsp-bg-blue-100 rsp-text-blue-700 group-hover:rsp-bg-blue-200"}`,children:[x.current,"/",x.limit]}),!u&&e.jsx("div",{className:"rsp-p-1.5 rsp-rounded-lg rsp-bg-blue-100 group-hover:rsp-bg-blue-200 rsp-transition-colors",children:e.jsx(je,{className:"rsp-w-4 rsp-h-4 rsp-text-blue-600"})})]})]})]},x.type)})}),r&&e.jsxs("div",{className:"rsp-bg-white rsp-border-2 rsp-border-blue-200 rsp-rounded-xl rsp-p-6 rsp-shadow-lg rsp-shadow-blue-100/50",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mb-6",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900 rsp-mb-1",children:["Add ",(g=y.find(x=>x.type===r))==null?void 0:g.label]}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500",children:"Fill in the details below to add a new button"})]}),e.jsx("button",{onClick:w,className:"rsp-p-2 rsp-text-gray-400 hover:rsp-text-gray-600 hover:rsp-bg-gray-100 rsp-rounded-lg rsp-transition-colors",children:e.jsx(ne,{className:"rsp-w-5 rsp-h-5"})})]}),e.jsxs("div",{className:"rsp-space-y-5",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-block rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-2",children:["Button Text ",e.jsx("span",{className:"rsp-text-red-500",children:"*"})]}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:"text",value:i.text,onChange:x=>p({...i,text:x.target.value.slice(0,25)}),className:"rsp-w-full rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-bg-white rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-shadow-sm rsp-transition-all",placeholder:"Enter button text (max 25 characters)",maxLength:25}),e.jsxs("span",{className:"rsp-absolute rsp-right-3 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-xs rsp-font-medium rsp-text-gray-400 rsp-bg-white rsp-px-1.5",children:[i.text.length,"/25"]})]})]}),r!=="QUICK_REPLY"&&e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-block rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-2",children:[r==="URL"?"Website URL":r==="CALL"?"Phone Number":"Flow ID"," ",e.jsx("span",{className:"rsp-text-red-500",children:"*"})]}),r==="URL"&&e.jsxs("div",{className:"rsp-mb-4",children:[e.jsxs("div",{className:"rsp-flex rsp-gap-4 rsp-p-3 rsp-bg-gray-50 rsp-rounded-lg rsp-border rsp-border-gray-200",children:[e.jsxs("label",{className:"rsp-flex rsp-items-center rsp-cursor-pointer rsp-group",children:[e.jsx("input",{type:"radio",checked:i.urlType==="static",onChange:()=>p({...i,urlType:"static"}),className:"rsp-mr-2 rsp-w-4 rsp-h-4 rsp-text-blue-600 rsp-border-gray-300 focus:rsp-ring-2 focus:rsp-ring-blue-500"}),e.jsx("span",{className:"rsp-text-sm rsp-font-medium rsp-text-gray-700 group-hover:rsp-text-gray-900",children:"Static URL"})]}),e.jsxs("label",{className:"rsp-flex rsp-items-center rsp-cursor-pointer rsp-group",children:[e.jsx("input",{type:"radio",checked:i.urlType==="dynamic",onChange:()=>p({...i,urlType:"dynamic"}),className:"rsp-mr-2 rsp-w-4 rsp-h-4 rsp-text-blue-600 rsp-border-gray-300 focus:rsp-ring-2 focus:rsp-ring-blue-500"}),e.jsx("span",{className:"rsp-text-sm rsp-font-medium rsp-text-gray-700 group-hover:rsp-text-gray-900",children:"Dynamic URL"})]})]}),i.urlType==="dynamic"&&e.jsxs("div",{className:"rsp-mt-3 rsp-p-4 rsp-bg-blue-50 rsp-rounded-lg rsp-border-2 rsp-border-blue-200",children:[e.jsxs("h4",{className:"rsp-text-sm rsp-font-semibold rsp-text-blue-900 rsp-mb-2 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Dynamic URL Guidelines"]}),e.jsxs("ul",{className:"rsp-text-xs rsp-text-blue-800 rsp-space-y-1.5 rsp-list-disc rsp-list-inside",children:[e.jsxs("li",{children:["Use placeholders like: ",e.jsx("code",{className:"rsp-bg-blue-100 rsp-px-1 rsp-rounded",children:"https://example.com/order/{{1}}"})]}),e.jsx("li",{children:"Maximum 3 placeholders per URL ({{1}}, {{2}}, {{3}})"}),e.jsx("li",{children:"Only HTTPS URLs are allowed"}),e.jsx("li",{children:"WhatsApp verifies only the domain"})]})]})]}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:r==="CALL"?"tel":r==="URL"?"url":"text",value:i.value,onChange:x=>{const h=r==="URL"?2e3:20;p({...i,value:x.target.value.slice(0,h)})},className:"rsp-w-full rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-bg-white rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-shadow-sm rsp-transition-all",placeholder:r==="URL"?i.urlType==="dynamic"?"https://example.com/order/{{1}}?user={{2}}":"https://example.com":r==="CALL"?"+1234567890":"Flow ID",maxLength:r==="URL"?2e3:20}),e.jsxs("span",{className:"rsp-absolute rsp-right-3 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-xs rsp-font-medium rsp-text-gray-400 rsp-bg-white rsp-px-1.5",children:[i.value.length,"/",r==="URL"?2e3:20]})]}),r==="URL"&&i.urlType==="dynamic"&&e.jsxs("div",{className:"rsp-mt-3",children:[e.jsx("div",{className:"rsp-flex rsp-items-center rsp-gap-2 rsp-mb-2",children:e.jsxs("button",{type:"button",onClick:()=>{if((i.value.match(/\{\{(\d+)\}\}/g)||[]).length>=3)return;const u=E()+1,k=i.value+`{{${u}}}`;p({...i,value:k}),l(!0)},disabled:(i.value.match(/\{\{(\d+)\}\}/g)||[]).length>=3,className:"rsp-px-4 rsp-py-2 rsp-text-xs rsp-font-semibold rsp-bg-blue-100 hover:rsp-bg-blue-200 rsp-rounded-lg rsp-text-blue-700 disabled:rsp-bg-gray-200 disabled:rsp-text-gray-500 disabled:rsp-cursor-not-allowed rsp-transition-all rsp-shadow-sm hover:rsp-shadow-md rsp-flex rsp-items-center rsp-gap-1.5",children:[e.jsx("svg",{className:"rsp-w-3.5 rsp-h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add Variable"]})}),(i.value.match(/\{\{(\d+)\}\}/g)||[]).length>=3&&e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:"Maximum 3 variables allowed."}),n&&e.jsxs("div",{className:"rsp-mt-4 rsp-p-5 rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-indigo-50 rsp-rounded-xl rsp-border-2 rsp-border-blue-200 rsp-shadow-sm",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mb-4",children:[e.jsxs("h4",{className:"rsp-text-sm rsp-font-semibold rsp-text-blue-900 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),"Sample Values for URL Variables"]}),e.jsx("button",{type:"button",onClick:()=>l(!1),className:"rsp-p-1 rsp-text-blue-600 hover:rsp-text-blue-800 hover:rsp-bg-blue-100 rsp-rounded-lg rsp-transition-colors",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}),e.jsx("div",{className:"rsp-space-y-3",children:(()=>{const x=i.value.match(/\{\{(\d+)\}\}/g)||[];return[...new Set(x.map(u=>u.replace(/[{}]/g,"")))].map(u=>{var k,A;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-3",children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-blue-800 rsp-whitespace-nowrap rsp-bg-blue-100 rsp-px-3 rsp-py-2 rsp-rounded-lg rsp-min-w-[100px]",children:["{{",u,"}}"]}),e.jsx("input",{type:"text",value:((A=(k=a.sampleContent)==null?void 0:k.buttonVariables)==null?void 0:A[u])||"",onChange:V=>{var N,M,B;const b={...a.sampleContent,headerVariables:((N=a.sampleContent)==null?void 0:N.headerVariables)||{},bodyVariables:((M=a.sampleContent)==null?void 0:M.bodyVariables)||{},buttonVariables:{...(B=a.sampleContent)==null?void 0:B.buttonVariables,[u]:V.target.value}};s({...a,sampleContent:b})},className:"rsp-flex-1 rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-blue-200 rsp-rounded-lg rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-bg-white rsp-shadow-sm rsp-transition-all",placeholder:`Sample value (e.g., ${u==="1"?"order123":"user456"})`}),e.jsx("button",{type:"button",onClick:()=>{var M,B,P;const V=new RegExp(`\\{\\{${u}\\}\\}`,"g"),b=(i.value||"").replace(V,"");p({...i,value:b});const N=Object.fromEntries(Object.entries(((M=a.sampleContent)==null?void 0:M.buttonVariables)||{}).filter(([G])=>G!==u));s({...a,sampleContent:{...a.sampleContent,headerVariables:((B=a.sampleContent)==null?void 0:B.headerVariables)||{},bodyVariables:((P=a.sampleContent)==null?void 0:P.bodyVariables)||{},buttonVariables:N}})},className:"rsp-p-2 rsp-text-red-600 hover:rsp-text-red-700 hover:rsp-bg-red-50 rsp-rounded-lg rsp-transition-all rsp-border-2 rsp-border-red-200 hover:rsp-border-red-300",title:"Remove this variable",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]},`sample-${u}`)})})()}),e.jsxs("div",{className:"rsp-mt-4 rsp-p-4 rsp-bg-white rsp-rounded-lg rsp-border-2 rsp-border-blue-200 rsp-shadow-sm",children:[e.jsxs("p",{className:"rsp-text-xs rsp-font-semibold rsp-text-gray-700 rsp-mb-2 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),"Preview URL"]}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-700 rsp-font-mono rsp-break-all rsp-bg-gray-50 rsp-p-2 rsp-rounded rsp-border rsp-border-gray-200",children:i.value.replace(/\{\{(\d+)\}\}/g,(x,h)=>{var u,k;return((k=(u=a.sampleContent)==null?void 0:u.buttonVariables)==null?void 0:k[h])||`[${x}]`})})]})]})]})]}),e.jsxs("div",{className:"rsp-flex rsp-gap-3 rsp-pt-4 rsp-border-t rsp-border-gray-200",children:[e.jsx("button",{onClick:()=>U(r),disabled:!i.text.trim()||r!=="QUICK_REPLY"&&!i.value.trim(),className:"rsp-flex-1 rsp-bg-gradient-to-r rsp-from-blue-600 rsp-to-blue-700 rsp-text-white rsp-py-3 rsp-px-6 rsp-rounded-lg rsp-font-semibold rsp-text-sm rsp-transition-all hover:rsp-from-blue-700 hover:rsp-to-blue-800 disabled:rsp-opacity-50 disabled:rsp-cursor-not-allowed rsp-shadow-md hover:rsp-shadow-lg rsp-transform hover:rsp-scale-[1.02] active:rsp-scale-[0.98]",children:"Add Button"}),e.jsx("button",{onClick:w,className:"rsp-px-6 rsp-py-3 rsp-text-gray-700 rsp-bg-white rsp-border-2 rsp-border-gray-300 rsp-rounded-lg rsp-font-semibold rsp-text-sm rsp-transition-all hover:rsp-bg-gray-50 hover:rsp-border-gray-400 rsp-shadow-sm hover:rsp-shadow-md",children:"Cancel"})]})]})]}),a.buttons.length>0&&e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsx("h4",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Added Buttons"}),e.jsxs("span",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-500 rsp-bg-gray-100 rsp-px-3 rsp-py-1 rsp-rounded-full",children:[a.buttons.length," ",a.buttons.length===1?"button":"buttons"]})]}),e.jsx("div",{className:"rsp-space-y-3",children:a.buttons.map(x=>{const h=y.find(k=>k.type===x.type),u=(h==null?void 0:h.icon)||he;return e.jsx("div",{className:"rsp-bg-white rsp-border-2 rsp-border-gray-200 rsp-rounded-xl rsp-p-5 rsp-shadow-sm hover:rsp-shadow-md hover:rsp-border-gray-300 rsp-transition-all",children:e.jsxs("div",{className:"rsp-flex rsp-items-start rsp-gap-4",children:[e.jsx("div",{className:"rsp-p-3 rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-blue-100 rsp-rounded-xl rsp-shadow-sm",children:e.jsx(u,{className:"rsp-w-5 rsp-h-5 rsp-text-blue-600"})}),e.jsxs("div",{className:"rsp-flex-1 rsp-space-y-4",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsx("span",{className:"rsp-text-xs rsp-font-bold rsp-text-blue-700 rsp-uppercase rsp-tracking-wider rsp-bg-blue-50 rsp-px-2.5 rsp-py-1 rsp-rounded-md",children:x.type.replace("_"," ")}),e.jsx("button",{onClick:()=>o(x.id),className:"rsp-p-2 rsp-text-red-400 hover:rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded-lg rsp-transition-all",title:"Remove button",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}),e.jsxs("div",{className:"rsp-grid rsp-grid-cols-1 rsp-gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-semibold rsp-text-gray-700 rsp-mb-2",children:"Button Text"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:"text",value:x.text,onChange:k=>j(x.id,"text",k.target.value),maxLength:25,className:"rsp-w-full rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-shadow-sm rsp-transition-all rsp-bg-white"}),e.jsxs("span",{className:"rsp-absolute rsp-right-2.5 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-xs rsp-font-medium rsp-text-gray-400 rsp-bg-white rsp-px-1",children:[x.text.length,"/25"]})]})]}),x.type!=="QUICK_REPLY"&&e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-semibold rsp-text-gray-700 rsp-mb-2",children:x.type==="URL"?"Website URL":x.type==="CALL"?"Phone Number":"Flow ID"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:x.type==="CALL"?"tel":x.type==="URL"?"url":"text",value:x.value||"",onChange:k=>j(x.id,"value",k.target.value),maxLength:x.type==="URL"?2e3:20,className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-shadow-sm rsp-transition-all rsp-bg-white"}),e.jsxs("span",{className:"rsp-absolute rsp-right-2.5 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-xs rsp-font-medium rsp-text-gray-400 rsp-bg-white rsp-px-1",children:[(x.value||"").length,"/",x.type==="URL"?2e3:20]})]})]})]})]})]})},x.id)})})]}),a.buttons.length===0&&!r&&e.jsxs("div",{className:"rsp-text-center rsp-py-12 rsp-bg-gray-50 rsp-rounded-xl rsp-border-2 rsp-border-dashed rsp-border-gray-300",children:[e.jsx("div",{className:"rsp-w-16 rsp-h-16 rsp-bg-white rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-mx-auto rsp-mb-4 rsp-shadow-sm",children:e.jsx(he,{className:"rsp-w-8 rsp-h-8 rsp-text-gray-400"})}),e.jsx("h3",{className:"rsp-text-lg rsp-font-medium rsp-text-gray-900 rsp-mb-2",children:"No buttons added yet"}),e.jsx("p",{className:"rsp-text-gray-500 rsp-text-sm rsp-mb-4",children:"Add interactive buttons to make your message more engaging"}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-400",children:"Choose from Quick Reply, Web URL, Call, or Flow buttons above"})]})]})}const Pa=async a=>{try{if(!a)throw new Error("No file provided");const s=100*1024*1024;if(a.size>s)throw new Error(`File size too large. Maximum allowed size is ${s/(1024*1024)}MB`);const r=new FormData;r.append("file",a),console.log("Uploading file:",a.name,"Size:",a.size,"Type:",a.type);const t=await fetch("https://wiz.resul.io/Communication/UploadDocuments",{method:"POST",body:r});console.log("Upload response status:",t.status),console.log("Upload response headers:",Object.fromEntries(t.headers.entries()));const n=await t.text();console.log("Raw upload response:",n);let l;try{l=JSON.parse(n)}catch(i){throw console.error("Failed to parse upload response:",i),new Error("Invalid response from upload server")}if(console.log("Parsed upload response:",l),console.log("Upload status:",l.status),console.log("Upload message:",l.message),console.log("Upload data:",l.data),!l.status)throw new Error(l.message||"Upload failed");if(l.data&&Array.isArray(l.data)&&l.data.length>0){const i=l.data[0];if(i.url)return console.log("File uploaded successfully:",{url:i.url,filename:i.filename,originalName:i.originalName,size:i.size}),i.url;throw new Error("No file URL in upload response data")}else throw new Error("No files in upload response data")}catch(s){throw console.error("File upload error:",s),s instanceof Error?s:new Error("Unknown error occurred during file upload")}},Da=(a,s)=>{const t=a.name.toLowerCase().split(".").pop();switch(s){case"IMAGE":return["jpg","jpeg","png","gif","bmp","tiff","svg"].includes(t||"");case"VIDEO":return["mp4","mov","avi","3gpp"].includes(t||"");case"DOCUMENT":return["pdf","doc","docx","xls","xlsx","ppt","pptx","txt"].includes(t||"");default:return!1}},za=a=>{switch(a){case"IMAGE":return 5*1024*1024;case"VIDEO":return 16*1024*1024;case"DOCUMENT":return 100*1024*1024;default:return 10*1024*1024}};function _a({template:a,setTemplate:s,onFileUpload:r}){var N,M,B,P,G;const[t,n]=v.useState({}),[,l]=v.useState({}),[i,p]=v.useState({open:!1,message:""}),[f,m]=v.useState(!1),[w,U]=v.useState(null),o=v.useRef({}),j=()=>{var C;const c={id:Math.random().toString(36).substr(2,9),headerType:"MEDIA",mediaType:((C=a.carousel)==null?void 0:C.type)==="VIDEO"?"VIDEO":"IMAGE",body:"",buttons:[]};s(L=>{var S,R;return{...L,carousel:{type:((S=a.carousel)==null?void 0:S.type)||"IMAGE",cards:[...((R=a.carousel)==null?void 0:R.cards)||[],c]}}})},E=c=>{s(C=>({...C,carousel:{...C.carousel,cards:C.carousel.cards.filter(L=>L.id!==c)}}))},y=(c,C,L)=>{s(S=>({...S,carousel:{...S.carousel,cards:S.carousel.cards.map(R=>R.id===c?{...R,[C]:L}:R)}}))},g=c=>{s(C=>{const S=((C.carousel||{type:c,cards:[]}).cards||[]).map(R=>({...R,mediaType:c,mediaUrl:""}));return{...C,carousel:{type:c,cards:S}}})},x=(c,C)=>{var X;const L=(X=a.carousel)==null?void 0:X.cards.find(se=>se.id===c);if(!L)return;const D=`{{${u(c)+1}}}`,$=L[C]+D;y(c,C,$)},h=c=>{var $;if(!w)return;const C=o.current[w],L=($=a.carousel)==null?void 0:$.cards.find(X=>X.id===w);if(!L)return;const S=C&&typeof C.selectionStart=="number"?C.selectionStart:L.body.length,R=L.body.substring(0,S),D=L.body.substring(S),_=R+c+D;y(w,"body",_),setTimeout(()=>{const X=o.current[w];if(X){const se=S+c.length;X.setSelectionRange(se,se),X.focus()}},0),m(!1)},u=c=>{var D;const C=(D=a.carousel)==null?void 0:D.cards.find(_=>_.id===c);if(!C)return 0;const S=(C.body||"").match(/\{\{(\d+)\}\}/g);if(!S)return 0;const R=S.map(_=>{const $=_.match(/{{(\d+)}}/);return $?parseInt($[1],10):0});return R.length>0?Math.max(...R):0},k=(c,C)=>{var R;const L=(R=a.carousel)==null?void 0:R.cards.find(D=>D.id===c);if(!L||L.buttons.length>=2)return;const S={id:Math.random().toString(36).substr(2,9),type:C,text:"",value:"",urlType:"static"};y(c,"buttons",[...L.buttons,S])},A=(c,C,L,S)=>{var _;const R=(_=a.carousel)==null?void 0:_.cards.find($=>$.id===c);if(!R)return;const D=R.buttons.map($=>$.id===C?{...$,[L]:S}:$);y(c,"buttons",D)},V=(c,C)=>{var R;const L=(R=a.carousel)==null?void 0:R.cards.find(D=>D.id===c);if(!L)return;const S=L.buttons.filter(D=>D.id!==C);y(c,"buttons",S)},b=async(c,C)=>{var L;try{n(_=>({..._,[c]:!0})),l(_=>({..._,[c]:!1}));const S=((L=a.carousel)==null?void 0:L.type)==="VIDEO"?"VIDEO":"IMAGE";if(!Da(C,S))throw new Error(`Invalid file type. Expected ${S.toLowerCase()} file.`);const R=za(S);if(C.size>R){const _=R/1048576;throw new Error(`File size too large. Maximum allowed size is ${_}MB.`)}const D=await r(C);y(c,"mediaUrl",D)}catch(S){console.error("File upload failed:",S),p({open:!0,message:S instanceof Error?S.message:"File upload failed"})}finally{n(S=>({...S,[c]:!1}))}};return e.jsxs("div",{className:"rsp-space-y-6",children:[i.open&&e.jsxs("div",{className:"rsp-fixed rsp-inset-0 rsp-z-50 rsp-flex rsp-items-center rsp-justify-center",children:[e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-black rsp-bg-opacity-40",onClick:()=>p({open:!1,message:""})}),e.jsxs("div",{className:"rsp-relative rsp-z-10 rsp-bg-white rsp-rounded-lg rsp-shadow-lg rsp-w-full rsp-max-w-md rsp-p-5",children:[e.jsx("div",{className:"rsp-mb-3 rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Upload Error"}),e.jsx("div",{className:"rsp-text-sm rsp-text-gray-700 rsp-break-words rsp-whitespace-pre-wrap",children:i.message}),e.jsx("div",{className:"rsp-flex rsp-justify-end rsp-mt-4",children:e.jsx("button",{onClick:()=>p({open:!1,message:""}),className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-white rsp-bg-blue-600 rsp-rounded-md hover:rsp-bg-blue-700",children:"OK"})})]})]}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsx("h3",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Carousel Cards"}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-4",children:[e.jsxs("span",{className:"rsp-text-sm rsp-text-gray-500",children:["Total Cards: ",((N=a.carousel)==null?void 0:N.cards.length)||0,"/10"]}),e.jsxs("button",{onClick:j,disabled:(((M=a.carousel)==null?void 0:M.cards.length)||0)>=10,className:"rsp-px-4 rsp-py-2 rsp-bg-blue-600 rsp-text-white rsp-rounded-md hover:rsp-bg-blue-700 disabled:rsp-bg-gray-400 disabled:rsp-cursor-not-allowed rsp-text-sm rsp-font-medium",children:[e.jsx(je,{className:"rsp-w-4 rsp-h-4 rsp-inline rsp-mr-2"}),"Add Card"]})]})]}),e.jsxs("div",{className:"rsp-bg-white rsp-p-4 rsp-rounded-lg rsp-border rsp-border-gray-200",children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-3",children:"Carousel Type"}),e.jsxs("div",{className:"rsp-flex rsp-gap-4",children:[e.jsxs("label",{className:"rsp-flex rsp-items-center",children:[e.jsx("input",{type:"radio",name:"carouselType",value:"IMAGE",checked:((B=a.carousel)==null?void 0:B.type)==="IMAGE",onChange:c=>g(c.target.value),className:"rsp-mr-2"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-700",children:"Image"})]}),e.jsxs("label",{className:"rsp-flex rsp-items-center",children:[e.jsx("input",{type:"radio",name:"carouselType",value:"VIDEO",checked:((P=a.carousel)==null?void 0:P.type)==="VIDEO",onChange:c=>g(c.target.value),className:"rsp-mr-2"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-700",children:"Video"})]})]})]}),e.jsx("div",{className:"rsp-space-y-6",children:(G=a.carousel)==null?void 0:G.cards.map((c,C)=>{var L,S,R,D,_,$,X,se;return e.jsxs("div",{className:"rsp-bg-white rsp-rounded-xl rsp-border-2 rsp-border-gray-200 rsp-overflow-hidden rsp-shadow-lg rsp-transition-all hover:rsp-shadow-xl hover:rsp-border-blue-300",children:[e.jsxs("div",{className:"rsp-bg-gradient-to-r rsp-from-blue-50 rsp-to-blue-100 rsp-px-5 rsp-py-3 rsp-flex rsp-items-center rsp-justify-between rsp-border-b rsp-border-gray-200",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-3",children:[e.jsx("div",{className:"rsp-w-8 rsp-h-8 rsp-bg-blue-500 rsp-text-white rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-font-bold rsp-text-sm rsp-shadow-md",children:C+1}),e.jsxs("h4",{className:"rsp-text-base rsp-font-semibold rsp-text-gray-800",children:["Card ",C+1]})]}),e.jsx("button",{onClick:()=>E(c.id),className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-white hover:rsp-bg-red-500 rsp-rounded-full rsp-transition-colors",title:"Remove Card",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}),e.jsx("div",{className:"rsp-p-6",children:e.jsxs("div",{className:"rsp-grid rsp-grid-cols-1 lg:rsp-grid-cols-2 rsp-gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-3 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:((L=a.carousel)==null?void 0:L.type)==="VIDEO"?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),((S=a.carousel)==null?void 0:S.type)==="VIDEO"?"Video":"Image"," Upload"]}),e.jsxs("div",{className:"rsp-border-2 rsp-border-dashed rsp-border-blue-200 rsp-rounded-xl rsp-p-6 rsp-text-center rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-white rsp-transition-all hover:rsp-border-blue-400 hover:rsp-from-blue-100 rsp-relative",children:[c.mediaUrl?e.jsxs("div",{className:"rsp-relative rsp-group",children:[((R=a.carousel)==null?void 0:R.type)==="IMAGE"?e.jsx("img",{src:c.mediaUrl,alt:`Card ${C+1}`,className:"rsp-w-full rsp-h-48 rsp-object-cover rsp-rounded-lg rsp-shadow-md",onLoad:()=>l(T=>({...T,[c.id]:!0})),onError:()=>l(T=>({...T,[c.id]:!1}))}):e.jsx("video",{src:c.mediaUrl,className:"rsp-w-full rsp-h-48 rsp-object-cover rsp-rounded-lg rsp-shadow-md",controls:!0,onLoadedData:()=>l(T=>({...T,[c.id]:!0})),onError:()=>l(T=>({...T,[c.id]:!1}))}),e.jsx("button",{onClick:()=>y(c.id,"mediaUrl",""),className:"rsp-absolute rsp-top-2 rsp-right-2 rsp-p-2 rsp-bg-red-500 rsp-text-white rsp-rounded-full hover:rsp-bg-red-600 rsp-shadow-lg rsp-opacity-0 group-hover:rsp-opacity-100 rsp-transition-opacity",title:"Remove media",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-2 rsp-left-2 rsp-bg-black rsp-bg-opacity-60 rsp-text-white rsp-text-xs rsp-px-2 rsp-py-1 rsp-rounded rsp-backdrop-blur-sm",children:((D=a.carousel)==null?void 0:D.type)==="VIDEO"?"📹 Video":"🖼️ Image"})]}):e.jsxs("div",{children:[e.jsx("div",{className:"rsp-w-20 rsp-h-20 rsp-mx-auto rsp-mb-4 rsp-bg-gradient-to-br rsp-from-blue-100 rsp-to-blue-200 rsp-rounded-xl rsp-flex rsp-items-center rsp-justify-center rsp-shadow-md",children:e.jsx("svg",{className:"rsp-w-10 rsp-h-10 rsp-text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:((_=a.carousel)==null?void 0:_.type)==="VIDEO"?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),e.jsx("input",{type:"file",accept:(($=a.carousel)==null?void 0:$.type)==="VIDEO"?"video/*":"image/*",onChange:T=>{var O;const ae=(O=T.target.files)==null?void 0:O[0];ae&&!t[c.id]&&b(c.id,ae)},className:"rsp-hidden",id:`file-upload-${c.id}`,disabled:!!t[c.id]}),e.jsxs("label",{htmlFor:`file-upload-${c.id}`,className:`rsp-inline-flex rsp-items-center rsp-gap-2 rsp-px-5 rsp-py-2.5 rsp-border rsp-border-blue-300 rsp-rounded-lg rsp-shadow-sm rsp-text-sm rsp-font-semibold rsp-text-blue-600 rsp-bg-white rsp-transition-colors ${t[c.id]?"rsp-opacity-50 rsp-cursor-not-allowed":"hover:rsp-bg-blue-50 rsp-cursor-pointer"}`,"aria-disabled":!!t[c.id],children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Upload ",((X=a.carousel)==null?void 0:X.type)==="VIDEO"?"Video":"Image"]}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-3 rsp-px-2",children:((se=a.carousel)==null?void 0:se.type)==="VIDEO"?"📹 MP4, MOV, AVI (Max 16MB)":"🖼️ PNG, JPG, GIF, TIFF, SVG, BMP (Max 5MB)"})]}),t[c.id]&&e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-black rsp-bg-opacity-30 rsp-flex rsp-items-center rsp-justify-center",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2 rsp-bg-white rsp-px-3 rsp-py-2 rsp-rounded-md rsp-shadow",children:[e.jsxs("svg",{className:"rsp-w-4 rsp-h-4 rsp-animate-spin",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25",strokeWidth:"4"}),e.jsx("path",{d:"M22 12a10 10 0 00-10-10",strokeWidth:"4"})]}),e.jsx("span",{className:"rsp-text-xs rsp-text-gray-700",children:"Uploading..."})]})})]})]}),e.jsxs("div",{className:"rsp-space-y-5",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-3 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),"Body Text",e.jsx("span",{className:"rsp-text-xs rsp-text-gray-500 rsp-font-normal",children:"(Max 160 characters)"})]}),e.jsx("div",{className:"rsp-relative",children:e.jsx("textarea",{ref:T=>{o.current[c.id]=T},value:c.body,onChange:T=>y(c.id,"body",T.target.value),maxLength:160,rows:4,className:"rsp-w-full rsp-px-4 rsp-py-3 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-400 rsp-bg-white rsp-resize-none rsp-shadow-sm rsp-transition-colors",placeholder:"Enter Card Body Message"})}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mt-2",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-1",children:[e.jsx("button",{onClick:()=>x(c.id,"body"),className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-blue-600 hover:rsp-bg-blue-50 rsp-rounded rsp-transition-colors",title:"Add Variable",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsx("button",{onClick:()=>{U(c.id),m(!0)},className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-blue-600 hover:rsp-bg-blue-50 rsp-rounded rsp-transition-colors",title:"Add Emoji",children:e.jsx(ke,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("button",{onClick:()=>{const T=o.current[c.id];if(!T)return;const{newText:ae,cursorPosition:O}=de(T,c.body,"bold");y(c.id,"body",ae),requestAnimationFrame(()=>{setTimeout(()=>{T&&(T.setSelectionRange(O,O),T.focus())},0)})},className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-blue-600 hover:rsp-bg-blue-50 rsp-rounded rsp-transition-colors",title:"Bold text (*text*)",children:e.jsxs("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z"})]})}),e.jsx("button",{onClick:()=>{const T=o.current[c.id];if(!T)return;const{newText:ae,cursorPosition:O}=de(T,c.body,"italic");y(c.id,"body",ae),requestAnimationFrame(()=>{setTimeout(()=>{T&&(T.setSelectionRange(O,O),T.focus())},0)})},className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-blue-600 hover:rsp-bg-blue-50 rsp-rounded rsp-transition-colors",title:"Italic text (_text_)",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 4h4M8 20h4M12 4l-2 16"})})})]}),e.jsxs("span",{className:`rsp-text-xs rsp-font-medium ${c.body.length>140?"rsp-text-orange-500":"rsp-text-gray-500"}`,children:[c.body.length,"/160"]})]}),(()=>{const T=c.body.match(/\{\{(\d+)\}\}/g)||[],ae=[...new Set(T.map(O=>O.replace(/[{}]/g,"")))];return ae.length===0?null:e.jsxs("div",{className:"rsp-mt-3 rsp-p-3 rsp-bg-blue-50 rsp-rounded-lg rsp-border rsp-border-blue-200",children:[e.jsx("p",{className:"rsp-text-xs rsp-font-semibold rsp-text-blue-800 rsp-mb-2",children:"Sample Values for This Card"}),e.jsx("div",{className:"rsp-grid rsp-grid-cols-1 rsp-gap-2",children:ae.map(O=>{var xe,H;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("label",{className:"rsp-text-xs rsp-text-gray-700 rsp-font-medium rsp-whitespace-nowrap",children:["{{",O,"}}",":"]}),e.jsx("input",{type:"text",value:((H=(xe=c.sampleContent)==null?void 0:xe.bodyVariables)==null?void 0:H[O])||"",onChange:ie=>{const re=ie.target.value;s(Y=>({...Y,carousel:{...Y.carousel,cards:Y.carousel.cards.map(z=>{var K,q,d;return z.id!==c.id?z:{...z,sampleContent:{headerVariables:((K=z.sampleContent)==null?void 0:K.headerVariables)||{},bodyVariables:{...((q=z.sampleContent)==null?void 0:q.bodyVariables)||{},[O]:re},buttonVariables:((d=z.sampleContent)==null?void 0:d.buttonVariables)||{}}}})}}))},className:"rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white",placeholder:"Sample value"}),e.jsx("button",{type:"button",onClick:()=>{const ie=new RegExp(`\\{\\{${O}\\}\\}`,"g"),re=(c.body||"").replace(ie,"");s(Y=>({...Y,carousel:{...Y.carousel,cards:Y.carousel.cards.map(z=>{var K,q,d;if(z.id!==c.id)return z;const Q=Object.fromEntries(Object.entries(((K=z.sampleContent)==null?void 0:K.bodyVariables)||{}).filter(([I])=>I!==O));return{...z,body:re,sampleContent:{headerVariables:((q=z.sampleContent)==null?void 0:q.headerVariables)||{},bodyVariables:Q,buttonVariables:((d=z.sampleContent)==null?void 0:d.buttonVariables)||{}}}})}}))},className:"rsp-px-2 rsp-py-1 rsp-text-xs rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`card-${c.id}-sample-${O}`)})})]})})()]}),c.buttons.length<2&&e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-3 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})}),"Add Action Button",e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-500 rsp-font-normal",children:["(",c.buttons.length,"/2)"]})]}),e.jsxs("div",{className:"rsp-grid rsp-grid-cols-3 rsp-gap-2",children:[e.jsxs("button",{onClick:()=>k(c.id,"QUICK_REPLY"),className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-2 rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-font-medium rsp-text-gray-700 hover:rsp-border-blue-400 hover:rsp-bg-blue-50 rsp-transition-all rsp-shadow-sm",children:[e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),e.jsx("span",{className:"rsp-text-xs",children:"Quick Reply"})]}),e.jsxs("button",{onClick:()=>k(c.id,"URL"),className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-2 rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-font-medium rsp-text-gray-700 hover:rsp-border-blue-400 hover:rsp-bg-blue-50 rsp-transition-all rsp-shadow-sm",children:[e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),e.jsx("span",{className:"rsp-text-xs",children:"Website"})]}),e.jsxs("button",{onClick:()=>k(c.id,"PHONE_NUMBER"),className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-2 rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-font-medium rsp-text-gray-700 hover:rsp-border-blue-400 hover:rsp-bg-blue-50 rsp-transition-all rsp-shadow-sm",children:[e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),e.jsx("span",{className:"rsp-text-xs",children:"Phone"})]})]})]}),c.buttons.length>0&&e.jsxs("div",{className:"rsp-space-y-3",children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Configured Buttons"]}),c.buttons.map((T,ae)=>e.jsxs("div",{className:"rsp-p-4 rsp-border-2 rsp-border-blue-200 rsp-rounded-lg rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-white rsp-shadow-sm",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mb-3",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("div",{className:"rsp-w-6 rsp-h-6 rsp-bg-blue-500 rsp-text-white rsp-rounded rsp-flex rsp-items-center rsp-justify-center rsp-text-xs rsp-font-bold",children:ae+1}),e.jsx("span",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800",children:T.type==="QUICK_REPLY"?"Quick Reply":T.type==="URL"?"Website":"Phone"})]}),e.jsx("button",{onClick:()=>V(c.id,T.id),className:"rsp-p-1 rsp-text-gray-400 hover:rsp-text-red-500 hover:rsp-bg-red-50 rsp-rounded rsp-transition-colors",title:"Remove button",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}),e.jsxs("div",{className:"rsp-space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-1",children:"Button Text"}),e.jsx("input",{type:"text",value:T.text,onChange:O=>A(c.id,T.id,"text",O.target.value),placeholder:`Enter Button Text (Max ${T.type==="QUICK_REPLY"?"25":"20"} characters)`,maxLength:T.type==="QUICK_REPLY"?25:20,className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white"})]}),T.type==="URL"&&e.jsxs("div",{className:"rsp-space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-2",children:"URL Type"}),e.jsxs("div",{className:"rsp-flex rsp-gap-4",children:[e.jsxs("label",{className:"rsp-flex rsp-items-center rsp-cursor-pointer",children:[e.jsx("input",{type:"radio",checked:T.urlType!=="dynamic",onChange:()=>A(c.id,T.id,"urlType","static"),className:"rsp-mr-2 rsp-text-blue-600"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-700",children:"Static URL"})]}),e.jsxs("label",{className:"rsp-flex rsp-items-center rsp-cursor-pointer",children:[e.jsx("input",{type:"radio",checked:T.urlType==="dynamic",onChange:()=>A(c.id,T.id,"urlType","dynamic"),className:"rsp-mr-2 rsp-text-blue-600"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-700",children:"Dynamic URL"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-1",children:"Website URL"}),e.jsx("input",{type:"text",value:T.value||"",onChange:O=>A(c.id,T.id,"value",O.target.value),placeholder:T.urlType==="dynamic"?"https://example.com/order/{{1}}":"https://example.com",className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white"})]}),T.urlType==="dynamic"&&e.jsxs("div",{className:"rsp-space-y-2",children:[e.jsx("div",{className:"rsp-p-2 rsp-bg-blue-50 rsp-rounded rsp-border rsp-border-blue-200",children:e.jsxs("p",{className:"rsp-text-xs rsp-text-blue-700",children:[e.jsx("strong",{children:"Tip:"})," Use ","{{"," and ","}}}"," to add variables (e.g., https://example.com/","{{"," 1","}}",")"]})}),e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>{if(((T.value||"").match(/\{\{(\d+)\}\}/g)||[]).length>=3)return;const H=((T.value||"").match(/\{\{(\d+)\}\}/g)||[]).map(z=>{const Q=z.match(/{{(\d+)}}/);return Q?parseInt(Q[1],10):0}),re=(H.length>0?Math.max(...H):0)+1,Y=(T.value||"")+`{{${re}}}`;A(c.id,T.id,"value",Y)},disabled:((T.value||"").match(/\{\{(\d+)\}\}/g)||[]).length>=3,className:"rsp-px-3 rsp-py-1.5 rsp-text-xs rsp-bg-blue-500 hover:rsp-bg-blue-600 rsp-text-white rsp-rounded disabled:rsp-bg-gray-300 disabled:rsp-cursor-not-allowed rsp-transition-colors",children:"+ Add Variable"}),((T.value||"").match(/\{\{(\d+)\}\}/g)||[]).length>=3&&e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:"Maximum 3 variables allowed"})]}),(()=>{const O=(T.value||"").match(/\{\{(\d+)\}\}/g)||[],xe=[...new Set(O.map(H=>H.replace(/[{}]/g,"")))];return xe.length===0?null:e.jsxs("div",{className:"rsp-p-3 rsp-bg-gray-50 rsp-rounded-lg rsp-border rsp-border-gray-200",children:[e.jsx("h4",{className:"rsp-text-xs rsp-font-semibold rsp-text-gray-700 rsp-mb-2",children:"Sample Values for URL Variables"}),e.jsx("div",{className:"rsp-space-y-2",children:xe.map(H=>{var ie,re;return e.jsxs("div",{className:"rsp-space-y-1",children:[e.jsxs("label",{className:"rsp-block rsp-text-xs rsp-text-gray-600 rsp-mb-1",children:["Variable ","{{",H,"}}"]}),e.jsx("input",{type:"text",value:((re=(ie=c.sampleContent)==null?void 0:ie.buttonVariables)==null?void 0:re[H])||"",onChange:Y=>{const z=Y.target.value;s(Q=>({...Q,carousel:{...Q.carousel,cards:Q.carousel.cards.map(K=>{var q,d,I;return K.id!==c.id?K:{...K,sampleContent:{headerVariables:((q=K.sampleContent)==null?void 0:q.headerVariables)||{},bodyVariables:((d=K.sampleContent)==null?void 0:d.bodyVariables)||{},buttonVariables:{...((I=K.sampleContent)==null?void 0:I.buttonVariables)||{},[H]:z}}}})}}))},className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-ring-1 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-bg-white",placeholder:`Sample value (e.g., ${H==="1"?"order123":"user456"})`}),e.jsx("button",{type:"button",onClick:()=>{const Y=T.value||"",z=new RegExp(`\\{\\{${H}\\}\\}`,"g"),Q=Y.replace(z,"");A(c.id,T.id,"value",Q),s(K=>({...K,carousel:{...K.carousel,cards:K.carousel.cards.map(q=>{var I,W,F;if(q.id!==c.id)return q;const d=Object.fromEntries(Object.entries(((I=q.sampleContent)==null?void 0:I.buttonVariables)||{}).filter(([Z])=>Z!==H));return{...q,sampleContent:{headerVariables:((W=q.sampleContent)==null?void 0:W.headerVariables)||{},bodyVariables:((F=q.sampleContent)==null?void 0:F.bodyVariables)||{},buttonVariables:d}}})}}))},className:"rsp-px-2 rsp-py-1 rsp-text- rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`button-${T.id}-sample-${H}`)})})]})})()]})]}),T.type==="PHONE_NUMBER"&&e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-1",children:"Phone Number"}),e.jsx("input",{type:"text",value:T.value||"",onChange:O=>A(c.id,T.id,"value",O.target.value),placeholder:"+1234567890",className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white"})]})]})]},T.id))]})]})]})})]},c.id)})}),e.jsx("div",{className:"rsp-bg-blue-50 rsp-border-l-4 rsp-border-blue-500 rsp-p-4 rsp-rounded-r-md",children:e.jsxs("div",{className:"rsp-flex",children:[e.jsx("div",{className:"rsp-flex-shrink-0",children:e.jsx("svg",{className:"rsp-h-5 rsp-w-5 rsp-text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"rsp-ml-3",children:[e.jsx("h3",{className:"rsp-text-sm rsp-font-medium rsp-text-blue-800",children:"Meta WhatsApp HSM Guidelines"}),e.jsx("div",{className:"rsp-mt-2 rsp-text-sm rsp-text-blue-700",children:e.jsxs("ul",{className:"rsp-list-disc rsp-list-inside rsp-space-y-1",children:[e.jsx("li",{children:"Maximum 10 carousel cards per template"}),e.jsx("li",{children:"Maximum 2 buttons per card"}),e.jsx("li",{children:"Card body text limited to 160 characters"}),e.jsx("li",{children:"Button text limited to 20-25 characters depending on type"}),e.jsx("li",{children:"Images: PNG, JPG, GIF, TIFF, SVG, BMP formats supported"}),e.jsx("li",{children:"Videos: MP4, MOV, AVI formats supported"})]})})]})]})}),e.jsx(Ee,{isOpen:f,onClose:()=>m(!1),onSelect:h})]})}const Ue=async a=>{try{console.log(`Starting file upload: ${a.name}`);const s=await Pa(a);return console.log(`File uploaded successfully: ${s}`),s}catch(s){throw console.error("Upload failed in parent:",s),s}},Fa=a=>{const r=(a.body||"").match(/\{\{(\d+)\}\}/g);if(!r)return 0;const t=r.map(n=>{const l=n.match(/{{(\d+)}}/);return l?parseInt(l[1],10):0});return t.length>0?Math.max(...t):0};function $a({template:a,setTemplate:s}){const[r,t]=v.useState(!1),n=v.useRef(null),l=()=>{t(!0),setTimeout(()=>{n.current&&n.current.focus()},0)},i=p=>{const f=n.current,m=a.body,w=f&&typeof f.selectionStart=="number"?f.selectionStart:m.length,U=m.substring(0,w),o=m.substring(w),j=U+p+o;s({...a,body:j}),setTimeout(()=>{if(n.current){const E=w+p.length;n.current.setSelectionRange(E,E),n.current.focus()}},0),t(!1)};return e.jsxs("div",{className:"rsp-space-y-6",children:[a.type!=="CAROUSEL"&&e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsx("h2",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Message Content"}),e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsx(Ia,{template:a,setTemplate:s,onFileUpload:Ue}),e.jsx(Ba,{template:a,setTemplate:s})]})]}),a.type==="CAROUSEL"&&e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsx("h2",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Message Content"}),e.jsx("div",{className:"rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm",children:e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:["Body ",e.jsx("span",{className:"rsp-text-gray-500",children:"(Global message for carousel)"})]}),e.jsx("div",{className:"rsp-relative",children:e.jsx("textarea",{ref:n,value:a.body,onChange:p=>s({...a,body:p.target.value}),maxLength:1024,rows:4,className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white rsp-resize-none",placeholder:"Enter Template Message"})}),!a.body&&e.jsx("p",{className:"rsp-text-xs rsp-text-red-600 rsp-mt-1",children:"Body is required."}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mt-1",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("button",{onClick:()=>{const m=`{{${Fa(a)+1}}}`;s({...a,body:a.body+m})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Add Variable",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsx("button",{onClick:l,className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Add emoji",children:e.jsx(ke,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("button",{onClick:()=>{if(!n.current)return;const{newText:p,cursorPosition:f}=de(n.current,a.body,"bold");s({...a,body:p}),requestAnimationFrame(()=>{setTimeout(()=>{n.current&&(n.current.setSelectionRange(f,f),n.current.focus())},0)})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Bold text (*text*)",children:e.jsxs("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z"})]})}),e.jsx("button",{onClick:()=>{if(!n.current)return;const{newText:p,cursorPosition:f}=de(n.current,a.body,"italic");s({...a,body:p}),requestAnimationFrame(()=>{setTimeout(()=>{n.current&&(n.current.setSelectionRange(f,f),n.current.focus())},0)})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Italic text (_text_)",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 4h4M8 20h4M12 4l-2 16"})})})]}),e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-500",children:[a.body.length,"/1024"]})]}),(()=>{const p=a.body.match(/\{\{(\d+)\}\}/g)||[],f=[...new Set(p.map(m=>m.replace(/[{}]/g,"")))];return f.length===0?null:e.jsxs("div",{className:"rsp-mt-3",children:[e.jsx("p",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-2",children:"Sample Values"}),e.jsx("div",{className:"rsp-grid rsp-grid-cols-3 rsp-gap-2",children:f.map(m=>{var w,U;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("label",{className:"rsp-text-xs rsp-text-gray-500 rsp-whitespace-nowrap",children:["{{",m,"}}",":"]}),e.jsx("input",{type:"text",value:((U=(w=a.sampleContent)==null?void 0:w.bodyVariables)==null?void 0:U[m])||"",onChange:o=>{var E,y,g;const j={...a.sampleContent,headerVariables:((E=a.sampleContent)==null?void 0:E.headerVariables)||{},bodyVariables:{...(y=a.sampleContent)==null?void 0:y.bodyVariables,[m]:o.target.value},buttonVariables:((g=a.sampleContent)==null?void 0:g.buttonVariables)||{}};s({...a,sampleContent:j})},className:"rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500",placeholder:"Sample"}),e.jsx("button",{type:"button",onClick:()=>{var y,g,x;const o=new RegExp(`\\{\\{${m}\\}\\}`,"g"),j=(a.body||"").replace(o,""),E=Object.fromEntries(Object.entries(((y=a.sampleContent)==null?void 0:y.bodyVariables)||{}).filter(([h])=>h!==m));s({...a,body:j,sampleContent:{...a.sampleContent,bodyVariables:E,headerVariables:((g=a.sampleContent)==null?void 0:g.headerVariables)||{},buttonVariables:((x=a.sampleContent)==null?void 0:x.buttonVariables)||{}}})},className:"rsp-px-2 rsp-py-1 rsp-text-xs rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`global-body-sample-${m}`)})})]})})()]})})]}),a.type==="CAROUSEL"&&e.jsx("div",{className:"rsp-space-y-6",children:e.jsx(_a,{template:a,setTemplate:s,onFileUpload:Ue})}),a.type!=="CAROUSEL"&&e.jsx("div",{className:"rsp-space-y-6",children:e.jsx(Oa,{template:a,setTemplate:s})}),e.jsx(Ee,{isOpen:r,onClose:()=>t(!1),onSelect:i})]})}function Ha({type:a}){switch(a){case"QUICK_REPLY":return e.jsx(Qe,{className:"w-4 h-4"});case"URL":return e.jsx(Je,{className:"w-4 h-4"});case"CALL":return e.jsx(Ie,{className:"w-4 h-4"});case"FLOW":return e.jsx(aa,{className:"w-4 h-4"});default:return null}}function qa({buttons:a,flowButtonText:s,onShowAllOptions:r}){const t=[...a];s&&t.push({id:"flow-button",type:"QUICK_REPLY",text:s});const n=t.slice(0,2);return e.jsxs("div",{className:"rsp-divide-y rsp-divide-gray-200",children:[n.map(l=>e.jsxs("button",{className:"rsp-w-full rsp-py-4 rsp-text-[#128C7E] rsp-text-[15px] rsp-font-medium rsp-bg-white hover:rsp-bg-gray-50 rsp-flex rsp-items-center rsp-gap-3 rsp-px-4 rsp-transition-colors",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[e.jsx("div",{className:"rsp-text-[#128C7E]",children:e.jsx(Ha,{type:l.type})}),e.jsx("span",{className:"rsp-flex-1 rsp-text-left rsp-break-words rsp-break-all rsp-whitespace-pre-wrap",children:l.text}),l.id==="flow-button"&&e.jsx(We,{className:"rsp-w-5 rsp-h-5 rsp-text-[#128C7E] rsp-ml-auto"})]},l.id)),t.length>2&&e.jsxs("button",{onClick:r,className:"rsp-w-full rsp-py-4 rsp-text-[#128C7E] rsp-text-[15px] rsp-font-medium rsp-bg-white hover:rsp-bg-gray-50 rsp-flex rsp-items-center rsp-justify-center rsp-transition-colors",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[e.jsx("span",{className:"rsp-text-lg rsp-mr-2",children:"⋯"}),"See all options"]})]})}const Wa=a=>{const s=[];let r=0;for(;r<a.length;)if(a[r]==="*"&&r+1<a.length&&a[r+1]==="_"){const t=r+2;let n=t;for(;n<a.length-1;){if(a[n]==="_"&&a[n+1]==="*"){const l=a.substring(t,n);s.push({type:"boldItalic",content:l}),r=n+2;break}n++}n>=a.length-1&&(s.push({type:"text",content:a[r]}),r++)}else if(a[r]==="*"){const t=r+1;let n=t;for(;n<a.length;){if(a[n]==="*"&&(n===t||a[n-1]!=="_")){const l=a.substring(t,n);s.push({type:"bold",content:l}),r=n+1;break}n++}n>=a.length&&(s.push({type:"text",content:a[r]}),r++)}else if(a[r]==="_"){const t=r+1;let n=t;for(;n<a.length;){if(a[n]==="_"&&(n===t||a[n-1]!=="*")){const l=a.substring(t,n);s.push({type:"italic",content:l}),r=n+1;break}n++}n>=a.length&&(s.push({type:"text",content:a[r]}),r++)}else{let t=r;for(;r<a.length&&a[r]!=="*"&&a[r]!=="_";)r++;const n=a.substring(t,r);n&&s.push({type:"text",content:n})}return s},we=(a,s)=>{if(!a)return"";let r=a;s&&(r=r.replace(/\{\{(\d+)\}\}/g,(i,p)=>s[p]||`[Variable ${p}]`));const t=Wa(r),n=[];let l=0;return t.forEach(i=>{switch(i.type){case"text":n.push(e.jsx(v.Fragment,{children:i.content},`text-${l++}`));break;case"bold":n.push(e.jsx("strong",{children:i.content},`format-${l++}`));break;case"italic":n.push(e.jsx("em",{children:i.content},`format-${l++}`));break;case"boldItalic":n.push(e.jsx("strong",{children:e.jsx("em",{children:i.content})},`format-${l++}`));break}}),e.jsx(e.Fragment,{children:n})};function Ga({template:a}){var U,o,j,E;const[s,r]=v.useState(!1),[t,n]=v.useState(0),l=(U=a.carousel)!=null&&U.cards?a.carousel.cards.length:0;v.useEffect(()=>{a.type==="CAROUSEL"&&l>0?t>=l&&n(0):n(0)},[l,a.type]);const i=y=>{var g;return y?we(y,(g=a.sampleContent)==null?void 0:g.headerVariables):""},p=y=>{var g;return y?we(y,(g=a.sampleContent)==null?void 0:g.bodyVariables):""},f=y=>{var h;const g=(y==null?void 0:y.body)??"";if(!g)return"";const x=((h=y==null?void 0:y.sampleContent)==null?void 0:h.bodyVariables)??{};return we(g,x)},m=a.headerType!=="NONE"||a.body||a.footer||a.buttons.length>0||a.type==="CAROUSEL"&&((o=a.carousel)==null?void 0:o.cards.length),w=a.headerText||a.body||a.footer;return e.jsxs("div",{className:"rsp-bg-white rsp-rounded-lg rsp-shadow-sm rsp-border rsp-border-gray-200",children:[e.jsxs("div",{className:"rsp-p-4 rsp-border-b rsp-border-gray-200",children:[e.jsx("h3",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Preview"}),e.jsx("p",{className:"rsp-text-sm rsp-text-gray-500",children:"See how your template will look"})]}),e.jsx("div",{className:"rsp-p-6 rsp-flex rsp-justify-center",children:e.jsx("div",{className:"rsp-relative",children:e.jsxs("div",{className:"rsp-w-[280px] rsp-h-[580px] rsp-bg-gradient-to-b rsp-from-[#1a1a1a] rsp-via-[#2d2d2f] rsp-to-[#000000] rsp-rounded-[35px] rsp-p-[2px] rsp-relative rsp-shadow-[0_20px_40px_-10px_rgba(0,0,0,0.7)] rsp-border-[1px] rsp-border-[#404040]",children:[e.jsx("div",{className:"rsp-absolute rsp-right-[-2px] rsp-top-[120px] rsp-w-[2px] rsp-h-[50px] rsp-bg-gradient-to-b rsp-from-[#404040] rsp-to-[#1a1a1a] rsp-rounded-l-[1px] rsp-shadow-md"}),e.jsx("div",{className:"rsp-absolute rsp-left-[-2px] rsp-top-[100px] rsp-w-[2px] rsp-h-[25px] rsp-bg-gradient-to-b rsp-from-[#404040] rsp-to-[#1a1a1a] rsp-rounded-r-[1px] rsp-shadow-sm"}),e.jsx("div",{className:"rsp-absolute rsp-left-[-2px] rsp-top-[135px] rsp-w-[2px] rsp-h-[40px] rsp-bg-gradient-to-b rsp-from-[#404040] rsp-to-[#1a1a1a] rsp-rounded-r-[1px] rsp-shadow-sm"}),e.jsx("div",{className:"rsp-absolute rsp-left-[-2px] rsp-top-[70px] rsp-w-[2px] rsp-h-[20px] rsp-bg-gradient-to-b rsp-from-[#ff8c42] rsp-to-[#ff6b35] rsp-rounded-r-[1px] rsp-shadow-md"}),e.jsxs("div",{className:"rsp-w-full rsp-h-full rsp-bg-black rsp-rounded-[33px] rsp-overflow-hidden rsp-relative rsp-shadow-[inset_0_1px_3px_rgba(0,0,0,0.3)]",children:[e.jsx("div",{className:"rsp-absolute rsp-top-[14px] rsp-left-1/2 rsp-transform -rsp-translate-x-1/2 rsp-w-[70px] rsp-h-[18px] rsp-bg-gradient-to-b rsp-from-[#0a0a0a] rsp-to-[#000000] rsp-rounded-[9px] rsp-z-20 rsp-shadow-[0_1px_4px_rgba(0,0,0,0.6)] rsp-border rsp-border-[#1a1a1a] rsp-flex rsp-items-center rsp-justify-center",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-center rsp-gap-[8px]",children:[e.jsx("div",{className:"rsp-w-[3px] rsp-h-[3px] rsp-bg-gradient-to-br rsp-from-[#1a1a1a] rsp-to-[#000000] rsp-rounded-full rsp-shadow-inner"}),e.jsx("div",{className:"rsp-w-[2px] rsp-h-[2px] rsp-bg-gradient-to-br rsp-from-[#333] rsp-to-[#000] rsp-rounded-full"})]})}),e.jsxs("div",{className:"rsp-w-full rsp-h-full rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-rounded-[33px] rsp-relative rsp-overflow-hidden rsp-shadow-[inset_0_1px_2px_rgba(0,0,0,0.1)]",children:[e.jsxs("div",{className:"rsp-absolute rsp-top-0 rsp-left-0 rsp-right-0 rsp-h-[45px] rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-flex rsp-items-center rsp-justify-between rsp-px-[30px] rsp-z-10",children:[e.jsx("div",{className:"rsp-text-[13px] rsp-font-semibold rsp-text-black rsp-tracking-tight",children:"9:41"}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-[5px]",children:[e.jsxs("div",{className:"rsp-flex rsp-gap-[2px] rsp-items-end",children:[e.jsx("div",{className:"rsp-w-[1.5px] rsp-h-[2px] rsp-bg-gradient-to-t rsp-from-black rsp-to-[#333] rsp-rounded-[0.5px]"}),e.jsx("div",{className:"rsp-w-[1.5px] rsp-h-[3px] rsp-bg-gradient-to-t rsp-from-black rsp-to-[#333] rsp-rounded-[0.5px]"}),e.jsx("div",{className:"rsp-w-[1.5px] rsp-h-[4px] rsp-bg-gradient-to-t rsp-from-black rsp-to-[#333] rsp-rounded-[0.5px]"}),e.jsx("div",{className:"rsp-w-[1.5px] rsp-h-[5px] rsp-bg-gradient-to-t rsp-from-black rsp-to-[#333] rsp-rounded-[0.5px]"})]}),e.jsx("svg",{className:"rsp-w-[11px] rsp-h-[8px] rsp-text-black rsp-opacity-90",viewBox:"0 0 15 11",fill:"currentColor",children:e.jsx("path",{d:"M1.5 4.5C3.5 2.5 6 1.5 7.5 1.5S11.5 2.5 13.5 4.5M3 6.5C4.5 5 6 4.5 7.5 4.5S10.5 5 12 6.5M5 8.5C6 7.5 6.75 7.25 7.5 7.25S9 7.5 10 8.5M7.5 10.5C7.5 10.5 7.5 10.5 7.5 10.5"})}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-center",children:[e.jsx("div",{className:"rsp-w-[18px] rsp-h-[9px] rsp-border-[1px] rsp-border-black rsp-border-opacity-60 rsp-rounded-[2px] rsp-relative",children:e.jsx("div",{className:"rsp-absolute rsp-inset-[1px] rsp-bg-gradient-to-r rsp-from-[#34d399] rsp-to-[#10b981] rsp-rounded-[1px] rsp-w-[13px] rsp-shadow-inner"})}),e.jsx("div",{className:"rsp-absolute rsp-right-[-2px] rsp-top-[2px] rsp-w-[1px] rsp-h-[5px] rsp-bg-black rsp-bg-opacity-60 rsp-rounded-[0.5px]"})]})]})]}),e.jsxs("div",{className:"rsp-absolute rsp-top-[45px] rsp-left-0 rsp-right-0 rsp-h-[60px] rsp-bg-gradient-to-r rsp-from-[#075E54] rsp-via-[#0a6b5f] rsp-to-[#128C7E] rsp-flex rsp-items-center rsp-px-4 rsp-gap-3 rsp-z-10 rsp-shadow-[0_2px_8px_rgba(0,0,0,0.15)]",children:[e.jsx("svg",{className:"rsp-w-5 rsp-h-5 rsp-text-white rsp-opacity-95 rsp-drop-shadow-sm",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.42-1.41L7.83 13H20v-2z"})}),e.jsx("div",{className:"rsp-w-[36px] rsp-h-[36px] rsp-bg-gradient-to-br rsp-from-[#25D366] rsp-via-[#20c55e] rsp-to-[#128C7E] rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-shadow-[0_2px_6px_rgba(0,0,0,0.2)] rsp-border-[2px] rsp-border-white rsp-border-opacity-30",children:e.jsx("span",{className:"rsp-text-white rsp-text-[14px] rsp-font-bold rsp-drop-shadow-sm",children:"B"})}),e.jsxs("div",{className:"rsp-flex-1",children:[e.jsx("div",{className:"rsp-text-white rsp-text-[14px] rsp-font-semibold rsp-drop-shadow-sm rsp-tracking-tight",children:"Business"}),e.jsx("div",{className:"rsp-text-[#B8E6D1] rsp-text-[11px] rsp-opacity-85 rsp-font-medium",children:"WhatsApp Business"})]}),e.jsxs("div",{className:"rsp-flex rsp-gap-4",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-white rsp-opacity-90 rsp-drop-shadow-sm",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})}),e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-white rsp-opacity-90 rsp-drop-shadow-sm",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})})]})]}),e.jsxs("div",{className:"rsp-absolute rsp-top-[105px] rsp-left-0 rsp-right-0 rsp-bottom-[60px] rsp-bg-gradient-to-b rsp-from-[#E8E2DB] rsp-via-[#E5DDD5] rsp-to-[#DDD5CC] rsp-overflow-y-auto",children:[e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-opacity-[0.03]",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.08'%3E%3Cpath d='M40 40c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8zm0-32c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8zm32 32c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}}),e.jsx("div",{className:"rsp-relative rsp-px-4 rsp-py-4",children:m?e.jsxs("div",{className:"rsp-flex rsp-flex-col rsp-items-start",children:[(w||a.headerType==="MEDIA"||a.buttons.length>0)&&e.jsx("div",{className:"rsp-flex rsp-justify-start rsp-mb-1.5",children:e.jsxs("div",{className:"rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-rounded-[12px] rsp-max-w-[220px] rsp-shadow-[0_2px_8px_rgba(0,0,0,0.08)] rsp-relative rsp-border rsp-border-gray-100 rsp-animate-slide-up rsp-overflow-hidden",children:[a.headerType==="MEDIA"&&a.mediaUrl&&e.jsxs("div",{className:"rsp-w-full rsp-overflow-hidden",children:[a.mediaType==="IMAGE"&&e.jsx("img",{src:a.mediaUrl,alt:"Header media",className:"rsp-w-full rsp-max-h-[150px] rsp-object-cover rsp-block",onError:y=>{y.currentTarget.style.display="none"}}),a.mediaType==="VIDEO"&&e.jsxs("div",{className:"rsp-relative rsp-min-w-[150px] rsp-w-full rsp-h-[150px] rsp-bg-gradient-to-br rsp-from-gray-800 rsp-to-gray-900 rsp-flex rsp-items-center rsp-justify-center",children:[e.jsx("div",{className:"rsp-w-12 rsp-h-12 rsp-bg-black rsp-bg-opacity-70 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-shadow-lg rsp-border rsp-border-white rsp-border-opacity-20",children:e.jsx("div",{className:"rsp-w-0 rsp-h-0 rsp-border-l-[8px] rsp-border-l-white rsp-border-t-[6px] rsp-border-t-transparent rsp-border-b-[6px] rsp-border-b-transparent rsp-ml-1"})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-2 rsp-right-2 rsp-bg-black rsp-bg-opacity-75 rsp-text-white rsp-text-[10px] rsp-px-2 rsp-py-1 rsp-rounded-full rsp-shadow-md rsp-backdrop-blur-sm",children:"📹 Video"})]}),a.mediaType==="DOCUMENT"&&e.jsx("div",{className:"rsp-p-3 rsp-bg-gradient-to-r rsp-from-gray-50 rsp-to-gray-100",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("div",{className:"rsp-w-10 rsp-h-10 rsp-bg-gradient-to-br rsp-from-red-500 rsp-to-red-600 rsp-rounded-lg rsp-flex rsp-items-center rsp-justify-center rsp-shadow-md",children:e.jsx("span",{className:"rsp-text-white rsp-text-[9px] rsp-font-bold",children:"PDF"})}),e.jsxs("div",{children:[e.jsx("div",{className:"rsp-text-[12px] rsp-font-semibold rsp-text-gray-800",children:"Document"}),e.jsx("div",{className:"rsp-text-[10px] rsp-text-gray-600",children:"PDF • 1.2 MB"})]})]})})]}),a.headerType==="TEXT"&&a.headerText&&e.jsx("div",{className:"rsp-px-4 rsp-pt-3 rsp-pb-2",children:e.jsx("div",{className:"rsp-text-[15px] rsp-font-semibold rsp-text-[#111b21] rsp-leading-[1.3] rsp-tracking-normal rsp-break-words",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:i(a.headerText)})}),a.body&&e.jsx("div",{className:`rsp-px-4 ${a.headerType==="MEDIA"?"rsp-pt-2":"rsp-pt-3"} ${a.footer||a.buttons.length>0,"rsp-pb-2"}`,children:e.jsx("div",{className:"rsp-text-[14px] rsp-text-[#111b21] rsp-leading-[1.4] rsp-whitespace-pre-wrap rsp-tracking-normal rsp-break-words",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:p(a.body)})}),a.footer&&e.jsx("div",{className:`rsp-px-4 ${a.buttons.length>0,"rsp-pb-2"}`,children:e.jsx("div",{className:"rsp-text-[12px] rsp-text-[#667781] rsp-pt-2 rsp-border-t rsp-border-gray-100 rsp-break-words rsp-break-all rsp-whitespace-pre-wrap",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:a.footer})}),a.buttons.length>0&&e.jsx("div",{className:"rsp-border-t rsp-border-gray-100",children:e.jsx(qa,{buttons:a.buttons,onShowAllOptions:()=>r(!0)})}),a.buttons.length===0&&e.jsx("div",{className:"rsp-px-4 rsp-pb-2 rsp-text-right",children:e.jsxs("div",{className:"rsp-text-[11px] rsp-text-[#667781] rsp-flex rsp-items-center rsp-justify-end rsp-gap-1 rsp-opacity-80",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:["9:41 AM",e.jsx("svg",{className:"rsp-w-3 rsp-h-3 rsp-text-[#53bdeb]",viewBox:"0 0 16 15",fill:"currentColor",children:e.jsx("path",{d:"M15.01 3.316l-.478-.372a.365.365 0 0 0-.51.063L8.666 9.879a.32.32 0 0 1-.484.033l-.358-.325a.319.319 0 0 0-.484.032l-.378.483a.418.418 0 0 0 .036.541l1.32 1.266c.143.14.361.125.484-.033l6.272-8.048a.366.366 0 0 0-.064-.512zm-4.1 0l-.478-.372a.365.365 0 0 0-.51.063L4.566 9.879a.32.32 0 0 1-.484.033L1.891 7.769a.319.319 0 0 0-.484.032l-.378.483a.418.418 0 0 0 .036.541l3.61 3.463c.143.14.361.125.484-.033l6.272-8.048a.365.365 0 0 0-.064-.512z"})})]})})]})}),a.type==="CAROUSEL"&&(((E=(j=a.carousel)==null?void 0:j.cards)==null?void 0:E.length)||0)>0&&e.jsx("div",{className:"rsp-flex rsp-justify-start rsp-mb-1.5",children:e.jsx("div",{className:"rsp-w-[220px] rsp-animate-slide-up",children:e.jsx("div",{className:"rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-rounded-[12px] rsp-overflow-hidden rsp-shadow-[0_2px_8px_rgba(0,0,0,0.08)] rsp-border rsp-border-gray-100 rsp-relative rsp-min-h-[280px] rsp-flex rsp-flex-col",children:e.jsxs("div",{className:"rsp-relative rsp-flex-1 rsp-flex rsp-flex-col",children:[(()=>{var g,x;const y=a.carousel&&a.carousel.cards.length>0?a.carousel.cards[t]||a.carousel.cards[0]:void 0;return e.jsxs("div",{className:"rsp-flex rsp-flex-col rsp-h-full",children:[e.jsx("div",{className:"rsp-relative rsp-w-full rsp-h-[140px] rsp-bg-gray-100 rsp-group rsp-flex-shrink-0",children:y&&y.mediaUrl?e.jsxs(e.Fragment,{children:[((g=a.carousel)==null?void 0:g.type)==="IMAGE"?e.jsx("img",{src:y.mediaUrl,alt:"Carousel card",className:"rsp-w-full rsp-h-full rsp-object-cover",onError:h=>{h.currentTarget.style.display="none"}}):e.jsx("div",{className:"rsp-relative rsp-w-full rsp-h-full rsp-bg-gradient-to-br rsp-from-gray-800 rsp-to-gray-900 rsp-flex rsp-items-center rsp-justify-center",children:e.jsx("div",{className:"rsp-w-10 rsp-h-10 rsp-bg-black rsp-bg-opacity-70 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-shadow-lg",children:e.jsx("div",{className:"rsp-w-0 rsp-h-0 rsp-border-l-[6px] rsp-border-l-white rsp-border-t-[5px] rsp-border-t-transparent rsp-border-b-[5px] rsp-border-b-transparent rsp-ml-1"})})}),a.carousel&&a.carousel.cards.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>n(h=>h>0?h-1:a.carousel.cards.length-1),className:"rsp-absolute rsp-left-1 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-z-20 rsp-w-6 rsp-h-6 rsp-bg-black rsp-bg-opacity-50 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-text-white hover:rsp-bg-opacity-80 rsp-transition-all rsp-opacity-0 group-hover:rsp-opacity-100",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{onClick:()=>n(h=>h<a.carousel.cards.length-1?h+1:0),className:"rsp-absolute rsp-right-1 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-z-20 rsp-w-6 rsp-h-6 rsp-bg-black rsp-bg-opacity-50 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-text-white hover:rsp-bg-opacity-80 rsp-transition-all rsp-opacity-0 group-hover:rsp-opacity-100",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),e.jsxs("div",{className:"rsp-absolute rsp-top-2 rsp-right-2 rsp-bg-black rsp-bg-opacity-60 rsp-text-white rsp-text-[10px] rsp-px-2 rsp-py-0.5 rsp-rounded-full rsp-backdrop-blur-sm",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[t+1,"/",a.carousel?a.carousel.cards.length:0]})]}):e.jsx("div",{className:"rsp-w-full rsp-h-full rsp-flex rsp-items-center rsp-justify-center",children:e.jsxs("div",{className:"rsp-text-center",children:[e.jsx("svg",{className:"rsp-w-12 rsp-h-12 rsp-mx-auto rsp-text-gray-400 rsp-mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:((x=a.carousel)==null?void 0:x.type)==="VIDEO"?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:"No media"})]})})}),e.jsx("div",{className:"rsp-px-4 rsp-py-3 rsp-flex-1 rsp-flex rsp-items-start",children:e.jsx("p",{className:"rsp-text-[13px] rsp-text-[#111b21] rsp-leading-[1.4] rsp-line-clamp-3",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:y?f(y):"Card body text..."})}),e.jsx("div",{className:"rsp-border-t rsp-border-gray-100 rsp-mt-auto",children:y&&y.buttons.length>0?e.jsx(e.Fragment,{children:y.buttons.map((h,u)=>e.jsx("div",{className:`rsp-px-4 rsp-py-3 rsp-text-center rsp-text-[14px] rsp-text-[#128C7E] rsp-font-medium rsp-break-words rsp-whitespace-pre-wrap ${u<y.buttons.length-1?"rsp-border-b rsp-border-gray-100":""}`,style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-center rsp-gap-2",children:[h.type==="URL"&&e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),(h.type==="CALL"||h.type==="PHONE_NUMBER")&&e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),e.jsx("span",{className:"rsp-inline-block rsp-max-w-[180px] rsp-break-words rsp-break-all rsp-whitespace-pre-wrap rsp-text-center",children:h.text})]})},h.id))}):e.jsx("div",{className:"rsp-px-4 rsp-py-3 rsp-text-center rsp-text-xs rsp-text-gray-400",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:"No buttons"})})]})})(),a.carousel&&a.carousel.cards.length>1&&e.jsx("div",{className:"rsp-flex rsp-items-center rsp-justify-center rsp-gap-1.5 rsp-py-3 rsp-bg-white rsp-border-t rsp-border-gray-100",children:a.carousel&&a.carousel.cards.map((y,g)=>e.jsx("button",{onClick:()=>n(g),className:`rsp-w-2 rsp-h-2 rsp-rounded-full rsp-transition-all ${g===t?"rsp-bg-[#128C7E] rsp-w-6":"rsp-bg-gray-300 hover:rsp-bg-gray-400"}`},g))})]})})})})]}):e.jsx("div",{className:"rsp-flex rsp-items-center rsp-justify-center rsp-h-[300px]",children:e.jsxs("div",{className:"rsp-text-center rsp-text-gray-500 rsp-animate-fade-in",children:[e.jsx("div",{className:"rsp-w-12 rsp-h-12 rsp-bg-gradient-to-br rsp-from-gray-50 rsp-to-gray-100 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-mx-auto rsp-mb-2 rsp-shadow-md rsp-border rsp-border-gray-200",children:e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-gray-400",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4l4 4 4-4h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"})})}),e.jsx("p",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-600",children:"Start building your template"}),e.jsx("p",{className:"rsp-text-xs rsp-mt-1 rsp-text-gray-500",children:"Add content to see a live preview"})]})})})]}),e.jsxs("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-right-0 rsp-h-[60px] rsp-bg-gradient-to-r rsp-from-[#F0F2F5] rsp-via-[#EBEDF0] rsp-to-[#E8EAED] rsp-flex rsp-items-center rsp-px-4 rsp-gap-2 rsp-border-t rsp-border-gray-200 rsp-shadow-[0_-1px_4px_rgba(0,0,0,0.05)]",children:[e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-[#54656F] rsp-opacity-60",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"})}),e.jsx("div",{className:"rsp-flex-1 rsp-bg-gradient-to-r rsp-from-white rsp-to-[#fafafa] rsp-rounded-[24px] rsp-px-4 rsp-py-2 rsp-flex rsp-items-center rsp-min-h-[36px] rsp-shadow-[0_1px_2px_rgba(0,0,0,0.1)] rsp-border rsp-border-gray-200",children:e.jsx("span",{className:"rsp-text-[13px] rsp-text-[#667781] rsp-opacity-70 rsp-font-normal",children:"Type a message"})}),e.jsx("div",{className:"rsp-w-9 rsp-h-9 rsp-bg-gradient-to-br rsp-from-[#25D366] rsp-via-[#20c55e] rsp-to-[#00A884] rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-shadow-[0_2px_6px_rgba(37,211,102,0.3)] rsp-border rsp-border-[#20c55e] rsp-border-opacity-30",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-white rsp-drop-shadow-sm",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})})})]}),s&&e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-black rsp-bg-opacity-40 rsp-z-30 rsp-flex rsp-items-end rsp-animate-fade-in",children:e.jsxs("div",{className:"rsp-w-full rsp-bg-[#F0F2F5] rsp-rounded-t-2xl rsp-shadow-lg rsp-animate-slide-up",children:[e.jsx("div",{className:"rsp-p-4 rsp-border-b rsp-border-gray-300",children:e.jsx("h4",{className:"rsp-font-bold rsp-text-center rsp-text-gray-800 rsp-text-md",children:a.body||"Options"})}),e.jsx("div",{className:"rsp-max-h-[250px] rsp-overflow-y-auto",children:a.buttons.map((y,g)=>e.jsx("div",{className:`rsp-p-4 rsp-text-center rsp-text-[15px] rsp-text-[#128C7E] rsp-font-medium ${g<a.buttons.length-1?"rsp-border-b rsp-border-gray-300":""}`,style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:y.text},y.id))}),e.jsx("div",{onClick:()=>r(!1),className:"rsp-mt-2 rsp-p-4 rsp-text-center rsp-font-bold rsp-text-[#128C7E] rsp-bg-white rsp-cursor-pointer rsp-shadow-inner",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:"Close"})]})})]})]})]})})})]})}const Ve={name:"",category:"MARKETING",type:"BASIC",language:"en",enableClickTracking:!1,headerType:"NONE",headerText:"",body:"",footer:"",buttons:[]};function Ka({editId:a,onCancel:s}){var g,x,h;const[r,t]=v.useState(Ve),[n,l]=v.useState(!0),[i,p]=v.useState(!1),[f,m]=v.useState(!1),[w,U]=v.useState(null),[o,j]=v.useState({isOpen:!1});v.useState({isOpen:!1}),v.useEffect(()=>{if(w){const u=setTimeout(()=>{U(null)},5e3);return()=>clearTimeout(u)}},[w]);const E=async()=>{var u,k,A;try{if(m(!0),U(null),!r.name||!r.body)throw new Error("Template name and body are required");const V=localStorage.getItem("account"),b=V?JSON.parse(V):{apiKey:""};if(!b.apiKey)throw new Error("Please set your API key in the dashboard first");let N;if(a){const M=await Ca(b.apiKey,a,r);if(!M.success)throw new Error(M.message||"Update failed");N={status:"success",message:"Template updated successfully",data:{details:[{template_name:r.name,template_id:a}]}}}else if(N=await Na(b,r),N.status==="error")throw new Error(N.message);if(N.status==="error")throw new Error(N.message);j({isOpen:!0,templateName:(u=N.data)==null?void 0:u.details[0].template_name,templateId:(k=N.data)==null?void 0:k.details[0].template_id,template:(A=N.data)==null?void 0:A.template}),t(Ve)}catch(V){U(V instanceof Error?V.message:"An error occurred while creating the template")}finally{m(!1)}};v.useEffect(()=>{if(!a)return;(async()=>{try{const k=localStorage.getItem("account"),A=k?JSON.parse(k):{apiKey:""};if(!A.apiKey)throw new Error("Please set your API key in the dashboard first");const V=await Ta(A.apiKey,a);t(b=>({...b,...V}))}catch(k){console.error("Failed to load template for edit",k),U(k instanceof Error?k.message:"Failed to load template")}})()},[a]);const y=()=>{j({isOpen:!1}),s&&s()};return e.jsxs("div",{className:"rsp-min-h-screen rsp-bg-[#f5f7fc] rsp-rounded-lg rsp-shadow-sm",children:[e.jsxs("div",{className:"rsp-max-w-[1200px] rsp-mx-auto rsp-px-6 rsp-h-full",children:[e.jsx("div",{className:"rsp-py-6 rsp-border-b rsp-border-gray-200",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsx("h1",{className:"rsp-text-2xl rsp-font-semibold rsp-text-[#0043ff]",children:a?"Edit Template":"Add Template"}),e.jsx("div",{className:"rsp-flex rsp-items-center rsp-gap-3",children:e.jsxs("button",{onClick:()=>l(!n),className:`rsp-flex rsp-items-center rsp-gap-2 rsp-px-4 rsp-py-2 rsp-rounded-md rsp-text-sm rsp-font-medium rsp-transition-colors
103
- ${n?"rsp-bg-blue-100 rsp-text-blue-700 rsp-border rsp-border-blue-200":"rsp-bg-gray-100 rsp-text-gray-700 rsp-border rsp-border-gray-200"}`,children:[e.jsxs("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),n?"Hide Preview":"Show Preview"]})})]})}),e.jsxs("div",{className:`rsp-py-8 ${n?"rsp-grid xl:rsp-grid-cols-[1fr,400px] rsp-gap-8":""}`,children:[e.jsxs("div",{className:`rsp-space-y-8 ${n?"":"rsp-max-w-4xl rsp-mx-auto"}`,children:[e.jsxs("div",{className:"rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm rsp-space-y-6",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:["Template Name ",e.jsx("span",{className:"rsp-text-red-500",children:"*"})]}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:"text",value:r.name,onChange:u=>t({...r,name:u.target.value.replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"").replace(/_+/g,"_")}),onBlur:()=>p(!0),className:"rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",placeholder:"Template name cannot Have capital letters and space"}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500"})]}),!r.name&&i&&e.jsx("p",{className:"rsp-text-xs rsp-text-red-600 rsp-mt-1",children:"Template name is required."}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:"Template name cannot Have capital letters and space"})]}),e.jsxs("div",{className:"rsp-grid rsp-grid-cols-2 rsp-gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Category"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsxs("select",{value:r.category,onChange:u=>t({...r,category:u.target.value}),className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:[e.jsx("option",{value:"MARKETING",children:"Marketing"}),e.jsx("option",{value:"UTILITY",children:"Utility"})]}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500"})]}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:"Choose Marketing for promotional communication and Utility for informational messages."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Language"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("select",{value:r.language,onChange:u=>t({...r,language:u.target.value}),className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:Ma.map(u=>e.jsx("option",{value:u.value,children:u.label},u.value))}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-8 rsp-h-0.5 rsp-bg-red-500"})]})]})]}),e.jsxs("div",{className:"rsp-grid rsp-grid-cols-2 rsp-gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Template Type"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsxs("select",{value:r.type,onChange:u=>{const k=u.target.value;k==="CAROUSEL"&&!r.carousel?t({...r,type:k,carousel:{type:"IMAGE",cards:[{id:Math.random().toString(36).substr(2,9),headerType:"MEDIA",mediaType:"IMAGE",mediaUrl:"",body:"",buttons:[]}]}}):t({...r,type:k})},className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:[e.jsx("option",{value:"BASIC",children:"Basic"}),e.jsx("option",{value:"CAROUSEL",children:"Carousel"})]}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Enable click tracking"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsxs("select",{value:r.enableClickTracking.toString(),onChange:u=>t({...r,enableClickTracking:u.target.value==="true"}),className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:[e.jsx("option",{value:"false",children:"False"}),e.jsx("option",{value:"true",children:"True"})]}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]})]})]}),e.jsx("div",{className:"rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm",children:e.jsx($a,{template:r,setTemplate:t})}),e.jsxs("div",{className:"rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm rsp-pt-6 rsp-border-t rsp-border-gray-200",children:[w&&e.jsxs("div",{className:"rsp-mb-4 rsp-flex rsp-items-start rsp-gap-3 rsp-p-4 rsp-rounded-lg rsp-bg-red-50 rsp-border-l-4 rsp-border-l-red-500 rsp-relative rsp-animate-fade-in",children:[e.jsx(ve,{className:"rsp-w-5 rsp-h-5 rsp-text-red-500 rsp-flex-shrink-0 rsp-mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"rsp-text-sm rsp-font-medium rsp-text-red-800",children:"Error"}),e.jsx("p",{className:"rsp-mt-1 rsp-text-sm rsp-text-red-700",children:w})]}),e.jsx("button",{onClick:()=>U(null),className:"rsp-absolute rsp-top-2 rsp-right-2 rsp-p-1 hover:rsp-bg-red-100 rsp-rounded-full",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4 rsp-text-red-500"})})]}),e.jsxs("div",{className:"rsp-flex rsp-gap-4",children:[e.jsx("button",{onClick:()=>s==null?void 0:s(),className:"rsp-flex-1 rsp-py-3 rsp-px-6 rsp-rounded-md rsp-transition-colors rsp-text-gray-700 rsp-font-medium rsp-text-sm rsp-bg-white rsp-border rsp-border-gray-300 hover:rsp-bg-gray-50",children:"Cancel"}),e.jsx("button",{onClick:E,disabled:f,className:`rsp-flex-1 rsp-py-3 rsp-px-6 rsp-rounded-md rsp-transition-colors rsp-text-white rsp-font-medium rsp-text-sm
101
+ */const ne=J("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function me({isOpen:a,onClose:s,title:r,children:t}){const n=j.useRef(null);return j.useEffect(()=>{const l=i=>{n.current&&!n.current.contains(i.target)&&s()};return a&&document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[a,s]),a?e.jsx("div",{className:"rsp-fixed rsp-inset-0 rsp-bg-black rsp-bg-opacity-50 rsp-flex rsp-items-center rsp-justify-center rsp-p-4 rsp-z-50",children:e.jsxs("div",{ref:n,className:"rsp-bg-white rsp-rounded-lg rsp-shadow-xl rsp-w-full rsp-max-w-[600px] rsp-animate-modal-appear",style:{backgroundColor:"#f5f7fc"},children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-px-6 rsp-py-4 rsp-border-b",children:[e.jsx("h2",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900 rsp-text-center rsp-w-full rsp-break-words rsp-break-all rsp-whitespace-pre-wrap",children:r}),e.jsx("button",{onClick:s,className:"rsp-p-1 hover:rsp-bg-gray-100 rsp-rounded-full",children:e.jsx(ne,{className:"rsp-w-5 rsp-h-5 rsp-text-gray-500"})})]}),e.jsx("div",{className:"rsp-px-6 rsp-py-4 rsp-overflow-y-auto rsp-max-h-[70vh] rsp-break-words rsp-whitespace-pre-wrap",children:t})]})}):null}const Re=j.createContext({});function sa({apiKey:a,pConfig:s,children:r}){const t=j.useMemo(()=>({apiKey:a,resulMeta:s}),[a,s]),n=j.useRef(null);return j.useEffect(()=>{if(typeof window>"u"||a===void 0&&!s)return;let l={};try{const f=localStorage.getItem("account");f&&(l=JSON.parse(f))}catch(f){console.error("TrustSignalProvider: Failed to read account from storage",f)}const i={...l,...a!==void 0?{apiKey:a}:{},...s?{resulMeta:s}:{}},p=JSON.stringify(i);if(p!==n.current)try{localStorage.setItem("account",p),n.current=p}catch(f){console.error("TrustSignalProvider: Failed to persist account to storage",f)}},[a,s]),e.jsx(Re.Provider,{value:t,children:r})}function ra(){return j.useContext(Re)}const oe=a=>a?/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(a):!1;function na({onCreateTemplate:a,onEditTemplate:s}){const[r,t]=j.useState([]),[n,l]=j.useTransition(),[i,p]=j.useState([]),[f,m]=j.useState(!1),[w,U]=j.useState(()=>{const d=localStorage.getItem("account");return d?JSON.parse(d):{apiKey:""}}),{resulMeta:o}=ra(),[k,E]=j.useState(!1);j.useEffect(()=>{if(!o)return;(async()=>{m(!0);try{const I={"Content-Type":"application/json",reqs:`${o.token}`},W={clientId:o.clientId,departmentId:o.departmentId,userId:o.userId,senderId:0},Z=await(await fetch("https://wiz.resul.io/Communication/GetServiceProviderWA",{method:"POST",headers:I,body:JSON.stringify(W)})).json();console.log("WA Sender Details:",Z);const ee=((Z==null?void 0:Z.data)||[]).filter(ce=>String((ce==null?void 0:ce.ServiceProviderName)||"").toLowerCase().includes("trustsignal"));l(()=>{p(Array.isArray(ee)?ee:[])}),console.log("filterData",ee)}catch(I){console.error("Error fetching WA sender details:",I),l(()=>{p([])})}finally{m(!1)}})()},[o,l]);const[y,g]=j.useState(()=>{const d=localStorage.getItem("account"),I=d?JSON.parse(d).apiKey:"";return oe(I)}),[x,h]=j.useState(!1),[u,v]=j.useState(null),[L,V]=j.useState(null),[b,N]=j.useState({isOpen:!1}),M=j.useRef(null),[B,P]=j.useState(""),[G,c]=j.useState("all"),[C,S]=j.useState("all"),[A,R]=j.useState("all"),[D,_]=j.useState(1),$=20;j.useEffect(()=>{_(1)},[B,G,C,A]);const[X,se]=j.useState({isOpen:!1});j.useEffect(()=>{(async()=>{var W;const I=w.apiKey;if(!oe(I)){M.current&&I!==M.current&&(l(()=>{t([])}),M.current=null),g(!1),h(!1);return}h(!0),v(null);try{const F=await Me(w,{limit:1});if((F==null?void 0:F.status)==="error")throw new Error(F.message||"Template list error");const Z=(W=F==null?void 0:F.meta)==null?void 0:W.total;if(!Z||Z===0){l(()=>{t([])}),M.current=I,g(!1),h(!1);return}const ee=await Me(w,{limit:Z});if((ee==null?void 0:ee.status)==="error")throw new Error(ee.message||"Template list error");l(()=>{t(Array.isArray(ee.data)?ee.data:[])}),M.current=I,g(!1)}catch(F){v(F instanceof Error?F.message:"Failed to fetch templates"),M.current||l(()=>{t([])}),M.current=null,g(!1)}finally{h(!1)}})()},[w,l]);const T=d=>{const I=d.target.value,W={...w,apiKey:I};l(()=>{U(W)}),localStorage.setItem("account",JSON.stringify(W))},ae=(d,I)=>{se({isOpen:!0,url:d,templateName:I}),E(!0)},O=()=>{se({isOpen:!1}),E(!1)},xe=async d=>{try{const I=localStorage.getItem("account"),W=I?JSON.parse(I):{apiKey:""};if(!W.apiKey){v("Please enter your TrustSignal API key");return}V(String(d));const{deleteTemplateById:F}=await Promise.resolve().then(()=>require("./delete-CZKt5rSC.cjs")),Z=await F(W.apiKey,d);if(!Z.success)throw new Error(Z.message||"Delete failed");t(ee=>ee.filter(ce=>String(ce.id)!==String(d))),N({isOpen:!1})}catch(I){v(I instanceof Error?I.message:"Failed to delete template")}finally{V(null)}},H=r.filter(d=>{const I=B.trim(),W=I.toLowerCase(),F=d.id!=null?String(d.id):"",Z=d.name?String(d.name).toLowerCase():"",ee=I===""||F.includes(I)||Z.includes(W),ce=G==="all"||String(d.status||"").toLowerCase()===G.toLowerCase(),_e=C==="all"||String(d.category||"").toLowerCase()===C.toLowerCase(),Fe=A==="all"||String(d.language||"").toLowerCase()===A.toLowerCase();return ee&&ce&&_e&&Fe}),ie=Array.from(new Set(r.map(d=>d.language).filter(Boolean))).sort(),re=Array.from(new Set(r.map(d=>d.category).filter(Boolean))).sort(),Y=Array.from(new Set(r.map(d=>d.status).filter(Boolean))).sort(),z=Math.max(1,Math.ceil(H.length/$)),Q=(D-1)*$,K=Q+$,q=H.slice(Q,K);return e.jsxs("div",{className:"rsp-container rsp-mx-auto rsp-px-4 rsp-py-1 rsp-bg-[#f5f7fc] rsp-rounded-lg rsp-shadow-sm",children:[e.jsx("div",{className:"rsp-flex rsp-justify-end rsp-items-center"}),e.jsx("div",{className:" rsp-p-4 rsp-pl-0 rsp-rounded-lg rsp-shadow-sm rsp-mb-6",children:e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-1",children:"TrustSignal Account"}),e.jsxs("div",{className:"rsp-flex rsp-items-end rsp-gap-2",children:[e.jsx("div",{className:"rsp-relative rsp-flex-1",children:e.jsxs("div",{className:"rsp-relative",children:[(x||f)&&e.jsx("div",{className:"rsp-absolute rsp-right-2 rsp-top-1/2 -rsp-translate-y-1/2 rsp-z-10",children:e.jsx(fe,{className:"rsp-w-4 rsp-h-4 rsp-text-blue-600 rsp-animate-spin"})}),e.jsxs("select",{name:"trustsignalAccount",value:w.apiKey,onChange:T,disabled:x||f,className:"rsp-w-full rsp-h-[50px] rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent disabled:rsp-opacity-70 disabled:rsp-cursor-wait rsp-transition-all",children:[e.jsx("option",{value:"",children:f?"Loading senders...":"Select TrustSignal sender"}),i.map(d=>{const I=d.SenderID??d.UserName??"trustsignal-sender",W=d.SenderName??d.ServiceProviderName??"TrustSignal Sender",F=d.UserName??"";return oe(F)?e.jsx("option",{value:F,children:W},I):null})]})]})}),e.jsx("div",{className:"rsp-p-2",children:e.jsx("button",{onClick:()=>a==null?void 0:a(),className:"rsp-bg-blue-600 rsp-text-white rsp-p-1 rsp-rounded-full hover:rsp-bg-blue-700 rsp-flex rsp-items-center rsp-gap-2",children:e.jsx(je,{className:"rsp-w-6 rsp-h-6"})})})]})]})}),u&&e.jsx("div",{className:"rsp-bg-red-50 rsp-border-l-4 rsp-border-red-500 rsp-p-4 rsp-mb-6",children:e.jsxs("div",{className:"rsp-flex",children:[e.jsx("div",{className:"rsp-flex-shrink-0",children:e.jsx(ve,{className:"rsp-h-5 rsp-w-5 rsp-text-red-400"})}),e.jsx("div",{className:"rsp-ml-3",children:e.jsx("p",{className:"rsp-text-sm rsp-text-red-700",children:u})})]})}),e.jsx("div",{className:"rsp-mb-6",children:e.jsx("div",{className:"rsp-relative",children:e.jsx("input",{type:"text",placeholder:"Search by name or ID...",value:B,onChange:d=>P(d.target.value),className:"rsp-w-full rsp-px-0 rsp-py-3 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent"})})}),e.jsxs("div",{className:"rsp-bg-white rsp-rounded-lg rsp-shadow-sm rsp-border rsp-border-gray-200 rsp-overflow-hidden rsp-relative",children:[(x||n)&&e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-white/60 rsp-backdrop-blur-sm rsp-z-10 rsp-flex rsp-items-center rsp-justify-center rsp-transition-opacity",children:e.jsxs("div",{className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-2",children:[e.jsx(fe,{className:"rsp-w-6 rsp-h-6 rsp-text-blue-600 rsp-animate-spin"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:"Loading templates..."})]})}),e.jsx("div",{className:"rsp-overflow-x-auto",children:e.jsxs("table",{className:`rsp-min-w-full rsp-transition-opacity ${n?"rsp-opacity-70":"rsp-opacity-100"}`,children:[e.jsx("thead",{children:e.jsxs("tr",{className:"rsp-bg-blue-600 rsp-text-white",children:[e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"ID"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Name"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-gap-2",children:[e.jsx("span",{children:"Category"}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-center rsp-min-w-[120px]",children:[e.jsxs("select",{value:C,onChange:d=>S(d.target.value),className:"rsp-pr-7 rsp-pl-2 rsp-py-1 rsp-border rsp-border-white rsp-border-opacity-30 rsp-rounded-md rsp-text-sm rsp-bg-blue-400 rsp-bg-opacity-30 rsp-appearance-none rsp-h-auto rsp-leading-normal focus:rsp-outline-none focus:rsp-border-opacity-60 focus:rsp-bg-opacity-50 rsp-cursor-pointer rsp-text-white hover:rsp-bg-opacity-40 hover:rsp-border-opacity-50 rsp-transition-all",onClick:d=>d.stopPropagation(),children:[e.jsx("option",{value:"all",className:"rsp-text-gray-900 rsp-bg-white",children:"All"}),re.map(d=>e.jsx("option",{value:d.toLowerCase(),className:"rsp-text-gray-900 rsp-bg-white",children:d.charAt(0).toUpperCase()+d.slice(1)},d))]}),e.jsx(pe,{className:"rsp-absolute rsp-right-1.5 rsp-w-4 rsp-h-4 rsp-text-white rsp-pointer-events-none"})]})]})}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-gap-2",children:[e.jsx("span",{children:"Language"}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-center rsp-min-w-[120px]",children:[e.jsxs("select",{value:A,onChange:d=>R(d.target.value),className:"rsp-pr-7 rsp-pl-2 rsp-py-1 rsp-border rsp-border-white rsp-border-opacity-30 rsp-rounded-md rsp-text-sm rsp-bg-blue-400 rsp-bg-opacity-30 rsp-appearance-none rsp-h-auto rsp-leading-normal focus:rsp-outline-none focus:rsp-border-opacity-60 focus:rsp-bg-opacity-50 rsp-cursor-pointer rsp-text-white hover:rsp-bg-opacity-40 hover:rsp-border-opacity-50 rsp-transition-all",onClick:d=>d.stopPropagation(),children:[e.jsx("option",{value:"all",className:"rsp-text-gray-900 rsp-bg-white",children:"All"}),ie.map(d=>e.jsx("option",{value:d,className:"rsp-text-gray-900 rsp-bg-white",children:String(d).toUpperCase()},d))]}),e.jsx(pe,{className:"rsp-absolute rsp-right-1.5 rsp-w-4 rsp-h-4 rsp-text-white rsp-pointer-events-none"})]})]})}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Type"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-gap-2",children:[e.jsx("span",{children:"Status"}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-center rsp-min-w-[120px]",children:[e.jsxs("select",{value:G,onChange:d=>c(d.target.value),className:"rsp-pr-7 rsp-pl-2 rsp-py-1 rsp-border rsp-border-white rsp-border-opacity-30 rsp-rounded-md rsp-text-sm rsp-bg-blue-400 rsp-bg-opacity-30 rsp-appearance-none rsp-h-auto rsp-leading-normal focus:rsp-outline-none focus:rsp-border-opacity-60 focus:rsp-bg-opacity-50 rsp-cursor-pointer rsp-text-white hover:rsp-bg-opacity-40 hover:rsp-border-opacity-50 rsp-transition-all",onClick:d=>d.stopPropagation(),children:[e.jsx("option",{value:"all",className:"rsp-text-gray-900 rsp-bg-white",children:"All"}),Y.map(d=>e.jsx("option",{value:d.toLowerCase(),className:"rsp-text-gray-900 rsp-bg-white",children:d.charAt(0).toUpperCase()+d.slice(1)},d))]}),e.jsx(pe,{className:"rsp-absolute rsp-right-1.5 rsp-w-4 rsp-h-4 rsp-text-white rsp-pointer-events-none"})]})]})}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Created"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Updated"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Media"}),e.jsx("th",{className:"rsp-px-6 rsp-py-3 rsp-text-left rsp-text-sm rsp-font-medium",children:"Actions"})]})}),e.jsx("tbody",{children:y&&q.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:9,className:"rsp-px-6 rsp-py-12 rsp-text-center",children:e.jsxs("div",{className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-3",children:[e.jsx(fe,{className:"rsp-w-8 rsp-h-8 rsp-text-blue-600 rsp-animate-spin"}),e.jsx("span",{className:"rsp-text-gray-600",children:"Loading templates..."})]})})}):q.length>0?q.map((d,I)=>{const W=String(d.status||"").toLowerCase();return e.jsxs("tr",{className:`rsp-border-b rsp-border-gray-200 ${I%2===0?"rsp-bg-white":"rsp-bg-blue-50"} hover:rsp-bg-blue-100 rsp-transition-colors`,children:[e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-900",children:d.id??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-900 rsp-font-medium",children:d.name??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700 rsp-capitalize",children:d.category??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.language??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.type??"—"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4",children:e.jsx("span",{className:`rsp-inline-flex rsp-px-3 rsp-py-1 rsp-rounded-full rsp-text-xs rsp-font-medium
102
+ ${W==="approved"?"rsp-bg-green-100 rsp-text-green-800":W==="rejected"?"rsp-bg-red-100 rsp-text-red-800":"rsp-bg-yellow-100 rsp-text-yellow-800"}`,children:d.status??"Unknown"})}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.creation_time?new Date(d.creation_time).toLocaleDateString():"N/A"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.updation_time?new Date(d.updation_time).toLocaleDateString():"N/A"}),e.jsx("td",{className:"rsp-px-6 rsp-py-4 rsp-text-sm rsp-text-gray-700",children:d.medialist&&typeof d.medialist=="object"&&"header"in d.medialist&&d.medialist.header?e.jsxs("button",{onClick:()=>ae(String(d.medialist.header||""),d.name||""),className:"rsp-inline-flex rsp-items-center rsp-px-3 rsp-py-1 rsp-rounded rsp-text-xs rsp-font-medium rsp-bg-blue-100 rsp-text-blue-800 hover:rsp-bg-blue-200 rsp-transition-colors",children:[e.jsxs("svg",{className:"rsp-w-3 rsp-h-3 rsp-mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),e.jsx("span",{children:"View Media"})]}):e.jsx("span",{className:"rsp-inline-flex rsp-px-2 rsp-py-1 rsp-rounded-full rsp-text-xs rsp-font-medium rsp-bg-gray-100 rsp-text-gray-800",children:"No Media"})}),e.jsx("td",{className:"rsp-px-6 rsp-py-4",children:e.jsxs("div",{className:"rsp-flex rsp-gap-2",children:[e.jsx("button",{onClick:()=>s==null?void 0:s(String(d.id)),className:"rsp-inline-flex rsp-items-center rsp-justify-center rsp-w-8 rsp-h-8 rsp-rounded rsp-bg-blue-600 rsp-text-white hover:rsp-bg-blue-700 rsp-transition-colors",title:"Update",children:e.jsx(Ye,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("button",{onClick:()=>N({isOpen:!0,templateId:String(d.id),templateName:d.name}),disabled:L===String(d.id),className:`rsp-inline-flex rsp-items-center rsp-justify-center rsp-w-8 rsp-h-8 rsp-rounded rsp-text-white rsp-transition-colors ${L===String(d.id)?"rsp-bg-red-400":"rsp-bg-red-600 hover:rsp-bg-red-700"}`,title:L===String(d.id)?"Deleting...":"Delete",children:e.jsx(Ze,{className:"rsp-w-4 rsp-h-4"})})]})})]},String(d.id)||I)}):y?null:e.jsx("tr",{children:e.jsx("td",{colSpan:9,className:"rsp-px-6 rsp-py-8 rsp-text-center rsp-text-gray-500",children:oe(w.apiKey)?"No templates found":"Please select a TrustSignal account"})})})]})})]}),q.length>0&&e.jsxs("div",{className:"rsp-flex rsp-justify-between rsp-items-center rsp-mt-6 rsp-px-6 rsp-py-4 rsp-bg-white rsp-rounded-lg rsp-shadow-sm rsp-border rsp-border-gray-200",children:[e.jsxs("div",{className:"rsp-text-sm rsp-text-gray-700",children:["Showing ",e.jsx("span",{className:"rsp-font-medium",children:Q+1})," to ",e.jsx("span",{className:"rsp-font-medium",children:Math.min(K,H.length)})," of ",e.jsx("span",{className:"rsp-font-medium",children:H.length})," results"]}),e.jsxs("div",{className:"rsp-flex rsp-gap-2",children:[e.jsx("button",{onClick:()=>_(d=>Math.max(d-1,1)),disabled:D===1,className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-bg-white rsp-border rsp-border-gray-300 rsp-rounded-md hover:rsp-bg-gray-50 disabled:rsp-opacity-50 disabled:rsp-cursor-not-allowed rsp-transition-colors",children:"Previous"}),e.jsxs("span",{className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-gray-700",children:["Page ",D," of ",z]}),e.jsx("button",{onClick:()=>_(d=>Math.min(d+1,z)),disabled:D===z,className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-bg-white rsp-border rsp-border-gray-300 rsp-rounded-md hover:rsp-bg-gray-50 disabled:rsp-opacity-50 disabled:rsp-cursor-not-allowed rsp-transition-colors",children:"Next"})]})]}),e.jsx(me,{isOpen:X.isOpen,onClose:O,title:`Media - ${X.templateName||"Template"}`,children:e.jsxs("div",{className:"rsp-space-y-4",children:[X.url&&e.jsxs("div",{className:"rsp-text-center",children:[e.jsxs("div",{className:"rsp-relative rsp-bg-gray-50 rsp-rounded-lg rsp-p-4 rsp-min-h-[200px] rsp-flex rsp-items-center rsp-justify-center",children:[e.jsx("img",{src:X.url,alt:"Template media",className:"rsp-max-w-full rsp-max-h-[400px] rsp-mx-auto rsp-rounded-lg rsp-shadow-md rsp-object-contain",onLoad:()=>{E(!1)},onError:()=>{E(!1)}}),k&&e.jsx("div",{className:"loading-placeholder rsp-absolute rsp-inset-0 rsp-flex rsp-items-center rsp-justify-center",children:e.jsx("div",{className:"rsp-text-gray-500 rsp-text-sm",children:"Loading media..."})}),!k&&e.jsxs("div",{className:"error-placeholder rsp-absolute rsp-inset-0 rsp-flex rsp-flex-col rsp-items-center rsp-justify-center",style:{display:"none"},children:[e.jsx("svg",{className:"rsp-w-[100%] rsp-h-12 rsp-text-gray-400 rsp-m-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e.jsx("p",{className:"rsp-text-gray-500 rsp-text-sm rsp-mb-2",children:"Load media on new tab"})]})]}),e.jsxs("div",{className:"rsp-mt-4 rsp-p-3 rsp-bg-gray-50 rsp-rounded-lg",children:[e.jsx("p",{className:"rsp-text-xs rsp-text-gray-600 rsp-mb-1",children:"Media URL:"}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-800 rsp-break-all rsp-font-mono",children:X.url})]})]}),e.jsx("div",{className:"rsp-flex rsp-justify-end rsp-pt-4",children:e.jsxs("a",{href:X.url,target:"_blank",rel:"noopener noreferrer",className:"rsp-inline-flex rsp-items-center rsp-px-4 rsp-py-2 rsp-bg-blue-600 rsp-text-white rsp-text-sm rsp-font-medium rsp-rounded-md hover:rsp-bg-blue-700 rsp-transition-colors",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),"Open in New Tab"]})})]})}),e.jsx(me,{isOpen:b.isOpen,onClose:()=>N({isOpen:!1}),title:"Delete Template",children:e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsxs("p",{className:"rsp-text-sm rsp-text-gray-700",children:["Are you sure you want to delete the template ",e.jsx("span",{className:"rsp-font-medium",children:b.templateName}),"?"]}),e.jsxs("div",{className:"rsp-flex rsp-justify-end rsp-gap-3",children:[e.jsx("button",{onClick:()=>N({isOpen:!1}),className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-bg-white rsp-border rsp-border-gray-300 rsp-rounded-md hover:rsp-bg-gray-50",children:"Cancel"}),e.jsx("button",{onClick:()=>b.templateId&&xe(b.templateId),className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-white rsp-bg-red-600 rsp-rounded-md hover:rsp-bg-red-700",children:"Delete"})]})]})})]})}const ta=async(a,s)=>{var r,t,n,l,i,p,f;try{console.log("Creating template with data:",s);const m=s.language,w=s.headerType==="MEDIA"&&s.mediaType==="DOCUMENT",U=s.type==="CAROUSEL";let o="";w?o=Be(s,m):U?o=Oe(s,m):o=Pe(s,m),console.log("Raw JSON string being sent:",o);const k={method:"POST",headers:{"Content-Type":"application/json"},body:o,redirect:"follow"};console.log("Making request to:",`https://wpapi.trustsignal.io/api/v1/template?api_key=${a}`),console.log("Request options:",k);const E=await fetch(`https://wpapi.trustsignal.io/api/v1/template?api_key=${a}`,k);console.log("Response status:",E.status),console.log("Response headers:",Object.fromEntries(E.headers.entries()));const y=await E.text();console.log("Raw response:",y);let g;try{g=JSON.parse(y)}catch(x){throw new Error(`Invalid JSON response from TrustSignal API: ${x instanceof Error?x.message:"Unknown error"}`)}if(console.log("Parsed response:",g),!g.success)throw new Error(g.message||"Template creation failed");return{status:"success",message:"Template created successfully",data:{template:g.template,details:[{template_name:((r=g.template)==null?void 0:r.name)||s.name,template_id:((t=g.template)==null?void 0:t.id)||"unknown",meta_tid:(n=g.template)==null?void 0:n.meta_tid,status:(l=g.template)==null?void 0:l.status,quality:(i=g.template)==null?void 0:i.quality,temp_route:(p=g.template)==null?void 0:p.temp_route,temptype:(f=g.template)==null?void 0:f.temptype}]}}}catch(m){return console.error("TrustSignal API Error:",m),{status:"error",message:m instanceof Error?m.message:"Failed to create template"}}};function ia(a){const s=a.language,r=a.headerType==="MEDIA"&&a.mediaType==="DOCUMENT",t=a.type==="CAROUSEL";return r?Be(a,s):t?Oe(a,s):Pe(a,s)}const Be=(a,s)=>{var l,i;const r={name:a.name,lang:s,category:a.category,components:[]};a.headerType==="MEDIA"&&a.mediaUrl&&(r.media={header:a.mediaUrl},r.components.push({type:"HEADER",format:"DOCUMENT"}));const t=le(a.body),n={type:"BODY",text:a.body};if(t.length>0&&((l=a.sampleContent)!=null&&l.bodyVariables)){const p=Ce(a,t);n.example={body_text:[p]}}if(r.components.push(n),(i=a.footer)!=null&&i.trim()&&r.components.push({type:"FOOTER",text:a.footer}),a.buttons&&a.buttons.length>0){const p=a.buttons.map(f=>{var w;const m={type:f.type==="CALL"?"PHONE_NUMBER":f.type,text:f.text};if(f.type==="URL"&&f.value&&(m.url=f.value,f.urlType==="dynamic"&&f.value.includes("{{"))){const U=le(f.value);if(U.length>0&&((w=a.sampleContent)!=null&&w.buttonVariables)){const o=U.map(({number:k})=>{var E,y;return((y=(E=a.sampleContent)==null?void 0:E.buttonVariables)==null?void 0:y[k])||`sample${k}`});m.example=o}}return(f.type==="CALL"||f.type==="PHONE_NUMBER")&&f.value&&(m.phone_number=Ne(f.value)),m});r.components.push({type:"BUTTONS",buttons:p})}return JSON.stringify(r)},Oe=(a,s)=>{var i,p,f;const r={name:a.name,lang:s,category:a.category,shortlink:a.enableClickTracking?"1":"0",components:[]};(i=a.carousel)!=null&&i.cards.length&&(r.media={},a.carousel.cards.forEach((m,w)=>{m.mediaUrl&&(r.media[`card${w}header`]=m.mediaUrl)}));const t=[],n=le(a.body),l={type:"BODY",text:a.body,...n.length>0&&((p=a.sampleContent)==null?void 0:p.bodyVariables)&&{example:{body_text:[Ce(a,n)]}}};if(t.push(l),(f=a.carousel)!=null&&f.cards.length){const m={type:"CAROUSEL",cards:a.carousel.cards.map(w=>{var U;return{components:[{type:"HEADER",format:((U=a.carousel)==null?void 0:U.type)||"IMAGE"},{type:"BODY",text:w.body,...le(w.body).length>0&&{example:{body_text:[la(w)]}}},...w.buttons.length>0?[{type:"BUTTONS",buttons:w.buttons.map(o=>{var E;const k={type:o.type==="CALL"?"PHONE_NUMBER":o.type,text:o.text};if(o.type==="URL"&&o.value&&(k.url=o.value,o.urlType==="dynamic"&&o.value.includes("{{"))){const y=le(o.value);if(y.length>0){const g=((E=w==null?void 0:w.sampleContent)==null?void 0:E.buttonVariables)||{},x=y.map(({number:h})=>g[h]||`sample${h}`);k.example=x}}return(o.type==="CALL"||o.type==="PHONE_NUMBER")&&o.value&&(k.phone_number=Ne(o.value)),console.log("Carousel card button data:",k),k})}]:[]]}})};t.push(m)}return r.components=t,JSON.stringify(r)},la=a=>{var t;const s=le(a.body||""),r=((t=a==null?void 0:a.sampleContent)==null?void 0:t.bodyVariables)||{};return s.map(({number:n})=>r[n]||`Sample ${n}`)},Pe=(a,s)=>{var i,p;const r={name:a.name,lang:s,category:a.category,shortlink:a.enableClickTracking?"1":"0",components:[]};a.headerType==="MEDIA"&&a.mediaUrl&&a.mediaType!=="DOCUMENT"&&(r.media={header:a.mediaUrl});const t=[];if(a.type!=="CAROUSEL"){if(a.headerType==="TEXT"&&a.headerText){const f=le(a.headerText),m={type:"HEADER",format:"TEXT",text:a.headerText,...f.length>0&&((i=a.sampleContent)==null?void 0:i.headerVariables)&&{example:{header_text:xa(a,f)}}};t.push(m)}else if(a.headerType==="MEDIA"){const f={type:"HEADER",format:a.mediaType||"IMAGE"};t.push(f)}}const n=le(a.body),l={type:"BODY",text:a.body,...n.length>0&&((p=a.sampleContent)==null?void 0:p.bodyVariables)&&{example:{body_text:[Ce(a,n)]}}};if(t.push(l),a.footer&&a.type!=="CAROUSEL"&&t.push({type:"FOOTER",text:a.footer}),a.buttons.length>0){const f=a.buttons.map(m=>{var U;const w={type:m.type==="CALL"?"PHONE_NUMBER":m.type,text:m.text};if(m.type==="URL"&&m.value&&(w.url=m.value,m.urlType==="dynamic"&&m.value.includes("{{"))){const o=le(m.value);if(o.length>0&&((U=a.sampleContent)!=null&&U.buttonVariables)){const k=o.map(({number:E})=>{var y,g;return((g=(y=a.sampleContent)==null?void 0:y.buttonVariables)==null?void 0:g[E])||`sample${E}`});w.example=k}}return(m.type==="CALL"||m.type==="PHONE_NUMBER")&&m.value&&(w.phone_number=Ne(m.value)),w});t.push({type:"BUTTONS",buttons:f})}return r.components=t,JSON.stringify(r)},le=a=>(a.match(/\{\{(\d+)\}\}/g)||[]).map(r=>({variable:r.replace(/[{}]/g,""),number:r.replace(/[{}]/g,"")})),Ne=a=>a.startsWith("+")?a:`+${a}`,xa=(a,s)=>s.map(({number:r})=>{var t,n;return((n=(t=a.sampleContent)==null?void 0:t.headerVariables)==null?void 0:n[r])||`Sample ${r}`}),Ce=(a,s)=>s.map(({number:r})=>{var t,n;return((n=(t=a.sampleContent)==null?void 0:t.bodyVariables)==null?void 0:n[r])||`Sample ${r}`}),ca="https://wiz.resul.io",da="/communication/SaveWATemplate_new",Le={departmentId:1,clientId:3850,createdBy:7874,userId:7874,serviceproviderId:3,senderId:31},oa=async(a,s)=>{const r=a.type==="CAROUSEL"?va(a):wa(a),n={waTemplateId:typeof(s==null?void 0:s.waTemplateId)=="number"?s.waTemplateId:r.templateType,...pa(s),templateData:r},l=await fetch(fa(s),{method:"POST",headers:{"Content-Type":"application/json",...s!=null&&s.token?{Reqs:s.token}:{}},body:JSON.stringify(n)});if(!l.ok){const i=await ma(l);throw new Error(`SaveWATemplate_new failed with status ${l.status}: ${i}`)}},ma=async a=>{try{return await a.text()}catch{return"Unable to read response body"}},pa=a=>{if(!a)return{...Le};const{departmentId:s,clientId:r,createdBy:t,userId:n,serviceproviderId:l,senderId:i}=a;return{...Le,...typeof s=="number"?{departmentId:s}:{},...typeof r=="number"?{clientId:r}:{},...typeof t=="number"?{createdBy:t}:{},...typeof n=="number"?{userId:n}:{},...typeof l=="number"?{serviceproviderId:l}:{},...typeof i=="number"?{senderId:i}:{}}},fa=a=>{var r;return`${((r=a==null?void 0:a.baseUrl)==null?void 0:r.replace(/\/+$/,""))||ca}${da}`},De=a=>a.headerType==="TEXT"?a.headerText.trim().length>0:a.headerType==="MEDIA"?!!a.mediaUrl:!1,ha=a=>!!(te(a.body).length>0||a.headerType==="TEXT"&&te(a.headerText).length>0||a.footer&&te(a.footer).length>0),ua=a=>a.buttons.some(s=>s.type==="URL"&&s.urlType==="dynamic"&&s.value),ze=a=>{if(a.type==="CAROUSEL")return 11;const s=ha(a);if(ua(a))return s?9:10;if(a.headerType==="MEDIA")switch(a.mediaType){case"IMAGE":return s?2:6;case"DOCUMENT":return s?3:7;case"VIDEO":return s?4:8;default:return s?1:5}return s?1:5},ba=a=>De(a)?a.headerType==="TEXT"?"text":a.mediaType==="DOCUMENT"?"pdf":a.mediaType==="VIDEO"?"video":"image":"",ga=a=>a.headerType==="TEXT"?a.headerText||"":a.headerType==="MEDIA"&&a.mediaUrl||"",te=a=>a?(a.match(/\{\{?(\d+)\}\}?/g)||[]).map(r=>r.replace(/[{}]/g,"")):[],Te=(a,s)=>{const r=a.value||a.dynamicUrl||"",t=a.type==="URL"&&a.urlType==="dynamic",n=t?te(r):[];return{actionIndex:s,isNameEditable:!1,actionNameParam:[],actionName:a.text,actionType:ya(a),isValueEditable:t,actionValueParam:n,value:r,...a.type==="URL"&&{urlType:a.urlType==="dynamic"?"dynamic":"static"}}},ya=a=>{switch(a.type){case"URL":return"url";case"CALL":case"PHONE_NUMBER":return"call phone number";case"QUICK_REPLY":return"quick reply";case"FLOW":return"flow";default:return"unknown"}},wa=a=>{const s=te(a.body),r=a.headerType==="TEXT"?te(a.headerText):[],t=a.footer||"",n=t.trim().length>0,l=n?te(t):[],i=n&&l.length>0,p=De(a),f=a.mediaType?a.mediaType.toLowerCase():"",m=a.mediaUrl||"";return{templateName:a.name,templateType:ze(a),templateContent:a.body,bodyTags:s,languageId:a.language||"en",isUnicode:!0,isBodyEditable:s.length>0,bodyMaxLength:1024,isAction:a.buttons.length>0,actions:a.buttons.map(Te),isCarousel:!1,carousel:[],isHeader:p,isHeaderEditable:a.headerType==="TEXT"&&r.length>0,isHeaderType:ba(a),header:ga(a),headerTags:r,headerMaxLength:60,isFooter:n,isFooterEditable:i,footer:n?t:"",footerTags:l,footerMaxLength:60,isMedia:a.headerType==="MEDIA"&&!!m,isMediaEditable:!1,isMediaTypeEditable:!1,mediaType:f,mediaURL:m,mediaURLTags:[],mediaSizeInMB:10,mediaUrlMaxLength:1040}},va=a=>{var p;const s=te(a.body),r=a.footer||"",t=r.trim().length>0,n=t?te(r):[],l=((p=a.carousel)==null?void 0:p.cards)||[],i=ka(a);return{templateName:a.name,templateType:ze(a),templateContent:a.body,bodyTags:s,languageId:a.language||"en",isUnicode:!0,isBodyEditable:s.length>0,bodyMaxLength:1024,isAction:a.buttons.length>0,actions:a.buttons.map(Te),isCarousel:!0,carousel:l.map((f,m)=>ja(f,m,i)),isHeader:!1,isHeaderEditable:!1,isHeaderType:"",header:"",headerTags:[],headerMaxLength:60,isFooter:t,isFooterEditable:t&&n.length>0,footer:t?r:"",footerTags:n,footerMaxLength:60,isMedia:!1,isMediaEditable:!1,isMediaTypeEditable:!0,mediaType:"",mediaURL:"",mediaURLTags:[],mediaSizeInMB:10,mediaUrlMaxLength:1040}},ja=(a,s,r)=>{const t=te(a.body),n=r.toLowerCase(),l=a.mediaUrl||"";return{cardIndex:s,isUnicode:!0,bodyMaxLength:1024,cardBody:a.body,bodyTags:t,isCardBodyEditable:t.length>0,isMediaTypeEditable:!1,mediaType:n,mediaValue:l,actions:a.buttons.map(Te)}},ka=a=>{var n,l;const s=(n=a.carousel)==null?void 0:n.type;return s==="VIDEO"?"VIDEO":s==="IMAGE"?"IMAGE":(((l=a.carousel)==null?void 0:l.cards)||[]).some(i=>(i.mediaType||"").toUpperCase()==="VIDEO"?!0:i.mediaUrl?!!i.mediaUrl.toLowerCase().match(/\.(mp4|mov|m4v|avi|wmv|flv)(\?|$)/):!1)?"VIDEO":"IMAGE"},Na=async(a,s)=>{try{if(!s.name||!s.body)throw new Error("Missing required template fields: name and body are required");if(s.type==="CAROUSEL"&&(!s.carousel||!s.carousel.cards||s.carousel.cards.length===0))throw new Error("Carousel templates must have at least one card");if(!a.apiKey)throw new Error("Missing TrustSignal API key");const r=await ta(a.apiKey,s);if(r.status==="error")return r;try{await oa(s,a.resulMeta)}catch(t){console.error("Resul template submission failed (non-critical):",t)}return r}catch(r){return console.error("API Error:",r),{status:"error",message:r instanceof Error?r.message:"An unexpected error occurred while creating the template"}}};async function Ca(a,s,r){const t=ia(r),l={method:"POST",headers:{"Content-Type":"application/json"},body:t,redirect:"follow"},i=`https://wpapi.trustsignal.io/v1/user-templates/update/${encodeURIComponent(s)}?api_key=${encodeURIComponent(a)}`,p=await fetch(i,l),f=await p.text();if(!p.ok)return{success:!1,message:`Update failed (${p.status}): ${f}`,raw:t};try{const m=JSON.parse(f);return{success:!!((m==null?void 0:m.success)??!0),message:m==null?void 0:m.message,raw:t}}catch{return{success:!0,raw:t}}}async function Ta(a,s){var p;const r=`https://wpapi.trustsignal.io/api/v1/template/${encodeURIComponent(s)}?api_key=${encodeURIComponent(a)}`,t=await fetch(r,{method:"GET",redirect:"follow"});if(!t.ok)throw new Error(`Failed to fetch template ${s}: ${t.status}`);const n=await t.text(),l=JSON.parse(n),i=l.template||((p=l.data)==null?void 0:p.template)||l;if(!i)throw new Error("Invalid template details response");return Ea(i)}function Ea(a){var w,U;const s={headerVariables:{},bodyVariables:{},buttonVariables:{}};let r="NONE",t="",n,l,i="",p="";const f=[];if(a.jsonstruct)try{const o=JSON.parse(a.jsonstruct);if(o!=null&&o.header){const k=o.header.format;k&&k!=="TEXT"?(r="MEDIA",n=k,l=o.header.url||((w=a.medialist)==null?void 0:w.header)):k==="TEXT"&&(r="TEXT",t=o.header.text||"")}if(o!=null&&o.body&&(i=o.body.text||""),(U=o==null?void 0:o.buttons)!=null&&U.buttons&&Array.isArray(o.buttons.buttons))for(const k of o.buttons.buttons){if(!k||!k.type||!k.text)continue;const E={id:ue(),type:k.type==="PHONE_NUMBER"?"PHONE_NUMBER":k.type,text:k.text};k.type==="URL"&&(E.value=k.url,typeof k.url=="string"&&k.url.includes("{{")&&Array.isArray(k.example)?(Se(k.url).forEach((g,x)=>{s.buttonVariables[g]=k.example[x]??""}),E.urlType="dynamic"):E.urlType="static"),(k.type==="CALL"||k.type==="PHONE_NUMBER")&&(E.value=k.phone_number||""),f.push(E)}if(o!=null&&o.carousel){const k=Object.keys(o.carousel).filter(h=>/^card\d+$/.test(h));k.sort((h,u)=>{const v=parseInt(h.replace("card",""),10),L=parseInt(u.replace("card",""),10);return v-L});const E=k.map(h=>{const u=o.carousel[h]||{},v=u.header||{},L=u.body||{},V=u.buttons&&Array.isArray(u.buttons.buttons)?u.buttons.buttons:[],b=v.format,N=b==="IMAGE"||b==="VIDEO"||b==="DOCUMENT"?b:void 0,B=`card${h.replace("card","")}header`,P=v.url||(a.medialist&&typeof a.medialist=="object"&&B in a.medialist?a.medialist[B]:void 0),G=L.text||"",c=[];for(const C of V){if(!C||!C.type||!C.text)continue;const S={id:ue(),type:C.type==="PHONE_NUMBER"?"PHONE_NUMBER":C.type,text:C.text};C.type==="URL"&&(S.value=C.url,typeof C.url=="string"&&C.url.includes("{{")&&Array.isArray(C.example)?(Se(C.url).forEach((R,D)=>{}),S.urlType="dynamic"):S.urlType="static"),(C.type==="CALL"||C.type==="PHONE_NUMBER")&&(S.value=C.phone_number||""),c.push(S)}return{id:ue(),headerType:N?"MEDIA":"NONE",mediaType:N,mediaUrl:P,body:G,buttons:c,sampleContent:{headerVariables:{},bodyVariables:{},buttonVariables:{}}}});let y="IMAGE";const g=E[0];(g==null?void 0:g.mediaType)==="VIDEO"&&(y="VIDEO");const x={type:y,cards:E};return{name:a.name,category:a.category==="MARKETING"||a.category==="UTILITY"?a.category:"MARKETING",type:"CAROUSEL",language:a.lang||"en",enableClickTracking:!1,headerType:"NONE",headerText:"",body:i,footer:p,buttons:[],sampleContent:s,carousel:x}}}catch(o){console.warn("Failed to parse jsonstruct; falling back",o)}return{name:a.name,category:a.category==="MARKETING"||a.category==="UTILITY"?a.category:"MARKETING",type:"BASIC",language:a.lang||"en",enableClickTracking:!1,headerType:r,headerText:t,mediaType:n,mediaUrl:l,body:i,footer:p,buttons:f,sampleContent:s}}function Se(a){if(!a)return[];const s=a.match(/\{\{(\d+)\}\}/g)||[];return[...new Set(s.map(r=>r.replace(/[{}]/g,"")))]}function ue(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():"id-"+Math.random().toString(36).slice(2)}const Ma=[{value:"af",label:"Afrikaans"},{value:"sq",label:"Albanian"},{value:"ar",label:"Arabic"},{value:"az",label:"Azerbaijani"},{value:"bn",label:"Bengali"},{value:"bg",label:"Bulgarian"},{value:"ca",label:"Catalan"},{value:"zh_CN",label:"Chinese (CHN)"},{value:"zh_HK",label:"Chinese (HKG)"},{value:"zh_TW",label:"Chinese (TAI)"},{value:"hr",label:"Croatian"},{value:"cs",label:"Czech"},{value:"da",label:"Danish"},{value:"nl",label:"Dutch"},{value:"en_GB",label:"English (UK)"},{value:"en_US",label:"English (US)"},{value:"en",label:"English"},{value:"et",label:"Estonian"},{value:"fil",label:"Filipino"},{value:"fi",label:"Finnish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"el",label:"Greek"},{value:"gu",label:"Gujarati"},{value:"he",label:"Hebrew"},{value:"hi",label:"Hindi"},{value:"hu",label:"Hungarian"},{value:"id",label:"Indonesian"},{value:"ga",label:"Irish"},{value:"it",label:"Italian"},{value:"ja",label:"Japanese"},{value:"kn",label:"Kannada"},{value:"kk",label:"Kazakh"},{value:"ko",label:"Korean"},{value:"lo",label:"Lao"},{value:"lv",label:"Latvian"},{value:"lt",label:"Lithuanian"},{value:"mk",label:"Macedonian"},{value:"ms",label:"Malay"},{value:"mr",label:"Marathi"},{value:"nb",label:"Norwegian"},{value:"fa",label:"Persian"},{value:"pl",label:"Polish"},{value:"pt_BR",label:"Portuguese (BR)"},{value:"pt_PT",label:"Portuguese (POR)"},{value:"pa",label:"Punjabi"},{value:"ro",label:"Romanian"},{value:"ru",label:"Russian"},{value:"sr",label:"Serbian"},{value:"sk",label:"Slovak"},{value:"sl",label:"Slovenian"},{value:"es",label:"Spanish"},{value:"es_AR",label:"Spanish (ARG)"},{value:"es_ES",label:"Spanish (SPA)"},{value:"es_MX",label:"Spanish (MEX)"},{value:"sw",label:"Swahili"},{value:"sv",label:"Swedish"},{value:"ta",label:"Tamil"},{value:"te",label:"Telugu"},{value:"th",label:"Thai"},{value:"tr",label:"Turkish"},{value:"uk",label:"Ukrainian"},{value:"ur",label:"Urdu"},{value:"uz",label:"Uzbek"},{value:"vi",label:"Vietnamese"}],La=[{value:"NONE",label:"None"},{value:"TEXT",label:"Text"},{value:"MEDIA",label:"Media"}],Sa=[{value:"IMAGE",label:"Image"},{value:"VIDEO",label:"Video"},{value:"DOCUMENT",label:"Document"}],Aa=5*1024*1024,Ua=16*1024*1024,Va=100*1024*1024,be=["jpg","jpeg","png"],ge=["mp4","3gpp"],ye=["pdf","docx","xlsx","pptx","txt"];function Ia({template:a,setTemplate:s,onFileUpload:r}){var L,V;const[t,n]=j.useState(null),[l,i]=j.useState(!1),[p,f]=j.useState(null),[m,w]=j.useState(null),U=()=>{const N=(a.headerText||"").match(/{{\d+}}/g);if(!N)return 0;const M=N.map(B=>{const P=B.match(/{{(\d+)}}/);return P?parseInt(P[1],10):0});return M.length>0?Math.max(...M):0},o=()=>{const M=`{{${U()+1}}}`;if(p&&a.headerText.length+M.length<=60){const B=p.selectionStart||a.headerText.length,P=a.headerText.substring(0,B),G=a.headerText.substring(B),c=P+M+G;s({...a,headerText:c}),setTimeout(()=>{if(p){const C=B+M.length;p.setSelectionRange(C,C),p.focus()}},0)}},k=b=>{s(N=>({...N,headerType:b,headerText:b==="TEXT"?N.headerText:"",mediaType:b==="MEDIA"?N.mediaType||"IMAGE":void 0,mediaUrl:b==="MEDIA"?N.mediaUrl:void 0})),b!=="MEDIA"&&(n(null),w(null))},E=b=>{var N;return((N=b.split("?")[0].split(".").pop())==null?void 0:N.toLowerCase())||""},y=(b,N)=>{const M=E(b.name);switch(N){case"IMAGE":if(!be.includes(M))return"Invalid format. Only JPG, JPEG, PNG are allowed.";if(b.size>Aa)return"File is too large. Max size is 5 MB.";break;case"VIDEO":if(!ge.includes(M))return"Invalid format. Only MP4, 3GPP are allowed.";if(b.size>Ua)return"File is too large. Max size is 16 MB.";break;case"DOCUMENT":if(!ye.includes(M))return"Invalid format. Allowed types: PDF, DOCX, XLSX, PPTX, TXT.";if(b.size>Va)return"File is too large. Max size is 100 MB.";break;default:return"Invalid media type."}return null},g=(b,N)=>{if(!b)return null;const M=E(b);switch(N){case"IMAGE":if(!be.includes(M))return"URL does not point to a valid image (JPG, JPEG, PNG).";break;case"VIDEO":if(!ge.includes(M))return"URL does not point to a valid video (MP4, 3GPP).";break;case"DOCUMENT":if(!ye.includes(M))return"URL does not point to a valid document.";break}return null},x=()=>{n(null),s({...a,mediaUrl:""}),w(null)},h=async b=>{var B;const N=(B=b.target.files)==null?void 0:B[0];if(!N||!a.mediaType)return;w(null);const M=y(N,a.mediaType);if(M){w(M);return}i(!0),n(N);try{const P=await r(N);s({...a,mediaUrl:P})}catch(P){console.error("File upload failed:",P),x();const G=P instanceof Error?P.message:"File upload failed. Please try again.";w(G)}finally{i(!1)}},u=b=>{const N=b.target.value;if(n(null),s({...a,mediaUrl:N}),a.mediaType){const M=g(N,a.mediaType);w(M)}},v=()=>{switch(a.mediaType){case"IMAGE":return be.map(b=>`.${b}`).join(",");case"VIDEO":return ge.map(b=>`.${b}`).join(",");case"DOCUMENT":return ye.map(b=>`.${b}`).join(",");default:return"*/*"}};return e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Header Type"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("select",{value:a.headerType,onChange:b=>k(b.target.value),className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:La.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500"})]})]}),a.headerType==="TEXT"&&e.jsxs("div",{className:"rsp-animate-fade-in",children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Header Text"}),e.jsx("div",{className:"rsp-relative",children:e.jsx("input",{ref:f,type:"text",value:a.headerText,onChange:b=>s({...a,headerText:b.target.value}),maxLength:60,className:"rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",placeholder:"Add a 60 character title to your message"})}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mt-2",children:[e.jsx("button",{onClick:o,className:"rsp-px-2 rsp-py-1 rsp-text-xs hover:rsp-bg-gray-100 rsp-rounded rsp-text-gray-500 rsp-flex rsp-items-center rsp-gap-1",title:"Add variable to header",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-500",children:[a.headerText.length,"/60"]})]}),(()=>{const b=[...new Set((a.headerText.match(/\{\{(\d+)\}\}/g)||[]).map(N=>N.replace(/[{}]/g,"")))];return b.length===0?null:e.jsxs("div",{className:"rsp-mt-3",children:[e.jsx("p",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-2",children:"Sample Values"}),e.jsx("div",{className:"rsp-grid rsp-grid-cols-3 rsp-gap-2",children:b.map(N=>{var M,B;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("label",{className:"rsp-text-xs rsp-text-gray-500 rsp-whitespace-nowrap",children:[`{{${N}}}`,":"]}),e.jsx("input",{type:"text",value:((B=(M=a.sampleContent)==null?void 0:M.headerVariables)==null?void 0:B[N])||"",onChange:P=>{var c,C,S;const G={...a.sampleContent,headerVariables:{...(c=a.sampleContent)==null?void 0:c.headerVariables,[N]:P.target.value},bodyVariables:((C=a.sampleContent)==null?void 0:C.bodyVariables)||{},buttonVariables:((S=a.sampleContent)==null?void 0:S.buttonVariables)||{}};s({...a,sampleContent:G})},className:"rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500",placeholder:"Sample"}),e.jsx("button",{type:"button",onClick:()=>{var C,S,A;const P=new RegExp(`\\{\\{${N}\\}\\}`,"g"),G=(a.headerText||"").replace(P,""),c=Object.fromEntries(Object.entries(((C=a.sampleContent)==null?void 0:C.headerVariables)||{}).filter(([R])=>R!==N));s({...a,headerText:G,sampleContent:{...a.sampleContent,headerVariables:c,bodyVariables:((S=a.sampleContent)==null?void 0:S.bodyVariables)||{},buttonVariables:((A=a.sampleContent)==null?void 0:A.buttonVariables)||{}}})},className:"rsp-px-2 rsp-py-1 rsp-text-xs rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`header-sample-${N}`)})})]})})()]}),a.headerType==="MEDIA"&&e.jsxs("div",{className:"rsp-space-y-6 rsp-animate-fade-in",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Media Type"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("select",{value:a.mediaType||"IMAGE",onChange:b=>{s(N=>({...N,mediaType:b.target.value,mediaUrl:""})),n(null),w(null)},className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:Sa.map(b=>e.jsx("option",{value:b.value,children:b.label},b.value))}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700",children:"Media"}),a.mediaUrl?e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-p-3 rsp-bg-gray-50 rsp-border rsp-border-gray-200 rsp-rounded-md",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-space-x-3 overflow-hidden",children:[a.mediaType==="IMAGE"&&e.jsx("img",{src:a.mediaUrl,alt:"Preview",className:"rsp-w-12 rsp-h-12 rsp-object-cover rsp-rounded",onError:b=>{b.currentTarget.style.display="none",m||w("Could not load image preview from URL.")},onLoad:()=>{m!=null&&m.includes("Could not load")&&w(null)}}),a.mediaType==="VIDEO"&&e.jsx("div",{className:"rsp-w-12 rsp-h-12 rsp-bg-gray-200 rsp-rounded rsp-flex rsp-items-center rsp-justify-center flex-shrink-0",children:e.jsx(Xe,{className:"rsp-w-6 rsp-h-6 rsp-text-gray-500"})}),a.mediaType==="DOCUMENT"&&e.jsx("div",{className:"rsp-w-12 rsp-h-12 rsp-bg-gray-200 rsp-rounded rsp-flex rsp-items-center rsp-justify-center flex-shrink-0",children:e.jsx(Ke,{className:"rsp-w-6 rsp-h-6 rsp-text-gray-500"})}),e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("p",{className:"rsp-text-sm rsp-font-medium rsp-text-gray-900 rsp-truncate",children:t?t.name:a.mediaUrl}),t&&e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500",children:`${(t.size/1024/1024).toFixed(2)} MB`})]})]}),e.jsx("button",{onClick:x,className:"rsp-p-1 rsp-text-gray-400 hover:rsp-text-red-500 rsp-transition-colors flex-shrink-0",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}):e.jsxs("div",{children:[e.jsx("input",{type:"file",accept:v(),onChange:h,className:"rsp-hidden",id:"media-upload",disabled:l}),e.jsxs("label",{htmlFor:"media-upload",className:`rsp-w-full rsp-px-4 rsp-py-3 rsp-border-2 rsp-border-dashed rsp-border-gray-300 rsp-rounded-md rsp-flex rsp-flex-col rsp-items-center rsp-justify-center rsp-cursor-pointer rsp-transition-colors hover:rsp-border-gray-400 hover:rsp-bg-gray-50 ${l?"rsp-opacity-50 rsp-cursor-not-allowed":""}`,children:[e.jsx(ea,{className:"rsp-w-6 rsp-h-6 rsp-text-gray-400 rsp-mb-2"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:l?"Uploading...":`Upload ${((L=a.mediaType)==null?void 0:L.toLowerCase())||"file"}`}),e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-400 rsp-mt-1",children:[a.mediaType==="IMAGE"&&"JPG, PNG up to 5MB",a.mediaType==="VIDEO"&&"MP4, 3GPP up to 16MB",a.mediaType==="DOCUMENT"&&"PDF, DOCX, etc. up to 100MB"]})]})]}),m&&e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2 rsp-text-xs rsp-text-red-600",children:[e.jsx(ve,{className:"rsp-w-4 rsp-h-4"}),e.jsx("span",{children:m})]}),e.jsxs("div",{className:"rsp-flex rsp-items-center",children:[e.jsx("div",{className:"rsp-flex-1 rsp-border-t rsp-border-gray-300"}),e.jsx("span",{className:"rsp-px-3 rsp-text-sm rsp-text-gray-500",children:"OR"}),e.jsx("div",{className:"rsp-flex-1 rsp-border-t rsp-border-gray-300"})]}),e.jsx("div",{className:"rsp-relative",children:e.jsx("input",{type:"url",value:a.mediaUrl||"",onChange:u,className:"rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",placeholder:`Enter ${(V=a.mediaType)==null?void 0:V.toLowerCase()} URL`})})]})]})]})}const Ae=[{name:"grinning-face",hexadecimal:"&#x1f600;"},{name:"grinning-face-with-smiling-eyes",hexadecimal:"&#x1f601;"},{name:"face-with-tears-of-joy",hexadecimal:"&#x1f602;"},{name:"rolling-on-the-floor-laughing",hexadecimal:"&#x1f923;"},{name:"smiling-face-with-open-mouth",hexadecimal:"&#x1f603;"},{name:"smiling-face-with-open-mouth-and-smiling-eyes",hexadecimal:"&#x1f604;"},{name:"smiling-face-with-open-mouth-and-cold-sweat",hexadecimal:"&#x1f605;"},{name:"smiling-face-with-open-mouth-and-tightly-closed-eyes",hexadecimal:"&#x1f606;"},{name:"winking-face",hexadecimal:"&#x1f609;"},{name:"smiling-face-with-smiling-eyes",hexadecimal:"&#x1f60a;"},{name:"face-savouring-delicious-food",hexadecimal:"&#x1f60b;"},{name:"smiling-face-with-sunglasses",hexadecimal:"&#x1f60e;"},{name:"smiling-face-with-heart-shaped-eyes",hexadecimal:"&#x1f60d;"},{name:"face-throwing-a-kiss",hexadecimal:"&#x1f618;"},{name:"kissing-face",hexadecimal:"&#x1f617;"},{name:"kissing-face-with-smiling-eyes",hexadecimal:"&#x1f619;"},{name:"kissing-face-with-closed-eyes",hexadecimal:"&#x1f61a;"},{name:"slightly-smiling-face",hexadecimal:"&#x1f642;"},{name:"hugging-face",hexadecimal:"&#x1f917;"},{name:"thinking-face",hexadecimal:"&#x1f914;"},{name:"neutral-face",hexadecimal:"&#x1f610;"},{name:"expressionless-face",hexadecimal:"&#x1f611;"},{name:"face-without-mouth",hexadecimal:"&#x1f636;"},{name:"face-with-rolling-eyes",hexadecimal:"&#x1f644;"},{name:"smirking-face",hexadecimal:"&#x1f60f;"},{name:"persevering-face",hexadecimal:"&#x1f623;"},{name:"disappointed-but-relieved-face",hexadecimal:"&#x1f625;"},{name:"face-with-open-mouth",hexadecimal:"&#x1f62e;"},{name:"zipper-mouth-face",hexadecimal:"&#x1f910;"},{name:"hushed-face",hexadecimal:"&#x1f62f;"},{name:"sleepy-face",hexadecimal:"&#x1f62a;"},{name:"tired-face",hexadecimal:"&#x1f62b;"},{name:"sleeping-face",hexadecimal:"&#x1f634;"},{name:"relieved-face",hexadecimal:"&#x1f60c;"},{name:"nerd-face",hexadecimal:"&#x1f913;"},{name:"face-with-stuck-out-tongue",hexadecimal:"&#x1f61b;"},{name:"face-with-stuck-out-tongue-and-winking-eye",hexadecimal:"&#x1f61c;"},{name:"face-with-stuck-out-tongue-and-tightly-closed-eyes",hexadecimal:"&#x1f61d;"},{name:"drooling-face",hexadecimal:"&#x1f924;"},{name:"unamused-face",hexadecimal:"&#x1f612;"},{name:"face-with-cold-sweat",hexadecimal:"&#x1f613;"},{name:"pensive-face",hexadecimal:"&#x1f614;"},{name:"confused-face",hexadecimal:"&#x1f615;"},{name:"upside-down-face",hexadecimal:"&#x1f643;"},{name:"money-mouth-face",hexadecimal:"&#x1f911;"},{name:"astonished-face",hexadecimal:"&#x1f632;"},{name:"slightly-frowning-face",hexadecimal:"&#x1f641;"},{name:"confounded-face",hexadecimal:"&#x1f616;"},{name:"disappointed-face",hexadecimal:"&#x1f61e;"},{name:"worried-face",hexadecimal:"&#x1f61f;"},{name:"face-with-look-of-triumph",hexadecimal:"&#x1f624;"},{name:"crying-face",hexadecimal:"&#x1f622;"},{name:"loudly-crying-face",hexadecimal:"&#x1f62d;"},{name:"frowning-face-with-open-mouth",hexadecimal:"&#x1f626;"},{name:"anguished-face",hexadecimal:"&#x1f627;"},{name:"fearful-face",hexadecimal:"&#x1f628;"},{name:"weary-face",hexadecimal:"&#x1f629;"},{name:"grimacing-face",hexadecimal:"&#x1f62c;"},{name:"face-with-open-mouth-and-cold-sweat",hexadecimal:"&#x1f630;"},{name:"face-screaming-in-fear",hexadecimal:"&#x1f631;"},{name:"flushed-face",hexadecimal:"&#x1f633;"},{name:"dizzy-face",hexadecimal:"&#x1f635;"},{name:"pouting-face",hexadecimal:"&#x1f621;"},{name:"angry-face",hexadecimal:"&#x1f620;"},{name:"smiling-face-with-halo",hexadecimal:"&#x1f607;"},{name:"face-with-cowboy-hat",hexadecimal:"&#x1f920;"},{name:"clown-face",hexadecimal:"&#x1f921;"},{name:"lying-face",hexadecimal:"&#x1f925;"},{name:"face-with-medical-mask",hexadecimal:"&#x1f637;"},{name:"face-with-thermometer",hexadecimal:"&#x1f912;"},{name:"face-with-head-bandage",hexadecimal:"&#x1f915;"},{name:"nauseated-face",hexadecimal:"&#x1f922;"},{name:"sneezing-face",hexadecimal:"&#x1f927;"},{name:"smiling-face-with-horns",hexadecimal:"&#x1f608;"},{name:"imp",hexadecimal:"&#x1f47f;"},{name:"japanese-ogre",hexadecimal:"&#x1f479;"},{name:"japanese-goblin",hexadecimal:"&#x1f47a;"},{name:"skull",hexadecimal:"&#x1f480;"},{name:"skull-and-crossbones",hexadecimal:"&#x2620;"},{name:"ghost",hexadecimal:"&#x1f47b;"},{name:"extraterrestrial-alien",hexadecimal:"&#x1f47d;"},{name:"alien-monster",hexadecimal:"&#x1f47e;"},{name:"robot-face",hexadecimal:"&#x1f916;"},{name:"pile-of-poo",hexadecimal:"&#x1f4a9;"},{name:"smiling-cat-face-with-open-mouth",hexadecimal:"&#x1f63a;"},{name:"grinning-cat-face-with-smiling-eyes",hexadecimal:"&#x1f638;"},{name:"cat-face-with-tears-of-joy",hexadecimal:"&#x1f639;"},{name:"smiling-cat-face-with-heart-shaped-eyes",hexadecimal:"&#x1f63b;"},{name:"cat-face-with-wry-smile",hexadecimal:"&#x1f63c;"},{name:"kissing-cat-face-with-closed-eyes",hexadecimal:"&#x1f63d;"},{name:"weary-cat-face",hexadecimal:"&#x1f640;"},{name:"crying-cat-face",hexadecimal:"&#x1f63f;"},{name:"pouting-cat-face",hexadecimal:"&#x1f63e;"},{name:"see-no-evil-monkey",hexadecimal:"&#x1f648;"},{name:"hear-no-evil-monkey",hexadecimal:"&#x1f649;"},{name:"speak-no-evil-monkey",hexadecimal:"&#x1f64a;"},{name:"boy",hexadecimal:"&#x1f466;"},{name:"boy-type-1-2",hexadecimal:"&#x1f466;&#x1f3fb;"},{name:"boy-type-3",hexadecimal:"&#x1f466;&#x1f3fc;"},{name:"boy-type-4",hexadecimal:"&#x1f466;&#x1f3fd;"},{name:"boy-type-5",hexadecimal:"&#x1f466;&#x1f3fe;"},{name:"boy-type-6",hexadecimal:"&#x1f466;&#x1f3ff;"},{name:"girl",hexadecimal:"&#x1f467;"},{name:"girl-type-1-2",hexadecimal:"&#x1f467;&#x1f3fb;"},{name:"girl-type-3",hexadecimal:"&#x1f467;&#x1f3fc;"},{name:"girl-type-4",hexadecimal:"&#x1f467;&#x1f3fd;"},{name:"girl-type-5",hexadecimal:"&#x1f467;&#x1f3fe;"},{name:"girl-type-6",hexadecimal:"&#x1f467;&#x1f3ff;"},{name:"man",hexadecimal:"&#x1f468;"},{name:"man-type-1-2",hexadecimal:"&#x1f468;&#x1f3fb;"},{name:"man-type-3",hexadecimal:"&#x1f468;&#x1f3fc;"},{name:"man-type-4",hexadecimal:"&#x1f468;&#x1f3fd;"},{name:"man-type-5",hexadecimal:"&#x1f468;&#x1f3fe;"},{name:"man-type-6",hexadecimal:"&#x1f468;&#x1f3ff;"},{name:"woman",hexadecimal:"&#x1f469;"},{name:"woman-type-1-2",hexadecimal:"&#x1f469;&#x1f3fb;"},{name:"woman-type-3",hexadecimal:"&#x1f469;&#x1f3fc;"},{name:"woman-type-4",hexadecimal:"&#x1f469;&#x1f3fd;"},{name:"woman-type-5",hexadecimal:"&#x1f469;&#x1f3fe;"},{name:"woman-type-6",hexadecimal:"&#x1f469;&#x1f3ff;"},{name:"older-man",hexadecimal:"&#x1f474;"},{name:"old-man-type-1-2",hexadecimal:"&#x1f474;&#x1f3fb;"},{name:"old-man-type-3",hexadecimal:"&#x1f474;&#x1f3fc;"},{name:"old-man-type-4",hexadecimal:"&#x1f474;&#x1f3fd;"},{name:"old-man-type-5",hexadecimal:"&#x1f474;&#x1f3fe;"},{name:"old-man-type-6",hexadecimal:"&#x1f474;&#x1f3ff;"},{name:"older-woman",hexadecimal:"&#x1f475;"},{name:"old-woman-type-1-2",hexadecimal:"&#x1f475;&#x1f3fb;"},{name:"old-woman-type-3",hexadecimal:"&#x1f475;&#x1f3fc;"},{name:"old-woman-type-4",hexadecimal:"&#x1f475;&#x1f3fd;"},{name:"old-woman-type-5",hexadecimal:"&#x1f475;&#x1f3fe;"},{name:"old-woman-type-6",hexadecimal:"&#x1f475;&#x1f3ff;"},{name:"baby",hexadecimal:"&#x1f476;"},{name:"baby-type-1-2",hexadecimal:"&#x1f476;&#x1f3fb;"},{name:"baby-type-3",hexadecimal:"&#x1f476;&#x1f3fc;"},{name:"baby-type-4",hexadecimal:"&#x1f476;&#x1f3fd;"},{name:"baby-type-5",hexadecimal:"&#x1f476;&#x1f3fe;"},{name:"baby-type-6",hexadecimal:"&#x1f476;&#x1f3ff;"},{name:"baby-angel",hexadecimal:"&#x1f47c;"},{name:"baby-angel-type-1-2",hexadecimal:"&#x1f47c;&#x1f3fb;"},{name:"baby-angel-type-3",hexadecimal:"&#x1f47c;&#x1f3fc;"},{name:"baby-angel-type-4",hexadecimal:"&#x1f47c;&#x1f3fd;"},{name:"baby-angel-type-5",hexadecimal:"&#x1f47c;&#x1f3fe;"},{name:"baby-angel-type-6",hexadecimal:"&#x1f47c;&#x1f3ff;"},{name:"police-officer",hexadecimal:"&#x1f46e;"},{name:"police-officer-type-1-2",hexadecimal:"&#x1f46e;&#x1f3fb;"},{name:"police-officer-type-3",hexadecimal:"&#x1f46e;&#x1f3fc;"},{name:"police-officer-type-4",hexadecimal:"&#x1f46e;&#x1f3fd;"},{name:"police-officer-type-5",hexadecimal:"&#x1f46e;&#x1f3fe;"},{name:"police-officer-type-6",hexadecimal:"&#x1f46e;&#x1f3ff;"},{name:"sleuth-or-spy",hexadecimal:"&#x1f575;"},{name:"detective-type-1-2",hexadecimal:"&#x1f575;&#x1f3fb;"},{name:"detective-type-3",hexadecimal:"&#x1f575;&#x1f3fc;"},{name:"detective-type-4",hexadecimal:"&#x1f575;&#x1f3fd;"},{name:"detective-type-5",hexadecimal:"&#x1f575;&#x1f3fe;"},{name:"detective-type-6",hexadecimal:"&#x1f575;&#x1f3ff;"},{name:"guardsman",hexadecimal:"&#x1f482;"},{name:"guardsman-type-1-2",hexadecimal:"&#x1f482;&#x1f3fb;"},{name:"guardsman-type-3",hexadecimal:"&#x1f482;&#x1f3fc;"},{name:"guardsman-type-4",hexadecimal:"&#x1f482;&#x1f3fd;"},{name:"guardsman-type-5",hexadecimal:"&#x1f482;&#x1f3fe;"},{name:"guardsman-type-6",hexadecimal:"&#x1f482;&#x1f3ff;"},{name:"construction-worker",hexadecimal:"&#x1f477;"},{name:"construction-worker-type-1-2",hexadecimal:"&#x1f477;&#x1f3fb;"},{name:"construction-worker-type-3",hexadecimal:"&#x1f477;&#x1f3fc;"},{name:"construction-worker-type-4",hexadecimal:"&#x1f477;&#x1f3fd;"},{name:"construction-worker-type-5",hexadecimal:"&#x1f477;&#x1f3fe;"},{name:"construction-worker-type-6",hexadecimal:"&#x1f477;&#x1f3ff;"},{name:"man-with-turban",hexadecimal:"&#x1f473;"},{name:"person-with-turban-type-1-2",hexadecimal:"&#x1f473;&#x1f3fb;"},{name:"person-with-turban-type-3",hexadecimal:"&#x1f473;&#x1f3fc;"},{name:"person-with-turban-type-4",hexadecimal:"&#x1f473;&#x1f3fd;"},{name:"person-with-turban-type-5",hexadecimal:"&#x1f473;&#x1f3fe;"},{name:"person-with-turban-type-6",hexadecimal:"&#x1f473;&#x1f3ff;"},{name:"person-with-blond-hair",hexadecimal:"&#x1f471;"},{name:"blond-person-type-1-2",hexadecimal:"&#x1f471;&#x1f3fb;"},{name:"blond-person-type-3",hexadecimal:"&#x1f471;&#x1f3fc;"},{name:"blond-person-type-4",hexadecimal:"&#x1f471;&#x1f3fd;"},{name:"blond-person-type-5",hexadecimal:"&#x1f471;&#x1f3fe;"},{name:"blond-person-type-6",hexadecimal:"&#x1f471;&#x1f3ff;"},{name:"father-christmas",hexadecimal:"&#x1f385;"},{name:"santa-claus-type-1-2",hexadecimal:"&#x1f385;&#x1f3fb;"},{name:"santa-claus-type-3",hexadecimal:"&#x1f385;&#x1f3fc;"},{name:"santa-claus-type-4",hexadecimal:"&#x1f385;&#x1f3fd;"},{name:"santa-claus-type-5",hexadecimal:"&#x1f385;&#x1f3fe;"},{name:"santa-claus-type-6",hexadecimal:"&#x1f385;&#x1f3ff;"},{name:"mother-christmas",hexadecimal:"&#x1f936;"},{name:"mother-christmas-type-1-2",hexadecimal:"&#x1f936;&#x1f3fb;"},{name:"mother-christmas-type-3",hexadecimal:"&#x1f936;&#x1f3fc;"},{name:"mother-christmas-type-4",hexadecimal:"&#x1f936;&#x1f3fd;"},{name:"mother-christmas-type-5",hexadecimal:"&#x1f936;&#x1f3fe;"},{name:"mother-christmas-type-6",hexadecimal:"&#x1f936;&#x1f3ff;"},{name:"princess",hexadecimal:"&#x1f478;"},{name:"princess-type-1-2",hexadecimal:"&#x1f478;&#x1f3fb;"},{name:"princess-type-3",hexadecimal:"&#x1f478;&#x1f3fc;"},{name:"princess-type-4",hexadecimal:"&#x1f478;&#x1f3fd;"},{name:"princess-type-5",hexadecimal:"&#x1f478;&#x1f3fe;"},{name:"princess-type-6",hexadecimal:"&#x1f478;&#x1f3ff;"},{name:"prince",hexadecimal:"&#x1f934;"},{name:"prince-type-1-2",hexadecimal:"&#x1f934;&#x1f3fb;"},{name:"prince-type-3",hexadecimal:"&#x1f934;&#x1f3fc;"},{name:"prince-type-4",hexadecimal:"&#x1f934;&#x1f3fd;"},{name:"prince-type-5",hexadecimal:"&#x1f934;&#x1f3fe;"},{name:"prince-type-6",hexadecimal:"&#x1f934;&#x1f3ff;"},{name:"bride-with-veil",hexadecimal:"&#x1f470;"},{name:"bride-with-veil-type-1-2",hexadecimal:"&#x1f470;&#x1f3fb;"},{name:"bride-with-veil-type-3",hexadecimal:"&#x1f470;&#x1f3fc;"},{name:"bride-with-veil-type-4",hexadecimal:"&#x1f470;&#x1f3fd;"},{name:"bride-with-veil-type-5",hexadecimal:"&#x1f470;&#x1f3fe;"},{name:"bride-with-veil-type-6",hexadecimal:"&#x1f470;&#x1f3ff;"},{name:"man-in-tuxedo",hexadecimal:"&#x1f935;"},{name:"man-in-tuxedo-type-1-2",hexadecimal:"&#x1f935;&#x1f3fb;"},{name:"man-in-tuxedo-type-3",hexadecimal:"&#x1f935;&#x1f3fc;"},{name:"man-in-tuxedo-type-4",hexadecimal:"&#x1f935;&#x1f3fd;"},{name:"man-in-tuxedo-type-5",hexadecimal:"&#x1f935;&#x1f3fe;"},{name:"man-in-tuxedo-type-6",hexadecimal:"&#x1f935;&#x1f3ff;"},{name:"pregnant-woman",hexadecimal:"&#x1f930;"},{name:"pregnant-woman-type-1-2",hexadecimal:"&#x1f930;&#x1f3fb;"},{name:"pregnant-woman-type-3",hexadecimal:"&#x1f930;&#x1f3fc;"},{name:"pregnant-woman-type-4",hexadecimal:"&#x1f930;&#x1f3fd;"},{name:"pregnant-woman-type-5",hexadecimal:"&#x1f930;&#x1f3fe;"},{name:"pregnant-woman-type-6",hexadecimal:"&#x1f930;&#x1f3ff;"},{name:"man-with-gua-pi-mao",hexadecimal:"&#x1f472;"},{name:"man-with-chinese-cap-type-1-2",hexadecimal:"&#x1f472;&#x1f3fb;"},{name:"man-with-chinese-cap-type-3",hexadecimal:"&#x1f472;&#x1f3fc;"},{name:"man-with-chinese-cap-type-4",hexadecimal:"&#x1f472;&#x1f3fd;"},{name:"man-with-chinese-cap-type-5",hexadecimal:"&#x1f472;&#x1f3fe;"},{name:"man-with-chinese-cap-type-6",hexadecimal:"&#x1f472;&#x1f3ff;"},{name:"person-frowning",hexadecimal:"&#x1f64d;"},{name:"person-frowning-type-1-2",hexadecimal:"&#x1f64d;&#x1f3fb;"},{name:"person-frowning-type-3",hexadecimal:"&#x1f64d;&#x1f3fc;"},{name:"person-frowning-type-4",hexadecimal:"&#x1f64d;&#x1f3fd;"},{name:"person-frowning-type-5",hexadecimal:"&#x1f64d;&#x1f3fe;"},{name:"person-frowning-type-6",hexadecimal:"&#x1f64d;&#x1f3ff;"},{name:"person-with-pouting-face",hexadecimal:"&#x1f64e;"},{name:"person-pouting-type-1-2",hexadecimal:"&#x1f64e;&#x1f3fb;"},{name:"person-pouting-type-3",hexadecimal:"&#x1f64e;&#x1f3fc;"},{name:"person-pouting-type-4",hexadecimal:"&#x1f64e;&#x1f3fd;"},{name:"person-pouting-type-5",hexadecimal:"&#x1f64e;&#x1f3fe;"},{name:"person-pouting-type-6",hexadecimal:"&#x1f64e;&#x1f3ff;"},{name:"face-with-no-good-gesture",hexadecimal:"&#x1f645;"},{name:"person-gesturing-not-ok-type-1-2",hexadecimal:"&#x1f645;&#x1f3fb;"},{name:"person-gesturing-not-ok-type-3",hexadecimal:"&#x1f645;&#x1f3fc;"},{name:"person-gesturing-not-ok-type-4",hexadecimal:"&#x1f645;&#x1f3fd;"},{name:"person-gesturing-not-ok-type-5",hexadecimal:"&#x1f645;&#x1f3fe;"},{name:"person-gesturing-not-ok-type-6",hexadecimal:"&#x1f645;&#x1f3ff;"},{name:"face-with-ok-gesture",hexadecimal:"&#x1f646;"},{name:"person-gesturing-ok-type-1-2",hexadecimal:"&#x1f646;&#x1f3fb;"},{name:"person-gesturing-ok-type-3",hexadecimal:"&#x1f646;&#x1f3fc;"},{name:"person-gesturing-ok-type-4",hexadecimal:"&#x1f646;&#x1f3fd;"},{name:"person-gesturing-ok-type-5",hexadecimal:"&#x1f646;&#x1f3fe;"},{name:"person-gesturing-ok-type-6",hexadecimal:"&#x1f646;&#x1f3ff;"},{name:"information-desk-person",hexadecimal:"&#x1f481;"},{name:"person-tipping-hand-type-1-2",hexadecimal:"&#x1f481;&#x1f3fb;"},{name:"person-tipping-hand-type-3",hexadecimal:"&#x1f481;&#x1f3fc;"},{name:"person-tipping-hand-type-4",hexadecimal:"&#x1f481;&#x1f3fd;"},{name:"person-tipping-hand-type-5",hexadecimal:"&#x1f481;&#x1f3fe;"},{name:"person-tipping-hand-type-6",hexadecimal:"&#x1f481;&#x1f3ff;"},{name:"happy-person-raising-one-hand",hexadecimal:"&#x1f64b;"},{name:"person-raising-hand-type-1-2",hexadecimal:"&#x1f64b;&#x1f3fb;"},{name:"person-raising-hand-type-3",hexadecimal:"&#x1f64b;&#x1f3fc;"},{name:"person-raising-hand-type-4",hexadecimal:"&#x1f64b;&#x1f3fd;"},{name:"person-raising-hand-type-5",hexadecimal:"&#x1f64b;&#x1f3fe;"},{name:"person-raising-hand-type-6",hexadecimal:"&#x1f64b;&#x1f3ff;"},{name:"person-bowing-deeply",hexadecimal:"&#x1f647;"},{name:"person-bowing-type-1-2",hexadecimal:"&#x1f647;&#x1f3fb;"},{name:"person-bowing-type-3",hexadecimal:"&#x1f647;&#x1f3fc;"},{name:"person-bowing-type-4",hexadecimal:"&#x1f647;&#x1f3fd;"},{name:"person-bowing-type-5",hexadecimal:"&#x1f647;&#x1f3fe;"},{name:"person-bowing-type-6",hexadecimal:"&#x1f647;&#x1f3ff;"},{name:"face-palm",hexadecimal:"&#x1f926;"},{name:"person-facepalming-type-1-2",hexadecimal:"&#x1f926;&#x1f3fb;"},{name:"person-facepalming-type-3",hexadecimal:"&#x1f926;&#x1f3fc;"},{name:"person-facepalming-type-4",hexadecimal:"&#x1f926;&#x1f3fd;"},{name:"person-facepalming-type-5",hexadecimal:"&#x1f926;&#x1f3fe;"},{name:"person-facepalming-type-6",hexadecimal:"&#x1f926;&#x1f3ff;"},{name:"shrug",hexadecimal:"&#x1f937;"},{name:"person-shrugging-type-1-2",hexadecimal:"&#x1f937;&#x1f3fb;"},{name:"person-shrugging-type-3",hexadecimal:"&#x1f937;&#x1f3fc;"},{name:"person-shrugging-type-4",hexadecimal:"&#x1f937;&#x1f3fd;"},{name:"person-shrugging-type-5",hexadecimal:"&#x1f937;&#x1f3fe;"},{name:"person-shrugging-type-6",hexadecimal:"&#x1f937;&#x1f3ff;"},{name:"face-massage",hexadecimal:"&#x1f486;"},{name:"person-getting-massage-type-1-2",hexadecimal:"&#x1f486;&#x1f3fb;"},{name:"person-getting-massage-type-3",hexadecimal:"&#x1f486;&#x1f3fc;"},{name:"person-getting-massage-type-4",hexadecimal:"&#x1f486;&#x1f3fd;"},{name:"person-getting-massage-type-5",hexadecimal:"&#x1f486;&#x1f3fe;"},{name:"person-getting-massage-type-6",hexadecimal:"&#x1f486;&#x1f3ff;"},{name:"haircut",hexadecimal:"&#x1f487;"},{name:"person-getting-haircut-type-1-2",hexadecimal:"&#x1f487;&#x1f3fb;"},{name:"person-getting-haircut-type-3",hexadecimal:"&#x1f487;&#x1f3fc;"},{name:"person-getting-haircut-type-4",hexadecimal:"&#x1f487;&#x1f3fd;"},{name:"person-getting-haircut-type-5",hexadecimal:"&#x1f487;&#x1f3fe;"},{name:"person-getting-haircut-type-6",hexadecimal:"&#x1f487;&#x1f3ff;"},{name:"pedestrian",hexadecimal:"&#x1f6b6;"},{name:"person-walking-type-1-2",hexadecimal:"&#x1f6b6;&#x1f3fb;"},{name:"person-walking-type-3",hexadecimal:"&#x1f6b6;&#x1f3fc;"},{name:"person-walking-type-4",hexadecimal:"&#x1f6b6;&#x1f3fd;"},{name:"person-walking-type-5",hexadecimal:"&#x1f6b6;&#x1f3fe;"},{name:"person-walking-type-6",hexadecimal:"&#x1f6b6;&#x1f3ff;"},{name:"runner",hexadecimal:"&#x1f3c3;"},{name:"person-running-type-1-2",hexadecimal:"&#x1f3c3;&#x1f3fb;"},{name:"person-running-type-3",hexadecimal:"&#x1f3c3;&#x1f3fc;"},{name:"person-running-type-4",hexadecimal:"&#x1f3c3;&#x1f3fd;"},{name:"person-running-type-5",hexadecimal:"&#x1f3c3;&#x1f3fe;"},{name:"person-running-type-6",hexadecimal:"&#x1f3c3;&#x1f3ff;"},{name:"dancer",hexadecimal:"&#x1f483;"},{name:"woman-dancing-type-1-2",hexadecimal:"&#x1f483;&#x1f3fb;"},{name:"woman-dancing-type-3",hexadecimal:"&#x1f483;&#x1f3fc;"},{name:"woman-dancing-type-4",hexadecimal:"&#x1f483;&#x1f3fd;"},{name:"woman-dancing-type-5",hexadecimal:"&#x1f483;&#x1f3fe;"},{name:"woman-dancing-type-6",hexadecimal:"&#x1f483;&#x1f3ff;"},{name:"man-dancing",hexadecimal:"&#x1f57a;"},{name:"man-dancing-type-1-2",hexadecimal:"&#x1f57a;&#x1f3fb;"},{name:"man-dancing-type-3",hexadecimal:"&#x1f57a;&#x1f3fc;"},{name:"man-dancing-type-4",hexadecimal:"&#x1f57a;&#x1f3fd;"},{name:"man-dancing-type-5",hexadecimal:"&#x1f57a;&#x1f3fe;"},{name:"man-dancing-type-6",hexadecimal:"&#x1f57a;&#x1f3ff;"},{name:"woman-with-bunny-ears",hexadecimal:"&#x1f46f;"},{name:"man-in-business-suit-levitating",hexadecimal:"&#x1f574;"},{name:"speaking-head-in-silhouette",hexadecimal:"&#x1f5e3;"},{name:"bust-in-silhouette",hexadecimal:"&#x1f464;"},{name:"busts-in-silhouette",hexadecimal:"&#x1f465;"},{name:"man-and-woman-holding-hands",hexadecimal:"&#x1f46b;"},{name:"two-men-holding-hands",hexadecimal:"&#x1f46c;"},{name:"two-women-holding-hands",hexadecimal:"&#x1f46d;"},{name:"kiss",hexadecimal:"&#x1f48f;"},{name:"kiss-woman-man",hexadecimal:"&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f468;"},{name:"kiss-man-man",hexadecimal:"&#x1f468;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f468;"},{name:"kiss-woman-woman",hexadecimal:"&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f48b;&#x200d;&#x1f469;"},{name:"couple-with-heart",hexadecimal:"&#x1f491;"},{name:"couple-with-heart-woman-man",hexadecimal:"&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f468;"},{name:"couple-with-heart-man-man",hexadecimal:"&#x1f468;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f468;"},{name:"couple-with-heart-woman-woman",hexadecimal:"&#x1f469;&#x200d;&#x2764;&#xfe0f;&#x200d;&#x1f469;"},{name:"family",hexadecimal:"&#x1f46a;"},{name:"family-man-woman-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f466;"},{name:"family-man-woman-girl",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;"},{name:"family-man-woman-girl-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f466;"},{name:"family-man-woman-boy-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f466;&#x200d;&#x1f466;"},{name:"family-man-woman-girl-girl",hexadecimal:"&#x1f468;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f467;"},{name:"family-man-man-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f466;"},{name:"family-man-man-girl",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;"},{name:"family-man-man-girl-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;&#x200d;&#x1f466;"},{name:"family-man-man-boy-boy",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f466;&#x200d;&#x1f466;"},{name:"family-man-man-girl-girl",hexadecimal:"&#x1f468;&#x200d;&#x1f468;&#x200d;&#x1f467;&#x200d;&#x1f467;"},{name:"family-woman-woman-boy",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f466;"},{name:"family-woman-woman-girl",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;"},{name:"family-woman-woman-girl-boy",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f466;"},{name:"family-woman-woman-boy-boy",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f466;&#x200d;&#x1f466;"},{name:"family-woman-woman-girl-girl",hexadecimal:"&#x1f469;&#x200d;&#x1f469;&#x200d;&#x1f467;&#x200d;&#x1f467;"},{name:"emoji-modifier-fitzpatrick-type-1-2",hexadecimal:"&#x1f3fb;"},{name:"emoji-modifier-fitzpatrick-type-3",hexadecimal:"&#x1f3fc;"},{name:"emoji-modifier-fitzpatrick-type-4",hexadecimal:"&#x1f3fd;"},{name:"emoji-modifier-fitzpatrick-type-5",hexadecimal:"&#x1f3fe;"},{name:"emoji-modifier-fitzpatrick-type-6",hexadecimal:"&#x1f3ff;"},{name:"flexed-biceps",hexadecimal:"&#x1f4aa;"},{name:"flexed-biceps-type-1-2",hexadecimal:"&#x1f4aa;&#x1f3fb;"},{name:"flexed-biceps-type-3",hexadecimal:"&#x1f4aa;&#x1f3fc;"},{name:"flexed-biceps-type-4",hexadecimal:"&#x1f4aa;&#x1f3fd;"},{name:"flexed-biceps-type-5",hexadecimal:"&#x1f4aa;&#x1f3fe;"},{name:"flexed-biceps-type-6",hexadecimal:"&#x1f4aa;&#x1f3ff;"},{name:"selfie",hexadecimal:"&#x1f933;"},{name:"selfie-type-1-2",hexadecimal:"&#x1f933;&#x1f3fb;"},{name:"selfie-type-3",hexadecimal:"&#x1f933;&#x1f3fc;"},{name:"selfie-type-4",hexadecimal:"&#x1f933;&#x1f3fd;"},{name:"selfie-type-5",hexadecimal:"&#x1f933;&#x1f3fe;"},{name:"selfie-type-6",hexadecimal:"&#x1f933;&#x1f3ff;"},{name:"white-left-pointing-backhand-index",hexadecimal:"&#x1f448;"},{name:"backhand-index-pointing-left-type-1-2",hexadecimal:"&#x1f448;&#x1f3fb;"},{name:"backhand-index-pointing-left-type-3",hexadecimal:"&#x1f448;&#x1f3fc;"},{name:"backhand-index-pointing-left-type-4",hexadecimal:"&#x1f448;&#x1f3fd;"},{name:"backhand-index-pointing-left-type-5",hexadecimal:"&#x1f448;&#x1f3fe;"},{name:"backhand-index-pointing-left-type-6",hexadecimal:"&#x1f448;&#x1f3ff;"},{name:"white-right-pointing-backhand-index",hexadecimal:"&#x1f449;"},{name:"backhand-index-pointing-right-type-1-2",hexadecimal:"&#x1f449;&#x1f3fb;"},{name:"backhand-index-pointing-right-type-3",hexadecimal:"&#x1f449;&#x1f3fc;"},{name:"backhand-index-pointing-right-type-4",hexadecimal:"&#x1f449;&#x1f3fd;"},{name:"backhand-index-pointing-right-type-5",hexadecimal:"&#x1f449;&#x1f3fe;"},{name:"backhand-index-pointing-right-type-6",hexadecimal:"&#x1f449;&#x1f3ff;"},{name:"white-up-pointing-index",hexadecimal:"&#x261d;"},{name:"index-pointing-up-type-1-2",hexadecimal:"&#x261d;&#x1f3fb;"},{name:"index-pointing-up-type-3",hexadecimal:"&#x261d;&#x1f3fc;"},{name:"index-pointing-up-type-4",hexadecimal:"&#x261d;&#x1f3fd;"},{name:"index-pointing-up-type-5",hexadecimal:"&#x261d;&#x1f3fe;"},{name:"index-pointing-up-type-6",hexadecimal:"&#x261d;&#x1f3ff;"},{name:"white-up-pointing-backhand-index",hexadecimal:"&#x1f446;"},{name:"backhand-index-pointing-up-type-1-2",hexadecimal:"&#x1f446;&#x1f3fb;"},{name:"backhand-index-pointing-up-type-3",hexadecimal:"&#x1f446;&#x1f3fc;"},{name:"backhand-index-pointing-up-type-4",hexadecimal:"&#x1f446;&#x1f3fd;"},{name:"backhand-index-pointing-up-type-5",hexadecimal:"&#x1f446;&#x1f3fe;"},{name:"backhand-index-pointing-up-type-6",hexadecimal:"&#x1f446;&#x1f3ff;"},{name:"reversed-hand-with-middle-finger-extended",hexadecimal:"&#x1f595;"},{name:"middle-finger-type-1-2",hexadecimal:"&#x1f595;&#x1f3fb;"},{name:"middle-finger-type-3",hexadecimal:"&#x1f595;&#x1f3fc;"},{name:"middle-finger-type-4",hexadecimal:"&#x1f595;&#x1f3fd;"},{name:"middle-finger-type-5",hexadecimal:"&#x1f595;&#x1f3fe;"},{name:"middle-finger-type-6",hexadecimal:"&#x1f595;&#x1f3ff;"},{name:"white-down-pointing-backhand-index",hexadecimal:"&#x1f447;"},{name:"backhand-index-pointing-down-type-1-2",hexadecimal:"&#x1f447;&#x1f3fb;"},{name:"backhand-index-pointing-down-type-3",hexadecimal:"&#x1f447;&#x1f3fc;"},{name:"backhand-index-pointing-down-type-4",hexadecimal:"&#x1f447;&#x1f3fd;"},{name:"backhand-index-pointing-down-type-5",hexadecimal:"&#x1f447;&#x1f3fe;"},{name:"backhand-index-pointing-down-type-6",hexadecimal:"&#x1f447;&#x1f3ff;"},{name:"victory-hand",hexadecimal:"&#x270c;"},{name:"victory-hand-type-1-2",hexadecimal:"&#x270c;&#x1f3fb;"},{name:"victory-hand-type-3",hexadecimal:"&#x270c;&#x1f3fc;"},{name:"victory-hand-type-4",hexadecimal:"&#x270c;&#x1f3fd;"},{name:"victory-hand-type-5",hexadecimal:"&#x270c;&#x1f3fe;"},{name:"victory-hand-type-6",hexadecimal:"&#x270c;&#x1f3ff;"},{name:"hand-with-index-and-middle-fingers-crossed",hexadecimal:"&#x1f91e;"},{name:"crossed-fingers-type-1-2",hexadecimal:"&#x1f91e;&#x1f3fb;"},{name:"crossed-fingers-type-3",hexadecimal:"&#x1f91e;&#x1f3fc;"},{name:"crossed-fingers-type-4",hexadecimal:"&#x1f91e;&#x1f3fd;"},{name:"crossed-fingers-type-5",hexadecimal:"&#x1f91e;&#x1f3fe;"},{name:"crossed-fingers-type-6",hexadecimal:"&#x1f91e;&#x1f3ff;"},{name:"raised-hand-with-part-between-middle-and-ring-fingers",hexadecimal:"&#x1f596;"},{name:"vulcan-salute-type-1-2",hexadecimal:"&#x1f596;&#x1f3fb;"},{name:"vulcan-salute-type-3",hexadecimal:"&#x1f596;&#x1f3fc;"},{name:"vulcan-salute-type-4",hexadecimal:"&#x1f596;&#x1f3fd;"},{name:"vulcan-salute-type-5",hexadecimal:"&#x1f596;&#x1f3fe;"},{name:"vulcan-salute-type-6",hexadecimal:"&#x1f596;&#x1f3ff;"},{name:"sign-of-the-horns",hexadecimal:"&#x1f918;"},{name:"sign-of-the-horns-type-1-2",hexadecimal:"&#x1f918;&#x1f3fb;"},{name:"sign-of-the-horns-type-3",hexadecimal:"&#x1f918;&#x1f3fc;"},{name:"sign-of-the-horns-type-4",hexadecimal:"&#x1f918;&#x1f3fd;"},{name:"sign-of-the-horns-type-5",hexadecimal:"&#x1f918;&#x1f3fe;"},{name:"sign-of-the-horns-type-6",hexadecimal:"&#x1f918;&#x1f3ff;"},{name:"call-me-hand",hexadecimal:"&#x1f919;"},{name:"call-me-hand-type-1-2",hexadecimal:"&#x1f919;&#x1f3fb;"},{name:"call-me-hand-type-3",hexadecimal:"&#x1f919;&#x1f3fc;"},{name:"call-me-hand-type-4",hexadecimal:"&#x1f919;&#x1f3fd;"},{name:"call-me-hand-type-5",hexadecimal:"&#x1f919;&#x1f3fe;"},{name:"call-me-hand-type-6",hexadecimal:"&#x1f919;&#x1f3ff;"},{name:"raised-hand-with-fingers-splayed",hexadecimal:"&#x1f590;"},{name:"raised-hand-with-fingers-splayed-type-1-2",hexadecimal:"&#x1f590;&#x1f3fb;"},{name:"raised-hand-with-fingers-splayed-type-3",hexadecimal:"&#x1f590;&#x1f3fc;"},{name:"raised-hand-with-fingers-splayed-type-4",hexadecimal:"&#x1f590;&#x1f3fd;"},{name:"raised-hand-with-fingers-splayed-type-5",hexadecimal:"&#x1f590;&#x1f3fe;"},{name:"raised-hand-with-fingers-splayed-type-6",hexadecimal:"&#x1f590;&#x1f3ff;"},{name:"raised-hand",hexadecimal:"&#x270b;"},{name:"raised-hand-type-1-2",hexadecimal:"&#x270b;&#x1f3fb;"},{name:"raised-hand-type-3",hexadecimal:"&#x270b;&#x1f3fc;"},{name:"raised-hand-type-4",hexadecimal:"&#x270b;&#x1f3fd;"},{name:"raised-hand-type-5",hexadecimal:"&#x270b;&#x1f3fe;"},{name:"raised-hand-type-6",hexadecimal:"&#x270b;&#x1f3ff;"},{name:"ok-hand-sign",hexadecimal:"&#x1f44c;"},{name:"ok-hand-type-1-2",hexadecimal:"&#x1f44c;&#x1f3fb;"},{name:"ok-hand-type-3",hexadecimal:"&#x1f44c;&#x1f3fc;"},{name:"ok-hand-type-4",hexadecimal:"&#x1f44c;&#x1f3fd;"},{name:"ok-hand-type-5",hexadecimal:"&#x1f44c;&#x1f3fe;"},{name:"ok-hand-type-6",hexadecimal:"&#x1f44c;&#x1f3ff;"},{name:"thumbs-up-sign",hexadecimal:"&#x1f44d;"},{name:"thumbs-up-type-1-2",hexadecimal:"&#x1f44d;&#x1f3fb;"},{name:"thumbs-up-type-3",hexadecimal:"&#x1f44d;&#x1f3fc;"},{name:"thumbs-up-type-4",hexadecimal:"&#x1f44d;&#x1f3fd;"},{name:"thumbs-up-type-5",hexadecimal:"&#x1f44d;&#x1f3fe;"},{name:"thumbs-up-type-6",hexadecimal:"&#x1f44d;&#x1f3ff;"},{name:"thumbs-down-sign",hexadecimal:"&#x1f44e;"},{name:"thumbs-down-type-1-2",hexadecimal:"&#x1f44e;&#x1f3fb;"},{name:"thumbs-down-type-3",hexadecimal:"&#x1f44e;&#x1f3fc;"},{name:"thumbs-down-type-4",hexadecimal:"&#x1f44e;&#x1f3fd;"},{name:"thumbs-down-type-5",hexadecimal:"&#x1f44e;&#x1f3fe;"},{name:"thumbs-down-type-6",hexadecimal:"&#x1f44e;&#x1f3ff;"},{name:"raised-fist",hexadecimal:"&#x270a;"},{name:"raised-fist-type-1-2",hexadecimal:"&#x270a;&#x1f3fb;"},{name:"raised-fist-type-3",hexadecimal:"&#x270a;&#x1f3fc;"},{name:"raised-fist-type-4",hexadecimal:"&#x270a;&#x1f3fd;"},{name:"raised-fist-type-5",hexadecimal:"&#x270a;&#x1f3fe;"},{name:"raised-fist-type-6",hexadecimal:"&#x270a;&#x1f3ff;"},{name:"fisted-hand-sign",hexadecimal:"&#x1f44a;"},{name:"oncoming-fist-type-1-2",hexadecimal:"&#x1f44a;&#x1f3fb;"},{name:"oncoming-fist-type-3",hexadecimal:"&#x1f44a;&#x1f3fc;"},{name:"oncoming-fist-type-4",hexadecimal:"&#x1f44a;&#x1f3fd;"},{name:"oncoming-fist-type-5",hexadecimal:"&#x1f44a;&#x1f3fe;"},{name:"oncoming-fist-type-6",hexadecimal:"&#x1f44a;&#x1f3ff;"},{name:"left-facing-fist",hexadecimal:"&#x1f91b;"},{name:"left-facing-fist-type-1-2",hexadecimal:"&#x1f91b;&#x1f3fb;"},{name:"left-facing-fist-type-3",hexadecimal:"&#x1f91b;&#x1f3fc;"},{name:"left-facing-fist-type-4",hexadecimal:"&#x1f91b;&#x1f3fd;"},{name:"left-facing-fist-type-5",hexadecimal:"&#x1f91b;&#x1f3fe;"},{name:"left-facing-fist-type-6",hexadecimal:"&#x1f91b;&#x1f3ff;"},{name:"right-facing-fist",hexadecimal:"&#x1f91c;"},{name:"right-facing-fist-type-1-2",hexadecimal:"&#x1f91c;&#x1f3fb;"},{name:"right-facing-fist-type-3",hexadecimal:"&#x1f91c;&#x1f3fc;"},{name:"right-facing-fist-type-4",hexadecimal:"&#x1f91c;&#x1f3fd;"},{name:"right-facing-fist-type-5",hexadecimal:"&#x1f91c;&#x1f3fe;"},{name:"right-facing-fist-type-6",hexadecimal:"&#x1f91c;&#x1f3ff;"},{name:"raised-back-of-hand",hexadecimal:"&#x1f91a;"},{name:"raised-back-of-hand-type-1-2",hexadecimal:"&#x1f91a;&#x1f3fb;"},{name:"raised-back-of-hand-type-3",hexadecimal:"&#x1f91a;&#x1f3fc;"},{name:"raised-back-of-hand-type-4",hexadecimal:"&#x1f91a;&#x1f3fd;"},{name:"raised-back-of-hand-type-5",hexadecimal:"&#x1f91a;&#x1f3fe;"},{name:"raised-back-of-hand-type-6",hexadecimal:"&#x1f91a;&#x1f3ff;"},{name:"waving-hand-sign",hexadecimal:"&#x1f44b;"},{name:"waving-hand-type-1-2",hexadecimal:"&#x1f44b;&#x1f3fb;"},{name:"waving-hand-type-3",hexadecimal:"&#x1f44b;&#x1f3fc;"},{name:"waving-hand-type-4",hexadecimal:"&#x1f44b;&#x1f3fd;"},{name:"waving-hand-type-5",hexadecimal:"&#x1f44b;&#x1f3fe;"},{name:"waving-hand-type-6",hexadecimal:"&#x1f44b;&#x1f3ff;"},{name:"clapping-hands-sign",hexadecimal:"&#x1f44f;"},{name:"clapping-hands-type-1-2",hexadecimal:"&#x1f44f;&#x1f3fb;"},{name:"clapping-hands-type-3",hexadecimal:"&#x1f44f;&#x1f3fc;"},{name:"clapping-hands-type-4",hexadecimal:"&#x1f44f;&#x1f3fd;"},{name:"clapping-hands-type-5",hexadecimal:"&#x1f44f;&#x1f3fe;"},{name:"clapping-hands-type-6",hexadecimal:"&#x1f44f;&#x1f3ff;"},{name:"writing-hand",hexadecimal:"&#x270d;"},{name:"writing-hand-type-1-2",hexadecimal:"&#x270d;&#x1f3fb;"},{name:"writing-hand-type-3",hexadecimal:"&#x270d;&#x1f3fc;"},{name:"writing-hand-type-4",hexadecimal:"&#x270d;&#x1f3fd;"},{name:"writing-hand-type-5",hexadecimal:"&#x270d;&#x1f3fe;"},{name:"writing-hand-type-6",hexadecimal:"&#x270d;&#x1f3ff;"},{name:"open-hands-sign",hexadecimal:"&#x1f450;"},{name:"open-hands-type-1-2",hexadecimal:"&#x1f450;&#x1f3fb;"},{name:"open-hands-type-3",hexadecimal:"&#x1f450;&#x1f3fc;"},{name:"open-hands-type-4",hexadecimal:"&#x1f450;&#x1f3fd;"},{name:"open-hands-type-5",hexadecimal:"&#x1f450;&#x1f3fe;"},{name:"open-hands-type-6",hexadecimal:"&#x1f450;&#x1f3ff;"},{name:"person-raising-both-hands-in-celebration",hexadecimal:"&#x1f64c;"},{name:"person-raising-hands-type-1-2",hexadecimal:"&#x1f64c;&#x1f3fb;"},{name:"person-raising-hands-type-3",hexadecimal:"&#x1f64c;&#x1f3fc;"},{name:"person-raising-hands-type-4",hexadecimal:"&#x1f64c;&#x1f3fd;"},{name:"person-raising-hands-type-5",hexadecimal:"&#x1f64c;&#x1f3fe;"},{name:"person-raising-hands-type-6",hexadecimal:"&#x1f64c;&#x1f3ff;"},{name:"person-with-folded-hands",hexadecimal:"&#x1f64f;"},{name:"folded-hands-type-1-2",hexadecimal:"&#x1f64f;&#x1f3fb;"},{name:"folded-hands-type-3",hexadecimal:"&#x1f64f;&#x1f3fc;"},{name:"folded-hands-type-4",hexadecimal:"&#x1f64f;&#x1f3fd;"},{name:"folded-hands-type-5",hexadecimal:"&#x1f64f;&#x1f3fe;"},{name:"folded-hands-type-6",hexadecimal:"&#x1f64f;&#x1f3ff;"},{name:"handshake",hexadecimal:"&#x1f91d;"},{name:"handshake-type-1-2",hexadecimal:"&#x1f91d;&#x1f3fb;"},{name:"handshake-type-3",hexadecimal:"&#x1f91d;&#x1f3fc;"},{name:"handshake-type-4",hexadecimal:"&#x1f91d;&#x1f3fd;"},{name:"handshake-type-5",hexadecimal:"&#x1f91d;&#x1f3fe;"},{name:"handshake-type-6",hexadecimal:"&#x1f91d;&#x1f3ff;"},{name:"nail-polish",hexadecimal:"&#x1f485;"},{name:"nail-polish-type-1-2",hexadecimal:"&#x1f485;&#x1f3fb;"},{name:"nail-polish-type-3",hexadecimal:"&#x1f485;&#x1f3fc;"},{name:"nail-polish-type-4",hexadecimal:"&#x1f485;&#x1f3fd;"},{name:"nail-polish-type-5",hexadecimal:"&#x1f485;&#x1f3fe;"},{name:"nail-polish-type-6",hexadecimal:"&#x1f485;&#x1f3ff;"},{name:"ear",hexadecimal:"&#x1f442;"},{name:"ear-type-1-2",hexadecimal:"&#x1f442;&#x1f3fb;"},{name:"ear-type-3",hexadecimal:"&#x1f442;&#x1f3fc;"},{name:"ear-type-4",hexadecimal:"&#x1f442;&#x1f3fd;"},{name:"ear-type-5",hexadecimal:"&#x1f442;&#x1f3fe;"},{name:"ear-type-6",hexadecimal:"&#x1f442;&#x1f3ff;"},{name:"nose",hexadecimal:"&#x1f443;"},{name:"nose-type-1-2",hexadecimal:"&#x1f443;&#x1f3fb;"},{name:"nose-type-3",hexadecimal:"&#x1f443;&#x1f3fc;"},{name:"nose-type-4",hexadecimal:"&#x1f443;&#x1f3fd;"},{name:"nose-type-5",hexadecimal:"&#x1f443;&#x1f3fe;"},{name:"nose-type-6",hexadecimal:"&#x1f443;&#x1f3ff;"},{name:"footprints",hexadecimal:"&#x1f463;"},{name:"eyes",hexadecimal:"&#x1f440;"},{name:"eye",hexadecimal:"&#x1f441;"},{name:"eye-left-speech-bubble",hexadecimal:"&#x1f441;&#x200d;&#x1f5e8;"},{name:"tongue",hexadecimal:"&#x1f445;"},{name:"mouth",hexadecimal:"&#x1f444;"},{name:"kiss-mark",hexadecimal:"&#x1f48b;"},{name:"heart-with-arrow",hexadecimal:"&#x1f498;"},{name:"heavy-black-heart",hexadecimal:"&#x2764;"},{name:"beating-heart",hexadecimal:"&#x1f493;"},{name:"broken-heart",hexadecimal:"&#x1f494;"},{name:"two-hearts",hexadecimal:"&#x1f495;"},{name:"sparkling-heart",hexadecimal:"&#x1f496;"},{name:"growing-heart",hexadecimal:"&#x1f497;"},{name:"blue-heart",hexadecimal:"&#x1f499;"},{name:"green-heart",hexadecimal:"&#x1f49a;"},{name:"yellow-heart",hexadecimal:"&#x1f49b;"},{name:"purple-heart",hexadecimal:"&#x1f49c;"},{name:"black-heart",hexadecimal:"&#x1f5a4;"},{name:"heart-with-ribbon",hexadecimal:"&#x1f49d;"},{name:"revolving-hearts",hexadecimal:"&#x1f49e;"},{name:"heart-decoration",hexadecimal:"&#x1f49f;"},{name:"heavy-heart-exclamation-mark-ornament",hexadecimal:"&#x2763;"},{name:"love-letter",hexadecimal:"&#x1f48c;"},{name:"sleeping-symbol",hexadecimal:"&#x1f4a4;"},{name:"anger-symbol",hexadecimal:"&#x1f4a2;"},{name:"bomb",hexadecimal:"&#x1f4a3;"},{name:"collision-symbol",hexadecimal:"&#x1f4a5;"},{name:"splashing-sweat-symbol",hexadecimal:"&#x1f4a6;"},{name:"dash-symbol",hexadecimal:"&#x1f4a8;"},{name:"dizzy-symbol",hexadecimal:"&#x1f4ab;"},{name:"speech-balloon",hexadecimal:"&#x1f4ac;"},{name:"left-speech-bubble",hexadecimal:"&#x1f5e8;"},{name:"right-anger-bubble",hexadecimal:"&#x1f5ef;"},{name:"thought-balloon",hexadecimal:"&#x1f4ad;"},{name:"hole",hexadecimal:"&#x1f573;"},{name:"eyeglasses",hexadecimal:"&#x1f453;"},{name:"dark-sunglasses",hexadecimal:"&#x1f576;"},{name:"necktie",hexadecimal:"&#x1f454;"},{name:"t-shirt",hexadecimal:"&#x1f455;"},{name:"jeans",hexadecimal:"&#x1f456;"},{name:"dress",hexadecimal:"&#x1f457;"},{name:"kimono",hexadecimal:"&#x1f458;"},{name:"bikini",hexadecimal:"&#x1f459;"},{name:"womans-clothes",hexadecimal:"&#x1f45a;"},{name:"purse",hexadecimal:"&#x1f45b;"},{name:"handbag",hexadecimal:"&#x1f45c;"},{name:"pouch",hexadecimal:"&#x1f45d;"},{name:"shopping-bags",hexadecimal:"&#x1f6cd;"},{name:"school-satchel",hexadecimal:"&#x1f392;"},{name:"mans-shoe",hexadecimal:"&#x1f45e;"},{name:"athletic-shoe",hexadecimal:"&#x1f45f;"},{name:"high-heeled-shoe",hexadecimal:"&#x1f460;"},{name:"womans-sandal",hexadecimal:"&#x1f461;"},{name:"womans-boots",hexadecimal:"&#x1f462;"},{name:"crown",hexadecimal:"&#x1f451;"},{name:"womans-hat",hexadecimal:"&#x1f452;"},{name:"top-hat",hexadecimal:"&#x1f3a9;"},{name:"graduation-cap",hexadecimal:"&#x1f393;"},{name:"helmet-with-white-cross",hexadecimal:"&#x26d1;"},{name:"prayer-beads",hexadecimal:"&#x1f4ff;"},{name:"lipstick",hexadecimal:"&#x1f484;"},{name:"ring",hexadecimal:"&#x1f48d;"},{name:"gem-stone",hexadecimal:"&#x1f48e;"},{name:"monkey-face",hexadecimal:"&#x1f435;"},{name:"monkey",hexadecimal:"&#x1f412;"},{name:"gorilla",hexadecimal:"&#x1f98d;"},{name:"dog-face",hexadecimal:"&#x1f436;"},{name:"dog",hexadecimal:"&#x1f415;"},{name:"poodle",hexadecimal:"&#x1f429;"},{name:"wolf-face",hexadecimal:"&#x1f43a;"},{name:"fox-face",hexadecimal:"&#x1f98a;"},{name:"cat-face",hexadecimal:"&#x1f431;"},{name:"cat",hexadecimal:"&#x1f408;"},{name:"lion-face",hexadecimal:"&#x1f981;"},{name:"tiger-face",hexadecimal:"&#x1f42f;"},{name:"tiger",hexadecimal:"&#x1f405;"},{name:"leopard",hexadecimal:"&#x1f406;"},{name:"horse-face",hexadecimal:"&#x1f434;"},{name:"horse",hexadecimal:"&#x1f40e;"},{name:"deer",hexadecimal:"&#x1f98c;"},{name:"unicorn-face",hexadecimal:"&#x1f984;"},{name:"cow-face",hexadecimal:"&#x1f42e;"},{name:"ox",hexadecimal:"&#x1f402;"},{name:"water-buffalo",hexadecimal:"&#x1f403;"},{name:"cow",hexadecimal:"&#x1f404;"},{name:"pig-face",hexadecimal:"&#x1f437;"},{name:"pig",hexadecimal:"&#x1f416;"},{name:"boar",hexadecimal:"&#x1f417;"},{name:"pig-nose",hexadecimal:"&#x1f43d;"},{name:"ram",hexadecimal:"&#x1f40f;"},{name:"sheep",hexadecimal:"&#x1f411;"},{name:"goat",hexadecimal:"&#x1f410;"},{name:"dromedary-camel",hexadecimal:"&#x1f42a;"},{name:"bactrian-camel",hexadecimal:"&#x1f42b;"},{name:"elephant",hexadecimal:"&#x1f418;"},{name:"rhinoceros",hexadecimal:"&#x1f98f;"},{name:"mouse-face",hexadecimal:"&#x1f42d;"},{name:"mouse",hexadecimal:"&#x1f401;"},{name:"rat",hexadecimal:"&#x1f400;"},{name:"hamster-face",hexadecimal:"&#x1f439;"},{name:"rabbit-face",hexadecimal:"&#x1f430;"},{name:"rabbit",hexadecimal:"&#x1f407;"},{name:"chipmunk",hexadecimal:"&#x1f43f;"},{name:"bat",hexadecimal:"&#x1f987;"},{name:"bear-face",hexadecimal:"&#x1f43b;"},{name:"koala",hexadecimal:"&#x1f428;"},{name:"panda-face",hexadecimal:"&#x1f43c;"},{name:"paw-prints",hexadecimal:"&#x1f43e;"},{name:"turkey",hexadecimal:"&#x1f983;"},{name:"chicken",hexadecimal:"&#x1f414;"},{name:"rooster",hexadecimal:"&#x1f413;"},{name:"hatching-chick",hexadecimal:"&#x1f423;"},{name:"baby-chick",hexadecimal:"&#x1f424;"},{name:"front-facing-baby-chick",hexadecimal:"&#x1f425;"},{name:"bird",hexadecimal:"&#x1f426;"},{name:"penguin",hexadecimal:"&#x1f427;"},{name:"dove-of-peace",hexadecimal:"&#x1f54a;"},{name:"eagle",hexadecimal:"&#x1f985;"},{name:"duck",hexadecimal:"&#x1f986;"},{name:"owl",hexadecimal:"&#x1f989;"},{name:"frog-face",hexadecimal:"&#x1f438;"},{name:"crocodile",hexadecimal:"&#x1f40a;"},{name:"turtle",hexadecimal:"&#x1f422;"},{name:"lizard",hexadecimal:"&#x1f98e;"},{name:"snake",hexadecimal:"&#x1f40d;"},{name:"dragon-face",hexadecimal:"&#x1f432;"},{name:"dragon",hexadecimal:"&#x1f409;"},{name:"spouting-whale",hexadecimal:"&#x1f433;"},{name:"whale",hexadecimal:"&#x1f40b;"},{name:"dolphin",hexadecimal:"&#x1f42c;"},{name:"fish",hexadecimal:"&#x1f41f;"},{name:"tropical-fish",hexadecimal:"&#x1f420;"},{name:"blowfish",hexadecimal:"&#x1f421;"},{name:"shark",hexadecimal:"&#x1f988;"},{name:"octopus",hexadecimal:"&#x1f419;"},{name:"spiral-shell",hexadecimal:"&#x1f41a;"},{name:"crab",hexadecimal:"&#x1f980;"},{name:"shrimp",hexadecimal:"&#x1f990;"},{name:"squid",hexadecimal:"&#x1f991;"},{name:"butterfly",hexadecimal:"&#x1f98b;"},{name:"snail",hexadecimal:"&#x1f40c;"},{name:"bug",hexadecimal:"&#x1f41b;"},{name:"ant",hexadecimal:"&#x1f41c;"},{name:"honeybee",hexadecimal:"&#x1f41d;"},{name:"lady-beetle",hexadecimal:"&#x1f41e;"},{name:"spider",hexadecimal:"&#x1f577;"},{name:"spider-web",hexadecimal:"&#x1f578;"},{name:"scorpion",hexadecimal:"&#x1f982;"},{name:"bouquet",hexadecimal:"&#x1f490;"},{name:"cherry-blossom",hexadecimal:"&#x1f338;"},{name:"white-flower",hexadecimal:"&#x1f4ae;"},{name:"rosette",hexadecimal:"&#x1f3f5;"},{name:"rose",hexadecimal:"&#x1f339;"},{name:"wilted-flower",hexadecimal:"&#x1f940;"},{name:"hibiscus",hexadecimal:"&#x1f33a;"},{name:"sunflower",hexadecimal:"&#x1f33b;"},{name:"blossom",hexadecimal:"&#x1f33c;"},{name:"tulip",hexadecimal:"&#x1f337;"},{name:"seedling",hexadecimal:"&#x1f331;"},{name:"evergreen-tree",hexadecimal:"&#x1f332;"},{name:"deciduous-tree",hexadecimal:"&#x1f333;"},{name:"palm-tree",hexadecimal:"&#x1f334;"},{name:"cactus",hexadecimal:"&#x1f335;"},{name:"ear-of-rice",hexadecimal:"&#x1f33e;"},{name:"herb",hexadecimal:"&#x1f33f;"},{name:"shamrock",hexadecimal:"&#x2618;"},{name:"four-leaf-clover",hexadecimal:"&#x1f340;"},{name:"maple-leaf",hexadecimal:"&#x1f341;"},{name:"fallen-leaf",hexadecimal:"&#x1f342;"},{name:"leaf-fluttering-in-wind",hexadecimal:"&#x1f343;"},{name:"grapes",hexadecimal:"&#x1f347;"},{name:"melon",hexadecimal:"&#x1f348;"},{name:"watermelon",hexadecimal:"&#x1f349;"},{name:"tangerine",hexadecimal:"&#x1f34a;"},{name:"lemon",hexadecimal:"&#x1f34b;"},{name:"banana",hexadecimal:"&#x1f34c;"},{name:"pineapple",hexadecimal:"&#x1f34d;"},{name:"red-apple",hexadecimal:"&#x1f34e;"},{name:"green-apple",hexadecimal:"&#x1f34f;"},{name:"pear",hexadecimal:"&#x1f350;"},{name:"peach",hexadecimal:"&#x1f351;"},{name:"cherries",hexadecimal:"&#x1f352;"},{name:"strawberry",hexadecimal:"&#x1f353;"},{name:"kiwifruit",hexadecimal:"&#x1f95d;"},{name:"tomato",hexadecimal:"&#x1f345;"},{name:"avocado",hexadecimal:"&#x1f951;"},{name:"aubergine",hexadecimal:"&#x1f346;"},{name:"potato",hexadecimal:"&#x1f954;"},{name:"carrot",hexadecimal:"&#x1f955;"},{name:"ear-of-maize",hexadecimal:"&#x1f33d;"},{name:"hot-pepper",hexadecimal:"&#x1f336;"},{name:"cucumber",hexadecimal:"&#x1f952;"},{name:"mushroom",hexadecimal:"&#x1f344;"},{name:"peanuts",hexadecimal:"&#x1f95c;"},{name:"chestnut",hexadecimal:"&#x1f330;"},{name:"bread",hexadecimal:"&#x1f35e;"},{name:"croissant",hexadecimal:"&#x1f950;"},{name:"baguette-bread",hexadecimal:"&#x1f956;"},{name:"pancakes",hexadecimal:"&#x1f95e;"},{name:"cheese-wedge",hexadecimal:"&#x1f9c0;"},{name:"meat-on-bone",hexadecimal:"&#x1f356;"},{name:"poultry-leg",hexadecimal:"&#x1f357;"},{name:"bacon",hexadecimal:"&#x1f953;"},{name:"hamburger",hexadecimal:"&#x1f354;"},{name:"french-fries",hexadecimal:"&#x1f35f;"},{name:"slice-of-pizza",hexadecimal:"&#x1f355;"},{name:"hot-dog",hexadecimal:"&#x1f32d;"},{name:"taco",hexadecimal:"&#x1f32e;"},{name:"burrito",hexadecimal:"&#x1f32f;"},{name:"stuffed-flatbread",hexadecimal:"&#x1f959;"},{name:"egg",hexadecimal:"&#x1f95a;"},{name:"cooking",hexadecimal:"&#x1f373;"},{name:"shallow-pan-of-food",hexadecimal:"&#x1f958;"},{name:"pot-of-food",hexadecimal:"&#x1f372;"},{name:"green-salad",hexadecimal:"&#x1f957;"},{name:"popcorn",hexadecimal:"&#x1f37f;"},{name:"bento-box",hexadecimal:"&#x1f371;"},{name:"rice-cracker",hexadecimal:"&#x1f358;"},{name:"rice-ball",hexadecimal:"&#x1f359;"},{name:"cooked-rice",hexadecimal:"&#x1f35a;"},{name:"curry-and-rice",hexadecimal:"&#x1f35b;"},{name:"steaming-bowl",hexadecimal:"&#x1f35c;"},{name:"spaghetti",hexadecimal:"&#x1f35d;"},{name:"roasted-sweet-potato",hexadecimal:"&#x1f360;"},{name:"oden",hexadecimal:"&#x1f362;"},{name:"sushi",hexadecimal:"&#x1f363;"},{name:"fried-shrimp",hexadecimal:"&#x1f364;"},{name:"fish-cake-with-swirl-design",hexadecimal:"&#x1f365;"},{name:"dango",hexadecimal:"&#x1f361;"},{name:"soft-ice-cream",hexadecimal:"&#x1f366;"},{name:"shaved-ice",hexadecimal:"&#x1f367;"},{name:"ice-cream",hexadecimal:"&#x1f368;"},{name:"doughnut",hexadecimal:"&#x1f369;"},{name:"cookie",hexadecimal:"&#x1f36a;"},{name:"birthday-cake",hexadecimal:"&#x1f382;"},{name:"shortcake",hexadecimal:"&#x1f370;"},{name:"chocolate-bar",hexadecimal:"&#x1f36b;"},{name:"candy",hexadecimal:"&#x1f36c;"},{name:"lollipop",hexadecimal:"&#x1f36d;"},{name:"custard",hexadecimal:"&#x1f36e;"},{name:"honey-pot",hexadecimal:"&#x1f36f;"},{name:"baby-bottle",hexadecimal:"&#x1f37c;"},{name:"glass-of-milk",hexadecimal:"&#x1f95b;"},{name:"hot-beverage",hexadecimal:"&#x2615;"},{name:"teacup-without-handle",hexadecimal:"&#x1f375;"},{name:"sake-bottle-and-cup",hexadecimal:"&#x1f376;"},{name:"bottle-with-popping-cork",hexadecimal:"&#x1f37e;"},{name:"wine-glass",hexadecimal:"&#x1f377;"},{name:"cocktail-glass",hexadecimal:"&#x1f378;"},{name:"tropical-drink",hexadecimal:"&#x1f379;"},{name:"beer-mug",hexadecimal:"&#x1f37a;"},{name:"clinking-beer-mugs",hexadecimal:"&#x1f37b;"},{name:"clinking-glasses",hexadecimal:"&#x1f942;"},{name:"tumbler-glass",hexadecimal:"&#x1f943;"},{name:"fork-and-knife-with-plate",hexadecimal:"&#x1f37d;"},{name:"fork-and-knife",hexadecimal:"&#x1f374;"},{name:"spoon",hexadecimal:"&#x1f944;"},{name:"hocho",hexadecimal:"&#x1f52a;"},{name:"amphora",hexadecimal:"&#x1f3fa;"},{name:"earth-globe-europe-africa",hexadecimal:"&#x1f30d;"},{name:"earth-globe-americas",hexadecimal:"&#x1f30e;"},{name:"earth-globe-asia-australia",hexadecimal:"&#x1f30f;"},{name:"globe-with-meridians",hexadecimal:"&#x1f310;"},{name:"world-map",hexadecimal:"&#x1f5fa;"},{name:"silhouette-of-japan",hexadecimal:"&#x1f5fe;"},{name:"snow-capped-mountain",hexadecimal:"&#x1f3d4;"},{name:"mountain",hexadecimal:"&#x26f0;"},{name:"volcano",hexadecimal:"&#x1f30b;"},{name:"mount-fuji",hexadecimal:"&#x1f5fb;"},{name:"camping",hexadecimal:"&#x1f3d5;"},{name:"beach-with-umbrella",hexadecimal:"&#x1f3d6;"},{name:"desert",hexadecimal:"&#x1f3dc;"},{name:"desert-island",hexadecimal:"&#x1f3dd;"},{name:"national-park",hexadecimal:"&#x1f3de;"},{name:"stadium",hexadecimal:"&#x1f3df;"},{name:"classical-building",hexadecimal:"&#x1f3db;"},{name:"building-construction",hexadecimal:"&#x1f3d7;"},{name:"house-buildings",hexadecimal:"&#x1f3d8;"},{name:"cityscape",hexadecimal:"&#x1f3d9;"},{name:"derelict-house-building",hexadecimal:"&#x1f3da;"},{name:"house-building",hexadecimal:"&#x1f3e0;"},{name:"house-with-garden",hexadecimal:"&#x1f3e1;"},{name:"office-building",hexadecimal:"&#x1f3e2;"},{name:"japanese-post-office",hexadecimal:"&#x1f3e3;"},{name:"european-post-office",hexadecimal:"&#x1f3e4;"},{name:"hospital",hexadecimal:"&#x1f3e5;"},{name:"bank",hexadecimal:"&#x1f3e6;"},{name:"hotel",hexadecimal:"&#x1f3e8;"},{name:"love-hotel",hexadecimal:"&#x1f3e9;"},{name:"convenience-store",hexadecimal:"&#x1f3ea;"},{name:"school",hexadecimal:"&#x1f3eb;"},{name:"department-store",hexadecimal:"&#x1f3ec;"},{name:"factory",hexadecimal:"&#x1f3ed;"},{name:"japanese-castle",hexadecimal:"&#x1f3ef;"},{name:"european-castle",hexadecimal:"&#x1f3f0;"},{name:"wedding",hexadecimal:"&#x1f492;"},{name:"tokyo-tower",hexadecimal:"&#x1f5fc;"},{name:"statue-of-liberty",hexadecimal:"&#x1f5fd;"},{name:"church",hexadecimal:"&#x26ea;"},{name:"mosque",hexadecimal:"&#x1f54c;"},{name:"synagogue",hexadecimal:"&#x1f54d;"},{name:"shinto-shrine",hexadecimal:"&#x26e9;"},{name:"kaaba",hexadecimal:"&#x1f54b;"},{name:"fountain",hexadecimal:"&#x26f2;"},{name:"tent",hexadecimal:"&#x26fa;"},{name:"foggy",hexadecimal:"&#x1f301;"},{name:"night-with-stars",hexadecimal:"&#x1f303;"},{name:"sunrise-over-mountains",hexadecimal:"&#x1f304;"},{name:"sunrise",hexadecimal:"&#x1f305;"},{name:"cityscape-at-dusk",hexadecimal:"&#x1f306;"},{name:"sunset-over-buildings",hexadecimal:"&#x1f307;"},{name:"bridge-at-night",hexadecimal:"&#x1f309;"},{name:"hot-springs",hexadecimal:"&#x2668;"},{name:"milky-way",hexadecimal:"&#x1f30c;"},{name:"carousel-horse",hexadecimal:"&#x1f3a0;"},{name:"ferris-wheel",hexadecimal:"&#x1f3a1;"},{name:"roller-coaster",hexadecimal:"&#x1f3a2;"},{name:"barber-pole",hexadecimal:"&#x1f488;"},{name:"circus-tent",hexadecimal:"&#x1f3aa;"},{name:"performing-arts",hexadecimal:"&#x1f3ad;"},{name:"frame-with-picture",hexadecimal:"&#x1f5bc;"},{name:"artist-palette",hexadecimal:"&#x1f3a8;"},{name:"slot-machine",hexadecimal:"&#x1f3b0;"},{name:"steam-locomotive",hexadecimal:"&#x1f682;"},{name:"railway-car",hexadecimal:"&#x1f683;"},{name:"high-speed-train",hexadecimal:"&#x1f684;"},{name:"high-speed-train-with-bullet-nose",hexadecimal:"&#x1f685;"},{name:"train",hexadecimal:"&#x1f686;"},{name:"metro",hexadecimal:"&#x1f687;"},{name:"light-rail",hexadecimal:"&#x1f688;"},{name:"station",hexadecimal:"&#x1f689;"},{name:"tram",hexadecimal:"&#x1f68a;"},{name:"monorail",hexadecimal:"&#x1f69d;"},{name:"mountain-railway",hexadecimal:"&#x1f69e;"},{name:"tram-car",hexadecimal:"&#x1f68b;"},{name:"bus",hexadecimal:"&#x1f68c;"},{name:"oncoming-bus",hexadecimal:"&#x1f68d;"},{name:"trolleybus",hexadecimal:"&#x1f68e;"},{name:"minibus",hexadecimal:"&#x1f690;"},{name:"ambulance",hexadecimal:"&#x1f691;"},{name:"fire-engine",hexadecimal:"&#x1f692;"},{name:"police-car",hexadecimal:"&#x1f693;"},{name:"oncoming-police-car",hexadecimal:"&#x1f694;"},{name:"taxi",hexadecimal:"&#x1f695;"},{name:"oncoming-taxi",hexadecimal:"&#x1f696;"},{name:"automobile",hexadecimal:"&#x1f697;"},{name:"oncoming-automobile",hexadecimal:"&#x1f698;"},{name:"recreational-vehicle",hexadecimal:"&#x1f699;"},{name:"delivery-truck",hexadecimal:"&#x1f69a;"},{name:"articulated-lorry",hexadecimal:"&#x1f69b;"},{name:"tractor",hexadecimal:"&#x1f69c;"},{name:"bicycle",hexadecimal:"&#x1f6b2;"},{name:"scooter",hexadecimal:"&#x1f6f4;"},{name:"motor-scooter",hexadecimal:"&#x1f6f5;"},{name:"racing-car",hexadecimal:"&#x1f3ce;"},{name:"racing-motorcycle",hexadecimal:"&#x1f3cd;"},{name:"bus-stop",hexadecimal:"&#x1f68f;"},{name:"motorway",hexadecimal:"&#x1f6e3;"},{name:"railway-track",hexadecimal:"&#x1f6e4;"},{name:"fuel-pump",hexadecimal:"&#x26fd;"},{name:"police-cars-revolving-light",hexadecimal:"&#x1f6a8;"},{name:"horizontal-traffic-light",hexadecimal:"&#x1f6a5;"},{name:"vertical-traffic-light",hexadecimal:"&#x1f6a6;"},{name:"construction-sign",hexadecimal:"&#x1f6a7;"},{name:"octagonal-sign",hexadecimal:"&#x1f6d1;"},{name:"anchor",hexadecimal:"&#x2693;"},{name:"sailboat",hexadecimal:"&#x26f5;"},{name:"canoe",hexadecimal:"&#x1f6f6;"},{name:"speedboat",hexadecimal:"&#x1f6a4;"},{name:"passenger-ship",hexadecimal:"&#x1f6f3;"},{name:"ferry",hexadecimal:"&#x26f4;"},{name:"motor-boat",hexadecimal:"&#x1f6e5;"},{name:"ship",hexadecimal:"&#x1f6a2;"},{name:"airplane",hexadecimal:"&#x2708;"},{name:"small-airplane",hexadecimal:"&#x1f6e9;"},{name:"airplane-departure",hexadecimal:"&#x1f6eb;"},{name:"airplane-arriving",hexadecimal:"&#x1f6ec;"},{name:"seat",hexadecimal:"&#x1f4ba;"},{name:"helicopter",hexadecimal:"&#x1f681;"},{name:"suspension-railway",hexadecimal:"&#x1f69f;"},{name:"mountain-cableway",hexadecimal:"&#x1f6a0;"},{name:"aerial-tramway",hexadecimal:"&#x1f6a1;"},{name:"rocket",hexadecimal:"&#x1f680;"},{name:"satellite",hexadecimal:"&#x1f6f0;"},{name:"bellhop-bell",hexadecimal:"&#x1f6ce;"},{name:"door",hexadecimal:"&#x1f6aa;"},{name:"sleeping-accommodation",hexadecimal:"&#x1f6cc;"},{name:"bed",hexadecimal:"&#x1f6cf;"},{name:"couch-and-lamp",hexadecimal:"&#x1f6cb;"},{name:"toilet",hexadecimal:"&#x1f6bd;"},{name:"shower",hexadecimal:"&#x1f6bf;"},{name:"bath",hexadecimal:"&#x1f6c0;"},{name:"person-taking-bath-type-1-2",hexadecimal:"&#x1f6c0;&#x1f3fb;"},{name:"person-taking-bath-type-3",hexadecimal:"&#x1f6c0;&#x1f3fc;"},{name:"person-taking-bath-type-4",hexadecimal:"&#x1f6c0;&#x1f3fd;"},{name:"person-taking-bath-type-5",hexadecimal:"&#x1f6c0;&#x1f3fe;"},{name:"person-taking-bath-type-6",hexadecimal:"&#x1f6c0;&#x1f3ff;"},{name:"bathtub",hexadecimal:"&#x1f6c1;"},{name:"hourglass",hexadecimal:"&#x231b;"},{name:"hourglass-with-flowing-sand",hexadecimal:"&#x23f3;"},{name:"watch",hexadecimal:"&#x231a;"},{name:"alarm-clock",hexadecimal:"&#x23f0;"},{name:"stopwatch",hexadecimal:"&#x23f1;"},{name:"timer-clock",hexadecimal:"&#x23f2;"},{name:"mantelpiece-clock",hexadecimal:"&#x1f570;"},{name:"clock-face-twelve-oclock",hexadecimal:"&#x1f55b;"},{name:"clock-face-twelve-thirty",hexadecimal:"&#x1f567;"},{name:"clock-face-one-oclock",hexadecimal:"&#x1f550;"},{name:"clock-face-one-thirty",hexadecimal:"&#x1f55c;"},{name:"clock-face-two-oclock",hexadecimal:"&#x1f551;"},{name:"clock-face-two-thirty",hexadecimal:"&#x1f55d;"},{name:"clock-face-three-oclock",hexadecimal:"&#x1f552;"},{name:"clock-face-three-thirty",hexadecimal:"&#x1f55e;"},{name:"clock-face-four-oclock",hexadecimal:"&#x1f553;"},{name:"clock-face-four-thirty",hexadecimal:"&#x1f55f;"},{name:"clock-face-five-oclock",hexadecimal:"&#x1f554;"},{name:"clock-face-five-thirty",hexadecimal:"&#x1f560;"},{name:"clock-face-six-oclock",hexadecimal:"&#x1f555;"},{name:"clock-face-six-thirty",hexadecimal:"&#x1f561;"},{name:"clock-face-seven-oclock",hexadecimal:"&#x1f556;"},{name:"clock-face-seven-thirty",hexadecimal:"&#x1f562;"},{name:"clock-face-eight-oclock",hexadecimal:"&#x1f557;"},{name:"clock-face-eight-thirty",hexadecimal:"&#x1f563;"},{name:"clock-face-nine-oclock",hexadecimal:"&#x1f558;"},{name:"clock-face-nine-thirty",hexadecimal:"&#x1f564;"},{name:"clock-face-ten-oclock",hexadecimal:"&#x1f559;"},{name:"clock-face-ten-thirty",hexadecimal:"&#x1f565;"},{name:"clock-face-eleven-oclock",hexadecimal:"&#x1f55a;"},{name:"clock-face-eleven-thirty",hexadecimal:"&#x1f566;"},{name:"new-moon-symbol",hexadecimal:"&#x1f311;"},{name:"waxing-crescent-moon-symbol",hexadecimal:"&#x1f312;"},{name:"first-quarter-moon-symbol",hexadecimal:"&#x1f313;"},{name:"waxing-gibbous-moon-symbol",hexadecimal:"&#x1f314;"},{name:"full-moon-symbol",hexadecimal:"&#x1f315;"},{name:"waning-gibbous-moon-symbol",hexadecimal:"&#x1f316;"},{name:"last-quarter-moon-symbol",hexadecimal:"&#x1f317;"},{name:"waning-crescent-moon-symbol",hexadecimal:"&#x1f318;"},{name:"crescent-moon",hexadecimal:"&#x1f319;"},{name:"new-moon-with-face",hexadecimal:"&#x1f31a;"},{name:"first-quarter-moon-with-face",hexadecimal:"&#x1f31b;"},{name:"last-quarter-moon-with-face",hexadecimal:"&#x1f31c;"},{name:"thermometer",hexadecimal:"&#x1f321;"},{name:"black-sun-with-rays",hexadecimal:"&#x2600;"},{name:"full-moon-with-face",hexadecimal:"&#x1f31d;"},{name:"sun-with-face",hexadecimal:"&#x1f31e;"},{name:"white-medium-star",hexadecimal:"&#x2b50;"},{name:"glowing-star",hexadecimal:"&#x1f31f;"},{name:"shooting-star",hexadecimal:"&#x1f320;"},{name:"cloud",hexadecimal:"&#x2601;"},{name:"sun-behind-cloud",hexadecimal:"&#x26c5;"},{name:"thunder-cloud-and-rain",hexadecimal:"&#x26c8;"},{name:"white-sun-with-small-cloud",hexadecimal:"&#x1f324;"},{name:"white-sun-behind-cloud",hexadecimal:"&#x1f325;"},{name:"white-sun-behind-cloud-with-rain",hexadecimal:"&#x1f326;"},{name:"cloud-with-rain",hexadecimal:"&#x1f327;"},{name:"cloud-with-snow",hexadecimal:"&#x1f328;"},{name:"cloud-with-lightning",hexadecimal:"&#x1f329;"},{name:"cloud-with-tornado",hexadecimal:"&#x1f32a;"},{name:"fog",hexadecimal:"&#x1f32b;"},{name:"wind-blowing-face",hexadecimal:"&#x1f32c;"},{name:"cyclone",hexadecimal:"&#x1f300;"},{name:"rainbow",hexadecimal:"&#x1f308;"},{name:"closed-umbrella",hexadecimal:"&#x1f302;"},{name:"umbrella",hexadecimal:"&#x2602;"},{name:"umbrella-with-rain-drops",hexadecimal:"&#x2614;"},{name:"umbrella-on-ground",hexadecimal:"&#x26f1;"},{name:"high-voltage-sign",hexadecimal:"&#x26a1;"},{name:"snowflake",hexadecimal:"&#x2744;"},{name:"snowman",hexadecimal:"&#x2603;"},{name:"snowman-without-snow",hexadecimal:"&#x26c4;"},{name:"comet",hexadecimal:"&#x2604;"},{name:"fire",hexadecimal:"&#x1f525;"},{name:"droplet",hexadecimal:"&#x1f4a7;"},{name:"water-wave",hexadecimal:"&#x1f30a;"},{name:"jack-o-lantern",hexadecimal:"&#x1f383;"},{name:"christmas-tree",hexadecimal:"&#x1f384;"},{name:"fireworks",hexadecimal:"&#x1f386;"},{name:"firework-sparkler",hexadecimal:"&#x1f387;"},{name:"sparkles",hexadecimal:"&#x2728;"},{name:"balloon",hexadecimal:"&#x1f388;"},{name:"party-popper",hexadecimal:"&#x1f389;"},{name:"confetti-ball",hexadecimal:"&#x1f38a;"},{name:"tanabata-tree",hexadecimal:"&#x1f38b;"},{name:"pine-decoration",hexadecimal:"&#x1f38d;"},{name:"japanese-dolls",hexadecimal:"&#x1f38e;"},{name:"carp-streamer",hexadecimal:"&#x1f38f;"},{name:"wind-chime",hexadecimal:"&#x1f390;"},{name:"moon-viewing-ceremony",hexadecimal:"&#x1f391;"},{name:"ribbon",hexadecimal:"&#x1f380;"},{name:"wrapped-present",hexadecimal:"&#x1f381;"},{name:"reminder-ribbon",hexadecimal:"&#x1f397;"},{name:"admission-tickets",hexadecimal:"&#x1f39f;"},{name:"ticket",hexadecimal:"&#x1f3ab;"},{name:"military-medal",hexadecimal:"&#x1f396;"},{name:"trophy",hexadecimal:"&#x1f3c6;"},{name:"sports-medal",hexadecimal:"&#x1f3c5;"},{name:"first-place-medal",hexadecimal:"&#x1f947;"},{name:"second-place-medal",hexadecimal:"&#x1f948;"},{name:"third-place-medal",hexadecimal:"&#x1f949;"},{name:"soccer-ball",hexadecimal:"&#x26bd;"},{name:"baseball",hexadecimal:"&#x26be;"},{name:"basketball-and-hoop",hexadecimal:"&#x1f3c0;"},{name:"volleyball",hexadecimal:"&#x1f3d0;"},{name:"american-football",hexadecimal:"&#x1f3c8;"},{name:"rugby-football",hexadecimal:"&#x1f3c9;"},{name:"tennis-racquet-and-ball",hexadecimal:"&#x1f3be;"},{name:"billiards",hexadecimal:"&#x1f3b1;"},{name:"bowling",hexadecimal:"&#x1f3b3;"},{name:"cricket-bat-and-ball",hexadecimal:"&#x1f3cf;"},{name:"field-hockey-stick-and-ball",hexadecimal:"&#x1f3d1;"},{name:"ice-hockey-stick-and-puck",hexadecimal:"&#x1f3d2;"},{name:"table-tennis-paddle-and-ball",hexadecimal:"&#x1f3d3;"},{name:"badminton-racquet-and-shuttlecock",hexadecimal:"&#x1f3f8;"},{name:"boxing-glove",hexadecimal:"&#x1f94a;"},{name:"martial-arts-uniform",hexadecimal:"&#x1f94b;"},{name:"goal-net",hexadecimal:"&#x1f945;"},{name:"direct-hit",hexadecimal:"&#x1f3af;"},{name:"flag-in-hole",hexadecimal:"&#x26f3;"},{name:"ice-skate",hexadecimal:"&#x26f8;"},{name:"fishing-pole-and-fish",hexadecimal:"&#x1f3a3;"},{name:"running-shirt-with-sash",hexadecimal:"&#x1f3bd;"},{name:"ski-and-ski-boot",hexadecimal:"&#x1f3bf;"},{name:"fencer",hexadecimal:"&#x1f93a;"},{name:"horse-racing",hexadecimal:"&#x1f3c7;"},{name:"skier",hexadecimal:"&#x26f7;"},{name:"snowboarder",hexadecimal:"&#x1f3c2;"},{name:"golfer",hexadecimal:"&#x1f3cc;"},{name:"surfer",hexadecimal:"&#x1f3c4;"},{name:"person-surfing-type-1-2",hexadecimal:"&#x1f3c4;&#x1f3fb;"},{name:"person-surfing-type-3",hexadecimal:"&#x1f3c4;&#x1f3fc;"},{name:"person-surfing-type-4",hexadecimal:"&#x1f3c4;&#x1f3fd;"},{name:"person-surfing-type-5",hexadecimal:"&#x1f3c4;&#x1f3fe;"},{name:"person-surfing-type-6",hexadecimal:"&#x1f3c4;&#x1f3ff;"},{name:"rowboat",hexadecimal:"&#x1f6a3;"},{name:"person-rowing-boat-type-1-2",hexadecimal:"&#x1f6a3;&#x1f3fb;"},{name:"person-rowing-boat-type-3",hexadecimal:"&#x1f6a3;&#x1f3fc;"},{name:"person-rowing-boat-type-4",hexadecimal:"&#x1f6a3;&#x1f3fd;"},{name:"person-rowing-boat-type-5",hexadecimal:"&#x1f6a3;&#x1f3fe;"},{name:"person-rowing-boat-type-6",hexadecimal:"&#x1f6a3;&#x1f3ff;"},{name:"swimmer",hexadecimal:"&#x1f3ca;"},{name:"person-swimming-type-1-2",hexadecimal:"&#x1f3ca;&#x1f3fb;"},{name:"person-swimming-type-3",hexadecimal:"&#x1f3ca;&#x1f3fc;"},{name:"person-swimming-type-4",hexadecimal:"&#x1f3ca;&#x1f3fd;"},{name:"person-swimming-type-5",hexadecimal:"&#x1f3ca;&#x1f3fe;"},{name:"person-swimming-type-6",hexadecimal:"&#x1f3ca;&#x1f3ff;"},{name:"person-with-ball",hexadecimal:"&#x26f9;"},{name:"person-with-ball-type-1-2",hexadecimal:"&#x26f9;&#x1f3fb;"},{name:"person-with-ball-type-3",hexadecimal:"&#x26f9;&#x1f3fc;"},{name:"person-with-ball-type-4",hexadecimal:"&#x26f9;&#x1f3fd;"},{name:"person-with-ball-type-5",hexadecimal:"&#x26f9;&#x1f3fe;"},{name:"person-with-ball-type-6",hexadecimal:"&#x26f9;&#x1f3ff;"},{name:"weight-lifter",hexadecimal:"&#x1f3cb;"},{name:"person-weight-lifting-type-1-2",hexadecimal:"&#x1f3cb;&#x1f3fb;"},{name:"person-weight-lifting-type-3",hexadecimal:"&#x1f3cb;&#x1f3fc;"},{name:"person-weight-lifting-type-4",hexadecimal:"&#x1f3cb;&#x1f3fd;"},{name:"person-weight-lifting-type-5",hexadecimal:"&#x1f3cb;&#x1f3fe;"},{name:"person-weight-lifting-type-6",hexadecimal:"&#x1f3cb;&#x1f3ff;"},{name:"bicyclist",hexadecimal:"&#x1f6b4;"},{name:"person-biking-type-1-2",hexadecimal:"&#x1f6b4;&#x1f3fb;"},{name:"person-biking-type-3",hexadecimal:"&#x1f6b4;&#x1f3fc;"},{name:"person-biking-type-4",hexadecimal:"&#x1f6b4;&#x1f3fd;"},{name:"person-biking-type-5",hexadecimal:"&#x1f6b4;&#x1f3fe;"},{name:"person-biking-type-6",hexadecimal:"&#x1f6b4;&#x1f3ff;"},{name:"mountain-bicyclist",hexadecimal:"&#x1f6b5;"},{name:"person-mountain-biking-type-1-2",hexadecimal:"&#x1f6b5;&#x1f3fb;"},{name:"person-mountain-biking-type-3",hexadecimal:"&#x1f6b5;&#x1f3fc;"},{name:"person-mountain-biking-type-4",hexadecimal:"&#x1f6b5;&#x1f3fd;"},{name:"person-mountain-biking-type-5",hexadecimal:"&#x1f6b5;&#x1f3fe;"},{name:"person-mountain-biking-type-6",hexadecimal:"&#x1f6b5;&#x1f3ff;"},{name:"person-doing-cartwheel",hexadecimal:"&#x1f938;"},{name:"person-doing-cartwheel-type-1-2",hexadecimal:"&#x1f938;&#x1f3fb;"},{name:"person-doing-cartwheel-type-3",hexadecimal:"&#x1f938;&#x1f3fc;"},{name:"person-doing-cartwheel-type-4",hexadecimal:"&#x1f938;&#x1f3fd;"},{name:"person-doing-cartwheel-type-5",hexadecimal:"&#x1f938;&#x1f3fe;"},{name:"person-doing-cartwheel-type-6",hexadecimal:"&#x1f938;&#x1f3ff;"},{name:"wrestlers",hexadecimal:"&#x1f93c;"},{name:"people-wrestling-type-1-2",hexadecimal:"&#x1f93c;&#x1f3fb;"},{name:"people-wrestling-type-3",hexadecimal:"&#x1f93c;&#x1f3fc;"},{name:"people-wrestling-type-4",hexadecimal:"&#x1f93c;&#x1f3fd;"},{name:"people-wrestling-type-5",hexadecimal:"&#x1f93c;&#x1f3fe;"},{name:"people-wrestling-type-6",hexadecimal:"&#x1f93c;&#x1f3ff;"},{name:"water-polo",hexadecimal:"&#x1f93d;"},{name:"person-playing-water-polo-type-1-2",hexadecimal:"&#x1f93d;&#x1f3fb;"},{name:"person-playing-water-polo-type-3",hexadecimal:"&#x1f93d;&#x1f3fc;"},{name:"person-playing-water-polo-type-4",hexadecimal:"&#x1f93d;&#x1f3fd;"},{name:"person-playing-water-polo-type-5",hexadecimal:"&#x1f93d;&#x1f3fe;"},{name:"person-playing-water-polo-type-6",hexadecimal:"&#x1f93d;&#x1f3ff;"},{name:"handball",hexadecimal:"&#x1f93e;"},{name:"person-playing-handball-type-1-2",hexadecimal:"&#x1f93e;&#x1f3fb;"},{name:"person-playing-handball-type-3",hexadecimal:"&#x1f93e;&#x1f3fc;"},{name:"person-playing-handball-type-4",hexadecimal:"&#x1f93e;&#x1f3fd;"},{name:"person-playing-handball-type-5",hexadecimal:"&#x1f93e;&#x1f3fe;"},{name:"person-playing-handball-type-6",hexadecimal:"&#x1f93e;&#x1f3ff;"},{name:"juggling",hexadecimal:"&#x1f939;"},{name:"person-juggling-type-1-2",hexadecimal:"&#x1f939;&#x1f3fb;"},{name:"person-juggling-type-3",hexadecimal:"&#x1f939;&#x1f3fc;"},{name:"person-juggling-type-4",hexadecimal:"&#x1f939;&#x1f3fd;"},{name:"person-juggling-type-5",hexadecimal:"&#x1f939;&#x1f3fe;"},{name:"person-juggling-type-6",hexadecimal:"&#x1f939;&#x1f3ff;"},{name:"video-game",hexadecimal:"&#x1f3ae;"},{name:"joystick",hexadecimal:"&#x1f579;"},{name:"game-die",hexadecimal:"&#x1f3b2;"},{name:"black-spade-suit",hexadecimal:"&#x2660;"},{name:"black-heart-suit",hexadecimal:"&#x2665;"},{name:"black-diamond-suit",hexadecimal:"&#x2666;"},{name:"black-club-suit",hexadecimal:"&#x2663;"},{name:"playing-card-black-joker",hexadecimal:"&#x1f0cf;"},{name:"mahjong-tile-red-dragon",hexadecimal:"&#x1f004;"},{name:"flower-playing-cards",hexadecimal:"&#x1f3b4;"},{name:"speaker-with-cancellation-stroke",hexadecimal:"&#x1f507;"},{name:"speaker",hexadecimal:"&#x1f508;"},{name:"speaker-with-one-sound-wave",hexadecimal:"&#x1f509;"},{name:"speaker-with-three-sound-waves",hexadecimal:"&#x1f50a;"},{name:"public-address-loudspeaker",hexadecimal:"&#x1f4e2;"},{name:"cheering-megaphone",hexadecimal:"&#x1f4e3;"},{name:"postal-horn",hexadecimal:"&#x1f4ef;"},{name:"bell",hexadecimal:"&#x1f514;"},{name:"bell-with-cancellation-stroke",hexadecimal:"&#x1f515;"},{name:"musical-score",hexadecimal:"&#x1f3bc;"},{name:"musical-note",hexadecimal:"&#x1f3b5;"},{name:"multiple-musical-notes",hexadecimal:"&#x1f3b6;"},{name:"studio-microphone",hexadecimal:"&#x1f399;"},{name:"level-slider",hexadecimal:"&#x1f39a;"},{name:"control-knobs",hexadecimal:"&#x1f39b;"},{name:"microphone",hexadecimal:"&#x1f3a4;"},{name:"headphone",hexadecimal:"&#x1f3a7;"},{name:"radio",hexadecimal:"&#x1f4fb;"},{name:"saxophone",hexadecimal:"&#x1f3b7;"},{name:"guitar",hexadecimal:"&#x1f3b8;"},{name:"musical-keyboard",hexadecimal:"&#x1f3b9;"},{name:"trumpet",hexadecimal:"&#x1f3ba;"},{name:"violin",hexadecimal:"&#x1f3bb;"},{name:"drum-with-drumsticks",hexadecimal:"&#x1f941;"},{name:"mobile-phone",hexadecimal:"&#x1f4f1;"},{name:"mobile-phone-with-rightwards-arrow-at-left",hexadecimal:"&#x1f4f2;"},{name:"black-telephone",hexadecimal:"&#x260e;"},{name:"telephone-receiver",hexadecimal:"&#x1f4de;"},{name:"pager",hexadecimal:"&#x1f4df;"},{name:"fax-machine",hexadecimal:"&#x1f4e0;"},{name:"battery",hexadecimal:"&#x1f50b;"},{name:"electric-plug",hexadecimal:"&#x1f50c;"},{name:"personal-computer",hexadecimal:"&#x1f4bb;"},{name:"desktop-computer",hexadecimal:"&#x1f5a5;"},{name:"printer",hexadecimal:"&#x1f5a8;"},{name:"keyboard",hexadecimal:"&#x2328;"},{name:"three-button-mouse",hexadecimal:"&#x1f5b1;"},{name:"trackball",hexadecimal:"&#x1f5b2;"},{name:"minidisc",hexadecimal:"&#x1f4bd;"},{name:"floppy-disk",hexadecimal:"&#x1f4be;"},{name:"optical-disc",hexadecimal:"&#x1f4bf;"},{name:"dvd",hexadecimal:"&#x1f4c0;"},{name:"movie-camera",hexadecimal:"&#x1f3a5;"},{name:"film-frames",hexadecimal:"&#x1f39e;"},{name:"film-projector",hexadecimal:"&#x1f4fd;"},{name:"clapper-board",hexadecimal:"&#x1f3ac;"},{name:"television",hexadecimal:"&#x1f4fa;"},{name:"camera",hexadecimal:"&#x1f4f7;"},{name:"camera-with-flash",hexadecimal:"&#x1f4f8;"},{name:"video-camera",hexadecimal:"&#x1f4f9;"},{name:"videocassette",hexadecimal:"&#x1f4fc;"},{name:"left-pointing-magnifying-glass",hexadecimal:"&#x1f50d;"},{name:"right-pointing-magnifying-glass",hexadecimal:"&#x1f50e;"},{name:"microscope",hexadecimal:"&#x1f52c;"},{name:"telescope",hexadecimal:"&#x1f52d;"},{name:"satellite-antenna",hexadecimal:"&#x1f4e1;"},{name:"candle",hexadecimal:"&#x1f56f;"},{name:"electric-light-bulb",hexadecimal:"&#x1f4a1;"},{name:"electric-torch",hexadecimal:"&#x1f526;"},{name:"izakaya-lantern",hexadecimal:"&#x1f3ee;"},{name:"notebook-with-decorative-cover",hexadecimal:"&#x1f4d4;"},{name:"closed-book",hexadecimal:"&#x1f4d5;"},{name:"open-book",hexadecimal:"&#x1f4d6;"},{name:"green-book",hexadecimal:"&#x1f4d7;"},{name:"blue-book",hexadecimal:"&#x1f4d8;"},{name:"orange-book",hexadecimal:"&#x1f4d9;"},{name:"books",hexadecimal:"&#x1f4da;"},{name:"notebook",hexadecimal:"&#x1f4d3;"},{name:"ledger",hexadecimal:"&#x1f4d2;"},{name:"page-with-curl",hexadecimal:"&#x1f4c3;"},{name:"scroll",hexadecimal:"&#x1f4dc;"},{name:"page-facing-up",hexadecimal:"&#x1f4c4;"},{name:"newspaper",hexadecimal:"&#x1f4f0;"},{name:"rolled-up-newspaper",hexadecimal:"&#x1f5de;"},{name:"bookmark-tabs",hexadecimal:"&#x1f4d1;"},{name:"bookmark",hexadecimal:"&#x1f516;"},{name:"label",hexadecimal:"&#x1f3f7;"},{name:"money-bag",hexadecimal:"&#x1f4b0;"},{name:"banknote-with-yen-sign",hexadecimal:"&#x1f4b4;"},{name:"banknote-with-dollar-sign",hexadecimal:"&#x1f4b5;"},{name:"banknote-with-euro-sign",hexadecimal:"&#x1f4b6;"},{name:"banknote-with-pound-sign",hexadecimal:"&#x1f4b7;"},{name:"money-with-wings",hexadecimal:"&#x1f4b8;"},{name:"credit-card",hexadecimal:"&#x1f4b3;"},{name:"chart-with-upwards-trend-and-yen-sign",hexadecimal:"&#x1f4b9;"},{name:"currency-exchange",hexadecimal:"&#x1f4b1;"},{name:"heavy-dollar-sign",hexadecimal:"&#x1f4b2;"},{name:"envelope",hexadecimal:"&#x2709;"},{name:"e-mail-symbol",hexadecimal:"&#x1f4e7;"},{name:"incoming-envelope",hexadecimal:"&#x1f4e8;"},{name:"envelope-with-downwards-arrow-above",hexadecimal:"&#x1f4e9;"},{name:"outbox-tray",hexadecimal:"&#x1f4e4;"},{name:"inbox-tray",hexadecimal:"&#x1f4e5;"},{name:"package",hexadecimal:"&#x1f4e6;"},{name:"closed-mailbox-with-raised-flag",hexadecimal:"&#x1f4eb;"},{name:"closed-mailbox-with-lowered-flag",hexadecimal:"&#x1f4ea;"},{name:"open-mailbox-with-raised-flag",hexadecimal:"&#x1f4ec;"},{name:"open-mailbox-with-lowered-flag",hexadecimal:"&#x1f4ed;"},{name:"postbox",hexadecimal:"&#x1f4ee;"},{name:"ballot-box-with-ballot",hexadecimal:"&#x1f5f3;"},{name:"pencil",hexadecimal:"&#x270f;"},{name:"black-nib",hexadecimal:"&#x2712;"},{name:"lower-left-fountain-pen",hexadecimal:"&#x1f58b;"},{name:"lower-left-ballpoint-pen",hexadecimal:"&#x1f58a;"},{name:"lower-left-paintbrush",hexadecimal:"&#x1f58c;"},{name:"lower-left-crayon",hexadecimal:"&#x1f58d;"},{name:"memo",hexadecimal:"&#x1f4dd;"},{name:"briefcase",hexadecimal:"&#x1f4bc;"},{name:"file-folder",hexadecimal:"&#x1f4c1;"},{name:"open-file-folder",hexadecimal:"&#x1f4c2;"},{name:"card-index-dividers",hexadecimal:"&#x1f5c2;"},{name:"calendar",hexadecimal:"&#x1f4c5;"},{name:"tear-off-calendar",hexadecimal:"&#x1f4c6;"},{name:"spiral-note-pad",hexadecimal:"&#x1f5d2;"},{name:"spiral-calendar-pad",hexadecimal:"&#x1f5d3;"},{name:"card-index",hexadecimal:"&#x1f4c7;"},{name:"chart-with-upwards-trend",hexadecimal:"&#x1f4c8;"},{name:"chart-with-downwards-trend",hexadecimal:"&#x1f4c9;"},{name:"bar-chart",hexadecimal:"&#x1f4ca;"},{name:"clipboard",hexadecimal:"&#x1f4cb;"},{name:"pushpin",hexadecimal:"&#x1f4cc;"},{name:"round-pushpin",hexadecimal:"&#x1f4cd;"},{name:"paperclip",hexadecimal:"&#x1f4ce;"},{name:"linked-paperclips",hexadecimal:"&#x1f587;"},{name:"straight-ruler",hexadecimal:"&#x1f4cf;"},{name:"triangular-ruler",hexadecimal:"&#x1f4d0;"},{name:"black-scissors",hexadecimal:"&#x2702;"},{name:"card-file-box",hexadecimal:"&#x1f5c3;"},{name:"file-cabinet",hexadecimal:"&#x1f5c4;"},{name:"wastebasket",hexadecimal:"&#x1f5d1;"},{name:"lock",hexadecimal:"&#x1f512;"},{name:"open-lock",hexadecimal:"&#x1f513;"},{name:"lock-with-ink-pen",hexadecimal:"&#x1f50f;"},{name:"closed-lock-with-key",hexadecimal:"&#x1f510;"},{name:"key",hexadecimal:"&#x1f511;"},{name:"old-key",hexadecimal:"&#x1f5dd;"},{name:"hammer",hexadecimal:"&#x1f528;"},{name:"pick",hexadecimal:"&#x26cf;"},{name:"hammer-and-pick",hexadecimal:"&#x2692;"},{name:"hammer-and-wrench",hexadecimal:"&#x1f6e0;"},{name:"dagger-knife",hexadecimal:"&#x1f5e1;"},{name:"crossed-swords",hexadecimal:"&#x2694;"},{name:"pistol",hexadecimal:"&#x1f52b;"},{name:"bow-and-arrow",hexadecimal:"&#x1f3f9;"},{name:"shield",hexadecimal:"&#x1f6e1;"},{name:"wrench",hexadecimal:"&#x1f527;"},{name:"nut-and-bolt",hexadecimal:"&#x1f529;"},{name:"gear",hexadecimal:"&#x2699;"},{name:"compression",hexadecimal:"&#x1f5dc;"},{name:"alembic",hexadecimal:"&#x2697;"},{name:"scales",hexadecimal:"&#x2696;"},{name:"link-symbol",hexadecimal:"&#x1f517;"},{name:"chains",hexadecimal:"&#x26d3;"},{name:"syringe",hexadecimal:"&#x1f489;"},{name:"pill",hexadecimal:"&#x1f48a;"},{name:"smoking-symbol",hexadecimal:"&#x1f6ac;"},{name:"coffin",hexadecimal:"&#x26b0;"},{name:"funeral-urn",hexadecimal:"&#x26b1;"},{name:"moyai",hexadecimal:"&#x1f5ff;"},{name:"oil-drum",hexadecimal:"&#x1f6e2;"},{name:"crystal-ball",hexadecimal:"&#x1f52e;"},{name:"shopping-trolley",hexadecimal:"&#x1f6d2;"},{name:"automated-teller-machine",hexadecimal:"&#x1f3e7;"},{name:"put-litter-in-its-place-symbol",hexadecimal:"&#x1f6ae;"},{name:"potable-water-symbol",hexadecimal:"&#x1f6b0;"},{name:"wheelchair-symbol",hexadecimal:"&#x267f;"},{name:"mens-symbol",hexadecimal:"&#x1f6b9;"},{name:"womens-symbol",hexadecimal:"&#x1f6ba;"},{name:"restroom",hexadecimal:"&#x1f6bb;"},{name:"baby-symbol",hexadecimal:"&#x1f6bc;"},{name:"water-closet",hexadecimal:"&#x1f6be;"},{name:"passport-control",hexadecimal:"&#x1f6c2;"},{name:"customs",hexadecimal:"&#x1f6c3;"},{name:"baggage-claim",hexadecimal:"&#x1f6c4;"},{name:"left-luggage",hexadecimal:"&#x1f6c5;"},{name:"warning-sign",hexadecimal:"&#x26a0;"},{name:"children-crossing",hexadecimal:"&#x1f6b8;"},{name:"no-entry",hexadecimal:"&#x26d4;"},{name:"no-entry-sign",hexadecimal:"&#x1f6ab;"},{name:"no-bicycles",hexadecimal:"&#x1f6b3;"},{name:"no-smoking-symbol",hexadecimal:"&#x1f6ad;"},{name:"do-not-litter-symbol",hexadecimal:"&#x1f6af;"},{name:"non-potable-water-symbol",hexadecimal:"&#x1f6b1;"},{name:"no-pedestrians",hexadecimal:"&#x1f6b7;"},{name:"no-mobile-phones",hexadecimal:"&#x1f4f5;"},{name:"no-one-under-eighteen-symbol",hexadecimal:"&#x1f51e;"},{name:"radioactive-sign",hexadecimal:"&#x2622;"},{name:"biohazard-sign",hexadecimal:"&#x2623;"},{name:"upwards-black-arrow",hexadecimal:"&#x2b06;"},{name:"north-east-arrow",hexadecimal:"&#x2197;"},{name:"black-rightwards-arrow",hexadecimal:"&#x27a1;"},{name:"south-east-arrow",hexadecimal:"&#x2198;"},{name:"downwards-black-arrow",hexadecimal:"&#x2b07;"},{name:"south-west-arrow",hexadecimal:"&#x2199;"},{name:"leftwards-black-arrow",hexadecimal:"&#x2b05;"},{name:"north-west-arrow",hexadecimal:"&#x2196;"},{name:"up-down-arrow",hexadecimal:"&#x2195;"},{name:"left-right-arrow",hexadecimal:"&#x2194;"},{name:"leftwards-arrow-with-hook",hexadecimal:"&#x21a9;"},{name:"rightwards-arrow-with-hook",hexadecimal:"&#x21aa;"},{name:"arrow-pointing-rightwards-then-curving-upwards",hexadecimal:"&#x2934;"},{name:"arrow-pointing-rightwards-then-curving-downwards",hexadecimal:"&#x2935;"},{name:"clockwise-downwards-and-upwards-open-circle-arrows",hexadecimal:"&#x1f503;"},{name:"anticlockwise-downwards-and-upwards-open-circle-arrows",hexadecimal:"&#x1f504;"},{name:"back-with-leftwards-arrow-above",hexadecimal:"&#x1f519;"},{name:"end-with-leftwards-arrow-above",hexadecimal:"&#x1f51a;"},{name:"on-with-exclamation-mark-with-left-right-arrow-above",hexadecimal:"&#x1f51b;"},{name:"soon-with-rightwards-arrow-above",hexadecimal:"&#x1f51c;"},{name:"top-with-upwards-arrow-above",hexadecimal:"&#x1f51d;"},{name:"place-of-worship",hexadecimal:"&#x1f6d0;"},{name:"atom-symbol",hexadecimal:"&#x269b;"},{name:"om-symbol",hexadecimal:"&#x1f549;"},{name:"star-of-david",hexadecimal:"&#x2721;"},{name:"wheel-of-dharma",hexadecimal:"&#x2638;"},{name:"yin-yang",hexadecimal:"&#x262f;"},{name:"latin-cross",hexadecimal:"&#x271d;"},{name:"orthodox-cross",hexadecimal:"&#x2626;"},{name:"star-and-crescent",hexadecimal:"&#x262a;"},{name:"peace-symbol",hexadecimal:"&#x262e;"},{name:"menorah-with-nine-branches",hexadecimal:"&#x1f54e;"},{name:"six-pointed-star-with-middle-dot",hexadecimal:"&#x1f52f;"},{name:"black-universal-recycling-symbol",hexadecimal:"&#x267b;"},{name:"name-badge",hexadecimal:"&#x1f4db;"},{name:"fleur-de-lis",hexadecimal:"&#x269c;"},{name:"japanese-symbol-for-beginner",hexadecimal:"&#x1f530;"},{name:"trident-emblem",hexadecimal:"&#x1f531;"},{name:"heavy-large-circle",hexadecimal:"&#x2b55;"},{name:"white-heavy-check-mark",hexadecimal:"&#x2705;"},{name:"ballot-box-with-check",hexadecimal:"&#x2611;"},{name:"heavy-check-mark",hexadecimal:"&#x2714;"},{name:"heavy-multiplication-x",hexadecimal:"&#x2716;"},{name:"cross-mark",hexadecimal:"&#x274c;"},{name:"negative-squared-cross-mark",hexadecimal:"&#x274e;"},{name:"heavy-plus-sign",hexadecimal:"&#x2795;"},{name:"heavy-minus-sign",hexadecimal:"&#x2796;"},{name:"heavy-division-sign",hexadecimal:"&#x2797;"},{name:"curly-loop",hexadecimal:"&#x27b0;"},{name:"double-curly-loop",hexadecimal:"&#x27bf;"},{name:"part-alternation-mark",hexadecimal:"&#x303d;"},{name:"eight-spoked-asterisk",hexadecimal:"&#x2733;"},{name:"eight-pointed-black-star",hexadecimal:"&#x2734;"},{name:"sparkle",hexadecimal:"&#x2747;"},{name:"double-exclamation-mark",hexadecimal:"&#x203c;"},{name:"exclamation-question-mark",hexadecimal:"&#x2049;"},{name:"black-question-mark-ornament",hexadecimal:"&#x2753;"},{name:"white-question-mark-ornament",hexadecimal:"&#x2754;"},{name:"white-exclamation-mark-ornament",hexadecimal:"&#x2755;"},{name:"heavy-exclamation-mark-symbol",hexadecimal:"&#x2757;"},{name:"wavy-dash",hexadecimal:"&#x3030;"},{name:"copyright-sign",hexadecimal:"&#x00a9;"},{name:"registered-sign",hexadecimal:"&#x00ae;"},{name:"trade-mark-sign",hexadecimal:"&#x2122;"},{name:"aries",hexadecimal:"&#x2648;"},{name:"taurus",hexadecimal:"&#x2649;"},{name:"gemini",hexadecimal:"&#x264a;"},{name:"cancer",hexadecimal:"&#x264b;"},{name:"leo",hexadecimal:"&#x264c;"},{name:"virgo",hexadecimal:"&#x264d;"},{name:"libra",hexadecimal:"&#x264e;"},{name:"scorpius",hexadecimal:"&#x264f;"},{name:"sagittarius",hexadecimal:"&#x2650;"},{name:"capricorn",hexadecimal:"&#x2651;"},{name:"aquarius",hexadecimal:"&#x2652;"},{name:"pisces",hexadecimal:"&#x2653;"},{name:"ophiuchus",hexadecimal:"&#x26ce;"},{name:"twisted-rightwards-arrows",hexadecimal:"&#x1f500;"},{name:"clockwise-rightwards-and-leftwards-open-circle-arrows",hexadecimal:"&#x1f501;"},{name:"clockwise-rightwards-and-leftwards-open-circle-arrows-with-circled-one-overlay",hexadecimal:"&#x1f502;"},{name:"black-right-pointing-triangle",hexadecimal:"&#x25b6;"},{name:"black-right-pointing-double-triangle",hexadecimal:"&#x23e9;"},{name:"black-right-pointing-double-triangle-with-vertical-bar",hexadecimal:"&#x23ed;"},{name:"black-right-pointing-triangle-with-double-vertical-bar",hexadecimal:"&#x23ef;"},{name:"black-left-pointing-triangle",hexadecimal:"&#x25c0;"},{name:"black-left-pointing-double-triangle",hexadecimal:"&#x23ea;"},{name:"black-left-pointing-double-triangle-with-vertical-bar",hexadecimal:"&#x23ee;"},{name:"up-pointing-small-red-triangle",hexadecimal:"&#x1f53c;"},{name:"black-up-pointing-double-triangle",hexadecimal:"&#x23eb;"},{name:"down-pointing-small-red-triangle",hexadecimal:"&#x1f53d;"},{name:"black-down-pointing-double-triangle",hexadecimal:"&#x23ec;"},{name:"double-vertical-bar",hexadecimal:"&#x23f8;"},{name:"black-square-for-stop",hexadecimal:"&#x23f9;"},{name:"black-circle-for-record",hexadecimal:"&#x23fa;"},{name:"eject-symbol",hexadecimal:"&#x23cf;"},{name:"cinema",hexadecimal:"&#x1f3a6;"},{name:"low-brightness-symbol",hexadecimal:"&#x1f505;"},{name:"high-brightness-symbol",hexadecimal:"&#x1f506;"},{name:"antenna-with-bars",hexadecimal:"&#x1f4f6;"},{name:"vibration-mode",hexadecimal:"&#x1f4f3;"},{name:"mobile-phone-off",hexadecimal:"&#x1f4f4;"},{name:"keycap-#",hexadecimal:"&#x0023;&#xfe0f;&#x20e3;"},{name:"keycap-*",hexadecimal:"&#x002a;&#xfe0f;&#x20e3;"},{name:"keycap-0",hexadecimal:"&#x0030;&#xfe0f;&#x20e3;"},{name:"keycap-1",hexadecimal:"&#x0031;&#xfe0f;&#x20e3;"},{name:"keycap-2",hexadecimal:"&#x0032;&#xfe0f;&#x20e3;"},{name:"keycap-3",hexadecimal:"&#x0033;&#xfe0f;&#x20e3;"},{name:"keycap-4",hexadecimal:"&#x0034;&#xfe0f;&#x20e3;"},{name:"keycap-5",hexadecimal:"&#x0035;&#xfe0f;&#x20e3;"},{name:"keycap-6",hexadecimal:"&#x0036;&#xfe0f;&#x20e3;"},{name:"keycap-7",hexadecimal:"&#x0037;&#xfe0f;&#x20e3;"},{name:"keycap-8",hexadecimal:"&#x0038;&#xfe0f;&#x20e3;"},{name:"keycap-9",hexadecimal:"&#x0039;&#xfe0f;&#x20e3;"},{name:"keycap-ten",hexadecimal:"&#x1f51f;"},{name:"hundred-points-symbol",hexadecimal:"&#x1f4af;"},{name:"input-symbol-for-latin-capital-letters",hexadecimal:"&#x1f520;"},{name:"input-symbol-for-latin-small-letters",hexadecimal:"&#x1f521;"},{name:"input-symbol-for-numbers",hexadecimal:"&#x1f522;"},{name:"input-symbol-for-symbols",hexadecimal:"&#x1f523;"},{name:"input-symbol-for-latin-letters",hexadecimal:"&#x1f524;"},{name:"negative-squared-latin-capital-letter-a",hexadecimal:"&#x1f170;"},{name:"negative-squared-ab",hexadecimal:"&#x1f18e;"},{name:"negative-squared-latin-capital-letter-b",hexadecimal:"&#x1f171;"},{name:"squared-cl",hexadecimal:"&#x1f191;"},{name:"squared-cool",hexadecimal:"&#x1f192;"},{name:"squared-free",hexadecimal:"&#x1f193;"},{name:"information-source",hexadecimal:"&#x2139;"},{name:"squared-id",hexadecimal:"&#x1f194;"},{name:"circled-latin-capital-letter-m",hexadecimal:"&#x24c2;"},{name:"squared-new",hexadecimal:"&#x1f195;"},{name:"squared-ng",hexadecimal:"&#x1f196;"},{name:"negative-squared-latin-capital-letter-o",hexadecimal:"&#x1f17e;"},{name:"squared-ok",hexadecimal:"&#x1f197;"},{name:"negative-squared-latin-capital-letter-p",hexadecimal:"&#x1f17f;"},{name:"squared-sos",hexadecimal:"&#x1f198;"},{name:"squared-up-with-exclamation-mark",hexadecimal:"&#x1f199;"},{name:"squared-vs",hexadecimal:"&#x1f19a;"},{name:"squared-katakana-koko",hexadecimal:"&#x1f201;"},{name:"squared-katakana-sa",hexadecimal:"&#x1f202;"},{name:"squared-cjk-unified-ideograph-6708",hexadecimal:"&#x1f237;"},{name:"squared-cjk-unified-ideograph-6709",hexadecimal:"&#x1f236;"},{name:"squared-cjk-unified-ideograph-6307",hexadecimal:"&#x1f22f;"},{name:"circled-ideograph-advantage",hexadecimal:"&#x1f250;"},{name:"squared-cjk-unified-ideograph-5272",hexadecimal:"&#x1f239;"},{name:"squared-cjk-unified-ideograph-7121",hexadecimal:"&#x1f21a;"},{name:"squared-cjk-unified-ideograph-7981",hexadecimal:"&#x1f232;"},{name:"circled-ideograph-accept",hexadecimal:"&#x1f251;"},{name:"squared-cjk-unified-ideograph-7533",hexadecimal:"&#x1f238;"},{name:"squared-cjk-unified-ideograph-5408",hexadecimal:"&#x1f234;"},{name:"squared-cjk-unified-ideograph-7a7a",hexadecimal:"&#x1f233;"},{name:"circled-ideograph-congratulation",hexadecimal:"&#x3297;"},{name:"circled-ideograph-secret",hexadecimal:"&#x3299;"},{name:"squared-cjk-unified-ideograph-55b6",hexadecimal:"&#x1f23a;"},{name:"squared-cjk-unified-ideograph-6e80",hexadecimal:"&#x1f235;"},{name:"black-small-square",hexadecimal:"&#x25aa;"},{name:"white-small-square",hexadecimal:"&#x25ab;"},{name:"white-medium-square",hexadecimal:"&#x25fb;"},{name:"black-medium-square",hexadecimal:"&#x25fc;"},{name:"white-medium-small-square",hexadecimal:"&#x25fd;"},{name:"black-medium-small-square",hexadecimal:"&#x25fe;"},{name:"black-large-square",hexadecimal:"&#x2b1b;"},{name:"white-large-square",hexadecimal:"&#x2b1c;"},{name:"large-orange-diamond",hexadecimal:"&#x1f536;"},{name:"large-blue-diamond",hexadecimal:"&#x1f537;"},{name:"small-orange-diamond",hexadecimal:"&#x1f538;"},{name:"small-blue-diamond",hexadecimal:"&#x1f539;"},{name:"up-pointing-red-triangle",hexadecimal:"&#x1f53a;"},{name:"down-pointing-red-triangle",hexadecimal:"&#x1f53b;"},{name:"diamond-shape-with-a-dot-inside",hexadecimal:"&#x1f4a0;"},{name:"radio-button",hexadecimal:"&#x1f518;"},{name:"black-square-button",hexadecimal:"&#x1f532;"},{name:"white-square-button",hexadecimal:"&#x1f533;"},{name:"medium-white-circle",hexadecimal:"&#x26aa;"},{name:"medium-black-circle",hexadecimal:"&#x26ab;"},{name:"large-red-circle",hexadecimal:"&#x1f534;"},{name:"large-blue-circle",hexadecimal:"&#x1f535;"},{name:"chequered-flag",hexadecimal:"&#x1f3c1;"},{name:"triangular-flag-on-post",hexadecimal:"&#x1f6a9;"},{name:"crossed-flags",hexadecimal:"&#x1f38c;"},{name:"waving-black-flag",hexadecimal:"&#x1f3f4;"},{name:"waving-white-flag",hexadecimal:"&#x1f3f3;"},{name:"ascension-island",hexadecimal:"&#x1f1e6;&#x1f1e8;"},{name:"andorra",hexadecimal:"&#x1f1e6;&#x1f1e9;"},{name:"united-arab-emirates",hexadecimal:"&#x1f1e6;&#x1f1ea;"},{name:"afghanistan",hexadecimal:"&#x1f1e6;&#x1f1eb;"},{name:"antigua-&-barbuda",hexadecimal:"&#x1f1e6;&#x1f1ec;"},{name:"anguilla",hexadecimal:"&#x1f1e6;&#x1f1ee;"},{name:"albania",hexadecimal:"&#x1f1e6;&#x1f1f1;"},{name:"armenia",hexadecimal:"&#x1f1e6;&#x1f1f2;"},{name:"angola",hexadecimal:"&#x1f1e6;&#x1f1f4;"},{name:"antarctica",hexadecimal:"&#x1f1e6;&#x1f1f6;"},{name:"argentina",hexadecimal:"&#x1f1e6;&#x1f1f7;"},{name:"american-samoa",hexadecimal:"&#x1f1e6;&#x1f1f8;"},{name:"austria",hexadecimal:"&#x1f1e6;&#x1f1f9;"},{name:"australia",hexadecimal:"&#x1f1e6;&#x1f1fa;"},{name:"aruba",hexadecimal:"&#x1f1e6;&#x1f1fc;"},{name:"ã…land-islands",hexadecimal:"&#x1f1e6;&#x1f1fd;"},{name:"azerbaijan",hexadecimal:"&#x1f1e6;&#x1f1ff;"},{name:"bosnia-&-herzegovina",hexadecimal:"&#x1f1e7;&#x1f1e6;"},{name:"barbados",hexadecimal:"&#x1f1e7;&#x1f1e7;"},{name:"bangladesh",hexadecimal:"&#x1f1e7;&#x1f1e9;"},{name:"belgium",hexadecimal:"&#x1f1e7;&#x1f1ea;"},{name:"burkina-faso",hexadecimal:"&#x1f1e7;&#x1f1eb;"},{name:"bulgaria",hexadecimal:"&#x1f1e7;&#x1f1ec;"},{name:"bahrain",hexadecimal:"&#x1f1e7;&#x1f1ed;"},{name:"burundi",hexadecimal:"&#x1f1e7;&#x1f1ee;"},{name:"benin",hexadecimal:"&#x1f1e7;&#x1f1ef;"},{name:"st.-barthã©lemy",hexadecimal:"&#x1f1e7;&#x1f1f1;"},{name:"bermuda",hexadecimal:"&#x1f1e7;&#x1f1f2;"},{name:"brunei",hexadecimal:"&#x1f1e7;&#x1f1f3;"},{name:"bolivia",hexadecimal:"&#x1f1e7;&#x1f1f4;"},{name:"caribbean-netherlands",hexadecimal:"&#x1f1e7;&#x1f1f6;"},{name:"brazil",hexadecimal:"&#x1f1e7;&#x1f1f7;"},{name:"bahamas",hexadecimal:"&#x1f1e7;&#x1f1f8;"},{name:"bhutan",hexadecimal:"&#x1f1e7;&#x1f1f9;"},{name:"bouvet-island",hexadecimal:"&#x1f1e7;&#x1f1fb;"},{name:"botswana",hexadecimal:"&#x1f1e7;&#x1f1fc;"},{name:"belarus",hexadecimal:"&#x1f1e7;&#x1f1fe;"},{name:"belize",hexadecimal:"&#x1f1e7;&#x1f1ff;"},{name:"canada",hexadecimal:"&#x1f1e8;&#x1f1e6;"},{name:"cocos-(keeling)-islands",hexadecimal:"&#x1f1e8;&#x1f1e8;"},{name:"congo-kinshasa",hexadecimal:"&#x1f1e8;&#x1f1e9;"},{name:"central-african-republic",hexadecimal:"&#x1f1e8;&#x1f1eb;"},{name:"congo-brazzaville",hexadecimal:"&#x1f1e8;&#x1f1ec;"},{name:"switzerland",hexadecimal:"&#x1f1e8;&#x1f1ed;"},{name:"cã´te-d’ivoire",hexadecimal:"&#x1f1e8;&#x1f1ee;"},{name:"cook-islands",hexadecimal:"&#x1f1e8;&#x1f1f0;"},{name:"chile",hexadecimal:"&#x1f1e8;&#x1f1f1;"},{name:"cameroon",hexadecimal:"&#x1f1e8;&#x1f1f2;"},{name:"china",hexadecimal:"&#x1f1e8;&#x1f1f3;"},{name:"colombia",hexadecimal:"&#x1f1e8;&#x1f1f4;"},{name:"clipperton-island",hexadecimal:"&#x1f1e8;&#x1f1f5;"},{name:"costa-rica",hexadecimal:"&#x1f1e8;&#x1f1f7;"},{name:"cuba",hexadecimal:"&#x1f1e8;&#x1f1fa;"},{name:"cape-verde",hexadecimal:"&#x1f1e8;&#x1f1fb;"},{name:"curaã§ao",hexadecimal:"&#x1f1e8;&#x1f1fc;"},{name:"christmas-island",hexadecimal:"&#x1f1e8;&#x1f1fd;"},{name:"cyprus",hexadecimal:"&#x1f1e8;&#x1f1fe;"},{name:"czech-republic",hexadecimal:"&#x1f1e8;&#x1f1ff;"},{name:"germany",hexadecimal:"&#x1f1e9;&#x1f1ea;"},{name:"diego-garcia",hexadecimal:"&#x1f1e9;&#x1f1ec;"},{name:"djibouti",hexadecimal:"&#x1f1e9;&#x1f1ef;"},{name:"denmark",hexadecimal:"&#x1f1e9;&#x1f1f0;"},{name:"dominica",hexadecimal:"&#x1f1e9;&#x1f1f2;"},{name:"dominican-republic",hexadecimal:"&#x1f1e9;&#x1f1f4;"},{name:"algeria",hexadecimal:"&#x1f1e9;&#x1f1ff;"},{name:"ceuta-&-melilla",hexadecimal:"&#x1f1ea;&#x1f1e6;"},{name:"ecuador",hexadecimal:"&#x1f1ea;&#x1f1e8;"},{name:"estonia",hexadecimal:"&#x1f1ea;&#x1f1ea;"},{name:"egypt",hexadecimal:"&#x1f1ea;&#x1f1ec;"},{name:"western-sahara",hexadecimal:"&#x1f1ea;&#x1f1ed;"},{name:"eritrea",hexadecimal:"&#x1f1ea;&#x1f1f7;"},{name:"spain",hexadecimal:"&#x1f1ea;&#x1f1f8;"},{name:"ethiopia",hexadecimal:"&#x1f1ea;&#x1f1f9;"},{name:"european-union",hexadecimal:"&#x1f1ea;&#x1f1fa;"},{name:"finland",hexadecimal:"&#x1f1eb;&#x1f1ee;"},{name:"fiji",hexadecimal:"&#x1f1eb;&#x1f1ef;"},{name:"falkland-islands",hexadecimal:"&#x1f1eb;&#x1f1f0;"},{name:"micronesia",hexadecimal:"&#x1f1eb;&#x1f1f2;"},{name:"faroe-islands",hexadecimal:"&#x1f1eb;&#x1f1f4;"},{name:"france",hexadecimal:"&#x1f1eb;&#x1f1f7;"},{name:"gabon",hexadecimal:"&#x1f1ec;&#x1f1e6;"},{name:"united-kingdom",hexadecimal:"&#x1f1ec;&#x1f1e7;"},{name:"grenada",hexadecimal:"&#x1f1ec;&#x1f1e9;"},{name:"georgia",hexadecimal:"&#x1f1ec;&#x1f1ea;"},{name:"french-guiana",hexadecimal:"&#x1f1ec;&#x1f1eb;"},{name:"guernsey",hexadecimal:"&#x1f1ec;&#x1f1ec;"},{name:"ghana",hexadecimal:"&#x1f1ec;&#x1f1ed;"},{name:"gibraltar",hexadecimal:"&#x1f1ec;&#x1f1ee;"},{name:"greenland",hexadecimal:"&#x1f1ec;&#x1f1f1;"},{name:"gambia",hexadecimal:"&#x1f1ec;&#x1f1f2;"},{name:"guinea",hexadecimal:"&#x1f1ec;&#x1f1f3;"},{name:"guadeloupe",hexadecimal:"&#x1f1ec;&#x1f1f5;"},{name:"equatorial-guinea",hexadecimal:"&#x1f1ec;&#x1f1f6;"},{name:"greece",hexadecimal:"&#x1f1ec;&#x1f1f7;"},{name:"south-georgia-&-south-sandwich-islands",hexadecimal:"&#x1f1ec;&#x1f1f8;"},{name:"guatemala",hexadecimal:"&#x1f1ec;&#x1f1f9;"},{name:"guam",hexadecimal:"&#x1f1ec;&#x1f1fa;"},{name:"guinea-bissau",hexadecimal:"&#x1f1ec;&#x1f1fc;"},{name:"guyana",hexadecimal:"&#x1f1ec;&#x1f1fe;"},{name:"hong-kong-sar-china",hexadecimal:"&#x1f1ed;&#x1f1f0;"},{name:"heard-&-mcdonald-islands",hexadecimal:"&#x1f1ed;&#x1f1f2;"},{name:"honduras",hexadecimal:"&#x1f1ed;&#x1f1f3;"},{name:"croatia",hexadecimal:"&#x1f1ed;&#x1f1f7;"},{name:"haiti",hexadecimal:"&#x1f1ed;&#x1f1f9;"},{name:"hungary",hexadecimal:"&#x1f1ed;&#x1f1fa;"},{name:"canary-islands",hexadecimal:"&#x1f1ee;&#x1f1e8;"},{name:"indonesia",hexadecimal:"&#x1f1ee;&#x1f1e9;"},{name:"ireland",hexadecimal:"&#x1f1ee;&#x1f1ea;"},{name:"israel",hexadecimal:"&#x1f1ee;&#x1f1f1;"},{name:"isle-of-man",hexadecimal:"&#x1f1ee;&#x1f1f2;"},{name:"india",hexadecimal:"&#x1f1ee;&#x1f1f3;"},{name:"british-indian-ocean-territory",hexadecimal:"&#x1f1ee;&#x1f1f4;"},{name:"iraq",hexadecimal:"&#x1f1ee;&#x1f1f6;"},{name:"iran",hexadecimal:"&#x1f1ee;&#x1f1f7;"},{name:"iceland",hexadecimal:"&#x1f1ee;&#x1f1f8;"},{name:"italy",hexadecimal:"&#x1f1ee;&#x1f1f9;"},{name:"jersey",hexadecimal:"&#x1f1ef;&#x1f1ea;"},{name:"jamaica",hexadecimal:"&#x1f1ef;&#x1f1f2;"},{name:"jordan",hexadecimal:"&#x1f1ef;&#x1f1f4;"},{name:"japan",hexadecimal:"&#x1f1ef;&#x1f1f5;"},{name:"kenya",hexadecimal:"&#x1f1f0;&#x1f1ea;"},{name:"kyrgyzstan",hexadecimal:"&#x1f1f0;&#x1f1ec;"},{name:"cambodia",hexadecimal:"&#x1f1f0;&#x1f1ed;"},{name:"kiribati",hexadecimal:"&#x1f1f0;&#x1f1ee;"},{name:"comoros",hexadecimal:"&#x1f1f0;&#x1f1f2;"},{name:"st.-kitts-&-nevis",hexadecimal:"&#x1f1f0;&#x1f1f3;"},{name:"north-korea",hexadecimal:"&#x1f1f0;&#x1f1f5;"},{name:"south-korea",hexadecimal:"&#x1f1f0;&#x1f1f7;"},{name:"kuwait",hexadecimal:"&#x1f1f0;&#x1f1fc;"},{name:"cayman-islands",hexadecimal:"&#x1f1f0;&#x1f1fe;"},{name:"kazakhstan",hexadecimal:"&#x1f1f0;&#x1f1ff;"},{name:"laos",hexadecimal:"&#x1f1f1;&#x1f1e6;"},{name:"lebanon",hexadecimal:"&#x1f1f1;&#x1f1e7;"},{name:"st.-lucia",hexadecimal:"&#x1f1f1;&#x1f1e8;"},{name:"liechtenstein",hexadecimal:"&#x1f1f1;&#x1f1ee;"},{name:"sri-lanka",hexadecimal:"&#x1f1f1;&#x1f1f0;"},{name:"liberia",hexadecimal:"&#x1f1f1;&#x1f1f7;"},{name:"lesotho",hexadecimal:"&#x1f1f1;&#x1f1f8;"},{name:"lithuania",hexadecimal:"&#x1f1f1;&#x1f1f9;"},{name:"luxembourg",hexadecimal:"&#x1f1f1;&#x1f1fa;"},{name:"latvia",hexadecimal:"&#x1f1f1;&#x1f1fb;"},{name:"libya",hexadecimal:"&#x1f1f1;&#x1f1fe;"},{name:"morocco",hexadecimal:"&#x1f1f2;&#x1f1e6;"},{name:"monaco",hexadecimal:"&#x1f1f2;&#x1f1e8;"},{name:"moldova",hexadecimal:"&#x1f1f2;&#x1f1e9;"},{name:"montenegro",hexadecimal:"&#x1f1f2;&#x1f1ea;"},{name:"st.-martin",hexadecimal:"&#x1f1f2;&#x1f1eb;"},{name:"madagascar",hexadecimal:"&#x1f1f2;&#x1f1ec;"},{name:"marshall-islands",hexadecimal:"&#x1f1f2;&#x1f1ed;"},{name:"macedonia",hexadecimal:"&#x1f1f2;&#x1f1f0;"},{name:"mali",hexadecimal:"&#x1f1f2;&#x1f1f1;"},{name:"myanmar-(burma)",hexadecimal:"&#x1f1f2;&#x1f1f2;"},{name:"mongolia",hexadecimal:"&#x1f1f2;&#x1f1f3;"},{name:"macau-sar-china",hexadecimal:"&#x1f1f2;&#x1f1f4;"},{name:"northern-mariana-islands",hexadecimal:"&#x1f1f2;&#x1f1f5;"},{name:"martinique",hexadecimal:"&#x1f1f2;&#x1f1f6;"},{name:"mauritania",hexadecimal:"&#x1f1f2;&#x1f1f7;"},{name:"montserrat",hexadecimal:"&#x1f1f2;&#x1f1f8;"},{name:"malta",hexadecimal:"&#x1f1f2;&#x1f1f9;"},{name:"mauritius",hexadecimal:"&#x1f1f2;&#x1f1fa;"},{name:"maldives",hexadecimal:"&#x1f1f2;&#x1f1fb;"},{name:"malawi",hexadecimal:"&#x1f1f2;&#x1f1fc;"},{name:"mexico",hexadecimal:"&#x1f1f2;&#x1f1fd;"},{name:"malaysia",hexadecimal:"&#x1f1f2;&#x1f1fe;"},{name:"mozambique",hexadecimal:"&#x1f1f2;&#x1f1ff;"},{name:"namibia",hexadecimal:"&#x1f1f3;&#x1f1e6;"},{name:"new-caledonia",hexadecimal:"&#x1f1f3;&#x1f1e8;"},{name:"niger",hexadecimal:"&#x1f1f3;&#x1f1ea;"},{name:"norfolk-island",hexadecimal:"&#x1f1f3;&#x1f1eb;"},{name:"nigeria",hexadecimal:"&#x1f1f3;&#x1f1ec;"},{name:"nicaragua",hexadecimal:"&#x1f1f3;&#x1f1ee;"},{name:"netherlands",hexadecimal:"&#x1f1f3;&#x1f1f1;"},{name:"norway",hexadecimal:"&#x1f1f3;&#x1f1f4;"},{name:"nepal",hexadecimal:"&#x1f1f3;&#x1f1f5;"},{name:"nauru",hexadecimal:"&#x1f1f3;&#x1f1f7;"},{name:"niue",hexadecimal:"&#x1f1f3;&#x1f1fa;"},{name:"new-zealand",hexadecimal:"&#x1f1f3;&#x1f1ff;"},{name:"oman",hexadecimal:"&#x1f1f4;&#x1f1f2;"},{name:"panama",hexadecimal:"&#x1f1f5;&#x1f1e6;"},{name:"peru",hexadecimal:"&#x1f1f5;&#x1f1ea;"},{name:"french-polynesia",hexadecimal:"&#x1f1f5;&#x1f1eb;"},{name:"papua-new-guinea",hexadecimal:"&#x1f1f5;&#x1f1ec;"},{name:"philippines",hexadecimal:"&#x1f1f5;&#x1f1ed;"},{name:"pakistan",hexadecimal:"&#x1f1f5;&#x1f1f0;"},{name:"poland",hexadecimal:"&#x1f1f5;&#x1f1f1;"},{name:"st.-pierre-&-miquelon",hexadecimal:"&#x1f1f5;&#x1f1f2;"},{name:"pitcairn-islands",hexadecimal:"&#x1f1f5;&#x1f1f3;"},{name:"puerto-rico",hexadecimal:"&#x1f1f5;&#x1f1f7;"},{name:"palestinian-territories",hexadecimal:"&#x1f1f5;&#x1f1f8;"},{name:"portugal",hexadecimal:"&#x1f1f5;&#x1f1f9;"},{name:"palau",hexadecimal:"&#x1f1f5;&#x1f1fc;"},{name:"paraguay",hexadecimal:"&#x1f1f5;&#x1f1fe;"},{name:"qatar",hexadecimal:"&#x1f1f6;&#x1f1e6;"},{name:"rã©union",hexadecimal:"&#x1f1f7;&#x1f1ea;"},{name:"romania",hexadecimal:"&#x1f1f7;&#x1f1f4;"},{name:"serbia",hexadecimal:"&#x1f1f7;&#x1f1f8;"},{name:"russia",hexadecimal:"&#x1f1f7;&#x1f1fa;"},{name:"rwanda",hexadecimal:"&#x1f1f7;&#x1f1fc;"},{name:"saudi-arabia",hexadecimal:"&#x1f1f8;&#x1f1e6;"},{name:"solomon-islands",hexadecimal:"&#x1f1f8;&#x1f1e7;"},{name:"seychelles",hexadecimal:"&#x1f1f8;&#x1f1e8;"},{name:"sudan",hexadecimal:"&#x1f1f8;&#x1f1e9;"},{name:"sweden",hexadecimal:"&#x1f1f8;&#x1f1ea;"},{name:"singapore",hexadecimal:"&#x1f1f8;&#x1f1ec;"},{name:"st.-helena",hexadecimal:"&#x1f1f8;&#x1f1ed;"},{name:"slovenia",hexadecimal:"&#x1f1f8;&#x1f1ee;"},{name:"svalbard-&-jan-mayen",hexadecimal:"&#x1f1f8;&#x1f1ef;"},{name:"slovakia",hexadecimal:"&#x1f1f8;&#x1f1f0;"},{name:"sierra-leone",hexadecimal:"&#x1f1f8;&#x1f1f1;"},{name:"san-marino",hexadecimal:"&#x1f1f8;&#x1f1f2;"},{name:"senegal",hexadecimal:"&#x1f1f8;&#x1f1f3;"},{name:"somalia",hexadecimal:"&#x1f1f8;&#x1f1f4;"},{name:"suriname",hexadecimal:"&#x1f1f8;&#x1f1f7;"},{name:"south-sudan",hexadecimal:"&#x1f1f8;&#x1f1f8;"},{name:"sã£o-tomã©-&-prã­ncipe",hexadecimal:"&#x1f1f8;&#x1f1f9;"},{name:"el-salvador",hexadecimal:"&#x1f1f8;&#x1f1fb;"},{name:"sint-maarten",hexadecimal:"&#x1f1f8;&#x1f1fd;"},{name:"syria",hexadecimal:"&#x1f1f8;&#x1f1fe;"},{name:"swaziland",hexadecimal:"&#x1f1f8;&#x1f1ff;"},{name:"tristan-da-cunha",hexadecimal:"&#x1f1f9;&#x1f1e6;"},{name:"turks-&-caicos-islands",hexadecimal:"&#x1f1f9;&#x1f1e8;"},{name:"chad",hexadecimal:"&#x1f1f9;&#x1f1e9;"},{name:"french-southern-territories",hexadecimal:"&#x1f1f9;&#x1f1eb;"},{name:"togo",hexadecimal:"&#x1f1f9;&#x1f1ec;"},{name:"thailand",hexadecimal:"&#x1f1f9;&#x1f1ed;"},{name:"tajikistan",hexadecimal:"&#x1f1f9;&#x1f1ef;"},{name:"tokelau",hexadecimal:"&#x1f1f9;&#x1f1f0;"},{name:"timor-leste",hexadecimal:"&#x1f1f9;&#x1f1f1;"},{name:"turkmenistan",hexadecimal:"&#x1f1f9;&#x1f1f2;"},{name:"tunisia",hexadecimal:"&#x1f1f9;&#x1f1f3;"},{name:"tonga",hexadecimal:"&#x1f1f9;&#x1f1f4;"},{name:"turkey",hexadecimal:"&#x1f1f9;&#x1f1f7;"},{name:"trinidad-&-tobago",hexadecimal:"&#x1f1f9;&#x1f1f9;"},{name:"tuvalu",hexadecimal:"&#x1f1f9;&#x1f1fb;"},{name:"taiwan",hexadecimal:"&#x1f1f9;&#x1f1fc;"},{name:"tanzania",hexadecimal:"&#x1f1f9;&#x1f1ff;"},{name:"ukraine",hexadecimal:"&#x1f1fa;&#x1f1e6;"},{name:"uganda",hexadecimal:"&#x1f1fa;&#x1f1ec;"},{name:"u.s.-outlying-islands",hexadecimal:"&#x1f1fa;&#x1f1f2;"},{name:"united-states",hexadecimal:"&#x1f1fa;&#x1f1f8;"},{name:"uruguay",hexadecimal:"&#x1f1fa;&#x1f1fe;"},{name:"uzbekistan",hexadecimal:"&#x1f1fa;&#x1f1ff;"},{name:"vatican-city",hexadecimal:"&#x1f1fb;&#x1f1e6;"},{name:"st.-vincent-&-grenadines",hexadecimal:"&#x1f1fb;&#x1f1e8;"},{name:"venezuela",hexadecimal:"&#x1f1fb;&#x1f1ea;"},{name:"british-virgin-islands",hexadecimal:"&#x1f1fb;&#x1f1ec;"},{name:"u.s.-virgin-islands",hexadecimal:"&#x1f1fb;&#x1f1ee;"},{name:"vietnam",hexadecimal:"&#x1f1fb;&#x1f1f3;"},{name:"vanuatu",hexadecimal:"&#x1f1fb;&#x1f1fa;"},{name:"wallis-&-futuna",hexadecimal:"&#x1f1fc;&#x1f1eb;"},{name:"samoa",hexadecimal:"&#x1f1fc;&#x1f1f8;"},{name:"kosovo",hexadecimal:"&#x1f1fd;&#x1f1f0;"},{name:"yemen",hexadecimal:"&#x1f1fe;&#x1f1ea;"},{name:"mayotte",hexadecimal:"&#x1f1fe;&#x1f1f9;"},{name:"south-africa",hexadecimal:"&#x1f1ff;&#x1f1e6;"},{name:"zambia",hexadecimal:"&#x1f1ff;&#x1f1f2;"},{name:"zimbabwe",hexadecimal:"&#x1f1ff;&#x1f1fc;"}],Ra=({emojis:a,onSelect:s,onClose:r})=>{const[t,n]=j.useState({start:0,end:80}),l=8,i=40,p=400,f=j.useCallback(o=>{const k=o.currentTarget.scrollTop,E=Math.floor(k/i),y=Math.min(E+Math.ceil(p/i)+2,Math.ceil(a.length/l));n({start:E*l,end:y*l})},[a.length,i,p,l]),m=j.useCallback(o=>{const k=o.match(/&#x([0-9A-Fa-f]+);/g);if(!k)return"";const E=k.map(y=>{const g=y.replace(/&#x|;/g,"");return parseInt(g,16)});return String.fromCodePoint(...E)},[]),w=Math.ceil(a.length/l)*i,U=a.slice(t.start,t.end);return e.jsx("div",{className:"rsp-h-[400px] rsp-overflow-y-auto rsp-relative",onScroll:f,children:e.jsx("div",{style:{height:w},className:"rsp-relative",children:e.jsx("div",{className:"rsp-absolute rsp-w-full rsp-grid rsp-grid-cols-8 rsp-gap-1",style:{top:Math.floor(t.start/l)*i,transform:"translateY(0px)"},children:U.map((o,k)=>{const E=t.start+k;return e.jsx("button",{onClick:()=>{s(m(o.hexadecimal))},className:"rsp-w-10 rsp-h-10 rsp-flex rsp-items-center rsp-justify-center rsp-text-xl hover:rsp-bg-gray-100 rsp-rounded rsp-transition-colors",title:o.name,style:{height:i},children:m(o.hexadecimal)},E)})})})})};function Ee({isOpen:a,onClose:s,onSelect:r}){const[t,n]=j.useState(""),l=j.useMemo(()=>t?Ae.filter(i=>i.name.toLowerCase().includes(t.toLowerCase())):Ae,[t]);return j.useEffect(()=>{a||n("")},[a]),e.jsx(me,{isOpen:a,onClose:s,title:"Select Emoji",children:e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:"text",placeholder:"Search emojis...",value:t,onChange:i=>n(i.target.value),className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500"}),t&&e.jsx("button",{onClick:()=>n(""),className:"rsp-absolute rsp-right-2 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-gray-400 hover:rsp-text-gray-600",children:"×"})]}),e.jsx("div",{className:"rsp-flex rsp-gap-2 rsp-flex-wrap",children:["😀","🎉","❤️","👍","🔥","💯","✨","🎯"].map(i=>e.jsx("button",{onClick:()=>{r(i)},className:"rsp-w-8 rsp-h-8 rsp-flex rsp-items-center rsp-justify-center rsp-text-lg hover:rsp-bg-gray-100 rsp-rounded rsp-transition-colors",children:i},i))}),e.jsxs("div",{className:"rsp-text-sm rsp-text-gray-500",children:[l.length," emojis found"]}),e.jsx(Ra,{emojis:l,onSelect:r,onClose:s})]})})}const de=(a,s,r)=>{if(!a)return{newText:s,cursorPosition:s.length};const t=a.selectionStart||0,n=a.selectionEnd||0,l=s.substring(t,n);let i=s.substring(0,t),p=s.substring(n),f,m;return l?r==="bold"?(f=`${i}*${l}*${p}`,m=t+l.length+2):(f=`${i}_${l}_${p}`,m=t+l.length+2):r==="bold"?(f=`${i}**${p}`,m=t+1):(f=`${i}__${p}`,m=t+1),{newText:f,cursorPosition:m}};function Ba({template:a,setTemplate:s}){const[r,t]=j.useState(!1),[n,l]=j.useState(null),[i,p]=j.useState(null),[f,m]=j.useState(null),[w,U]=j.useState(!1),o=()=>{const x=(a.body||"").match(/{{\d+}}/g);if(!x)return 0;const h=x.map(u=>{const v=u.match(/{{(\d+)}}/);return v?parseInt(v[1],10):0});return h.length>0?Math.max(...h):0},k=()=>{const h=`{{${o()+1}}}`;if(i&&a.body.length+h.length<=1024){const u=i.selectionStart||a.body.length,v=a.body.substring(0,u),L=a.body.substring(u),V=v+h+L;s({...a,body:V}),setTimeout(()=>{if(i){const b=u+h.length;i.setSelectionRange(b,b),i.focus()}},0)}},E=()=>{l("body"),t(!0),setTimeout(()=>{i&&i.focus()},0)},y=g=>{if(n==="body"){if(!i)return;const x=i.selectionStart||a.body.length,h=1024,u=a.body;if(u.length+g.length<=h){const v=u.substring(0,x),L=u.substring(x),V=v+g+L;s({...a,body:V}),setTimeout(()=>{if(i){const b=x+g.length;i.setSelectionRange(b,b),i.focus()}},0)}}else if(n==="footer"){if(!f)return;const x=f.selectionStart||a.footer.length,h=60,u=a.footer;if(u.length+g.length<=h){const v=u.substring(0,x),L=u.substring(x),V=v+g+L;s({...a,footer:V}),setTimeout(()=>{if(f){const b=x+g.length;f.setSelectionRange(b,b),f.focus()}},0)}}};return e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Body"}),e.jsx("div",{className:"rsp-relative",children:e.jsx("textarea",{ref:p,value:a.body,onChange:g=>s({...a,body:g.target.value}),maxLength:1024,rows:6,className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white rsp-resize-none rsp-shadow-sm",placeholder:"Enter the text for your message",onFocus:()=>l("body"),onBlur:()=>U(!0)})}),!a.body&&w&&e.jsx("p",{className:"rsp-text-xs rsp-text-red-600 rsp-mt-1",children:"Body is required."}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mt-2",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("button",{onClick:k,className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Add Variable",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsx("button",{onClick:E,className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Add emoji",children:e.jsx(ke,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("button",{onClick:()=>{if(!i)return;const{newText:g,cursorPosition:x}=de(i,a.body,"bold");s({...a,body:g}),requestAnimationFrame(()=>{setTimeout(()=>{i&&(i.setSelectionRange(x,x),i.focus())},0)})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Bold text (*text*)",children:e.jsxs("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z"})]})}),e.jsx("button",{onClick:()=>{if(!i)return;const{newText:g,cursorPosition:x}=de(i,a.body,"italic");s({...a,body:g}),requestAnimationFrame(()=>{setTimeout(()=>{i&&(i.setSelectionRange(x,x),i.focus())},0)})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Italic text (_text_)",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 4h4M8 20h4M12 4l-2 16"})})})]}),e.jsx("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-500",children:[a.body.length,"/1024 (1 WhatsAppAudience)"]})})]}),(()=>{const g=a.body.match(/\{\{(\d+)\}\}/g)||[],x=[...new Set(g.map(h=>h.replace(/[{}]/g,"")))];return x.length===0?null:e.jsxs("div",{className:"rsp-mt-3",children:[e.jsx("p",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-2",children:"Sample Values"}),e.jsx("div",{className:"rsp-grid rsp-grid-cols-3 rsp-gap-2",children:x.map(h=>{var u,v;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("label",{className:"rsp-text-xs rsp-text-gray-500 rsp-whitespace-nowrap",children:["{{",h,"}}",":"]}),e.jsx("input",{type:"text",value:((v=(u=a.sampleContent)==null?void 0:u.bodyVariables)==null?void 0:v[h])||"",onChange:L=>{var b,N,M;const V={...a.sampleContent,bodyVariables:{...(b=a.sampleContent)==null?void 0:b.bodyVariables,[h]:L.target.value},headerVariables:((N=a.sampleContent)==null?void 0:N.headerVariables)||{},buttonVariables:((M=a.sampleContent)==null?void 0:M.buttonVariables)||{}};s({...a,sampleContent:V})},className:"rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500",placeholder:"Sample"}),e.jsx("button",{type:"button",onClick:()=>{var N,M,B;const L=new RegExp(`\\{\\{${h}\\}\\}`,"g"),V=(a.body||"").replace(L,""),b=Object.fromEntries(Object.entries(((N=a.sampleContent)==null?void 0:N.bodyVariables)||{}).filter(([P])=>P!==h));s({...a,body:V,sampleContent:{...a.sampleContent,bodyVariables:b,headerVariables:((M=a.sampleContent)==null?void 0:M.headerVariables)||{},buttonVariables:((B=a.sampleContent)==null?void 0:B.buttonVariables)||{}}})},className:"rsp-px-2 rsp-py-1 rsp-text-xs rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`body-sample-${h}`)})})]})})()]}),e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Footer (optional)"}),e.jsx("div",{className:"rsp-relative",children:e.jsx("input",{ref:m,type:"text",value:a.footer,onChange:g=>s({...a,footer:g.target.value}),maxLength:60,className:"rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",placeholder:"Footer Text",onFocus:()=>l("footer")})}),e.jsxs("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:[a.footer.length,"/60 characters"]})]}),e.jsx(Ee,{isOpen:r,onClose:()=>t(!1),onSelect:y})]})}function Oa({template:a,setTemplate:s}){var g;const[r,t]=j.useState(null),[n,l]=j.useState(!1),[i,p]=j.useState({text:"",value:"",urlType:"static"}),m={quickReply:a.buttons.filter(x=>x.type==="QUICK_REPLY").length,url:a.buttons.filter(x=>x.type==="URL").length,call:a.buttons.filter(x=>x.type==="CALL").length,flow:a.buttons.filter(x=>x.type==="FLOW").length},w=()=>{p({text:"",value:"",urlType:"static"}),t(null),l(!1)},U=x=>{if(!i.text.trim())return;let h=x==="QUICK_REPLY"?i.text:i.value;x==="CALL"&&h&&!h.startsWith("+")&&(h="+"+h);const u={id:Math.random().toString(36).substr(2,9),type:x,text:i.text,value:h,urlType:x==="URL"?i.urlType:void 0};s({...a,buttons:[...a.buttons,u]}),w()},o=x=>{s({...a,buttons:a.buttons.filter(h=>h.id!==x)})},k=(x,h,u)=>{const v=a.buttons.find(b=>b.id===x),L=h==="text"?25:h==="value"&&(v==null?void 0:v.type)==="URL"?2e3:20;let V=u.slice(0,L);h==="value"&&(v==null?void 0:v.type)==="CALL"&&V&&!V.startsWith("+")&&(V="+"+V),s({...a,buttons:a.buttons.map(b=>b.id===x?{...b,[h]:V}:b)})},E=()=>{const h=[...a.buttons.filter(v=>v.type==="URL"&&v.urlType==="dynamic").map(v=>v.value||""),i.value].join(" ").match(/{{\d+}}/g);if(!h)return 0;const u=h.map(v=>{const L=v.match(/{{(\d+)}}/);return L?parseInt(L[1],10):0});return u.length>0?Math.max(...u):0},y=[{type:"QUICK_REPLY",icon:he,label:"Quick Reply",description:"Add quick response options",limit:10,current:m.quickReply,color:"blue"},{type:"URL",icon:Ge,label:"Web URL",description:"Link to websites or pages",limit:2,current:m.url,color:"green"},{type:"CALL",icon:Ie,label:"Call Button",description:"Add phone number to call",limit:1,current:m.call,color:"purple"}];return e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Interactive Buttons"}),e.jsx("p",{className:"rsp-text-sm rsp-text-gray-500 rsp-mt-1",children:"Add buttons to make your message interactive"})]}),e.jsx("div",{className:"rsp-text-sm rsp-text-gray-500"})]}),e.jsx("div",{className:"rsp-bg-blue-50 rsp-border-l-4 rsp-border-blue-500 rsp-p-4 rsp-rounded-r-md",children:e.jsxs("div",{className:"rsp-flex",children:[e.jsx("div",{className:"rsp-flex-shrink-0",children:e.jsx("svg",{className:"rsp-h-5 rsp-w-5 rsp-text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),e.jsx("div",{className:"rsp-ml-3",children:e.jsx("p",{className:"rsp-text-sm rsp-text-blue-700",children:"We recommend adding the marketing opt-out button. This can help reduce blocks from customers and increase your quality rating."})})]})}),!r&&e.jsx("div",{className:"rsp-grid rsp-grid-cols-1 md:rsp-grid-cols-2 rsp-gap-4",children:y.map(x=>{const h=x.icon,u=x.current>=x.limit;return e.jsxs("button",{onClick:()=>!u&&t(x.type),disabled:u,className:`rsp-group rsp-p-5 rsp-border-2 rsp-rounded-xl rsp-text-left rsp-transition-all rsp-duration-200 rsp-relative rsp-overflow-hidden ${u?"rsp-border-gray-200 rsp-bg-gray-50 rsp-text-gray-400 rsp-cursor-not-allowed rsp-opacity-60":"rsp-cursor-pointer rsp-border-gray-200 rsp-bg-white hover:rsp-border-blue-400 hover:rsp-shadow-lg hover:rsp-shadow-blue-100/50 rsp-shadow-sm"}`,children:[!u&&e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-gradient-to-br rsp-from-blue-50/0 rsp-via-blue-50/0 rsp-to-blue-50/0 group-hover:rsp-from-blue-50/30 group-hover:rsp-via-blue-50/20 group-hover:rsp-to-blue-50/10 rsp-transition-all rsp-duration-200"}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-start rsp-justify-between",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-4",children:[e.jsx("div",{className:`rsp-p-3 rsp-rounded-xl rsp-transition-all rsp-duration-200 ${u?"rsp-bg-gray-200":"rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-blue-100 group-hover:rsp-from-blue-100 group-hover:rsp-to-blue-200 rsp-shadow-sm"}`,children:e.jsx(h,{className:`rsp-w-5 rsp-h-5 rsp-transition-colors ${u?"rsp-text-gray-400":"rsp-text-blue-600"}`})}),e.jsxs("div",{children:[e.jsx("h4",{className:`rsp-font-semibold rsp-text-sm rsp-mb-1 ${u?"rsp-text-gray-400":"rsp-text-gray-900"}`,children:x.label}),e.jsx("p",{className:`rsp-text-xs rsp-mt-1 ${u?"rsp-text-gray-400":"rsp-text-gray-600"}`,children:x.description})]})]}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("span",{className:`rsp-text-xs rsp-font-semibold rsp-px-2.5 rsp-py-1 rsp-rounded-full rsp-transition-colors ${u?"rsp-bg-gray-200 rsp-text-gray-500":"rsp-bg-blue-100 rsp-text-blue-700 group-hover:rsp-bg-blue-200"}`,children:[x.current,"/",x.limit]}),!u&&e.jsx("div",{className:"rsp-p-1.5 rsp-rounded-lg rsp-bg-blue-100 group-hover:rsp-bg-blue-200 rsp-transition-colors",children:e.jsx(je,{className:"rsp-w-4 rsp-h-4 rsp-text-blue-600"})})]})]})]},x.type)})}),r&&e.jsxs("div",{className:"rsp-bg-white rsp-border-2 rsp-border-blue-200 rsp-rounded-xl rsp-p-6 rsp-shadow-lg rsp-shadow-blue-100/50",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mb-6",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900 rsp-mb-1",children:["Add ",(g=y.find(x=>x.type===r))==null?void 0:g.label]}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500",children:"Fill in the details below to add a new button"})]}),e.jsx("button",{onClick:w,className:"rsp-p-2 rsp-text-gray-400 hover:rsp-text-gray-600 hover:rsp-bg-gray-100 rsp-rounded-lg rsp-transition-colors",children:e.jsx(ne,{className:"rsp-w-5 rsp-h-5"})})]}),e.jsxs("div",{className:"rsp-space-y-5",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-block rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-2",children:["Button Text ",e.jsx("span",{className:"rsp-text-red-500",children:"*"})]}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:"text",value:i.text,onChange:x=>p({...i,text:x.target.value.slice(0,25)}),className:"rsp-w-full rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-bg-white rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-shadow-sm rsp-transition-all",placeholder:"Enter button text (max 25 characters)",maxLength:25}),e.jsxs("span",{className:"rsp-absolute rsp-right-3 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-xs rsp-font-medium rsp-text-gray-400 rsp-bg-white rsp-px-1.5",children:[i.text.length,"/25"]})]})]}),r!=="QUICK_REPLY"&&e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-block rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-2",children:[r==="URL"?"Website URL":r==="CALL"?"Phone Number":"Flow ID"," ",e.jsx("span",{className:"rsp-text-red-500",children:"*"})]}),r==="URL"&&e.jsxs("div",{className:"rsp-mb-4",children:[e.jsxs("div",{className:"rsp-flex rsp-gap-4 rsp-p-3 rsp-bg-gray-50 rsp-rounded-lg rsp-border rsp-border-gray-200",children:[e.jsxs("label",{className:"rsp-flex rsp-items-center rsp-cursor-pointer rsp-group",children:[e.jsx("input",{type:"radio",checked:i.urlType==="static",onChange:()=>p({...i,urlType:"static"}),className:"rsp-mr-2 rsp-w-4 rsp-h-4 rsp-text-blue-600 rsp-border-gray-300 focus:rsp-ring-2 focus:rsp-ring-blue-500"}),e.jsx("span",{className:"rsp-text-sm rsp-font-medium rsp-text-gray-700 group-hover:rsp-text-gray-900",children:"Static URL"})]}),e.jsxs("label",{className:"rsp-flex rsp-items-center rsp-cursor-pointer rsp-group",children:[e.jsx("input",{type:"radio",checked:i.urlType==="dynamic",onChange:()=>p({...i,urlType:"dynamic"}),className:"rsp-mr-2 rsp-w-4 rsp-h-4 rsp-text-blue-600 rsp-border-gray-300 focus:rsp-ring-2 focus:rsp-ring-blue-500"}),e.jsx("span",{className:"rsp-text-sm rsp-font-medium rsp-text-gray-700 group-hover:rsp-text-gray-900",children:"Dynamic URL"})]})]}),i.urlType==="dynamic"&&e.jsxs("div",{className:"rsp-mt-3 rsp-p-4 rsp-bg-blue-50 rsp-rounded-lg rsp-border-2 rsp-border-blue-200",children:[e.jsxs("h4",{className:"rsp-text-sm rsp-font-semibold rsp-text-blue-900 rsp-mb-2 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Dynamic URL Guidelines"]}),e.jsxs("ul",{className:"rsp-text-xs rsp-text-blue-800 rsp-space-y-1.5 rsp-list-disc rsp-list-inside",children:[e.jsxs("li",{children:["Use placeholders like: ",e.jsx("code",{className:"rsp-bg-blue-100 rsp-px-1 rsp-rounded",children:"https://example.com/order/{{1}}"})]}),e.jsx("li",{children:"Maximum 1 placeholder per URL ({{1}})"}),e.jsx("li",{children:"Only HTTPS URLs are allowed"}),e.jsx("li",{children:"WhatsApp verifies only the domain"})]})]})]}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:r==="CALL"?"tel":r==="URL"?"url":"text",value:i.value,onChange:x=>{const h=r==="URL"?2e3:20;p({...i,value:x.target.value.slice(0,h)})},className:"rsp-w-full rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-bg-white rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-shadow-sm rsp-transition-all",placeholder:r==="URL"?i.urlType==="dynamic"?"https://example.com/order/{{1}}":"https://example.com":r==="CALL"?"+1234567890":"Flow ID",maxLength:r==="URL"?2e3:20}),e.jsxs("span",{className:"rsp-absolute rsp-right-3 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-xs rsp-font-medium rsp-text-gray-400 rsp-bg-white rsp-px-1.5",children:[i.value.length,"/",r==="URL"?2e3:20]})]}),r==="URL"&&i.urlType==="dynamic"&&e.jsxs("div",{className:"rsp-mt-3",children:[e.jsx("div",{className:"rsp-flex rsp-items-center rsp-gap-2 rsp-mb-2",children:e.jsxs("button",{type:"button",onClick:()=>{if((i.value.match(/\{\{(\d+)\}\}/g)||[]).length>=1)return;const u=E()+1,v=i.value+`{{${u}}}`;p({...i,value:v}),l(!0)},disabled:(i.value.match(/\{\{(\d+)\}\}/g)||[]).length>=1,className:"rsp-px-4 rsp-py-2 rsp-text-xs rsp-font-semibold rsp-bg-blue-100 hover:rsp-bg-blue-200 rsp-rounded-lg rsp-text-blue-700 disabled:rsp-bg-gray-200 disabled:rsp-text-gray-500 disabled:rsp-cursor-not-allowed rsp-transition-all rsp-shadow-sm hover:rsp-shadow-md rsp-flex rsp-items-center rsp-gap-1.5",children:[e.jsx("svg",{className:"rsp-w-3.5 rsp-h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add Variable"]})}),(i.value.match(/\{\{(\d+)\}\}/g)||[]).length>=1&&e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:"Maximum 1 variable allowed."}),n&&e.jsxs("div",{className:"rsp-mt-4 rsp-p-5 rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-indigo-50 rsp-rounded-xl rsp-border-2 rsp-border-blue-200 rsp-shadow-sm",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mb-4",children:[e.jsxs("h4",{className:"rsp-text-sm rsp-font-semibold rsp-text-blue-900 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),"Sample Values for URL Variables"]}),e.jsx("button",{type:"button",onClick:()=>l(!1),className:"rsp-p-1 rsp-text-blue-600 hover:rsp-text-blue-800 hover:rsp-bg-blue-100 rsp-rounded-lg rsp-transition-colors",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}),e.jsx("div",{className:"rsp-space-y-3",children:(()=>{const x=i.value.match(/\{\{(\d+)\}\}/g)||[];return[...new Set(x.map(u=>u.replace(/[{}]/g,"")))].map(u=>{var v,L;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-3",children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-blue-800 rsp-whitespace-nowrap rsp-bg-blue-100 rsp-px-3 rsp-py-2 rsp-rounded-lg rsp-min-w-[100px]",children:["{{",u,"}}"]}),e.jsx("input",{type:"text",value:((L=(v=a.sampleContent)==null?void 0:v.buttonVariables)==null?void 0:L[u])||"",onChange:V=>{var N,M,B;const b={...a.sampleContent,headerVariables:((N=a.sampleContent)==null?void 0:N.headerVariables)||{},bodyVariables:((M=a.sampleContent)==null?void 0:M.bodyVariables)||{},buttonVariables:{...(B=a.sampleContent)==null?void 0:B.buttonVariables,[u]:V.target.value}};s({...a,sampleContent:b})},className:"rsp-flex-1 rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-blue-200 rsp-rounded-lg rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-bg-white rsp-shadow-sm rsp-transition-all",placeholder:`Sample value (e.g., ${u==="1"?"order123":"user456"})`}),e.jsx("button",{type:"button",onClick:()=>{var M,B,P;const V=new RegExp(`\\{\\{${u}\\}\\}`,"g"),b=(i.value||"").replace(V,"");p({...i,value:b});const N=Object.fromEntries(Object.entries(((M=a.sampleContent)==null?void 0:M.buttonVariables)||{}).filter(([G])=>G!==u));s({...a,sampleContent:{...a.sampleContent,headerVariables:((B=a.sampleContent)==null?void 0:B.headerVariables)||{},bodyVariables:((P=a.sampleContent)==null?void 0:P.bodyVariables)||{},buttonVariables:N}})},className:"rsp-p-2 rsp-text-red-600 hover:rsp-text-red-700 hover:rsp-bg-red-50 rsp-rounded-lg rsp-transition-all rsp-border-2 rsp-border-red-200 hover:rsp-border-red-300",title:"Remove this variable",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]},`sample-${u}`)})})()}),e.jsxs("div",{className:"rsp-mt-4 rsp-p-4 rsp-bg-white rsp-rounded-lg rsp-border-2 rsp-border-blue-200 rsp-shadow-sm",children:[e.jsxs("p",{className:"rsp-text-xs rsp-font-semibold rsp-text-gray-700 rsp-mb-2 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),"Preview URL"]}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-700 rsp-font-mono rsp-break-all rsp-bg-gray-50 rsp-p-2 rsp-rounded rsp-border rsp-border-gray-200",children:i.value.replace(/\{\{(\d+)\}\}/g,(x,h)=>{var u,v;return((v=(u=a.sampleContent)==null?void 0:u.buttonVariables)==null?void 0:v[h])||`[${x}]`})})]})]})]})]}),e.jsxs("div",{className:"rsp-flex rsp-gap-3 rsp-pt-4 rsp-border-t rsp-border-gray-200",children:[e.jsx("button",{onClick:()=>U(r),disabled:!i.text.trim()||r!=="QUICK_REPLY"&&!i.value.trim(),className:"rsp-flex-1 rsp-bg-gradient-to-r rsp-from-blue-600 rsp-to-blue-700 rsp-text-white rsp-py-3 rsp-px-6 rsp-rounded-lg rsp-font-semibold rsp-text-sm rsp-transition-all hover:rsp-from-blue-700 hover:rsp-to-blue-800 disabled:rsp-opacity-50 disabled:rsp-cursor-not-allowed rsp-shadow-md hover:rsp-shadow-lg rsp-transform hover:rsp-scale-[1.02] active:rsp-scale-[0.98]",children:"Add Button"}),e.jsx("button",{onClick:w,className:"rsp-px-6 rsp-py-3 rsp-text-gray-700 rsp-bg-white rsp-border-2 rsp-border-gray-300 rsp-rounded-lg rsp-font-semibold rsp-text-sm rsp-transition-all hover:rsp-bg-gray-50 hover:rsp-border-gray-400 rsp-shadow-sm hover:rsp-shadow-md",children:"Cancel"})]})]})]}),a.buttons.length>0&&e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsx("h4",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Added Buttons"}),e.jsxs("span",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-500 rsp-bg-gray-100 rsp-px-3 rsp-py-1 rsp-rounded-full",children:[a.buttons.length," ",a.buttons.length===1?"button":"buttons"]})]}),e.jsx("div",{className:"rsp-space-y-3",children:a.buttons.map(x=>{const h=y.find(v=>v.type===x.type),u=(h==null?void 0:h.icon)||he;return e.jsx("div",{className:"rsp-bg-white rsp-border-2 rsp-border-gray-200 rsp-rounded-xl rsp-p-5 rsp-shadow-sm hover:rsp-shadow-md hover:rsp-border-gray-300 rsp-transition-all",children:e.jsxs("div",{className:"rsp-flex rsp-items-start rsp-gap-4",children:[e.jsx("div",{className:"rsp-p-3 rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-blue-100 rsp-rounded-xl rsp-shadow-sm",children:e.jsx(u,{className:"rsp-w-5 rsp-h-5 rsp-text-blue-600"})}),e.jsxs("div",{className:"rsp-flex-1 rsp-space-y-4",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsx("span",{className:"rsp-text-xs rsp-font-bold rsp-text-blue-700 rsp-uppercase rsp-tracking-wider rsp-bg-blue-50 rsp-px-2.5 rsp-py-1 rsp-rounded-md",children:x.type.replace("_"," ")}),e.jsx("button",{onClick:()=>o(x.id),className:"rsp-p-2 rsp-text-red-400 hover:rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded-lg rsp-transition-all",title:"Remove button",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}),e.jsxs("div",{className:"rsp-grid rsp-grid-cols-1 rsp-gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-semibold rsp-text-gray-700 rsp-mb-2",children:"Button Text"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:"text",value:x.text,onChange:v=>k(x.id,"text",v.target.value),maxLength:25,className:"rsp-w-full rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-shadow-sm rsp-transition-all rsp-bg-white"}),e.jsxs("span",{className:"rsp-absolute rsp-right-2.5 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-xs rsp-font-medium rsp-text-gray-400 rsp-bg-white rsp-px-1",children:[x.text.length,"/25"]})]})]}),x.type!=="QUICK_REPLY"&&e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-semibold rsp-text-gray-700 rsp-mb-2",children:x.type==="URL"?"Website URL":x.type==="CALL"?"Phone Number":"Flow ID"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:x.type==="CALL"?"tel":x.type==="URL"?"url":"text",value:x.value||"",onChange:v=>k(x.id,"value",v.target.value),maxLength:x.type==="URL"?2e3:20,className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-text-gray-900 placeholder:rsp-text-gray-400 focus:rsp-outline-none focus:rsp-ring-2 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-shadow-sm rsp-transition-all rsp-bg-white"}),e.jsxs("span",{className:"rsp-absolute rsp-right-2.5 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-text-xs rsp-font-medium rsp-text-gray-400 rsp-bg-white rsp-px-1",children:[(x.value||"").length,"/",x.type==="URL"?2e3:20]})]})]})]})]})]})},x.id)})})]}),a.buttons.length===0&&!r&&e.jsxs("div",{className:"rsp-text-center rsp-py-12 rsp-bg-gray-50 rsp-rounded-xl rsp-border-2 rsp-border-dashed rsp-border-gray-300",children:[e.jsx("div",{className:"rsp-w-16 rsp-h-16 rsp-bg-white rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-mx-auto rsp-mb-4 rsp-shadow-sm",children:e.jsx(he,{className:"rsp-w-8 rsp-h-8 rsp-text-gray-400"})}),e.jsx("h3",{className:"rsp-text-lg rsp-font-medium rsp-text-gray-900 rsp-mb-2",children:"No buttons added yet"}),e.jsx("p",{className:"rsp-text-gray-500 rsp-text-sm rsp-mb-4",children:"Add interactive buttons to make your message more engaging"}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-400",children:"Choose from Quick Reply, Web URL, Call, or Flow buttons above"})]})]})}const Pa=async a=>{try{if(!a)throw new Error("No file provided");const s=100*1024*1024;if(a.size>s)throw new Error(`File size too large. Maximum allowed size is ${s/(1024*1024)}MB`);const r=new FormData;r.append("file",a),console.log("Uploading file:",a.name,"Size:",a.size,"Type:",a.type);const t=await fetch("https://wiz.resul.io/Communication/UploadDocuments",{method:"POST",body:r});console.log("Upload response status:",t.status),console.log("Upload response headers:",Object.fromEntries(t.headers.entries()));const n=await t.text();console.log("Raw upload response:",n);let l;try{l=JSON.parse(n)}catch(i){throw console.error("Failed to parse upload response:",i),new Error("Invalid response from upload server")}if(console.log("Parsed upload response:",l),console.log("Upload status:",l.status),console.log("Upload message:",l.message),console.log("Upload data:",l.data),!l.status)throw new Error(l.message||"Upload failed");if(l.data&&Array.isArray(l.data)&&l.data.length>0){const i=l.data[0];if(i.url)return console.log("File uploaded successfully:",{url:i.url,filename:i.filename,originalName:i.originalName,size:i.size}),i.url;throw new Error("No file URL in upload response data")}else throw new Error("No files in upload response data")}catch(s){throw console.error("File upload error:",s),s instanceof Error?s:new Error("Unknown error occurred during file upload")}},Da=(a,s)=>{const t=a.name.toLowerCase().split(".").pop();switch(s){case"IMAGE":return["jpg","jpeg","png","gif","bmp","tiff","svg"].includes(t||"");case"VIDEO":return["mp4","mov","avi","3gpp"].includes(t||"");case"DOCUMENT":return["pdf","doc","docx","xls","xlsx","ppt","pptx","txt"].includes(t||"");default:return!1}},za=a=>{switch(a){case"IMAGE":return 5*1024*1024;case"VIDEO":return 16*1024*1024;case"DOCUMENT":return 100*1024*1024;default:return 10*1024*1024}};function _a({template:a,setTemplate:s,onFileUpload:r}){var N,M,B,P,G;const[t,n]=j.useState({}),[,l]=j.useState({}),[i,p]=j.useState({open:!1,message:""}),[f,m]=j.useState(!1),[w,U]=j.useState(null),o=j.useRef({}),k=()=>{var C;const c={id:Math.random().toString(36).substr(2,9),headerType:"MEDIA",mediaType:((C=a.carousel)==null?void 0:C.type)==="VIDEO"?"VIDEO":"IMAGE",body:"",buttons:[]};s(S=>{var A,R;return{...S,carousel:{type:((A=a.carousel)==null?void 0:A.type)||"IMAGE",cards:[...((R=a.carousel)==null?void 0:R.cards)||[],c]}}})},E=c=>{s(C=>({...C,carousel:{...C.carousel,cards:C.carousel.cards.filter(S=>S.id!==c)}}))},y=(c,C,S)=>{s(A=>({...A,carousel:{...A.carousel,cards:A.carousel.cards.map(R=>R.id===c?{...R,[C]:S}:R)}}))},g=c=>{s(C=>{const A=((C.carousel||{type:c,cards:[]}).cards||[]).map(R=>({...R,mediaType:c,mediaUrl:""}));return{...C,carousel:{type:c,cards:A}}})},x=(c,C)=>{var X;const S=(X=a.carousel)==null?void 0:X.cards.find(se=>se.id===c);if(!S)return;const D=`{{${u(c)+1}}}`,$=S[C]+D;y(c,C,$)},h=c=>{var $;if(!w)return;const C=o.current[w],S=($=a.carousel)==null?void 0:$.cards.find(X=>X.id===w);if(!S)return;const A=C&&typeof C.selectionStart=="number"?C.selectionStart:S.body.length,R=S.body.substring(0,A),D=S.body.substring(A),_=R+c+D;y(w,"body",_),setTimeout(()=>{const X=o.current[w];if(X){const se=A+c.length;X.setSelectionRange(se,se),X.focus()}},0),m(!1)},u=c=>{var D;const C=(D=a.carousel)==null?void 0:D.cards.find(_=>_.id===c);if(!C)return 0;const A=(C.body||"").match(/\{\{(\d+)\}\}/g);if(!A)return 0;const R=A.map(_=>{const $=_.match(/{{(\d+)}}/);return $?parseInt($[1],10):0});return R.length>0?Math.max(...R):0},v=(c,C)=>{var R;const S=(R=a.carousel)==null?void 0:R.cards.find(D=>D.id===c);if(!S||S.buttons.length>=2)return;const A={id:Math.random().toString(36).substr(2,9),type:C,text:"",value:"",urlType:"static"};y(c,"buttons",[...S.buttons,A])},L=(c,C,S,A)=>{var _;const R=(_=a.carousel)==null?void 0:_.cards.find($=>$.id===c);if(!R)return;const D=R.buttons.map($=>$.id===C?{...$,[S]:A}:$);y(c,"buttons",D)},V=(c,C)=>{var R;const S=(R=a.carousel)==null?void 0:R.cards.find(D=>D.id===c);if(!S)return;const A=S.buttons.filter(D=>D.id!==C);y(c,"buttons",A)},b=async(c,C)=>{var S;try{n(_=>({..._,[c]:!0})),l(_=>({..._,[c]:!1}));const A=((S=a.carousel)==null?void 0:S.type)==="VIDEO"?"VIDEO":"IMAGE";if(!Da(C,A))throw new Error(`Invalid file type. Expected ${A.toLowerCase()} file.`);const R=za(A);if(C.size>R){const _=R/1048576;throw new Error(`File size too large. Maximum allowed size is ${_}MB.`)}const D=await r(C);y(c,"mediaUrl",D)}catch(A){console.error("File upload failed:",A),p({open:!0,message:A instanceof Error?A.message:"File upload failed"})}finally{n(A=>({...A,[c]:!1}))}};return e.jsxs("div",{className:"rsp-space-y-6",children:[i.open&&e.jsxs("div",{className:"rsp-fixed rsp-inset-0 rsp-z-50 rsp-flex rsp-items-center rsp-justify-center",children:[e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-black rsp-bg-opacity-40",onClick:()=>p({open:!1,message:""})}),e.jsxs("div",{className:"rsp-relative rsp-z-10 rsp-bg-white rsp-rounded-lg rsp-shadow-lg rsp-w-full rsp-max-w-md rsp-p-5",children:[e.jsx("div",{className:"rsp-mb-3 rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Upload Error"}),e.jsx("div",{className:"rsp-text-sm rsp-text-gray-700 rsp-break-words rsp-whitespace-pre-wrap",children:i.message}),e.jsx("div",{className:"rsp-flex rsp-justify-end rsp-mt-4",children:e.jsx("button",{onClick:()=>p({open:!1,message:""}),className:"rsp-px-4 rsp-py-2 rsp-text-sm rsp-font-medium rsp-text-white rsp-bg-blue-600 rsp-rounded-md hover:rsp-bg-blue-700",children:"OK"})})]})]}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsx("h3",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Carousel Cards"}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-4",children:[e.jsxs("span",{className:"rsp-text-sm rsp-text-gray-500",children:["Total Cards: ",((N=a.carousel)==null?void 0:N.cards.length)||0,"/10"]}),e.jsxs("button",{onClick:k,disabled:(((M=a.carousel)==null?void 0:M.cards.length)||0)>=10,className:"rsp-px-4 rsp-py-2 rsp-bg-blue-600 rsp-text-white rsp-rounded-md hover:rsp-bg-blue-700 disabled:rsp-bg-gray-400 disabled:rsp-cursor-not-allowed rsp-text-sm rsp-font-medium",children:[e.jsx(je,{className:"rsp-w-4 rsp-h-4 rsp-inline rsp-mr-2"}),"Add Card"]})]})]}),e.jsxs("div",{className:"rsp-bg-white rsp-p-4 rsp-rounded-lg rsp-border rsp-border-gray-200",children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-3",children:"Carousel Type"}),e.jsxs("div",{className:"rsp-flex rsp-gap-4",children:[e.jsxs("label",{className:"rsp-flex rsp-items-center",children:[e.jsx("input",{type:"radio",name:"carouselType",value:"IMAGE",checked:((B=a.carousel)==null?void 0:B.type)==="IMAGE",onChange:c=>g(c.target.value),className:"rsp-mr-2"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-700",children:"Image"})]}),e.jsxs("label",{className:"rsp-flex rsp-items-center",children:[e.jsx("input",{type:"radio",name:"carouselType",value:"VIDEO",checked:((P=a.carousel)==null?void 0:P.type)==="VIDEO",onChange:c=>g(c.target.value),className:"rsp-mr-2"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-700",children:"Video"})]})]})]}),e.jsx("div",{className:"rsp-space-y-6",children:(G=a.carousel)==null?void 0:G.cards.map((c,C)=>{var S,A,R,D,_,$,X,se;return e.jsxs("div",{className:"rsp-bg-white rsp-rounded-xl rsp-border-2 rsp-border-gray-200 rsp-overflow-hidden rsp-shadow-lg rsp-transition-all hover:rsp-shadow-xl hover:rsp-border-blue-300",children:[e.jsxs("div",{className:"rsp-bg-gradient-to-r rsp-from-blue-50 rsp-to-blue-100 rsp-px-5 rsp-py-3 rsp-flex rsp-items-center rsp-justify-between rsp-border-b rsp-border-gray-200",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-3",children:[e.jsx("div",{className:"rsp-w-8 rsp-h-8 rsp-bg-blue-500 rsp-text-white rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-font-bold rsp-text-sm rsp-shadow-md",children:C+1}),e.jsxs("h4",{className:"rsp-text-base rsp-font-semibold rsp-text-gray-800",children:["Card ",C+1]})]}),e.jsx("button",{onClick:()=>E(c.id),className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-white hover:rsp-bg-red-500 rsp-rounded-full rsp-transition-colors",title:"Remove Card",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}),e.jsx("div",{className:"rsp-p-6",children:e.jsxs("div",{className:"rsp-grid rsp-grid-cols-1 lg:rsp-grid-cols-2 rsp-gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-3 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:((S=a.carousel)==null?void 0:S.type)==="VIDEO"?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),((A=a.carousel)==null?void 0:A.type)==="VIDEO"?"Video":"Image"," Upload"]}),e.jsxs("div",{className:"rsp-border-2 rsp-border-dashed rsp-border-blue-200 rsp-rounded-xl rsp-p-6 rsp-text-center rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-white rsp-transition-all hover:rsp-border-blue-400 hover:rsp-from-blue-100 rsp-relative",children:[c.mediaUrl?e.jsxs("div",{className:"rsp-relative rsp-group",children:[((R=a.carousel)==null?void 0:R.type)==="IMAGE"?e.jsx("img",{src:c.mediaUrl,alt:`Card ${C+1}`,className:"rsp-w-full rsp-h-48 rsp-object-cover rsp-rounded-lg rsp-shadow-md",onLoad:()=>l(T=>({...T,[c.id]:!0})),onError:()=>l(T=>({...T,[c.id]:!1}))}):e.jsx("video",{src:c.mediaUrl,className:"rsp-w-full rsp-h-48 rsp-object-cover rsp-rounded-lg rsp-shadow-md",controls:!0,onLoadedData:()=>l(T=>({...T,[c.id]:!0})),onError:()=>l(T=>({...T,[c.id]:!1}))}),e.jsx("button",{onClick:()=>y(c.id,"mediaUrl",""),className:"rsp-absolute rsp-top-2 rsp-right-2 rsp-p-2 rsp-bg-red-500 rsp-text-white rsp-rounded-full hover:rsp-bg-red-600 rsp-shadow-lg rsp-opacity-0 group-hover:rsp-opacity-100 rsp-transition-opacity",title:"Remove media",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-2 rsp-left-2 rsp-bg-black rsp-bg-opacity-60 rsp-text-white rsp-text-xs rsp-px-2 rsp-py-1 rsp-rounded rsp-backdrop-blur-sm",children:((D=a.carousel)==null?void 0:D.type)==="VIDEO"?"📹 Video":"🖼️ Image"})]}):e.jsxs("div",{children:[e.jsx("div",{className:"rsp-w-20 rsp-h-20 rsp-mx-auto rsp-mb-4 rsp-bg-gradient-to-br rsp-from-blue-100 rsp-to-blue-200 rsp-rounded-xl rsp-flex rsp-items-center rsp-justify-center rsp-shadow-md",children:e.jsx("svg",{className:"rsp-w-10 rsp-h-10 rsp-text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:((_=a.carousel)==null?void 0:_.type)==="VIDEO"?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),e.jsx("input",{type:"file",accept:(($=a.carousel)==null?void 0:$.type)==="VIDEO"?"video/*":"image/*",onChange:T=>{var O;const ae=(O=T.target.files)==null?void 0:O[0];ae&&!t[c.id]&&b(c.id,ae)},className:"rsp-hidden",id:`file-upload-${c.id}`,disabled:!!t[c.id]}),e.jsxs("label",{htmlFor:`file-upload-${c.id}`,className:`rsp-inline-flex rsp-items-center rsp-gap-2 rsp-px-5 rsp-py-2.5 rsp-border rsp-border-blue-300 rsp-rounded-lg rsp-shadow-sm rsp-text-sm rsp-font-semibold rsp-text-blue-600 rsp-bg-white rsp-transition-colors ${t[c.id]?"rsp-opacity-50 rsp-cursor-not-allowed":"hover:rsp-bg-blue-50 rsp-cursor-pointer"}`,"aria-disabled":!!t[c.id],children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Upload ",((X=a.carousel)==null?void 0:X.type)==="VIDEO"?"Video":"Image"]}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-3 rsp-px-2",children:((se=a.carousel)==null?void 0:se.type)==="VIDEO"?"📹 MP4, MOV, AVI (Max 16MB)":"🖼️ PNG, JPG, GIF, TIFF, SVG, BMP (Max 5MB)"})]}),t[c.id]&&e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-black rsp-bg-opacity-30 rsp-flex rsp-items-center rsp-justify-center",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2 rsp-bg-white rsp-px-3 rsp-py-2 rsp-rounded-md rsp-shadow",children:[e.jsxs("svg",{className:"rsp-w-4 rsp-h-4 rsp-animate-spin",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10",strokeOpacity:"0.25",strokeWidth:"4"}),e.jsx("path",{d:"M22 12a10 10 0 00-10-10",strokeWidth:"4"})]}),e.jsx("span",{className:"rsp-text-xs rsp-text-gray-700",children:"Uploading..."})]})})]})]}),e.jsxs("div",{className:"rsp-space-y-5",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-3 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),"Body Text",e.jsx("span",{className:"rsp-text-xs rsp-text-gray-500 rsp-font-normal",children:"(Max 160 characters)"})]}),e.jsx("div",{className:"rsp-relative",children:e.jsx("textarea",{ref:T=>{o.current[c.id]=T},value:c.body,onChange:T=>y(c.id,"body",T.target.value),maxLength:160,rows:4,className:"rsp-w-full rsp-px-4 rsp-py-3 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-400 rsp-bg-white rsp-resize-none rsp-shadow-sm rsp-transition-colors",placeholder:"Enter Card Body Message"})}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mt-2",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-1",children:[e.jsx("button",{onClick:()=>x(c.id,"body"),className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-blue-600 hover:rsp-bg-blue-50 rsp-rounded rsp-transition-colors",title:"Add Variable",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsx("button",{onClick:()=>{U(c.id),m(!0)},className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-blue-600 hover:rsp-bg-blue-50 rsp-rounded rsp-transition-colors",title:"Add Emoji",children:e.jsx(ke,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("button",{onClick:()=>{const T=o.current[c.id];if(!T)return;const{newText:ae,cursorPosition:O}=de(T,c.body,"bold");y(c.id,"body",ae),requestAnimationFrame(()=>{setTimeout(()=>{T&&(T.setSelectionRange(O,O),T.focus())},0)})},className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-blue-600 hover:rsp-bg-blue-50 rsp-rounded rsp-transition-colors",title:"Bold text (*text*)",children:e.jsxs("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z"})]})}),e.jsx("button",{onClick:()=>{const T=o.current[c.id];if(!T)return;const{newText:ae,cursorPosition:O}=de(T,c.body,"italic");y(c.id,"body",ae),requestAnimationFrame(()=>{setTimeout(()=>{T&&(T.setSelectionRange(O,O),T.focus())},0)})},className:"rsp-p-1.5 rsp-text-gray-500 hover:rsp-text-blue-600 hover:rsp-bg-blue-50 rsp-rounded rsp-transition-colors",title:"Italic text (_text_)",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 4h4M8 20h4M12 4l-2 16"})})})]}),e.jsxs("span",{className:`rsp-text-xs rsp-font-medium ${c.body.length>140?"rsp-text-orange-500":"rsp-text-gray-500"}`,children:[c.body.length,"/160"]})]}),(()=>{const T=c.body.match(/\{\{(\d+)\}\}/g)||[],ae=[...new Set(T.map(O=>O.replace(/[{}]/g,"")))];return ae.length===0?null:e.jsxs("div",{className:"rsp-mt-3 rsp-p-3 rsp-bg-blue-50 rsp-rounded-lg rsp-border rsp-border-blue-200",children:[e.jsx("p",{className:"rsp-text-xs rsp-font-semibold rsp-text-blue-800 rsp-mb-2",children:"Sample Values for This Card"}),e.jsx("div",{className:"rsp-grid rsp-grid-cols-1 rsp-gap-2",children:ae.map(O=>{var xe,H;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("label",{className:"rsp-text-xs rsp-text-gray-700 rsp-font-medium rsp-whitespace-nowrap",children:["{{",O,"}}",":"]}),e.jsx("input",{type:"text",value:((H=(xe=c.sampleContent)==null?void 0:xe.bodyVariables)==null?void 0:H[O])||"",onChange:ie=>{const re=ie.target.value;s(Y=>({...Y,carousel:{...Y.carousel,cards:Y.carousel.cards.map(z=>{var K,q,d;return z.id!==c.id?z:{...z,sampleContent:{headerVariables:((K=z.sampleContent)==null?void 0:K.headerVariables)||{},bodyVariables:{...((q=z.sampleContent)==null?void 0:q.bodyVariables)||{},[O]:re},buttonVariables:((d=z.sampleContent)==null?void 0:d.buttonVariables)||{}}}})}}))},className:"rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white",placeholder:"Sample value"}),e.jsx("button",{type:"button",onClick:()=>{const ie=new RegExp(`\\{\\{${O}\\}\\}`,"g"),re=(c.body||"").replace(ie,"");s(Y=>({...Y,carousel:{...Y.carousel,cards:Y.carousel.cards.map(z=>{var K,q,d;if(z.id!==c.id)return z;const Q=Object.fromEntries(Object.entries(((K=z.sampleContent)==null?void 0:K.bodyVariables)||{}).filter(([I])=>I!==O));return{...z,body:re,sampleContent:{headerVariables:((q=z.sampleContent)==null?void 0:q.headerVariables)||{},bodyVariables:Q,buttonVariables:((d=z.sampleContent)==null?void 0:d.buttonVariables)||{}}}})}}))},className:"rsp-px-2 rsp-py-1 rsp-text-xs rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`card-${c.id}-sample-${O}`)})})]})})()]}),c.buttons.length<2&&e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-mb-3 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})}),"Add Action Button",e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-500 rsp-font-normal",children:["(",c.buttons.length,"/2)"]})]}),e.jsxs("div",{className:"rsp-grid rsp-grid-cols-3 rsp-gap-2",children:[e.jsxs("button",{onClick:()=>v(c.id,"QUICK_REPLY"),className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-2 rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-font-medium rsp-text-gray-700 hover:rsp-border-blue-400 hover:rsp-bg-blue-50 rsp-transition-all rsp-shadow-sm",children:[e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),e.jsx("span",{className:"rsp-text-xs",children:"Quick Reply"})]}),e.jsxs("button",{onClick:()=>v(c.id,"URL"),className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-2 rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-font-medium rsp-text-gray-700 hover:rsp-border-blue-400 hover:rsp-bg-blue-50 rsp-transition-all rsp-shadow-sm",children:[e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),e.jsx("span",{className:"rsp-text-xs",children:"Website"})]}),e.jsxs("button",{onClick:()=>v(c.id,"PHONE_NUMBER"),className:"rsp-flex rsp-flex-col rsp-items-center rsp-gap-2 rsp-px-3 rsp-py-4 rsp-border-2 rsp-border-gray-200 rsp-rounded-lg rsp-text-sm rsp-font-medium rsp-text-gray-700 hover:rsp-border-blue-400 hover:rsp-bg-blue-50 rsp-transition-all rsp-shadow-sm",children:[e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-blue-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),e.jsx("span",{className:"rsp-text-xs",children:"Phone"})]})]})]}),c.buttons.length>0&&e.jsxs("div",{className:"rsp-space-y-3",children:[e.jsxs("label",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800 rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Configured Buttons"]}),c.buttons.map((T,ae)=>e.jsxs("div",{className:"rsp-p-4 rsp-border-2 rsp-border-blue-200 rsp-rounded-lg rsp-bg-gradient-to-br rsp-from-blue-50 rsp-to-white rsp-shadow-sm",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mb-3",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("div",{className:"rsp-w-6 rsp-h-6 rsp-bg-blue-500 rsp-text-white rsp-rounded rsp-flex rsp-items-center rsp-justify-center rsp-text-xs rsp-font-bold",children:ae+1}),e.jsx("span",{className:"rsp-text-sm rsp-font-semibold rsp-text-gray-800",children:T.type==="QUICK_REPLY"?"Quick Reply":T.type==="URL"?"Website":"Phone"})]}),e.jsx("button",{onClick:()=>V(c.id,T.id),className:"rsp-p-1 rsp-text-gray-400 hover:rsp-text-red-500 hover:rsp-bg-red-50 rsp-rounded rsp-transition-colors",title:"Remove button",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4"})})]}),e.jsxs("div",{className:"rsp-space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-1",children:"Button Text"}),e.jsx("input",{type:"text",value:T.text,onChange:O=>L(c.id,T.id,"text",O.target.value),placeholder:`Enter Button Text (Max ${T.type==="QUICK_REPLY"?"25":"20"} characters)`,maxLength:T.type==="QUICK_REPLY"?25:20,className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white"})]}),T.type==="URL"&&e.jsxs("div",{className:"rsp-space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-2",children:"URL Type"}),e.jsxs("div",{className:"rsp-flex rsp-gap-4",children:[e.jsxs("label",{className:"rsp-flex rsp-items-center rsp-cursor-pointer",children:[e.jsx("input",{type:"radio",checked:T.urlType!=="dynamic",onChange:()=>L(c.id,T.id,"urlType","static"),className:"rsp-mr-2 rsp-text-blue-600"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-700",children:"Static URL"})]}),e.jsxs("label",{className:"rsp-flex rsp-items-center rsp-cursor-pointer",children:[e.jsx("input",{type:"radio",checked:T.urlType==="dynamic",onChange:()=>L(c.id,T.id,"urlType","dynamic"),className:"rsp-mr-2 rsp-text-blue-600"}),e.jsx("span",{className:"rsp-text-sm rsp-text-gray-700",children:"Dynamic URL"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-1",children:"Website URL"}),e.jsx("input",{type:"text",value:T.value||"",onChange:O=>L(c.id,T.id,"value",O.target.value),placeholder:T.urlType==="dynamic"?"https://example.com/order/{{1}}":"https://example.com",className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white"})]}),T.urlType==="dynamic"&&e.jsxs("div",{className:"rsp-space-y-2",children:[e.jsx("div",{className:"rsp-p-2 rsp-bg-blue-50 rsp-rounded rsp-border rsp-border-blue-200",children:e.jsxs("p",{className:"rsp-text-xs rsp-text-blue-700",children:[e.jsx("strong",{children:"Tip:"})," Use ","{{"," and ","}}}"," to add variables (e.g., https://example.com/","{{"," 1","}}",")"]})}),e.jsxs("div",{children:[e.jsx("button",{type:"button",onClick:()=>{if(((T.value||"").match(/\{\{(\d+)\}\}/g)||[]).length>=1)return;const H=((T.value||"").match(/\{\{(\d+)\}\}/g)||[]).map(z=>{const Q=z.match(/{{(\d+)}}/);return Q?parseInt(Q[1],10):0}),re=(H.length>0?Math.max(...H):0)+1,Y=(T.value||"")+`{{${re}}}`;L(c.id,T.id,"value",Y)},disabled:((T.value||"").match(/\{\{(\d+)\}\}/g)||[]).length>=1,className:"rsp-px-3 rsp-py-1.5 rsp-text-xs rsp-bg-blue-500 hover:rsp-bg-blue-600 rsp-text-white rsp-rounded disabled:rsp-bg-gray-300 disabled:rsp-cursor-not-allowed rsp-transition-colors",children:"+ Add Variable"}),((T.value||"").match(/\{\{(\d+)\}\}/g)||[]).length>=1&&e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:"Maximum 1 variable allowed"})]}),(()=>{const O=(T.value||"").match(/\{\{(\d+)\}\}/g)||[],xe=[...new Set(O.map(H=>H.replace(/[{}]/g,"")))];return xe.length===0?null:e.jsxs("div",{className:"rsp-p-3 rsp-bg-gray-50 rsp-rounded-lg rsp-border rsp-border-gray-200",children:[e.jsx("h4",{className:"rsp-text-xs rsp-font-semibold rsp-text-gray-700 rsp-mb-2",children:"Sample Values for URL Variables"}),e.jsx("div",{className:"rsp-space-y-2",children:xe.map(H=>{var ie,re;return e.jsxs("div",{className:"rsp-space-y-1",children:[e.jsxs("label",{className:"rsp-block rsp-text-xs rsp-text-gray-600 rsp-mb-1",children:["Variable ","{{",H,"}}"]}),e.jsx("input",{type:"text",value:((re=(ie=c.sampleContent)==null?void 0:ie.buttonVariables)==null?void 0:re[H])||"",onChange:Y=>{const z=Y.target.value;s(Q=>({...Q,carousel:{...Q.carousel,cards:Q.carousel.cards.map(K=>{var q,d,I;return K.id!==c.id?K:{...K,sampleContent:{headerVariables:((q=K.sampleContent)==null?void 0:q.headerVariables)||{},bodyVariables:((d=K.sampleContent)==null?void 0:d.bodyVariables)||{},buttonVariables:{...((I=K.sampleContent)==null?void 0:I.buttonVariables)||{},[H]:z}}}})}}))},className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-ring-1 focus:rsp-ring-blue-500 focus:rsp-border-blue-500 rsp-bg-white",placeholder:`Sample value (e.g., ${H==="1"?"order123":"user456"})`}),e.jsx("button",{type:"button",onClick:()=>{const Y=T.value||"",z=new RegExp(`\\{\\{${H}\\}\\}`,"g"),Q=Y.replace(z,"");L(c.id,T.id,"value",Q),s(K=>({...K,carousel:{...K.carousel,cards:K.carousel.cards.map(q=>{var I,W,F;if(q.id!==c.id)return q;const d=Object.fromEntries(Object.entries(((I=q.sampleContent)==null?void 0:I.buttonVariables)||{}).filter(([Z])=>Z!==H));return{...q,sampleContent:{headerVariables:((W=q.sampleContent)==null?void 0:W.headerVariables)||{},bodyVariables:((F=q.sampleContent)==null?void 0:F.bodyVariables)||{},buttonVariables:d}}})}}))},className:"rsp-px-2 rsp-py-1 rsp-text- rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`button-${T.id}-sample-${H}`)})})]})})()]})]}),T.type==="PHONE_NUMBER"&&e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-1",children:"Phone Number"}),e.jsx("input",{type:"text",value:T.value||"",onChange:O=>L(c.id,T.id,"value",O.target.value),placeholder:"+1234567890",className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white"})]})]})]},T.id))]})]})]})})]},c.id)})}),e.jsx("div",{className:"rsp-bg-blue-50 rsp-border-l-4 rsp-border-blue-500 rsp-p-4 rsp-rounded-r-md",children:e.jsxs("div",{className:"rsp-flex",children:[e.jsx("div",{className:"rsp-flex-shrink-0",children:e.jsx("svg",{className:"rsp-h-5 rsp-w-5 rsp-text-blue-400",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})}),e.jsxs("div",{className:"rsp-ml-3",children:[e.jsx("h3",{className:"rsp-text-sm rsp-font-medium rsp-text-blue-800",children:"Meta WhatsApp HSM Guidelines"}),e.jsx("div",{className:"rsp-mt-2 rsp-text-sm rsp-text-blue-700",children:e.jsxs("ul",{className:"rsp-list-disc rsp-list-inside rsp-space-y-1",children:[e.jsx("li",{children:"Maximum 10 carousel cards per template"}),e.jsx("li",{children:"Maximum 2 buttons per card"}),e.jsx("li",{children:"Card body text limited to 160 characters"}),e.jsx("li",{children:"Button text limited to 20-25 characters depending on type"}),e.jsx("li",{children:"Images: PNG, JPG, GIF, TIFF, SVG, BMP formats supported"}),e.jsx("li",{children:"Videos: MP4, MOV, AVI formats supported"})]})})]})]})}),e.jsx(Ee,{isOpen:f,onClose:()=>m(!1),onSelect:h})]})}const Ue=async a=>{try{console.log(`Starting file upload: ${a.name}`);const s=await Pa(a);return console.log(`File uploaded successfully: ${s}`),s}catch(s){throw console.error("Upload failed in parent:",s),s}},Fa=a=>{const r=(a.body||"").match(/\{\{(\d+)\}\}/g);if(!r)return 0;const t=r.map(n=>{const l=n.match(/{{(\d+)}}/);return l?parseInt(l[1],10):0});return t.length>0?Math.max(...t):0};function $a({template:a,setTemplate:s}){const[r,t]=j.useState(!1),n=j.useRef(null),l=()=>{t(!0),setTimeout(()=>{n.current&&n.current.focus()},0)},i=p=>{const f=n.current,m=a.body,w=f&&typeof f.selectionStart=="number"?f.selectionStart:m.length,U=m.substring(0,w),o=m.substring(w),k=U+p+o;s({...a,body:k}),setTimeout(()=>{if(n.current){const E=w+p.length;n.current.setSelectionRange(E,E),n.current.focus()}},0),t(!1)};return e.jsxs("div",{className:"rsp-space-y-6",children:[a.type!=="CAROUSEL"&&e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsx("h2",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Message Content"}),e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsx(Ia,{template:a,setTemplate:s,onFileUpload:Ue}),e.jsx(Ba,{template:a,setTemplate:s})]})]}),a.type==="CAROUSEL"&&e.jsxs("div",{className:"rsp-space-y-6",children:[e.jsx("h2",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Message Content"}),e.jsx("div",{className:"rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm",children:e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:["Body ",e.jsx("span",{className:"rsp-text-gray-500",children:"(Global message for carousel)"})]}),e.jsx("div",{className:"rsp-relative",children:e.jsx("textarea",{ref:n,value:a.body,onChange:p=>s({...a,body:p.target.value}),maxLength:1024,rows:4,className:"rsp-w-full rsp-px-3 rsp-py-2 rsp-border rsp-border-gray-300 rsp-rounded-md rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-white rsp-resize-none",placeholder:"Enter Template Message"})}),!a.body&&e.jsx("p",{className:"rsp-text-xs rsp-text-red-600 rsp-mt-1",children:"Body is required."}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between rsp-mt-1",children:[e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("button",{onClick:()=>{const m=`{{${Fa(a)+1}}}`;s({...a,body:a.body+m})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Add Variable",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),e.jsx("button",{onClick:l,className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Add emoji",children:e.jsx(ke,{className:"rsp-w-4 rsp-h-4"})}),e.jsx("button",{onClick:()=>{if(!n.current)return;const{newText:p,cursorPosition:f}=de(n.current,a.body,"bold");s({...a,body:p}),requestAnimationFrame(()=>{setTimeout(()=>{n.current&&(n.current.setSelectionRange(f,f),n.current.focus())},0)})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Bold text (*text*)",children:e.jsxs("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 4h8a4 4 0 014 4 4 4 0 01-4 4H6z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 12h9a4 4 0 014 4 4 4 0 01-4 4H6z"})]})}),e.jsx("button",{onClick:()=>{if(!n.current)return;const{newText:p,cursorPosition:f}=de(n.current,a.body,"italic");s({...a,body:p}),requestAnimationFrame(()=>{setTimeout(()=>{n.current&&(n.current.setSelectionRange(f,f),n.current.focus())},0)})},className:"rsp-p-1 rsp-text-gray-500 hover:rsp-text-gray-700 hover:rsp-bg-gray-100 rsp-rounded",title:"Italic text (_text_)",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 4h4M8 20h4M12 4l-2 16"})})})]}),e.jsxs("span",{className:"rsp-text-xs rsp-text-gray-500",children:[a.body.length,"/1024"]})]}),(()=>{const p=a.body.match(/\{\{(\d+)\}\}/g)||[],f=[...new Set(p.map(m=>m.replace(/[{}]/g,"")))];return f.length===0?null:e.jsxs("div",{className:"rsp-mt-3",children:[e.jsx("p",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-600 rsp-mb-2",children:"Sample Values"}),e.jsx("div",{className:"rsp-grid rsp-grid-cols-3 rsp-gap-2",children:f.map(m=>{var w,U;return e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsxs("label",{className:"rsp-text-xs rsp-text-gray-500 rsp-whitespace-nowrap",children:["{{",m,"}}",":"]}),e.jsx("input",{type:"text",value:((U=(w=a.sampleContent)==null?void 0:w.bodyVariables)==null?void 0:U[m])||"",onChange:o=>{var E,y,g;const k={...a.sampleContent,headerVariables:((E=a.sampleContent)==null?void 0:E.headerVariables)||{},bodyVariables:{...(y=a.sampleContent)==null?void 0:y.bodyVariables,[m]:o.target.value},buttonVariables:((g=a.sampleContent)==null?void 0:g.buttonVariables)||{}};s({...a,sampleContent:k})},className:"rsp-flex-1 rsp-px-2 rsp-py-1 rsp-border rsp-border-gray-300 rsp-rounded rsp-text-xs focus:rsp-outline-none focus:rsp-border-blue-500",placeholder:"Sample"}),e.jsx("button",{type:"button",onClick:()=>{var y,g,x;const o=new RegExp(`\\{\\{${m}\\}\\}`,"g"),k=(a.body||"").replace(o,""),E=Object.fromEntries(Object.entries(((y=a.sampleContent)==null?void 0:y.bodyVariables)||{}).filter(([h])=>h!==m));s({...a,body:k,sampleContent:{...a.sampleContent,bodyVariables:E,headerVariables:((g=a.sampleContent)==null?void 0:g.headerVariables)||{},buttonVariables:((x=a.sampleContent)==null?void 0:x.buttonVariables)||{}}})},className:"rsp-px-2 rsp-py-1 rsp-text-xs rsp-text-red-600 hover:rsp-bg-red-50 rsp-rounded",title:"Remove this variable",children:"×"})]},`global-body-sample-${m}`)})})]})})()]})})]}),a.type==="CAROUSEL"&&e.jsx("div",{className:"rsp-space-y-6",children:e.jsx(_a,{template:a,setTemplate:s,onFileUpload:Ue})}),a.type!=="CAROUSEL"&&e.jsx("div",{className:"rsp-space-y-6",children:e.jsx(Oa,{template:a,setTemplate:s})}),e.jsx(Ee,{isOpen:r,onClose:()=>t(!1),onSelect:i})]})}function Ha({type:a}){switch(a){case"QUICK_REPLY":return e.jsx(Qe,{className:"w-4 h-4"});case"URL":return e.jsx(Je,{className:"w-4 h-4"});case"CALL":return e.jsx(Ie,{className:"w-4 h-4"});case"FLOW":return e.jsx(aa,{className:"w-4 h-4"});default:return null}}function qa({buttons:a,flowButtonText:s,onShowAllOptions:r}){const t=[...a];s&&t.push({id:"flow-button",type:"QUICK_REPLY",text:s});const n=t.slice(0,2);return e.jsxs("div",{className:"rsp-divide-y rsp-divide-gray-200",children:[n.map(l=>e.jsxs("button",{className:"rsp-w-full rsp-py-4 rsp-text-[#128C7E] rsp-text-[15px] rsp-font-medium rsp-bg-white hover:rsp-bg-gray-50 rsp-flex rsp-items-center rsp-gap-3 rsp-px-4 rsp-transition-colors",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[e.jsx("div",{className:"rsp-text-[#128C7E]",children:e.jsx(Ha,{type:l.type})}),e.jsx("span",{className:"rsp-flex-1 rsp-text-left rsp-break-words rsp-break-all rsp-whitespace-pre-wrap",children:l.text}),l.id==="flow-button"&&e.jsx(We,{className:"rsp-w-5 rsp-h-5 rsp-text-[#128C7E] rsp-ml-auto"})]},l.id)),t.length>2&&e.jsxs("button",{onClick:r,className:"rsp-w-full rsp-py-4 rsp-text-[#128C7E] rsp-text-[15px] rsp-font-medium rsp-bg-white hover:rsp-bg-gray-50 rsp-flex rsp-items-center rsp-justify-center rsp-transition-colors",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[e.jsx("span",{className:"rsp-text-lg rsp-mr-2",children:"⋯"}),"See all options"]})]})}const Wa=a=>{const s=[];let r=0;for(;r<a.length;)if(a[r]==="*"&&r+1<a.length&&a[r+1]==="_"){const t=r+2;let n=t;for(;n<a.length-1;){if(a[n]==="_"&&a[n+1]==="*"){const l=a.substring(t,n);s.push({type:"boldItalic",content:l}),r=n+2;break}n++}n>=a.length-1&&(s.push({type:"text",content:a[r]}),r++)}else if(a[r]==="*"){const t=r+1;let n=t;for(;n<a.length;){if(a[n]==="*"&&(n===t||a[n-1]!=="_")){const l=a.substring(t,n);s.push({type:"bold",content:l}),r=n+1;break}n++}n>=a.length&&(s.push({type:"text",content:a[r]}),r++)}else if(a[r]==="_"){const t=r+1;let n=t;for(;n<a.length;){if(a[n]==="_"&&(n===t||a[n-1]!=="*")){const l=a.substring(t,n);s.push({type:"italic",content:l}),r=n+1;break}n++}n>=a.length&&(s.push({type:"text",content:a[r]}),r++)}else{let t=r;for(;r<a.length&&a[r]!=="*"&&a[r]!=="_";)r++;const n=a.substring(t,r);n&&s.push({type:"text",content:n})}return s},we=(a,s)=>{if(!a)return"";let r=a;s&&(r=r.replace(/\{\{(\d+)\}\}/g,(i,p)=>s[p]||`[Variable ${p}]`));const t=Wa(r),n=[];let l=0;return t.forEach(i=>{switch(i.type){case"text":n.push(e.jsx(j.Fragment,{children:i.content},`text-${l++}`));break;case"bold":n.push(e.jsx("strong",{children:i.content},`format-${l++}`));break;case"italic":n.push(e.jsx("em",{children:i.content},`format-${l++}`));break;case"boldItalic":n.push(e.jsx("strong",{children:e.jsx("em",{children:i.content})},`format-${l++}`));break}}),e.jsx(e.Fragment,{children:n})};function Ga({template:a}){var U,o,k,E;const[s,r]=j.useState(!1),[t,n]=j.useState(0),l=(U=a.carousel)!=null&&U.cards?a.carousel.cards.length:0;j.useEffect(()=>{a.type==="CAROUSEL"&&l>0?t>=l&&n(0):n(0)},[l,a.type]);const i=y=>{var g;return y?we(y,(g=a.sampleContent)==null?void 0:g.headerVariables):""},p=y=>{var g;return y?we(y,(g=a.sampleContent)==null?void 0:g.bodyVariables):""},f=y=>{var h;const g=(y==null?void 0:y.body)??"";if(!g)return"";const x=((h=y==null?void 0:y.sampleContent)==null?void 0:h.bodyVariables)??{};return we(g,x)},m=a.headerType!=="NONE"||a.body||a.footer||a.buttons.length>0||a.type==="CAROUSEL"&&((o=a.carousel)==null?void 0:o.cards.length),w=a.headerText||a.body||a.footer;return e.jsxs("div",{className:"rsp-bg-white rsp-rounded-lg rsp-shadow-sm rsp-border rsp-border-gray-200",children:[e.jsxs("div",{className:"rsp-p-4 rsp-border-b rsp-border-gray-200",children:[e.jsx("h3",{className:"rsp-text-lg rsp-font-semibold rsp-text-gray-900",children:"Preview"}),e.jsx("p",{className:"rsp-text-sm rsp-text-gray-500",children:"See how your template will look"})]}),e.jsx("div",{className:"rsp-p-6 rsp-flex rsp-justify-center",children:e.jsx("div",{className:"rsp-relative",children:e.jsxs("div",{className:"rsp-w-[280px] rsp-h-[580px] rsp-bg-gradient-to-b rsp-from-[#1a1a1a] rsp-via-[#2d2d2f] rsp-to-[#000000] rsp-rounded-[35px] rsp-p-[2px] rsp-relative rsp-shadow-[0_20px_40px_-10px_rgba(0,0,0,0.7)] rsp-border-[1px] rsp-border-[#404040]",children:[e.jsx("div",{className:"rsp-absolute rsp-right-[-2px] rsp-top-[120px] rsp-w-[2px] rsp-h-[50px] rsp-bg-gradient-to-b rsp-from-[#404040] rsp-to-[#1a1a1a] rsp-rounded-l-[1px] rsp-shadow-md"}),e.jsx("div",{className:"rsp-absolute rsp-left-[-2px] rsp-top-[100px] rsp-w-[2px] rsp-h-[25px] rsp-bg-gradient-to-b rsp-from-[#404040] rsp-to-[#1a1a1a] rsp-rounded-r-[1px] rsp-shadow-sm"}),e.jsx("div",{className:"rsp-absolute rsp-left-[-2px] rsp-top-[135px] rsp-w-[2px] rsp-h-[40px] rsp-bg-gradient-to-b rsp-from-[#404040] rsp-to-[#1a1a1a] rsp-rounded-r-[1px] rsp-shadow-sm"}),e.jsx("div",{className:"rsp-absolute rsp-left-[-2px] rsp-top-[70px] rsp-w-[2px] rsp-h-[20px] rsp-bg-gradient-to-b rsp-from-[#ff8c42] rsp-to-[#ff6b35] rsp-rounded-r-[1px] rsp-shadow-md"}),e.jsxs("div",{className:"rsp-w-full rsp-h-full rsp-bg-black rsp-rounded-[33px] rsp-overflow-hidden rsp-relative rsp-shadow-[inset_0_1px_3px_rgba(0,0,0,0.3)]",children:[e.jsx("div",{className:"rsp-absolute rsp-top-[14px] rsp-left-1/2 rsp-transform -rsp-translate-x-1/2 rsp-w-[70px] rsp-h-[18px] rsp-bg-gradient-to-b rsp-from-[#0a0a0a] rsp-to-[#000000] rsp-rounded-[9px] rsp-z-20 rsp-shadow-[0_1px_4px_rgba(0,0,0,0.6)] rsp-border rsp-border-[#1a1a1a] rsp-flex rsp-items-center rsp-justify-center",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-center rsp-gap-[8px]",children:[e.jsx("div",{className:"rsp-w-[3px] rsp-h-[3px] rsp-bg-gradient-to-br rsp-from-[#1a1a1a] rsp-to-[#000000] rsp-rounded-full rsp-shadow-inner"}),e.jsx("div",{className:"rsp-w-[2px] rsp-h-[2px] rsp-bg-gradient-to-br rsp-from-[#333] rsp-to-[#000] rsp-rounded-full"})]})}),e.jsxs("div",{className:"rsp-w-full rsp-h-full rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-rounded-[33px] rsp-relative rsp-overflow-hidden rsp-shadow-[inset_0_1px_2px_rgba(0,0,0,0.1)]",children:[e.jsxs("div",{className:"rsp-absolute rsp-top-0 rsp-left-0 rsp-right-0 rsp-h-[45px] rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-flex rsp-items-center rsp-justify-between rsp-px-[30px] rsp-z-10",children:[e.jsx("div",{className:"rsp-text-[13px] rsp-font-semibold rsp-text-black rsp-tracking-tight",children:"9:41"}),e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-[5px]",children:[e.jsxs("div",{className:"rsp-flex rsp-gap-[2px] rsp-items-end",children:[e.jsx("div",{className:"rsp-w-[1.5px] rsp-h-[2px] rsp-bg-gradient-to-t rsp-from-black rsp-to-[#333] rsp-rounded-[0.5px]"}),e.jsx("div",{className:"rsp-w-[1.5px] rsp-h-[3px] rsp-bg-gradient-to-t rsp-from-black rsp-to-[#333] rsp-rounded-[0.5px]"}),e.jsx("div",{className:"rsp-w-[1.5px] rsp-h-[4px] rsp-bg-gradient-to-t rsp-from-black rsp-to-[#333] rsp-rounded-[0.5px]"}),e.jsx("div",{className:"rsp-w-[1.5px] rsp-h-[5px] rsp-bg-gradient-to-t rsp-from-black rsp-to-[#333] rsp-rounded-[0.5px]"})]}),e.jsx("svg",{className:"rsp-w-[11px] rsp-h-[8px] rsp-text-black rsp-opacity-90",viewBox:"0 0 15 11",fill:"currentColor",children:e.jsx("path",{d:"M1.5 4.5C3.5 2.5 6 1.5 7.5 1.5S11.5 2.5 13.5 4.5M3 6.5C4.5 5 6 4.5 7.5 4.5S10.5 5 12 6.5M5 8.5C6 7.5 6.75 7.25 7.5 7.25S9 7.5 10 8.5M7.5 10.5C7.5 10.5 7.5 10.5 7.5 10.5"})}),e.jsxs("div",{className:"rsp-relative rsp-flex rsp-items-center",children:[e.jsx("div",{className:"rsp-w-[18px] rsp-h-[9px] rsp-border-[1px] rsp-border-black rsp-border-opacity-60 rsp-rounded-[2px] rsp-relative",children:e.jsx("div",{className:"rsp-absolute rsp-inset-[1px] rsp-bg-gradient-to-r rsp-from-[#34d399] rsp-to-[#10b981] rsp-rounded-[1px] rsp-w-[13px] rsp-shadow-inner"})}),e.jsx("div",{className:"rsp-absolute rsp-right-[-2px] rsp-top-[2px] rsp-w-[1px] rsp-h-[5px] rsp-bg-black rsp-bg-opacity-60 rsp-rounded-[0.5px]"})]})]})]}),e.jsxs("div",{className:"rsp-absolute rsp-top-[45px] rsp-left-0 rsp-right-0 rsp-h-[60px] rsp-bg-gradient-to-r rsp-from-[#075E54] rsp-via-[#0a6b5f] rsp-to-[#128C7E] rsp-flex rsp-items-center rsp-px-4 rsp-gap-3 rsp-z-10 rsp-shadow-[0_2px_8px_rgba(0,0,0,0.15)]",children:[e.jsx("svg",{className:"rsp-w-5 rsp-h-5 rsp-text-white rsp-opacity-95 rsp-drop-shadow-sm",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.42-1.41L7.83 13H20v-2z"})}),e.jsx("div",{className:"rsp-w-[36px] rsp-h-[36px] rsp-bg-gradient-to-br rsp-from-[#25D366] rsp-via-[#20c55e] rsp-to-[#128C7E] rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-shadow-[0_2px_6px_rgba(0,0,0,0.2)] rsp-border-[2px] rsp-border-white rsp-border-opacity-30",children:e.jsx("span",{className:"rsp-text-white rsp-text-[14px] rsp-font-bold rsp-drop-shadow-sm",children:"B"})}),e.jsxs("div",{className:"rsp-flex-1",children:[e.jsx("div",{className:"rsp-text-white rsp-text-[14px] rsp-font-semibold rsp-drop-shadow-sm rsp-tracking-tight",children:"Business"}),e.jsx("div",{className:"rsp-text-[#B8E6D1] rsp-text-[11px] rsp-opacity-85 rsp-font-medium",children:"WhatsApp Business"})]}),e.jsxs("div",{className:"rsp-flex rsp-gap-4",children:[e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-white rsp-opacity-90 rsp-drop-shadow-sm",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})}),e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-white rsp-opacity-90 rsp-drop-shadow-sm",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"})})]})]}),e.jsxs("div",{className:"rsp-absolute rsp-top-[105px] rsp-left-0 rsp-right-0 rsp-bottom-[60px] rsp-bg-gradient-to-b rsp-from-[#E8E2DB] rsp-via-[#E5DDD5] rsp-to-[#DDD5CC] rsp-overflow-y-auto",children:[e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-opacity-[0.03]",style:{backgroundImage:`url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.08'%3E%3Cpath d='M40 40c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8zm0-32c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8zm32 32c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8 8-3.6 8-8z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E")`}}),e.jsx("div",{className:"rsp-relative rsp-px-4 rsp-py-4",children:m?e.jsxs("div",{className:"rsp-flex rsp-flex-col rsp-items-start",children:[(w||a.headerType==="MEDIA"||a.buttons.length>0)&&e.jsx("div",{className:"rsp-flex rsp-justify-start rsp-mb-1.5",children:e.jsxs("div",{className:"rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-rounded-[12px] rsp-max-w-[220px] rsp-shadow-[0_2px_8px_rgba(0,0,0,0.08)] rsp-relative rsp-border rsp-border-gray-100 rsp-animate-slide-up rsp-overflow-hidden",children:[a.headerType==="MEDIA"&&a.mediaUrl&&e.jsxs("div",{className:"rsp-w-full rsp-overflow-hidden",children:[a.mediaType==="IMAGE"&&e.jsx("img",{src:a.mediaUrl,alt:"Header media",className:"rsp-w-full rsp-max-h-[150px] rsp-object-cover rsp-block",onError:y=>{y.currentTarget.style.display="none"}}),a.mediaType==="VIDEO"&&e.jsxs("div",{className:"rsp-relative rsp-min-w-[150px] rsp-w-full rsp-h-[150px] rsp-bg-gradient-to-br rsp-from-gray-800 rsp-to-gray-900 rsp-flex rsp-items-center rsp-justify-center",children:[e.jsx("div",{className:"rsp-w-12 rsp-h-12 rsp-bg-black rsp-bg-opacity-70 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-shadow-lg rsp-border rsp-border-white rsp-border-opacity-20",children:e.jsx("div",{className:"rsp-w-0 rsp-h-0 rsp-border-l-[8px] rsp-border-l-white rsp-border-t-[6px] rsp-border-t-transparent rsp-border-b-[6px] rsp-border-b-transparent rsp-ml-1"})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-2 rsp-right-2 rsp-bg-black rsp-bg-opacity-75 rsp-text-white rsp-text-[10px] rsp-px-2 rsp-py-1 rsp-rounded-full rsp-shadow-md rsp-backdrop-blur-sm",children:"📹 Video"})]}),a.mediaType==="DOCUMENT"&&e.jsx("div",{className:"rsp-p-3 rsp-bg-gradient-to-r rsp-from-gray-50 rsp-to-gray-100",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-gap-2",children:[e.jsx("div",{className:"rsp-w-10 rsp-h-10 rsp-bg-gradient-to-br rsp-from-red-500 rsp-to-red-600 rsp-rounded-lg rsp-flex rsp-items-center rsp-justify-center rsp-shadow-md",children:e.jsx("span",{className:"rsp-text-white rsp-text-[9px] rsp-font-bold",children:"PDF"})}),e.jsxs("div",{children:[e.jsx("div",{className:"rsp-text-[12px] rsp-font-semibold rsp-text-gray-800",children:"Document"}),e.jsx("div",{className:"rsp-text-[10px] rsp-text-gray-600",children:"PDF • 1.2 MB"})]})]})})]}),a.headerType==="TEXT"&&a.headerText&&e.jsx("div",{className:"rsp-px-4 rsp-pt-3 rsp-pb-2",children:e.jsx("div",{className:"rsp-text-[15px] rsp-font-semibold rsp-text-[#111b21] rsp-leading-[1.3] rsp-tracking-normal rsp-break-words",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:i(a.headerText)})}),a.body&&e.jsx("div",{className:`rsp-px-4 ${a.headerType==="MEDIA"?"rsp-pt-2":"rsp-pt-3"} ${a.footer||a.buttons.length>0,"rsp-pb-2"}`,children:e.jsx("div",{className:"rsp-text-[14px] rsp-text-[#111b21] rsp-leading-[1.4] rsp-whitespace-pre-wrap rsp-tracking-normal rsp-break-words",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:p(a.body)})}),a.footer&&e.jsx("div",{className:`rsp-px-4 ${a.buttons.length>0,"rsp-pb-2"}`,children:e.jsx("div",{className:"rsp-text-[12px] rsp-text-[#667781] rsp-pt-2 rsp-border-t rsp-border-gray-100 rsp-break-words rsp-break-all rsp-whitespace-pre-wrap",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:a.footer})}),a.buttons.length>0&&e.jsx("div",{className:"rsp-border-t rsp-border-gray-100",children:e.jsx(qa,{buttons:a.buttons,onShowAllOptions:()=>r(!0)})}),a.buttons.length===0&&e.jsx("div",{className:"rsp-px-4 rsp-pb-2 rsp-text-right",children:e.jsxs("div",{className:"rsp-text-[11px] rsp-text-[#667781] rsp-flex rsp-items-center rsp-justify-end rsp-gap-1 rsp-opacity-80",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:["9:41 AM",e.jsx("svg",{className:"rsp-w-3 rsp-h-3 rsp-text-[#53bdeb]",viewBox:"0 0 16 15",fill:"currentColor",children:e.jsx("path",{d:"M15.01 3.316l-.478-.372a.365.365 0 0 0-.51.063L8.666 9.879a.32.32 0 0 1-.484.033l-.358-.325a.319.319 0 0 0-.484.032l-.378.483a.418.418 0 0 0 .036.541l1.32 1.266c.143.14.361.125.484-.033l6.272-8.048a.366.366 0 0 0-.064-.512zm-4.1 0l-.478-.372a.365.365 0 0 0-.51.063L4.566 9.879a.32.32 0 0 1-.484.033L1.891 7.769a.319.319 0 0 0-.484.032l-.378.483a.418.418 0 0 0 .036.541l3.61 3.463c.143.14.361.125.484-.033l6.272-8.048a.365.365 0 0 0-.064-.512z"})})]})})]})}),a.type==="CAROUSEL"&&(((E=(k=a.carousel)==null?void 0:k.cards)==null?void 0:E.length)||0)>0&&e.jsx("div",{className:"rsp-flex rsp-justify-start rsp-mb-1.5",children:e.jsx("div",{className:"rsp-w-[220px] rsp-animate-slide-up",children:e.jsx("div",{className:"rsp-bg-gradient-to-b rsp-from-white rsp-to-[#fafafa] rsp-rounded-[12px] rsp-overflow-hidden rsp-shadow-[0_2px_8px_rgba(0,0,0,0.08)] rsp-border rsp-border-gray-100 rsp-relative rsp-min-h-[280px] rsp-flex rsp-flex-col",children:e.jsxs("div",{className:"rsp-relative rsp-flex-1 rsp-flex rsp-flex-col",children:[(()=>{var g,x;const y=a.carousel&&a.carousel.cards.length>0?a.carousel.cards[t]||a.carousel.cards[0]:void 0;return e.jsxs("div",{className:"rsp-flex rsp-flex-col rsp-h-full",children:[e.jsx("div",{className:"rsp-relative rsp-w-full rsp-h-[140px] rsp-bg-gray-100 rsp-group rsp-flex-shrink-0",children:y&&y.mediaUrl?e.jsxs(e.Fragment,{children:[((g=a.carousel)==null?void 0:g.type)==="IMAGE"?e.jsx("img",{src:y.mediaUrl,alt:"Carousel card",className:"rsp-w-full rsp-h-full rsp-object-cover",onError:h=>{h.currentTarget.style.display="none"}}):e.jsx("div",{className:"rsp-relative rsp-w-full rsp-h-full rsp-bg-gradient-to-br rsp-from-gray-800 rsp-to-gray-900 rsp-flex rsp-items-center rsp-justify-center",children:e.jsx("div",{className:"rsp-w-10 rsp-h-10 rsp-bg-black rsp-bg-opacity-70 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-shadow-lg",children:e.jsx("div",{className:"rsp-w-0 rsp-h-0 rsp-border-l-[6px] rsp-border-l-white rsp-border-t-[5px] rsp-border-t-transparent rsp-border-b-[5px] rsp-border-b-transparent rsp-ml-1"})})}),a.carousel&&a.carousel.cards.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>n(h=>h>0?h-1:a.carousel.cards.length-1),className:"rsp-absolute rsp-left-1 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-z-20 rsp-w-6 rsp-h-6 rsp-bg-black rsp-bg-opacity-50 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-text-white hover:rsp-bg-opacity-80 rsp-transition-all rsp-opacity-0 group-hover:rsp-opacity-100",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})})}),e.jsx("button",{onClick:()=>n(h=>h<a.carousel.cards.length-1?h+1:0),className:"rsp-absolute rsp-right-1 rsp-top-1/2 rsp-transform -rsp-translate-y-1/2 rsp-z-20 rsp-w-6 rsp-h-6 rsp-bg-black rsp-bg-opacity-50 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-text-white hover:rsp-bg-opacity-80 rsp-transition-all rsp-opacity-0 group-hover:rsp-opacity-100",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})})]}),e.jsxs("div",{className:"rsp-absolute rsp-top-2 rsp-right-2 rsp-bg-black rsp-bg-opacity-60 rsp-text-white rsp-text-[10px] rsp-px-2 rsp-py-0.5 rsp-rounded-full rsp-backdrop-blur-sm",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:[t+1,"/",a.carousel?a.carousel.cards.length:0]})]}):e.jsx("div",{className:"rsp-w-full rsp-h-full rsp-flex rsp-items-center rsp-justify-center",children:e.jsxs("div",{className:"rsp-text-center",children:[e.jsx("svg",{className:"rsp-w-12 rsp-h-12 rsp-mx-auto rsp-text-gray-400 rsp-mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:((x=a.carousel)==null?void 0:x.type)==="VIDEO"?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:"No media"})]})})}),e.jsx("div",{className:"rsp-px-4 rsp-py-3 rsp-flex-1 rsp-flex rsp-items-start",children:e.jsx("p",{className:"rsp-text-[13px] rsp-text-[#111b21] rsp-leading-[1.4] rsp-line-clamp-3",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:y?f(y):"Card body text..."})}),e.jsx("div",{className:"rsp-border-t rsp-border-gray-100 rsp-mt-auto",children:y&&y.buttons.length>0?e.jsx(e.Fragment,{children:y.buttons.map((h,u)=>e.jsx("div",{className:`rsp-px-4 rsp-py-3 rsp-text-center rsp-text-[14px] rsp-text-[#128C7E] rsp-font-medium rsp-break-words rsp-whitespace-pre-wrap ${u<y.buttons.length-1?"rsp-border-b rsp-border-gray-100":""}`,style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-center rsp-gap-2",children:[h.type==="URL"&&e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})}),(h.type==="CALL"||h.type==="PHONE_NUMBER")&&e.jsx("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"})}),e.jsx("span",{className:"rsp-inline-block rsp-max-w-[180px] rsp-break-words rsp-break-all rsp-whitespace-pre-wrap rsp-text-center",children:h.text})]})},h.id))}):e.jsx("div",{className:"rsp-px-4 rsp-py-3 rsp-text-center rsp-text-xs rsp-text-gray-400",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:"No buttons"})})]})})(),a.carousel&&a.carousel.cards.length>1&&e.jsx("div",{className:"rsp-flex rsp-items-center rsp-justify-center rsp-gap-1.5 rsp-py-3 rsp-bg-white rsp-border-t rsp-border-gray-100",children:a.carousel&&a.carousel.cards.map((y,g)=>e.jsx("button",{onClick:()=>n(g),className:`rsp-w-2 rsp-h-2 rsp-rounded-full rsp-transition-all ${g===t?"rsp-bg-[#128C7E] rsp-w-6":"rsp-bg-gray-300 hover:rsp-bg-gray-400"}`},g))})]})})})})]}):e.jsx("div",{className:"rsp-flex rsp-items-center rsp-justify-center rsp-h-[300px]",children:e.jsxs("div",{className:"rsp-text-center rsp-text-gray-500 rsp-animate-fade-in",children:[e.jsx("div",{className:"rsp-w-12 rsp-h-12 rsp-bg-gradient-to-br rsp-from-gray-50 rsp-to-gray-100 rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-mx-auto rsp-mb-2 rsp-shadow-md rsp-border rsp-border-gray-200",children:e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-gray-400",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h4l4 4 4-4h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"})})}),e.jsx("p",{className:"rsp-text-xs rsp-font-medium rsp-text-gray-600",children:"Start building your template"}),e.jsx("p",{className:"rsp-text-xs rsp-mt-1 rsp-text-gray-500",children:"Add content to see a live preview"})]})})})]}),e.jsxs("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-right-0 rsp-h-[60px] rsp-bg-gradient-to-r rsp-from-[#F0F2F5] rsp-via-[#EBEDF0] rsp-to-[#E8EAED] rsp-flex rsp-items-center rsp-px-4 rsp-gap-2 rsp-border-t rsp-border-gray-200 rsp-shadow-[0_-1px_4px_rgba(0,0,0,0.05)]",children:[e.jsx("svg",{className:"rsp-w-6 rsp-h-6 rsp-text-[#54656F] rsp-opacity-60",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"})}),e.jsx("div",{className:"rsp-flex-1 rsp-bg-gradient-to-r rsp-from-white rsp-to-[#fafafa] rsp-rounded-[24px] rsp-px-4 rsp-py-2 rsp-flex rsp-items-center rsp-min-h-[36px] rsp-shadow-[0_1px_2px_rgba(0,0,0,0.1)] rsp-border rsp-border-gray-200",children:e.jsx("span",{className:"rsp-text-[13px] rsp-text-[#667781] rsp-opacity-70 rsp-font-normal",children:"Type a message"})}),e.jsx("div",{className:"rsp-w-9 rsp-h-9 rsp-bg-gradient-to-br rsp-from-[#25D366] rsp-via-[#20c55e] rsp-to-[#00A884] rsp-rounded-full rsp-flex rsp-items-center rsp-justify-center rsp-shadow-[0_2px_6px_rgba(37,211,102,0.3)] rsp-border rsp-border-[#20c55e] rsp-border-opacity-30",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-white rsp-drop-shadow-sm",viewBox:"0 0 24 24",fill:"currentColor",children:e.jsx("path",{d:"M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"})})})]}),s&&e.jsx("div",{className:"rsp-absolute rsp-inset-0 rsp-bg-black rsp-bg-opacity-40 rsp-z-30 rsp-flex rsp-items-end rsp-animate-fade-in",children:e.jsxs("div",{className:"rsp-w-full rsp-bg-[#F0F2F5] rsp-rounded-t-2xl rsp-shadow-lg rsp-animate-slide-up",children:[e.jsx("div",{className:"rsp-p-4 rsp-border-b rsp-border-gray-300",children:e.jsx("h4",{className:"rsp-font-bold rsp-text-center rsp-text-gray-800 rsp-text-md",children:a.body||"Options"})}),e.jsx("div",{className:"rsp-max-h-[250px] rsp-overflow-y-auto",children:a.buttons.map((y,g)=>e.jsx("div",{className:`rsp-p-4 rsp-text-center rsp-text-[15px] rsp-text-[#128C7E] rsp-font-medium ${g<a.buttons.length-1?"rsp-border-b rsp-border-gray-300":""}`,style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:y.text},y.id))}),e.jsx("div",{onClick:()=>r(!1),className:"rsp-mt-2 rsp-p-4 rsp-text-center rsp-font-bold rsp-text-[#128C7E] rsp-bg-white rsp-cursor-pointer rsp-shadow-inner",style:{fontFamily:'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},children:"Close"})]})})]})]})]})})})]})}const Ve={name:"",category:"MARKETING",type:"BASIC",language:"en",enableClickTracking:!1,headerType:"NONE",headerText:"",body:"",footer:"",buttons:[]};function Ka({editId:a,onCancel:s}){var g,x,h;const[r,t]=j.useState(Ve),[n,l]=j.useState(!0),[i,p]=j.useState(!1),[f,m]=j.useState(!1),[w,U]=j.useState(null),[o,k]=j.useState({isOpen:!1});j.useState({isOpen:!1}),j.useEffect(()=>{if(w){const u=setTimeout(()=>{U(null)},5e3);return()=>clearTimeout(u)}},[w]);const E=async()=>{var u,v,L;try{if(m(!0),U(null),!r.name||!r.body)throw new Error("Template name and body are required");const V=localStorage.getItem("account"),b=V?JSON.parse(V):{apiKey:""};if(!b.apiKey)throw new Error("Please set your API key in the dashboard first");let N;if(a){const M=await Ca(b.apiKey,a,r);if(!M.success)throw new Error(M.message||"Update failed");N={status:"success",message:"Template updated successfully",data:{details:[{template_name:r.name,template_id:a}]}}}else if(N=await Na(b,r),N.status==="error")throw new Error(N.message);if(N.status==="error")throw new Error(N.message);k({isOpen:!0,templateName:(u=N.data)==null?void 0:u.details[0].template_name,templateId:(v=N.data)==null?void 0:v.details[0].template_id,template:(L=N.data)==null?void 0:L.template}),t(Ve)}catch(V){U(V instanceof Error?V.message:"An error occurred while creating the template")}finally{m(!1)}};j.useEffect(()=>{if(!a)return;(async()=>{try{const v=localStorage.getItem("account"),L=v?JSON.parse(v):{apiKey:""};if(!L.apiKey)throw new Error("Please set your API key in the dashboard first");const V=await Ta(L.apiKey,a);t(b=>({...b,...V}))}catch(v){console.error("Failed to load template for edit",v),U(v instanceof Error?v.message:"Failed to load template")}})()},[a]);const y=()=>{k({isOpen:!1}),s&&s()};return e.jsxs("div",{className:"rsp-min-h-screen rsp-bg-[#f5f7fc] rsp-rounded-lg rsp-shadow-sm",children:[e.jsxs("div",{className:"rsp-max-w-[1200px] rsp-mx-auto rsp-px-6 rsp-h-full",children:[e.jsx("div",{className:"rsp-py-6 rsp-border-b rsp-border-gray-200",children:e.jsxs("div",{className:"rsp-flex rsp-items-center rsp-justify-between",children:[e.jsx("h1",{className:"rsp-text-2xl rsp-font-semibold rsp-text-[#0043ff]",children:a?"Edit Template":"Add Template"}),e.jsx("div",{className:"rsp-flex rsp-items-center rsp-gap-3",children:e.jsxs("button",{onClick:()=>l(!n),className:`rsp-flex rsp-items-center rsp-gap-2 rsp-px-4 rsp-py-2 rsp-rounded-md rsp-text-sm rsp-font-medium rsp-transition-colors
103
+ ${n?"rsp-bg-blue-100 rsp-text-blue-700 rsp-border rsp-border-blue-200":"rsp-bg-gray-100 rsp-text-gray-700 rsp-border rsp-border-gray-200"}`,children:[e.jsxs("svg",{className:"rsp-w-4 rsp-h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]}),n?"Hide Preview":"Show Preview"]})})]})}),e.jsxs("div",{className:`rsp-py-8 ${n?"rsp-grid xl:rsp-grid-cols-[1fr,400px] rsp-gap-8":""}`,children:[e.jsxs("div",{className:`rsp-space-y-8 ${n?"":"rsp-max-w-4xl rsp-mx-auto"}`,children:[e.jsxs("div",{className:"rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm rsp-space-y-6",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:["Template Name ",e.jsx("span",{className:"rsp-text-red-500",children:"*"})]}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("input",{type:"text",value:r.name,onChange:u=>t({...r,name:u.target.value.replace(/\s/g,"_").replace(/[^a-zA-Z0-9_]/g,"").replace(/_+/g,"_")}),onBlur:()=>p(!0),className:"rsp-w-full rsp-px-0 rsp-py-2 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm focus:rsp-outline-none focus:rsp-border-blue-500 rsp-bg-transparent",placeholder:"Template name cannot Have capital letters and space"}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500"})]}),!r.name&&i&&e.jsx("p",{className:"rsp-text-xs rsp-text-red-600 rsp-mt-1",children:"Template name is required."}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:"Template name cannot Have capital letters and space"})]}),e.jsxs("div",{className:"rsp-grid rsp-grid-cols-2 rsp-gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Category"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsxs("select",{value:r.category,onChange:u=>t({...r,category:u.target.value}),className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:[e.jsx("option",{value:"MARKETING",children:"Marketing"}),e.jsx("option",{value:"UTILITY",children:"Utility"})]}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500"})]}),e.jsx("p",{className:"rsp-text-xs rsp-text-gray-500 rsp-mt-1",children:"Choose Marketing for promotional communication and Utility for informational messages."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Language"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsx("select",{value:r.language,onChange:u=>t({...r,language:u.target.value}),className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:Ma.map(u=>e.jsx("option",{value:u.value,children:u.label},u.value))}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-8 rsp-h-0.5 rsp-bg-red-500"})]})]})]}),e.jsxs("div",{className:"rsp-grid rsp-grid-cols-2 rsp-gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Template Type"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsxs("select",{value:r.type,onChange:u=>{const v=u.target.value,L=r.type;v!==L&&t(v==="CAROUSEL"?{name:r.name,category:r.category,type:v,language:r.language,enableClickTracking:r.enableClickTracking,headerType:"NONE",headerText:"",body:"",footer:"",buttons:[],carousel:{type:"IMAGE",cards:[{id:Math.random().toString(36).substr(2,9),headerType:"MEDIA",mediaType:"IMAGE",mediaUrl:"",body:"",buttons:[]}]}}:{name:r.name,category:r.category,type:v,language:r.language,enableClickTracking:r.enableClickTracking,headerType:"NONE",headerText:"",body:"",footer:"",buttons:[]})},className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:[e.jsx("option",{value:"BASIC",children:"Basic"}),e.jsx("option",{value:"CAROUSEL",children:"Carousel"})]}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})}),e.jsx("div",{className:"rsp-absolute rsp-bottom-0 rsp-left-0 rsp-w-4 rsp-h-0.5 rsp-bg-red-500"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"rsp-block rsp-text-sm rsp-font-medium rsp-text-gray-700 rsp-mb-2",children:"Enable click tracking"}),e.jsxs("div",{className:"rsp-relative",children:[e.jsxs("select",{value:r.enableClickTracking.toString(),onChange:u=>t({...r,enableClickTracking:u.target.value==="true"}),className:"rsp-w-full rsp-px-0 rsp-border-0 rsp-border-b rsp-border-gray-300 rsp-text-sm rsp-bg-transparent rsp-appearance-none rsp-h-10 rsp-leading-10 focus:rsp-outline-none focus:rsp-border-blue-500",children:[e.jsx("option",{value:"false",children:"False"}),e.jsx("option",{value:"true",children:"True"})]}),e.jsx("div",{className:"rsp-absolute rsp-inset-y-0 rsp-right-0 rsp-flex rsp-items-center rsp-px-2 rsp-pointer-events-none",children:e.jsx("svg",{className:"rsp-w-4 rsp-h-4 rsp-text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]})]})]}),e.jsx("div",{className:"rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm",children:e.jsx($a,{template:r,setTemplate:t})}),e.jsxs("div",{className:"rsp-bg-white rsp-p-6 rsp-rounded-lg rsp-shadow-sm rsp-pt-6 rsp-border-t rsp-border-gray-200",children:[w&&e.jsxs("div",{className:"rsp-mb-4 rsp-flex rsp-items-start rsp-gap-3 rsp-p-4 rsp-rounded-lg rsp-bg-red-50 rsp-border-l-4 rsp-border-l-red-500 rsp-relative rsp-animate-fade-in",children:[e.jsx(ve,{className:"rsp-w-5 rsp-h-5 rsp-text-red-500 rsp-flex-shrink-0 rsp-mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"rsp-text-sm rsp-font-medium rsp-text-red-800",children:"Error"}),e.jsx("p",{className:"rsp-mt-1 rsp-text-sm rsp-text-red-700",children:w})]}),e.jsx("button",{onClick:()=>U(null),className:"rsp-absolute rsp-top-2 rsp-right-2 rsp-p-1 hover:rsp-bg-red-100 rsp-rounded-full",children:e.jsx(ne,{className:"rsp-w-4 rsp-h-4 rsp-text-red-500"})})]}),e.jsxs("div",{className:"rsp-flex rsp-gap-4",children:[e.jsx("button",{onClick:()=>s==null?void 0:s(),className:"rsp-flex-1 rsp-py-3 rsp-px-6 rsp-rounded-md rsp-transition-colors rsp-text-gray-700 rsp-font-medium rsp-text-sm rsp-bg-white rsp-border rsp-border-gray-300 hover:rsp-bg-gray-50",children:"Cancel"}),e.jsx("button",{onClick:E,disabled:f,className:`rsp-flex-1 rsp-py-3 rsp-px-6 rsp-rounded-md rsp-transition-colors rsp-text-white rsp-font-medium rsp-text-sm
104
104
  ${f?"rsp-bg-blue-600 rsp-cursor-not-allowed":"rsp-bg-blue-600 hover:rsp-bg-blue-700 active:rsp-bg-blue-800"}`,children:f?a?"Resubmitting for Approval...":"Submitting for Approval...":a?"Resubmit for Approval":"Submit for Approval"})]})]})]}),n&&e.jsx("div",{children:e.jsx("div",{className:"rsp-sticky rsp-top-4",children:e.jsx(Ga,{template:r})})})]})]}),e.jsx(me,{isOpen:o.isOpen,onClose:y,title:"Success",children:e.jsxs("div",{className:"rsp-space-y-4",children:[e.jsx("div",{className:"rsp-text-center",children:e.jsx("p",{className:"rsp-text-green-600 rsp-font-medium rsp-mb-4",children:"Template created successfully!"})}),o.templateId&&e.jsxs("div",{className:"rsp-bg-gray-50 rsp-p-4 rsp-rounded-lg rsp-space-y-2",children:[e.jsxs("div",{className:"rsp-flex rsp-justify-between",children:[e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:"Template Name:"}),e.jsx("span",{className:"rsp-text-sm rsp-font-medium",children:o.templateName})]}),e.jsxs("div",{className:"rsp-flex rsp-justify-between",children:[e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:"Template ID:"}),e.jsx("span",{className:"rsp-text-sm rsp-font-medium rsp-font-mono",children:o.templateId})]}),((g=o.template)==null?void 0:g.meta_tid)&&e.jsxs("div",{className:"rsp-flex rsp-justify-between",children:[e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:"Meta TID:"}),e.jsx("span",{className:"rsp-text-sm rsp-font-medium rsp-font-mono",children:o.template.meta_tid})]}),((x=o.template)==null?void 0:x.status)&&e.jsxs("div",{className:"rsp-flex rsp-justify-between",children:[e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:"Status:"}),e.jsx("span",{className:`rsp-text-sm rsp-font-medium rsp-capitalize ${o.template.status==="pending"?"rsp-text-yellow-600":o.template.status==="approved"?"rsp-text-green-600":"rsp-text-red-600"}`,children:o.template.status})]}),((h=o.template)==null?void 0:h.quality)&&e.jsxs("div",{className:"rsp-flex rsp-justify-between",children:[e.jsx("span",{className:"rsp-text-sm rsp-text-gray-600",children:"Quality:"}),e.jsx("span",{className:"rsp-text-sm rsp-font-medium rsp-capitalize",children:o.template.quality})]})]})]})})]})}exports.CreateTemplate=Ka;exports.Dashboard=na;exports.TrustSignalProvider=sa;