@e-llm-studio/citation 0.0.238 → 0.0.239
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/README.md +2 -1
- package/dist/cjs/features/ChatCitation/InternalChatCitationRenderer.js +1 -1
- package/dist/cjs/features/SPBAnalysisPanel/Spbanalysispanel.js +1 -1
- package/dist/features/ChatCitation/InternalChatCitationRenderer.js +1 -1
- package/dist/features/SPBAnalysisPanel/Spbanalysispanel.js +1 -1
- package/dist/types/src/features/ChatCitation/InternalChatCitationRenderer.d.ts.map +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +1 -0
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
- package/dist/types/src/features/SPBAnalysisPanel/Spbanalysispanel.d.ts +3 -1
- package/dist/types/src/features/SPBAnalysisPanel/Spbanalysispanel.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3234,7 +3234,7 @@ A full-featured interface for reviewing the analysis of a System Prompt Block (S
|
|
|
3234
3234
|
|
|
3235
3235
|
- **Overview summary** — Collapsible high-level + detailed summary
|
|
3236
3236
|
- **Functionality breakdown** — Nested accordions listing functional areas and their APB references
|
|
3237
|
-
- **Jump-to-code navigation** — Clicking an APB reference
|
|
3237
|
+
- **Jump-to-code navigation** — Clicking an APB reference toggles an inline Monaco editor directly beneath it (togglable via `showInlineApbEditor`), scrolled and highlighted to that section. Works independently of `showCodePanel` — if the persistent right-side panel is also shown, both stay in sync
|
|
3238
3238
|
- **Applicability** — Side-by-side "When to apply" / "When NOT to apply" panels
|
|
3239
3239
|
- **Specifications** — Strict Rules / Input / Output, with automatic `<code>` block extraction in Output
|
|
3240
3240
|
- **Dependency Graph** — Interactive, pannable/zoomable graph of APB relationships
|
|
@@ -3270,6 +3270,7 @@ import SPBAnalysisPanel from '@e-llm-studio/citation/SPBAnalysisPanel'
|
|
|
3270
3270
|
| `spbAdditionalInfo` | `SPBAdditionalInfo \| null` | ❌ | — | Applicability, Specifications, and Dependency Graph content |
|
|
3271
3271
|
| `extraMetaData` | `Record<string, any> \| null` | ❌ | — | Shared citation/reasoning map, keyed by the id referenced in `data-cognitive-reasoning="{id}"` anchors. One map is used across **all** sections (Overview, Functionality, APB references, Applicability, Specifications) since anchor ids are assigned globally, not per section |
|
|
3272
3272
|
| `showCodePanel` | `boolean` | ❌ | `true` | Show/hide the persistent right-side editor panel |
|
|
3273
|
+
| `showInlineApbEditor` | `boolean` | ❌ | `true` | Show/hide the inline Monaco editor that expands beneath a clicked APB reference |
|
|
3273
3274
|
## EmailCitation
|
|
3274
3275
|
|
|
3275
3276
|
A composable React UI component for rendering email-style citations with rich formatting, attachments, and highlight/quote handling. Part of the `@e-llm-studio/citation` package, this component is designed to display email content (subject, sender, recipients, body, attachments, timestamps) in an expandable, accessible, and customizable way.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("react/jsx-runtime"),i=require("./components/ChatCitation.js"),o=require("./utils/helpers.js"),n=require("./components/Chip.js"),t=require("./assets/message-chat-square.svg.js");require("@mui/icons-material/KeyboardArrowDown"),require("@mui/icons-material/KeyboardArrowUp"),require("@mui/icons-material/Clear");var r=require("./components/InViewNavigation.js"),d=require("./components/DetailedView.js"),s=require("./components/SummarizedView.js"),a=require("./components/RuleBook.js"),u=require("react"),v=require("./constants/renderer.js"),c=require("./components/IconContainer.js"),h=require("lucide-react"),f=require("./BigQueryTable.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=g(require("@mui/icons-material/CloseOutlined")),b=function(e,l,i){if(void 0===i&&(i="smooth"),l){for(var o=e.parentElement;o;){var n=window.getComputedStyle(o).overflowY;if(("auto"===n||"scroll"===n)&&o.scrollHeight>o.clientHeight)break;if(o===l){o=null;break}o=o.parentElement}var t=null!=o?o:l,r=e.getBoundingClientRect(),d=t.getBoundingClientRect(),s=t.scrollTop+r.top-d.top-(t.clientHeight-r.height)/2;t.scrollTo({top:Math.max(0,s),behavior:i})}},x={chatData:[]};exports.default=function(g){var m,y,_,C,w,S,j,k,q,A,T,D,R,F,z,B,E,I,P,H,V,M,N,W,Y,O,K,Q,U,G,J,L,X,Z,$,ee,le,ie,oe,ne,te,re,de,se,ae,ue,ve,ce,he=g.rootContainer,fe=g.chatContainer,ge=void 0===fe?x:fe,pe=g.ruleBookContainer,be=g.renderer,xe=g.additionalData,me=g.tableComponent,ye=g.closePreview,_e=g.isRenderedCustomComponent,Ce=void 0!==_e&&_e,we=g.showRootContainer,Se=void 0===we||we,je=g.reversePanels,ke=void 0!==je&&je,qe=u.useState(0),Ae=qe[0],Te=qe[1],De=u.useState(0),Re=De[0],Fe=De[1],ze=u.useState(0),Be=ze[0],Ee=ze[1],Ie=u.useState(0),Pe=Ie[0],He=Ie[1],Ve=u.useRef(null),Me=u.useRef(null),Ne=u.useRef(null),We=u.useMemo(function(){return e.__assign(e.__assign({},v.defaultRenderer),be)},[be]),Ye=u.useMemo(function(){return!!((null==me?void 0:me.rows)&&Object.keys(me.rows).length>0)},[me]),Oe=u.useMemo(function(){var e;return null!==(e=null==xe?void 0:xe.RuleBookDetailedViewVerticallyStacked)&&void 0!==e&&e},[null==xe?void 0:xe.RuleBookDetailedViewVerticallyStacked]);u.useEffect(function(){var e,l;if((null==pe?void 0:pe.show)&&Ve.current){var i=null===(e=Ve.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(Te((null==i?void 0:i.length)||0),Fe(0),i&&i.length>0){var o=i[0];o.style.backgroundColor="#ffff5c",b(o,Ve.current)}}if((null==ge?void 0:ge.show)&&(null==Me?void 0:Me.current)){var n=null===(l=Me.current)||void 0===l?void 0:l.querySelectorAll(".user-chat-highlight");if(Ee((null==n?void 0:n.length)||0),He(0),n&&n.length>0){var t=n[0];t.style.backgroundColor="#ffff5c";var r=requestAnimationFrame(function(){b(t,Ne.current)});return function(){return cancelAnimationFrame(r)}}}},[null==ge?void 0:ge.show,null==pe?void 0:pe.show,null==pe?void 0:pe.data,null==ge?void 0:ge.chatData]);var Ke=u.useCallback(function(){var e;if(Re+1<Ae){var l=null===(e=Ve.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(!l)return;l[Re].style.backgroundColor="#ffffb8";var i=Re+1;Fe(i);var o=l[i];o.style.backgroundColor="#ffff5c",b(o,Ve.current)}},[Re,Ae]),Qe=u.useCallback(function(){var e;if(!(Re-1<0)){var l=null===(e=Ve.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(l){l[Re].style.backgroundColor="#ffffb8";var i=Re-1,o=l[i];o.style.backgroundColor="#ffff5c",Fe(i),b(o,Ve.current)}}},[Re]),Ue=u.useCallback(function(){var e;if(Pe+1<Be){var l=null===(e=Me.current)||void 0===e?void 0:e.querySelectorAll(".user-chat-highlight");if(!l)return;l[Pe].style.backgroundColor="#ffffb8";var i=Pe+1,o=l[i];o.style.backgroundColor="#ffff5c",He(i),b(o,Ne.current)}},[Pe,Be]),Ge=u.useCallback(function(){var e;if(!(Pe-1<0)){var l=null===(e=Me.current)||void 0===e?void 0:e.querySelectorAll(".user-chat-highlight");if(l){l[Pe].style.backgroundColor="#ffffb8";var i=Pe-1,o=l[i];o.style.backgroundColor="#ffff5c",He(i),b(o,Ne.current)}}},[Pe]),Je=o.getColorCode((null==he?void 0:he.relevanceScore)||0),Le=u.useMemo(function(){var i,o=l.jsxs("span",e.__assign({style:e.__assign({display:"flex",border:"1px solid",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",borderColor:Je.border,backgroundColor:Je.background,color:Je.text},null===(i=null==he?void 0:he.slotStyles)||void 0===i?void 0:i.relevanceScore)},{children:[(null==he?void 0:he.relevanceTitle)||"Decision Strength",":"," ",(null==he?void 0:he.relevanceScore)||0,"%"]}),"relevance-score"),n=l.jsx("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",backgroundColor:"white",color:"black",cursor:"pointer"},onClick:ye},{children:l.jsx(p.default,{})}),"close-preview");return Ce&&!(null==xe?void 0:xe.isExpanded)?[o,n]:[o]},[Ce,Je.background,Je.border,Je.text,null==he?void 0:he.relevanceScore,null===(m=null==he?void 0:he.slotStyles)||void 0===m?void 0:m.relevanceScore,null==he?void 0:he.relevanceTitle]),Xe=u.useMemo(function(){return[Ae>0&&l.jsx(r.default,{currentItemNumber:Re+1,totalItems:Ae,disableNext:Re+1>=Ae,onNext:Ke,onPrevious:Qe,disablePrevious:Re<=0},"rulebook-nav")]},[Re,Ke,Qe,Ae]),Ze=u.useMemo(function(){return(null==xe?void 0:xe.RuleBookContainerHeight)?xe.RuleBookContainerHeight:!(!Oe||(null==xe?void 0:xe.isExpanded))&&"600px"},[null==xe?void 0:xe.RuleBookContainerHeight,Oe]),$e=u.useMemo(function(){var e,i;return[(null===(i=null===(e=null==ge?void 0:ge.detailedTab)||void 0===e?void 0:e.chip)||void 0===i?void 0:i.isActive)&&Be>0&&l.jsx(r.default,{currentItemNumber:Pe+1,totalItems:Be,onNext:Ue,onPrevious:Ge,disableNext:Pe+1>=Be,disablePrevious:Pe<=0},"chat-nav")]},[null===(_=null===(y=null==ge?void 0:ge.detailedTab)||void 0===y?void 0:y.chip)||void 0===_?void 0:_.isActive,Pe,Ue,Ge,Be]),el=l.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:ke?Oe?"column-reverse":"row-reverse":Oe?"column":"row",gap:[(null==ge?void 0:ge.chatData)&&ge.chatData.length>0&&(ge.show||void 0===ge.show),(null==pe?void 0:pe.data)&&(pe.show||void 0===pe.show),Ye].filter(Boolean).length>1?"12px":"0",height:Ze||"100%",minHeight:0},null===(C=null==he?void 0:he.slotStyles)||void 0===C?void 0:C.container)},{children:[Ye&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(w=null==ge?void 0:ge.slotStyles)||void 0===w?void 0:w.outerContainer)},{children:l.jsx(i.default,e.__assign({title:"Invoice Data Preview",icon:l.jsx(c.default,{children:l.jsx(h.Table,{size:16})}),slotStyles:{title:{color:"#475569",fontWeight:500}},secondaryActions:[]},{children:l.jsx("div",e.__assign({style:{height:"100%",maxHeight:(null==xe?void 0:xe.isExpanded)?"none":"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF",position:"relative",overflow:"hidden"}},{children:(null==me?void 0:me.rows)&&l.jsx(f.BigQueryTable,{rows:me.rows,columns:me.columns||[]})}))}))})),(null==pe?void 0:pe.data)&&(pe.show||void 0===pe.show)&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(S=null==pe?void 0:pe.slotStyles)||void 0===S?void 0:S.outerContainer)},{children:l.jsx(i.default,e.__assign({title:null!==(j=null==pe?void 0:pe.title)&&void 0!==j?j:"Rule book",icon:null==pe?void 0:pe.ruleBookIcon,slotStyles:{title:e.__assign({color:"#475569",fontWeight:500},null===(k=null==pe?void 0:pe.slotStyles)||void 0===k?void 0:k.title),body:null===(q=null==pe?void 0:pe.slotStyles)||void 0===q?void 0:q.body},secondaryActions:(null==pe?void 0:pe.secondaryActions)?pe.secondaryActions(Xe):Xe},{children:l.jsx("div",e.__assign({style:e.__assign({height:"100%",maxHeight:"275px",minHeight:0,border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(A=null==pe?void 0:pe.slotStyles)||void 0===A?void 0:A.dataContainer)},{children:l.jsx("div",e.__assign({style:{padding:"12px",height:"100%",overflowY:"auto"},ref:Ve},{children:l.jsx(a.default,{data:pe.data,renderers:null!==(T=null==pe?void 0:pe.renderer)&&void 0!==T?T:We})}))}))}))})),(null==ge?void 0:ge.chatData)&&ge.chatData.length>0&&(ge.show||void 0===ge.show)&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(D=null==ge?void 0:ge.slotStyles)||void 0===D?void 0:D.outerContainer)},{children:l.jsx(i.default,e.__assign({title:null!==(R=null==ge?void 0:ge.title)&&void 0!==R?R:"Chat",icon:null==ge?void 0:ge.chatIcon,containerStyles:null===(F=null==ge?void 0:ge.slotStyles)||void 0===F?void 0:F.container,slotStyles:{title:e.__assign({color:"#475569",fontWeight:500},null===(z=null==ge?void 0:ge.slotStyles)||void 0===z?void 0:z.title),body:null===(B=null==ge?void 0:ge.slotStyles)||void 0===B?void 0:B.body},primaryActions:[((null===(I=null===(E=null==ge?void 0:ge.summarizedTab)||void 0===E?void 0:E.chip)||void 0===I?void 0:I.show)||void 0===(null===(H=null===(P=null==ge?void 0:ge.summarizedTab)||void 0===P?void 0:P.chip)||void 0===H?void 0:H.show))&&l.jsx(n.default,e.__assign({label:"Summarized"},null===(V=null==ge?void 0:ge.summarizedTab)||void 0===V?void 0:V.chip)),l.jsx(n.default,e.__assign({label:"Detailed"},null===(M=null==ge?void 0:ge.detailedTab)||void 0===M?void 0:M.chip))],secondaryActions:ge.secondaryActions?null==ge?void 0:ge.secondaryActions($e):$e},{children:l.jsxs("div",e.__assign({ref:Ne,style:e.__assign({height:"100%",maxHeight:"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(N=null==ge?void 0:ge.slotStyles)||void 0===N?void 0:N.chatDataContainer)},{children:[(null===(Y=null===(W=null==ge?void 0:ge.detailedTab)||void 0===W?void 0:W.chip)||void 0===Y?void 0:Y.isActive)&&l.jsx("div",e.__assign({ref:Me,style:{position:(null==xe?void 0:xe.isExpanded)?"absolute":"relative",inset:0,padding:"12px",overflowY:"auto"}},{children:l.jsx(d.default,{chatData:null!==(O=ge.chatData)&&void 0!==O?O:[],assistantChatProps:e.__assign(e.__assign({},null===(Q=null===(K=null==ge?void 0:ge.detailedTab)||void 0===K?void 0:K.view)||void 0===Q?void 0:Q.assistantChatProps),{renderers:null!==(J=null===(G=null===(U=null==ge?void 0:ge.detailedTab)||void 0===U?void 0:U.detailedViewRenderer)||void 0===G?void 0:G.assistantText)&&void 0!==J?J:We}),userChatItemProps:e.__assign(e.__assign({},null===(X=null===(L=null==ge?void 0:ge.detailedTab)||void 0===L?void 0:L.view)||void 0===X?void 0:X.userChatItemProps),{renderers:null!==(ee=null===($=null===(Z=null==ge?void 0:ge.detailedTab)||void 0===Z?void 0:Z.detailedViewRenderer)||void 0===$?void 0:$.userText)&&void 0!==ee?ee:We})})})),(null===(ie=null===(le=null==ge?void 0:ge.summarizedTab)||void 0===le?void 0:le.chip)||void 0===ie?void 0:ie.show)&&(null===(ne=null===(oe=null==ge?void 0:ge.summarizedTab)||void 0===oe?void 0:oe.chip)||void 0===ne?void 0:ne.isActive)&&l.jsx(s.default,e.__assign({chatData:null!==(te=ge.chatData)&&void 0!==te?te:[]},null===(re=null==ge?void 0:ge.summarizedTab)||void 0===re?void 0:re.view,{renderer:null!==(se=null===(de=null==ge?void 0:ge.summarizedTab)||void 0===de?void 0:de.summarizedViewRenderer)&&void 0!==se?se:We}))]}))}))}))]}));return Se?l.jsx(i.default,e.__assign({title:null==he?void 0:he.title,slotStyles:{title:null===(ae=null==he?void 0:he.slotStyles)||void 0===ae?void 0:ae.title,body:null===(ue=null==he?void 0:he.slotStyles)||void 0===ue?void 0:ue.body},containerStyles:null===(ve=null==he?void 0:he.slotStyles)||void 0===ve?void 0:ve.container,icon:null!==(ce=null==he?void 0:he.icon)&&void 0!==ce?ce:l.jsx(c.default,{children:l.jsx("img",{src:t.default,alt:"chat icon",style:{width:16,height:16}})}),secondaryActions:(null==he?void 0:he.secondaryActions)?he.secondaryActions(Le):Le},{children:el})):el};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),l=require("react/jsx-runtime"),i=require("./components/ChatCitation.js"),o=require("./utils/helpers.js"),n=require("./components/Chip.js"),t=require("./assets/message-chat-square.svg.js");require("@mui/icons-material/KeyboardArrowDown"),require("@mui/icons-material/KeyboardArrowUp"),require("@mui/icons-material/Clear");var r=require("./components/InViewNavigation.js"),d=require("./components/DetailedView.js"),a=require("./components/SummarizedView.js"),s=require("./components/RuleBook.js"),u=require("react"),v=require("./constants/renderer.js"),c=require("./components/IconContainer.js"),h=require("lucide-react"),f=require("./BigQueryTable.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=g(require("@mui/icons-material/CloseOutlined")),m=function(e,l,i){if(void 0===i&&(i="smooth"),l){for(var o=e.parentElement;o;){var n=window.getComputedStyle(o).overflowY;if(("auto"===n||"scroll"===n)&&o.scrollHeight>o.clientHeight)break;if(o===l){o=null;break}o=o.parentElement}var t=null!=o?o:l,r=e.getBoundingClientRect(),d=t.getBoundingClientRect(),a=t.scrollTop+r.top-d.top-(t.clientHeight-r.height)/2;t.scrollTo({top:Math.max(0,a),behavior:i})}},x={chatData:[]};exports.default=function(g){var b,y,_,C,w,S,j,k,A,q,T,D,R,F,E,I,z,B,P,H,V,M,N,W,Y,O,K,Q,U,G,J,L,X,Z,$,ee,le,ie,oe,ne,te,re,de,ae,se,ue,ve,ce,he=g.rootContainer,fe=g.chatContainer,ge=void 0===fe?x:fe,pe=g.ruleBookContainer,me=g.renderer,xe=g.additionalData,be=g.tableComponent,ye=g.closePreview,_e=g.isRenderedCustomComponent,Ce=void 0!==_e&&_e,we=g.showRootContainer,Se=void 0===we||we,je=g.reversePanels,ke=void 0!==je&&je,Ae=u.useState(0),qe=Ae[0],Te=Ae[1],De=u.useState(0),Re=De[0],Fe=De[1],Ee=u.useState(0),Ie=Ee[0],ze=Ee[1],Be=u.useState(0),Pe=Be[0],He=Be[1],Ve=u.useRef(null),Me=u.useRef(null),Ne=u.useRef(null),We=u.useMemo(function(){return e.__assign(e.__assign({},v.defaultRenderer),me)},[me]),Ye=u.useMemo(function(){return!!((null==be?void 0:be.rows)&&Object.keys(be.rows).length>0)},[be]),Oe=u.useMemo(function(){var e;return null!==(e=null==xe?void 0:xe.RuleBookDetailedViewVerticallyStacked)&&void 0!==e&&e},[null==xe?void 0:xe.RuleBookDetailedViewVerticallyStacked]);u.useEffect(function(){var e,l,i;if((null==pe?void 0:pe.show)&&Ve.current){var o=null===(e=Ve.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(Te((null==o?void 0:o.length)||0),Fe(0),o&&o.length>0){var n=o[0];n.style.backgroundColor="#ffff5c",m(n,Ve.current)}}if((null==ge?void 0:ge.show)&&(null==Me?void 0:Me.current)){var t=null===(l=Me.current)||void 0===l?void 0:l.querySelectorAll(".user-chat-highlight");if(ze((null==t?void 0:t.length)||0),He(0),t&&t.length>0){var r=t[0];r.style.backgroundColor="#ffff5c";var d=requestAnimationFrame(function(){m(r,Ne.current)});return function(){return cancelAnimationFrame(d)}}var a=null==xe?void 0:xe.targetIndex;if(void 0!==a&&a>=0&&(null===(i=Me.current)||void 0===i?void 0:i.firstElementChild)){var s=Me.current.firstElementChild.children[a];if(s){var u=requestAnimationFrame(function(){m(s,Ne.current)});return function(){return cancelAnimationFrame(u)}}}}},[null==ge?void 0:ge.show,null==pe?void 0:pe.show,null==pe?void 0:pe.data,null==ge?void 0:ge.chatData,null==xe?void 0:xe.targetIndex]);var Ke=u.useCallback(function(){var e;if(Re+1<qe){var l=null===(e=Ve.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(!l)return;l[Re].style.backgroundColor="#ffffb8";var i=Re+1;Fe(i);var o=l[i];o.style.backgroundColor="#ffff5c",m(o,Ve.current)}},[Re,qe]),Qe=u.useCallback(function(){var e;if(!(Re-1<0)){var l=null===(e=Ve.current)||void 0===e?void 0:e.querySelectorAll(".rule-book-highlight");if(l){l[Re].style.backgroundColor="#ffffb8";var i=Re-1,o=l[i];o.style.backgroundColor="#ffff5c",Fe(i),m(o,Ve.current)}}},[Re]),Ue=u.useCallback(function(){var e;if(Pe+1<Ie){var l=null===(e=Me.current)||void 0===e?void 0:e.querySelectorAll(".user-chat-highlight");if(!l)return;l[Pe].style.backgroundColor="#ffffb8";var i=Pe+1,o=l[i];o.style.backgroundColor="#ffff5c",He(i),m(o,Ne.current)}},[Pe,Ie]),Ge=u.useCallback(function(){var e;if(!(Pe-1<0)){var l=null===(e=Me.current)||void 0===e?void 0:e.querySelectorAll(".user-chat-highlight");if(l){l[Pe].style.backgroundColor="#ffffb8";var i=Pe-1,o=l[i];o.style.backgroundColor="#ffff5c",He(i),m(o,Ne.current)}}},[Pe]),Je=o.getColorCode((null==he?void 0:he.relevanceScore)||0),Le=u.useMemo(function(){var i,o=l.jsxs("span",e.__assign({style:e.__assign({display:"flex",border:"1px solid",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",borderColor:Je.border,backgroundColor:Je.background,color:Je.text},null===(i=null==he?void 0:he.slotStyles)||void 0===i?void 0:i.relevanceScore)},{children:[(null==he?void 0:he.relevanceTitle)||"Decision Strength",":"," ",(null==he?void 0:he.relevanceScore)||0,"%"]}),"relevance-score"),n=l.jsx("span",e.__assign({style:{display:"flex",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",backgroundColor:"white",color:"black",cursor:"pointer"},onClick:ye},{children:l.jsx(p.default,{})}),"close-preview");return Ce&&!(null==xe?void 0:xe.isExpanded)?[o,n]:[o]},[Ce,Je.background,Je.border,Je.text,null==he?void 0:he.relevanceScore,null===(b=null==he?void 0:he.slotStyles)||void 0===b?void 0:b.relevanceScore,null==he?void 0:he.relevanceTitle]),Xe=u.useMemo(function(){return[qe>0&&l.jsx(r.default,{currentItemNumber:Re+1,totalItems:qe,disableNext:Re+1>=qe,onNext:Ke,onPrevious:Qe,disablePrevious:Re<=0},"rulebook-nav")]},[Re,Ke,Qe,qe]),Ze=u.useMemo(function(){return(null==xe?void 0:xe.RuleBookContainerHeight)?xe.RuleBookContainerHeight:!(!Oe||(null==xe?void 0:xe.isExpanded))&&"600px"},[null==xe?void 0:xe.RuleBookContainerHeight,Oe]),$e=u.useMemo(function(){var e,i;return[(null===(i=null===(e=null==ge?void 0:ge.detailedTab)||void 0===e?void 0:e.chip)||void 0===i?void 0:i.isActive)&&Ie>0&&l.jsx(r.default,{currentItemNumber:Pe+1,totalItems:Ie,onNext:Ue,onPrevious:Ge,disableNext:Pe+1>=Ie,disablePrevious:Pe<=0},"chat-nav")]},[null===(_=null===(y=null==ge?void 0:ge.detailedTab)||void 0===y?void 0:y.chip)||void 0===_?void 0:_.isActive,Pe,Ue,Ge,Ie]),el=l.jsxs("div",e.__assign({style:e.__assign({display:"flex",flexDirection:ke?Oe?"column-reverse":"row-reverse":Oe?"column":"row",gap:[(null==ge?void 0:ge.chatData)&&ge.chatData.length>0&&(ge.show||void 0===ge.show),(null==pe?void 0:pe.data)&&(pe.show||void 0===pe.show),Ye].filter(Boolean).length>1?"12px":"0",height:Ze||"100%",minHeight:0},null===(C=null==he?void 0:he.slotStyles)||void 0===C?void 0:C.container)},{children:[Ye&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(w=null==ge?void 0:ge.slotStyles)||void 0===w?void 0:w.outerContainer)},{children:l.jsx(i.default,e.__assign({title:"Invoice Data Preview",icon:l.jsx(c.default,{children:l.jsx(h.Table,{size:16})}),slotStyles:{title:{color:"#475569",fontWeight:500}},secondaryActions:[]},{children:l.jsx("div",e.__assign({style:{height:"100%",maxHeight:(null==xe?void 0:xe.isExpanded)?"none":"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF",position:"relative",overflow:"hidden"}},{children:(null==be?void 0:be.rows)&&l.jsx(f.BigQueryTable,{rows:be.rows,columns:be.columns||[]})}))}))})),(null==pe?void 0:pe.data)&&(pe.show||void 0===pe.show)&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(S=null==pe?void 0:pe.slotStyles)||void 0===S?void 0:S.outerContainer)},{children:l.jsx(i.default,e.__assign({title:null!==(j=null==pe?void 0:pe.title)&&void 0!==j?j:"Rule book",icon:null==pe?void 0:pe.ruleBookIcon,slotStyles:{title:e.__assign({color:"#475569",fontWeight:500},null===(k=null==pe?void 0:pe.slotStyles)||void 0===k?void 0:k.title),body:null===(A=null==pe?void 0:pe.slotStyles)||void 0===A?void 0:A.body},secondaryActions:(null==pe?void 0:pe.secondaryActions)?pe.secondaryActions(Xe):Xe},{children:l.jsx("div",e.__assign({style:e.__assign({height:"100%",maxHeight:"275px",minHeight:0,border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(q=null==pe?void 0:pe.slotStyles)||void 0===q?void 0:q.dataContainer)},{children:l.jsx("div",e.__assign({style:{padding:"12px",height:"100%",overflowY:"auto"},ref:Ve},{children:l.jsx(s.default,{data:pe.data,renderers:null!==(T=null==pe?void 0:pe.renderer)&&void 0!==T?T:We})}))}))}))})),(null==ge?void 0:ge.chatData)&&ge.chatData.length>0&&(ge.show||void 0===ge.show)&&l.jsx("span",e.__assign({style:e.__assign({flex:"1 1 0%",minWidth:0},null===(D=null==ge?void 0:ge.slotStyles)||void 0===D?void 0:D.outerContainer)},{children:l.jsx(i.default,e.__assign({title:null!==(R=null==ge?void 0:ge.title)&&void 0!==R?R:"Chat",icon:null==ge?void 0:ge.chatIcon,containerStyles:null===(F=null==ge?void 0:ge.slotStyles)||void 0===F?void 0:F.container,slotStyles:{title:e.__assign({color:"#475569",fontWeight:500},null===(E=null==ge?void 0:ge.slotStyles)||void 0===E?void 0:E.title),body:null===(I=null==ge?void 0:ge.slotStyles)||void 0===I?void 0:I.body},primaryActions:[((null===(B=null===(z=null==ge?void 0:ge.summarizedTab)||void 0===z?void 0:z.chip)||void 0===B?void 0:B.show)||void 0===(null===(H=null===(P=null==ge?void 0:ge.summarizedTab)||void 0===P?void 0:P.chip)||void 0===H?void 0:H.show))&&l.jsx(n.default,e.__assign({label:"Summarized"},null===(V=null==ge?void 0:ge.summarizedTab)||void 0===V?void 0:V.chip)),l.jsx(n.default,e.__assign({label:"Detailed"},null===(M=null==ge?void 0:ge.detailedTab)||void 0===M?void 0:M.chip))],secondaryActions:ge.secondaryActions?null==ge?void 0:ge.secondaryActions($e):$e},{children:l.jsxs("div",e.__assign({ref:Ne,style:e.__assign({height:"100%",maxHeight:"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(N=null==ge?void 0:ge.slotStyles)||void 0===N?void 0:N.chatDataContainer)},{children:[(null===(Y=null===(W=null==ge?void 0:ge.detailedTab)||void 0===W?void 0:W.chip)||void 0===Y?void 0:Y.isActive)&&l.jsx("div",e.__assign({ref:Me,style:{position:(null==xe?void 0:xe.isExpanded)?"absolute":"relative",inset:0,padding:"12px",overflowY:"auto"}},{children:l.jsx(d.default,{chatData:null!==(O=ge.chatData)&&void 0!==O?O:[],assistantChatProps:e.__assign(e.__assign({},null===(Q=null===(K=null==ge?void 0:ge.detailedTab)||void 0===K?void 0:K.view)||void 0===Q?void 0:Q.assistantChatProps),{renderers:null!==(J=null===(G=null===(U=null==ge?void 0:ge.detailedTab)||void 0===U?void 0:U.detailedViewRenderer)||void 0===G?void 0:G.assistantText)&&void 0!==J?J:We}),userChatItemProps:e.__assign(e.__assign({},null===(X=null===(L=null==ge?void 0:ge.detailedTab)||void 0===L?void 0:L.view)||void 0===X?void 0:X.userChatItemProps),{renderers:null!==(ee=null===($=null===(Z=null==ge?void 0:ge.detailedTab)||void 0===Z?void 0:Z.detailedViewRenderer)||void 0===$?void 0:$.userText)&&void 0!==ee?ee:We})})})),(null===(ie=null===(le=null==ge?void 0:ge.summarizedTab)||void 0===le?void 0:le.chip)||void 0===ie?void 0:ie.show)&&(null===(ne=null===(oe=null==ge?void 0:ge.summarizedTab)||void 0===oe?void 0:oe.chip)||void 0===ne?void 0:ne.isActive)&&l.jsx(a.default,e.__assign({chatData:null!==(te=ge.chatData)&&void 0!==te?te:[]},null===(re=null==ge?void 0:ge.summarizedTab)||void 0===re?void 0:re.view,{renderer:null!==(ae=null===(de=null==ge?void 0:ge.summarizedTab)||void 0===de?void 0:de.summarizedViewRenderer)&&void 0!==ae?ae:We}))]}))}))}))]}));return Se?l.jsx(i.default,e.__assign({title:null==he?void 0:he.title,slotStyles:{title:null===(se=null==he?void 0:he.slotStyles)||void 0===se?void 0:se.title,body:null===(ue=null==he?void 0:he.slotStyles)||void 0===ue?void 0:ue.body},containerStyles:null===(ve=null==he?void 0:he.slotStyles)||void 0===ve?void 0:ve.container,icon:null!==(ce=null==he?void 0:he.icon)&&void 0!==ce?ce:l.jsx(c.default,{children:l.jsx("img",{src:t.default,alt:"chat icon",style:{width:16,height:16}})}),secondaryActions:(null==he?void 0:he.secondaryActions)?he.secondaryActions(Le):Le},{children:el})):el};
|
|
2
2
|
//# sourceMappingURL=InternalChatCitationRenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),o=require("@mui/material"),t=require("@mui/icons-material/ExpandMore"),s=require("@mui/icons-material/Fullscreen"),r=require("@mui/icons-material/Close"),l=require("@mui/icons-material/NearMeOutlined"),a=require("@mui/icons-material/ChevronLeft"),d=require("@mui/icons-material/ChevronRight"),c=require("./DependencyGraph.js"),x=require("./Markdownrenderer.js"),p=require("./Internaleditor.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=h(t),g=h(s),f=h(r),_=h(l),m=h(a),y=h(d),j=function(t){var s=t.text,r=t.detailedSummary,l=t.extraMetaData,a=t.isDarkMode,d=void 0!==a&&a,c=t.markdownRendererStyle,p=n.useState(!1),h=p[0],u=p[1],g=function(e,i){void 0===i&&(i=220);var n=e.replace(/<!--\s*<ai_reasoning>[\s\S]*?<\/ai_reasoning>\s*-->/g,"").replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim();if(n.length<=i)return{preview:n,truncated:!1};var o=n.slice(0,i),t=o.lastIndexOf(" ");return{preview:(t>0?o.slice(0,t):o).trim(),truncated:!0}}(s),f=g.preview,_=g.truncated;return i.jsx(o.Box,{children:h?i.jsxs(o.Box,{children:[i.jsx(x.MarkdownRenderer,{message:s,fontSize:"0.8rem",extraMetaData:l,isDarkMode:d,style:c}),(null==r?void 0:r.trim())&&i.jsx(x.MarkdownRenderer,{message:r,fontSize:"0.8rem",extraMetaData:l,isDarkMode:d,style:c}),i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return u(!1)},sx:{fontSize:"0.72rem",color:d?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"view less"}))]}):i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column"}},{children:[i.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.8rem",color:d?"#cbd5e1":"#4B5563",lineHeight:1.6}},{children:[f,_&&"…"]})),(_||(null==r?void 0:r.trim()))&&i.jsx(o.Box,e.__assign({sx:{display:"flex",justifyContent:"flex-end"}},{children:i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return u(!0)},sx:{fontSize:"0.72rem",color:d?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"...view more"}))}))]}))})},v=function(t){var s=t.text,r=t.extraMetaData,l=n.useState(!1),a=l[0],d=l[1],c=n.useState(!1),p=c[0],h=c[1],u=n.useRef(null);return n.useEffect(function(){var e=u.current;e&&h(e.scrollWidth>e.clientWidth)},[s]),i.jsx(o.Box,e.__assign({sx:{pl:1}},{children:a?i.jsxs(o.Box,e.__assign({sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4}},{children:[i.jsx(x.MarkdownRenderer,{message:s,fontSize:"0.68rem",extraMetaData:r}),i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return d(!1)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600}},{children:"view less"}))]})):i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"baseline",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({ref:u,sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,minWidth:0}},{children:s})),p&&i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return d(!0)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600,flexShrink:0}},{children:"view more"}))]}))}))};exports.default=function(t){var s,r=t.promptContent,l=t.promptTitle,a=t.isLoading,d=void 0!==a&&a,h=t.overviewSummary,b=t.functionalityOfSPB,S=void 0===b?[]:b,w=t.spbAdditionalInfo,B=t.extraMetaData,k=t.showCodePanel,E=void 0===k||k,D=t.showCollapseStrip,z=void 0===D||D,M=t.showFullscreenButton,T=void 0===M||M,A=t.showFullscreenModal,R=void 0===A||A,C=t.showThemeToggle,F=void 0===C||C,I=t.isDarkMode,W=void 0===I||I,P=t.styles,H=t.className,L=t.style,q=t.sx,O=n.useState(null),G=O[0],N=O[1],X=n.useState(null),Y=X[0],J=X[1],K=n.useState(""),Q=K[0],U=K[1],V=void 0!==(null==P?void 0:P.isDarkMode)?P.isDarkMode:W,Z=n.useState(V),$=Z[0],ee=Z[1],ie=n.useState(null),ne=ie[0],oe=ie[1];n.useEffect(function(){void 0!==(null==P?void 0:P.isDarkMode)&&ee(P.isDarkMode)},[null==P?void 0:P.isDarkMode]);var te=n.useState(!1),se=te[0],re=te[1],le=n.useState(480),ae=le[0],de=le[1],ce=n.useRef(!1),xe=n.useRef(null);n.useEffect(function(){var e,i,n;S.length>0&&N((e=new Date,i=e.toLocaleTimeString("en-IN",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),n=e.toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"}),"".concat(i||""," | ").concat(n||"")))},[S]),n.useEffect(function(){d&&N(null)},[d]),n.useEffect(function(){ne&&(U(""),setTimeout(function(){return U(ne.ref)},500))},[ne]);return i.jsxs(o.Box,e.__assign({className:H,style:e.__assign(e.__assign({},null==P?void 0:P.root),L),sx:e.__assign({height:"100%",display:"flex",flexDirection:"column",width:"100%",minHeight:0,overflow:"hidden"},q)},{children:[i.jsx(o.Box,e.__assign({sx:e.__assign({px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0},null==P?void 0:P.header)},{children:i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.25}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:700,fontSize:"0.9rem",color:"#111827"},null==P?void 0:P.headerTitle)},{children:l||"SPB Analysis"})),i.jsx(o.Typography,e.__assign({sx:e.__assign({fontSize:"0.7rem",color:"#9CA3AF"},null==P?void 0:P.headerSubtitle)},{children:G?"Last Analyzed at ".concat(G):""}))]}))})),i.jsxs(o.Box,e.__assign({ref:xe,sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden",position:"relative"}},{children:[i.jsx(o.Box,e.__assign({sx:e.__assign({width:E?se&&z?0:ae:"100%",flexShrink:0,minHeight:0,overflow:"hidden",transition:ce.current?"none":"width 0.15s",borderRight:!E||se&&z?"none":"1px solid #e5e7eb"},null==P?void 0:P.leftPanel)},{children:i.jsxs(o.Box,e.__assign({sx:{width:"100%",height:"100%",minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1,px:1.25,py:1.25,pb:2}},{children:[i.jsxs(o.Box,e.__assign({sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px",bgcolor:"#F8FAFC",p:1.5},null==P?void 0:P.overviewSection)},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827",mb:1},null==P?void 0:P.overviewTitle)},{children:"Overview"})),i.jsx(o.Box,e.__assign({sx:e.__assign({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5},null==P?void 0:P.overviewContent)},{children:(null===(s=null==h?void 0:h.overallSummary)||void 0===s?void 0:s.trim())?i.jsx(j,{text:h.overallSummary,detailedSummary:h.detailedSummary,extraMetaData:B,isDarkMode:$,markdownRendererStyle:null==P?void 0:P.markdownRenderer}):i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"95%",height:14})]}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==P?void 0:P.functionalitySection)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75}}},{children:i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==P?void 0:P.functionalityTitle)},{children:"Functionality of SPB"}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:S.length>0?S.map(function(n,t){return i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,defaultExpanded:0===t,sx:e.__assign({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},overflow:"hidden"},null==P?void 0:P.functionalityItem)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:38,"& .MuiAccordionSummary-content":{my:.5}}},{children:i.jsxs(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827"}},{children:[t+1,". ",n.name||n.section_name]}))})),i.jsxs(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,display:"flex",flexDirection:"column",gap:.75}},{children:[i.jsx(x.MarkdownRenderer,{fontSize:"0.74rem",message:n.description||n.reason_for_inclusion||"",extraMetaData:B}),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.72rem",color:"#9CA3AF",fontWeight:500,mt:.25}},{children:"APB References"})),i.jsx(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.75}},{children:n.apb_references.map(function(n,t){var s="string"==typeof n?n:n.apb_name,r=Y===s;return i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.15}},{children:[i.jsxs(o.Box,e.__assign({onClick:function(){return function(e){Y===e?(J(null),U("")):(J(e),U(""),setTimeout(function(){return U(e)},50))}(s)},sx:{display:"flex",alignItems:"center",gap:.25,cursor:"pointer"}},{children:[i.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.78rem",color:r?"#5928ed":"#DB2877",fontWeight:500}},{children:[t+1,". ",s]})),i.jsx(_.default,{sx:{fontSize:"0.75rem",color:r?"#5928ed":"#DB2877"}})]})),"string"!=typeof n&&(n.description||n.context)&&i.jsx(v,{text:n.description||n.context||"",extraMetaData:B})]}),t)})}))]}))]}),t)}):i.jsx(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[1,2,3].map(function(n){return i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5,display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"40%",height:16}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"30%",height:14})]}),n)})}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==P?void 0:P.applicabilitySection)},{children:[i.jsxs(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==P?void 0:P.applicabilityTitle)},{children:"Applicability"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"When to Apply this SPB / When Not Apply"}))]})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC"}},{children:i.jsx(o.Box,e.__assign({sx:{display:"flex",gap:1}},{children:[{label:"When to apply",content:null==w?void 0:w.when_to_apply},{label:"When NOT to apply",content:null==w?void 0:w.when_not_to_apply}].map(function(n){var t=n.label,s=n.content;return i.jsxs(o.Box,e.__assign({sx:{flex:1,bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px",p:1.25}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151",mb:.75}},{children:t})),s?i.jsx(x.MarkdownRenderer,{fontSize:"0.8rem",message:s,isDarkMode:$,style:null==P?void 0:P.markdownRenderer,extraMetaData:B}):d?i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14})]})):i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.8rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))]}),t)})}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==P?void 0:P.specificationsSection)},{children:[i.jsxs(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==P?void 0:P.specificationsTitle)},{children:"Specifications"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"Strict Rules / Input / Output"}))]})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:[{label:"Strict Rules",tooltip:null,content:null==w?void 0:w.constraints_and_rules},{label:"Input",tooltip:"Input specification for this SPB",content:null==w?void 0:w.input_analysis},{label:"Output",tooltip:"Output specification for this SPB",content:null==w?void 0:w.output_analysis}].map(function(n){var t=n.label,s=n.tooltip,r=n.content,l="Output"===t,a=l&&r?function(e){var i=[];return{text:e.replace(/<code>([\s\S]*?)<\/code>/g,function(e,n){return i.push(n.trim()),""}).trim(),code:i.join("\n\n")}}(r):null,c=a?a.text:r,h=a?a.code:"";return i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,defaultExpanded:"Strict Rules"===t,sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px !important","&:before":{display:"none"},overflow:"hidden"}},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem"}}),sx:{minHeight:34,px:1.25,"& .MuiAccordionSummary-content":{my:.4}}},{children:i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151"}},{children:t})),s&&i.jsx(o.Tooltip,e.__assign({title:s,placement:"top"},{children:i.jsx(o.Box,e.__assign({component:"span",sx:{width:13,height:13,borderRadius:"50%",background:"#E5E7EB",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"0.58rem",color:"#6B7280",fontWeight:700,cursor:"default",flexShrink:0}},{children:"i"}))}))]}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.25,pb:1.25,pt:0}},{children:r?i.jsxs(i.Fragment,{children:[c&&i.jsx(x.MarkdownRenderer,{fontSize:"0.8rem",message:c,isDarkMode:$,style:null==P?void 0:P.markdownRenderer,extraMetaData:B}),l&&h&&i.jsxs(o.Box,e.__assign({sx:{width:"100%",height:"35vh",mt:1.5}},{children:[i.jsxs(o.Box,e.__assign({sx:{display:"flex",gap:.1,backgroundColor:"black",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:1,borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(o.Typography,e.__assign({sx:{color:"white",fontWeight:500,fontSize:"0.8rem"}},{children:"Output preview"})),i.jsx(o.Tooltip,e.__assign({title:"Copy Code to clipboard"},{children:i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return e=h,navigator.clipboard.writeText(e);var e}},{children:i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"white"}},{children:"Copy"}))}))}))]})),i.jsx(o.Box,e.__assign({sx:{mt:-1,height:"calc(100% - 40px)",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:"hidden"}},{children:i.jsx(p.InternalEditor,{content:h,isDarkMode:$,height:"100%",fontSize:10})}))]}))]}):d?i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"75%",height:14})]})):i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))}))]}),t)})}))]})),i.jsxs(o.Accordion,e.__assign({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},bgcolor:"#fff"},null==P?void 0:P.dependencyGraphSection)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75},"&.Mui-expanded":{bgcolor:"#F8FAFC",borderRadius:"8px 8px 0 0"}}},{children:i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==P?void 0:P.dependencyGraphTitle)},{children:"Dependency Graph"}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:0,pb:0,pt:0}},{children:(null==w?void 0:w.dependency_graph)?i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#F8FAFC",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1.5}},{children:[i.jsx(o.Box,e.__assign({sx:{height:500,borderRadius:"8px",overflow:"hidden"}},{children:i.jsx(c.default,{data:w.dependency_graph,isDarkMode:$,style:null==P?void 0:P.dependencyGraph})})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.72rem",color:"#64748B",lineHeight:1.6}},{children:"This graph visualises how Atomic Prompt Blocks (APBs) depend on, influence, or exchange information with one another within the prompt architecture."}))]})):i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#fff",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1}},{children:[i.jsx(o.Skeleton,{variant:"rectangular",width:"100%",height:400,sx:{borderRadius:"8px"}}),i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14})]}))}))]}))]}))})),E&&z&&i.jsx(o.Box,e.__assign({onClick:function(){return re(function(e){return!e})},sx:e.__assign({width:20,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRight:"1px solid #e5e7eb",borderLeft:"1px solid #e5e7eb",bgcolor:"#f9fafb",position:"relative",py:2,"&:hover":{bgcolor:"#f0f0f0"}},null==P?void 0:P.collapseStrip)},{children:i.jsx(o.Typography,e.__assign({sx:{fontSize:10,fontWeight:600,color:"#6b7280",writingMode:"vertical-rl",textOrientation:"mixed",transform:"rotate(180deg)",letterSpacing:"0.05em",userSelect:"none"}},{children:"SPB Details"}))})),E&&z&&i.jsx(o.Box,e.__assign({onClick:function(){return re(function(e){return!e})},onMouseDown:function(e){e.preventDefault(),ce.current=!0;var i=function(e){if(ce.current&&xe.current){var o=xe.current.getBoundingClientRect(),t=o.left,s=o.width,r=e.clientX-t;if(r<200)return re(!0),ce.current=!1,document.removeEventListener("mousemove",i),void document.removeEventListener("mouseup",n);r>.7*s||(re(!1),de(r))}},n=function(){ce.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)},sx:e.__assign({position:"absolute",left:se?20:ae+20,top:"50%",transform:"translateY(-50%)",width:18,height:28,bgcolor:"#fff",border:"1px solid #e5e7eb",borderRadius:"0 6px 6px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"col-resize",zIndex:5,boxShadow:"2px 0 4px rgba(0,0,0,0.06)","&:hover":{bgcolor:"#f9fafb"}},null==P?void 0:P.dragHandle)},{children:se?i.jsx(y.default,{sx:{fontSize:12,color:"#6b7280"}}):i.jsx(m.default,{sx:{fontSize:12,color:"#6b7280"}})})),E&&i.jsxs(o.Box,e.__assign({sx:e.__assign({flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5,bgcolor:"#f8fafc"},null==P?void 0:P.codePanel)},{children:[i.jsxs(o.Box,e.__assign({sx:e.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},null==P?void 0:P.codePanelHeader)},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontSize:13,fontWeight:600,color:"#374151"},null==P?void 0:P.codePanelTitle)},{children:l||"SPB Analysis"})),i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:[F&&i.jsx(o.Switch,{checked:$,onChange:function(e){return ee(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}}),T&&R&&i.jsx(o.Tooltip,e.__assign({title:"Fullscreen",placement:"top"},{children:i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return oe({ref:Q||"",description:""})},sx:{color:"#6b7280"}},{children:i.jsx(g.default,{sx:{fontSize:16}})}))}))]}))]})),i.jsx(o.Box,e.__assign({sx:e.__assign({flex:1,minHeight:0,border:"1px solid #30363d",borderRadius:1,overflow:"hidden"},null==P?void 0:P.editorContainer)},{children:i.jsx(p.InternalEditor,{content:r,selectedTag:Q,isDarkMode:$,height:"100%",fontSize:13})}))]}))]})),R&&i.jsxs(o.Dialog,e.__assign({open:!!ne,onClose:function(){return oe(null)},maxWidth:!1,PaperProps:{sx:e.__assign({width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},null==P?void 0:P.fullscreenModal)}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Promptemon"})),i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return oe(null)}},{children:i.jsx(f.default,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[i.jsxs(o.Box,e.__assign({sx:{width:"40%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[i.jsx(o.Tooltip,e.__assign({title:"Atomic Prompt Block",placement:"top"},{children:i.jsx(o.Chip,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}})})),i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.9rem",color:"#111827"}},{children:null==ne?void 0:ne.ref}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,p:2,display:"flex",flexDirection:"column",gap:1.5,overflowY:"auto"}},{children:[i.jsxs(o.Box,e.__assign({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:null==ne?void 0:ne.description}))]})),i.jsxs(o.Box,e.__assign({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.25,display:"flex",alignItems:"center",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",color:"#6B7280"}},{children:"Total Lines"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",fontWeight:700,color:"#111827"}},{children:r.split("\n").length}))]}))]}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),i.jsx(o.Switch,{checked:$,onChange:function(e){return ee(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}})]})),i.jsx(o.Box,e.__assign({sx:{flex:1,minHeight:0,p:1.5}},{children:i.jsx(p.InternalEditor,{content:r,selectedTag:Q,isDarkMode:$,height:"100%",fontSize:13})}))]}))]}))]}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),n=require("react"),o=require("@mui/material"),t=require("@mui/icons-material/ExpandMore"),s=require("@mui/icons-material/Fullscreen"),r=require("@mui/icons-material/Close"),l=require("@mui/icons-material/NearMeOutlined"),a=require("@mui/icons-material/ChevronLeft"),d=require("@mui/icons-material/ChevronRight"),c=require("./DependencyGraph.js"),x=require("./Markdownrenderer.js"),p=require("./Internaleditor.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=h(t),g=h(s),f=h(r),_=h(l),m=h(a),y=h(d),j=function(t){var s=t.text,r=t.detailedSummary,l=t.extraMetaData,a=t.isDarkMode,d=void 0!==a&&a,c=t.markdownRendererStyle,p=n.useState(!1),h=p[0],u=p[1],g=function(e,i){void 0===i&&(i=220);var n=e.replace(/<!--\s*<ai_reasoning>[\s\S]*?<\/ai_reasoning>\s*-->/g,"").replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim();if(n.length<=i)return{preview:n,truncated:!1};var o=n.slice(0,i),t=o.lastIndexOf(" ");return{preview:(t>0?o.slice(0,t):o).trim(),truncated:!0}}(s),f=g.preview,_=g.truncated;return i.jsx(o.Box,{children:h?i.jsxs(o.Box,{children:[i.jsx(x.MarkdownRenderer,{message:s,fontSize:"0.8rem",extraMetaData:l,isDarkMode:d,style:c}),(null==r?void 0:r.trim())&&i.jsx(x.MarkdownRenderer,{message:r,fontSize:"0.8rem",extraMetaData:l,isDarkMode:d,style:c}),i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return u(!1)},sx:{fontSize:"0.72rem",color:d?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"view less"}))]}):i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column"}},{children:[i.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.8rem",color:d?"#cbd5e1":"#4B5563",lineHeight:1.6}},{children:[f,_&&"…"]})),(_||(null==r?void 0:r.trim()))&&i.jsx(o.Box,e.__assign({sx:{display:"flex",justifyContent:"flex-end"}},{children:i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return u(!0)},sx:{fontSize:"0.72rem",color:d?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"...view more"}))}))]}))})},v=function(t){var s=t.text,r=t.extraMetaData,l=n.useState(!1),a=l[0],d=l[1],c=n.useState(!1),p=c[0],h=c[1],u=n.useRef(null);return n.useEffect(function(){var e=u.current;e&&h(e.scrollWidth>e.clientWidth)},[s]),i.jsx(o.Box,e.__assign({sx:{pl:1}},{children:a?i.jsxs(o.Box,e.__assign({sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4}},{children:[i.jsx(x.MarkdownRenderer,{message:s,fontSize:"0.68rem",extraMetaData:r}),i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return d(!1)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600}},{children:"view less"}))]})):i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"baseline",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({ref:u,sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,minWidth:0}},{children:s})),p&&i.jsx(o.Typography,e.__assign({component:"span",onClick:function(){return d(!0)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600,flexShrink:0}},{children:"view more"}))]}))}))};exports.default=function(t){var s,r=t.promptContent,l=t.promptTitle,a=t.isLoading,d=void 0!==a&&a,h=t.overviewSummary,b=t.functionalityOfSPB,S=void 0===b?[]:b,w=t.spbAdditionalInfo,B=t.extraMetaData,k=t.showCodePanel,E=void 0===k||k,D=t.showInlineApbEditor,z=void 0===D||D,M=t.showCollapseStrip,T=void 0===M||M,A=t.showFullscreenButton,R=void 0===A||A,C=t.showFullscreenModal,I=void 0===C||C,F=t.showThemeToggle,W=void 0===F||F,P=t.isDarkMode,H=void 0===P||P,L=t.styles,q=t.className,O=t.style,G=t.sx,N=n.useState(null),X=N[0],Y=N[1],J=n.useState(null),K=J[0],Q=J[1],U=n.useState(""),V=U[0],Z=U[1],$=void 0!==(null==L?void 0:L.isDarkMode)?L.isDarkMode:H,ee=n.useState($),ie=ee[0],ne=ee[1],oe=n.useState(null),te=oe[0],se=oe[1];n.useEffect(function(){void 0!==(null==L?void 0:L.isDarkMode)&&ne(L.isDarkMode)},[null==L?void 0:L.isDarkMode]);var re=n.useState(!1),le=re[0],ae=re[1],de=n.useState(480),ce=de[0],xe=de[1],pe=n.useRef(!1),he=n.useRef(null);n.useEffect(function(){var e,i,n;S.length>0&&Y((e=new Date,i=e.toLocaleTimeString("en-IN",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),n=e.toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"}),"".concat(i||""," | ").concat(n||"")))},[S]),n.useEffect(function(){d&&Y(null)},[d]),n.useEffect(function(){te&&(Z(""),setTimeout(function(){return Z(te.ref)},500))},[te]);return i.jsxs(o.Box,e.__assign({className:q,style:e.__assign(e.__assign({},null==L?void 0:L.root),O),sx:e.__assign({height:"100%",display:"flex",flexDirection:"column",width:"100%",minHeight:0,overflow:"hidden"},G)},{children:[i.jsx(o.Box,e.__assign({sx:e.__assign({px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0},null==L?void 0:L.header)},{children:i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.25}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:700,fontSize:"0.9rem",color:"#111827"},null==L?void 0:L.headerTitle)},{children:l||"SPB Analysis"})),i.jsx(o.Typography,e.__assign({sx:e.__assign({fontSize:"0.7rem",color:"#9CA3AF"},null==L?void 0:L.headerSubtitle)},{children:X?"Last Analyzed at ".concat(X):""}))]}))})),i.jsxs(o.Box,e.__assign({ref:he,sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden",position:"relative"}},{children:[i.jsx(o.Box,e.__assign({sx:e.__assign({width:E?le&&T?0:ce:"100%",flexShrink:0,minHeight:0,overflow:"hidden",transition:pe.current?"none":"width 0.15s",borderRight:!E||le&&T?"none":"1px solid #e5e7eb"},null==L?void 0:L.leftPanel)},{children:i.jsxs(o.Box,e.__assign({sx:{width:"100%",height:"100%",minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1,px:1.25,py:1.25,pb:2}},{children:[i.jsxs(o.Box,e.__assign({sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px",bgcolor:"#F8FAFC",p:1.5},null==L?void 0:L.overviewSection)},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827",mb:1},null==L?void 0:L.overviewTitle)},{children:"Overview"})),i.jsx(o.Box,e.__assign({sx:e.__assign({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5},null==L?void 0:L.overviewContent)},{children:(null===(s=null==h?void 0:h.overallSummary)||void 0===s?void 0:s.trim())?i.jsx(j,{text:h.overallSummary,detailedSummary:h.detailedSummary,extraMetaData:B,isDarkMode:ie,markdownRendererStyle:null==L?void 0:L.markdownRenderer}):i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"95%",height:14})]}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==L?void 0:L.functionalitySection)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75}}},{children:i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==L?void 0:L.functionalityTitle)},{children:"Functionality of SPB"}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:S.length>0?S.map(function(n,t){return i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,defaultExpanded:0===t,sx:e.__assign({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},overflow:"hidden"},null==L?void 0:L.functionalityItem)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:38,"& .MuiAccordionSummary-content":{my:.5}}},{children:i.jsxs(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827"}},{children:[t+1,". ",n.name||n.section_name]}))})),i.jsxs(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,display:"flex",flexDirection:"column",gap:.75}},{children:[i.jsx(x.MarkdownRenderer,{fontSize:"0.74rem",message:n.description||n.reason_for_inclusion||"",extraMetaData:B}),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.72rem",color:"#9CA3AF",fontWeight:500,mt:.25}},{children:"APB References"})),i.jsx(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.75}},{children:n.apb_references.map(function(n,t){var s="string"==typeof n?n:n.apb_name,l=K===s;return i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.15}},{children:[i.jsxs(o.Box,e.__assign({onClick:function(){return function(e){K===e?(Q(null),Z("")):(Q(e),Z(""),setTimeout(function(){return Z(e)},50))}(s)},sx:{display:"flex",alignItems:"center",gap:.25,cursor:"pointer"}},{children:[i.jsxs(o.Typography,e.__assign({sx:{fontSize:"0.78rem",color:l?"#5928ed":"#DB2877",fontWeight:500}},{children:[t+1,". ",s]})),i.jsx(_.default,{sx:{fontSize:"0.75rem",color:l?"#5928ed":"#DB2877"}})]})),"string"!=typeof n&&(n.description||n.context)&&i.jsx(v,{text:n.description||n.context||"",extraMetaData:B}),z&&l&&i.jsx(o.Box,e.__assign({sx:{mt:1,height:260,border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"}},{children:i.jsx(p.InternalEditor,{content:r,selectedTag:V,isDarkMode:ie,height:"100%",fontSize:12})}))]}),t)})}))]}))]}),t)}):i.jsx(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[1,2,3].map(function(n){return i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5,display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"40%",height:16}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"30%",height:14})]}),n)})}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==L?void 0:L.applicabilitySection)},{children:[i.jsxs(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==L?void 0:L.applicabilityTitle)},{children:"Applicability"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"When to Apply this SPB / When Not Apply"}))]})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC"}},{children:i.jsx(o.Box,e.__assign({sx:{display:"flex",gap:1}},{children:[{label:"When to apply",content:null==w?void 0:w.when_to_apply},{label:"When NOT to apply",content:null==w?void 0:w.when_not_to_apply}].map(function(n){var t=n.label,s=n.content;return i.jsxs(o.Box,e.__assign({sx:{flex:1,bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px",p:1.25}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151",mb:.75}},{children:t})),s?i.jsx(x.MarkdownRenderer,{fontSize:"0.8rem",message:s,isDarkMode:ie,style:null==L?void 0:L.markdownRenderer,extraMetaData:B}):d?i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14})]})):i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.8rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))]}),t)})}))}))]})),i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==L?void 0:L.specificationsSection)},{children:[i.jsxs(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==L?void 0:L.specificationsTitle)},{children:"Specifications"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"Strict Rules / Input / Output"}))]})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:[{label:"Strict Rules",tooltip:null,content:null==w?void 0:w.constraints_and_rules},{label:"Input",tooltip:"Input specification for this SPB",content:null==w?void 0:w.input_analysis},{label:"Output",tooltip:"Output specification for this SPB",content:null==w?void 0:w.output_analysis}].map(function(n){var t=n.label,s=n.tooltip,r=n.content,l="Output"===t,a=l&&r?function(e){var i=[];return{text:e.replace(/<code>([\s\S]*?)<\/code>/g,function(e,n){return i.push(n.trim()),""}).trim(),code:i.join("\n\n")}}(r):null,c=a?a.text:r,h=a?a.code:"";return i.jsxs(o.Accordion,e.__assign({disableGutters:!0,elevation:0,defaultExpanded:"Strict Rules"===t,sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px !important","&:before":{display:"none"},overflow:"hidden"}},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem"}}),sx:{minHeight:34,px:1.25,"& .MuiAccordionSummary-content":{my:.4}}},{children:i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151"}},{children:t})),s&&i.jsx(o.Tooltip,e.__assign({title:s,placement:"top"},{children:i.jsx(o.Box,e.__assign({component:"span",sx:{width:13,height:13,borderRadius:"50%",background:"#E5E7EB",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"0.58rem",color:"#6B7280",fontWeight:700,cursor:"default",flexShrink:0}},{children:"i"}))}))]}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:1.25,pb:1.25,pt:0}},{children:r?i.jsxs(i.Fragment,{children:[c&&i.jsx(x.MarkdownRenderer,{fontSize:"0.8rem",message:c,isDarkMode:ie,style:null==L?void 0:L.markdownRenderer,extraMetaData:B}),l&&h&&i.jsxs(o.Box,e.__assign({sx:{width:"100%",height:"35vh",mt:1.5}},{children:[i.jsxs(o.Box,e.__assign({sx:{display:"flex",gap:.1,backgroundColor:"black",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:1,borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[i.jsx(o.Typography,e.__assign({sx:{color:"white",fontWeight:500,fontSize:"0.8rem"}},{children:"Output preview"})),i.jsx(o.Tooltip,e.__assign({title:"Copy Code to clipboard"},{children:i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return e=h,navigator.clipboard.writeText(e);var e}},{children:i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.7rem",color:"white"}},{children:"Copy"}))}))}))]})),i.jsx(o.Box,e.__assign({sx:{mt:-1,height:"calc(100% - 40px)",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:"hidden"}},{children:i.jsx(p.InternalEditor,{content:h,isDarkMode:ie,height:"100%",fontSize:10})}))]}))]}):d?i.jsxs(o.Box,e.__assign({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"90%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"75%",height:14})]})):i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))}))]}),t)})}))]})),i.jsxs(o.Accordion,e.__assign({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:e.__assign({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},bgcolor:"#fff"},null==L?void 0:L.dependencyGraphSection)},{children:[i.jsx(o.AccordionSummary,e.__assign({expandIcon:i.jsx(u.default,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75},"&.Mui-expanded":{bgcolor:"#F8FAFC",borderRadius:"8px 8px 0 0"}}},{children:i.jsx(o.Typography,e.__assign({sx:e.__assign({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==L?void 0:L.dependencyGraphTitle)},{children:"Dependency Graph"}))})),i.jsx(o.AccordionDetails,e.__assign({sx:{px:0,pb:0,pt:0}},{children:(null==w?void 0:w.dependency_graph)?i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#F8FAFC",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1.5}},{children:[i.jsx(o.Box,e.__assign({sx:{height:500,borderRadius:"8px",overflow:"hidden"}},{children:i.jsx(c.default,{data:w.dependency_graph,isDarkMode:ie,style:null==L?void 0:L.dependencyGraph})})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.72rem",color:"#64748B",lineHeight:1.6}},{children:"This graph visualises how Atomic Prompt Blocks (APBs) depend on, influence, or exchange information with one another within the prompt architecture."}))]})):i.jsxs(o.Box,e.__assign({sx:{bgcolor:"#fff",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1}},{children:[i.jsx(o.Skeleton,{variant:"rectangular",width:"100%",height:400,sx:{borderRadius:"8px"}}),i.jsx(o.Skeleton,{variant:"text",width:"100%",height:14}),i.jsx(o.Skeleton,{variant:"text",width:"80%",height:14})]}))}))]}))]}))})),E&&T&&i.jsx(o.Box,e.__assign({onClick:function(){return ae(function(e){return!e})},sx:e.__assign({width:20,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRight:"1px solid #e5e7eb",borderLeft:"1px solid #e5e7eb",bgcolor:"#f9fafb",position:"relative",py:2,"&:hover":{bgcolor:"#f0f0f0"}},null==L?void 0:L.collapseStrip)},{children:i.jsx(o.Typography,e.__assign({sx:{fontSize:10,fontWeight:600,color:"#6b7280",writingMode:"vertical-rl",textOrientation:"mixed",transform:"rotate(180deg)",letterSpacing:"0.05em",userSelect:"none"}},{children:"SPB Details"}))})),E&&T&&i.jsx(o.Box,e.__assign({onClick:function(){return ae(function(e){return!e})},onMouseDown:function(e){e.preventDefault(),pe.current=!0;var i=function(e){if(pe.current&&he.current){var o=he.current.getBoundingClientRect(),t=o.left,s=o.width,r=e.clientX-t;if(r<200)return ae(!0),pe.current=!1,document.removeEventListener("mousemove",i),void document.removeEventListener("mouseup",n);r>.7*s||(ae(!1),xe(r))}},n=function(){pe.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)},sx:e.__assign({position:"absolute",left:le?20:ce+20,top:"50%",transform:"translateY(-50%)",width:18,height:28,bgcolor:"#fff",border:"1px solid #e5e7eb",borderRadius:"0 6px 6px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"col-resize",zIndex:5,boxShadow:"2px 0 4px rgba(0,0,0,0.06)","&:hover":{bgcolor:"#f9fafb"}},null==L?void 0:L.dragHandle)},{children:le?i.jsx(y.default,{sx:{fontSize:12,color:"#6b7280"}}):i.jsx(m.default,{sx:{fontSize:12,color:"#6b7280"}})})),E&&i.jsxs(o.Box,e.__assign({sx:e.__assign({flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5,bgcolor:"#f8fafc"},null==L?void 0:L.codePanel)},{children:[i.jsxs(o.Box,e.__assign({sx:e.__assign({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},null==L?void 0:L.codePanelHeader)},{children:[i.jsx(o.Typography,e.__assign({sx:e.__assign({fontSize:13,fontWeight:600,color:"#374151"},null==L?void 0:L.codePanelTitle)},{children:l||"SPB Analysis"})),i.jsxs(o.Box,e.__assign({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:[W&&i.jsx(o.Switch,{checked:ie,onChange:function(e){return ne(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}}),R&&I&&i.jsx(o.Tooltip,e.__assign({title:"Fullscreen",placement:"top"},{children:i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return se({ref:V||"",description:""})},sx:{color:"#6b7280"}},{children:i.jsx(g.default,{sx:{fontSize:16}})}))}))]}))]})),i.jsx(o.Box,e.__assign({sx:e.__assign({flex:1,minHeight:0,border:"1px solid #30363d",borderRadius:1,overflow:"hidden"},null==L?void 0:L.editorContainer)},{children:i.jsx(p.InternalEditor,{content:r,selectedTag:V,isDarkMode:ie,height:"100%",fontSize:13})}))]}))]})),I&&i.jsxs(o.Dialog,e.__assign({open:!!te,onClose:function(){return se(null)},maxWidth:!1,PaperProps:{sx:e.__assign({width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},null==L?void 0:L.fullscreenModal)}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Promptemon"})),i.jsx(o.IconButton,e.__assign({size:"small",onClick:function(){return se(null)}},{children:i.jsx(f.default,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[i.jsxs(o.Box,e.__assign({sx:{width:"40%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[i.jsx(o.Tooltip,e.__assign({title:"Atomic Prompt Block",placement:"top"},{children:i.jsx(o.Chip,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}})})),i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.9rem",color:"#111827"}},{children:null==te?void 0:te.ref}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,p:2,display:"flex",flexDirection:"column",gap:1.5,overflowY:"auto"}},{children:[i.jsxs(o.Box,e.__assign({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:null==te?void 0:te.description}))]})),i.jsxs(o.Box,e.__assign({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.25,display:"flex",alignItems:"center",gap:.5}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",color:"#6B7280"}},{children:"Total Lines"})),i.jsx(o.Typography,e.__assign({sx:{fontSize:"0.73rem",fontWeight:700,color:"#111827"}},{children:r.split("\n").length}))]}))]}))]})),i.jsxs(o.Box,e.__assign({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i.jsxs(o.Box,e.__assign({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[i.jsx(o.Typography,e.__assign({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),i.jsx(o.Switch,{checked:ie,onChange:function(e){return ne(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}})]})),i.jsx(o.Box,e.__assign({sx:{flex:1,minHeight:0,p:1.5}},{children:i.jsx(p.InternalEditor,{content:r,selectedTag:V,isDarkMode:ie,height:"100%",fontSize:13})}))]}))]}))]}))]}))};
|
|
2
2
|
//# sourceMappingURL=Spbanalysispanel.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as o}from"tslib";import{jsxs as l,jsx as i}from"react/jsx-runtime";import e from"./components/ChatCitation.js";import{getColorCode as n}from"./utils/helpers.js";import t from"./components/Chip.js";import r from"./assets/message-chat-square.svg.js";import"@mui/icons-material/KeyboardArrowDown";import"@mui/icons-material/KeyboardArrowUp";import"@mui/icons-material/Clear";import d from"./components/InViewNavigation.js";import a from"./components/DetailedView.js";import u from"./components/SummarizedView.js";import v from"./components/RuleBook.js";import{useState as s,useRef as c,useMemo as h,useEffect as f,useCallback as m}from"react";import{defaultRenderer as p}from"./constants/renderer.js";import g from"./components/IconContainer.js";import{Table as y}from"lucide-react";import{BigQueryTable as b}from"./BigQueryTable.js";import x from"@mui/icons-material/CloseOutlined";var w=function(o,l,i){if(void 0===i&&(i="smooth"),l){for(var e=o.parentElement;e;){var n=window.getComputedStyle(e).overflowY;if(("auto"===n||"scroll"===n)&&e.scrollHeight>e.clientHeight)break;if(e===l){e=null;break}e=e.parentElement}var t=null!=e?e:l,r=o.getBoundingClientRect(),d=t.getBoundingClientRect(),a=t.scrollTop+r.top-d.top-(t.clientHeight-r.height)/2;t.scrollTo({top:Math.max(0,a),behavior:i})}},C={chatData:[]};function S(S){var k,A,D,T,R,F,j,z,I,B,E,H,P,V,q,N,W,Y,K,O,M,Q,U,G,J,L,X,Z,$,_,oo,lo,io,eo,no,to,ro,ao,uo,vo,so,co,ho,fo,mo,po,go,yo,bo=S.rootContainer,xo=S.chatContainer,wo=void 0===xo?C:xo,Co=S.ruleBookContainer,So=S.renderer,ko=S.additionalData,Ao=S.tableComponent,Do=S.closePreview,To=S.isRenderedCustomComponent,Ro=void 0!==To&&To,Fo=S.showRootContainer,jo=void 0===Fo||Fo,zo=S.reversePanels,Io=void 0!==zo&&zo,Bo=s(0),Eo=Bo[0],Ho=Bo[1],Po=s(0),Vo=Po[0],qo=Po[1],No=s(0),Wo=No[0],Yo=No[1],Ko=s(0),Oo=Ko[0],Mo=Ko[1],Qo=c(null),Uo=c(null),Go=c(null),Jo=h(function(){return o(o({},p),So)},[So]),Lo=h(function(){return!!((null==Ao?void 0:Ao.rows)&&Object.keys(Ao.rows).length>0)},[Ao]),Xo=h(function(){var o;return null!==(o=null==ko?void 0:ko.RuleBookDetailedViewVerticallyStacked)&&void 0!==o&&o},[null==ko?void 0:ko.RuleBookDetailedViewVerticallyStacked]);f(function(){var o,l;if((null==Co?void 0:Co.show)&&Qo.current){var i=null===(o=Qo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(Ho((null==i?void 0:i.length)||0),qo(0),i&&i.length>0){var e=i[0];e.style.backgroundColor="#ffff5c",w(e,Qo.current)}}if((null==wo?void 0:wo.show)&&(null==Uo?void 0:Uo.current)){var n=null===(l=Uo.current)||void 0===l?void 0:l.querySelectorAll(".user-chat-highlight");if(Yo((null==n?void 0:n.length)||0),Mo(0),n&&n.length>0){var t=n[0];t.style.backgroundColor="#ffff5c";var r=requestAnimationFrame(function(){w(t,Go.current)});return function(){return cancelAnimationFrame(r)}}}},[null==wo?void 0:wo.show,null==Co?void 0:Co.show,null==Co?void 0:Co.data,null==wo?void 0:wo.chatData]);var Zo=m(function(){var o;if(Vo+1<Eo){var l=null===(o=Qo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(!l)return;l[Vo].style.backgroundColor="#ffffb8";var i=Vo+1;qo(i);var e=l[i];e.style.backgroundColor="#ffff5c",w(e,Qo.current)}},[Vo,Eo]),$o=m(function(){var o;if(!(Vo-1<0)){var l=null===(o=Qo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(l){l[Vo].style.backgroundColor="#ffffb8";var i=Vo-1,e=l[i];e.style.backgroundColor="#ffff5c",qo(i),w(e,Qo.current)}}},[Vo]),_o=m(function(){var o;if(Oo+1<Wo){var l=null===(o=Uo.current)||void 0===o?void 0:o.querySelectorAll(".user-chat-highlight");if(!l)return;l[Oo].style.backgroundColor="#ffffb8";var i=Oo+1,e=l[i];e.style.backgroundColor="#ffff5c",Mo(i),w(e,Go.current)}},[Oo,Wo]),ol=m(function(){var o;if(!(Oo-1<0)){var l=null===(o=Uo.current)||void 0===o?void 0:o.querySelectorAll(".user-chat-highlight");if(l){l[Oo].style.backgroundColor="#ffffb8";var i=Oo-1,e=l[i];e.style.backgroundColor="#ffff5c",Mo(i),w(e,Go.current)}}},[Oo]),ll=n((null==bo?void 0:bo.relevanceScore)||0),il=h(function(){var e,n=l("span",o({style:o({display:"flex",border:"1px solid",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",borderColor:ll.border,backgroundColor:ll.background,color:ll.text},null===(e=null==bo?void 0:bo.slotStyles)||void 0===e?void 0:e.relevanceScore)},{children:[(null==bo?void 0:bo.relevanceTitle)||"Decision Strength",":"," ",(null==bo?void 0:bo.relevanceScore)||0,"%"]}),"relevance-score"),t=i("span",o({style:{display:"flex",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",backgroundColor:"white",color:"black",cursor:"pointer"},onClick:Do},{children:i(x,{})}),"close-preview");return Ro&&!(null==ko?void 0:ko.isExpanded)?[n,t]:[n]},[Ro,ll.background,ll.border,ll.text,null==bo?void 0:bo.relevanceScore,null===(k=null==bo?void 0:bo.slotStyles)||void 0===k?void 0:k.relevanceScore,null==bo?void 0:bo.relevanceTitle]),el=h(function(){return[Eo>0&&i(d,{currentItemNumber:Vo+1,totalItems:Eo,disableNext:Vo+1>=Eo,onNext:Zo,onPrevious:$o,disablePrevious:Vo<=0},"rulebook-nav")]},[Vo,Zo,$o,Eo]),nl=h(function(){return(null==ko?void 0:ko.RuleBookContainerHeight)?ko.RuleBookContainerHeight:!(!Xo||(null==ko?void 0:ko.isExpanded))&&"600px"},[null==ko?void 0:ko.RuleBookContainerHeight,Xo]),tl=h(function(){var o,l;return[(null===(l=null===(o=null==wo?void 0:wo.detailedTab)||void 0===o?void 0:o.chip)||void 0===l?void 0:l.isActive)&&Wo>0&&i(d,{currentItemNumber:Oo+1,totalItems:Wo,onNext:_o,onPrevious:ol,disableNext:Oo+1>=Wo,disablePrevious:Oo<=0},"chat-nav")]},[null===(D=null===(A=null==wo?void 0:wo.detailedTab)||void 0===A?void 0:A.chip)||void 0===D?void 0:D.isActive,Oo,_o,ol,Wo]),rl=l("div",o({style:o({display:"flex",flexDirection:Io?Xo?"column-reverse":"row-reverse":Xo?"column":"row",gap:[(null==wo?void 0:wo.chatData)&&wo.chatData.length>0&&(wo.show||void 0===wo.show),(null==Co?void 0:Co.data)&&(Co.show||void 0===Co.show),Lo].filter(Boolean).length>1?"12px":"0",height:nl||"100%",minHeight:0},null===(T=null==bo?void 0:bo.slotStyles)||void 0===T?void 0:T.container)},{children:[Lo&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(R=null==wo?void 0:wo.slotStyles)||void 0===R?void 0:R.outerContainer)},{children:i(e,o({title:"Invoice Data Preview",icon:i(g,{children:i(y,{size:16})}),slotStyles:{title:{color:"#475569",fontWeight:500}},secondaryActions:[]},{children:i("div",o({style:{height:"100%",maxHeight:(null==ko?void 0:ko.isExpanded)?"none":"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF",position:"relative",overflow:"hidden"}},{children:(null==Ao?void 0:Ao.rows)&&i(b,{rows:Ao.rows,columns:Ao.columns||[]})}))}))})),(null==Co?void 0:Co.data)&&(Co.show||void 0===Co.show)&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(F=null==Co?void 0:Co.slotStyles)||void 0===F?void 0:F.outerContainer)},{children:i(e,o({title:null!==(j=null==Co?void 0:Co.title)&&void 0!==j?j:"Rule book",icon:null==Co?void 0:Co.ruleBookIcon,slotStyles:{title:o({color:"#475569",fontWeight:500},null===(z=null==Co?void 0:Co.slotStyles)||void 0===z?void 0:z.title),body:null===(I=null==Co?void 0:Co.slotStyles)||void 0===I?void 0:I.body},secondaryActions:(null==Co?void 0:Co.secondaryActions)?Co.secondaryActions(el):el},{children:i("div",o({style:o({height:"100%",maxHeight:"275px",minHeight:0,border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(B=null==Co?void 0:Co.slotStyles)||void 0===B?void 0:B.dataContainer)},{children:i("div",o({style:{padding:"12px",height:"100%",overflowY:"auto"},ref:Qo},{children:i(v,{data:Co.data,renderers:null!==(E=null==Co?void 0:Co.renderer)&&void 0!==E?E:Jo})}))}))}))})),(null==wo?void 0:wo.chatData)&&wo.chatData.length>0&&(wo.show||void 0===wo.show)&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(H=null==wo?void 0:wo.slotStyles)||void 0===H?void 0:H.outerContainer)},{children:i(e,o({title:null!==(P=null==wo?void 0:wo.title)&&void 0!==P?P:"Chat",icon:null==wo?void 0:wo.chatIcon,containerStyles:null===(V=null==wo?void 0:wo.slotStyles)||void 0===V?void 0:V.container,slotStyles:{title:o({color:"#475569",fontWeight:500},null===(q=null==wo?void 0:wo.slotStyles)||void 0===q?void 0:q.title),body:null===(N=null==wo?void 0:wo.slotStyles)||void 0===N?void 0:N.body},primaryActions:[((null===(Y=null===(W=null==wo?void 0:wo.summarizedTab)||void 0===W?void 0:W.chip)||void 0===Y?void 0:Y.show)||void 0===(null===(O=null===(K=null==wo?void 0:wo.summarizedTab)||void 0===K?void 0:K.chip)||void 0===O?void 0:O.show))&&i(t,o({label:"Summarized"},null===(M=null==wo?void 0:wo.summarizedTab)||void 0===M?void 0:M.chip)),i(t,o({label:"Detailed"},null===(Q=null==wo?void 0:wo.detailedTab)||void 0===Q?void 0:Q.chip))],secondaryActions:wo.secondaryActions?null==wo?void 0:wo.secondaryActions(tl):tl},{children:l("div",o({ref:Go,style:o({height:"100%",maxHeight:"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(U=null==wo?void 0:wo.slotStyles)||void 0===U?void 0:U.chatDataContainer)},{children:[(null===(J=null===(G=null==wo?void 0:wo.detailedTab)||void 0===G?void 0:G.chip)||void 0===J?void 0:J.isActive)&&i("div",o({ref:Uo,style:{position:(null==ko?void 0:ko.isExpanded)?"absolute":"relative",inset:0,padding:"12px",overflowY:"auto"}},{children:i(a,{chatData:null!==(L=wo.chatData)&&void 0!==L?L:[],assistantChatProps:o(o({},null===(Z=null===(X=null==wo?void 0:wo.detailedTab)||void 0===X?void 0:X.view)||void 0===Z?void 0:Z.assistantChatProps),{renderers:null!==(oo=null===(_=null===($=null==wo?void 0:wo.detailedTab)||void 0===$?void 0:$.detailedViewRenderer)||void 0===_?void 0:_.assistantText)&&void 0!==oo?oo:Jo}),userChatItemProps:o(o({},null===(io=null===(lo=null==wo?void 0:wo.detailedTab)||void 0===lo?void 0:lo.view)||void 0===io?void 0:io.userChatItemProps),{renderers:null!==(to=null===(no=null===(eo=null==wo?void 0:wo.detailedTab)||void 0===eo?void 0:eo.detailedViewRenderer)||void 0===no?void 0:no.userText)&&void 0!==to?to:Jo})})})),(null===(ao=null===(ro=null==wo?void 0:wo.summarizedTab)||void 0===ro?void 0:ro.chip)||void 0===ao?void 0:ao.show)&&(null===(vo=null===(uo=null==wo?void 0:wo.summarizedTab)||void 0===uo?void 0:uo.chip)||void 0===vo?void 0:vo.isActive)&&i(u,o({chatData:null!==(so=wo.chatData)&&void 0!==so?so:[]},null===(co=null==wo?void 0:wo.summarizedTab)||void 0===co?void 0:co.view,{renderer:null!==(fo=null===(ho=null==wo?void 0:wo.summarizedTab)||void 0===ho?void 0:ho.summarizedViewRenderer)&&void 0!==fo?fo:Jo}))]}))}))}))]}));return jo?i(e,o({title:null==bo?void 0:bo.title,slotStyles:{title:null===(mo=null==bo?void 0:bo.slotStyles)||void 0===mo?void 0:mo.title,body:null===(po=null==bo?void 0:bo.slotStyles)||void 0===po?void 0:po.body},containerStyles:null===(go=null==bo?void 0:bo.slotStyles)||void 0===go?void 0:go.container,icon:null!==(yo=null==bo?void 0:bo.icon)&&void 0!==yo?yo:i(g,{children:i("img",{src:r,alt:"chat icon",style:{width:16,height:16}})}),secondaryActions:(null==bo?void 0:bo.secondaryActions)?bo.secondaryActions(il):il},{children:rl})):rl}export{S as default};
|
|
1
|
+
import{__assign as o}from"tslib";import{jsxs as l,jsx as i}from"react/jsx-runtime";import e from"./components/ChatCitation.js";import{getColorCode as n}from"./utils/helpers.js";import t from"./components/Chip.js";import r from"./assets/message-chat-square.svg.js";import"@mui/icons-material/KeyboardArrowDown";import"@mui/icons-material/KeyboardArrowUp";import"@mui/icons-material/Clear";import d from"./components/InViewNavigation.js";import a from"./components/DetailedView.js";import u from"./components/SummarizedView.js";import v from"./components/RuleBook.js";import{useState as s,useRef as c,useMemo as h,useEffect as f,useCallback as m}from"react";import{defaultRenderer as p}from"./constants/renderer.js";import g from"./components/IconContainer.js";import{Table as y}from"lucide-react";import{BigQueryTable as b}from"./BigQueryTable.js";import x from"@mui/icons-material/CloseOutlined";var w=function(o,l,i){if(void 0===i&&(i="smooth"),l){for(var e=o.parentElement;e;){var n=window.getComputedStyle(e).overflowY;if(("auto"===n||"scroll"===n)&&e.scrollHeight>e.clientHeight)break;if(e===l){e=null;break}e=e.parentElement}var t=null!=e?e:l,r=o.getBoundingClientRect(),d=t.getBoundingClientRect(),a=t.scrollTop+r.top-d.top-(t.clientHeight-r.height)/2;t.scrollTo({top:Math.max(0,a),behavior:i})}},C={chatData:[]};function S(S){var k,A,D,T,F,R,I,E,j,z,B,H,P,V,q,N,W,Y,K,O,M,Q,U,G,J,L,X,Z,$,_,oo,lo,io,eo,no,to,ro,ao,uo,vo,so,co,ho,fo,mo,po,go,yo,bo=S.rootContainer,xo=S.chatContainer,wo=void 0===xo?C:xo,Co=S.ruleBookContainer,So=S.renderer,ko=S.additionalData,Ao=S.tableComponent,Do=S.closePreview,To=S.isRenderedCustomComponent,Fo=void 0!==To&&To,Ro=S.showRootContainer,Io=void 0===Ro||Ro,Eo=S.reversePanels,jo=void 0!==Eo&&Eo,zo=s(0),Bo=zo[0],Ho=zo[1],Po=s(0),Vo=Po[0],qo=Po[1],No=s(0),Wo=No[0],Yo=No[1],Ko=s(0),Oo=Ko[0],Mo=Ko[1],Qo=c(null),Uo=c(null),Go=c(null),Jo=h(function(){return o(o({},p),So)},[So]),Lo=h(function(){return!!((null==Ao?void 0:Ao.rows)&&Object.keys(Ao.rows).length>0)},[Ao]),Xo=h(function(){var o;return null!==(o=null==ko?void 0:ko.RuleBookDetailedViewVerticallyStacked)&&void 0!==o&&o},[null==ko?void 0:ko.RuleBookDetailedViewVerticallyStacked]);f(function(){var o,l,i;if((null==Co?void 0:Co.show)&&Qo.current){var e=null===(o=Qo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(Ho((null==e?void 0:e.length)||0),qo(0),e&&e.length>0){var n=e[0];n.style.backgroundColor="#ffff5c",w(n,Qo.current)}}if((null==wo?void 0:wo.show)&&(null==Uo?void 0:Uo.current)){var t=null===(l=Uo.current)||void 0===l?void 0:l.querySelectorAll(".user-chat-highlight");if(Yo((null==t?void 0:t.length)||0),Mo(0),t&&t.length>0){var r=t[0];r.style.backgroundColor="#ffff5c";var d=requestAnimationFrame(function(){w(r,Go.current)});return function(){return cancelAnimationFrame(d)}}var a=null==ko?void 0:ko.targetIndex;if(void 0!==a&&a>=0&&(null===(i=Uo.current)||void 0===i?void 0:i.firstElementChild)){var u=Uo.current.firstElementChild.children[a];if(u){var v=requestAnimationFrame(function(){w(u,Go.current)});return function(){return cancelAnimationFrame(v)}}}}},[null==wo?void 0:wo.show,null==Co?void 0:Co.show,null==Co?void 0:Co.data,null==wo?void 0:wo.chatData,null==ko?void 0:ko.targetIndex]);var Zo=m(function(){var o;if(Vo+1<Bo){var l=null===(o=Qo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(!l)return;l[Vo].style.backgroundColor="#ffffb8";var i=Vo+1;qo(i);var e=l[i];e.style.backgroundColor="#ffff5c",w(e,Qo.current)}},[Vo,Bo]),$o=m(function(){var o;if(!(Vo-1<0)){var l=null===(o=Qo.current)||void 0===o?void 0:o.querySelectorAll(".rule-book-highlight");if(l){l[Vo].style.backgroundColor="#ffffb8";var i=Vo-1,e=l[i];e.style.backgroundColor="#ffff5c",qo(i),w(e,Qo.current)}}},[Vo]),_o=m(function(){var o;if(Oo+1<Wo){var l=null===(o=Uo.current)||void 0===o?void 0:o.querySelectorAll(".user-chat-highlight");if(!l)return;l[Oo].style.backgroundColor="#ffffb8";var i=Oo+1,e=l[i];e.style.backgroundColor="#ffff5c",Mo(i),w(e,Go.current)}},[Oo,Wo]),ol=m(function(){var o;if(!(Oo-1<0)){var l=null===(o=Uo.current)||void 0===o?void 0:o.querySelectorAll(".user-chat-highlight");if(l){l[Oo].style.backgroundColor="#ffffb8";var i=Oo-1,e=l[i];e.style.backgroundColor="#ffff5c",Mo(i),w(e,Go.current)}}},[Oo]),ll=n((null==bo?void 0:bo.relevanceScore)||0),il=h(function(){var e,n=l("span",o({style:o({display:"flex",border:"1px solid",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",borderColor:ll.border,backgroundColor:ll.background,color:ll.text},null===(e=null==bo?void 0:bo.slotStyles)||void 0===e?void 0:e.relevanceScore)},{children:[(null==bo?void 0:bo.relevanceTitle)||"Decision Strength",":"," ",(null==bo?void 0:bo.relevanceScore)||0,"%"]}),"relevance-score"),t=i("span",o({style:{display:"flex",alignItems:"center",gap:"4px",borderRadius:"6px",padding:"2px 8px",fontSize:"12px",backgroundColor:"white",color:"black",cursor:"pointer"},onClick:Do},{children:i(x,{})}),"close-preview");return Fo&&!(null==ko?void 0:ko.isExpanded)?[n,t]:[n]},[Fo,ll.background,ll.border,ll.text,null==bo?void 0:bo.relevanceScore,null===(k=null==bo?void 0:bo.slotStyles)||void 0===k?void 0:k.relevanceScore,null==bo?void 0:bo.relevanceTitle]),el=h(function(){return[Bo>0&&i(d,{currentItemNumber:Vo+1,totalItems:Bo,disableNext:Vo+1>=Bo,onNext:Zo,onPrevious:$o,disablePrevious:Vo<=0},"rulebook-nav")]},[Vo,Zo,$o,Bo]),nl=h(function(){return(null==ko?void 0:ko.RuleBookContainerHeight)?ko.RuleBookContainerHeight:!(!Xo||(null==ko?void 0:ko.isExpanded))&&"600px"},[null==ko?void 0:ko.RuleBookContainerHeight,Xo]),tl=h(function(){var o,l;return[(null===(l=null===(o=null==wo?void 0:wo.detailedTab)||void 0===o?void 0:o.chip)||void 0===l?void 0:l.isActive)&&Wo>0&&i(d,{currentItemNumber:Oo+1,totalItems:Wo,onNext:_o,onPrevious:ol,disableNext:Oo+1>=Wo,disablePrevious:Oo<=0},"chat-nav")]},[null===(D=null===(A=null==wo?void 0:wo.detailedTab)||void 0===A?void 0:A.chip)||void 0===D?void 0:D.isActive,Oo,_o,ol,Wo]),rl=l("div",o({style:o({display:"flex",flexDirection:jo?Xo?"column-reverse":"row-reverse":Xo?"column":"row",gap:[(null==wo?void 0:wo.chatData)&&wo.chatData.length>0&&(wo.show||void 0===wo.show),(null==Co?void 0:Co.data)&&(Co.show||void 0===Co.show),Lo].filter(Boolean).length>1?"12px":"0",height:nl||"100%",minHeight:0},null===(T=null==bo?void 0:bo.slotStyles)||void 0===T?void 0:T.container)},{children:[Lo&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(F=null==wo?void 0:wo.slotStyles)||void 0===F?void 0:F.outerContainer)},{children:i(e,o({title:"Invoice Data Preview",icon:i(g,{children:i(y,{size:16})}),slotStyles:{title:{color:"#475569",fontWeight:500}},secondaryActions:[]},{children:i("div",o({style:{height:"100%",maxHeight:(null==ko?void 0:ko.isExpanded)?"none":"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",backgroundColor:"#FFFFFF",position:"relative",overflow:"hidden"}},{children:(null==Ao?void 0:Ao.rows)&&i(b,{rows:Ao.rows,columns:Ao.columns||[]})}))}))})),(null==Co?void 0:Co.data)&&(Co.show||void 0===Co.show)&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(R=null==Co?void 0:Co.slotStyles)||void 0===R?void 0:R.outerContainer)},{children:i(e,o({title:null!==(I=null==Co?void 0:Co.title)&&void 0!==I?I:"Rule book",icon:null==Co?void 0:Co.ruleBookIcon,slotStyles:{title:o({color:"#475569",fontWeight:500},null===(E=null==Co?void 0:Co.slotStyles)||void 0===E?void 0:E.title),body:null===(j=null==Co?void 0:Co.slotStyles)||void 0===j?void 0:j.body},secondaryActions:(null==Co?void 0:Co.secondaryActions)?Co.secondaryActions(el):el},{children:i("div",o({style:o({height:"100%",maxHeight:"275px",minHeight:0,border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(z=null==Co?void 0:Co.slotStyles)||void 0===z?void 0:z.dataContainer)},{children:i("div",o({style:{padding:"12px",height:"100%",overflowY:"auto"},ref:Qo},{children:i(v,{data:Co.data,renderers:null!==(B=null==Co?void 0:Co.renderer)&&void 0!==B?B:Jo})}))}))}))})),(null==wo?void 0:wo.chatData)&&wo.chatData.length>0&&(wo.show||void 0===wo.show)&&i("span",o({style:o({flex:"1 1 0%",minWidth:0},null===(H=null==wo?void 0:wo.slotStyles)||void 0===H?void 0:H.outerContainer)},{children:i(e,o({title:null!==(P=null==wo?void 0:wo.title)&&void 0!==P?P:"Chat",icon:null==wo?void 0:wo.chatIcon,containerStyles:null===(V=null==wo?void 0:wo.slotStyles)||void 0===V?void 0:V.container,slotStyles:{title:o({color:"#475569",fontWeight:500},null===(q=null==wo?void 0:wo.slotStyles)||void 0===q?void 0:q.title),body:null===(N=null==wo?void 0:wo.slotStyles)||void 0===N?void 0:N.body},primaryActions:[((null===(Y=null===(W=null==wo?void 0:wo.summarizedTab)||void 0===W?void 0:W.chip)||void 0===Y?void 0:Y.show)||void 0===(null===(O=null===(K=null==wo?void 0:wo.summarizedTab)||void 0===K?void 0:K.chip)||void 0===O?void 0:O.show))&&i(t,o({label:"Summarized"},null===(M=null==wo?void 0:wo.summarizedTab)||void 0===M?void 0:M.chip)),i(t,o({label:"Detailed"},null===(Q=null==wo?void 0:wo.detailedTab)||void 0===Q?void 0:Q.chip))],secondaryActions:wo.secondaryActions?null==wo?void 0:wo.secondaryActions(tl):tl},{children:l("div",o({ref:Go,style:o({height:"100%",maxHeight:"275px",border:"2px solid #E2E8F0",borderRadius:"8px",display:"flex",flexDirection:"column",gap:"12px",backgroundColor:"#F8FAFC",position:"relative",overflowY:"auto"},null===(U=null==wo?void 0:wo.slotStyles)||void 0===U?void 0:U.chatDataContainer)},{children:[(null===(J=null===(G=null==wo?void 0:wo.detailedTab)||void 0===G?void 0:G.chip)||void 0===J?void 0:J.isActive)&&i("div",o({ref:Uo,style:{position:(null==ko?void 0:ko.isExpanded)?"absolute":"relative",inset:0,padding:"12px",overflowY:"auto"}},{children:i(a,{chatData:null!==(L=wo.chatData)&&void 0!==L?L:[],assistantChatProps:o(o({},null===(Z=null===(X=null==wo?void 0:wo.detailedTab)||void 0===X?void 0:X.view)||void 0===Z?void 0:Z.assistantChatProps),{renderers:null!==(oo=null===(_=null===($=null==wo?void 0:wo.detailedTab)||void 0===$?void 0:$.detailedViewRenderer)||void 0===_?void 0:_.assistantText)&&void 0!==oo?oo:Jo}),userChatItemProps:o(o({},null===(io=null===(lo=null==wo?void 0:wo.detailedTab)||void 0===lo?void 0:lo.view)||void 0===io?void 0:io.userChatItemProps),{renderers:null!==(to=null===(no=null===(eo=null==wo?void 0:wo.detailedTab)||void 0===eo?void 0:eo.detailedViewRenderer)||void 0===no?void 0:no.userText)&&void 0!==to?to:Jo})})})),(null===(ao=null===(ro=null==wo?void 0:wo.summarizedTab)||void 0===ro?void 0:ro.chip)||void 0===ao?void 0:ao.show)&&(null===(vo=null===(uo=null==wo?void 0:wo.summarizedTab)||void 0===uo?void 0:uo.chip)||void 0===vo?void 0:vo.isActive)&&i(u,o({chatData:null!==(so=wo.chatData)&&void 0!==so?so:[]},null===(co=null==wo?void 0:wo.summarizedTab)||void 0===co?void 0:co.view,{renderer:null!==(fo=null===(ho=null==wo?void 0:wo.summarizedTab)||void 0===ho?void 0:ho.summarizedViewRenderer)&&void 0!==fo?fo:Jo}))]}))}))}))]}));return Io?i(e,o({title:null==bo?void 0:bo.title,slotStyles:{title:null===(mo=null==bo?void 0:bo.slotStyles)||void 0===mo?void 0:mo.title,body:null===(po=null==bo?void 0:bo.slotStyles)||void 0===po?void 0:po.body},containerStyles:null===(go=null==bo?void 0:bo.slotStyles)||void 0===go?void 0:go.container,icon:null!==(yo=null==bo?void 0:bo.icon)&&void 0!==yo?yo:i(g,{children:i("img",{src:r,alt:"chat icon",style:{width:16,height:16}})}),secondaryActions:(null==bo?void 0:bo.secondaryActions)?bo.secondaryActions(il):il},{children:rl})):rl}export{S as default};
|
|
2
2
|
//# sourceMappingURL=InternalChatCitationRenderer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsxs as i,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as o,useEffect as r,useRef as l}from"react";import{Box as d,Typography as c,Skeleton as a,Accordion as s,AccordionSummary as h,AccordionDetails as p,Tooltip as f,IconButton as x,Switch as u,Dialog as m,Chip as g}from"@mui/material";import v from"@mui/icons-material/ExpandMore";import b from"@mui/icons-material/Fullscreen";import y from"@mui/icons-material/Close";import S from"@mui/icons-material/NearMeOutlined";import w from"@mui/icons-material/ChevronLeft";import z from"@mui/icons-material/ChevronRight";import E from"./DependencyGraph.js";import{MarkdownRenderer as D}from"./Markdownrenderer.js";import{InternalEditor as k}from"./Internaleditor.js";var B=function(n){var r=n.text,l=n.detailedSummary,a=n.extraMetaData,s=n.isDarkMode,h=void 0!==s&&s,p=n.markdownRendererStyle,f=o(!1),x=f[0],u=f[1],m=function(e,i){void 0===i&&(i=220);var t=e.replace(/<!--\s*<ai_reasoning>[\s\S]*?<\/ai_reasoning>\s*-->/g,"").replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim();if(t.length<=i)return{preview:t,truncated:!1};var n=t.slice(0,i),o=n.lastIndexOf(" ");return{preview:(o>0?n.slice(0,o):n).trim(),truncated:!0}}(r),g=m.preview,v=m.truncated;return t(d,{children:i(d,x?{children:[t(D,{message:r,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,style:p}),(null==l?void 0:l.trim())&&t(D,{message:l,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,style:p}),t(c,e({component:"span",onClick:function(){return u(!1)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"view less"}))]}:e({sx:{display:"flex",flexDirection:"column"}},{children:[i(c,e({sx:{fontSize:"0.8rem",color:h?"#cbd5e1":"#4B5563",lineHeight:1.6}},{children:[g,v&&"…"]})),(v||(null==l?void 0:l.trim()))&&t(d,e({sx:{display:"flex",justifyContent:"flex-end"}},{children:t(c,e({component:"span",onClick:function(){return u(!0)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"...view more"}))}))]}))})},M=function(n){var a=n.text,s=n.extraMetaData,h=o(!1),p=h[0],f=h[1],x=o(!1),u=x[0],m=x[1],g=l(null);return r(function(){var e=g.current;e&&m(e.scrollWidth>e.clientWidth)},[a]),t(d,e({sx:{pl:1}},{children:i(d,p?e({sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4}},{children:[t(D,{message:a,fontSize:"0.68rem",extraMetaData:s}),t(c,e({component:"span",onClick:function(){return f(!1)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600}},{children:"view less"}))]}):e({sx:{display:"flex",alignItems:"baseline",gap:.5}},{children:[t(c,e({ref:g,sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,minWidth:0}},{children:a})),u&&t(c,e({component:"span",onClick:function(){return f(!0)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600,flexShrink:0}},{children:"view more"}))]}))}))},C=function(C){var R,A=C.promptContent,F=C.promptTitle,W=C.isLoading,I=void 0!==W&&W,H=C.overviewSummary,P=C.functionalityOfSPB,T=void 0===P?[]:P,_=C.spbAdditionalInfo,L=C.extraMetaData,j=C.showCodePanel,O=void 0===j||j,G=C.showCollapseStrip,N=void 0===G||G,X=C.showFullscreenButton,Y=void 0===X||X,q=C.showFullscreenModal,J=void 0===q||q,K=C.showThemeToggle,Q=void 0===K||K,U=C.isDarkMode,V=void 0===U||U,Z=C.styles,$=C.className,ee=C.style,ie=C.sx,te=o(null),ne=te[0],oe=te[1],re=o(null),le=re[0],de=re[1],ce=o(""),ae=ce[0],se=ce[1],he=void 0!==(null==Z?void 0:Z.isDarkMode)?Z.isDarkMode:V,pe=o(he),fe=pe[0],xe=pe[1],ue=o(null),me=ue[0],ge=ue[1];r(function(){void 0!==(null==Z?void 0:Z.isDarkMode)&&xe(Z.isDarkMode)},[null==Z?void 0:Z.isDarkMode]);var ve=o(!1),be=ve[0],ye=ve[1],Se=o(480),we=Se[0],ze=Se[1],Ee=l(!1),De=l(null);r(function(){var e,i,t;T.length>0&&oe((e=new Date,i=e.toLocaleTimeString("en-IN",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),t=e.toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"}),"".concat(i||""," | ").concat(t||"")))},[T]),r(function(){I&&oe(null)},[I]),r(function(){me&&(se(""),setTimeout(function(){return se(me.ref)},500))},[me]);return i(d,e({className:$,style:e(e({},null==Z?void 0:Z.root),ee),sx:e({height:"100%",display:"flex",flexDirection:"column",width:"100%",minHeight:0,overflow:"hidden"},ie)},{children:[t(d,e({sx:e({px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0},null==Z?void 0:Z.header)},{children:i(d,e({sx:{display:"flex",flexDirection:"column",gap:.25}},{children:[t(c,e({sx:e({fontWeight:700,fontSize:"0.9rem",color:"#111827"},null==Z?void 0:Z.headerTitle)},{children:F||"SPB Analysis"})),t(c,e({sx:e({fontSize:"0.7rem",color:"#9CA3AF"},null==Z?void 0:Z.headerSubtitle)},{children:ne?"Last Analyzed at ".concat(ne):""}))]}))})),i(d,e({ref:De,sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden",position:"relative"}},{children:[t(d,e({sx:e({width:O?be&&N?0:we:"100%",flexShrink:0,minHeight:0,overflow:"hidden",transition:Ee.current?"none":"width 0.15s",borderRight:!O||be&&N?"none":"1px solid #e5e7eb"},null==Z?void 0:Z.leftPanel)},{children:i(d,e({sx:{width:"100%",height:"100%",minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1,px:1.25,py:1.25,pb:2}},{children:[i(d,e({sx:e({border:"1px solid #E5E7EB",borderRadius:"8px",bgcolor:"#F8FAFC",p:1.5},null==Z?void 0:Z.overviewSection)},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827",mb:1},null==Z?void 0:Z.overviewTitle)},{children:"Overview"})),t(d,e({sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5},null==Z?void 0:Z.overviewContent)},{children:(null===(R=null==H?void 0:H.overallSummary)||void 0===R?void 0:R.trim())?t(B,{text:H.overallSummary,detailedSummary:H.detailedSummary,extraMetaData:L,isDarkMode:fe,markdownRendererStyle:null==Z?void 0:Z.markdownRenderer}):i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"95%",height:14})]}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==Z?void 0:Z.functionalitySection)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75}}},{children:t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==Z?void 0:Z.functionalityTitle)},{children:"Functionality of SPB"}))})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:T.length>0?T.map(function(n,o){return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:0===o,sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},overflow:"hidden"},null==Z?void 0:Z.functionalityItem)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:38,"& .MuiAccordionSummary-content":{my:.5}}},{children:i(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827"}},{children:[o+1,". ",n.name||n.section_name]}))})),i(p,e({sx:{px:1.5,pb:1.5,pt:0,display:"flex",flexDirection:"column",gap:.75}},{children:[t(D,{fontSize:"0.74rem",message:n.description||n.reason_for_inclusion||"",extraMetaData:L}),t(c,e({sx:{fontSize:"0.72rem",color:"#9CA3AF",fontWeight:500,mt:.25}},{children:"APB References"})),t(d,e({sx:{display:"flex",flexDirection:"column",gap:.75}},{children:n.apb_references.map(function(n,o){var r="string"==typeof n?n:n.apb_name,l=le===r;return i(d,e({sx:{display:"flex",flexDirection:"column",gap:.15}},{children:[i(d,e({onClick:function(){return function(e){le===e?(de(null),se("")):(de(e),se(""),setTimeout(function(){return se(e)},50))}(r)},sx:{display:"flex",alignItems:"center",gap:.25,cursor:"pointer"}},{children:[i(c,e({sx:{fontSize:"0.78rem",color:l?"#5928ed":"#DB2877",fontWeight:500}},{children:[o+1,". ",r]})),t(S,{sx:{fontSize:"0.75rem",color:l?"#5928ed":"#DB2877"}})]})),"string"!=typeof n&&(n.description||n.context)&&t(M,{text:n.description||n.context||"",extraMetaData:L})]}),o)})}))]}))]}),o)}):t(d,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[1,2,3].map(function(n){return i(d,e({sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5,display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"40%",height:16}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"80%",height:14}),t(a,{variant:"text",width:"30%",height:14})]}),n)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==Z?void 0:Z.applicabilitySection)},{children:[i(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==Z?void 0:Z.applicabilityTitle)},{children:"Applicability"})),t(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"When to Apply this SPB / When Not Apply"}))]})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC"}},{children:t(d,e({sx:{display:"flex",gap:1}},{children:[{label:"When to apply",content:null==_?void 0:_.when_to_apply},{label:"When NOT to apply",content:null==_?void 0:_.when_not_to_apply}].map(function(n){var o=n.label,r=n.content;return i(d,e({sx:{flex:1,bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px",p:1.25}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151",mb:.75}},{children:o})),r?t(D,{fontSize:"0.8rem",message:r,isDarkMode:fe,style:null==Z?void 0:Z.markdownRenderer,extraMetaData:L}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"80%",height:14}),t(a,{variant:"text",width:"90%",height:14})]})):t(c,e({sx:{fontSize:"0.8rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))]}),o)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==Z?void 0:Z.specificationsSection)},{children:[i(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==Z?void 0:Z.specificationsTitle)},{children:"Specifications"})),t(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"Strict Rules / Input / Output"}))]})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:[{label:"Strict Rules",tooltip:null,content:null==_?void 0:_.constraints_and_rules},{label:"Input",tooltip:"Input specification for this SPB",content:null==_?void 0:_.input_analysis},{label:"Output",tooltip:"Output specification for this SPB",content:null==_?void 0:_.output_analysis}].map(function(o){var r=o.label,l=o.tooltip,u=o.content,m="Output"===r,g=m&&u?function(e){var i=[];return{text:e.replace(/<code>([\s\S]*?)<\/code>/g,function(e,t){return i.push(t.trim()),""}).trim(),code:i.join("\n\n")}}(u):null,b=g?g.text:u,y=g?g.code:"";return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:"Strict Rules"===r,sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px !important","&:before":{display:"none"},overflow:"hidden"}},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem"}}),sx:{minHeight:34,px:1.25,"& .MuiAccordionSummary-content":{my:.4}}},{children:i(d,e({sx:{display:"flex",alignItems:"center",gap:.5}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151"}},{children:r})),l&&t(f,e({title:l,placement:"top"},{children:t(d,e({component:"span",sx:{width:13,height:13,borderRadius:"50%",background:"#E5E7EB",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"0.58rem",color:"#6B7280",fontWeight:700,cursor:"default",flexShrink:0}},{children:"i"}))}))]}))})),t(p,e({sx:{px:1.25,pb:1.25,pt:0}},{children:u?i(n,{children:[b&&t(D,{fontSize:"0.8rem",message:b,isDarkMode:fe,style:null==Z?void 0:Z.markdownRenderer,extraMetaData:L}),m&&y&&i(d,e({sx:{width:"100%",height:"35vh",mt:1.5}},{children:[i(d,e({sx:{display:"flex",gap:.1,backgroundColor:"black",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:1,borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[t(c,e({sx:{color:"white",fontWeight:500,fontSize:"0.8rem"}},{children:"Output preview"})),t(f,e({title:"Copy Code to clipboard"},{children:t(x,e({size:"small",onClick:function(){return e=y,navigator.clipboard.writeText(e);var e}},{children:t(c,e({sx:{fontSize:"0.7rem",color:"white"}},{children:"Copy"}))}))}))]})),t(d,e({sx:{mt:-1,height:"calc(100% - 40px)",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:"hidden"}},{children:t(k,{content:y,isDarkMode:fe,height:"100%",fontSize:10})}))]}))]}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"75%",height:14})]})):t(c,e({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))}))]}),r)})}))]})),i(s,e({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},bgcolor:"#fff"},null==Z?void 0:Z.dependencyGraphSection)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75},"&.Mui-expanded":{bgcolor:"#F8FAFC",borderRadius:"8px 8px 0 0"}}},{children:t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==Z?void 0:Z.dependencyGraphTitle)},{children:"Dependency Graph"}))})),t(p,e({sx:{px:0,pb:0,pt:0}},{children:(null==_?void 0:_.dependency_graph)?i(d,e({sx:{bgcolor:"#F8FAFC",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1.5}},{children:[t(d,e({sx:{height:500,borderRadius:"8px",overflow:"hidden"}},{children:t(E,{data:_.dependency_graph,isDarkMode:fe,style:null==Z?void 0:Z.dependencyGraph})})),t(c,e({sx:{fontSize:"0.72rem",color:"#64748B",lineHeight:1.6}},{children:"This graph visualises how Atomic Prompt Blocks (APBs) depend on, influence, or exchange information with one another within the prompt architecture."}))]})):i(d,e({sx:{bgcolor:"#fff",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1}},{children:[t(a,{variant:"rectangular",width:"100%",height:400,sx:{borderRadius:"8px"}}),t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"80%",height:14})]}))}))]}))]}))})),O&&N&&t(d,e({onClick:function(){return ye(function(e){return!e})},sx:e({width:20,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRight:"1px solid #e5e7eb",borderLeft:"1px solid #e5e7eb",bgcolor:"#f9fafb",position:"relative",py:2,"&:hover":{bgcolor:"#f0f0f0"}},null==Z?void 0:Z.collapseStrip)},{children:t(c,e({sx:{fontSize:10,fontWeight:600,color:"#6b7280",writingMode:"vertical-rl",textOrientation:"mixed",transform:"rotate(180deg)",letterSpacing:"0.05em",userSelect:"none"}},{children:"SPB Details"}))})),O&&N&&t(d,e({onClick:function(){return ye(function(e){return!e})},onMouseDown:function(e){e.preventDefault(),Ee.current=!0;var i=function(e){if(Ee.current&&De.current){var n=De.current.getBoundingClientRect(),o=n.left,r=n.width,l=e.clientX-o;if(l<200)return ye(!0),Ee.current=!1,document.removeEventListener("mousemove",i),void document.removeEventListener("mouseup",t);l>.7*r||(ye(!1),ze(l))}},t=function(){Ee.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",t)},sx:e({position:"absolute",left:be?20:we+20,top:"50%",transform:"translateY(-50%)",width:18,height:28,bgcolor:"#fff",border:"1px solid #e5e7eb",borderRadius:"0 6px 6px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"col-resize",zIndex:5,boxShadow:"2px 0 4px rgba(0,0,0,0.06)","&:hover":{bgcolor:"#f9fafb"}},null==Z?void 0:Z.dragHandle)},{children:t(be?z:w,{sx:{fontSize:12,color:"#6b7280"}})})),O&&i(d,e({sx:e({flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5,bgcolor:"#f8fafc"},null==Z?void 0:Z.codePanel)},{children:[i(d,e({sx:e({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},null==Z?void 0:Z.codePanelHeader)},{children:[t(c,e({sx:e({fontSize:13,fontWeight:600,color:"#374151"},null==Z?void 0:Z.codePanelTitle)},{children:F||"SPB Analysis"})),i(d,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:[Q&&t(u,{checked:fe,onChange:function(e){return xe(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}}),Y&&J&&t(f,e({title:"Fullscreen",placement:"top"},{children:t(x,e({size:"small",onClick:function(){return ge({ref:ae||"",description:""})},sx:{color:"#6b7280"}},{children:t(b,{sx:{fontSize:16}})}))}))]}))]})),t(d,e({sx:e({flex:1,minHeight:0,border:"1px solid #30363d",borderRadius:1,overflow:"hidden"},null==Z?void 0:Z.editorContainer)},{children:t(k,{content:A,selectedTag:ae,isDarkMode:fe,height:"100%",fontSize:13})}))]}))]})),J&&i(m,e({open:!!me,onClose:function(){return ge(null)},maxWidth:!1,PaperProps:{sx:e({width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},null==Z?void 0:Z.fullscreenModal)}},{children:[i(d,e({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[t(c,e({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Promptemon"})),t(x,e({size:"small",onClick:function(){return ge(null)}},{children:t(y,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),i(d,e({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[i(d,e({sx:{width:"40%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[t(f,e({title:"Atomic Prompt Block",placement:"top"},{children:t(g,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}})})),t(c,e({sx:{fontWeight:600,fontSize:"0.9rem",color:"#111827"}},{children:null==me?void 0:me.ref}))]})),i(d,e({sx:{flex:1,p:2,display:"flex",flexDirection:"column",gap:1.5,overflowY:"auto"}},{children:[i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),t(c,e({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:null==me?void 0:me.description}))]})),i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.25,display:"flex",alignItems:"center",gap:.5}},{children:[t(c,e({sx:{fontSize:"0.73rem",color:"#6B7280"}},{children:"Total Lines"})),t(c,e({sx:{fontSize:"0.73rem",fontWeight:700,color:"#111827"}},{children:A.split("\n").length}))]}))]}))]})),i(d,e({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),t(u,{checked:fe,onChange:function(e){return xe(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}})]})),t(d,e({sx:{flex:1,minHeight:0,p:1.5}},{children:t(k,{content:A,selectedTag:ae,isDarkMode:fe,height:"100%",fontSize:13})}))]}))]}))]}))]}))};export{C as default};
|
|
1
|
+
import{__assign as e}from"tslib";import{jsxs as i,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as o,useEffect as r,useRef as l}from"react";import{Box as d,Typography as c,Skeleton as a,Accordion as s,AccordionSummary as h,AccordionDetails as p,Tooltip as f,IconButton as x,Switch as u,Dialog as m,Chip as g}from"@mui/material";import v from"@mui/icons-material/ExpandMore";import b from"@mui/icons-material/Fullscreen";import y from"@mui/icons-material/Close";import S from"@mui/icons-material/NearMeOutlined";import w from"@mui/icons-material/ChevronLeft";import z from"@mui/icons-material/ChevronRight";import E from"./DependencyGraph.js";import{MarkdownRenderer as D}from"./Markdownrenderer.js";import{InternalEditor as k}from"./Internaleditor.js";var B=function(n){var r=n.text,l=n.detailedSummary,a=n.extraMetaData,s=n.isDarkMode,h=void 0!==s&&s,p=n.markdownRendererStyle,f=o(!1),x=f[0],u=f[1],m=function(e,i){void 0===i&&(i=220);var t=e.replace(/<!--\s*<ai_reasoning>[\s\S]*?<\/ai_reasoning>\s*-->/g,"").replace(/<[^>]+>/g,"").replace(/\s+/g," ").trim();if(t.length<=i)return{preview:t,truncated:!1};var n=t.slice(0,i),o=n.lastIndexOf(" ");return{preview:(o>0?n.slice(0,o):n).trim(),truncated:!0}}(r),g=m.preview,v=m.truncated;return t(d,{children:i(d,x?{children:[t(D,{message:r,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,style:p}),(null==l?void 0:l.trim())&&t(D,{message:l,fontSize:"0.8rem",extraMetaData:a,isDarkMode:h,style:p}),t(c,e({component:"span",onClick:function(){return u(!1)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"view less"}))]}:e({sx:{display:"flex",flexDirection:"column"}},{children:[i(c,e({sx:{fontSize:"0.8rem",color:h?"#cbd5e1":"#4B5563",lineHeight:1.6}},{children:[g,v&&"…"]})),(v||(null==l?void 0:l.trim()))&&t(d,e({sx:{display:"flex",justifyContent:"flex-end"}},{children:t(c,e({component:"span",onClick:function(){return u(!0)},sx:{fontSize:"0.72rem",color:h?"#a78bfa":"#5928ed",fontWeight:600,cursor:"pointer"}},{children:"...view more"}))}))]}))})},M=function(n){var a=n.text,s=n.extraMetaData,h=o(!1),p=h[0],f=h[1],x=o(!1),u=x[0],m=x[1],g=l(null);return r(function(){var e=g.current;e&&m(e.scrollWidth>e.clientWidth)},[a]),t(d,e({sx:{pl:1}},{children:i(d,p?e({sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4}},{children:[t(D,{message:a,fontSize:"0.68rem",extraMetaData:s}),t(c,e({component:"span",onClick:function(){return f(!1)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600}},{children:"view less"}))]}):e({sx:{display:"flex",alignItems:"baseline",gap:.5}},{children:[t(c,e({ref:g,sx:{fontSize:"0.68rem",color:"#9CA3AF",lineHeight:1.4,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",flex:1,minWidth:0}},{children:a})),u&&t(c,e({component:"span",onClick:function(){return f(!0)},sx:{fontSize:"0.65rem",color:"#5928ed",cursor:"pointer",fontWeight:600,flexShrink:0}},{children:"view more"}))]}))}))},C=function(C){var R,A=C.promptContent,F=C.promptTitle,W=C.isLoading,I=void 0!==W&&W,H=C.overviewSummary,P=C.functionalityOfSPB,T=void 0===P?[]:P,_=C.spbAdditionalInfo,L=C.extraMetaData,j=C.showCodePanel,O=void 0===j||j,G=C.showInlineApbEditor,N=void 0===G||G,X=C.showCollapseStrip,Y=void 0===X||X,q=C.showFullscreenButton,J=void 0===q||q,K=C.showFullscreenModal,Q=void 0===K||K,U=C.showThemeToggle,V=void 0===U||U,Z=C.isDarkMode,$=void 0===Z||Z,ee=C.styles,ie=C.className,te=C.style,ne=C.sx,oe=o(null),re=oe[0],le=oe[1],de=o(null),ce=de[0],ae=de[1],se=o(""),he=se[0],pe=se[1],fe=void 0!==(null==ee?void 0:ee.isDarkMode)?ee.isDarkMode:$,xe=o(fe),ue=xe[0],me=xe[1],ge=o(null),ve=ge[0],be=ge[1];r(function(){void 0!==(null==ee?void 0:ee.isDarkMode)&&me(ee.isDarkMode)},[null==ee?void 0:ee.isDarkMode]);var ye=o(!1),Se=ye[0],we=ye[1],ze=o(480),Ee=ze[0],De=ze[1],ke=l(!1),Be=l(null);r(function(){var e,i,t;T.length>0&&le((e=new Date,i=e.toLocaleTimeString("en-IN",{hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}),t=e.toLocaleDateString("en-IN",{day:"numeric",month:"short",year:"numeric"}),"".concat(i||""," | ").concat(t||"")))},[T]),r(function(){I&&le(null)},[I]),r(function(){ve&&(pe(""),setTimeout(function(){return pe(ve.ref)},500))},[ve]);return i(d,e({className:ie,style:e(e({},null==ee?void 0:ee.root),te),sx:e({height:"100%",display:"flex",flexDirection:"column",width:"100%",minHeight:0,overflow:"hidden"},ne)},{children:[t(d,e({sx:e({px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0},null==ee?void 0:ee.header)},{children:i(d,e({sx:{display:"flex",flexDirection:"column",gap:.25}},{children:[t(c,e({sx:e({fontWeight:700,fontSize:"0.9rem",color:"#111827"},null==ee?void 0:ee.headerTitle)},{children:F||"SPB Analysis"})),t(c,e({sx:e({fontSize:"0.7rem",color:"#9CA3AF"},null==ee?void 0:ee.headerSubtitle)},{children:re?"Last Analyzed at ".concat(re):""}))]}))})),i(d,e({ref:Be,sx:{display:"flex",flex:1,minHeight:0,overflow:"hidden",position:"relative"}},{children:[t(d,e({sx:e({width:O?Se&&Y?0:Ee:"100%",flexShrink:0,minHeight:0,overflow:"hidden",transition:ke.current?"none":"width 0.15s",borderRight:!O||Se&&Y?"none":"1px solid #e5e7eb"},null==ee?void 0:ee.leftPanel)},{children:i(d,e({sx:{width:"100%",height:"100%",minHeight:0,overflowY:"auto",display:"flex",flexDirection:"column",gap:1,px:1.25,py:1.25,pb:2}},{children:[i(d,e({sx:e({border:"1px solid #E5E7EB",borderRadius:"8px",bgcolor:"#F8FAFC",p:1.5},null==ee?void 0:ee.overviewSection)},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827",mb:1},null==ee?void 0:ee.overviewTitle)},{children:"Overview"})),t(d,e({sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5},null==ee?void 0:ee.overviewContent)},{children:(null===(R=null==H?void 0:H.overallSummary)||void 0===R?void 0:R.trim())?t(B,{text:H.overallSummary,detailedSummary:H.detailedSummary,extraMetaData:L,isDarkMode:ue,markdownRendererStyle:null==ee?void 0:ee.markdownRenderer}):i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"95%",height:14})]}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==ee?void 0:ee.functionalitySection)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75}}},{children:t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==ee?void 0:ee.functionalityTitle)},{children:"Functionality of SPB"}))})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:T.length>0?T.map(function(n,o){return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:0===o,sx:e({bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},overflow:"hidden"},null==ee?void 0:ee.functionalityItem)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:38,"& .MuiAccordionSummary-content":{my:.5}}},{children:i(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827"}},{children:[o+1,". ",n.name||n.section_name]}))})),i(p,e({sx:{px:1.5,pb:1.5,pt:0,display:"flex",flexDirection:"column",gap:.75}},{children:[t(D,{fontSize:"0.74rem",message:n.description||n.reason_for_inclusion||"",extraMetaData:L}),t(c,e({sx:{fontSize:"0.72rem",color:"#9CA3AF",fontWeight:500,mt:.25}},{children:"APB References"})),t(d,e({sx:{display:"flex",flexDirection:"column",gap:.75}},{children:n.apb_references.map(function(n,o){var r="string"==typeof n?n:n.apb_name,l=ce===r;return i(d,e({sx:{display:"flex",flexDirection:"column",gap:.15}},{children:[i(d,e({onClick:function(){return function(e){ce===e?(ae(null),pe("")):(ae(e),pe(""),setTimeout(function(){return pe(e)},50))}(r)},sx:{display:"flex",alignItems:"center",gap:.25,cursor:"pointer"}},{children:[i(c,e({sx:{fontSize:"0.78rem",color:l?"#5928ed":"#DB2877",fontWeight:500}},{children:[o+1,". ",r]})),t(S,{sx:{fontSize:"0.75rem",color:l?"#5928ed":"#DB2877"}})]})),"string"!=typeof n&&(n.description||n.context)&&t(M,{text:n.description||n.context||"",extraMetaData:L}),N&&l&&t(d,e({sx:{mt:1,height:260,border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"}},{children:t(k,{content:A,selectedTag:he,isDarkMode:ue,height:"100%",fontSize:12})}))]}),o)})}))]}))]}),o)}):t(d,e({sx:{display:"flex",flexDirection:"column",gap:1}},{children:[1,2,3].map(function(n){return i(d,e({sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5,display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"40%",height:16}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"80%",height:14}),t(a,{variant:"text",width:"30%",height:14})]}),n)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==ee?void 0:ee.applicabilitySection)},{children:[i(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==ee?void 0:ee.applicabilityTitle)},{children:"Applicability"})),t(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"When to Apply this SPB / When Not Apply"}))]})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC"}},{children:t(d,e({sx:{display:"flex",gap:1}},{children:[{label:"When to apply",content:null==_?void 0:_.when_to_apply},{label:"When NOT to apply",content:null==_?void 0:_.when_not_to_apply}].map(function(n){var o=n.label,r=n.content;return i(d,e({sx:{flex:1,bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px",p:1.25}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151",mb:.75}},{children:o})),r?t(D,{fontSize:"0.8rem",message:r,isDarkMode:ue,style:null==ee?void 0:ee.markdownRenderer,extraMetaData:L}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"80%",height:14}),t(a,{variant:"text",width:"90%",height:14})]})):t(c,e({sx:{fontSize:"0.8rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))]}),o)})}))}))]})),i(s,e({disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},"&.Mui-expanded":{bgcolor:"#F8FAFC"},bgcolor:"#fff"},null==ee?void 0:ee.specificationsSection)},{children:[i(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75,alignItems:"center",gap:1}}},{children:[t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==ee?void 0:ee.specificationsTitle)},{children:"Specifications"})),t(c,e({sx:{fontSize:"0.7rem",color:"#9CA3AF"}},{children:"Strict Rules / Input / Output"}))]})),t(p,e({sx:{px:1.5,pb:1.5,pt:0,bgcolor:"#F8FAFC",display:"flex",flexDirection:"column",gap:1}},{children:[{label:"Strict Rules",tooltip:null,content:null==_?void 0:_.constraints_and_rules},{label:"Input",tooltip:"Input specification for this SPB",content:null==_?void 0:_.input_analysis},{label:"Output",tooltip:"Output specification for this SPB",content:null==_?void 0:_.output_analysis}].map(function(o){var r=o.label,l=o.tooltip,u=o.content,m="Output"===r,g=m&&u?function(e){var i=[];return{text:e.replace(/<code>([\s\S]*?)<\/code>/g,function(e,t){return i.push(t.trim()),""}).trim(),code:i.join("\n\n")}}(u):null,b=g?g.text:u,y=g?g.code:"";return i(s,e({disableGutters:!0,elevation:0,defaultExpanded:"Strict Rules"===r,sx:{bgcolor:"#fff",border:"1px solid #E5E7EB",borderRadius:"6px !important","&:before":{display:"none"},overflow:"hidden"}},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem"}}),sx:{minHeight:34,px:1.25,"& .MuiAccordionSummary-content":{my:.4}}},{children:i(d,e({sx:{display:"flex",alignItems:"center",gap:.5}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.76rem",color:"#374151"}},{children:r})),l&&t(f,e({title:l,placement:"top"},{children:t(d,e({component:"span",sx:{width:13,height:13,borderRadius:"50%",background:"#E5E7EB",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"0.58rem",color:"#6B7280",fontWeight:700,cursor:"default",flexShrink:0}},{children:"i"}))}))]}))})),t(p,e({sx:{px:1.25,pb:1.25,pt:0}},{children:u?i(n,{children:[b&&t(D,{fontSize:"0.8rem",message:b,isDarkMode:ue,style:null==ee?void 0:ee.markdownRenderer,extraMetaData:L}),m&&y&&i(d,e({sx:{width:"100%",height:"35vh",mt:1.5}},{children:[i(d,e({sx:{display:"flex",gap:.1,backgroundColor:"black",flexDirection:"row",alignItems:"center",justifyContent:"space-between",p:1,borderTopLeftRadius:"8px",borderTopRightRadius:"8px"}},{children:[t(c,e({sx:{color:"white",fontWeight:500,fontSize:"0.8rem"}},{children:"Output preview"})),t(f,e({title:"Copy Code to clipboard"},{children:t(x,e({size:"small",onClick:function(){return e=y,navigator.clipboard.writeText(e);var e}},{children:t(c,e({sx:{fontSize:"0.7rem",color:"white"}},{children:"Copy"}))}))}))]})),t(d,e({sx:{mt:-1,height:"calc(100% - 40px)",borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",overflow:"hidden"}},{children:t(k,{content:y,isDarkMode:ue,height:"100%",fontSize:10})}))]}))]}):I?i(d,e({sx:{display:"flex",flexDirection:"column",gap:.5}},{children:[t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"90%",height:14}),t(a,{variant:"text",width:"75%",height:14})]})):t(c,e({sx:{fontSize:"0.74rem",color:"#6B7280",lineHeight:1.5}},{children:"— Not yet available"}))}))]}),r)})}))]})),i(s,e({defaultExpanded:!0,disableGutters:!0,elevation:0,sx:e({border:"1px solid #E5E7EB",borderRadius:"8px !important","&:before":{display:"none"},bgcolor:"#fff"},null==ee?void 0:ee.dependencyGraphSection)},{children:[t(h,e({expandIcon:t(v,{sx:{fontSize:"1rem",color:"#6B7280"}}),sx:{px:1.5,minHeight:"unset","& .MuiAccordionSummary-content":{my:.75},"&.Mui-expanded":{bgcolor:"#F8FAFC",borderRadius:"8px 8px 0 0"}}},{children:t(c,e({sx:e({fontWeight:600,fontSize:"0.85rem",color:"#111827"},null==ee?void 0:ee.dependencyGraphTitle)},{children:"Dependency Graph"}))})),t(p,e({sx:{px:0,pb:0,pt:0}},{children:(null==_?void 0:_.dependency_graph)?i(d,e({sx:{bgcolor:"#F8FAFC",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1.5}},{children:[t(d,e({sx:{height:500,borderRadius:"8px",overflow:"hidden"}},{children:t(E,{data:_.dependency_graph,isDarkMode:ue,style:null==ee?void 0:ee.dependencyGraph})})),t(c,e({sx:{fontSize:"0.72rem",color:"#64748B",lineHeight:1.6}},{children:"This graph visualises how Atomic Prompt Blocks (APBs) depend on, influence, or exchange information with one another within the prompt architecture."}))]})):i(d,e({sx:{bgcolor:"#fff",borderRadius:"0 0 8px 8px",p:1.5,display:"flex",flexDirection:"column",gap:1}},{children:[t(a,{variant:"rectangular",width:"100%",height:400,sx:{borderRadius:"8px"}}),t(a,{variant:"text",width:"100%",height:14}),t(a,{variant:"text",width:"80%",height:14})]}))}))]}))]}))})),O&&Y&&t(d,e({onClick:function(){return we(function(e){return!e})},sx:e({width:20,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRight:"1px solid #e5e7eb",borderLeft:"1px solid #e5e7eb",bgcolor:"#f9fafb",position:"relative",py:2,"&:hover":{bgcolor:"#f0f0f0"}},null==ee?void 0:ee.collapseStrip)},{children:t(c,e({sx:{fontSize:10,fontWeight:600,color:"#6b7280",writingMode:"vertical-rl",textOrientation:"mixed",transform:"rotate(180deg)",letterSpacing:"0.05em",userSelect:"none"}},{children:"SPB Details"}))})),O&&Y&&t(d,e({onClick:function(){return we(function(e){return!e})},onMouseDown:function(e){e.preventDefault(),ke.current=!0;var i=function(e){if(ke.current&&Be.current){var n=Be.current.getBoundingClientRect(),o=n.left,r=n.width,l=e.clientX-o;if(l<200)return we(!0),ke.current=!1,document.removeEventListener("mousemove",i),void document.removeEventListener("mouseup",t);l>.7*r||(we(!1),De(l))}},t=function(){ke.current=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",t)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",t)},sx:e({position:"absolute",left:Se?20:Ee+20,top:"50%",transform:"translateY(-50%)",width:18,height:28,bgcolor:"#fff",border:"1px solid #e5e7eb",borderRadius:"0 6px 6px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"col-resize",zIndex:5,boxShadow:"2px 0 4px rgba(0,0,0,0.06)","&:hover":{bgcolor:"#f9fafb"}},null==ee?void 0:ee.dragHandle)},{children:t(Se?z:w,{sx:{fontSize:12,color:"#6b7280"}})})),O&&i(d,e({sx:e({flex:1,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5,bgcolor:"#f8fafc"},null==ee?void 0:ee.codePanel)},{children:[i(d,e({sx:e({display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},null==ee?void 0:ee.codePanelHeader)},{children:[t(c,e({sx:e({fontSize:13,fontWeight:600,color:"#374151"},null==ee?void 0:ee.codePanelTitle)},{children:F||"SPB Analysis"})),i(d,e({sx:{display:"flex",alignItems:"center",gap:1.5}},{children:[V&&t(u,{checked:ue,onChange:function(e){return me(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}}),J&&Q&&t(f,e({title:"Fullscreen",placement:"top"},{children:t(x,e({size:"small",onClick:function(){return be({ref:he||"",description:""})},sx:{color:"#6b7280"}},{children:t(b,{sx:{fontSize:16}})}))}))]}))]})),t(d,e({sx:e({flex:1,minHeight:0,border:"1px solid #30363d",borderRadius:1,overflow:"hidden"},null==ee?void 0:ee.editorContainer)},{children:t(k,{content:A,selectedTag:he,isDarkMode:ue,height:"100%",fontSize:13})}))]}))]})),Q&&i(m,e({open:!!ve,onClose:function(){return be(null)},maxWidth:!1,PaperProps:{sx:e({width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"},null==ee?void 0:ee.fullscreenModal)}},{children:[i(d,e({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[t(c,e({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Promptemon"})),t(x,e({size:"small",onClick:function(){return be(null)}},{children:t(y,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),i(d,e({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[i(d,e({sx:{width:"40%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[t(f,e({title:"Atomic Prompt Block",placement:"top"},{children:t(g,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}})})),t(c,e({sx:{fontWeight:600,fontSize:"0.9rem",color:"#111827"}},{children:null==ve?void 0:ve.ref}))]})),i(d,e({sx:{flex:1,p:2,display:"flex",flexDirection:"column",gap:1.5,overflowY:"auto"}},{children:[i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),t(c,e({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:null==ve?void 0:ve.description}))]})),i(d,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.25,display:"flex",alignItems:"center",gap:.5}},{children:[t(c,e({sx:{fontSize:"0.73rem",color:"#6B7280"}},{children:"Total Lines"})),t(c,e({sx:{fontSize:"0.73rem",fontWeight:700,color:"#111827"}},{children:A.split("\n").length}))]}))]}))]})),i(d,e({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[i(d,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t(c,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),t(u,{checked:ue,onChange:function(e){return me(e.target.checked)},size:"small",sx:{width:36,height:20,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:"2px","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{bgcolor:"#5928ed",opacity:1}}},"& .MuiSwitch-thumb":{width:16,height:16,bgcolor:"#fff"},"& .MuiSwitch-track":{borderRadius:10,bgcolor:"#d1d5db",opacity:1}}})]})),t(d,e({sx:{flex:1,minHeight:0,p:1.5}},{children:t(k,{content:A,selectedTag:he,isDarkMode:ue,height:"100%",fontSize:13})}))]}))]}))]}))]}))};export{C as default};
|
|
2
2
|
//# sourceMappingURL=Spbanalysispanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalChatCitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatCitation/InternalChatCitationRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAU5D,OAAO,qBAAqB,CAAC;AAM7B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA8CD,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,aAAa,EACb,aAAoC,EACpC,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,yBAAiC,EACjC,iBAAwB,EACxB,aAAmB,EACpB,EAAE,iCAAiC,
|
|
1
|
+
{"version":3,"file":"InternalChatCitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/ChatCitation/InternalChatCitationRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAU5D,OAAO,qBAAqB,CAAC;AAM7B,UAAU,iBAAiB;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA8CD,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,aAAa,EACb,aAAoC,EACpC,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,cAAc,EACd,YAAY,EACZ,yBAAiC,EACjC,iBAAwB,EACxB,aAAmB,EACpB,EAAE,iCAAiC,2CAkhBnC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const useCompareLayout: (initialMaintainOrder: boolean, scrollContainerRef: React.RefObject<HTMLDivElement>, lhsBadgeRefs: any, rhsBadgeRefs: any, proposedSections: any[], existingSections: any[]) => {
|
|
2
3
|
maintainRelativeOrder: boolean;
|
|
3
4
|
setMaintainRelativeOrder: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompareLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/hooks/useCompareLayout.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBACL,OAAO,sBACT,MAAM,SAAS,CAAC,cAAc,CAAC,gBACrC,GAAG,gBACH,GAAG,oBACC,GAAG,EAAE,oBACL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC"}
|
|
1
|
+
{"version":3,"file":"useCompareLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/hooks/useCompareLayout.tsx"],"names":[],"mappings":";AAGA,eAAO,MAAM,gBAAgB,yBACL,OAAO,sBACT,MAAM,SAAS,CAAC,cAAc,CAAC,gBACrC,GAAG,gBACH,GAAG,oBACC,GAAG,EAAE,oBACL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC"}
|
|
@@ -92,6 +92,8 @@ export interface SPBAnalysisPanelProps {
|
|
|
92
92
|
extraMetaData?: Record<string, any> | null;
|
|
93
93
|
/** Show the persistent right-side code editor panel. Defaults to true. */
|
|
94
94
|
showCodePanel?: boolean;
|
|
95
|
+
/** Show the inline Monaco editor that expands beneath a clicked APB reference, highlighting that section. Defaults to true. */
|
|
96
|
+
showInlineApbEditor?: boolean;
|
|
95
97
|
/** Show the vertical collapse strip and drag handle pill. Defaults to true. */
|
|
96
98
|
showCollapseStrip?: boolean;
|
|
97
99
|
/** Show the Fullscreen button in the code panel header. Defaults to true. */
|
|
@@ -111,6 +113,6 @@ export interface SPBAnalysisPanelProps {
|
|
|
111
113
|
/** Optional MUI sx prop overrides for the root container */
|
|
112
114
|
sx?: any;
|
|
113
115
|
}
|
|
114
|
-
declare const SPBAnalysisPanel: ({ promptContent, promptTitle, isLoading, overviewSummary, functionalityOfSPB, spbAdditionalInfo, extraMetaData, showCodePanel, showCollapseStrip, showFullscreenButton, showFullscreenModal, showThemeToggle, isDarkMode: isDarkModeProp, styles, className, style, sx, }: SPBAnalysisPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
116
|
+
declare const SPBAnalysisPanel: ({ promptContent, promptTitle, isLoading, overviewSummary, functionalityOfSPB, spbAdditionalInfo, extraMetaData, showCodePanel, showInlineApbEditor, showCollapseStrip, showFullscreenButton, showFullscreenModal, showThemeToggle, isDarkMode: isDarkModeProp, styles, className, style, sx, }: SPBAnalysisPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
115
117
|
export default SPBAnalysisPanel;
|
|
116
118
|
//# sourceMappingURL=Spbanalysispanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spbanalysispanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Spbanalysispanel.tsx"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"Spbanalysispanel.d.ts","sourceRoot":"","sources":["../../../../../src/features/SPBAnalysisPanel/Spbanalysispanel.tsx"],"names":[],"mappings":"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"}
|