@nexlylab/widget 1.32.17 → 1.33.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.
- package/dist/INSTALL.txt +1 -1
- package/dist/runtime/{1.32.17/chunks/ClickToLoadEmbed-D9eMaBG8-r9dN9klo.js → 1.33.0/chunks/ClickToLoadEmbed-DdH19Upf-CnpjmfE1.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/PanelInfoVideo-DMU0-9Az-BrU-Qlul.js → 1.33.0/chunks/PanelInfoVideo-XFcVoL2c-qpxDXdLm.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/allowed-elements-BXnLJV1S-C-_lr2zm.js → 1.33.0/chunks/allowed-elements-C0OfX2zF-DIBV8lKu.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/assistant-link-components-D0uKk8Hv-xEDu0ls0.js → 1.33.0/chunks/assistant-link-components-gMuMhmaU-rHpeX4O6.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/assistant-link-policy-CogLpq-3-Cc-yj-a-.js → 1.33.0/chunks/assistant-link-policy-DlGAtyk7-By6jpR50.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/block-rating-BgOeTm52-CoiP5C2K.js → 1.33.0/chunks/block-rating-CAVRRYuG-CQMNokIy.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/external-url-ninK7gY9-CJQjg_od.js → 1.33.0/chunks/external-url-JbUnX7Da-rLiy7c9v.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DsQ3ssZW-DbuSZfeK.js → 1.33.0/chunks/index--H6hRpBJ-F9_TzvkO.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-ByEsnceF-CSQQTbsg.js → 1.33.0/chunks/index--pcCOJWb-BzpgdoE8.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CHUW1nlj-DAdxCQyi.js → 1.33.0/chunks/index-7yhyghzH-BlFXtfQb.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-D3fwWbIM-BcW8HKb8.js → 1.33.0/chunks/index-BCxeWwto-B9PuY2Gx.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-zmuItIIf-oy07dUaV.js → 1.33.0/chunks/index-BO0vI80C-qK4w7DnX.js} +4 -4
- package/dist/runtime/{1.32.17/chunks/index-CaHbIY6I-QeFj7CR9.js → 1.33.0/chunks/index-BP1Q45X4-f3F4IxQ5.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CPjLHywY-DBhSkJ7i.js → 1.33.0/chunks/index-BPfUysTZ-CV5ZiVsD.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-C5olj-Fr-C3bBvEcm.js → 1.33.0/chunks/index-BWY1nqf0-DX50C5MZ.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-1JK_DoDz-D6wzHiS0.js → 1.33.0/chunks/index-BblCrrAW-bh6F7tw3.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-BWMbr4oS-Dsa9X9U7.js → 1.33.0/chunks/index-Bd_8PmPr-CgO1smBF.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DnDMirl9-Dp5AxBD4.js → 1.33.0/chunks/index-BjHXOMPQ-Bt7j8evJ.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-D6YQ4lFv-pbKZ0WGs.js → 1.33.0/chunks/index-BwnCq3yC-LScXPMbE.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DzHo_iNR-Dm9kbc85.js → 1.33.0/chunks/index-BzVJMW3i-Bhh8_8Oh.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-D3OBLy0s-k8E4HOBM.js → 1.33.0/chunks/index-CDlumsdH-BgpZz7kC.js} +3 -3
- package/dist/runtime/{1.32.17/chunks/index-D30-Ox5Z-BLxOZxZv.js → 1.33.0/chunks/index-CH-C6uk_-B-pT4hKt.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CpCgmp7C-C9wFr7fa.js → 1.33.0/chunks/index-CNP-4dFm-BlRhWcs1.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DDHI4Kxr-DrVjDDba.js → 1.33.0/chunks/index-CNbQ508J-BPOHZMXu.js} +4 -4
- package/dist/runtime/{1.32.17/chunks/index-Dwtd4id8-CiRb-0NX.js → 1.33.0/chunks/index-CPGSyaZ4-BoVmvEOm.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DAai_PkG-Dr1V6OGz.js → 1.33.0/chunks/index-CVtuVQCx-Dtq7n928.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-Ba5nbqA8-B620AdXN.js → 1.33.0/chunks/index-CYP-tLa5-DLVDVk-F.js} +4 -4
- package/dist/runtime/{1.32.17/chunks/index-CtNAXlUH-DQBGsPwB.js → 1.33.0/chunks/index-CZCcZigQ-qH_mrcVT.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-BsUIWTU6-BQ7DWJhg.js → 1.33.0/chunks/index-CZSW9eXg-BwcGrX1b.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-Ce0ahORn-bdo5pwX-.js → 1.33.0/chunks/index-Cfy6Ocqe-CzwqZYRk.js} +2 -2
- package/dist/runtime/1.33.0/chunks/index-Ci7P37Ya-W5nof5Mx.js +6 -0
- package/dist/runtime/{1.32.17/chunks/index-BDhTixUR-Aqz1AnQ5.js → 1.33.0/chunks/index-CmM1q2bg-D6H0juMn.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-BlGeDG8W-CoI3p0S7.js → 1.33.0/chunks/index-CnknkPUN-Yl3jEGAx.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-BJxJr5j5-C_0Ll4qr.js → 1.33.0/chunks/index-D9fi5TQ9-k8zxZkfU.js} +2 -2
- package/dist/runtime/1.33.0/chunks/index-DG6McKPZ-CqZ9_vG_.js +2 -0
- package/dist/runtime/{1.32.17/chunks/index-Bl_8GpS0-CahNhEcx.js → 1.33.0/chunks/index-DOJHU9qy-Bil-vDLm.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-C_zmepmr-H31PHMqm.js → 1.33.0/chunks/index-DTa1aDGz-Deg8QEW2.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DAJM_cb9-VhJcCfAC.js → 1.33.0/chunks/index-DUV1wU5j-ErDxRmJu.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DMM00SC5-R_xuAEQV.js → 1.33.0/chunks/index-DZNxd978-BmIQ-NmU.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-B0-9mIbB-DP0QKkgf.js → 1.33.0/chunks/index-DsyaMk1k-DpMzyqHN.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-D5EHdeyl-_M0CWPEY.js → 1.33.0/chunks/index-HIu_g6Cr-CEIHlemy.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-Wza_7CGb-W1lJrIDD.js → 1.33.0/chunks/index-NPLN6oCC-VW9D8cgC.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CIFQrVkq-DUgMllqN.js → 1.33.0/chunks/index-S2W2KqpV-PMvqlUvO.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DIMi29lU-3B-eE3K7.js → 1.33.0/chunks/index-SV2KdT0_-BZw4n83V.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-DzCfV77F-C1BzRUwZ.js → 1.33.0/chunks/index-qzvjftnO-CDVtcfdt.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CM0iRJSw-pkywvGDF.js → 1.33.0/chunks/index-s0zHGN1t-DWm0RYZF.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-B97ASd4H-ZRnEJoQe.js → 1.33.0/chunks/index-uYSCRIpT-qsVnaLmo.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-CSDD7Z6C-BpgnWlB8.js → 1.33.0/chunks/index-v9CNsbwM-CavFmRiD.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index-_R8QyLD7-TEMHje2B.js → 1.33.0/chunks/index-xQDKGkvA-pCzSL4DD.js} +2 -2
- package/dist/runtime/{1.32.17/chunks/index.modern-CioVZ357-BA5NTOmY.js → 1.33.0/chunks/index.modern-CioVZ357-nfRNslCS.js} +2 -2
- package/dist/runtime/1.33.0/nexly.js +61 -0
- package/dist/v1.js +1 -1
- package/package.json +1 -1
- package/dist/runtime/1.32.17/chunks/index-D0qsMexH-I68tb-d3.js +0 -2
- package/dist/runtime/1.32.17/chunks/index-tapacGlG--YMQ21rc.js +0 -6
- package/dist/runtime/1.32.17/nexly.js +0 -61
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-BPDIV1BN-DINkyYvc.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-BcsmWDTX-Dw9WA5Ac.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-C262wwK4-DpyhuXqd.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-DMQkz1bV-BuMYksln.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/index-DZADUAKv-DPfvWVuj.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +0 -0
- /package/dist/runtime/{1.32.17 → 1.33.0}/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as t,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as t,j as e,e as N}from"../nexly.js";const S={slug:"chat-session-nav",name:"Chat Session Navigator",version:"1.0.0",category:"interactive",configSchema:{},defaultConfig:{},sizing:{minWidth:200,preferredHeight:"fill",scrollable:!0},supportedPlacements:["sidebar","main"],events:{emits:[{name:"chat:select-session",description:"User selected a past chat session"}]}};function E(a,i){const d=Date.now()-new Date(a).getTime(),o=Math.floor(d/6e4);if(o<1)return i("time.just_now");if(o<60)return i("time.minutes_ago",{count:o});const c=Math.floor(o/60);return c<24?i("time.hours_ago",{count:c}):i("time.days_ago",{count:Math.floor(c/24)})}function H({actions:a,baseUrl:i,productId:d,i18n:o,auth:c,sessionId:v}){const n=o?.t??(s=>s),f=c?.jwt,[p,l]=t.useState(!1),[x,w]=t.useState([]),[h,b]=t.useState(!1),[j,g]=t.useState(null),[u,_]=t.useState(v??null);t.useEffect(()=>{_(v??null)},[v]);const m=t.useCallback(async()=>{b(!0),g(null);try{const s=await fetch(`${i}/api/chat/sessions?productId=${encodeURIComponent(d||"")}`,{headers:{...f?{Authorization:`Bearer ${f}`}:{}},credentials:"include"});if(!s.ok)throw new Error(`HTTP ${s.status}`);const r=await s.json();if(!r.success)throw new Error("Invalid response");w(r.data?.sessions??[])}catch{g(n("chat_session_nav.load_error"))}finally{b(!1)}},[i,f,d,n]);t.useEffect(()=>a.on("chat:session",s=>{const{sessionId:r}=s;r&&_(r),p&&m()}),[a,m,p]),t.useEffect(()=>a.on("chat:showHistory",()=>{l(!0),m()}),[a,m]),t.useEffect(()=>a.on("chat:clearHistory",()=>{l(!1)}),[a]);const y=t.useCallback(s=>{s!==u&&(_(s),a.emit("chat:select-session",{sessionId:s}),l(!1))},[a,u]),k=t.useCallback(()=>{a.emit("chat:clearHistory",void 0),_(null),l(!1)},[a]),C=t.useCallback(()=>{l(!1)},[]);return p?e.jsxs(N,{blockType:"chat-session-nav",children:[e.jsxs("div",{className:"es-csn__header",children:[e.jsx("span",{className:"es-csn__header-title",children:n("chat_session_nav.title")}),e.jsxs("div",{className:"es-csn__header-actions",children:[e.jsx("button",{type:"button",className:"es-csn__action-btn","aria-label":n("chat_session_nav.new_session"),title:n("chat_session_nav.new_session"),onClick:k,children:e.jsxs("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[e.jsx("path",{d:"M12 5H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7"}),e.jsx("path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"})]})}),e.jsx("button",{type:"button",className:"es-csn__close-btn","aria-label":n("chat_session_nav.close"),onClick:C,children:"✕"})]})]}),e.jsx("div",{className:"es-block__body",children:e.jsxs("div",{className:"es-csn__list",role:"list","aria-label":n("chat_session_nav.list_aria"),children:[h&&e.jsx("div",{className:"es-csn__loading",role:"status",children:n("chat_session_nav.loading")}),j&&!h&&e.jsx("div",{className:"es-csn__error",role:"alert",children:j}),!h&&!j&&x.length===0&&e.jsx("div",{className:"es-csn__empty",children:n("chat_session_nav.empty")}),!h&&x.map(s=>e.jsxs("button",{role:"listitem",type:"button",className:`es-csn__item${s.id===u?" es-csn__item--active":""}`,onClick:()=>y(s.id),"aria-current":s.id===u?"true":void 0,children:[e.jsx("div",{className:"es-csn__item-preview",children:s.lastUserMessage??n("chat_session_nav.no_preview")}),e.jsxs("div",{className:"es-csn__item-meta",children:[e.jsx("span",{children:E(s.updatedAt,n)}),s.messageCount>0&&e.jsx("span",{children:n("chat_session_nav.message_count",{count:s.messageCount})})]})]},s.id))]})})]}):null}export{H as Component,S as manifest};
|
|
2
|
+
//# sourceMappingURL=index-DZNxd978-BmIQ-NmU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as S,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as S,j as e,e as _,l as C}from"../nexly.js";const D={slug:"new-member-onboarding-tracker",name:"New Member Onboarding Tracker",version:"1.0.0",category:"interactive",requiredService:"new-member-onboarding-tracker",configSchema:{properties:{mode:{type:"string",default:"basic"},showStreak:{type:"boolean",default:!0}}},defaultConfig:{mode:"basic",showStreak:!0},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"new-member-onboarding-tracker",inputSchema:{type:"object",properties:{steps:{type:"array",items:{type:"object",properties:{id:{type:"string"},label:{type:"string"},completed:{type:"boolean"},timeEstimate:{type:"string"}}}},completedCount:{type:"number"},totalCount:{type:"number"},daysSinceJoin:{type:"number"},aiMessage:{type:"string"},streak:{type:"number"},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",daysSinceJoin:2,completedCount:2,totalCount:6,streak:3,aiMessage:"Great progress! Setting up your profile is key — it helps your upline and new contacts understand your focus area. Takes about 5 minutes.",steps:[{id:"1",label:"Watch welcome video",completed:!0,timeEstimate:"5 min"},{id:"2",label:"Complete your profile",completed:!0,timeEstimate:"10 min"},{id:"3",label:"Join the team chat group",completed:!1,timeEstimate:"2 min"},{id:"4",label:"Schedule your first 1-on-1 with upline",completed:!1,timeEstimate:"5 min"},{id:"5",label:"Place your first personal purchase",completed:!1,timeEstimate:"15 min"},{id:"6",label:"Share your first product post",completed:!1,timeEstimate:"10 min"}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — checklist + next action",value:"basic"},{label:"Pro — guided steps with AI coaching",value:"pro"}],group:"Display"},{id:"showStreak",type:"toggle",label:"Show streak counter (pro mode)",default:!0,group:"Display"}],events:{emits:[{name:"nmot:stepFocused",description:"User focused a step in pro mode"},{name:"nmot:stepCompleted",description:"User marked a step as done"}],listens:[{name:"nmot:refresh",description:"Force refresh onboarding step data"}]}};function J({data:t,config:b,actions:d,metadata:u,i18n:f}){const a=f?.t??(s=>s),r=b.mode??t.mode??"basic",v=b.showStreak??!0,n=t.steps??[],m=t.completedCount??n.filter(s=>s.completed).length,i=t.totalCount??n.length,g=t.daysSinceJoin??0,h=t.aiMessage,x=t.streak??0,[y,j]=S.useState(()=>n.find(s=>!s.completed)?.id??null);if(n.length===0&&!t.error)return e.jsx(_,{blockType:"new-member-onboarding-tracker",children:e.jsxs("div",{className:"es-block__body es-nmot__body",children:[e.jsx("div",{className:"es-nmot__header",children:e.jsx("div",{className:"es-nmot__day-badge",children:a("onboarding.day_badge",{n:1})})}),e.jsxs("div",{className:"es-nmot__progress-wrap",children:[e.jsxs("div",{className:"es-nmot__progress-label",children:[e.jsx("span",{children:u?.dataQuality==="none"?a("onboarding.signin_prompt"):a("onboarding.getting_started")}),e.jsx("span",{children:"0/0"})]}),e.jsx("div",{className:"es-nmot__progress-bar",role:"progressbar","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"es-nmot__progress-fill",style:{width:"0%"}})})]}),e.jsx("p",{style:{fontSize:13,color:"var(--es-color-on-surface-muted, #4B5563)",margin:"8px 0 0"},children:u?.dataQuality==="none"?a("onboarding.signin_steps_hint"):a("onboarding.empty")})]})});if(t.error)return e.jsx(_,{blockType:"new-member-onboarding-tracker",error:C(t.error)});const c=i>0?Math.round(m/i*100):0,l=m>=i;n.find(s=>s.id===y);function N(s){r==="pro"&&(j(s.id),d.emit("nmot:stepFocused",{stepId:s.id}))}function k(s){d.call("completeStep",{stepId:s}).catch(()=>{}),d.emit("nmot:stepCompleted",{stepId:s});const p=n.find(o=>!o.completed&&o.id!==s);j(p?.id??null)}return e.jsx(_,{blockType:"new-member-onboarding-tracker",children:e.jsxs("div",{className:"es-block__body es-nmot__body",children:[e.jsxs("div",{className:"es-nmot__header",children:[e.jsx("div",{className:"es-nmot__day-badge",children:a("onboarding.day_badge",{n:g+1})}),r==="pro"&&v&&x>0&&e.jsxs("div",{className:"es-nmot__streak",children:[e.jsx("span",{className:"es-nmot__streak-icon","aria-hidden":"true",children:"🔥"}),e.jsx("span",{className:"es-nmot__streak-count",children:x}),e.jsx("span",{className:"es-nmot__streak-label",children:a("onboarding.day_streak")})]})]}),e.jsxs("div",{className:"es-nmot__progress-wrap",children:[e.jsxs("div",{className:"es-nmot__progress-label",children:[e.jsx("span",{children:a(l?"onboarding.complete":"onboarding.getting_started")}),e.jsxs("span",{children:[m,"/",i]})]}),e.jsx("div",{className:"es-nmot__progress-bar",role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a("onboarding.progress_aria",{percent:c}),children:e.jsx("div",{className:`es-nmot__progress-fill${l?" es-nmot__progress-fill--done":""}`,style:{width:`${c}%`}})})]}),e.jsx("ul",{className:"es-nmot__steps",role:"list",children:n.map((s,p)=>{const o=r==="pro"&&s.id===y,w=["es-nmot__step",s.completed?"es-nmot__step--done":"",o?"es-nmot__step--active":""].filter(Boolean).join(" ");return e.jsxs("li",{className:w,children:[e.jsxs("button",{className:"es-nmot__step-row",onClick:()=>N(s),"aria-current":o?"step":void 0,disabled:r==="basic",children:[e.jsx("span",{className:"es-nmot__step-check","aria-hidden":"true",children:s.completed?"✓":e.jsx("span",{className:"es-nmot__step-num",children:p+1})}),e.jsx("span",{className:"es-nmot__step-label",children:s.label}),s.timeEstimate&&e.jsx("span",{className:"es-nmot__step-time",children:s.timeEstimate})]}),r==="pro"&&o&&!s.completed&&e.jsxs("div",{className:"es-nmot__step-detail",children:[h&&e.jsxs("div",{className:"es-nmot__ai-message",children:[e.jsx("span",{className:"es-nmot__ai-label",children:a("onboarding.ai_coach_label")}),e.jsx("p",{className:"es-nmot__ai-text",children:h})]}),e.jsx("button",{className:"es-nmot__complete-btn",onClick:()=>k(s.id),children:a("onboarding.mark_done")})]})]},s.id)})}),r==="basic"&&!l&&e.jsxs("div",{className:"es-nmot__next-prompt",children:[e.jsx("span",{className:"es-nmot__next-label",children:a("onboarding.next_up")}),e.jsx("span",{className:"es-nmot__next-text",children:n.find(s=>!s.completed)?.label??a("onboarding.all_steps_complete")})]}),l&&e.jsxs("div",{className:"es-nmot__done-banner",children:[e.jsx("span",{className:"es-nmot__done-icon","aria-hidden":"true",children:"🎉"}),e.jsx("span",{children:a("onboarding.done_banner",{n:g+1})})]})]})})}export{J as Component,D as manifest};
|
|
2
|
+
//# sourceMappingURL=index-DsyaMk1k-DpMzyqHN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as h,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as h,j as e,e as m,l as j}from"../nexly.js";const C={slug:"recruitment-pipeline",name:"Recruitment Pipeline",version:"1.0.0",category:"interactive",requiredService:"recruitment-pipeline",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"recruitment-pipeline",inputSchema:{type:"object",properties:{stageCounts:{type:"object",properties:{contacted:{type:"number"},interested:{type:"number"},pending:{type:"number"},active:{type:"number"}}},topFollowUpToday:{type:"object",properties:{id:{type:"string"},name:{type:"string"},stage:{type:"string"},notes:{type:"string"},lastContactDate:{type:"string"}}},topFollowUpMessage:{type:"string"},prospects:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},contactInfo:{type:"string"},stage:{type:"string"},notes:{type:"string"},lastContactDate:{type:"string"},aiFollowupMessage:{type:"string"}}}},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",stageCounts:{contacted:3,interested:5,pending:2,active:4},topFollowUpToday:{id:"preview-1",name:"Piotr Nowak",stage:"interested",notes:"Met at networking event, interested in health products",lastContactDate:new Date(Date.now()-5*864e5).toISOString().slice(0,10)},topFollowUpMessage:"Hi Piotr! I was thinking about you — I'd love to share how our latest health product has been helping people in similar situations. Can we hop on a 10-minute call this week?",prospects:[{id:"preview-1",name:"Piotr Nowak",stage:"interested",notes:"Met at networking event",lastContactDate:new Date(Date.now()-5*864e5).toISOString().slice(0,10)},{id:"preview-2",name:"Anna Kowalska",stage:"pending",notes:"Waiting for reply after product demo",lastContactDate:new Date(Date.now()-2*864e5).toISOString().slice(0,10)},{id:"preview-3",name:"Maria Wiśniewska",stage:"contacted",lastContactDate:new Date(Date.now()-8*864e5).toISOString().slice(0,10)},{id:"preview-4",name:"Tomasz Wójcik",stage:"active",lastContactDate:new Date().toISOString().slice(0,10)}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — funnel summary + top follow-up + AI script",value:"basic"},{label:"Pro — full prospect list with Kanban + AI panel",value:"pro"}],group:"Display"}],events:{emits:[{name:"rp:prospectAdded",description:"User added a new prospect"},{name:"rp:stageChanged",description:"User moved a prospect to a new stage"},{name:"rp:followUpCopied",description:"User copied the AI follow-up message"}],listens:[{name:"rp:refresh",description:"Force refresh recruitment pipeline data"}]}},o={contacted:"recruitment.stage.contacted",interested:"recruitment.stage.interested",pending:"recruitment.stage.pending",active:"recruitment.stage.active"},p={contacted:"es-rp__stage--contacted",interested:"es-rp__stage--interested",pending:"es-rp__stage--pending",active:"es-rp__stage--active"};function D({data:n,config:y,actions:f,metadata:w,i18n:b}){const s=b?.t??(t=>t),v=y.mode??n.mode??"basic",i=n.stageCounts??{contacted:0,interested:0,pending:0,active:0},a=n.topFollowUpToday,c=n.topFollowUpMessage,l=n.prospects??[],[_,u]=h.useState("idle"),[r,g]=h.useState(null);if(i.contacted+i.interested+i.pending+i.active===0&&!a&&!n.error)return e.jsx(m,{blockType:"recruitment-pipeline",children:e.jsxs("div",{className:"es-block__body es-rp__body",children:[e.jsx("div",{className:"es-rp__funnel",role:"list","aria-label":s("recruitment.pipeline_stages_aria"),children:["contacted","interested","pending","active"].map(t=>e.jsxs("div",{role:"listitem",className:`es-rp__funnel-stage ${p[t]??""} es-rp__stage--empty`,children:[e.jsx("span",{className:"es-rp__funnel-count",children:"0"}),e.jsx("span",{className:"es-rp__funnel-label",children:s(o[t])})]},t))}),e.jsx("p",{style:{fontSize:13,color:"var(--es-color-on-surface-muted, #4B5563)",margin:"8px 0 0",textAlign:"center"},children:w?.dataQuality==="none"?s("recruitment.signin_prompt"):s("recruitment.empty_pipeline")})]})});if(n.error)return e.jsx(m,{blockType:"recruitment-pipeline",error:j(n.error)});async function x(){const t=c??"";if(t)try{await navigator.clipboard.writeText(t),u("copied"),f.emit("rp:followUpCopied",{prospectId:a?.id}),setTimeout(()=>u("idle"),2e3)}catch{}}const d=r?l.filter(t=>t.stage===r):l;return e.jsx(m,{blockType:"recruitment-pipeline",children:e.jsxs("div",{className:"es-block__body es-rp__body",children:[e.jsx("div",{className:"es-rp__funnel",role:"list","aria-label":s("recruitment.pipeline_stages_aria"),children:["contacted","interested","pending","active"].map(t=>e.jsxs("button",{role:"listitem",className:`es-rp__funnel-stage ${p[t]??""} ${r===t?"es-rp__funnel-stage--active":""}`,onClick:()=>g(r===t?null:t),"aria-pressed":r===t,"aria-label":s("recruitment.stage_count_aria",{stage:s(o[t]),count:i[t]}),children:[e.jsx("span",{className:"es-rp__funnel-count",children:i[t]}),e.jsx("span",{className:"es-rp__funnel-label",children:s(o[t])})]},t))}),a&&e.jsxs("div",{className:"es-rp__followup-card",children:[e.jsxs("div",{className:"es-rp__followup-eyebrow",children:["📅 ",s("recruitment.follow_up_today")]}),e.jsx("div",{className:"es-rp__followup-name",children:a.name}),e.jsxs("div",{className:"es-rp__followup-meta",children:[e.jsx("span",{className:`es-rp__badge ${p[a.stage]??""}`,children:s(o[a.stage])}),a.lastContactDate&&e.jsx("span",{className:"es-rp__followup-date",children:s("recruitment.last_contact",{date:a.lastContactDate})})]}),a.notes&&e.jsx("div",{className:"es-rp__followup-notes",children:a.notes}),c&&e.jsxs("div",{className:"es-rp__followup-message",children:[e.jsxs("div",{className:"es-rp__followup-message-header",children:[e.jsxs("span",{className:"es-rp__ai-label",children:["✨ ",s("recruitment.ai_followup_script")]}),e.jsx("button",{className:`es-rp__copy-btn${_==="copied"?" es-rp__copy-btn--copied":""}`,onClick:x,"aria-label":s("recruitment.copy_followup_aria"),title:s("common.copy_to_clipboard"),children:_==="copied"?"✓":"⎘"})]}),e.jsx("p",{className:"es-rp__followup-message-text",children:c})]})]}),v==="pro"&&e.jsxs("div",{className:"es-rp__prospect-list",children:[e.jsxs("div",{className:"es-rp__prospect-list-header",children:[e.jsx("span",{className:"es-rp__section-title",children:r?s("recruitment.stage_filtered",{stage:s(o[r]),count:d.length}):s("recruitment.all_prospects",{count:l.length})}),r&&e.jsx("button",{className:"es-rp__clear-filter",onClick:()=>g(null),children:s("recruitment.clear_filter")})]}),d.length===0?e.jsx("p",{className:"es-rp__empty",children:s("recruitment.empty_stage")}):e.jsx("ul",{className:"es-rp__prospects","aria-label":s("recruitment.prospects_list_aria"),children:d.map(t=>e.jsxs("li",{className:"es-rp__prospect-item",children:[e.jsxs("div",{className:"es-rp__prospect-header",children:[e.jsx("span",{className:"es-rp__prospect-name",children:t.name}),e.jsx("span",{className:`es-rp__badge ${p[t.stage]??""}`,children:s(o[t.stage])})]}),t.contactInfo&&e.jsx("span",{className:"es-rp__prospect-contact",children:t.contactInfo}),t.notes&&e.jsx("p",{className:"es-rp__prospect-notes",children:t.notes}),t.lastContactDate&&e.jsx("span",{className:"es-rp__prospect-date",children:s("recruitment.last_contact",{date:t.lastContactDate})})]},t.id))})]})]})})}export{D as Component,C as manifest};
|
|
2
|
+
//# sourceMappingURL=index-HIu_g6Cr-CEIHlemy.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as q,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as q,j as e,e as m,l as w}from"../nexly.js";import{m as l}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const M={slug:"rank-advancement-roadmap",name:"Rank Advancement Roadmap",version:"1.0.0",category:"data",requiredService:"rank-advancement-roadmap",configSchema:{properties:{mode:{type:"string",default:"basic"},showAiTip:{type:"boolean",default:!0}}},defaultConfig:{mode:"basic",showAiTip:!0},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"rank-advancement-roadmap",inputSchema:{type:"object",properties:{currentRank:{type:"string"},nextRank:{type:"string"},progressPercent:{type:"number"},rankTree:{type:"array",items:{type:"object",properties:{rank:{type:"string"},requirements:{type:"array",items:{type:"string"}},achieved:{type:"boolean"}}}},aiTip:{type:"string"},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{currentRank:"Silver",nextRank:"Gold",progressPercent:62,mode:"pro",aiTip:"You're 38% away from Gold. Focus on recruiting 2 active distributors to your right leg — that's your fastest path to the next milestone.",rankTree:[{rank:"G-Miner",requirements:["Personal purchase: 50 pts"],achieved:!0},{rank:"Miner",requirements:["Personal purchase: 100 pts","Team volume: 500 pts"],achieved:!0},{rank:"Developer",requirements:["Personal purchase: 200 pts","Team volume: 1,500 pts"],achieved:!0},{rank:"Team Leader",requirements:["Personal purchase: 300 pts","Team volume: 5,000 pts","2 Developers in team"],achieved:!0},{rank:"Manager",requirements:["Personal purchase: 400 pts","Team volume: 15,000 pts","2 Team Leaders"],achieved:!1},{rank:"Senior Manager",requirements:["Personal purchase: 500 pts","Team volume: 40,000 pts","3 Managers"],achieved:!1},{rank:"Vice President",requirements:["Personal purchase: 600 pts","Team volume: 100,000 pts","4 Senior Managers"],achieved:!1},{rank:"President",requirements:["Personal purchase: 700 pts","Team volume: 250,000 pts","5 Vice Presidents"],achieved:!1}]}},fields:[{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — current rank + progress",value:"basic"},{label:"Pro — full rank tree",value:"pro"}],group:"Display"},{id:"showAiTip",type:"toggle",label:"Show AI coaching tip (pro mode)",default:!0,group:"Display"}],events:{emits:[{name:"rar:rankExpanded",description:"User expanded a rank in the accordion"}],listens:[{name:"rar:refresh",description:"Force refresh rank data"}]}};function k(s,o,d){return Math.min(Math.max(s,o),d)}function D({data:s,config:o,actions:d,metadata:v,i18n:x}){const r=x?.t??(a=>a),_=o.mode??s.mode??"basic",g=o.showAiTip??!0,p=s.currentRank,t=s.nextRank,b=k(s.progressPercent??0,0,100),u=s.rankTree??[],h=s.aiTip,[j,y]=q.useState(new Set);if(!p&&!s.error)return e.jsx(m,{blockType:"rank-advancement-roadmap",children:e.jsx("div",{className:"es-block__body es-rar__body",children:e.jsxs("div",{className:"es-rar__current-card",children:[e.jsx("div",{className:"es-rar__section-label",children:r("rank_roadmap.current_rank")}),e.jsx("div",{className:"es-rar__rank-row",children:e.jsx("span",{className:"es-rar__rank-name",style:{color:"var(--es-color-on-surface-muted, #4B5563)"},children:"—"})}),e.jsxs("div",{className:"es-rar__progress-label",children:[e.jsx("span",{children:v?.dataQuality==="none"?r("rank_roadmap.signin_prompt"):r("rank_roadmap.loading")}),e.jsx("span",{children:"0%"})]}),e.jsx("div",{className:"es-rar__progress-bar",children:e.jsx("div",{className:"es-rar__progress-fill",style:{width:"0%"}})})]})})});if(s.error)return e.jsx(m,{blockType:"rank-advancement-roadmap",error:w(s.error)});function f(a){y(c=>{const n=new Set(c);return n.has(a)?n.delete(a):(n.add(a),d.emit("rar:rankExpanded",{rank:a})),n})}const i=k(b,0,100);return e.jsx(m,{blockType:"rank-advancement-roadmap",children:e.jsxs("div",{className:"es-block__body es-rar__body",children:[e.jsxs("div",{className:"es-rar__current-card",children:[e.jsx("div",{className:"es-rar__section-label",children:r("rank_roadmap.current_rank")}),e.jsxs("div",{className:"es-rar__rank-row",children:[e.jsx("span",{className:"es-rar__rank-name",children:l(p??"",r)}),e.jsxs("span",{className:"es-rar__rank-badge",children:[i,"%"]})]}),e.jsxs("div",{className:"es-rar__progress-label",children:[e.jsx("span",{children:r("rank_roadmap.progress_to",{rank:t?l(t,r):r("rank_roadmap.next_rank_fallback")})}),e.jsxs("span",{children:[i,"%"]})]}),e.jsx("div",{className:"es-rar__progress-bar",children:e.jsx("div",{className:"es-rar__progress-fill",style:{width:`${i}%`},role:"progressbar","aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r("rank_roadmap.progress_aria",{percent:i,rank:t?l(t,r):r("rank_roadmap.next_rank_fallback")})})}),t&&e.jsx("div",{className:"es-rar__next-rank-hint",children:r("rank_roadmap.next_label",{rank:l(t,r)})})]}),g&&_==="pro"&&e.jsxs("div",{className:`es-rar__ai-tip${h?"":" es-rar__ai-tip--loading"}`,children:[e.jsx("div",{className:"es-rar__ai-tip-label",children:r("rank_roadmap.ai_tip_label")}),e.jsx("div",{className:"es-rar__ai-tip-text",children:h??r("rank_roadmap.analyzing")})]}),_==="pro"&&u.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"es-rar__tree-label",children:r("rank_roadmap.tree_label")}),e.jsx("ul",{className:"es-rar__tree",role:"list",children:u.map(a=>{const c=a.rank===p,n=j.has(a.rank),N=["es-rar__tree-item",a.achieved?"es-rar__tree-item--achieved":"",c?"es-rar__tree-item--current":""].filter(Boolean).join(" ");return e.jsxs("li",{className:N,children:[e.jsxs("button",{className:"es-rar__tree-header",onClick:()=>f(a.rank),"aria-expanded":n,"aria-controls":`rar-reqs-${a.rank}`,children:[e.jsx("span",{className:"es-rar__tree-status-icon","aria-hidden":"true",children:a.achieved?"✓":c?"▶":"○"}),e.jsx("span",{className:"es-rar__tree-rank-name",children:l(a.rank,r)}),e.jsx("span",{className:`es-rar__tree-chevron${n?" es-rar__tree-chevron--open":""}`,"aria-hidden":"true",children:"▾"})]}),n&&e.jsx("ul",{id:`rar-reqs-${a.rank}`,className:"es-rar__tree-requirements",role:"list",children:a.requirements.map((T,P)=>e.jsx("li",{className:"es-rar__tree-req",children:T},P))})]},a.rank)})})]})]})})}export{D as Component,M as manifest};
|
|
2
|
+
//# sourceMappingURL=index-NPLN6oCC-VW9D8cgC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as i,j as e,e as m}from"../nexly.js";const f={slug:"faq",name:"FAQ",version:"1.0.0",category:"content",requiredService:"knowledge-search",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},limit:{type:"number",default:10}}},defaultConfig:{readAloudEnabled:!1,limit:10},dataContract:{serviceSlug:"knowledge-search",inputSchema:{type:"object",properties:{items:{type:"array",items:{type:"object",properties:{question:{type:"string"},answer:{type:"string"},category:{type:"string"}}}},total:{type:"number"}},required:["items"]},previewDataOverride:{items:[{question:"What is your return policy?",answer:"We accept returns within 30 days of purchase.",category:"Returns"},{question:"How long does shipping take?",answer:"Standard shipping takes 3-5 business days.",category:"Shipping"},{question:"Do you offer international shipping?",answer:"Yes, we ship to over 50 countries worldwide.",category:"Shipping"},{question:"How do I track my order?",answer:"You will receive a tracking link via email once your order ships.",category:"Orders"},{question:"Can I change or cancel my order?",answer:"Orders can be modified or cancelled within 1 hour of placement.",category:"Orders"}],total:5}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"limit",type:"range",label:"Number of FAQs",default:10,min:1,max:50,step:1,group:"Content"}],events:{emits:[{name:"faq:itemExpanded",description:"User expanded a FAQ item"},{name:"faq:itemCollapsed",description:"User collapsed a FAQ item"}],listens:[{name:"faq:refresh",description:"Reload FAQ content from service"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function g({data:n,config:o,i18n:l}){const d=l?.t??(a=>a),t=n.items??o.items??[],[r,c]=i.useState(null),p=i.useCallback(a=>{c(s=>s===a?null:a)},[]);return e.jsx(m,{blockType:"faq",children:e.jsxs("div",{className:"es-block__body",children:[t.length===0&&e.jsx("div",{className:"es-block__empty",children:d("faq.empty")}),t.map((a,s)=>e.jsxs("div",{className:"es-faq__item",children:[e.jsxs("button",{className:"es-faq__question",onClick:()=>p(s),type:"button",children:[e.jsx("span",{children:a.question}),e.jsx("span",{className:"es-faq__chevron",children:r===s?"▲":"▼"})]}),r===s&&e.jsx("div",{className:"es-faq__answer",children:a.answer})]},s))]})})}export{g as Component,f as manifest};
|
|
2
|
+
//# sourceMappingURL=index-S2W2KqpV-PMvqlUvO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{j as e,e as d}from"../nexly.js";const u={slug:"venue-list",name:"Venue List",version:"1.0.0",category:"content",requiredService:"venue-discovery",configSchema:{properties:{radiusKm:{type:"number",default:10},limit:{type:"number",default:10},hidden:{type:"boolean",default:!1}}},defaultConfig:{radiusKm:10,limit:10,hidden:!1},dataContract:{serviceSlug:"venue-discovery",inputSchema:{type:"object",properties:{venues:{type:"array",items:{type:"object",properties:{id:{type:"string"},name:{type:"string"},category:{type:"string"},address:{type:"string"},rating:{type:"number"},reviewCount:{type:"number"},distanceKm:{type:"number"},photoUrl:{type:"string"}}}},total:{type:"number"}},required:["venues"]},previewDataOverride:{venues:[{id:"v-1",name:"Blue Bottle Coffee",category:"cafe",address:"123 Teheran-ro, Gangnam-gu",rating:4.5,reviewCount:312,distanceKm:.3,photoUrl:""},{id:"v-2",name:"Coexartium Gallery",category:"gallery",address:"456 Samsung-dong, Gangnam-gu",rating:4.2,reviewCount:198,distanceKm:.8,photoUrl:""},{id:"v-3",name:"Oakwood Premier COEX",category:"hotel",address:"789 Bongeunsa-ro, Gangnam-gu",rating:4.7,reviewCount:567,distanceKm:1.1,photoUrl:""}],total:3}},fields:[{id:"radiusKm",type:"range",label:"Search radius (km)",default:10,min:1,max:50,step:1,group:"Search"},{id:"limit",type:"range",label:"Max venues to show",default:10,min:1,max:50,step:1,group:"Content"},{id:"hidden",type:"toggle",label:"Hidden (collect data only, render nothing)",default:!1,group:"Behavior"}],events:{emits:[{name:"venues:venueSelected",description:"User clicked on a venue in the list"},{name:"venues:radiusChanged",description:"User changed the search radius"}],listens:[{name:"venue:locationChanged",description:"Re-run venue search at new user location"},{name:"venues:refresh",description:"Reload venue list from discovery service"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function c({data:n,config:a,i18n:i}){const r=i?.t??(s=>s),t=n.venues??[];return a?.hidden===!0?null:e.jsx(d,{blockType:"venue-list",children:e.jsxs("div",{className:"es-block__body",children:[t.length===0&&e.jsx("div",{className:"es-block__empty",children:r("venue_list.empty")}),t.length>0&&e.jsx("ul",{className:"es-vlist__items",children:t.map((s,l)=>e.jsxs("li",{className:"es-vlist__item",children:[e.jsx("div",{className:"es-vlist__name",children:s.name}),e.jsxs("div",{className:"es-vlist__meta",children:[s.type&&e.jsx("span",{className:"es-vlist__type",children:s.type}),s.rating!=null&&e.jsxs("span",{className:"es-vlist__rating",children:["★"," ",s.rating.toFixed(1)]})]}),s.address&&e.jsx("div",{className:"es-vlist__address",children:s.address})]},l))})]})})}export{c as Component,u as manifest};
|
|
2
|
+
//# sourceMappingURL=index-SV2KdT0_-BZw4n83V.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as d,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as d,K as a,Z as s}from"../nexly.js";const S={slug:"guest-auth",name:"Guest Authentication",version:"1.0.0",category:"content",requiredService:"",configSchema:{properties:{}},defaultConfig:{},sizing:{minWidth:0,preferredHeight:0,scrollable:!1},dataContract:{serviceSlug:"",inputSchema:{type:"object",properties:{fingerprint:{type:"string"}},required:["fingerprint"]},previewDataOverride:{fingerprint:"00000000-0000-4000-a000-000000000000"}},fields:[],events:{emits:[{name:"auth:guest",description:"Guest session created — carries { user: { id }, accessToken }"}],listens:[]},supportedPlacements:["main"]};function m(e){return`es-widget-guest-fp:${e}`}function y(){if(typeof crypto>"u")return null;if(typeof crypto.randomUUID=="function"){const[t]=s(()=>crypto.randomUUID());if(t)return t}if(typeof crypto.getRandomValues!="function")return null;const[e]=s(()=>crypto.getRandomValues(new Uint8Array(16)));if(!e)return null;e[6]=e[6]&15|64,e[8]=e[8]&63|128;const r=Array.from(e,t=>t.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function h(e,r){if(e)return e;if(typeof window>"u")return;const t=m(r),[i]=s(()=>window.localStorage.getItem(t));if(i)return i;const n=y();if(n)return s(()=>window.localStorage.setItem(t,n)),n}function $({baseUrl:e,actions:r,externalContext:t,productId:i}){const n=d.useRef(!1);return d.useEffect(()=>{if(n.current)return;const c=t?.apiKey;if(!c)return;const u=h(t?.fp,i);u&&(n.current=!0,(async()=>{const[o,f]=await a(fetch(`${e}/api/widget/auth/guest`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":c},body:JSON.stringify({fingerprint:u})}));if(f||!o){console.error("[guest-auth] Error:",f);return}if(!o.ok){const[g]=await a(o.text());console.error("[guest-auth] Auth failed:",o.status,g??"");return}const[p]=await a(o.json()),l=p?.data?.user?.id;l&&r.emit("auth:guest",{user:{id:l},accessToken:p?.data?.accessToken})})())},[e,r,t,i]),null}export{$ as Component,S as manifest};
|
|
2
|
+
//# sourceMappingURL=index-qzvjftnO-CDVtcfdt.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as d,j as e,Q as n}from"../nexly.js";const M={slug:"presentation-trainer",name:"Presentation Training",version:"1.0.0",category:"interactive",requiredService:"presentation-training",configSchema:{properties:{timeWarningPercent:{type:"number",default:20},showHints:{type:"boolean",default:!0}}},defaultConfig:{timeWarningPercent:20,showHints:!0},dataContract:{serviceSlug:"presentation-training",inputSchema:{type:"object",properties:{scenarios:{type:"array",description:"Live scenarios in the learner’s language, in author order"},remainingToday:{type:"number",description:"Sessions the learner may still start today"},dailyLimit:{type:"number",description:"Configured sessions per user per day"},productBudgetSpent:{type:"boolean",description:"True when the product’s monthly audio budget is exhausted"}}}},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main"]},T={state:"idle",errorKey:null,turns:[],elapsedSec:0,maxSessionSec:0,hint:null,report:null,gradeErrorKey:null};function f(p){return p.trim().split(/\s+/).filter(Boolean).slice(0,2).map(o=>o[0]?.toUpperCase()??"").join("")||"—"}function $(p){const o=Math.floor(p/60),x=p%60;return`${o}:${String(x).padStart(2,"0")}`}function E({data:p,config:o,actions:x,i18n:N}){const t=N?.t??(s=>s),r=x?.externalContext?.trainer,m=p??{},g=d.useMemo(()=>m.scenarios??[],[m.scenarios]),h=m.remainingToday??0,y=m.dailyLimit??0,[u,_]=d.useState(null),[k,l]=d.useState(!1),[a,S]=d.useState(r?.get()??T);d.useEffect(()=>r?.subscribe(S),[r]),d.useEffect(()=>()=>r?.stop(),[r]);const i=g.find(s=>s.id===u)??null,b=a.state==="connecting"||a.state==="speaking"||a.state==="listening",C=Math.max(30,Math.min(60,Math.round(a.maxSessionSec*(o.timeWarningPercent??20)/100))),w=Math.max(0,a.maxSessionSec-a.elapsedSec),v=b&&a.maxSessionSec>0&&w<=C,j=d.useCallback(()=>{u&&r?.start(u)},[u,r]);if(m.productBudgetSpent)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-budget-spent",children:e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.product_budget_spent")})})});if(g.length===0)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-empty",children:e.jsx("p",{className:"es-pt__empty",children:t("training.no_scenarios")})})});if(i&&(a.state==="grading"||a.report||a.gradeErrorKey)){if(a.state==="grading")return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-grading",children:e.jsx("p",{className:"es-pt__muted",children:t("training.grading")})})});if(!a.report)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-grade-failed",children:[e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t(`training.grade_${a.gradeErrorKey??"grader_failed"}`)}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})});const s=a.report;return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-report",children:[e.jsxs("div",{className:"es-pt__score",children:[e.jsxs("span",{className:`es-pt__score-value${s.passed?"":" es-pt__score-value--fail"}`,"data-testid":"pt-score",children:[s.totalScore,"%"]}),e.jsx("span",{className:"es-pt__muted",children:s.passed?t("training.passed",{threshold:s.passThreshold}):t("training.not_passed",{threshold:s.passThreshold})})]}),s.feedback&&e.jsxs("div",{className:"es-pt__feedback","data-testid":"pt-feedback",children:[e.jsx("span",{className:"es-pt__turn-who",children:t("training.to_improve")}),s.feedback.headline,s.feedback.quote&&e.jsx("q",{className:"es-pt__quote",children:s.feedback.quote})]}),e.jsx("div",{className:"es-pt__criteria",children:s.criteria.map(c=>e.jsxs("div",{className:"es-pt__criterion",children:[e.jsxs("div",{className:"es-pt__criterion-row",children:[e.jsx("span",{className:"es-pt__criterion-label",children:c.label}),e.jsxs("span",{className:"es-pt__criterion-score",children:[c.score,"/4"]})]}),e.jsx("p",{className:"es-pt__muted",children:c.rationale}),c.quote&&e.jsx("q",{className:"es-pt__quote",children:c.quote})]},c.key))}),s.delivery&&e.jsxs("div",{className:"es-pt__delivery","data-testid":"pt-delivery",children:[e.jsx("span",{className:"es-pt__turn-who",children:t("training.how_you_spoke")}),e.jsxs("div",{className:"es-pt__delivery-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:t("training.longest_monologue")}),e.jsxs("b",{children:[s.delivery.longestMonologueSec,"s"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.talk_share")}),e.jsxs("b",{children:[s.delivery.talkSharePercent,"%"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.response_delay")}),e.jsxs("b",{children:[s.delivery.medianResponseDelaySec,"s"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.exchanges")}),e.jsx("b",{children:s.delivery.exchanges})]}),e.jsxs("div",{children:[e.jsx("span",{children:t(`training.rate_${s.delivery.rateUnit}`)}),e.jsx("b",{children:s.delivery.rate})]})]})]}),e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,"data-testid":"pt-retry",children:t("training.try_again")}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})})}if(i&&(b||a.state==="ending"||a.state==="error"||a.state==="closed"))return a.state==="error"?e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-error",children:[e.jsx("p",{className:"es-pt__notice es-pt__notice--bad",children:t(`training.error_${a.errorKey??"generic"}`)}),e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,children:t("training.try_again")}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})}):e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-conversation",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("div",{className:`es-pt__avatar${a.state==="speaking"?" es-pt__avatar--speaking":""}`,"aria-hidden":"true",children:f(i.personaName)}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:i.personaName}),e.jsxs("div",{className:"es-pt__strip-state",children:[a.state==="connecting"&&t("training.state_connecting"),a.state==="speaking"&&t("training.state_speaking"),a.state==="listening"&&t("training.state_listening"),a.state==="ending"&&t("training.state_ending"),a.state==="closed"&&t("training.state_closed")]})]})]}),e.jsx("div",{className:"es-pt__transcript","data-testid":"pt-transcript","aria-live":"polite",children:a.turns.length===0?e.jsx("p",{className:"es-pt__muted",children:t("training.transcript_empty")}):a.turns.map((s,c)=>e.jsxs("div",{className:`es-pt__turn es-pt__turn--${s.role}${s.final?"":" es-pt__turn--live"}`,children:[e.jsx("span",{className:"es-pt__turn-who",children:s.role==="persona"?i.personaName:t("training.you")}),s.text]},c))}),o.showHints!==!1&&a.hint&&e.jsx("p",{className:"es-pt__hint","data-testid":"pt-hint",children:a.hint}),v&&!a.hint&&e.jsx("p",{className:"es-pt__hint","data-testid":"pt-time-warning",children:t("training.time_almost_up")}),e.jsxs("div",{className:"es-pt__controls",children:[e.jsx("span",{className:`es-pt__timer${v?" es-pt__timer--warn":""}`,"data-testid":"pt-timer",children:$(a.elapsedSec)}),a.state==="closed"?e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")}):e.jsx("button",{type:"button",className:"es-pt__end",onClick:()=>r?.stop(),children:t("training.end_conversation")})]})]})});if(i&&k)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-history",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("button",{type:"button",className:"es-pt__back",onClick:()=>l(!1),"aria-label":t("training.back"),children:"←"}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:t("training.your_attempts")}),e.jsx("div",{className:"es-pt__strip-state",children:i.title})]})]}),i.history.length===0?e.jsx("p",{className:"es-pt__muted",children:t("training.no_attempts_yet")}):e.jsx("ul",{className:"es-pt__attempts",children:i.history.map(s=>e.jsxs("li",{className:"es-pt__attempt",children:[e.jsx("span",{className:"es-pt__attempt-date",children:new Intl.DateTimeFormat(N?.currentLanguage??"en",{day:"numeric",month:"short"}).format(new Date(s.at))}),e.jsx("span",{className:"es-pt__attempt-score",children:s.score===null?t("training.not_scored"):`${s.score}%`}),s.status!=="completed"&&e.jsx("span",{className:"es-pt__pill",children:t(`training.status_${s.status}`)})]},s.sessionId))})]})});if(i){const s=h<=0;return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-brief",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("button",{type:"button",className:"es-pt__back",onClick:()=>{l(!1),_(null)},"aria-label":t("training.back_to_list"),children:"←"}),e.jsx("div",{className:"es-pt__avatar","aria-hidden":"true",children:f(i.personaName)}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:i.personaName}),e.jsx("div",{className:"es-pt__strip-state",children:i.title})]}),e.jsxs("div",{className:"es-pt__strip-right",children:[e.jsx("span",{className:`es-pt__pill es-pt__pill--${i.difficulty}`,children:t(`training.difficulty_${i.difficulty}`)}),e.jsx("span",{className:"es-pt__strip-time",children:t("training.minutes",{count:Math.round(i.maxDurationSec/60)})})]})]}),e.jsx("div",{className:"es-pt__situation",children:i.situation}),e.jsx("p",{className:"es-pt__muted",children:t("training.sessions_left",{count:h,total:y})}),s?e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.daily_limit_reached")}):e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,"data-testid":"pt-start",children:t("training.start_conversation")}),i.attempts>0&&e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>l(!0),"data-testid":"pt-history-open",children:t("training.see_attempts",{count:i.attempts})})]})})}return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-list",children:[e.jsxs("div",{className:"es-pt__quota",children:[e.jsx("span",{children:t("training.sessions_today")}),e.jsx("b",{children:t("training.sessions_left_short",{count:h,total:y})})]}),g.map(s=>e.jsxs("button",{type:"button",className:"es-pt__scenario",onClick:()=>_(s.id),disabled:h<=0,children:[e.jsxs("span",{className:"es-pt__scenario-row",children:[e.jsx("span",{className:"es-pt__scenario-title",children:s.title}),e.jsx("span",{className:`es-pt__pill es-pt__pill--${s.difficulty}`,children:t(`training.difficulty_${s.difficulty}`)})]}),e.jsxs("span",{className:"es-pt__scenario-meta",children:[t("training.minutes",{count:Math.round(s.maxDurationSec/60)}),s.attempts>0&&e.jsxs(e.Fragment,{children:[" · ",t("training.best_score",{score:s.bestScore??0})," · ",t("training.last_score",{score:s.lastScore??0})," · ",t("training.attempts",{count:s.attempts})]}),s.attempts===0&&e.jsxs(e.Fragment,{children:[" · ",t("training.not_attempted")]})]})]},s.id)),h<=0&&e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.daily_limit_reached")})]})})}export{E as Component,M as manifest};
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as d,j as e,e as n}from"../nexly.js";const M={slug:"presentation-trainer",name:"Presentation Training",version:"1.0.0",category:"interactive",requiredService:"presentation-training",configSchema:{properties:{timeWarningPercent:{type:"number",default:20},showHints:{type:"boolean",default:!0}}},defaultConfig:{timeWarningPercent:20,showHints:!0},dataContract:{serviceSlug:"presentation-training",inputSchema:{type:"object",properties:{scenarios:{type:"array",description:"Live scenarios in the learner’s language, in author order"},remainingToday:{type:"number",description:"Sessions the learner may still start today"},dailyLimit:{type:"number",description:"Configured sessions per user per day"},productBudgetSpent:{type:"boolean",description:"True when the product’s monthly audio budget is exhausted"}}}},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main"]},T={state:"idle",errorKey:null,turns:[],elapsedSec:0,maxSessionSec:0,hint:null,report:null,gradeErrorKey:null};function f(p){return p.trim().split(/\s+/).filter(Boolean).slice(0,2).map(o=>o[0]?.toUpperCase()??"").join("")||"—"}function $(p){const o=Math.floor(p/60),x=p%60;return`${o}:${String(x).padStart(2,"0")}`}function E({data:p,config:o,actions:x,i18n:N}){const t=N?.t??(s=>s),r=x?.externalContext?.trainer,m=p??{},g=d.useMemo(()=>m.scenarios??[],[m.scenarios]),h=m.remainingToday??0,y=m.dailyLimit??0,[u,_]=d.useState(null),[k,l]=d.useState(!1),[a,S]=d.useState(r?.get()??T);d.useEffect(()=>r?.subscribe(S),[r]),d.useEffect(()=>()=>r?.stop(),[r]);const i=g.find(s=>s.id===u)??null,b=a.state==="connecting"||a.state==="speaking"||a.state==="listening",C=Math.max(30,Math.min(60,Math.round(a.maxSessionSec*(o.timeWarningPercent??20)/100))),w=Math.max(0,a.maxSessionSec-a.elapsedSec),v=b&&a.maxSessionSec>0&&w<=C,j=d.useCallback(()=>{u&&r?.start(u)},[u,r]);if(m.productBudgetSpent)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-budget-spent",children:e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.product_budget_spent")})})});if(g.length===0)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-empty",children:e.jsx("p",{className:"es-pt__empty",children:t("training.no_scenarios")})})});if(i&&(a.state==="grading"||a.report||a.gradeErrorKey)){if(a.state==="grading")return e.jsx(n,{blockType:"presentation-trainer",children:e.jsx("div",{className:"es-pt","data-testid":"pt-grading",children:e.jsx("p",{className:"es-pt__muted",children:t("training.grading")})})});if(!a.report)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-grade-failed",children:[e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t(`training.grade_${a.gradeErrorKey??"grader_failed"}`)}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})});const s=a.report;return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-report",children:[e.jsxs("div",{className:"es-pt__score",children:[e.jsxs("span",{className:`es-pt__score-value${s.passed?"":" es-pt__score-value--fail"}`,"data-testid":"pt-score",children:[s.totalScore,"%"]}),e.jsx("span",{className:"es-pt__muted",children:s.passed?t("training.passed",{threshold:s.passThreshold}):t("training.not_passed",{threshold:s.passThreshold})})]}),s.feedback&&e.jsxs("div",{className:"es-pt__feedback","data-testid":"pt-feedback",children:[e.jsx("span",{className:"es-pt__turn-who",children:t("training.to_improve")}),s.feedback.headline,s.feedback.quote&&e.jsx("q",{className:"es-pt__quote",children:s.feedback.quote})]}),e.jsx("div",{className:"es-pt__criteria",children:s.criteria.map(c=>e.jsxs("div",{className:"es-pt__criterion",children:[e.jsxs("div",{className:"es-pt__criterion-row",children:[e.jsx("span",{className:"es-pt__criterion-label",children:c.label}),e.jsxs("span",{className:"es-pt__criterion-score",children:[c.score,"/4"]})]}),e.jsx("p",{className:"es-pt__muted",children:c.rationale}),c.quote&&e.jsx("q",{className:"es-pt__quote",children:c.quote})]},c.key))}),s.delivery&&e.jsxs("div",{className:"es-pt__delivery","data-testid":"pt-delivery",children:[e.jsx("span",{className:"es-pt__turn-who",children:t("training.how_you_spoke")}),e.jsxs("div",{className:"es-pt__delivery-grid",children:[e.jsxs("div",{children:[e.jsx("span",{children:t("training.longest_monologue")}),e.jsxs("b",{children:[s.delivery.longestMonologueSec,"s"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.talk_share")}),e.jsxs("b",{children:[s.delivery.talkSharePercent,"%"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.response_delay")}),e.jsxs("b",{children:[s.delivery.medianResponseDelaySec,"s"]})]}),e.jsxs("div",{children:[e.jsx("span",{children:t("training.exchanges")}),e.jsx("b",{children:s.delivery.exchanges})]}),e.jsxs("div",{children:[e.jsx("span",{children:t(`training.rate_${s.delivery.rateUnit}`)}),e.jsx("b",{children:s.delivery.rate})]})]})]}),e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,"data-testid":"pt-retry",children:t("training.try_again")}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})})}if(i&&(b||a.state==="ending"||a.state==="error"||a.state==="closed"))return a.state==="error"?e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-error",children:[e.jsx("p",{className:"es-pt__notice es-pt__notice--bad",children:t(`training.error_${a.errorKey??"generic"}`)}),e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,children:t("training.try_again")}),e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")})]})}):e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-conversation",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("div",{className:`es-pt__avatar${a.state==="speaking"?" es-pt__avatar--speaking":""}`,"aria-hidden":"true",children:f(i.personaName)}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:i.personaName}),e.jsxs("div",{className:"es-pt__strip-state",children:[a.state==="connecting"&&t("training.state_connecting"),a.state==="speaking"&&t("training.state_speaking"),a.state==="listening"&&t("training.state_listening"),a.state==="ending"&&t("training.state_ending"),a.state==="closed"&&t("training.state_closed")]})]})]}),e.jsx("div",{className:"es-pt__transcript","data-testid":"pt-transcript","aria-live":"polite",children:a.turns.length===0?e.jsx("p",{className:"es-pt__muted",children:t("training.transcript_empty")}):a.turns.map((s,c)=>e.jsxs("div",{className:`es-pt__turn es-pt__turn--${s.role}${s.final?"":" es-pt__turn--live"}`,children:[e.jsx("span",{className:"es-pt__turn-who",children:s.role==="persona"?i.personaName:t("training.you")}),s.text]},c))}),o.showHints!==!1&&a.hint&&e.jsx("p",{className:"es-pt__hint","data-testid":"pt-hint",children:a.hint}),v&&!a.hint&&e.jsx("p",{className:"es-pt__hint","data-testid":"pt-time-warning",children:t("training.time_almost_up")}),e.jsxs("div",{className:"es-pt__controls",children:[e.jsx("span",{className:`es-pt__timer${v?" es-pt__timer--warn":""}`,"data-testid":"pt-timer",children:$(a.elapsedSec)}),a.state==="closed"?e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>{l(!1),_(null)},children:t("training.back_to_list")}):e.jsx("button",{type:"button",className:"es-pt__end",onClick:()=>r?.stop(),children:t("training.end_conversation")})]})]})});if(i&&k)return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-history",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("button",{type:"button",className:"es-pt__back",onClick:()=>l(!1),"aria-label":t("training.back"),children:"←"}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:t("training.your_attempts")}),e.jsx("div",{className:"es-pt__strip-state",children:i.title})]})]}),i.history.length===0?e.jsx("p",{className:"es-pt__muted",children:t("training.no_attempts_yet")}):e.jsx("ul",{className:"es-pt__attempts",children:i.history.map(s=>e.jsxs("li",{className:"es-pt__attempt",children:[e.jsx("span",{className:"es-pt__attempt-date",children:new Intl.DateTimeFormat(N?.currentLanguage??"en",{day:"numeric",month:"short"}).format(new Date(s.at))}),e.jsx("span",{className:"es-pt__attempt-score",children:s.score===null?t("training.not_scored"):`${s.score}%`}),s.status!=="completed"&&e.jsx("span",{className:"es-pt__pill",children:t(`training.status_${s.status}`)})]},s.sessionId))})]})});if(i){const s=h<=0;return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-brief",children:[e.jsxs("div",{className:"es-pt__strip",children:[e.jsx("button",{type:"button",className:"es-pt__back",onClick:()=>{l(!1),_(null)},"aria-label":t("training.back_to_list"),children:"←"}),e.jsx("div",{className:"es-pt__avatar","aria-hidden":"true",children:f(i.personaName)}),e.jsxs("div",{className:"es-pt__strip-meta",children:[e.jsx("div",{className:"es-pt__strip-name",children:i.personaName}),e.jsx("div",{className:"es-pt__strip-state",children:i.title})]}),e.jsxs("div",{className:"es-pt__strip-right",children:[e.jsx("span",{className:`es-pt__pill es-pt__pill--${i.difficulty}`,children:t(`training.difficulty_${i.difficulty}`)}),e.jsx("span",{className:"es-pt__strip-time",children:t("training.minutes",{count:Math.round(i.maxDurationSec/60)})})]})]}),e.jsx("div",{className:"es-pt__situation",children:i.situation}),e.jsx("p",{className:"es-pt__muted",children:t("training.sessions_left",{count:h,total:y})}),s?e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.daily_limit_reached")}):e.jsx("button",{type:"button",className:"es-pt__cta",onClick:j,"data-testid":"pt-start",children:t("training.start_conversation")}),i.attempts>0&&e.jsx("button",{type:"button",className:"es-pt__cta es-pt__cta--ghost",onClick:()=>l(!0),"data-testid":"pt-history-open",children:t("training.see_attempts",{count:i.attempts})})]})})}return e.jsx(n,{blockType:"presentation-trainer",children:e.jsxs("div",{className:"es-pt","data-testid":"pt-list",children:[e.jsxs("div",{className:"es-pt__quota",children:[e.jsx("span",{children:t("training.sessions_today")}),e.jsx("b",{children:t("training.sessions_left_short",{count:h,total:y})})]}),g.map(s=>e.jsxs("button",{type:"button",className:"es-pt__scenario",onClick:()=>_(s.id),disabled:h<=0,children:[e.jsxs("span",{className:"es-pt__scenario-row",children:[e.jsx("span",{className:"es-pt__scenario-title",children:s.title}),e.jsx("span",{className:`es-pt__pill es-pt__pill--${s.difficulty}`,children:t(`training.difficulty_${s.difficulty}`)})]}),e.jsxs("span",{className:"es-pt__scenario-meta",children:[t("training.minutes",{count:Math.round(s.maxDurationSec/60)}),s.attempts>0&&e.jsxs(e.Fragment,{children:[" · ",t("training.best_score",{score:s.bestScore??0})," · ",t("training.last_score",{score:s.lastScore??0})," · ",t("training.attempts",{count:s.attempts})]}),s.attempts===0&&e.jsxs(e.Fragment,{children:[" · ",t("training.not_attempted")]})]})]},s.id)),h<=0&&e.jsx("p",{className:"es-pt__notice es-pt__notice--warn",children:t("training.daily_limit_reached")})]})})}export{E as Component,M as manifest};
|
|
2
|
+
//# sourceMappingURL=index-s0zHGN1t-DWm0RYZF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as o,j as e,e as x,l as K}from"../nexly.js";import{m as O}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const U={slug:"gaio-coach",name:"GAIO Coach",version:"1.0.0",category:"interactive",requiredService:"gaio-coach",configSchema:{properties:{proMode:{type:"boolean",default:!1},showProgressBar:{type:"boolean",default:!0},showMotivationalMessage:{type:"boolean",default:!0},maxActionsShown:{type:"number",default:3}}},defaultConfig:{proMode:!1,showProgressBar:!0,showMotivationalMessage:!0,maxActionsShown:3},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!0},dataContract:{serviceSlug:"gaio-coach",inputSchema:{type:"object",properties:{plan:{type:"object",properties:{date:{type:"string"},topActions:{type:"array",items:{type:"object",properties:{id:{type:"string"},title:{type:"string"}}}},motivationalMessage:{type:"string"},progressSummary:{type:"string"}}},progress:{type:"object",properties:{currentStreak:{type:"number"},completedActions:{type:"number"},weeklyScore:{type:"number"},rank:{type:"string"},nextMilestone:{type:"string"}}}}},previewDataOverride:{plan:{date:"2026-04-05",topActions:[{id:"a1",type:"recruit",title:"Connect with 3 prospects",description:"Reach out to your warm market list. Send personalized messages to 3 contacts who expressed interest.",estimatedMinutes:30,priority:"high",isCompleted:!1},{id:"a2",type:"attend_event",title:"Attend local networking event",description:"Seoul Tech Meetup at 7pm. Bring business cards and focus on making genuine connections.",estimatedMinutes:120,priority:"high",isCompleted:!1},{id:"a3",type:"contact_downliner",title:"Coach team member Kim",description:"Kim is close to qualifying for the next rank. A 15-minute coaching call can help them cross the threshold.",estimatedMinutes:15,priority:"medium",isCompleted:!1}],motivationalMessage:"Your consistent effort is building momentum — one action at a time!",progressSummary:"You are 2 actions away from your weekly goal."},progress:{currentStreak:5,completedActions:14,weeklyScore:78,rank:"Silver",nextMilestone:"Gold (3 more referrals)"}}},fields:[{id:"proMode",type:"toggle",label:"Pro mode (full chat history)",default:!1,group:"Display"},{id:"showProgressBar",type:"toggle",label:"Show progress bar",default:!0,group:"Display"},{id:"showMotivationalMessage",type:"toggle",label:"Show motivational message",default:!0,group:"Display"},{id:"maxActionsShown",type:"range",label:"Max actions shown",default:3,min:1,max:5,step:1,group:"Display"}],events:{emits:[{name:"gaio:actionCompleted",description:"User marked an action as completed"},{name:"gaio:messageSent",description:"User sent a coaching message (pro mode)"}],listens:[{name:"gaio:refresh",description:"Force refresh coaching plan"}]},supportedPlacements:["main","sidebar"]};function A({item:s,onToggle:r}){return e.jsxs("div",{className:`es-gaio__action es-gaio__action--${s.priority}${s.isCompleted?" es-gaio__action--completed":""}`,onClick:()=>r(s.id),role:"button",tabIndex:0,onKeyDown:n=>n.key==="Enter"&&r(s.id),children:[e.jsx("div",{className:"es-gaio__action-check",children:s.isCompleted?"✓":""}),e.jsxs("div",{className:"es-gaio__action-body",children:[e.jsx("div",{className:"es-gaio__action-title",children:s.title}),e.jsx("div",{className:"es-gaio__action-desc",children:s.description}),e.jsx("div",{className:"es-gaio__action-meta",children:e.jsxs("span",{className:"es-gaio__action-time",children:["~",s.estimatedMinutes,"m"]})})]})]})}function q({data:s,config:r,actions:n,baseUrl:f,productId:v,metadata:D,i18n:$}){const t=$?.t??(a=>a),p=r.proMode??!1,T=r.showProgressBar??!0,I=r.showMotivationalMessage??!0,j=r.maxActionsShown??3,d=s.plan,c=s.progress,[l,b]=o.useState([]),[h,u]=o.useState([]),[m,w]=o.useState(""),[g,k]=o.useState(!1),N=o.useRef(null);o.useEffect(()=>{d?.topActions&&b(d.topActions.slice(0,j))},[d,j]),o.useEffect(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[h]);const S=o.useCallback(async a=>{b(_=>_.map(i=>i.id===a?{...i,isCompleted:!i.isCompleted}:i)),await n.call("complete",{actionId:a}).catch(()=>{}),n.emit("gaio:actionCompleted",{actionId:a})},[n]),M=o.useCallback(async()=>{const a=m.trim();if(!a||g)return;const _={id:`u-${Date.now()}`,role:"user",text:a};u(i=>[...i,_]),w(""),k(!0);try{const i=(await(await fetch(`${f}/api/widget/gaio/coach`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({productId:v,context:{dailyGoal:a}})})).json())?.data?.plan,y=i?.motivationalMessage??i?.progressSummary??t("gaio_coach.default_guidance"),P={id:`a-${Date.now()}`,role:"assistant",text:y};u(B=>[...B,P]),n.emit("gaio:messageSent",{text:a})}catch{const i={id:`e-${Date.now()}`,role:"assistant",text:t("gaio_coach.error_unreachable")};u(y=>[...y,i])}finally{k(!1)}},[m,g,f,v,n]);if(!d&&!s.error)return e.jsx(x,{blockType:"gaio-coach",children:e.jsxs("div",{className:"es-block__body",children:[e.jsx("div",{className:"es-gaio__header",children:e.jsx("span",{className:"es-gaio__title",children:t("gaio_coach.title")})}),e.jsx("div",{className:"es-gaio__motivation",style:{color:"var(--es-color-on-surface-muted, #4B5563)",fontStyle:"italic"},children:D?.dataQuality==="none"?t("gaio_coach.sign_in_prompt"):t("gaio_coach.preparing")}),[1,2,3].map(a=>e.jsxs("div",{className:"es-gaio__action",style:{opacity:.35},children:[e.jsx("div",{className:"es-gaio__action-check"}),e.jsx("div",{className:"es-gaio__action-body",children:e.jsx("div",{className:"es-gaio__action-title",style:{background:"var(--es-color-surface-elevated, #f5f5f5)",borderRadius:4,height:14,width:`${60+a*15}%`}})})]},a))]})});if(s.error)return e.jsx(x,{blockType:"gaio-coach",error:K(s.error)});const C=l.filter(a=>a.isCompleted).length,E=l.length>0?C/l.length*100:0;return e.jsx(x,{blockType:"gaio-coach",children:e.jsxs("div",{className:"es-block__body",children:[e.jsxs("div",{className:"es-gaio__header",children:[e.jsx("span",{className:"es-gaio__title",children:t("gaio_coach.title")}),c?.currentStreak!=null&&c.currentStreak>0&&e.jsxs("span",{className:"es-gaio__streak",children:["🔥 ",e.jsx("span",{className:"es-gaio__streak-value",children:c.currentStreak})," ",t("gaio_coach.day_streak")]})]}),T&&l.length>0&&e.jsxs("div",{className:"es-gaio__progress",children:[e.jsxs("div",{className:"es-gaio__progress-label",children:[e.jsx("span",{children:t("gaio_coach.todays_actions")}),e.jsxs("span",{children:[C,"/",l.length]})]}),e.jsx("div",{className:"es-gaio__progress-bar",children:e.jsx("div",{className:"es-gaio__progress-fill",style:{width:`${E}%`}})})]}),p&&c?.rank&&e.jsxs("div",{className:"es-gaio__summary-card",children:[e.jsxs("div",{className:"es-gaio__summary-rank",children:[t("gaio_coach.current_rank"),": ",O(c.rank,t)]}),c.nextMilestone&&e.jsxs("div",{className:"es-gaio__summary-milestone",children:[t("gaio_coach.next"),": ",c.nextMilestone]})]}),I&&d?.motivationalMessage&&e.jsx("div",{className:"es-gaio__motivation",children:d.motivationalMessage}),!p&&e.jsx("div",{className:"es-gaio__actions",children:l.map(a=>e.jsx(A,{item:a,onToggle:S},a.id))}),p&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"es-gaio__actions",children:l.map(a=>e.jsx(A,{item:a,onToggle:S},a.id))}),h.length>0&&e.jsxs("div",{className:"es-gaio__chat",children:[h.map(a=>e.jsx("div",{className:`es-gaio__chat-msg es-gaio__chat-msg--${a.role}`,children:a.text},a.id)),e.jsx("div",{ref:N})]}),e.jsxs("div",{className:"es-gaio__chat-input-row",children:[e.jsx("textarea",{className:"es-gaio__chat-input",rows:1,placeholder:t("gaio_coach.chat_placeholder"),value:m,onChange:a=>w(a.target.value),onKeyDown:a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),M())}}),e.jsx("button",{className:"es-gaio__chat-send",onClick:M,disabled:g||!m.trim(),children:g?"...":t("gaio_coach.chat_send")})]})]})]})})}export{q as Component,U as manifest};
|
|
2
|
+
//# sourceMappingURL=index-uYSCRIpT-qsVnaLmo.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as i,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as i,L as j,j as e,e as m}from"../nexly.js";const E={slug:"auth-register",name:"User Registration",version:"1.0.0",category:"interactive",requiredService:"",configSchema:{properties:{showName:{type:"boolean",default:!0},showEmail:{type:"boolean",default:!0},requireEmail:{type:"boolean",default:!1},showExternalId:{type:"boolean",default:!1},submitLabel:{type:"string",default:""}}},defaultConfig:{showName:!0,showEmail:!0,requireEmail:!1,showExternalId:!1,submitLabel:""},dataContract:{serviceSlug:"chat-bot",inputSchema:{type:"object",properties:{authenticated:{type:"boolean"}}},previewDataOverride:{authenticated:!1}},fields:[{id:"showName",type:"toggle",label:"Show name field",default:!0,group:"Form Fields"},{id:"showEmail",type:"toggle",label:"Show email field",default:!0,group:"Form Fields"},{id:"requireEmail",type:"toggle",label:"Require email",default:!1,group:"Form Fields"},{id:"showExternalId",type:"toggle",label:"Show external ID field",default:!1,group:"Form Fields"},{id:"submitLabel",type:"localized-text",label:"Submit button label",default:"",placeholder:'Leave empty to use translated default (e.g. "Register")',group:"Content"}],events:{emits:[{name:"auth:registered",description:"User successfully completed registration"},{name:"auth:registrationFailed",description:"Registration form submission failed"}],listens:[{name:"auth:reset",description:"Reset the registration form"}]},supportedPlacements:["main"],sizing:{minWidth:280,preferredHeight:"auto",scrollable:!1}};function k({config:o,actions:g,i18n:c}){const r=c?.t??(t=>t),b=c?.currentLanguage??"en",[f,h]=i.useState(""),[n,y]=i.useState(""),[s,p]=i.useState(!1),[a,l]=i.useState(null),v=o.showName??!0,x=o.showEmail??!0,d=o.requireEmail??!1,S=j(o.submitLabel,b,{t:r,fallbackKey:"auth.register.submit",enDefault:"Register"});async function w(t){t.preventDefault(),p(!0),l(null);try{const u=await g.call("register",{name:f||void 0,email:n||void 0});u?.error?l({success:!1,error:u.error}):l({success:!0,apiKey:u?.apiKey})}catch{l({success:!1,error:r("auth.register.error_failed")})}finally{p(!1)}}return a?.success?e.jsx(m,{blockType:"auth-register",children:e.jsxs("div",{className:"es-block__body",style:{padding:24,textAlign:"center"},children:[e.jsx("div",{style:{fontSize:14,color:"var(--es-color-success, #00672B)",marginBottom:8},children:r("auth.register.success")}),a.apiKey&&e.jsxs("div",{style:{fontSize:11,color:"var(--es-color-on-surface-muted, #4B5563)",background:"var(--es-color-surface-elevated, #f5f5f5)",padding:"8px 12px",borderRadius:6,fontFamily:"monospace",wordBreak:"break-all"},children:[r("auth.register.api_key_prompt"),e.jsx("br",{}),e.jsx("span",{style:{color:"var(--es-color-interactive, #2563EB)"},children:a.apiKey})]})]})}):e.jsx(m,{blockType:"auth-register",children:e.jsx("div",{className:"es-block__body",style:{padding:16},children:e.jsxs("form",{onSubmit:w,children:[v&&e.jsxs("div",{style:{marginBottom:12},children:[e.jsx("label",{style:{display:"block",fontSize:12,color:"var(--es-color-on-surface-muted, #4B5563)",marginBottom:4},children:r("auth.register.name_label")}),e.jsx("input",{type:"text",value:f,onChange:t=>h(t.target.value),placeholder:r("auth.register.name_placeholder"),style:{width:"100%",padding:"8px 12px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",fontSize:14,outline:"none",boxSizing:"border-box"}})]}),x&&e.jsxs("div",{style:{marginBottom:12},children:[e.jsxs("label",{style:{display:"block",fontSize:12,color:"var(--es-color-on-surface-muted, #4B5563)",marginBottom:4},children:[r("auth.email_label"),d&&" *"]}),e.jsx("input",{type:"email",value:n,onChange:t=>y(t.target.value),placeholder:r("auth.email_placeholder"),required:d,style:{width:"100%",padding:"8px 12px",borderRadius:6,border:"1px solid var(--es-color-control-border, #6B7280)",background:"var(--es-color-surface-elevated, #f5f5f5)",color:"var(--es-color-on-surface, #1a1a1a)",fontSize:14,outline:"none",boxSizing:"border-box"}})]}),a?.error&&e.jsx("div",{style:{fontSize:12,color:"var(--es-color-error, #AD2C26)",marginBottom:8},children:a.error}),e.jsx("button",{type:"submit",disabled:s||d&&!n,style:{width:"100%",padding:"10px 16px",borderRadius:6,border:"none",background:s?"var(--es-color-on-surface-muted, #4B5563)":"var(--es-color-primary, #2563EB)",color:"var(--es-color-on-primary, #ffffff)",fontSize:14,fontWeight:600,cursor:s?"wait":"pointer"},children:s?r("auth.register.submitting"):S})]})})})}export{k as Component,E as manifest};
|
|
2
|
+
//# sourceMappingURL=index-v9CNsbwM-CavFmRiD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as o,j as e,
|
|
2
|
-
//# sourceMappingURL=index-
|
|
1
|
+
import{r as o,j as e,e as u}from"../nexly.js";const x=[{value:"post",labelKey:"social_content.type.post"},{value:"story",labelKey:"social_content.type.story"},{value:"dm",labelKey:"social_content.type.dm"},{value:"event_promo",labelKey:"social_content.type.event_promo"}],g=[{value:"instagram",label:"Instagram"},{value:"facebook",label:"Facebook"},{value:"kakao",label:"KakaoTalk"},{value:"line",label:"LINE"},{value:"generic",labelKey:"social_content.platform.generic"}],G=[{value:"professional",labelKey:"social_content.tone.professional"},{value:"casual",labelKey:"social_content.tone.casual"},{value:"energetic",labelKey:"social_content.tone.energetic"},{value:"empathetic",labelKey:"social_content.tone.empathetic"}];function j(t,d){const n=g.find(m=>m.value===d);return n?.labelKey?t(n.labelKey):n?.label??d}function z({data:t,config:d,actions:n,metadata:m,i18n:_}){const s=_?.t??(c=>c),N=d.mode??t.mode??"basic",f=t.content,k=t.contentType??"post",C=t.platform??"generic",K=t.tone??"professional",S=t.characterCount,[a,T]=o.useState(f??""),[i,w]=o.useState(k),[r,$]=o.useState(C),[p,q]=o.useState(K),[h,v]=o.useState("idle"),[l,b]=o.useState(!1),B=()=>{a&&(navigator.clipboard.writeText(a).catch(()=>{}),v("copied"),n?.emit?.("sc:contentCopied",{content:a,contentType:i,platform:r}),setTimeout(()=>v("idle"),2e3))},y=o.useCallback(async()=>{if(!(l||!n?.request)){b(!0);try{const c=await n.request("sc:regenerate",{contentType:i,platform:r,tone:p});c?.content&&(T(c.content),n?.emit?.("sc:contentGenerated",{contentType:i,platform:r,tone:p}))}finally{b(!1)}}},[l,n,i,r,p]),E=c=>{w(c),n?.emit?.("sc:typeChanged",{contentType:c})};return!a&&!t.error&&!l?e.jsx(u,{blockType:"social-content",children:e.jsxs("div",{className:"sc-block",children:[e.jsxs("div",{className:"sc-content-card",children:[e.jsxs("div",{className:"sc-content-header",children:[e.jsxs("div",{className:"sc-content-meta",children:[e.jsx("span",{className:"sc-meta-badge",children:s("social_content.type.post")}),e.jsx("span",{className:"sc-meta-badge",style:{background:"var(--es-color-success-soft, rgba(0, 103, 43, 0.15))",color:"var(--es-color-success, #00672B)"},children:s("social_content.platform.generic")})]}),e.jsxs("button",{className:"sc-btn sc-btn--primary",onClick:y,disabled:l,children:["↺ ",s("social_content.generate_content")]})]}),e.jsx("div",{className:"sc-content-body",style:{color:"var(--es-color-on-surface-muted, #4B5563)",fontStyle:"italic"},children:e.jsx("p",{className:"sc-content-text",children:m?.dataQuality==="none"?s("social_content.signin_prompt"):s("social_content.empty_cta_hint")})})]}),e.jsxs("div",{className:"sc-compliance-notice",children:[e.jsx("span",{className:"sc-compliance-icon",children:"🛡️"}),e.jsx("span",{children:s("social_content.compliance_notice_short")})]})]})}):t.error?e.jsx(u,{blockType:"social-content",children:e.jsx("p",{style:{color:"var(--es-color-error, #AD2C26)",fontSize:13},children:s("social_content.load_error")})}):e.jsx(u,{blockType:"social-content",children:e.jsxs("div",{className:"sc-block",children:[N==="pro"&&e.jsxs("div",{className:"sc-selectors",children:[e.jsxs("div",{children:[e.jsx("div",{className:"sc-selector-label",children:s("social_content.content_type_label")}),e.jsx("div",{className:"sc-selector-row",children:x.map(c=>e.jsx("button",{className:`sc-chip${i===c.value?" sc-chip--active":""}`,onClick:()=>E(c.value),children:s(c.labelKey)},c.value))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"sc-selector-label",children:s("social_content.platform_label")}),e.jsx("div",{className:"sc-selector-row",children:g.map(c=>e.jsx("button",{className:`sc-chip${r===c.value?" sc-chip--active":""}`,onClick:()=>$(c.value),children:j(s,c.value)},c.value))})]}),e.jsxs("div",{children:[e.jsx("div",{className:"sc-selector-label",children:s("social_content.tone_label")}),e.jsx("div",{className:"sc-selector-row",children:G.map(c=>e.jsx("button",{className:`sc-chip${p===c.value?" sc-chip--active":""}`,onClick:()=>q(c.value),children:s(c.labelKey)},c.value))})]})]}),e.jsxs("div",{className:"sc-content-card",children:[e.jsxs("div",{className:"sc-content-header",children:[e.jsxs("div",{className:"sc-content-meta",children:[e.jsx("span",{className:"sc-meta-badge",children:s(x.find(c=>c.value===i)?.labelKey??"social_content.type.post")}),e.jsx("span",{className:"sc-meta-badge",style:{background:"var(--es-color-success-soft, rgba(0, 103, 43, 0.15))",color:"var(--es-color-success, #00672B)"},children:j(s,r)}),S!==void 0&&e.jsx("span",{className:"sc-char-count",children:s("social_content.char_count",{count:a.length})})]}),e.jsxs("div",{className:"sc-actions",children:[e.jsx("button",{className:`sc-btn${h==="copied"?" sc-btn--copied":""}`,onClick:B,disabled:!a,children:h==="copied"?`✓ ${s("common.copied")}`:s("common.copy")}),e.jsx("button",{className:"sc-btn sc-btn--primary",onClick:y,disabled:l,children:l?"...":`↺ ${s("social_content.regenerate")}`})]})]}),l?e.jsxs("div",{className:"sc-generating",children:[e.jsx("div",{className:"sc-spinner"}),s("social_content.generating")]}):e.jsx("div",{className:"sc-content-body",children:e.jsx("p",{className:"sc-content-text",children:a})})]}),e.jsxs("div",{className:"sc-compliance-notice",children:[e.jsx("span",{className:"sc-compliance-icon",children:"🛡️"}),e.jsx("span",{children:s("social_content.compliance_notice_full")})]})]})})}const A={slug:"social-content",name:"Social Content Generator",version:"1.0.0",category:"interactive",requiredService:"social-content",configSchema:{properties:{mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic"},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"social-content",inputSchema:{type:"object",properties:{content:{type:"string"},contentType:{type:"string"},platform:{type:"string"},tone:{type:"string"},mode:{type:"string"},characterCount:{type:"number"}},required:["content","mode"]}},events:{emits:[{name:"sc:contentCopied",description:"User copied generated content"},{name:"sc:contentGenerated",description:"New content was generated (after regenerate)"},{name:"sc:typeChanged",description:"User changed content type in pro mode"}]}};export{z as Component,z as SocialContentBlock,A as manifest};
|
|
2
|
+
//# sourceMappingURL=index-xQDKGkvA-pCzSL4DD.js.map
|