@nexlylab/widget 1.32.15 → 1.32.16

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.
Files changed (67) hide show
  1. package/dist/INSTALL.txt +1 -1
  2. package/dist/runtime/{1.32.15/chunks/ClickToLoadEmbed-CDdotCS8-W2yBrg7b.js → 1.32.16/chunks/ClickToLoadEmbed-CVZbpoTT-CKUzZ7gL.js} +2 -2
  3. package/dist/runtime/{1.32.15/chunks/PanelInfoVideo-BKn3ucAb-BrU-Qlul.js → 1.32.16/chunks/PanelInfoVideo-BKq2v0QM-BrU-Qlul.js} +1 -1
  4. package/dist/runtime/{1.32.15/chunks/assistant-link-components-MZWf5ty7-C44wlQAi.js → 1.32.16/chunks/assistant-link-components-DkuhHIF9-CPkAMFv6.js} +2 -2
  5. package/dist/runtime/{1.32.15/chunks/assistant-link-policy-DWaWTnGr-Cc-yj-a-.js → 1.32.16/chunks/assistant-link-policy-CS93s-vA-Cc-yj-a-.js} +1 -1
  6. package/dist/runtime/{1.32.15/chunks/block-rating-DH7mp-_R-CoiP5C2K.js → 1.32.16/chunks/block-rating-DGpoz2o3-CoiP5C2K.js} +1 -1
  7. package/dist/runtime/{1.32.15/chunks/external-url-LRu_ntew-CJQjg_od.js → 1.32.16/chunks/external-url-BzUbjdMo-CJQjg_od.js} +1 -1
  8. package/dist/runtime/{1.32.15/chunks/index-C1WD1dlq-Dm9kbc85.js → 1.32.16/chunks/index-6HKNPucI-Dm9kbc85.js} +1 -1
  9. package/dist/runtime/{1.32.15/chunks/index-Bu9Gh6Nc-BfWdQCT7.js → 1.32.16/chunks/index-BCtNBIxP-CcsFQ7Dx.js} +2 -2
  10. package/dist/runtime/{1.32.15/chunks/index-BD-jPdzs-ZRnEJoQe.js → 1.32.16/chunks/index-BIMK2_g0-ZRnEJoQe.js} +1 -1
  11. package/dist/runtime/{1.32.15/chunks/index-BSoCdILD-D6wzHiS0.js → 1.32.16/chunks/index-BJClDxSC-D6wzHiS0.js} +1 -1
  12. package/dist/runtime/{1.32.15/chunks/index-CNJUK2bK-C0OfCXUx.js → 1.32.16/chunks/index-BLT1bBjC-6c5Ar61I.js} +2 -2
  13. package/dist/runtime/{1.32.15/chunks/index-C6_8JGpJ-BqZmEVev.js → 1.32.16/chunks/index-BW-8QNI--BqZmEVev.js} +1 -1
  14. package/dist/runtime/{1.32.15/chunks/index-C75hX_dj-VhJcCfAC.js → 1.32.16/chunks/index-BncytMlP-VhJcCfAC.js} +1 -1
  15. package/dist/runtime/{1.32.15/chunks/index-k-jZV_MQ-H31PHMqm.js → 1.32.16/chunks/index-BoVToqY3-H31PHMqm.js} +1 -1
  16. package/dist/runtime/{1.32.15/chunks/index-B8aKMeg5-BLxOZxZv.js → 1.32.16/chunks/index-C5MpFJwF-BLxOZxZv.js} +1 -1
  17. package/dist/runtime/{1.32.15/chunks/index-Dh0aThiP-Aqz1AnQ5.js → 1.32.16/chunks/index-CISMnUXx-Aqz1AnQ5.js} +1 -1
  18. package/dist/runtime/{1.32.15/chunks/index-Dkv5YXXW-pkywvGDF.js → 1.32.16/chunks/index-CIe60p_E-pkywvGDF.js} +1 -1
  19. package/dist/runtime/{1.32.15/chunks/index-1o6W5wiJ-I68tb-d3.js → 1.32.16/chunks/index-CIgDHLEK-I68tb-d3.js} +1 -1
  20. package/dist/runtime/{1.32.15/chunks/index-DP_6HfDM-DAdxCQyi.js → 1.32.16/chunks/index-CUGV3nk2-DAdxCQyi.js} +1 -1
  21. package/dist/runtime/{1.32.15/chunks/index-DO0-ht8E-DUgMllqN.js → 1.32.16/chunks/index-CbGT4d5Q-DUgMllqN.js} +1 -1
  22. package/dist/runtime/{1.32.15/chunks/index-DTVlG27U-DP0QKkgf.js → 1.32.16/chunks/index-Cdmdsj1E-DP0QKkgf.js} +1 -1
  23. package/dist/runtime/{1.32.15/chunks/index-D-ZhVFzi-A3rpkVmQ.js → 1.32.16/chunks/index-Cf4eQF9g-mnUzfS1e.js} +2 -2
  24. package/dist/runtime/{1.32.15/chunks/index-CMFQhtEe-BcW8HKb8.js → 1.32.16/chunks/index-ChL-bSAN-BcW8HKb8.js} +1 -1
  25. package/dist/runtime/{1.32.15/chunks/index-qpVhJY7A-Cgivx3vY.js → 1.32.16/chunks/index-Chn4ATvZ-CSI6_0RJ.js} +2 -2
  26. package/dist/runtime/{1.32.15/chunks/index-Dt6OpItC-R_xuAEQV.js → 1.32.16/chunks/index-Cmt7uZiE-R_xuAEQV.js} +1 -1
  27. package/dist/runtime/{1.32.15/chunks/index-Czz6Gyh_-C3bBvEcm.js → 1.32.16/chunks/index-CogJkGmU-C3bBvEcm.js} +1 -1
  28. package/dist/runtime/1.32.16/chunks/index-CsoMgZU8-C1BzRUwZ.js +2 -0
  29. package/dist/runtime/{1.32.15/chunks/index-D72orqXX-C_0Ll4qr.js → 1.32.16/chunks/index-Cxwd1OKy-C_0Ll4qr.js} +1 -1
  30. package/dist/runtime/{1.32.15/chunks/index-BylVnv7X-DBhSkJ7i.js → 1.32.16/chunks/index-D-uANagm-DBhSkJ7i.js} +1 -1
  31. package/dist/runtime/{1.32.15/chunks/index-DDEE3QfX-3B-eE3K7.js → 1.32.16/chunks/index-DG-KS4AB-3B-eE3K7.js} +1 -1
  32. package/dist/runtime/{1.32.15/chunks/index-V1EfdiK7-bdo5pwX-.js → 1.32.16/chunks/index-DHdp5nGO-bdo5pwX-.js} +1 -1
  33. package/dist/runtime/{1.32.15/chunks/index-hHQjRGar-TEMHje2B.js → 1.32.16/chunks/index-DL04XhIK-TEMHje2B.js} +1 -1
  34. package/dist/runtime/{1.32.15/chunks/index-IW3aNe-y-W1lJrIDD.js → 1.32.16/chunks/index-DNwWHPWp-W1lJrIDD.js} +1 -1
  35. package/dist/runtime/{1.32.15/chunks/index-D9grn5WJ-Dp5AxBD4.js → 1.32.16/chunks/index-DO5eKOOB-Dp5AxBD4.js} +1 -1
  36. package/dist/runtime/{1.32.15/chunks/index-B9ozeox8-oy07dUaV.js → 1.32.16/chunks/index-Dc8zecP4-oy07dUaV.js} +1 -1
  37. package/dist/runtime/{1.32.15/chunks/index-csHaX5dv-BpgnWlB8.js → 1.32.16/chunks/index-DchTua3m-BpgnWlB8.js} +1 -1
  38. package/dist/runtime/{1.32.15/chunks/index-CmYYEi7N-Dr1V6OGz.js → 1.32.16/chunks/index-DdI8qMqt-Dr1V6OGz.js} +1 -1
  39. package/dist/runtime/{1.32.15/chunks/index-DphwDFW6-C9wFr7fa.js → 1.32.16/chunks/index-Dfcx_9km-C9wFr7fa.js} +1 -1
  40. package/dist/runtime/{1.32.15/chunks/index-Gi-3UOyp-DuzPeEIz.js → 1.32.16/chunks/index-DhYv8bbj-DGasnsaZ.js} +2 -2
  41. package/dist/runtime/{1.32.15/chunks/index-CqV8rHvG-DS9JaGVN.js → 1.32.16/chunks/index-Dtiss_wT-CLkn_6EY.js} +2 -2
  42. package/dist/runtime/{1.32.15/chunks/index-uM4Y0lxc-Dsa9X9U7.js → 1.32.16/chunks/index-MAmLiP1_-Dsa9X9U7.js} +1 -1
  43. package/dist/runtime/{1.32.15/chunks/index-Chy2Zmo5-CiRb-0NX.js → 1.32.16/chunks/index-Or6sA2eF-CiRb-0NX.js} +1 -1
  44. package/dist/runtime/{1.32.15/chunks/index-DPNGQF5b-_M0CWPEY.js → 1.32.16/chunks/index-PSL_6OT1-_M0CWPEY.js} +1 -1
  45. package/dist/runtime/{1.32.15/chunks/index-B1ef1IlE-QeFj7CR9.js → 1.32.16/chunks/index-SgPuWMUv-QeFj7CR9.js} +1 -1
  46. package/dist/runtime/{1.32.15/chunks/index-CwbUW6dx-BLBDoJCM.js → 1.32.16/chunks/index-fotohjEP-BLBDoJCM.js} +1 -1
  47. package/dist/runtime/{1.32.15/chunks/index-BnKOhYKk-CkemNrch.js → 1.32.16/chunks/index-pQ7fPgLl-JdphAk2-.js} +2 -2
  48. package/dist/runtime/{1.32.15/chunks/index-BvlAsO4n-DbuSZfeK.js → 1.32.16/chunks/index-svAzoy0Y-DbuSZfeK.js} +1 -1
  49. package/dist/runtime/{1.32.15/chunks/index-DZKtK9hT-DQBGsPwB.js → 1.32.16/chunks/index-tAu73-sK-DQBGsPwB.js} +1 -1
  50. package/dist/runtime/1.32.16/nexly.js +61 -0
  51. package/dist/v1.js +1 -1
  52. package/package.json +1 -1
  53. package/dist/runtime/1.32.15/chunks/index-BljIlfbh-D9I6jaso.js +0 -2
  54. package/dist/runtime/1.32.15/nexly.js +0 -61
  55. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/PanelVideoOverlay-BY__oBYV-B8OPC1xh.js +0 -0
  56. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/_commonjsHelpers-C6fGbg64-BC8KDfbh.js +0 -0
  57. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/accent-legibility-BJF2VO5n-CDPQ7suO.js +0 -0
  58. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/allowed-elements-BXnLJV1S-C-_lr2zm.js +0 -0
  59. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/block-helpers-Cg_zAqG6-DnN2COvk.js +0 -0
  60. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-BPDIV1BN-DINkyYvc.js +0 -0
  61. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-BcsmWDTX-Dw9WA5Ac.js +0 -0
  62. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-C262wwK4-DpyhuXqd.js +0 -0
  63. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-DMQkz1bV-BuMYksln.js +0 -0
  64. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index-DZADUAKv-DPfvWVuj.js +0 -0
  65. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/index.modern-CioVZ357-BA5NTOmY.js +0 -0
  66. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/inert-assistant-components-B6Cx9pG5-DWb6n3Yq.js +0 -0
  67. /package/dist/runtime/{1.32.15 → 1.32.16}/chunks/use-deferred-rating-XlgCUwcY-DDVOwURi.js +0 -0
@@ -1,4 +1,4 @@
1
1
  import{j as e,Q as m}from"../nexly.js";const h={slug:"crypto-ticker",name:"Crypto Ticker",version:"2.0.0",category:"data",requiredService:"crypto-intel",configSchema:{properties:{showFearGreed:{type:"boolean",default:!0},showNews:{type:"boolean",default:!0},newsLimit:{type:"number",default:5},showBtcPrice:{type:"boolean",default:!0}}},defaultConfig:{showFearGreed:!0,showNews:!0,newsLimit:5,showBtcPrice:!0},dataContract:{serviceSlug:"crypto-intel",inputSchema:{type:"object",properties:{fearGreedIndex:{type:"number"},fearGreedLabel:{type:"string"},btcPrice:{type:"number"},btcChange24h:{type:"number"},news:{type:"array",items:{type:"object",properties:{title:{type:"string"},source:{type:"string"}}}},summary:{type:"string"}},required:["summary"]},previewDataOverride:{fearGreedIndex:65,fearGreedLabel:"Greed",btcPrice:67420.5,btcChange24h:2.34,news:[{title:"Bitcoin hits new monthly high amid institutional buying",source:"CoinDesk"},{title:"Ethereum staking reaches record 32M ETH",source:"The Block"},{title:"SEC approves spot Solana ETF applications",source:"Bloomberg"}],summary:`Market Sentiment: 65 (Greed)
2
2
 
3
3
  BTC: $67,420 | 24h: +2.34%`}},fields:[{id:"showFearGreed",type:"toggle",label:"Show Fear & Greed",default:!0,group:"Display"},{id:"showNews",type:"toggle",label:"Show news feed",default:!0,group:"Display"},{id:"newsLimit",type:"range",label:"Max news items",default:5,min:1,max:15,step:1,group:"Display"},{id:"showBtcPrice",type:"toggle",label:"Show BTC price",default:!0,group:"Display"}],events:{emits:[{name:"ticker:coinSelected",description:"User clicked on a coin entry"}],listens:[{name:"market:refresh",description:"Force refresh market data"}]},sizing:{minWidth:200,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main","sidebar"]};function g({data:r,config:s,i18n:o}){const a=o?.t??(t=>t),l=s.showFearGreed??!0,p=s.showNews??!0,d=s.newsLimit??5,i=r.fearGreedIndex,n=r.fearGreedLabel,c=(r.news??[]).slice(0,d);return e.jsx(m,{blockType:"crypto-ticker",children:e.jsxs("div",{className:"es-block__body",children:[l&&i!=null&&e.jsxs("div",{className:"es-crypto__gauge",children:[e.jsx("div",{className:"es-crypto__gauge-label",children:a("crypto_ticker.fear_greed_label")}),e.jsx("div",{className:"es-crypto__gauge-value",children:i}),n&&e.jsx("div",{className:"es-crypto__gauge-sentiment",children:n})]}),p&&c.length>0&&e.jsxs("div",{className:"es-crypto__news",children:[e.jsx("div",{className:"es-crypto__news-title",children:a("crypto_ticker.news_title")}),e.jsx("ul",{className:"es-crypto__news-list",children:c.map((t,u)=>e.jsxs("li",{className:"es-crypto__news-item",children:[e.jsx("span",{children:t.title}),t.source&&e.jsx("span",{className:"es-crypto__news-source",children:t.source})]},u))})]}),!i&&c.length===0&&e.jsx("div",{className:"es-block__empty",children:a("crypto_ticker.empty")})]})})}export{g as Component,h as manifest};
4
- //# sourceMappingURL=index-V1EfdiK7-bdo5pwX-.js.map
4
+ //# sourceMappingURL=index-DHdp5nGO-bdo5pwX-.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as o,j as e,Q 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 Q({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 z={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{Q as Component,Q as SocialContentBlock,z as manifest};
2
- //# sourceMappingURL=index-hHQjRGar-TEMHje2B.js.map
2
+ //# sourceMappingURL=index-DL04XhIK-TEMHje2B.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as q,j as e,Q as m,o 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-IW3aNe-y-W1lJrIDD.js.map
2
+ //# sourceMappingURL=index-DNwWHPWp-W1lJrIDD.js.map
@@ -1,2 +1,2 @@
1
1
  import{j as e,Q as i}from"../nexly.js";const n={slug:"dashboard-overview",name:"Dashboard Overview",version:"1.0.0",category:"content",configSchema:{},defaultConfig:{},dataContract:{serviceSlug:null,inputSchema:{type:"object",properties:{}}},fields:[],sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]};function r({i18n:a}){const s=a?.t??(t=>t);return e.jsx(i,{blockType:"dashboard-overview",children:e.jsxs("div",{className:"es-widget__dash",children:[e.jsx("div",{className:"es-widget__panel-header",children:e.jsx("div",{className:"es-widget__panel-header-left",children:e.jsx("h2",{className:"es-widget__panel-header-title",children:s("dashboard.title")})})}),e.jsx("div",{className:"es-widget__dash-content",children:e.jsx("p",{className:"es-widget__dash-empty",children:s("dashboard.select_tab")})})]})})}export{r as Component,n as manifest};
2
- //# sourceMappingURL=index-D9grn5WJ-Dp5AxBD4.js.map
2
+ //# sourceMappingURL=index-DO5eKOOB-Dp5AxBD4.js.map
@@ -3,4 +3,4 @@ import{r as s,j as e,a as De,b as te,Q as it}from"../nexly.js";import{x as Ke,s
3
3
  `)}}function It({config:o,actions:i,baseUrl:n,i18n:p,auth:w,externalContext:b,productId:y,sessionId:j,sessionMessages:g,readOnly:U}){const S=U===!0,r=p?.t??(t=>t),u=b?.apiKey??"",m=p?.currentLanguage??"en",G=De(o.placeholder,m,{t:r,fallbackKey:"chat.input_placeholder",enDefault:"Type a message..."}),H=De(o.welcomeMessage,m,{t:r,fallbackKey:"chat.empty_state",enDefault:["Hi! How can I help you?","Hello! How can I help you?"]}),f=typeof o._draft=="string"?o._draft:void 0,z=typeof o._draftContext=="string"?o._draftContext:void 0,I=o._autoSend===!0,$=Array.isArray(o._quickChips)?o._quickChips:[],E=JSON.stringify($),k=s.useRef(w?.jwt);s.useEffect(()=>{k.current=w?.jwt},[w?.jwt]);const F=b?.voice,d=!!F?.enabled&&(F?.languages??[]).includes(m),[c,h]=s.useState(()=>g?.map(t=>({id:t.id,role:t.role,text:t.content}))??[]),[T,K]=s.useState(""),[ce,se]=s.useState([]),[L,D]=s.useState(!1),[ge,q]=s.useState(null),[me,Z]=s.useState(!1),{containerRef:_,isPinned:V,scrollToBottom:C,stickToBottom:M}=ot(),v=s.useRef(null),J=s.useRef(null),R=s.useRef(j??ze()),Q=s.useRef(g&&g.length>0?j??null:null),ee=s.useRef(null),le=s.useRef(void 0),ae=s.useRef(!1);s.useEffect(()=>{i.emit("chat:session",{sessionId:R.current})},[i]),s.useEffect(()=>{M()},[c,L,M]);const be=s.useCallback(()=>{const t=v.current;if(!t)return;const a=t.closest(".es-block")?.clientHeight??0,l=a>0?Math.round(a*.4):120;t.style.height="auto",t.style.height=`${Math.min(t.scrollHeight,l)}px`,t.style.overflowY=t.scrollHeight>l?"auto":"hidden"},[]);s.useLayoutEffect(()=>{be()},[T,be]);const re=s.useCallback(()=>{ae.current&&(ae.current=!1,i.emit("chat:draftConsumed",void 0))},[i]),ne=s.useCallback(async t=>{const a=t.trim();if(!a||L)return;re();const l=le.current;le.current=void 0,se([]),Z(!1),J.current?.abort(),J.current=new AbortController;const A=yt.test(a),B=`user-${Date.now()}`,X={id:B,role:"user",text:a,...A?{linkStatus:"reading",linkFailedCount:0}:{}};h(x=>[...x,X]);const O=()=>{A&&h(x=>x.map(W=>W.id===B&&W.linkStatus==="reading"?{...W,linkStatus:"done"}:W))};C(),K(""),D(!0),q(null),v.current&&(v.current.style.height="auto");const N=c.map(x=>({role:x.role,content:x.text})),Te=await w?.ensureValidToken?.()??k.current,st={"Content-Type":"application/json",...u?{"X-API-Key":u}:{},...Te?{Authorization:`Bearer ${Te}`}:{}},ue=`assistant-${Date.now()}`;let ie="",Le=!1,xe=!1;const Ae=()=>{xe||(xe=!0,q(ue),h(x=>[...x,{id:ue,role:"assistant",text:ie}]))},Be=R.current,Pe=_t.test(Be)?Be:void 0,He=xt(),[je,ke]=await te(fetch(`${n}/api/widget/chat-bot/stream`,{method:"POST",headers:st,body:JSON.stringify({text:a,history:N,...Pe?{sessionId:Pe}:{},...y?{productId:y}:{},...He?{timeZone:He}:{},...l?{blockContext:l}:{}}),signal:J.current.signal}));if(ke){if(ke instanceof Error&&ke.name==="AbortError"){O();return}D(!1),q(null),O(),h(x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}]);return}if(!je.ok||!je.body){D(!1),q(null),O(),h(x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}]);return}const at=je.body.getReader(),rt=new TextDecoder;let de="",_e;const Me=()=>{_e&&clearTimeout(_e),_e=void 0},Re=()=>{Me(),_e=setTimeout(()=>{J.current?.abort(),D(!1),q(null),O()},bt)},[,ve]=await te((async()=>{for(Re();;){const{done:x,value:W}=await at.read();if(Re(),x)break;de+=rt.decode(W,{stream:!0});let we;for(;(we=de.indexOf(`
4
4
 
5
5
  `))!==-1;){const nt=de.slice(0,we);de=de.slice(we+2);const{event:he,data:pe}=jt(nt);if(!(!he||!pe)){if(he==="start"){const P=JSON.parse(pe);P.sessionId&&P.sessionId!==R.current&&(R.current=P.sessionId,Q.current=P.sessionId,i.emit("chat:session",{sessionId:P.sessionId}))}else if(he==="token"){const P=JSON.parse(pe);ie+=P.value??"",Ae();const Se=ie;h(Ce=>Ce.map(Y=>Y.id===ue?{...Y,text:Se}:Y))}else if(he==="meta"){const P=JSON.parse(pe);Le=!0;const Se=P.assistantMessage?.content??ie,Ce=Array.isArray(P.pastedLinks)?P.pastedLinks.filter(Y=>Y.status&&Y.status!=="ok").length:0;Ae(),h(Y=>Y.map(oe=>oe.id===ue?{...oe,text:Se,promptLogId:P.logId}:oe.id===B&&oe.linkStatus==="reading"?{...oe,linkStatus:"done",linkFailedCount:Ce}:oe))}else if(he==="error"){const P=JSON.parse(pe);throw new Error(P.message??"Stream error")}}}}if(!Le&&!ie)throw new Error("Stream ended before completion")})());if(Me(),D(!1),q(null),O(),ve){if(ve instanceof Error&&ve.name==="AbortError"||ie)return;h(xe?x=>x.map(W=>W.id===ue?{...W,text:r("chat.error_message"),promptLogId:void 0}:W):x=>[...x,{id:`error-${Date.now()}`,role:"assistant",text:r("chat.error_message")}])}},[L,i,c,r,u,n,y,C,w,re]),ye=s.useCallback(()=>{const t=b?.voiceStream;t?.getState&&t.getState()!=="idle"&&t.stop(),ne(T)},[ne,T,b]);s.useEffect(()=>{const t=b?.voiceStream;t?.getState&&t.getState()!=="idle"&&t.stop()},[j]);const qe=s.useCallback(t=>{if(t.autoSend){ne(t.message);return}se([]),K(""),re(),v.current&&(v.current.style.height="auto",v.current.focus())},[ne,re]);s.useEffect(()=>{if(!(f!==void 0||$.length>0))return;const t=`${f}${z??""}${String(I)}${E}`;if(ee.current!==t){if(ee.current=t,ae.current=!0,le.current=z,I&&f!==void 0){se([]),ne(f);return}se($),f!==void 0&&(K(f),v.current&&v.current.focus())}},[f,z,I,E,ne]);const Je=s.useCallback(t=>{t.key==="Enter"&&!t.shiftKey&&(t.preventDefault(),ye())},[ye]),Xe=s.useCallback(t=>{re(),K(t.target.value)},[re]),Qe=s.useCallback(t=>{const a=t.trim();a&&(K(l=>l?`${l} ${a}`:a),requestAnimationFrame(()=>{v.current?.focus()}))},[]);s.useEffect(()=>()=>J.current?.abort(),[]),s.useEffect(()=>i.on("chat:clearHistory",t=>{const a=t;h([]),Z(!1);const l=a?.sessionId??ze();R.current=l,Q.current=l,i.emit("chat:session",{sessionId:l})}),[i]);const Ye=s.useCallback(async()=>{const t=k.current,[a,l]=await te(fetch(`${n}/api/chat/sessions/new`,{method:"POST",headers:{...u?{"X-API-Key":u}:{},...t?{Authorization:`Bearer ${t}`}:{}}}));if(!l&&a.ok){const[A,B]=await te(a.json());if(!B&&A.success&&A.data?.sessionId){i.emit("chat:clearHistory",{sessionId:A.data.sessionId});return}}i.emit("chat:clearHistory",void 0)},[i,u,n]),Ge=s.useCallback(()=>{i.emit("chat:showHistory",void 0)},[i]),fe=s.useCallback(async t=>{R.current=t,i.emit("chat:session",{sessionId:t}),h([]),Z(!1),D(!0);const a=k.current,[l,A]=await te(fetch(`${n}/api/chat/sessions/${encodeURIComponent(t)}/messages?limit=50`,{headers:{...u?{"X-API-Key":u}:{},...a?{Authorization:`Bearer ${a}`}:{}}}));if(D(!1),A||!l.ok){Z(!0);return}const[B,X]=await te(l.json());if(X){Z(!0);return}const O=B.data?.messages??[];h(O.map(N=>({id:N.id,role:N.role,text:N.content,promptLogId:N.promptLogId??void 0,rating:N.userScore??null}))),Q.current=t,C("auto")},[i,u,n,C]);s.useEffect(()=>i.on("chat:select-session",t=>{const{sessionId:a}=t;!a||a===Q.current||fe(a)}),[i,fe]);const Ze=s.useCallback(()=>{fe(R.current)},[fe]),Ie=s.useRef(c);s.useEffect(()=>{Ie.current=c},[c]);const Ve=s.useCallback(({messageId:t,rating:a},{keepalive:l})=>{const A=Ie.current.find(B=>B.id===t);!A||!A.promptLogId||!k.current||(h(B=>B.map(X=>X.id===t?{...X,rating:a,ratingPending:!0}:X)),(async()=>{const[B,X]=await te(fetch(`${n}/api/widget/ai-feedback`,{method:"POST",keepalive:l,headers:{"Content-Type":"application/json",...u?{"X-API-Key":u}:{},Authorization:`Bearer ${k.current}`},body:JSON.stringify({promptLogId:A.promptLogId,rating:a})}));if(X||!(B.ok||B.status===409)){h(O=>O.map(N=>N.id===t?{...N,rating:null,ratingPending:!1}:N));return}h(O=>O.map(N=>N.id===t?{...N,rating:a,ratingPending:!1}:N))})())},[u,n]),{pending:$e,rate:Ee,undo:et}=ct({submit:Ve}),tt=s.useCallback((t,a)=>{const l=c.find(A=>A.id===t);!l||!l.promptLogId||l.ratingPending||!k.current||Ee(t,a)},[c,Ee]);return e.jsxs(it,{blockType:"chat",children:[e.jsxs("div",{className:"es-chat__header",children:[e.jsx("span",{className:"es-chat__header-title",children:r("chat.chat")}),e.jsxs("div",{className:"es-chat__header-actions",children:[e.jsx("button",{type:"button",className:"es-chat__action-btn","aria-label":r("chat.new_session_button"),title:r("chat.new_session_button"),onClick:Ye,children:e.jsx(gt,{size:18})}),e.jsx("button",{type:"button",className:"es-chat__action-btn","aria-label":r("chat.history_button"),title:r("chat.history_button"),onClick:Ge,children:e.jsx(pt,{size:16})})]})]}),e.jsxs("div",{className:"es-block__body es-chat__body",children:[e.jsxs("div",{className:"es-chat__messages",ref:_,children:[c.length===0&&!me&&!L&&e.jsx("div",{className:"es-chat__welcome",children:H}),me&&e.jsxs("div",{className:"es-chat__load-error",role:"alert",children:[e.jsx("span",{className:"es-chat__load-error-text",children:r("chat.load_session_error")}),e.jsx("button",{type:"button",className:"es-chat__load-error-retry",onClick:Ze,children:r("chat.retry")})]}),c.map(t=>e.jsxs("div",{className:`es-chat__bubble es-chat__bubble--${t.role}${t.id===ge?" es-chat__bubble--streaming":""}`,children:[t.role==="assistant"?e.jsx("div",{className:"es-chat__bubble-text es-chat__bubble-text--md",children:e.jsx(Ke,{remarkPlugins:[...Ue],allowedElements:[...Oe],transformLinkUri:a=>We(a)??"",transformImageUri:()=>"",components:Fe,children:t.text})}):e.jsx("div",{className:"es-chat__bubble-text",children:t.text}),t.role==="user"&&t.linkStatus==="reading"&&e.jsxs("div",{className:"es-chat__link-status",role:"status",children:[e.jsx("span",{className:"es-chat__link-status-spinner","aria-hidden":"true"}),e.jsx("span",{className:"es-chat__link-status-text",children:r("chat.reading_link")})]}),t.role==="user"&&t.linkStatus==="done"&&(t.linkFailedCount??0)>0&&e.jsxs("div",{className:"es-chat__link-status es-chat__link-status--failed",children:[e.jsx(mt,{size:13}),e.jsx("span",{className:"es-chat__link-status-text",children:r("chat.link_unreadable")})]}),t.role==="assistant"&&t.promptLogId&&k.current&&(()=>{const a=$e?.messageId===t.id?$e.rating:null;return e.jsxs("div",{className:"es-chat__feedback",children:[e.jsx("span",{className:"es-chat__feedback-label",children:t.rating&&a===null?r("chat.feedback_thanks"):r("support_chat.rate_aria")}),e.jsx(ft,{value:a??t.rating??null,onChange:l=>tt(t.id,l),disabled:a===null&&(!!t.rating||t.ratingPending),t:r}),a!==null&&e.jsxs("div",{className:"es-chat__rating-undo",role:"status",children:[e.jsx("span",{className:"es-chat__rating-undo-text",children:r("support_chat.rating_undo_toast",{rating:a})}),e.jsx("button",{type:"button",className:"es-chat__rating-undo-btn",onClick:et,children:r("support_chat.rating_undo_button")})]})]})})()]},t.id)),L&&ge===null&&e.jsxs("div",{className:"es-chat__typing","aria-label":r("chat.typing_aria"),children:[e.jsx("span",{className:"es-chat__typing-dot"}),e.jsx("span",{className:"es-chat__typing-dot"}),e.jsx("span",{className:"es-chat__typing-dot"})]})]}),!V&&c.length>0&&e.jsxs("button",{type:"button",className:"es-chat__jump",onClick:()=>C(),"aria-label":r("chat.jump_to_latest"),title:r("chat.jump_to_latest"),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 5v14"}),e.jsx("path",{d:"m19 12-7 7-7-7"})]}),e.jsx("span",{className:"es-chat__jump-label",children:r("chat.jump_to_latest")})]})]}),e.jsxs("div",{className:"es-block__footer es-chat__footer",children:[ce.length>0&&e.jsx("div",{className:"es-chat__chips",role:"group","aria-label":r("chat.quick_actions_aria"),children:ce.map((t,a)=>e.jsx("button",{type:"button",className:"es-chat__chip",onClick:()=>qe(t),disabled:L||S,children:t.labelKey?r(t.labelKey):t.label},`${t.labelKey??t.label}-${a}`))}),e.jsx("div",{className:"es-chat__disclaimer",children:r("chat.disclaimer")}),e.jsxs("div",{className:"es-chat__input-row",children:[e.jsx("textarea",{ref:v,className:"es-chat__textarea",value:T,onChange:Xe,onKeyDown:Je,placeholder:G,rows:1,maxLength:2e3,disabled:L||S,"aria-label":r("chat.input_aria")}),d&&!S&&e.jsx(ht,{baseUrl:n,apiKey:u,jwt:k.current,language:m,onTranscript:Qe,t:r,streaming:F?.streaming,voiceStream:b?.voiceStream,baseText:()=>T,onText:t=>{if(K(t.length>2e3?t.slice(0,2e3):t),t.length>=2e3){const a=b?.voiceStream;a?.getState&&a.getState()!=="idle"&&a.stop()}requestAnimationFrame(()=>{be(),v.current?.focus()})}}),e.jsx("button",{className:"es-chat__send",onClick:ye,disabled:!T.trim()||L||S,type:"button","aria-label":r("chat.send_aria"),children:L?e.jsx("span",{className:"es-chat__send-loading","aria-hidden":"true",children:"⋯"}):e.jsx("span",{"aria-hidden":"true",children:"➤"})})]})]})]})}const Ne=50;function $t({sessionId:o,baseUrl:i,jwt:n,isOpen:p,onToggle:w,i18n:b}){const y=b?.t??(d=>d),j=p!==void 0,[g,U]=s.useState(!1),S=j?p:g,[r,u]=s.useState([]),[m,G]=s.useState(null),[H,f]=s.useState(!1),[z,I]=s.useState(null),$=s.useRef(!1),E=s.useCallback(async d=>{if(n){f(!0),I(null);try{const c=`${i}/api/chat/sessions/${o}/messages?limit=${Ne}&offset=${d}`,h=await fetch(c,{headers:{Authorization:`Bearer ${n}`},credentials:"include"});if(!h.ok)throw new Error(`HTTP ${h.status}`);const T=await h.json();if(!T.success)throw new Error(y("chat_history.error"));u(K=>d===0?T.data.messages:[...T.data.messages,...K]),G(T.data.pagination)}catch(c){I(c instanceof Error?c.message:y("chat_history.error"))}finally{f(!1)}}},[i,n,o,y]),k=s.useCallback(()=>{j?w?.():U(d=>{const c=!d;return c&&!$.current&&($.current=!0,E(0)),c})},[j,w,E]),F=s.useCallback(()=>{if(!m)return;const d=Math.max(0,m.total-m.offset-Ne-Ne);E(d)},[E,m]);return s.useEffect(()=>{j&&S&&!$.current&&n&&($.current=!0,E(0))},[j,S,n,E]),s.useEffect(()=>{$.current=!1,u([]),G(null),I(null),S&&n&&($.current=!0,E(0))},[o,n]),e.jsxs("div",{className:"es-chat-history",children:[!j&&e.jsxs("button",{className:"es-chat-history__toggle",type:"button","aria-expanded":S,onClick:k,disabled:!n,children:[e.jsx("span",{className:"es-chat-history__toggle-icon",children:S?"▲":"▼"}),y("chat_history.toggle")]}),S&&e.jsxs("div",{className:"es-chat-history__panel",children:[H&&e.jsxs("div",{className:"es-chat-history__loading",role:"status","aria-label":y("chat_history.loading_aria"),children:[e.jsx("span",{className:"es-chat-history__dot"}),e.jsx("span",{className:"es-chat-history__dot"}),e.jsx("span",{className:"es-chat-history__dot"})]}),z&&!H&&e.jsx("div",{className:"es-chat-history__error",role:"alert",children:z}),!H&&!z&&e.jsxs(e.Fragment,{children:[m?.hasMore&&e.jsx("button",{className:"es-chat-history__load-more",type:"button",onClick:F,"aria-label":y("chat_history.load_older_aria"),children:y("chat_history.load_older")}),e.jsxs("div",{className:"es-chat-history__messages",role:"log","aria-live":"polite","aria-label":y("chat_history.panel_aria"),children:[r.length===0&&e.jsx("div",{className:"es-chat-history__empty",children:y("chat_history.empty")}),r.filter(d=>d.role!=="system").map(d=>e.jsx("div",{className:`es-chat-history__bubble es-chat-history__bubble--${d.role}`,children:d.role==="assistant"?e.jsx("div",{className:"es-chat-history__bubble-md",children:e.jsx(Ke,{remarkPlugins:[...Ue],allowedElements:[...Oe],transformLinkUri:c=>We(c)??"",transformImageUri:()=>"",components:Fe,children:d.content})}):d.content},d.id))]})]})]})]})}export{$t as ChatHistoryBlock,It as Component,Nt as manifest};
6
- //# sourceMappingURL=index-B9ozeox8-oy07dUaV.js.map
6
+ //# sourceMappingURL=index-Dc8zecP4-oy07dUaV.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as i,a as j,j as e,Q 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-csHaX5dv-BpgnWlB8.js.map
2
+ //# sourceMappingURL=index-DchTua3m-BpgnWlB8.js.map
@@ -1,2 +1,2 @@
1
1
  import{a as b,r as s,j as e,Q as k}from"../nexly.js";const v={slug:"knowledge-search",name:"Knowledge Search",version:"1.0.0",category:"interactive",requiredService:"knowledge-search",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},maxResults:{type:"number",default:5},minScore:{type:"number",default:.7},placeholder:{type:"string",default:""}}},defaultConfig:{readAloudEnabled:!1,maxResults:5,minScore:.7,placeholder:""},dataContract:{serviceSlug:"knowledge-search",inputSchema:{type:"object",properties:{query:{type:"string",description:"Search query entered by user"},results:{type:"array",items:{type:"object",properties:{title:{type:"string"},excerpt:{type:"string"},score:{type:"number"},url:{type:"string"}}}},totalFound:{type:"number"}},required:["results"]},previewDataOverride:{query:"return policy",results:[{title:"Return & Refund Policy",excerpt:"You may return any item within 30 days of purchase for a full refund.",score:.94,url:"/faq/returns"},{title:"Exchange Policy",excerpt:"Exchanges are accepted within 60 days with original receipt.",score:.81,url:"/faq/exchange"},{title:"Damaged Item Returns",excerpt:"For damaged items, please contact support within 7 days.",score:.75,url:"/faq/damaged"}],totalFound:3}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"maxResults",type:"range",label:"Max results",default:5,min:1,max:20,step:1,group:"Search"},{id:"minScore",type:"range",label:"Minimum relevance score",default:.7,min:.1,max:1,step:.05,group:"Search"},{id:"placeholder",type:"localized-text",label:"Search placeholder",default:"",placeholder:'Leave empty to use translated default (e.g. "Search knowledge base...")',group:"Content"},{id:"model",type:"text",label:"AI model",default:"gpt-4o-mini",placeholder:"e.g. gpt-4o-mini, gpt-4o",group:"AI"}],events:{emits:[{name:"search:querySubmitted",description:"User submitted a search query"},{name:"search:resultSelected",description:"User clicked on a search result"}],listens:[{name:"search:clear",description:"Clear search results and query"}]},sizing:{minWidth:240,preferredHeight:"auto",scrollable:!1},supportedPlacements:["main"]};function j({config:m,actions:o,i18n:d}){const t=d?.t??(a=>a),g=d?.currentLanguage??"en",y=b(m.placeholder,g,{t,fallbackKey:"knowledge_search.placeholder",enDefault:"Search knowledge base..."}),[l,u]=s.useState(""),[n,f]=s.useState(null),[p,c]=s.useState(null),[r,h]=s.useState(!1),i=s.useCallback(async()=>{const a=l.trim();if(!(!a||r)){f(a),c(null),u(""),h(!0);try{const _=await o.call("search",{query:a});c(_?.answer??null)}catch{c(t("knowledge_search.error"))}finally{h(!1)}}},[l,r,o,t]),x=s.useCallback(a=>{a.key==="Enter"&&(a.preventDefault(),i())},[i]);return e.jsxs(k,{blockType:"knowledge-search",children:[e.jsx("div",{className:"es-block__header",children:e.jsxs("div",{className:"es-ksearch__input-row",children:[e.jsx("input",{className:"es-ksearch__input",type:"text",value:l,onChange:a=>u(a.target.value),onKeyDown:x,placeholder:y}),e.jsx("button",{className:"es-ksearch__btn",onClick:i,disabled:!l.trim()||r,type:"button",children:t("knowledge_search.search_btn")})]})}),e.jsxs("div",{className:"es-block__body",children:[r&&e.jsxs("div",{className:"es-ksearch__loading",children:[e.jsx("div",{className:"es-ksearch__loading-question",children:n}),e.jsxs("div",{className:"es-ksearch__loading-indicator",children:[e.jsx("span",{className:"es-ksearch__dot"}),e.jsx("span",{className:"es-ksearch__dot"}),e.jsx("span",{className:"es-ksearch__dot"})]}),e.jsx("div",{className:"es-ksearch__loading-text",children:t("knowledge_search.generating")})]}),!r&&n&&p&&e.jsxs("div",{className:"es-ksearch__answer-section",children:[e.jsx("div",{className:"es-ksearch__question",children:n}),e.jsx("div",{className:"es-ksearch__answer",children:p})]})]})]})}export{j as Component,v as manifest};
2
- //# sourceMappingURL=index-CmYYEi7N-Dr1V6OGz.js.map
2
+ //# sourceMappingURL=index-DdI8qMqt-Dr1V6OGz.js.map
@@ -1,2 +1,2 @@
1
1
  import{r as j,j as e,Q as _,o as w}from"../nexly.js";import{m as x}from"./block-helpers-Cg_zAqG6-DnN2COvk.js";const C={slug:"team-health",name:"Team Health Monitor",version:"1.0.0",category:"interactive",requiredService:"team-health",configSchema:{properties:{readAloudEnabled:{type:"boolean",default:!1},mode:{type:"string",default:"basic"}}},defaultConfig:{mode:"basic",readAloudEnabled:!1},sizing:{minWidth:280,preferredHeight:"auto",scrollable:!0},supportedPlacements:["main","sidebar"],dataContract:{serviceSlug:"team-health",inputSchema:{type:"object",properties:{summary:{type:"object",properties:{healthy:{type:"number"},at_risk:{type:"number"},critical:{type:"number"},total:{type:"number"}}},topAtRiskMember:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},rank:{type:"string"},healthStatus:{type:"string"},healthScore:{type:"number"},riskSignals:{type:"array",items:{type:"string"}}}},reactivationTip:{type:"string"},members:{type:"array",items:{type:"object",properties:{userId:{type:"string"},userName:{type:"string"},rank:{type:"string"},healthStatus:{type:"string"},healthScore:{type:"number"},riskSignals:{type:"array",items:{type:"string"}},teamSales:{type:"number"},personalPurchase:{type:"number"}}}},mode:{type:"string",enum:["basic","pro"]}}},previewDataOverride:{mode:"pro",summary:{healthy:4,at_risk:3,critical:1,total:8},topAtRiskMember:{userId:"preview-1",userName:"Anna Kowalska",rank:"Manager",healthStatus:"critical",healthScore:25,riskSignals:["No personal purchase","No team sales","No team built"],teamSales:0,personalPurchase:0},reactivationTip:"Check in with Anna personally — ask how she's doing with the products first before talking business. A caring message goes a long way.",members:[{userId:"preview-1",userName:"Anna Kowalska",rank:"Manager",healthStatus:"critical",healthScore:25,riskSignals:["No purchase","No sales"]},{userId:"preview-2",userName:"Piotr Nowak",rank:"Senior Manager",healthStatus:"at_risk",healthScore:55,riskSignals:["No team built"]},{userId:"preview-3",userName:"Maria Wiśniewska",rank:"Manager",healthStatus:"healthy",healthScore:85,riskSignals:[]}]}},fields:[{id:"readAloudEnabled",type:"toggle",label:"Read this panel aloud",default:!1,group:"Voice"},{id:"mode",type:"select",label:"Display mode",default:"basic",options:[{label:"Basic — traffic-light summary + top alert + AI tip",value:"basic"},{label:"Pro — full member list with health scores",value:"pro"}],group:"Display"}],events:{emits:[{name:"th:memberSelected",description:"User tapped on a team member"},{name:"th:tipCopied",description:"User copied the reactivation tip"}],listens:[{name:"th:refresh",description:"Force refresh team health data"}]}},i={healthy:"team_health.status.healthy",at_risk:"team_health.status.at_risk",critical:"team_health.status.critical"},c={healthy:"🟢",at_risk:"🟡",critical:"🔴"};function T({data:l,config:N,actions:m,metadata:k,i18n:S}){const t=S?.t??(a=>a),v=N.mode??l.mode??"basic",o=l.summary??{healthy:0,at_risk:0,critical:0,total:0},s=l.topAtRiskMember,n=l.reactivationTip,d=l.members??[],[p,u]=j.useState("idle"),[r,b]=j.useState(null);if(!o.total&&!l.error)return e.jsx(_,{blockType:"team-health",children:e.jsxs("div",{className:"es-block__body es-th__body",children:[e.jsx("div",{className:"es-th__traffic-light",role:"list","aria-label":t("team_health.summary_aria"),children:["critical","at_risk","healthy"].map(a=>e.jsxs("div",{role:"listitem",className:`es-th__tl-cell es-th__tl-cell--${a.replace("_","-")} es-th__tl-cell--empty`,children:[e.jsx("span",{className:"es-th__tl-emoji","aria-hidden":"true",children:c[a]}),e.jsx("span",{className:"es-th__tl-count",children:"0"}),e.jsx("span",{className:"es-th__tl-label",children:t(i[a])})]},a))}),e.jsx("p",{style:{fontSize:13,color:"var(--es-color-on-surface-muted, #4B5563)",margin:"8px 0 0",textAlign:"center"},children:k?.dataQuality==="none"?t("team_health.signin_prompt"):t("team_health.empty")})]})});if(l.error)return e.jsx(_,{blockType:"team-health",error:w(l.error)});async function f(){if(n)try{await navigator.clipboard.writeText(n),u("copied"),m.emit("th:tipCopied",{}),setTimeout(()=>u("idle"),2e3)}catch{}}const y=r?d.filter(a=>a.healthStatus===r):d,g=[...y].sort((a,h)=>a.healthScore-h.healthScore);return e.jsx(_,{blockType:"team-health",children:e.jsxs("div",{className:"es-block__body es-th__body",children:[e.jsx("div",{className:"es-th__traffic-light",role:"list","aria-label":t("team_health.summary_aria"),children:["critical","at_risk","healthy"].map(a=>e.jsxs("button",{role:"listitem",className:`es-th__tl-cell es-th__tl-cell--${a.replace("_","-")} ${r===a?"es-th__tl-cell--active":""}`,onClick:()=>b(r===a?null:a),"aria-pressed":r===a,"aria-label":t("team_health.status_count_aria",{status:t(i[a]),count:o[a]}),children:[e.jsx("span",{className:"es-th__tl-emoji","aria-hidden":"true",children:c[a]}),e.jsx("span",{className:"es-th__tl-count",children:o[a]}),e.jsx("span",{className:"es-th__tl-label",children:t(i[a])})]},a))}),s&&e.jsxs("div",{className:"es-th__alert-card",children:[e.jsxs("div",{className:"es-th__alert-eyebrow",children:[e.jsx("span",{"aria-hidden":"true",children:c[s.healthStatus]})," ",t("team_health.needs_attention")]}),e.jsx("div",{className:"es-th__alert-name",children:s.userName}),e.jsxs("div",{className:"es-th__alert-meta",children:[e.jsx("span",{className:`es-th__badge es-th__badge--${s.healthStatus.replace("_","-")}`,children:t(i[s.healthStatus])}),e.jsx("span",{className:"es-th__rank",children:x(s.rank,t)})]}),s.riskSignals.length>0&&e.jsx("ul",{className:"es-th__risk-signals","aria-label":t("team_health.risk_signals_aria"),children:s.riskSignals.map(a=>e.jsxs("li",{className:"es-th__risk-signal",children:[e.jsx("span",{"aria-hidden":"true",children:"⚠"})," ",a]},a))}),e.jsx("div",{className:"es-th__health-bar-wrap","aria-label":t("team_health.health_score_aria",{score:s.healthScore}),children:e.jsx("div",{className:"es-th__health-bar",style:{width:`${s.healthScore}%`}})}),n&&e.jsxs("div",{className:"es-th__tip",children:[e.jsxs("div",{className:"es-th__tip-header",children:[e.jsxs("span",{className:"es-th__ai-label",children:[e.jsx("span",{"aria-hidden":"true",children:"✨"})," ",t("team_health.ai_tip_label")]}),e.jsx("button",{className:`es-th__copy-btn${p==="copied"?" es-th__copy-btn--copied":""}`,onClick:f,"aria-label":t("team_health.copy_tip_aria"),title:t("common.copy_to_clipboard"),children:p==="copied"?"✓":"⎘"})]}),e.jsx("p",{className:"es-th__tip-text",children:n})]})]}),v==="pro"&&e.jsxs("div",{className:"es-th__member-list",children:[e.jsxs("div",{className:"es-th__member-list-header",children:[e.jsx("span",{className:"es-th__section-title",children:r?t("team_health.status_filtered",{status:t(i[r]),count:y.length}):t("team_health.all_members",{count:d.length})}),r&&e.jsx("button",{className:"es-th__clear-filter",onClick:()=>b(null),children:t("team_health.clear_filter")})]}),g.length===0?e.jsx("p",{className:"es-th__empty",children:t("team_health.empty_status")}):e.jsx("ul",{className:"es-th__members","aria-label":t("team_health.members_aria"),children:g.map(a=>e.jsxs("li",{className:"es-th__member-item",onClick:()=>m.emit("th:memberSelected",{userId:a.userId}),onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),m.emit("th:memberSelected",{userId:a.userId}))},tabIndex:0,role:"button",children:[e.jsxs("div",{className:"es-th__member-header",children:[e.jsx("span",{className:"es-th__member-emoji","aria-hidden":"true",children:c[a.healthStatus]}),e.jsx("span",{className:"es-th__member-name",children:a.userName}),e.jsxs("span",{className:"es-th__member-score",children:[a.healthScore,"%"]})]}),e.jsxs("div",{className:"es-th__member-meta",children:[e.jsx("span",{className:`es-th__badge es-th__badge--${a.healthStatus.replace("_","-")}`,children:t(i[a.healthStatus])}),e.jsx("span",{className:"es-th__rank",children:x(a.rank,t)})]}),e.jsx("div",{className:"es-th__health-bar-wrap",children:e.jsx("div",{className:"es-th__health-bar",style:{width:`${a.healthScore}%`}})}),a.riskSignals.length>0&&e.jsx("p",{className:"es-th__member-signals",children:a.riskSignals.join(" · ")})]},a.userId))})]})]})})}export{T as Component,C as manifest};
2
- //# sourceMappingURL=index-DphwDFW6-C9wFr7fa.js.map
2
+ //# sourceMappingURL=index-Dfcx_9km-C9wFr7fa.js.map