@e-llm-studio/citation 0.0.228 → 0.0.230

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/README.md +112 -0
  2. package/dist/cjs/features/CognitiveCompare/CitationAnchor.js +1 -1
  3. package/dist/cjs/features/CognitiveCompare/CitationRenderer.js +1 -1
  4. package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
  5. package/dist/cjs/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  6. package/dist/cjs/features/CognitiveCompare/CognitivePopup.js +1 -1
  7. package/dist/cjs/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js +2 -0
  8. package/dist/cjs/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js.map +1 -0
  9. package/dist/cjs/features/CognitiveCompare/Guidelines/components/WebGptPanel.js +2 -0
  10. package/dist/cjs/features/CognitiveCompare/Guidelines/components/WebGptPanel.js.map +1 -0
  11. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/helper.js +2 -0
  12. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/helper.js.map +1 -0
  13. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +2 -0
  14. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js.map +1 -0
  15. package/dist/cjs/features/CognitiveCompare/MoreFunctionsPopup.js +1 -1
  16. package/dist/cjs/features/CognitiveCompare/components/RHSSectionRow.js +1 -1
  17. package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  18. package/dist/cjs/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  19. package/dist/cjs/features/CognitiveCompare/components/SvgConnectors.js +1 -1
  20. package/dist/cjs/features/CognitiveCompare/components/connectedLines.js +1 -1
  21. package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  22. package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  23. package/dist/cjs/features/CognitiveCompare/hooks/useSideBySide.js +1 -1
  24. package/dist/cjs/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js +1 -1
  25. package/dist/cjs/features/PromptemonBlockViewer/PromptemonBlockViewer.js +2 -0
  26. package/dist/cjs/features/PromptemonBlockViewer/PromptemonBlockViewer.js.map +1 -0
  27. package/dist/cjs/features/PromptemonViewer/PromptemonViewer.js +2 -0
  28. package/dist/cjs/features/PromptemonViewer/PromptemonViewer.js.map +1 -0
  29. package/dist/cjs/index.js +1 -1
  30. package/dist/features/CognitiveCompare/CitationAnchor.js +1 -1
  31. package/dist/features/CognitiveCompare/CitationRenderer.js +1 -1
  32. package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
  33. package/dist/features/CognitiveCompare/CognitiveComparehelpers.js +1 -1
  34. package/dist/features/CognitiveCompare/CognitivePopup.js +1 -1
  35. package/dist/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js +2 -0
  36. package/dist/features/CognitiveCompare/Guidelines/components/GuidelinePanel.js.map +1 -0
  37. package/dist/features/CognitiveCompare/Guidelines/components/WebGptPanel.js +2 -0
  38. package/dist/features/CognitiveCompare/Guidelines/components/WebGptPanel.js.map +1 -0
  39. package/dist/features/CognitiveCompare/Guidelines/utils/helper.js +2 -0
  40. package/dist/features/CognitiveCompare/Guidelines/utils/helper.js.map +1 -0
  41. package/dist/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +2 -0
  42. package/dist/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js.map +1 -0
  43. package/dist/features/CognitiveCompare/MoreFunctionsPopup.js +1 -1
  44. package/dist/features/CognitiveCompare/components/RHSSectionRow.js +1 -1
  45. package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  46. package/dist/features/CognitiveCompare/components/SubSectionAccordion.js +1 -1
  47. package/dist/features/CognitiveCompare/components/SvgConnectors.js +1 -1
  48. package/dist/features/CognitiveCompare/components/connectedLines.js +1 -1
  49. package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  50. package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  51. package/dist/features/CognitiveCompare/hooks/useSideBySide.js +1 -1
  52. package/dist/features/CognitiveInternalgptReasoning/CognitiveNonWebSearchReasoning.module.css.js +1 -1
  53. package/dist/features/PromptemonBlockViewer/PromptemonBlockViewer.js +2 -0
  54. package/dist/features/PromptemonBlockViewer/PromptemonBlockViewer.js.map +1 -0
  55. package/dist/features/PromptemonViewer/PromptemonViewer.js +2 -0
  56. package/dist/features/PromptemonViewer/PromptemonViewer.js.map +1 -0
  57. package/dist/index.js +1 -1
  58. package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
  59. package/dist/types/src/PromptemonBlockViewerTest.d.ts +3 -0
  60. package/dist/types/src/PromptemonBlockViewerTest.d.ts.map +1 -0
  61. package/dist/types/src/PromptemonViewerTest.d.ts +3 -0
  62. package/dist/types/src/PromptemonViewerTest.d.ts.map +1 -0
  63. package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts +3 -0
  64. package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -1
  65. package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts +3 -1
  66. package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts.map +1 -1
  67. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts +1 -1
  68. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
  69. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +19 -0
  70. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  71. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts +21 -3
  72. package/dist/types/src/features/CognitiveCompare/CognitiveComparehelpers.d.ts.map +1 -1
  73. package/dist/types/src/features/CognitiveCompare/CognitivePopup.d.ts.map +1 -1
  74. package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts +5 -1
  75. package/dist/types/src/features/CognitiveCompare/CompareContext.d.ts.map +1 -1
  76. package/dist/types/src/features/CognitiveCompare/Guidelines/components/GuidelinePanel.d.ts +3 -0
  77. package/dist/types/src/features/CognitiveCompare/Guidelines/components/GuidelinePanel.d.ts.map +1 -0
  78. package/dist/types/src/features/CognitiveCompare/Guidelines/components/WebGptPanel.d.ts +8 -0
  79. package/dist/types/src/features/CognitiveCompare/Guidelines/components/WebGptPanel.d.ts.map +1 -0
  80. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts +2001 -0
  81. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts.map +1 -0
  82. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/helper.d.ts +11 -0
  83. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/helper.d.ts.map +1 -0
  84. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts +6 -0
  85. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts.map +1 -0
  86. package/dist/types/src/features/CognitiveCompare/MoreFunctionsPopup.d.ts +2 -0
  87. package/dist/types/src/features/CognitiveCompare/MoreFunctionsPopup.d.ts.map +1 -1
  88. package/dist/types/src/features/CognitiveCompare/components/RHSSectionRow.d.ts.map +1 -1
  89. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
  90. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts +1 -0
  91. package/dist/types/src/features/CognitiveCompare/components/SubSectionAccordion.d.ts.map +1 -1
  92. package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts +2 -1
  93. package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts.map +1 -1
  94. package/dist/types/src/features/CognitiveCompare/components/connectedLines.d.ts +1 -0
  95. package/dist/types/src/features/CognitiveCompare/components/connectedLines.d.ts.map +1 -1
  96. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts +2 -1
  97. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
  98. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts +1 -1
  99. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
  100. package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts +1 -1
  101. package/dist/types/src/features/CognitiveCompare/hooks/useSideBySide.d.ts.map +1 -1
  102. package/dist/types/src/features/PromptemonBlockViewer/PromptemonBlockViewer.d.ts +11 -0
  103. package/dist/types/src/features/PromptemonBlockViewer/PromptemonBlockViewer.d.ts.map +1 -0
  104. package/dist/types/src/features/PromptemonBlockViewer/index.d.ts +3 -0
  105. package/dist/types/src/features/PromptemonBlockViewer/index.d.ts.map +1 -0
  106. package/dist/types/src/features/PromptemonViewer/PromptemonViewer.d.ts +43 -0
  107. package/dist/types/src/features/PromptemonViewer/PromptemonViewer.d.ts.map +1 -0
  108. package/dist/types/src/features/PromptemonViewer/index.d.ts +3 -0
  109. package/dist/types/src/features/PromptemonViewer/index.d.ts.map +1 -0
  110. package/dist/types/src/index.d.ts +4 -0
  111. package/dist/types/src/index.d.ts.map +1 -1
  112. package/package.json +12 -2
@@ -1,2 +1,2 @@
1
- import{useState as t,useRef as e,useCallback as n,useEffect as i}from"react";import{DEVIATION_BADGE_SEPARATOR as r,hasValue as c,getBentArrowPath as o}from"../CognitiveComparehelpers.js";var l=function(l){var u=l.containerRef,a=l.leftContainerRef,d=l.rightContainerRef;l.svgContainerRef;var v=l.pathRefs,s=l.leftHeaderRef,h=l.rightHeaderRef,g=l.proposedSections,f=l.existingSections,p=l.visibleFields,y=l.leftRefs,x=l.rightRefs,m=l.sectionLeftRefs,R=l.sectionRightRefs,C=l.subSectionLeftRefs,b=l.subSectionRightRefs,B=l.lhsBadgeRefs,S=l.rhsBadgeRefs,M=l.sectionRowRefs,L=l.expandedSections,T=l.expandedSubSections,I=l.connectedSections,H=l.isSideBySide,A=l.activeSideBySideSection,E=l.maintainRelativeOrder,D=l.cognitiveMap,k=l.getSectionCompareStyle,Y=l.getSubSectionCompareStyle,w=l.getDeviationStyleByKey,N=l.isArrowVisible,O=l.isAnimatingRef,j=l.isSideBySideRef,F=l.sideBySideCacheRef,P=l.sideBySideLineRef,z=l.activeSideBySideSectionRef,K=l.activeSideBySideRightSectionRef,q=l.connectedLines,V=l.setConnectedLines,G=l.cachedConnectedPositions,J=l.calculateLinesRef,Q=l.resizeTimerRef,U=l.scrollLock,W=l.scrollSyncLocked,X=l.handleResizeRef,Z=l.activeProposed,$=l.existingRule,_=l.analysisData,tt=l.pendingScrollTargetRef,et=l.pendingScrollCallbackRef,nt=l.resolvedComparisonConfig,it=l.getFieldData,rt=t([]),ct=rt[0],ot=rt[1],lt=t(null),ut=lt[0],at=lt[1],dt=t([]),vt=dt[0],st=dt[1],ht=null!=q?q:vt,gt=null!=V?V:st,ft=t({width:0,height:0}),pt=ft[0],yt=ft[1],xt=e(!1),mt=e(!1),Rt=e(!1),Ct=e(null),bt=e([]),Bt=null!=G?G:bt,St=n(function(){var t,e,n,i,l,v,M,N,j,F,P,z,K,q,V,G,J,Q,U,W,X,Z,$;if(!xt.current&&!O.current){xt.current=!0;try{if(!u.current)return;var _=function(t){var e=t.split("-"),n=e[0];if(!L[n]&&!1===E)return!1;if(E&&!L["left-".concat(n)]&&!L["right-".concat(n)]&&!L[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!T[i])return!1;return!0},tt=u.current.getBoundingClientRect();yt({width:tt.width,height:tt.height});var et=[];if(p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;r&&c&&(r.style.height="auto",c.style.height="auto",r.style.minHeight="0px",c.style.minHeight="0px")}),!O.current){for(var nt=0;nt<Math.max(g.length,f.length);nt++){var it=null===(t=m.current[nt])||void 0===t?void 0:t.current,rt=null===(e=R.current[nt])||void 0===e?void 0:e.current;it&&(it.style.height="auto",it.style.minHeight="0px"),rt&&(rt.style.height="auto",rt.style.minHeight="0px")}E||Object.keys(C.current).forEach(function(t){var e,n;if(_(t)){var i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;i&&r&&(i.style.height="auto",r.style.height="auto",i.style.minHeight="0px",r.style.minHeight="0px")}})}var ct={};p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;if(r&&c){var o=r.getBoundingClientRect(),l=c.getBoundingClientRect();ct[i]=Math.max(o.height,l.height)}});var lt={left:{},right:{}},ut={};if(!O.current)if(E){if(H&&null!==A)if("number"==typeof A){var dt=A,vt=g[dt],st=null===(l=m.current[dt])||void 0===l?void 0:l.current;st&&vt&&(vt.refIndexes||[]).forEach(function(t){var e,n=f.findIndex(function(e){return e.selfIndex===t}),i=null===(e=R.current[n])||void 0===e?void 0:e.current;if(i&&(L["left-".concat(dt)]||L["right-".concat(n)])){var r=Math.max(st.getBoundingClientRect().height,i.getBoundingClientRect().height);lt.left[dt]=Math.max(lt.left[dt]||0,r),lt.right[n]=Math.max(lt.right[n]||0,r)}})}else{var ht=A.split(r)[2];if(ht){it=null===(v=C.current[ht])||void 0===v?void 0:v.current,rt=null===(M=b.current[ht])||void 0===M?void 0:M.current;if(it&&rt){ft=Math.max(it.getBoundingClientRect().height,rt.getBoundingClientRect().height);ut[ht]=Math.max(ut[ht]||0,ft)}}}}else{Object.keys(C.current).forEach(function(t){var e,n;if(_(t)){var i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;if(i&&r&&null!==i.offsetParent&&null!==r.offsetParent){var c=i.getBoundingClientRect(),o=r.getBoundingClientRect(),l=Math.max(c.height,o.height);ut[t]=l,i.style.minHeight="".concat(l,"px"),r.style.minHeight="".concat(l,"px")}}});for(nt=0;nt<Math.min(g.length,f.length);nt++){var it=null===(n=m.current[nt])||void 0===n?void 0:n.current,rt=null===(i=R.current[nt])||void 0===i?void 0:i.current;if(it&&rt){var ft=Math.max(it.getBoundingClientRect().height,rt.getBoundingClientRect().height);lt.left[nt]=ft,lt.right[nt]=ft}}}if(p.forEach(function(t){var e,n,i=t.key,r=null===(e=y.current[i])||void 0===e?void 0:e.current,c=null===(n=x.current[i])||void 0===n?void 0:n.current;if(r&&c){var o=ct[i];r.style.minHeight="".concat(o,"px"),c.style.minHeight="".concat(o,"px")}}),O.current||(Object.entries(lt.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=m.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),Object.entries(lt.right).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=R.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),E||Object.keys(ut).forEach(function(t){var e,n,i=null===(e=C.current[t])||void 0===e?void 0:e.current,r=null===(n=b.current[t])||void 0===n?void 0:n.current;if(i&&r&&ut[t]){var c=ut[t];i.style.minHeight="".concat(c,"px"),r.style.minHeight="".concat(c,"px")}})),E)g.forEach(function(t,e){var n;(null===(n=m.current[e])||void 0===n?void 0:n.current)&&(t.refIndexes||[]).forEach(function(t){var n,i,r,c,o,l,u,v,s,h,g=f.findIndex(function(e){return e.selfIndex===t});if(-1!==g){var p=null===(n=B.current[e])||void 0===n?void 0:n.current,y=null===(i=S.current[g])||void 0===i?void 0:i.current;if(p&&y){var x=p.getBoundingClientRect(),m=y.getBoundingClientRect(),R=x.right-tt.left,C=m.left-tt.left,b=x.top+x.height/2-tt.top,M=m.top+m.height/2-tt.top;if(H&&A===e){var L=null!==(c=null===(r=a.current)||void 0===r?void 0:r.getBoundingClientRect().top)&&void 0!==c?c:0,T=null!==(l=null===(o=d.current)||void 0===o?void 0:o.getBoundingClientRect().top)&&void 0!==l?l:0,I=L+(null!==(v=null===(u=a.current)||void 0===u?void 0:u.clientHeight)&&void 0!==v?v:1/0),E=T+(null!==(h=null===(s=d.current)||void 0===s?void 0:s.clientHeight)&&void 0!==h?h:1/0),D=x.top+x.height/2,Y=m.top+m.height/2,w=function(t,e,n){return Math.max(e,Math.min(n,t))};b=w(D,L,I)-tt.top,M=w(Y,T,E)-tt.top}var N=k(e);N&&et.push({id:"line-".concat(e,"-").concat(g),x1:R,y1:b,x2:C,y2:M,style:N,sectionIdx:e,targetRightIdx:g})}}})});else{for(nt=0;nt<Math.min(g.length,f.length);nt++){var pt=null===(N=m.current[nt])||void 0===N?void 0:N.current,mt=null===(j=R.current[nt])||void 0===j?void 0:j.current;if(pt&&mt){var Rt=pt.getBoundingClientRect(),Ct=mt.getBoundingClientRect(),bt=Math.max(Rt.top,Ct.top)+18-tt.top,St=(null===(F=f[nt])||void 0===F?void 0:F.id)||"sec-".concat(nt);(Dt=k(nt))&&et.push({id:St,x1:Rt.right-tt.left,y1:bt,x2:Ct.left-tt.left,y2:bt,style:Dt,sectionIdx:nt,hasCognitive:!!((null===(P=g[nt])||void 0===P?void 0:P.cognitiveData)||(null===(z=f[nt])||void 0===z?void 0:z.cognitiveData)||St&&D[St]),isSubSection:!1})}}Object.keys(C.current).forEach(function(t){var e,n,i,r,o,l;if(_(t)){var u=null===(e=C.current[t])||void 0===e?void 0:e.current,a=null===(n=b.current[t])||void 0===n?void 0:n.current;if(u&&a){for(var d=t.split("-").map(Number),v=g[d[0]],s=f[d[0]],h=1;h<d.length;h++)(null==v?void 0:v.subsections)&&(v=v.subsections[d[h]]),(null==s?void 0:s.subsections)&&(s=s.subsections[d[h]]);var p=!!v&&((null===(i=v.displayTitle)||void 0===i||i)&&c(v.title)),y=!!v&&((null===(r=v.displayContent)||void 0===r||r)&&c(v.content)),x=!!s&&((null===(o=s.displayTitle)||void 0===o||o)&&c(s.title)),m=!!s&&((null===(l=s.displayContent)||void 0===l||l)&&c(s.content));if(p&&y||x&&m){var R=u.getBoundingClientRect(),B=a.getBoundingClientRect(),S=Math.max(R.top,B.top)+16-tt.top,M=Y(t);M&&"Not Defined"!==M.label&&et.push({id:"subsec-".concat(t),x1:R.right-tt.left,y1:S,x2:B.left-tt.left,y2:S,style:M,sectionIdx:d[0],isSubSection:!0,subSectionKeyPath:t,hasCognitive:!(!(null==v?void 0:v.cognitiveData)&&!(null==s?void 0:s.cognitiveData))})}}}})}if(H&&"string"==typeof A&&A.includes(r)){var Mt=A.split(r),Lt=Mt[0],Tt=Mt[1],It=Mt[2],Ht=(Mt[3],"".concat(Lt).concat(r).concat(Tt)),At=null===(K=B.current[Ht])||void 0===K?void 0:K.current,Et=null===(q=S.current[Ht])||void 0===q?void 0:q.current;if(At&&Et){var Dt,kt=At.getBoundingClientRect(),Yt=Et.getBoundingClientRect(),wt=kt.right-tt.left,Nt=Yt.left-tt.left,Ot=kt.top+kt.height/2-tt.top,jt=Yt.top+Yt.height/2-tt.top;if(E){var Ft=null!==(G=null===(V=a.current)||void 0===V?void 0:V.getBoundingClientRect().top)&&void 0!==G?G:0,Pt=null!==(Q=null===(J=d.current)||void 0===J?void 0:J.getBoundingClientRect().top)&&void 0!==Q?Q:0,zt=Ft+(null!==(W=null===(U=a.current)||void 0===U?void 0:U.clientHeight)&&void 0!==W?W:1/0),Kt=Pt+(null!==(Z=null===(X=d.current)||void 0===X?void 0:X.clientHeight)&&void 0!==Z?Z:1/0),qt=function(t,e,n){return Math.max(e,Math.min(n,t))};Ot=qt(kt.top+kt.height/2,Ft,zt)-tt.top,jt=qt(Yt.top+Yt.height/2,Pt,Kt)-tt.top}(Dt=null!==($=w(Lt,Tt))&&void 0!==$?$:Y(It))&&et.push({id:"line-subsec-".concat(Ht),x1:wt,y1:Ot,x2:Nt,y2:jt,style:Dt,sectionIdx:Number(It.split("-")[0]),isSubSection:!0,subSectionKeyPath:A})}}if(ot(et),s.current&&h.current){var Vt=s.current.getBoundingClientRect(),Gt=h.current.getBoundingClientRect(),Jt=(Vt.top+Vt.height/2-tt.top+Gt.top+Gt.height/2-tt.top)/2;at({x1:Vt.right-tt.left,x2:Gt.left-tt.left,y:Jt})}else at(null);if(I.size>0){var Qt=[],Ut=a.current,Wt=d.current;if(Ut&&Wt){var Xt=[],Zt=Ut.getBoundingClientRect().top,$t=Wt.getBoundingClientRect().top,_t=Zt+Ut.clientHeight,te=$t+Wt.clientHeight,ee=Ut.scrollTop,ne=Wt.scrollTop,ie=tt.top,re=function(t,e,n){return Math.max(e,Math.min(n,t))};I.forEach(function(t){var e,n,i,c,l,u;if("string"==typeof t&&t.includes(r)){var a=t.split(r),d=a[0],v=a[1],s=a[2],h=(a[3],"".concat(d).concat(r).concat(v)),p=null===(e=B.current[h])||void 0===e?void 0:e.current,y=null===(n=S.current[h])||void 0===n?void 0:n.current;if(!p||!y)return;var x=p.getBoundingClientRect(),m=y.getBoundingClientRect(),R=null!==(i=w(d,v))&&void 0!==i?i:Y(s),C=(q=x.right-tt.left)+.5*((V=m.left-tt.left-0)-q),b=x.top+x.height/2,M=m.top+m.height/2,L=b-Zt+ee,T=M-$t+ne,I="conn-subsec-".concat(h);Xt.push({lhsScrollY:L,rhsScrollY:T,x1:q,x2:V,containerTop:ie,leftIdx:t,rhsArrayIdx:t,styleColor:(null==R?void 0:R.badgeBorder)||"#6366F1",styleId:I});var H=re(b,Zt,_t),A=re(M,$t,te),D=H-ie,N=A-ie,O=M>=$t-4&&M<=te+4,j="";j=(G=b>=Zt-4&&b<=_t+4)&&O?o(q,D,V,N):G&&!O?"M ".concat(q,",").concat(D," L ").concat(C,",").concat(D," L ").concat(C,",").concat(N):!G&&O?"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N," L ").concat(V,",").concat(N):"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N),Qt.push({id:I,pathD:j,style:R,leftIdx:t,rhsArrayIdx:t,x1:q,x2:V,y1:D,y2:N})}else if(E){var F=t,P=g[F];if(!(null===(u=null==P?void 0:P.refIndexes)||void 0===u?void 0:u.length))return;P.refIndexes.forEach(function(t){var e,n,i=f.findIndex(function(e){return e.selfIndex===t});if(-1!==i){var r=null===(e=B.current[F])||void 0===e?void 0:e.current,c=null===(n=S.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=r.getBoundingClientRect(),u=c.getBoundingClientRect(),a=k(F),d=l.right-tt.left,v=u.left-tt.left-0,s=d+.5*(v-d),h=l.top+l.height/2,g=u.top+u.height/2,p=h-Zt+ee,y=g-$t+ne,x="conn-".concat(F,"-").concat(i);Xt.push({lhsScrollY:p,rhsScrollY:y,x1:d,x2:v,containerTop:ie,leftIdx:F,rhsArrayIdx:i,styleColor:(null==a?void 0:a.badgeBorder)||"#6366F1",styleId:x});var m=re(h,Zt,_t),R=re(g,$t,te),C=m-ie,b=R-ie,M=h>=Zt-4&&h<=_t+4,L=g>=$t-4&&g<=te+4,T="";T=M&&L?o(d,C,v,b):M&&!L?"M ".concat(d,",").concat(C," L ").concat(s,",").concat(C," L ").concat(s,",").concat(b):!M&&L?"M ".concat(s,",").concat(C," L ").concat(s,",").concat(b," L ").concat(v,",").concat(b):"M ".concat(s,",").concat(C," L ").concat(s,",").concat(b),Qt.push({id:x,pathD:T,style:a,leftIdx:F,rhsArrayIdx:i,x1:d,x2:v,y1:C,y2:b})}}})}else{var z=t,K=z;p=null===(c=B.current[z])||void 0===c?void 0:c.current,y=null===(l=S.current[K])||void 0===l?void 0:l.current;if(!p||!y)return;var q,V;x=p.getBoundingClientRect(),m=y.getBoundingClientRect(),R=k(z),C=(q=x.right-tt.left)+.5*((V=m.left-tt.left-0)-q),b=x.top+x.height/2,M=m.top+m.height/2,L=b-Zt+ee,T=M-$t+ne,I="conn-".concat(z,"-").concat(K);Xt.push({lhsScrollY:L,rhsScrollY:T,x1:q,x2:V,containerTop:ie,leftIdx:z,rhsArrayIdx:K,styleColor:(null==R?void 0:R.badgeBorder)||"#6366F1",styleId:I});var G;H=re(b,Zt,_t),A=re(M,$t,te),D=H-ie,N=A-ie,O=M>=$t-4&&M<=te+4,j="";j=(G=b>=Zt-4&&b<=_t+4)&&O?o(q,D,V,N):G&&!O?"M ".concat(q,",").concat(D," L ").concat(C,",").concat(D," L ").concat(C,",").concat(N):!G&&O?"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N," L ").concat(V,",").concat(N):"M ".concat(C,",").concat(D," L ").concat(C,",").concat(N),Qt.push({id:I,pathD:j,style:R,leftIdx:z,rhsArrayIdx:K,x1:q,x2:V,y1:D,y2:N})}}),Bt.current=Xt}gt(Qt)}else gt([]),Bt.current=[]}catch(t){console.error("Line render safe fail: ",t)}finally{xt.current=!1}}},[p,g,f,D,nt,it,k,w,E,H,A,I,L,T]),Mt=n(function(){var t,e,n,i,r,c,l,s,h,g,f,p,y,x,m=Bt.current;if(m.length&&!O.current){var R=null!==(e=null===(t=a.current)||void 0===t?void 0:t.scrollTop)&&void 0!==e?e:0,C=null!==(i=null===(n=d.current)||void 0===n?void 0:n.scrollTop)&&void 0!==i?i:0,b=null!==(c=null===(r=a.current)||void 0===r?void 0:r.clientHeight)&&void 0!==c?c:1/0,B=null!==(s=null===(l=d.current)||void 0===l?void 0:l.clientHeight)&&void 0!==s?s:1/0,S=null!==(g=null===(h=a.current)||void 0===h?void 0:h.getBoundingClientRect().top)&&void 0!==g?g:0,M=null!==(p=null===(f=d.current)||void 0===f?void 0:f.getBoundingClientRect().top)&&void 0!==p?p:0,L=S+b,T=M+B,I=null!==(x=null===(y=u.current)||void 0===y?void 0:y.getBoundingClientRect().top)&&void 0!==x?x:0,H=function(t,e,n){return Math.max(e,Math.min(n,t))};m.forEach(function(t){var e=t.lhsScrollY-R+S,n=t.rhsScrollY-C+M,i=v.current[t.styleId+"-stroke"],r=v.current[t.styleId+"-bg"],c=v.current[t.styleId+"-btn"];if(i||r){var l,u=H(e,S,L),a=H(n,M,T),d=u-I,s=a-I,h=e>=S-4&&e<=L+4,g=n>=M-4&&n<=T+4,f=t.x1+.5*(t.x2-t.x1);l=h&&g?o(t.x1,d,t.x2,s):h&&!g?"M ".concat(t.x1,",").concat(d," L ").concat(f,",").concat(d," L ").concat(f,",").concat(s):!h&&g?"M ".concat(f,",").concat(d," L ").concat(f,",").concat(s," L ").concat(t.x2,",").concat(s):"M ".concat(f,",").concat(d," L ").concat(f,",").concat(s),i&&(i.setAttribute("visibility","visible"),i.setAttribute("d",l)),r&&(r.setAttribute("visibility","visible"),r.setAttribute("d",l)),c&&(h?(c.setAttribute("visibility","visible"),c.setAttribute("y",String(d-12))):c.setAttribute("visibility","hidden"))}})}},[]),Lt=n(function(){Bt.current.length>0&&!O.current||(null!==Ct.current&&clearTimeout(Ct.current),Ct.current=setTimeout(function(){J.current(),Ct.current=null},50))},[]),Tt=n(function(t){if(null!==tt.current&&et.current&&Math.abs(t.currentTarget.scrollTop-tt.current)<=2){var e=et.current;tt.current=null,et.current=null,e()}if(!Rt.current&&!U.current){if(E&&W&&(j.current||I.size>0)){var n=t.currentTarget,i=a.current,c=d.current,o=n===i?c:n===c?i:null;if(n&&o){var l=function(){var t,e,n,i,c,o,l,u,a,d,v,s=z.current,h=K.current;if(null===s)return{leftAnchor:null,rightAnchor:null};if("string"==typeof s&&s.includes(r)){var g=s.split(r),f="".concat(g[0]).concat(r).concat(g[1]);return{leftAnchor:(null===(t=B.current[f])||void 0===t?void 0:t.current)||(null===(e=C.current[g[2]])||void 0===e?void 0:e.current)||(null===(n=m.current[Number(g[2])])||void 0===n?void 0:n.current)||null,rightAnchor:(null===(i=S.current[f])||void 0===i?void 0:i.current)||(null===(c=b.current[g[3]])||void 0===c?void 0:c.current)||(null===(o=R.current[Number(g[3])])||void 0===o?void 0:o.current)||null}}var p=Number(s),y=null!==h?Number(h):p;return{leftAnchor:(null===(l=B.current[p])||void 0===l?void 0:l.current)||(null===(u=M.current[p])||void 0===u?void 0:u.current)||(null===(a=m.current[p])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=S.current[y])||void 0===d?void 0:d.current)||(null===(v=R.current[y])||void 0===v?void 0:v.current)||null}}(),v=l.leftAnchor,s=l.rightAnchor,h=n===i?v:s,g=n===i?s:v,f=null;if(h&&g){var p=h.getBoundingClientRect(),y=g.getBoundingClientRect(),x=o.getBoundingClientRect(),L=p.top+p.height/2;f=y.top-x.top+o.scrollTop+y.height/2-(L-x.top)}else{var T=Math.max(0,n.scrollHeight-n.clientHeight),H=Math.max(0,o.scrollHeight-o.clientHeight);f=T>0?n.scrollTop/T*H:n.scrollTop}var A=Math.max(0,o.scrollHeight-o.clientHeight);f=Math.max(0,Math.min(f,A)),Math.abs(o.scrollTop-f)>1&&(Rt.current=!0,o.scrollTop=f,requestAnimationFrame(function(){Rt.current=!1}))}}E||Lt(),mt.current||(mt.current=!0,requestAnimationFrame(function(){var t,e,n,i,c,o,l;if(j.current){var v=a.current,s=d.current;if(v&&s&&P.current){if(!F.current){var h=z.current,g=void 0;if("string"==typeof h&&h.includes(r)){var f=h.split(r),p="".concat(f[0]).concat(r).concat(f[1]);g=null===(t=B.current[p])||void 0===t?void 0:t.current}else g=null===(e=B.current[h])||void 0===e?void 0:e.current;if(g){var y=g.getBoundingClientRect();F.current={badgeScreenY:y.top+y.height/2,initialScrollTop:v.scrollTop,leftTop:v.getBoundingClientRect().top,leftBottom:v.getBoundingClientRect().top+v.clientHeight,cTop:null!==(i=null===(n=u.current)||void 0===n?void 0:n.getBoundingClientRect().top)&&void 0!==i?i:0}}}if(F.current){var x=F.current,m=v.scrollTop-x.initialScrollTop,R=x.badgeScreenY-m,C=((c=R,o=x.leftTop,l=x.leftBottom,Math.max(o,Math.min(l,c)))-x.cTop).toString(),b=R>=x.leftTop-4&&R<=x.leftBottom+4;P.current.setAttribute("y1",C),P.current.setAttribute("y2",C),P.current.setAttribute("visibility",b?"visible":"hidden")}}}Bt.current.length>0&&Mt(),mt.current=!1}))}},[Mt,E,W,I,Lt]);return i(function(){J.current=St},[St]),i(function(){var t=setTimeout(Lt,250),e=function(){return X.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==Ct.current&&clearTimeout(Ct.current),null!==Q.current&&clearTimeout(Q.current),window.removeEventListener("resize",e)}},[Z,$,_,p,L,T,g,f,nt,Lt,H,A,N,I]),{lines:ct,setLines:ot,overallConnector:ut,setOverallConnector:at,connectedLines:ht,setConnectedLines:gt,svgDimensions:pt,cachedConnectedPositions:Bt,calculateLines:St,calculateLinesRef:J,calculateLinesDebounced:Lt,handleColumnScroll:Tt}};export{l as useLinesCalculator};
1
+ import{useState as t,useRef as e,useCallback as n,useEffect as i}from"react";import{DEVIATION_BADGE_SEPARATOR as r}from"../CognitiveComparehelpers.js";var c=function(c){var l=c.containerRef,o=c.leftContainerRef,u=c.rightContainerRef;c.svgContainerRef;var a=c.pathRefs,d=c.leftHeaderRef,s=c.rightHeaderRef,v=c.proposedSections,h=c.existingSections,g=c.visibleFields,f=c.leftRefs,p=c.rightRefs,b=c.sectionLeftRefs,y=c.sectionRightRefs,x=c.subSectionLeftRefs,m=c.subSectionRightRefs,R=c.lhsBadgeRefs,C=c.rhsBadgeRefs,A=c.sectionRowRefs,B=c.expandedSections,S=c.expandedSubSections,M=c.connectedSections,T=c.isSideBySide,I=c.activeSideBySideSection,L=c.maintainRelativeOrder,F=c.isGuidelineMode,H=c.cognitiveMap,w=c.getSectionCompareStyle,k=c.getSubSectionCompareStyle,E=c.getDeviationStyleByKey,N=c.isArrowVisible,Y=c.isAnimatingRef,D=c.isSideBySideRef,j=c.sideBySideCacheRef,O=c.sideBySideLineRef,z=c.activeSideBySideSectionRef,P=c.activeSideBySideRightSectionRef,Q=c.connectedLines,X=c.setConnectedLines,q=c.cachedConnectedPositions,G=c.calculateLinesRef,K=c.resizeTimerRef,V=c.scrollLock,J=c.scrollSyncLocked,U=c.handleResizeRef,W=c.activeProposed,Z=c.existingRule,$=c.analysisData,_=c.pendingScrollTargetRef,tt=c.pendingScrollCallbackRef,et=c.resolvedComparisonConfig,nt=c.getFieldData,it=t([]),rt=it[0],ct=it[1],lt=t(null),ot=lt[0],ut=lt[1],at=t([]),dt=at[0],st=at[1],vt=null!=Q?Q:dt,ht=null!=X?X:st,gt=t({width:0,height:0}),ft=gt[0],pt=gt[1],bt=e(!1),yt=e(!1),xt=e(!1),mt=e(null),Rt=e([]),Ct=null!=q?q:Rt,At=function(t,e,n,i,r,c,l){if(Math.abs(i-e)<=1)return c&&l?"M ".concat(t,",").concat(e," L ").concat(n,",").concat(i):c&&!l?"M ".concat(t,",").concat(e," L ").concat(r,",").concat(e):!c&&l?"M ".concat(r,",").concat(e," L ").concat(n,",").concat(i):"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i);var o=Math.min(15,Math.abs(r-t),Math.abs(i-e)/2),u=Math.min(15,Math.abs(n-r),Math.abs(i-e)/2),a=i>e?o:-o,d=i>e?u:-u,s=n>r?u:-u;return c&&l?"M ".concat(t,",").concat(e," L ").concat(r-o,",").concat(e," Q ").concat(r,",").concat(e," ").concat(r,",").concat(e+a," L ").concat(r,",").concat(i-d," Q ").concat(r,",").concat(i," ").concat(r+s,",").concat(i," L ").concat(n,",").concat(i):c&&!l?"M ".concat(t,",").concat(e," L ").concat(r-o,",").concat(e," Q ").concat(r,",").concat(e," ").concat(r,",").concat(e+a," L ").concat(r,",").concat(i):!c&&l?"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i-d," Q ").concat(r,",").concat(i," ").concat(r+s,",").concat(i," L ").concat(n,",").concat(i):"M ".concat(r,",").concat(e," L ").concat(r,",").concat(i)},Bt=n(function(){var t,e,n,i,c,a,A,N,D,j,O,z,P,Q,X,q,G,K;if(!bt.current&&!Y.current){bt.current=!0;try{if(!l.current)return;var V=function(t){var e=t.split("-"),n=e[0];if(!B[n]&&!1===L)return!1;if(L&&!B["left-".concat(n)]&&!B["right-".concat(n)]&&!B[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!S[i])return!1;return!0},J=l.current.getBoundingClientRect();pt({width:J.width,height:J.height});var U=[];if(g.forEach(function(t){var e,n,i=t.key,r=null===(e=f.current[i])||void 0===e?void 0:e.current,c=null===(n=p.current[i])||void 0===n?void 0:n.current;r&&c&&(r.style.height="auto",c.style.height="auto",r.style.minHeight="0px",c.style.minHeight="0px")}),!Y.current){for(var W=0;W<Math.max(v.length,h.length);W++){var Z=null===(t=b.current[W])||void 0===t?void 0:t.current,$=null===(e=y.current[W])||void 0===e?void 0:e.current;Z&&(Z.style.height="auto",Z.style.minHeight="0px"),$&&($.style.height="auto",$.style.minHeight="0px")}L||Object.keys(x.current).forEach(function(t){var e,n;if(V(t)){var i=null===(e=x.current[t])||void 0===e?void 0:e.current,r=null===(n=m.current[t])||void 0===n?void 0:n.current;i&&r&&(i.style.height="auto",r.style.height="auto",i.style.minHeight="0px",r.style.minHeight="0px")}})}var _={};g.forEach(function(t){var e,n,i=t.key,r=null===(e=f.current[i])||void 0===e?void 0:e.current,c=null===(n=p.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=r.getBoundingClientRect(),o=c.getBoundingClientRect();_[i]=Math.max(l.height,o.height)}});var tt={left:{},right:{}},et={};if(!Y.current)if(L){if(T&&null!==I)if("number"==typeof I){var nt=I,it=v[nt],rt=null===(c=b.current[nt])||void 0===c?void 0:c.current;rt&&it&&(it.refIndexes||[]).forEach(function(t){var e,n=h.findIndex(function(e){return e.selfIndex===t}),i=null===(e=y.current[n])||void 0===e?void 0:e.current;if(i&&(B["left-".concat(nt)]||B["right-".concat(n)])){var r=Math.max(rt.getBoundingClientRect().height,i.getBoundingClientRect().height);tt.left[nt]=Math.max(tt.left[nt]||0,r),tt.right[n]=Math.max(tt.right[n]||0,r)}})}else{var lt=I.split(r)[2];if(lt){Z=null===(a=x.current[lt])||void 0===a?void 0:a.current,$=null===(A=m.current[lt])||void 0===A?void 0:A.current;if(Z&&$){ot=Math.max(Z.getBoundingClientRect().height,$.getBoundingClientRect().height);et[lt]=Math.max(et[lt]||0,ot)}}}}else{Object.keys(x.current).forEach(function(t){var e,n;if(V(t)){var i=null===(e=x.current[t])||void 0===e?void 0:e.current,r=null===(n=m.current[t])||void 0===n?void 0:n.current;if(i&&r&&null!==i.offsetParent&&null!==r.offsetParent){var c=i.getBoundingClientRect(),l=r.getBoundingClientRect(),o=Math.max(c.height,l.height);et[t]=o,i.style.minHeight="".concat(o,"px"),r.style.minHeight="".concat(o,"px")}}});for(W=0;W<Math.min(v.length,h.length);W++){var Z=null===(n=b.current[W])||void 0===n?void 0:n.current,$=null===(i=y.current[W])||void 0===i?void 0:i.current;if(Z&&$){var ot=Math.max(Z.getBoundingClientRect().height,$.getBoundingClientRect().height);tt.left[W]=ot,tt.right[W]=ot}}}if(g.forEach(function(t){var e,n,i=t.key,r=null===(e=f.current[i])||void 0===e?void 0:e.current,c=null===(n=p.current[i])||void 0===n?void 0:n.current;if(r&&c){var l=_[i];r.style.minHeight="".concat(l,"px"),c.style.minHeight="".concat(l,"px")}}),Y.current||(Object.entries(tt.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=b.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),Object.entries(tt.right).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=y.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),L||Object.keys(et).forEach(function(t){var e,n,i=null===(e=x.current[t])||void 0===e?void 0:e.current,r=null===(n=m.current[t])||void 0===n?void 0:n.current;if(i&&r&&et[t]){var c=et[t];i.style.minHeight="".concat(c,"px"),r.style.minHeight="".concat(c,"px")}})),!F){v.forEach(function(t,e){var n,i=null===(n=b.current[e])||void 0===n?void 0:n.current;if(i){var r=function(t,e){var n=(t.refIndexes||[]).map(function(t){return h.findIndex(function(e){return e.selfIndex===t})}).filter(function(t){return-1!==t});return!n.length&&h[e]?[e]:Array.from(new Set(n))}(t,e);r.forEach(function(n){var r,c,l,a,d,s,v,g,f,p,b=null===(r=y.current[n])||void 0===r?void 0:r.current;if(b){var x=i.getBoundingClientRect(),m=b.getBoundingClientRect(),R=x.right-J.left,C=m.left-J.left,A=x.top+18-J.top,B=m.top+18-J.top;if(L&&T&&I===e){var S=null!==(l=null===(c=o.current)||void 0===c?void 0:c.getBoundingClientRect().top)&&void 0!==l?l:0,M=null!==(d=null===(a=u.current)||void 0===a?void 0:a.getBoundingClientRect().top)&&void 0!==d?d:0,F=S+(null!==(v=null===(s=o.current)||void 0===s?void 0:s.clientHeight)&&void 0!==v?v:1/0),k=M+(null!==(f=null===(g=u.current)||void 0===g?void 0:g.clientHeight)&&void 0!==f?f:1/0),E=function(t,e,n){return Math.max(e,Math.min(n,t))};A=E(x.top+18,S,F)-J.top,B=E(m.top+18,M,k)-J.top}var N=w(e);N&&U.push({id:"line-".concat(e,"-").concat(n),x1:R,y1:A,x2:C,y2:B,style:N,sectionIdx:e,targetRightIdx:n,isSubSection:!1,hasCognitive:!!((null==t?void 0:t.cognitiveData)||(null===(p=h[n])||void 0===p?void 0:p.cognitiveData)||(null==t?void 0:t.nodeId)&&H[t.nodeId])})}})}})}if(!F&&T&&"string"==typeof I&&I.includes(r)){var at=I.split(r),dt=at[0],st=at[1],vt=at[2],gt=(at[3],"".concat(dt).concat(r).concat(st)),ft=null===(N=R.current[gt])||void 0===N?void 0:N.current,yt=null===(D=C.current[gt])||void 0===D?void 0:D.current;if(ft&&yt){var xt=ft.getBoundingClientRect(),mt=yt.getBoundingClientRect(),Rt=xt.right-J.left,Bt=mt.left-J.left,Mt=xt.top+xt.height/2-J.top,Tt=mt.top+mt.height/2-J.top;if(L){var It=null!==(O=null===(j=o.current)||void 0===j?void 0:j.getBoundingClientRect().top)&&void 0!==O?O:0,Lt=null!==(P=null===(z=u.current)||void 0===z?void 0:z.getBoundingClientRect().top)&&void 0!==P?P:0,Ft=It+(null!==(X=null===(Q=o.current)||void 0===Q?void 0:Q.clientHeight)&&void 0!==X?X:1/0),Ht=Lt+(null!==(G=null===(q=u.current)||void 0===q?void 0:q.clientHeight)&&void 0!==G?G:1/0),wt=function(t,e,n){return Math.max(e,Math.min(n,t))};Mt=wt(xt.top+xt.height/2,It,Ft)-J.top,Tt=wt(mt.top+mt.height/2,Lt,Ht)-J.top}var kt=null!==(K=E(dt,st))&&void 0!==K?K:k(vt);kt&&U.push({id:"line-subsec-".concat(gt),x1:Rt,y1:Mt,x2:Bt,y2:Tt,style:kt,sectionIdx:Number(vt.split("-")[0]),isSubSection:!0,subSectionKeyPath:I})}}if(ct(U),d.current&&s.current){var Et=d.current.getBoundingClientRect(),Nt=s.current.getBoundingClientRect(),Yt=(Et.top+Et.height/2-J.top+Nt.top+Nt.height/2-J.top)/2;ut({x1:Et.right-J.left,x2:Nt.left-J.left,y:Yt})}else ut(null);if(M.size>0){var Dt=[],jt=o.current,Ot=u.current;if(jt&&Ot){var zt=[],Pt=jt.getBoundingClientRect().top,Qt=Ot.getBoundingClientRect().top,Xt=Pt+jt.clientHeight,qt=Qt+Ot.clientHeight,Gt=jt.scrollTop,Kt=Ot.scrollTop,Vt=J.top,Jt=function(t,e,n){return Math.max(e,Math.min(n,t))};M.forEach(function(t){var e,n,i,c,l,o,u,a,d;if(F){var s=null,g=null,f=null;if("string"==typeof t&&t.includes(r)){var p=t.split(r),b=p[0],y=p[1],x=p[2],m="".concat(b).concat(r).concat(y);s=null===(e=R.current[m])||void 0===e?void 0:e.current,f=null!==(n=E(b,y))&&void 0!==n?n:k(x),g=Number((null==x?void 0:x.split("-")[0])||0)}else g=Number(t),s=null===(i=R.current[g])||void 0===i?void 0:i.current,f=w(g);if(!s)return;var A=document.querySelectorAll('[id^="guideline-target-"]');A.forEach(function(e,n){var i=s.getBoundingClientRect(),c=e.getBoundingClientRect(),l=i.right-J.left,o=c.left-J.left-0,u=l+75,a=i.top+i.height/2,d=c.top+c.height/2,v=a-Pt+Gt,h=d-Qt+Kt,g="conn-guide-".concat(t,"-").concat(n),p="";"string"==typeof t&&t.includes(r)?p=(t.split(r)[2]||"").split("-").map(function(t){return Number(t)+1}).join("."):p=String(Number(t)+1);var b=String.fromCharCode(97+n),y=1===A.length?null:"".concat(p,"(").concat(b,")");zt.push({lhsScrollY:v,rhsScrollY:h,x1:l,x2:o,containerTop:Vt,leftIdx:t,rhsArrayIdx:n,styleColor:(null==f?void 0:f.badgeBorder)||"#6366F1",styleBg:(null==f?void 0:f.badgeBg)||"#FFFFFF",styleText:(null==f?void 0:f.badgeText)||"#A16207",styleId:g,centerX:u});var x=Jt(a,Pt,Xt),m=Jt(d,Qt,qt),R=x-Vt,C=m-Vt,B=At(l,R,o,C,u,a>=Pt-4&&a<=Xt+4,d>=Qt-4&&d<=qt+4);Dt.push({id:g,pathD:B,style:f,leftIdx:t,rhsArrayIdx:n,x1:l,x2:o,y1:R,y2:C,centerX:u,matchLabel:y,isGuideline:!0})})}else if("string"==typeof t&&t.includes(r)){var B=t.split(r),S=(b=B[0],y=B[1],x=B[2],B[3],m="".concat(b).concat(r).concat(y),null===(c=R.current[m])||void 0===c?void 0:c.current),M=null===(l=C.current[m])||void 0===l?void 0:l.current;if(!S||!M)return;var T=S.getBoundingClientRect(),I=M.getBoundingClientRect(),H=null!==(o=E(b,y))&&void 0!==o?o:k(x),N=T.right-J.left,Y=I.left-J.left-0,D=N+75,j=T.top+T.height/2,O=I.top+I.height/2,z=j-Pt+Gt,P=O-Qt+Kt,Q="conn-subsec-".concat(m),X=((x||"").split("-").map(function(t){return Number(t)+1}).join("."),null);zt.push({lhsScrollY:z,rhsScrollY:P,x1:N,x2:Y,containerTop:Vt,leftIdx:t,rhsArrayIdx:t,styleColor:(null==H?void 0:H.badgeBorder)||"#6366F1",styleBg:(null==H?void 0:H.badgeBg)||"#FFFFFF",styleText:(null==H?void 0:H.badgeText)||"#A16207",styleId:Q,centerX:D});var q=Jt(j,Pt,Xt),G=Jt(O,Qt,qt),K=At(N,$=q-Vt,Y,_=G-Vt,D,j>=Pt-4&&j<=Xt+4,O>=Qt-4&&O<=qt+4);Dt.push({id:Q,pathD:K,style:H,leftIdx:t,rhsArrayIdx:t,x1:N,x2:Y,y1:$,y2:_,matchLabel:X})}else if(L){var V=t,U=v[V];if(!(null===(d=null==U?void 0:U.refIndexes)||void 0===d?void 0:d.length))return;U.refIndexes.forEach(function(e,n){var i,r,c=h.findIndex(function(t){return t.selfIndex===e});if(-1!==c){var l=null===(i=R.current[V])||void 0===i?void 0:i.current,o=null===(r=C.current[c])||void 0===r?void 0:r.current;if(l&&o){var u=l.getBoundingClientRect(),a=o.getBoundingClientRect(),d=w(V),s=u.right-J.left,v=a.left-J.left-0,g=s+75,f=u.top+u.height/2,p=a.top+a.height/2,b=f-Pt+Gt,y=p-Qt+Kt,x="conn-".concat(V,"-").concat(c),m=String(Number(t)+1),A=String.fromCharCode(97+n),B=1===U.refIndexes.length?null:"".concat(m,"(").concat(A,")");zt.push({lhsScrollY:b,rhsScrollY:y,x1:s,x2:v,containerTop:Vt,leftIdx:V,rhsArrayIdx:c,styleColor:(null==d?void 0:d.badgeBorder)||"#6366F1",styleBg:(null==d?void 0:d.badgeBg)||"#FFFFFF",styleText:(null==d?void 0:d.badgeText)||"#A16207",styleId:x,centerX:g});var S=Jt(f,Pt,Xt),M=Jt(p,Qt,qt),T=S-Vt,I=M-Vt,L=At(s,T,v,I,g,f>=Pt-4&&f<=Xt+4,p>=Qt-4&&p<=qt+4);Dt.push({id:x,pathD:L,style:d,leftIdx:V,rhsArrayIdx:c,x1:s,x2:v,y1:T,y2:I,matchLabel:B})}}})}else{var W=t,Z=W;S=null===(u=R.current[W])||void 0===u?void 0:u.current,M=null===(a=C.current[Z])||void 0===a?void 0:a.current;if(!S||!M)return;T=S.getBoundingClientRect(),I=M.getBoundingClientRect(),H=w(W),N=T.right-J.left,Y=I.left-J.left-0,D=N+75,j=T.top+T.height/2,O=I.top+I.height/2,z=j-Pt+Gt,P=O-Qt+Kt,Q="conn-".concat(W,"-").concat(Z),String(Number(t)+1),X=null;zt.push({lhsScrollY:z,rhsScrollY:P,x1:N,x2:Y,containerTop:Vt,leftIdx:W,rhsArrayIdx:Z,styleColor:(null==H?void 0:H.badgeBorder)||"#6366F1",styleBg:(null==H?void 0:H.badgeBg)||"#FFFFFF",styleText:(null==H?void 0:H.badgeText)||"#A16207",styleId:Q,centerX:D});var $,_;q=Jt(j,Pt,Xt),G=Jt(O,Qt,qt),K=At(N,$=q-Vt,Y,_=G-Vt,D,j>=Pt-4&&j<=Xt+4,O>=Qt-4&&O<=qt+4);Dt.push({id:Q,pathD:K,style:H,leftIdx:W,rhsArrayIdx:Z,x1:N,x2:Y,y1:$,y2:_,matchLabel:X})}}),Ct.current=zt}ht(Dt),setTimeout(function(){return St()},10)}else ht([]),Ct.current=[],setTimeout(function(){return St()},10)}catch(t){console.error("Line render safe fail: ",t)}finally{bt.current=!1}}},[g,v,h,H,et,nt,w,E,L,T,I,M,B,S,F]),St=n(function(){var t,e,n,i,r,c,d,s,v,h,g,f,p,b,y,x,m,R,C,A=Ct.current;if(!A.length)return null===(t=a.current["guideline-up-stroke"])||void 0===t||t.setAttribute("visibility","hidden"),null===(e=a.current["guideline-up-badge"])||void 0===e||e.setAttribute("visibility","hidden"),null===(n=a.current["guideline-down-stroke"])||void 0===n||n.setAttribute("visibility","hidden"),void(null===(i=a.current["guideline-down-badge"])||void 0===i||i.setAttribute("visibility","hidden"));if(!Y.current){var B=null!==(c=null===(r=o.current)||void 0===r?void 0:r.scrollTop)&&void 0!==c?c:0,S=null!==(s=null===(d=u.current)||void 0===d?void 0:d.scrollTop)&&void 0!==s?s:0,M=null!==(h=null===(v=o.current)||void 0===v?void 0:v.clientHeight)&&void 0!==h?h:1/0,T=null!==(f=null===(g=u.current)||void 0===g?void 0:g.clientHeight)&&void 0!==f?f:1/0,I=null!==(b=null===(p=o.current)||void 0===p?void 0:p.getBoundingClientRect().top)&&void 0!==b?b:0,L=null!==(x=null===(y=u.current)||void 0===y?void 0:y.getBoundingClientRect().top)&&void 0!==x?x:0,F=I+M,H=L+T,w=null===(m=l.current)||void 0===m?void 0:m.getBoundingClientRect(),k=null!==(R=null==w?void 0:w.top)&&void 0!==R?R:0,E=null!==(C=null==w?void 0:w.height)&&void 0!==C?C:1/0,N=function(t,e,n){return Math.max(e,Math.min(n,t))},D=0,j=0,O=0,z=0,P="#6366F1",Q="#A16207",X=!1,q=0;if(A.forEach(function(t){var e=t.lhsScrollY-B+I,n=t.rhsScrollY-S+L,i=a.current[t.styleId+"-stroke"],r=a.current[t.styleId+"-bg"],c=a.current[t.styleId+"-btn"],l=a.current[t.styleId+"-number"];if(i||r){var o=N(e,I,F),u=N(n,L,H),d=o-k,s=u-k,v=e>=I-4&&e<=F+4,h=n>=L-4&&n<=H+4,g=!0;X=!0;var f=t.centerX||t.x1+75;0===O&&(O=t.x1,z=d,q=f,P=t.styleColor,t.styleBg,Q=t.styleText||"#A16207"),n<L-4?(D++,g=!1):n>H+4&&(j++,g=!1);var p=At(t.x1,d,t.x2,s,q,v,h);i&&(g&&p?(i.setAttribute("visibility","visible"),i.setAttribute("d",p)):i.setAttribute("visibility","hidden")),r&&(g&&p?(r.setAttribute("visibility","visible"),r.setAttribute("d",p)):r.setAttribute("visibility","hidden")),c&&(v&&g?(c.setAttribute("visibility","visible"),c.setAttribute("y",String(d-12))):c.setAttribute("visibility","hidden")),l&&(v&&g?(l.setAttribute("visibility","visible"),l.setAttribute("transform","translate(".concat(t.x2-42,", ").concat(s,")"))):l.setAttribute("visibility","hidden"))}}),X&&q>0){var G=a.current["guideline-up-stroke"],K=a.current["guideline-up-badge"],V=a.current["guideline-up-arrow"],J=a.current["guideline-up-text"],U=a.current["guideline-up-badge-rect"];if(D>0){var W=Math.max(15,L-k+15),Z=Math.min(15,Math.abs(q-O),Math.max(0,z-W)),$="M ".concat(O,",").concat(z," L ").concat(q-Z,",").concat(z," Q ").concat(q,",").concat(z," ").concat(q,",").concat(z-Z," L ").concat(q,",").concat(W);null==G||G.setAttribute("visibility","visible"),null==G||G.setAttribute("d",$),null==G||G.setAttribute("stroke",P),null==K||K.setAttribute("visibility","visible"),null==K||K.setAttribute("transform","translate(".concat(q,", ").concat(W,")")),V&&V.setAttribute("fill",P),J&&(J.textContent="+".concat(D),J.setAttribute("fill",Q)),U&&U.setAttribute("stroke",P)}else null==G||G.setAttribute("visibility","hidden"),null==K||K.setAttribute("visibility","hidden");var _=a.current["guideline-down-stroke"],tt=a.current["guideline-down-badge"],et=a.current["guideline-down-arrow"],nt=a.current["guideline-down-text"],it=a.current["guideline-down-badge-rect"];if(j>0){var rt=Math.min(E-15,H-k-15);Z=Math.min(15,Math.abs(q-O),Math.max(0,rt-z)),$="M ".concat(O,",").concat(z," L ").concat(q-Z,",").concat(z," Q ").concat(q,",").concat(z," ").concat(q,",").concat(z+Z," L ").concat(q,",").concat(rt);null==_||_.setAttribute("visibility","visible"),null==_||_.setAttribute("d",$),null==_||_.setAttribute("stroke",P),null==tt||tt.setAttribute("visibility","visible"),null==tt||tt.setAttribute("transform","translate(".concat(q,", ").concat(rt,")")),et&&et.setAttribute("fill",P),nt&&(nt.textContent="+".concat(j),nt.setAttribute("fill",Q)),it&&it.setAttribute("stroke",P)}else null==_||_.setAttribute("visibility","hidden"),null==tt||tt.setAttribute("visibility","hidden")}}},[]),Mt=n(function(){Ct.current.length>0&&!Y.current||(null!==mt.current&&clearTimeout(mt.current),mt.current=setTimeout(function(){G.current(),mt.current=null},50))},[]),Tt=n(function(t){if(null!==_.current&&tt.current&&Math.abs(t.currentTarget.scrollTop-_.current)<=2){var e=tt.current;_.current=null,tt.current=null,e()}if(!xt.current&&!V.current){if(L&&J&&(D.current||M.size>0)){var n=t.currentTarget,i=o.current,c=u.current,a=n===i?c:n===c?i:null;if(n&&a){var d=function(){var t,e,n,i,c,l,o,u,a,d,s,v=z.current,h=P.current;if(null===v)return{leftAnchor:null,rightAnchor:null};if("string"==typeof v&&v.includes(r)){var g=v.split(r),f="".concat(g[0]).concat(r).concat(g[1]);return{leftAnchor:(null===(t=R.current[f])||void 0===t?void 0:t.current)||(null===(e=x.current[g[2]])||void 0===e?void 0:e.current)||(null===(n=b.current[Number(g[2])])||void 0===n?void 0:n.current)||null,rightAnchor:(null===(i=C.current[f])||void 0===i?void 0:i.current)||(null===(c=m.current[g[3]])||void 0===c?void 0:c.current)||(null===(l=y.current[Number(g[3])])||void 0===l?void 0:l.current)||null}}var p=Number(v),B=null!==h?Number(h):p;return{leftAnchor:(null===(o=R.current[p])||void 0===o?void 0:o.current)||(null===(u=A.current[p])||void 0===u?void 0:u.current)||(null===(a=b.current[p])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=C.current[B])||void 0===d?void 0:d.current)||(null===(s=y.current[B])||void 0===s?void 0:s.current)||null}}(),s=d.leftAnchor,v=d.rightAnchor,h=n===i?s:v,g=n===i?v:s,f=null;if(h&&g){var p=h.getBoundingClientRect(),B=g.getBoundingClientRect(),S=a.getBoundingClientRect(),T=p.top+p.height/2;f=B.top-S.top+a.scrollTop+B.height/2-(T-S.top)}else{var I=Math.max(0,n.scrollHeight-n.clientHeight),F=Math.max(0,a.scrollHeight-a.clientHeight);f=I>0?n.scrollTop/I*F:n.scrollTop}var H=Math.max(0,a.scrollHeight-a.clientHeight);f=Math.max(0,Math.min(f,H)),Math.abs(a.scrollTop-f)>1&&(xt.current=!0,a.scrollTop=f,requestAnimationFrame(function(){xt.current=!1}))}}L||Mt(),yt.current||(yt.current=!0,requestAnimationFrame(function(){var t,e,n,i,c,a,d;if(D.current){var s=o.current,v=u.current;if(s&&v&&O.current){if(!j.current){var h=z.current,g=void 0;if("string"==typeof h&&h.includes(r)){var f=h.split(r),p="".concat(f[0]).concat(r).concat(f[1]);g=null===(t=R.current[p])||void 0===t?void 0:t.current}else g=null===(e=R.current[h])||void 0===e?void 0:e.current;if(g){var b=g.getBoundingClientRect();j.current={badgeScreenY:b.top+b.height/2,initialScrollTop:s.scrollTop,leftTop:s.getBoundingClientRect().top,leftBottom:s.getBoundingClientRect().top+s.clientHeight,cTop:null!==(i=null===(n=l.current)||void 0===n?void 0:n.getBoundingClientRect().top)&&void 0!==i?i:0}}}if(j.current){var y=j.current,x=s.scrollTop-y.initialScrollTop,m=y.badgeScreenY-x,C=((c=m,a=y.leftTop,d=y.leftBottom,Math.max(a,Math.min(d,c)))-y.cTop).toString(),A=m>=y.leftTop-4&&m<=y.leftBottom+4;O.current.setAttribute("y1",C),O.current.setAttribute("y2",C),O.current.setAttribute("visibility",A?"visible":"hidden")}}}St(),yt.current=!1}))}},[St,L,J,M,Mt]);return i(function(){G.current=Bt},[Bt]),i(function(){var t=setTimeout(Mt,250),e=function(){return U.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==mt.current&&clearTimeout(mt.current),null!==K.current&&clearTimeout(K.current),window.removeEventListener("resize",e)}},[W,Z,$,g,B,S,v,h,et,Mt,T,I,N,M]),{lines:rt,setLines:ct,overallConnector:ot,setOverallConnector:ut,connectedLines:vt,setConnectedLines:ht,svgDimensions:ft,cachedConnectedPositions:Ct,calculateLines:Bt,calculateLinesRef:G,calculateLinesDebounced:Mt,handleColumnScroll:Tt}};export{c as useLinesCalculator};
2
2
  //# sourceMappingURL=useLinesCalculator.js.map
@@ -1,2 +1,2 @@
1
- import{useState as e,useRef as n,useCallback as t,useEffect as r}from"react";import{DEVIATION_BADGE_SEPARATOR as i,smoothScrollTo as l,resetClauseHighlight as u}from"../CognitiveComparehelpers.js";var o=function(o){var c=o.maintainRelativeOrder,d=o.proposedSections,s=o.existingSections,v=o.leftContainerRef,a=o.rightContainerRef,p=o.scrollContainerRef,g=o.sectionLeftRefs,f=o.sectionRightRefs,h=o.subSectionLeftRefs,R=o.subSectionRightRefs,S=o.lhsBadgeRefs,y=o.rhsBadgeRefs,m=o.sectionRowRefs,B=o.sectionRightRowRefs,x=o.rhsTopSpacerRef,C=o.rhsBottomSpacerRef,T=o.lhsTopSpacerRef,b=o.lhsBottomSpacerRef,A=o.calculateLinesRef,w=o.setConnectedSections,I=o.setConnectedLines,L=o.cachedConnectedPositions,F=o.closeMoreFunctionsPopup,N=o.setErrorToast;o.moreFunctions,o.closeSummaryPopup;var E=e(!1),q=E[0],H=E[1],P=e(!1),M=P[0],z=P[1],V=e(!1),j=V[0],k=V[1],O=e(!1),D=O[0],G=O[1],J=e(null),K=J[0],Q=J[1],U=n(!1),W=n(null),X=n(!1),Y=n(null),Z=n(null),$=n(null),_=n(new Set),ee=function(){_.current.forEach(function(e){u(e)}),_.current.clear()},ne=function(e,n,t){var r,l,u,o,c,d,s,p,x,C,T,b,A=null,w=null,I=null,L=null,F=null,N=null,E=function(e,n){if(!e||!n)return!0;var t=e.getBoundingClientRect(),r=n.getBoundingClientRect();return t.bottom>=r.top&&t.top<=r.bottom};if(e){var q=n.split(i),H="".concat(q[0]).concat(i).concat(q[1]);A=(null===(r=h.current[q[2]])||void 0===r?void 0:r.current)||(null===(l=g.current[Number(q[2])])||void 0===l?void 0:l.current)||null,w=(null===(u=R.current[q[3]])||void 0===u?void 0:u.current)||(null===(o=f.current[Number(q[3])])||void 0===o?void 0:o.current)||null,I=(null===(c=S.current[H])||void 0===c?void 0:c.current)||A,L=(null===(d=y.current[H])||void 0===d?void 0:d.current)||w}else{var P=Number(n),M=null!==t?Number(t):P;A=(null===(s=g.current[P])||void 0===s?void 0:s.current)||null,w=(null===(p=f.current[M])||void 0===p?void 0:p.current)||null,F=(null===(x=S.current[P])||void 0===x?void 0:x.current)||null,N=(null===(C=y.current[M])||void 0===C?void 0:C.current)||null,I=F||(null===(T=m.current[P])||void 0===T?void 0:T.current)||A,L=N||(null===(b=B.current[M])||void 0===b?void 0:b.current)||w}if(A&&(A.style.paddingTop="0px"),w&&(w.style.paddingTop="0px"),e||(F&&(F.style.marginTop="0px"),N&&(N.style.marginTop="0px")),!e&&F&&N){var z=v.current,V=a.current;if(!E(F,z)||!E(N,V))return;var j=F.getBoundingClientRect(),k=N.getBoundingClientRect(),O=j.top-k.top;if(Math.abs(O)>32)return;O>0&&(N.style.marginTop="".concat(O,"px"))}else if(I&&L&&A&&w){j=I.getBoundingClientRect(),k=L.getBoundingClientRect();(O=j.top-k.top)>0&&(w.style.paddingTop="".concat(O,"px"))}},te=t(function(){var e,n,t,r,l,u,o,c,d=Y.current,s=Z.current;if(null!==d)if("string"==typeof d&&d.includes(i)){var v=d.split(i),a=(null===(e=h.current[v[2]])||void 0===e?void 0:e.current)||(null===(n=g.current[Number(v[2])])||void 0===n?void 0:n.current)||null,p=(null===(t=R.current[v[3]])||void 0===t?void 0:t.current)||(null===(r=f.current[Number(v[3])])||void 0===r?void 0:r.current)||null;a&&(a.style.paddingTop="0px"),p&&(p.style.paddingTop="0px")}else{a=(null===(l=g.current[d])||void 0===l?void 0:l.current)||null,p=(null===(u=f.current[null!=s?s:d])||void 0===u?void 0:u.current)||null;a&&(a.style.paddingTop="0px"),p&&(p.style.paddingTop="0px");var m=(null===(o=S.current[d])||void 0===o?void 0:o.current)||null,B=(null===(c=y.current[null!=s?s:d])||void 0===c?void 0:c.current)||null;m&&(m.style.marginTop="0px"),B&&(B.style.marginTop="0px")}x.current&&(x.current.style.height="0px"),C.current&&(C.current.style.height="0px"),T.current&&(T.current.style.height="0px"),b.current&&(b.current.style.height="0px")},[]);r(function(){X.current=q},[q]),r(function(){Y.current=K},[K]);var re=t(function(){ee(),H(!1),X.current=!1,W.current=null,te(),Q(null),Y.current=null,Z.current=null,z(!1),G(!1)},[te]),ie=t(function(e,n,t){var r,u,o=null===(r=null==t?void 0:t.toggleIfSame)||void 0===r||r,h=null==t?void 0:t.onReady,R=null!==(u=null==t?void 0:t.sourceSide)&&void 0!==u?u:"left";if(F(),null!=e)if(n)N("No counterpart exists for this section.");else{ee();var E=q&&K===e;q&&null!==K&&te(),E&&o?re():(w(new Set([e])),I([]),L.current=[],G(!0),U.current=!0,Q(e),Y.current=e,H(!0),X.current=!0,z(!1),x.current&&(x.current.style.height="0px"),C.current&&(C.current.style.height="0px"),T.current&&(T.current.style.height="0px"),b.current&&(b.current.style.height="0px"),requestAnimationFrame(function(){var n,t,r,u,o,T,b,w,I="string"==typeof e&&e.includes(i),L=null,F=null,N=null;if(I){var E=e.split(i),q="".concat(E[0]).concat(i).concat(E[1]);L=(null===(n=S.current[q])||void 0===n?void 0:n.current)||null,F=(null===(t=y.current[q])||void 0===t?void 0:t.current)||null,N=F?e:null}else if(L=(null===(r=g.current[e])||void 0===r?void 0:r.current)||(null===(u=m.current[e])||void 0===u?void 0:u.current)||null,c){var H=d[e],P=(null==H?void 0:H.refIndexes)||[];if(P.length>0){var M=P[0],V=s.findIndex(function(e){return e.selfIndex===M});-1!==V&&(F=(null===(b=f.current[V])||void 0===b?void 0:b.current)||(null===(w=B.current[V])||void 0===w?void 0:w.current)||null,N=V)}}else F=(null===(o=f.current[e])||void 0===o?void 0:o.current)||(null===(T=B.current[e])||void 0===T?void 0:T.current)||null,N=F?e:null;Z.current=N;var j=v.current,k=a.current,O=function(){ne(I,e,N),z(!0),A.current&&A.current(),U.current=!1,"right"===R&&k?k.dispatchEvent(new Event("scroll")):j&&j.dispatchEvent(new Event("scroll")),G(!1),null==h||h()};if(!L||!j)return U.current=!1,G(!1),void(null==h||h());if(F&&k){if(!c){var D=0;D="right"===R?F?F.getBoundingClientRect().top:0:L?L.getBoundingClientRect().top:0;var J=p.current,K=(null==J?void 0:J.getBoundingClientRect().top)||0,Q=J?J.scrollTop+D-K-150:0;return J?void l(J,Q,200,O):void O()}var W=L.getBoundingClientRect().top-j.getBoundingClientRect().top+j.scrollTop,X=F.getBoundingClientRect().top-k.getBoundingClientRect().top+k.scrollTop,Y=200;if("left"===R){var $=X-(W-j.scrollTop);$<0&&x.current&&(x.current.style.height="".concat(Math.abs($),"px")),requestAnimationFrame(function(){var e,n=k.scrollHeight-k.clientHeight;if($<0)e=0;else{if($>n){var t=$-n;return C.current&&(C.current.style.height="".concat(t+150,"px")),void requestAnimationFrame(function(){l(k,$,Y,O)})}e=$}l(k,e,Y,O)})}else{var _=W-(X-k.scrollTop);requestAnimationFrame(function(){var e,n=j.scrollHeight-j.clientHeight;if(_<0)e=0;else{if(_>n)return void requestAnimationFrame(function(){return l(j,n,Y,O)});e=_}l(j,e,Y,O)})}}else O()}))}},[K,F,s,q,c,d,te,re]);return{isSideBySide:q,setIsSideBySide:H,isArrowVisible:M,setIsArrowVisible:z,isResizing:j,setIsResizing:k,isSideBySideLoading:D,setIsSideBySideLoading:G,activeSideBySideSection:K,setActiveSideBySideSection:Q,scrollLock:U,sideBySideCacheRef:W,isSideBySideRef:X,activeSideBySideSectionRef:Y,activeSideBySideRightSectionRef:Z,sideBySideLineRef:$,highlightedClauseRefs:_,clearClauseHighlight:ee,applyAlignmentPadding:ne,resetSideBySide:re,activateSideBySide:ie}};export{o as useSideBySide};
1
+ import{useState as e,useRef as n,useCallback as t,useEffect as r}from"react";import{DEVIATION_BADGE_SEPARATOR as i,resetClauseHighlight as l,smoothScrollTo as u}from"../CognitiveComparehelpers.js";var o=function(o){var c=o.isGuidelineMode,d=o.maintainRelativeOrder,s=o.proposedSections,v=o.existingSections,a=o.leftContainerRef,p=o.rightContainerRef,g=o.scrollContainerRef,f=o.sectionLeftRefs,h=o.sectionRightRefs,R=o.subSectionLeftRefs,S=o.subSectionRightRefs,y=o.lhsBadgeRefs,m=o.rhsBadgeRefs,B=o.sectionRowRefs,x=o.sectionRightRowRefs,C=o.rhsTopSpacerRef,T=o.rhsBottomSpacerRef,b=o.lhsTopSpacerRef,A=o.lhsBottomSpacerRef,I=o.calculateLinesRef,w=o.setConnectedSections,L=o.setConnectedLines,E=o.cachedConnectedPositions,F=o.closeMoreFunctionsPopup,N=o.setErrorToast;o.moreFunctions,o.closeSummaryPopup;var q=e(!1),H=q[0],M=q[1],P=e(!1),z=P[0],V=P[1],j=e(!1),k=j[0],G=j[1],O=e(!1),D=O[0],J=O[1],K=e(null),Q=K[0],U=K[1],W=n(!1),X=n(null),Y=n(!1),Z=n(null),$=n(null),_=n(null),ee=n(new Set),ne=function(){ee.current.forEach(function(e){l(e)}),ee.current.clear()},te=function(e,n,t){var r,l,u,o,c,d,s,v,g,C,T,b,A=null,I=null,w=null,L=null,E=null,F=null,N=function(e,n){if(!e||!n)return!0;var t=e.getBoundingClientRect(),r=n.getBoundingClientRect();return t.bottom>=r.top&&t.top<=r.bottom};if(e){var q=n.split(i),H="".concat(q[0]).concat(i).concat(q[1]);A=(null===(r=R.current[q[2]])||void 0===r?void 0:r.current)||(null===(l=f.current[Number(q[2])])||void 0===l?void 0:l.current)||null,I=(null===(u=S.current[q[3]])||void 0===u?void 0:u.current)||(null===(o=h.current[Number(q[3])])||void 0===o?void 0:o.current)||null,w=(null===(c=y.current[H])||void 0===c?void 0:c.current)||A,L=(null===(d=m.current[H])||void 0===d?void 0:d.current)||I}else{var M=Number(n),P=null!==t?Number(t):M;A=(null===(s=f.current[M])||void 0===s?void 0:s.current)||null,I=(null===(v=h.current[P])||void 0===v?void 0:v.current)||null,E=(null===(g=y.current[M])||void 0===g?void 0:g.current)||null,F=(null===(C=m.current[P])||void 0===C?void 0:C.current)||null,w=E||(null===(T=B.current[M])||void 0===T?void 0:T.current)||A,L=F||(null===(b=x.current[P])||void 0===b?void 0:b.current)||I}if(A&&(A.style.paddingTop="0px"),I&&(I.style.paddingTop="0px"),e||(E&&(E.style.marginTop="0px"),F&&(F.style.marginTop="0px")),!e&&E&&F){var z=a.current,V=p.current;if(!N(E,z)||!N(F,V))return;var j=E.getBoundingClientRect(),k=F.getBoundingClientRect(),G=j.top-k.top;if(Math.abs(G)>32)return;G>0&&(F.style.marginTop="".concat(G,"px"))}else if(w&&L&&A&&I){j=w.getBoundingClientRect(),k=L.getBoundingClientRect();(G=j.top-k.top)>0&&(I.style.paddingTop="".concat(G,"px"))}},re=t(function(){var e,n,t,r,l,u,o,c,d=Z.current,s=$.current;if(null!==d)if("string"==typeof d&&d.includes(i)){var v=d.split(i),a=(null===(e=R.current[v[2]])||void 0===e?void 0:e.current)||(null===(n=f.current[Number(v[2])])||void 0===n?void 0:n.current)||null,p=(null===(t=S.current[v[3]])||void 0===t?void 0:t.current)||(null===(r=h.current[Number(v[3])])||void 0===r?void 0:r.current)||null;a&&(a.style.paddingTop="0px"),p&&(p.style.paddingTop="0px")}else{a=(null===(l=f.current[d])||void 0===l?void 0:l.current)||null,p=(null===(u=h.current[null!=s?s:d])||void 0===u?void 0:u.current)||null;a&&(a.style.paddingTop="0px"),p&&(p.style.paddingTop="0px");var g=(null===(o=y.current[d])||void 0===o?void 0:o.current)||null,B=(null===(c=m.current[null!=s?s:d])||void 0===c?void 0:c.current)||null;g&&(g.style.marginTop="0px"),B&&(B.style.marginTop="0px")}C.current&&(C.current.style.height="0px"),T.current&&(T.current.style.height="0px"),b.current&&(b.current.style.height="0px"),A.current&&(A.current.style.height="0px")},[]);r(function(){Y.current=H},[H]),r(function(){Z.current=Q},[Q]);var ie=t(function(){ne(),M(!1),Y.current=!1,X.current=null,re(),U(null),Z.current=null,$.current=null,V(!1),J(!1)},[re]),le=t(function(e,n,t){var r,l,o=null===(r=null==t?void 0:t.toggleIfSame)||void 0===r||r,R=null==t?void 0:t.onReady,S=null!==(l=null==t?void 0:t.sourceSide)&&void 0!==l?l:"left";if(F(),null!=e)if(!n||c){ne();var q=H&&Q===e;H&&null!==Q&&re(),q&&o?ie():(w(new Set([e])),L([]),E.current=[],J(!0),W.current=!0,U(e),Z.current=e,M(!0),Y.current=!0,V(!1),C.current&&(C.current.style.height="0px"),T.current&&(T.current.style.height="0px"),b.current&&(b.current.style.height="0px"),A.current&&(A.current.style.height="0px"),requestAnimationFrame(function(){var n=function(){var n,t,r,l,o,b,A,w,L,E,F,N="string"==typeof e&&e.includes(i),q=null,H=null,M=null;if(c){if(N){var P=e.split(i),z="".concat(P[0]).concat(i).concat(P[1]);q=(null===(n=y.current[z])||void 0===n?void 0:n.current)||null}else q=(null===(t=f.current[e])||void 0===t?void 0:t.current)||(null===(r=B.current[e])||void 0===r?void 0:r.current)||null;H=document.getElementById("guideline-target-0"),M=H?e:null}else if(N){P=e.split(i),z="".concat(P[0]).concat(i).concat(P[1]);q=(null===(l=y.current[z])||void 0===l?void 0:l.current)||null,H=(null===(o=m.current[z])||void 0===o?void 0:o.current)||null,M=H?e:null}else if(q=(null===(b=f.current[e])||void 0===b?void 0:b.current)||(null===(A=B.current[e])||void 0===A?void 0:A.current)||null,d){var j=s[e],k=(null==j?void 0:j.refIndexes)||[];if(k.length>0){var G=k[0],O=v.findIndex(function(e){return e.selfIndex===G});-1!==O&&(H=(null===(E=h.current[O])||void 0===E?void 0:E.current)||(null===(F=x.current[O])||void 0===F?void 0:F.current)||null,M=O)}}else H=(null===(w=h.current[e])||void 0===w?void 0:w.current)||(null===(L=x.current[e])||void 0===L?void 0:L.current)||null,M=H?e:null;$.current=M;var D=a.current,K=p.current,Q=function(){te(N,e,M),V(!0),I.current&&I.current(),W.current=!1,"right"===S&&K?K.dispatchEvent(new Event("scroll")):D&&D.dispatchEvent(new Event("scroll")),J(!1),null==R||R()};if(!q||!D)return W.current=!1,J(!1),void(null==R||R());if(H&&K){if(!d){var U=0;U="right"===S?H?H.getBoundingClientRect().top:0:q?q.getBoundingClientRect().top:0;var X=g.current,Y=(null==X?void 0:X.getBoundingClientRect().top)||0,Z=X?X.scrollTop+U-Y-150:0;return X?void u(X,Z,200,Q):void Q()}var _=q.getBoundingClientRect().top-D.getBoundingClientRect().top+D.scrollTop,ee=H.getBoundingClientRect().top-K.getBoundingClientRect().top+K.scrollTop,ne=200;if("left"===S){var re=ee-(_-D.scrollTop);re<0&&C.current&&!c&&(C.current.style.height="".concat(Math.abs(re),"px")),requestAnimationFrame(function(){var e,n=K.scrollHeight-K.clientHeight;if(re<0)e=0;else{if(re>n){var t=re-n;return T.current&&!c&&(T.current.style.height="".concat(t+150,"px")),void requestAnimationFrame(function(){u(K,re,ne,Q)})}e=re}u(K,e,ne,Q)})}else{var ie=_-(ee-K.scrollTop);requestAnimationFrame(function(){var e,n=D.scrollHeight-D.clientHeight;if(ie<0)e=0;else{if(ie>n)return void requestAnimationFrame(function(){return u(D,n,ne,Q)});e=ie}u(D,e,ne,Q)})}}else Q()};c?setTimeout(n,100):n()}))}else N("No counterpart exists for this section.")},[Q,F,v,H,d,s,re,ie,c]);return{isSideBySide:H,setIsSideBySide:M,isArrowVisible:z,setIsArrowVisible:V,isResizing:k,setIsResizing:G,isSideBySideLoading:D,setIsSideBySideLoading:J,activeSideBySideSection:Q,setActiveSideBySideSection:U,scrollLock:W,sideBySideCacheRef:X,isSideBySideRef:Y,activeSideBySideSectionRef:Z,activeSideBySideRightSectionRef:$,sideBySideLineRef:_,highlightedClauseRefs:ee,clearClauseHighlight:ne,applyAlignmentPadding:te,resetSideBySide:ie,activateSideBySide:le}};export{o as useSideBySide};
2
2
  //# sourceMappingURL=useSideBySide.js.map
@@ -1,2 +1,2 @@
1
- var e={container:"CognitiveNonWebSearchReasoning-module_container__koQEN",itemRow:"CognitiveNonWebSearchReasoning-module_itemRow__lRmgs",indexNumber:"CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg",textContent:"CognitiveNonWebSearchReasoning-module_textContent__327fx",paraphraseButton:"CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe",paraphraseText:"CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty",paraphraseStar:"CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR",chevronIcon:"CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw",chevronIconRotated:"CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP",expandedContainer:"CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9",expandedHeader:"CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb",headerTitle:"CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI",headerActions:"CognitiveNonWebSearchReasoning-module_headerActions__j1P4u",navigationContainer:"CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG",navButton:"CognitiveNonWebSearchReasoning-module_navButton__aOaMv",navIcon:"CognitiveNonWebSearchReasoning-module_navIcon__uLme4",navCounter:"CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc",confidenceBadge:"CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3",confidenceStar:"CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S",confidenceScore:"CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK",maximizeButton:"CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-",maximizeIcon:"CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez",contentArea:"CognitiveNonWebSearchReasoning-module_contentArea__hVoLL",contentInner:"CognitiveNonWebSearchReasoning-module_contentInner__df-34",footer:"CognitiveNonWebSearchReasoning-module_footer__CNE8q",trainingTitle:"CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh",trainingTitleLink:"CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U",modalDialog:"CognitiveNonWebSearchReasoning-module_modalDialog__eGApe",modalContainer:"CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01",modalHeader:"CognitiveNonWebSearchReasoning-module_modalHeader__qglof",modalHeaderTitle:"CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X",modalHeaderActions:"CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip",modalNavContainer:"CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP",modalNavButton:"CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24",closeButton:"CognitiveNonWebSearchReasoning-module_closeButton__S23zi",closeIcon:"CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG",modalContent:"CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv",modalContentInner:"CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo",modalFooter:"CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn",modalFooterSource:"CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt",blockLine:"CognitiveNonWebSearchReasoning-module_blockLine__FwGYE",headerLine:"CognitiveNonWebSearchReasoning-module_headerLine__0j5p4",listItemLine:"CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O",listCounter:"CognitiveNonWebSearchReasoning-module_listCounter__esNpx",boldText:"CognitiveNonWebSearchReasoning-module_boldText__suAp2",highlight:"CognitiveNonWebSearchReasoning-module_highlight__EMAz5",highlightActive:"CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU",highlightActiveVariant:"CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp",highlightVariant:"CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ",highlightButton:"CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CognitiveNonWebSearchReasoning-module_container__koQEN{display:flex;flex-direction:column;gap:var(--cr-container-gap,.5rem)}.CognitiveNonWebSearchReasoning-module_itemRow__lRmgs{align-items:flex-start;display:flex;font-size:var(--cr-item-row-font-size,.875rem);gap:.5rem}.CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg{color:var(--cr-index-color,#475467);font-weight:var(--cr-index-font-weight,500)}.CognitiveNonWebSearchReasoning-module_textContent__327fx{color:var(--cr-text-content-color,#475467);flex:1;max-width:none}.CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe{align-items:center;background:var(--cr-paraphrase-button-bg,#0000);border:none;border-radius:var(--cr-paraphrase-button-border-radius,.375rem);cursor:pointer;display:inline-flex;gap:.25rem;justify-content:flex-start;padding:.125rem .375rem}.CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty{color:var(--cr-paraphrase-color,#2563eb);font-weight:var(--cr-paraphrase-font-weight,500);text-align:start}.CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR{color:var(--cr-paraphrase-color,#2563eb);padding-right:.25rem}.CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw{color:var(--cr-chevron-color,#2563eb);height:1rem;transition:transform .2s;width:1rem}.CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP{transform:rotate(180deg)}.CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9{background-color:var(--cr-expanded-container-bg,#0000);border:solid var(--cr-expanded-container-border,#e5e7eb);border-radius:var(--cr-expanded-container-border-radius,.5rem);border-width:1px 1px 2px;margin-left:var(--cr-expanded-container-margin-left,1.5rem);margin-top:var(--cr-expanded-container-margin-top,.5rem);overflow:hidden}.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{align-items:center;background-color:var(--cr-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:var(--cr-header-padding,.25rem .75rem)}.CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI{color:var(--cr-header-title-color,inherit);font-size:var(--cr-header-title-font-size,.875rem);font-weight:var(--cr-header-title-font-weight,400)}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{align-items:center;background-color:var(--cr-nav-container-bg,#fff);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv:hover{background-color:var(--cr-nav-button-hover-bg,#f3f4f6)}.CognitiveNonWebSearchReasoning-module_navIcon__uLme4{color:var(--cr-nav-icon-color,#6b7280);height:var(--cr-nav-icon-size,1.25rem);width:var(--cr-nav-icon-size,1.25rem)}.CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc{color:var(--cr-nav-counter-color,#4b5563);font-size:var(--cr-nav-counter-font-size,.875rem);min-width:2.25rem;text-align:center}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{align-items:center;background-color:var(--cr-confidence-badge-bg,#f0fdf4);border:2px solid var(--cr-confidence-badge-border,#3ac894);border-radius:9999px;display:inline-flex;gap:.25rem;padding:.25rem .5rem}.CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S{color:var(--cr-confidence-star-color,#059669);font-size:.75rem}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{color:var(--cr-confidence-score-color,#059669);font-size:.875rem;font-weight:600}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-:hover{background-color:var(--cr-maximize-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{color:var(--cr-maximize-icon-color,#6b7280);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{background-color:var(--cr-content-area-bg,#0000);color:var(--cr-content-area-color,inherit);font-size:var(--cr-content-area-font-size,.875rem);max-height:var(--cr-content-area-max-height,11rem);overflow-y:auto;padding:var(--cr-content-area-padding,.5rem .75rem);scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_contentInner__df-34{line-height:var(--cr-content-line-height,1.5rem)}.CognitiveNonWebSearchReasoning-module_footer__CNE8q{align-items:center;background-color:var(--cr-footer-bg,#f2f4f7);border-top:1px solid var(--cr-footer-border,#e5e7eb);display:flex;justify-content:flex-end}.CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh{color:var(--cr-training-title-color,inherit);font-size:var(--cr-training-title-font-size,.875rem);font-style:italic;font-weight:300}.CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U{align-items:center;background:none;border:none;color:var(--cr-training-link-color,inherit);cursor:pointer;display:inline-flex;font-size:var(--cr-training-link-font-size,.8rem);font-weight:600;gap:.25rem}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe{background:#0000;border:none;left:50%;margin:0;max-height:300px;max-width:none;overflow:visible;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%)}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe::backdrop{background-color:#0006}.CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01{background-color:var(--cr-modal-container-bg,#fff);border-radius:var(--cr-modal-container-border-radius,.75rem);box-shadow:0 25px 50px -12px #00000040;display:flex;flex-direction:column;max-height:80vh;max-width:900px;overflow:hidden;width:80vw}.CognitiveNonWebSearchReasoning-module_modalHeader__qglof{align-items:center;background-color:var(--cr-modal-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-modal-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:.75rem .5rem .75rem 1rem;width:100%}.CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X{color:var(--cr-modal-header-title-color,inherit);font-size:var(--cr-modal-header-title-font-size,1rem);font-weight:500}.CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP{align-items:center;background-color:var(--cr-modal-nav-container-bg,#f3f4f6);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24:hover{background-color:var(--cr-modal-nav-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi:hover{background-color:var(--cr-close-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG{color:var(--cr-close-icon-color,#4b5563);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv{background-color:var(--cr-modal-content-bg,#0000);color:var(--cr-modal-content-color,inherit);flex:1;font-size:var(--cr-modal-content-font-size,.875rem);overflow-y:scroll;padding:.75rem 1rem;scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo{line-height:var(--cr-modal-content-line-height,1.75rem)}.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{justify-content:flex-end;padding:.5rem 1rem}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt,.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{align-items:center;background-color:var(--cr-modal-footer-bg,#f2f4f7);border-top:1px solid var(--cr-modal-footer-border,#e5e7eb);display:flex;flex-shrink:0}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt{justify-content:flex-start;padding:1rem}.CognitiveNonWebSearchReasoning-module_blockLine__FwGYE{display:block}.CognitiveNonWebSearchReasoning-module_headerLine__0j5p4{display:block;font-weight:var(--cr-header-line-font-weight,400)}.CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O{display:block}.CognitiveNonWebSearchReasoning-module_listCounter__esNpx{display:inline-block;font-weight:var(--cr-list-counter-font-weight,500);text-align:left;width:var(--cr-list-counter-width,1.5rem)}.CognitiveNonWebSearchReasoning-module_boldText__suAp2{font-weight:var(--cr-bold-font-weight,600)}.CognitiveNonWebSearchReasoning-module_highlight__EMAz5{background-color:var(--cr-highlight-bg,#fef08a);border-radius:.25rem;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU{background-color:var(--cr-highlight-active-bg,#fde047);border:1px solid var(--cr-highlight-active-border,#eab308);box-shadow:0 1px 2px 0 #0000000d}.CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp{background-color:#e0e7ff;border:1px solid #5c75f4;box-shadow:0 1px 2px 0 #0000000d;color:#6366f1;font-weight:500}.CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ{background-color:#eef2ff;border-radius:.25rem;color:#6366f1;font-weight:500;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb{border:none;cursor:pointer;display:inline;font:inherit}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
1
+ var e={container:"CognitiveNonWebSearchReasoning-module_container__koQEN",itemRow:"CognitiveNonWebSearchReasoning-module_itemRow__lRmgs",indexNumber:"CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg",textContent:"CognitiveNonWebSearchReasoning-module_textContent__327fx",paraphraseButton:"CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe",paraphraseText:"CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty",paraphraseStar:"CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR",chevronIcon:"CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw",chevronIconRotated:"CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP",expandedContainer:"CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9",expandedHeader:"CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb",headerTitle:"CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI",headerActions:"CognitiveNonWebSearchReasoning-module_headerActions__j1P4u",navigationContainer:"CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG",navButton:"CognitiveNonWebSearchReasoning-module_navButton__aOaMv",navIcon:"CognitiveNonWebSearchReasoning-module_navIcon__uLme4",navCounter:"CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc",confidenceBadge:"CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3",confidenceStar:"CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S",confidenceScore:"CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK",maximizeButton:"CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-",maximizeIcon:"CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez",contentArea:"CognitiveNonWebSearchReasoning-module_contentArea__hVoLL",contentInner:"CognitiveNonWebSearchReasoning-module_contentInner__df-34",footer:"CognitiveNonWebSearchReasoning-module_footer__CNE8q",trainingTitle:"CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh",trainingTitleLink:"CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U",modalDialog:"CognitiveNonWebSearchReasoning-module_modalDialog__eGApe",modalContainer:"CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01",modalHeader:"CognitiveNonWebSearchReasoning-module_modalHeader__qglof",modalHeaderTitle:"CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X",modalHeaderActions:"CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip",modalNavContainer:"CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP",modalNavButton:"CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24",closeButton:"CognitiveNonWebSearchReasoning-module_closeButton__S23zi",closeIcon:"CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG",modalContent:"CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv",modalContentInner:"CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo",modalFooter:"CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn",modalFooterSource:"CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt",blockLine:"CognitiveNonWebSearchReasoning-module_blockLine__FwGYE",headerLine:"CognitiveNonWebSearchReasoning-module_headerLine__0j5p4",listItemLine:"CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O",listCounter:"CognitiveNonWebSearchReasoning-module_listCounter__esNpx",boldText:"CognitiveNonWebSearchReasoning-module_boldText__suAp2",highlight:"CognitiveNonWebSearchReasoning-module_highlight__EMAz5",highlightActive:"CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU",highlightActiveVariant:"CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp",highlightVariant:"CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ",highlightButton:"CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".CognitiveNonWebSearchReasoning-module_container__koQEN{display:flex;flex-direction:column;gap:var(--cr-container-gap,.5rem)}.CognitiveNonWebSearchReasoning-module_itemRow__lRmgs{align-items:flex-start;display:flex;font-size:var(--cr-item-row-font-size,.875rem);gap:.5rem}.CognitiveNonWebSearchReasoning-module_indexNumber__wP5hg{color:var(--cr-index-color,#475467);font-weight:var(--cr-index-font-weight,500)}.CognitiveNonWebSearchReasoning-module_textContent__327fx{color:var(--cr-text-content-color,#475467);flex:1;max-width:none}.CognitiveNonWebSearchReasoning-module_paraphraseButton__VS6Qe{align-items:center;background:var(--cr-paraphrase-button-bg,#0000);border:none;border-radius:var(--cr-paraphrase-button-border-radius,.375rem);cursor:pointer;display:inline-flex;gap:.25rem;justify-content:flex-start;padding:.125rem .375rem}.CognitiveNonWebSearchReasoning-module_paraphraseText__n5dty{color:var(--cr-paraphrase-color,#2563eb);font-weight:var(--cr-paraphrase-font-weight,500);text-align:start}.CognitiveNonWebSearchReasoning-module_paraphraseStar__YUnqR{color:var(--cr-paraphrase-color,#2563eb);padding-right:.25rem}.CognitiveNonWebSearchReasoning-module_chevronIcon__ZeXjw{color:var(--cr-chevron-color,#2563eb);height:1rem;transition:transform .2s;width:1rem}.CognitiveNonWebSearchReasoning-module_chevronIconRotated__WkRiP{transform:rotate(180deg)}.CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9{background-color:var(--cr-expanded-container-bg,#0000);border:solid var(--cr-expanded-container-border,#e5e7eb);border-radius:var(--cr-expanded-container-border-radius,.5rem);border-width:1px 1px 2px;container-type:inline-size;margin-left:var(--cr-expanded-container-margin-left,1.5rem);margin-top:var(--cr-expanded-container-margin-top,.5rem);overflow:hidden}.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{align-items:center;background-color:var(--cr-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:var(--cr-header-padding,.25rem .75rem)}.CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI{color:var(--cr-header-title-color,inherit);font-size:var(--cr-header-title-font-size,.875rem);font-weight:var(--cr-header-title-font-weight,400)}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{align-items:center;background-color:var(--cr-nav-container-bg,#fff);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_navButton__aOaMv:hover{background-color:var(--cr-nav-button-hover-bg,#f3f4f6)}.CognitiveNonWebSearchReasoning-module_navIcon__uLme4{color:var(--cr-nav-icon-color,#6b7280);height:var(--cr-nav-icon-size,1.25rem);width:var(--cr-nav-icon-size,1.25rem)}.CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc{color:var(--cr-nav-counter-color,#4b5563);font-size:var(--cr-nav-counter-font-size,.875rem);min-width:2.25rem;text-align:center}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{align-items:center;background-color:var(--cr-confidence-badge-bg,#f0fdf4);border:2px solid var(--cr-confidence-badge-border,#3ac894);border-radius:9999px;display:inline-flex;gap:.25rem;padding:.25rem .5rem}.CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S{color:var(--cr-confidence-star-color,#059669);font-size:.75rem}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{color:var(--cr-confidence-score-color,#059669);font-size:.875rem;font-weight:600}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-:hover{background-color:var(--cr-maximize-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{color:var(--cr-maximize-icon-color,#6b7280);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{background-color:var(--cr-content-area-bg,#0000);color:var(--cr-content-area-color,inherit);font-size:var(--cr-content-area-font-size,.875rem);max-height:var(--cr-content-area-max-height,11rem);overflow-y:auto;padding:var(--cr-content-area-padding,.5rem .75rem);scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_contentInner__df-34{line-height:var(--cr-content-line-height,1.5rem)}.CognitiveNonWebSearchReasoning-module_footer__CNE8q{align-items:center;background-color:var(--cr-footer-bg,#f2f4f7);border-top:1px solid var(--cr-footer-border,#e5e7eb);display:flex;justify-content:flex-end}.CognitiveNonWebSearchReasoning-module_trainingTitle__CHFlh{color:var(--cr-training-title-color,inherit);font-size:var(--cr-training-title-font-size,.875rem);font-style:italic;font-weight:300}.CognitiveNonWebSearchReasoning-module_trainingTitleLink__0lu-U{align-items:center;background:none;border:none;color:var(--cr-training-link-color,inherit);cursor:pointer;display:inline-flex;font-size:var(--cr-training-link-font-size,.8rem);font-weight:600;gap:.25rem}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe{background:#0000;border:none;left:50%;margin:0;max-height:300px;max-width:none;overflow:visible;padding:0;position:fixed;top:50%;transform:translate(-50%,-50%)}.CognitiveNonWebSearchReasoning-module_modalDialog__eGApe::backdrop{background-color:#0006}.CognitiveNonWebSearchReasoning-module_modalContainer__-dZ01{background-color:var(--cr-modal-container-bg,#fff);border-radius:var(--cr-modal-container-border-radius,.75rem);box-shadow:0 25px 50px -12px #00000040;display:flex;flex-direction:column;max-height:80vh;max-width:900px;overflow:hidden;width:80vw}.CognitiveNonWebSearchReasoning-module_modalHeader__qglof{align-items:center;background-color:var(--cr-modal-header-bg,#f2f4f7);border-bottom:1px solid var(--cr-modal-header-border,#e5e7eb);display:flex;justify-content:space-between;padding:.75rem .5rem .75rem 1rem;width:100%}.CognitiveNonWebSearchReasoning-module_modalHeaderTitle__hDo1X{color:var(--cr-modal-header-title-color,inherit);font-size:var(--cr-modal-header-title-font-size,1rem);font-weight:500}.CognitiveNonWebSearchReasoning-module_modalHeaderActions__NGmip{align-items:center;display:flex;gap:.5rem}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP{align-items:center;background-color:var(--cr-modal-nav-container-bg,#f3f4f6);border:1px solid var(--cr-nav-container-border,#e5e7eb);border-radius:.5rem;display:flex;padding:.25rem}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24{align-items:center;background:#0000;border:none;border-radius:9999px;cursor:pointer;display:flex;justify-content:center;padding:0;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24:hover{background-color:var(--cr-modal-nav-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi{align-items:center;background:#0000;border:none;border-radius:.25rem;cursor:pointer;display:flex;justify-content:center;padding:.25rem;transition:background-color .2s}.CognitiveNonWebSearchReasoning-module_closeButton__S23zi:hover{background-color:var(--cr-close-button-hover-bg,#e5e7eb)}.CognitiveNonWebSearchReasoning-module_closeIcon__f7kaG{color:var(--cr-close-icon-color,#4b5563);height:1.25rem;width:1.25rem}.CognitiveNonWebSearchReasoning-module_modalContent__4U2Jv{background-color:var(--cr-modal-content-bg,#0000);color:var(--cr-modal-content-color,inherit);flex:1;font-size:var(--cr-modal-content-font-size,.875rem);overflow-y:scroll;padding:.75rem 1rem;scroll-behavior:smooth}.CognitiveNonWebSearchReasoning-module_modalContentInner__63tzo{line-height:var(--cr-modal-content-line-height,1.75rem)}.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{justify-content:flex-end;padding:.5rem 1rem}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt,.CognitiveNonWebSearchReasoning-module_modalFooter__hXBqn{align-items:center;background-color:var(--cr-modal-footer-bg,#f2f4f7);border-top:1px solid var(--cr-modal-footer-border,#e5e7eb);display:flex;flex-shrink:0}.CognitiveNonWebSearchReasoning-module_modalFooterSource__MOlgt{justify-content:flex-start;padding:1rem}.CognitiveNonWebSearchReasoning-module_blockLine__FwGYE{display:block}.CognitiveNonWebSearchReasoning-module_headerLine__0j5p4{display:block;font-weight:var(--cr-header-line-font-weight,400)}.CognitiveNonWebSearchReasoning-module_listItemLine__yKx2O{display:block}.CognitiveNonWebSearchReasoning-module_listCounter__esNpx{display:inline-block;font-weight:var(--cr-list-counter-font-weight,500);text-align:left;width:var(--cr-list-counter-width,1.5rem)}.CognitiveNonWebSearchReasoning-module_boldText__suAp2{font-weight:var(--cr-bold-font-weight,600)}.CognitiveNonWebSearchReasoning-module_highlight__EMAz5{background-color:var(--cr-highlight-bg,#fef08a);border-radius:.25rem;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightActive__FFvuU{background-color:var(--cr-highlight-active-bg,#fde047);border:1px solid var(--cr-highlight-active-border,#eab308);box-shadow:0 1px 2px 0 #0000000d}.CognitiveNonWebSearchReasoning-module_highlightActiveVariant__-gqMp{background-color:#e0e7ff;border:1px solid #5c75f4;box-shadow:0 1px 2px 0 #0000000d;color:#6366f1;font-weight:500}.CognitiveNonWebSearchReasoning-module_highlightVariant__PYgtJ{background-color:#eef2ff;border-radius:.25rem;color:#6366f1;font-weight:500;padding:0 .125rem;transition:all .2s}.CognitiveNonWebSearchReasoning-module_highlightButton__XvkBb{border:none;cursor:pointer;display:inline;font:inherit}@container (max-width: 520px){.CognitiveNonWebSearchReasoning-module_expandedContainer__2UPr9{margin-left:0;margin-top:0}.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{align-items:flex-start;display:flex;flex-wrap:wrap;gap:8px;padding:8px 12px}.CognitiveNonWebSearchReasoning-module_headerTitle__VvMwI{flex:1 1 100%;font-size:14px;line-height:1.3;min-width:0;white-space:normal}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{align-items:center;gap:8px;justify-content:space-between;min-width:0;width:100%}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP,.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{flex-shrink:1;gap:2px;padding:2px}.CognitiveNonWebSearchReasoning-module_navCounter__nj1Xc{font-size:12px;min-width:auto}.CognitiveNonWebSearchReasoning-module_navIcon__uLme4{height:16px;width:16px}.CognitiveNonWebSearchReasoning-module_modalNavButton__6cQ24,.CognitiveNonWebSearchReasoning-module_navButton__aOaMv{padding:2px}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{flex-shrink:0;gap:2px;padding:2px 6px}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{font-size:12px}.CognitiveNonWebSearchReasoning-module_confidenceStar__4Rq0S{font-size:10px}.CognitiveNonWebSearchReasoning-module_maximizeButton__Xwwu-{flex-shrink:0;padding:2px}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{height:18px;width:18px}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{padding:12px}}@container (max-width: 420px){.CognitiveNonWebSearchReasoning-module_expandedHeader__QjKjb{padding:8px}.CognitiveNonWebSearchReasoning-module_headerActions__j1P4u{gap:4px}.CognitiveNonWebSearchReasoning-module_modalNavContainer__Q-OrP,.CognitiveNonWebSearchReasoning-module_navigationContainer__G0VtG{transform:scale(.92);transform-origin:left center}.CognitiveNonWebSearchReasoning-module_confidenceBadge__-ElB3{padding:2px 5px}.CognitiveNonWebSearchReasoning-module_confidenceScore__uLcnK{font-size:11px}.CognitiveNonWebSearchReasoning-module_maximizeIcon__eFZez{height:16px;width:16px}.CognitiveNonWebSearchReasoning-module_contentArea__hVoLL{font-size:13px;padding:10px}}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=CognitiveNonWebSearchReasoning.module.css.js.map
@@ -0,0 +1,2 @@
1
+ import{__assign as e}from"tslib";import{jsxs as r,Fragment as o,jsx as t}from"react/jsx-runtime";import{useState as i,useRef as n,useEffect as l}from"react";import{Box as a,Typography as d,Tooltip as s,Dialog as c,IconButton as f,Chip as h}from"@mui/material";import g from"@mui/icons-material/Close";import m from"@mui/icons-material/Fullscreen";import u from"@monaco-editor/react";import*as p from"monaco-editor";import b from"@mui/icons-material/DarkMode";import x from"@mui/icons-material/LightMode";var v={base:"vs-dark",inherit:!0,rules:[{token:"tag",foreground:"714be3",fontStyle:"bold"},{token:"attribute.name",foreground:"87CEFA"},{token:"attribute.value",foreground:"98FB98"},{token:"variable",foreground:"00FFFF"},{token:"delimiter",foreground:"888888"},{token:"white",foreground:"AAAAAA"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#030202","editorLineNumber.foreground":"#858585","editorCursor.foreground":"#FFFFFF","editorIndentGuide.background":"#404040","editorIndentGuide.activeBackground":"#707070"}},k={base:"vs",inherit:!0,rules:[{token:"tag",foreground:"5928ED",fontStyle:"bold"},{token:"attribute.name",foreground:"AF00DB"},{token:"attribute.value",foreground:"008000"},{token:"variable",foreground:"B000B0"},{token:"delimiter",foreground:"808080"},{token:"white",foreground:"000000"}],colors:{"editor.foreground":"#000000","editor.background":"#FFFFFF","editorLineNumber.foreground":"#999999","editorCursor.foreground":"#000000","editorIndentGuide.background":"#CCCCCC","editorIndentGuide.activeBackground":"#999999"}},w=function(r){var o=r.isDarkMode,i=r.onChange;return t(a,e({onClick:function(){return i(!o)},sx:{width:52,height:24,borderRadius:"12px",bgcolor:o?"#5928ed":"#f0f0f0",border:"1px solid",borderColor:o?"#5928ed":"#d1d5db",display:"flex",alignItems:"center",px:.4,cursor:"pointer",transition:"all 0.2s",justifyContent:o?"flex-end":"flex-start"}},{children:t(a,e({sx:{width:18,height:18,borderRadius:"50%",bgcolor:o?"#1e1e2e":"#f59e0b",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"}},{children:t(o?b:x,{sx:{fontSize:11,color:"#fff"}})}))}))},C=function(i){var d=i.content,s=i.selectedTag,c=i.highlightVariable,f=i.isDarkMode,h=i.height,g=void 0===h?250:h,m=i.fontSize,b=void 0===m?12:m,x=n(),w=n();return l(function(){if(s&&x.current&&w.current){var e=x.current,r=e.getModel();if(r){for(var o=r.getValue().split("\n"),t=-1,i=0;i<o.length;i++){var n=o[i].match(/<([^\s>\/]+(?:\s[^\s>\/]+)*)/);if(n&&n[1].trim().toLowerCase()===s.toLowerCase()){t=i+1;break}}if(t>0){var l=t,a="</".concat(s.toLowerCase(),">");for(i=t;i<o.length;i++)if(o[i].toLowerCase().includes(a)){l=i+1;break}e.setSelection(new w.current.Selection(t,1,t,1)),e.trigger(null,"editor.unfold",{}),e.revealLineInCenterIfOutsideViewport(t);var d=e.deltaDecorations([],[{range:new w.current.Range(t,1,l,o[l-1].length+1),options:{isWholeLine:!0,className:"promptemon-highlight",inlineClassName:"promptemon-highlight"}}]);setTimeout(function(){return e.deltaDecorations(d,[])},2e3)}}}},[s]),l(function(){if(c&&x.current&&w.current){var e=x.current,r=e.getModel();if(r){for(var o=r.getValue().split("\n"),t=[],i=0;i<o.length;i++)for(var n=o[i].indexOf(c);-1!==n;)t.push(new p.Range(i+1,n+1,i+1,n+c.length+1)),n=o[i].indexOf(c,n+1);if(0!==t.length){e.revealLineInCenterIfOutsideViewport(t[0].startLineNumber);var l=e.deltaDecorations([],t.map(function(e){return{range:e,options:{inlineClassName:"promptemon-variable-highlight"}}}));setTimeout(function(){return e.deltaDecorations(l,[])},2e3)}}}},[c]),l(function(){w.current&&w.current.editor.setTheme(f?"promptemonDark":"promptemonLight")},[f]),r(o,{children:[t("style",{children:"\n .promptemon-highlight { background-color: rgba(89, 40, 237, 0.15); }\n .promptemon-variable-highlight { background-color: rgba(0, 255, 255, 0.2); border-radius: 2px; }\n "}),r(a,e({sx:{width:"100%",height:g,display:"flex",flexDirection:"column"}},{children:[t(a,{sx:{width:"100%",height:20,bgcolor:f?"#030202":"#fff",borderTopLeftRadius:8,borderTopRightRadius:8}}),t(a,e({sx:{flex:1,minHeight:0,overflow:"hidden"}},{children:t(u,{onMount:function(e,r){x.current=e,w.current=r,r.editor.defineTheme("promptemonDark",v),r.editor.defineTheme("promptemonLight",k),r.editor.setTheme(f?"promptemonDark":"promptemonLight"),r.languages.register({id:"promptemonLang"}),r.languages.setMonarchTokensProvider("promptemonLang",{tokenizer:{root:[[/(<)([a-zA-Z0-9\-]+)(\s*)/,["delimiter","tag","white"],"@tagBody"],[/(<\/)([a-zA-Z0-9\-]+)(\s*)(>)/,["delimiter","tag","white","delimiter"]],[/{{[^}]+}}/,"variable"]],tagBody:[[/[a-zA-Z0-9\:\-]+(?=\=)/,"attribute.name"],[/=/,"delimiter"],[/(".*?"|'.*?')/,"attribute.value"],[/\s+/,"white"],[/(\/?>)/,{token:"delimiter",next:"@pop"}]]}}),r.languages.registerFoldingRangeProvider("promptemonLang",{provideFoldingRanges:function(e){var r=e.getLinesContent(),o=[],t=[];return r.forEach(function(e,r){var i=r+1,n=e.match(/<([a-zA-Z0-9\-]+)(\s[^>]*)?>/),l=e.match(/<\/([a-zA-Z0-9\-]+)>/);if(n&&!e.includes("/>")&&t.push({tag:n[1],start:i}),l)for(var a=l[1],d=t.length-1;d>=0;d--)if(t[d].tag===a){o.push({start:t[d].start,end:i}),t.splice(d,1);break}}),o}})},beforeMount:function(e){e.editor.defineTheme("promptemonDark",v),e.editor.defineTheme("promptemonLight",k),e.editor.setTheme(f?"promptemonDark":"promptemonLight")},theme:f?"promptemonDark":"promptemonLight",value:d,language:"promptemonLang",onChange:function(){},options:{fontSize:b,minimap:{enabled:!1},wordWrap:"on",lineNumbers:"on",readOnly:!0,domReadOnly:!0,scrollBeyondLastLine:!1,padding:{top:4,bottom:12},folding:!0,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8}}})})),t(a,{sx:{width:"100%",height:20,bgcolor:f?"#030202":"#fff",borderBottomLeftRadius:8,borderBottomRightRadius:8}})]}))]})},y=function(n){var l=n.title,u=n.description,p=n.content,b=n.height,x=void 0===b?250:b,v=n.selectedTag,k=n.highlightVariable,y=i(!0),F=y[0],L=y[1],z=i(!1),D=z[0],B=z[1];return r(o,{children:[r(a,e({sx:{border:"1px solid #e5e7eb",borderRadius:"8px",overflow:"hidden"}},{children:[r(a,e({sx:{px:1.5,py:.75,bgcolor:"#f9fafb",borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t(d,e({sx:{fontSize:"0.72rem",color:"#374151",fontWeight:600}},{children:l})),r(a,e({sx:{display:"flex",alignItems:"center",gap:.75}},{children:[t(w,{isDarkMode:F,onChange:L}),t(s,e({title:"Fullscreen",placement:"top"},{children:t(a,e({onClick:function(){return B(!0)},sx:{cursor:"pointer",display:"flex",alignItems:"center",p:.3,borderRadius:"4px","&:hover":{bgcolor:"#e5e7eb"}}},{children:t(m,{sx:{fontSize:"0.9rem",color:"#6b7280"}})}))}))]}))]})),t(a,e({sx:{height:x,bgcolor:F?"#030202":"#fff"}},{children:t(C,{content:p,selectedTag:v,highlightVariable:k,isDarkMode:F,height:x,fontSize:12})}))]})),r(c,e({open:D,onClose:function(){return B(!1)},maxWidth:!1,PaperProps:{sx:{width:"82vw",height:"80vh",maxWidth:"none",borderRadius:"12px",overflow:"hidden",display:"flex",flexDirection:"column"}}},{children:[r(a,e({sx:{px:2.5,py:1.5,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[t(d,e({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:l})),t(f,e({size:"small",onClick:function(){return B(!1)}},{children:t(g,{sx:{fontSize:"1.1rem",color:"#6B7280"}})}))]})),r(a,e({sx:{flex:1,display:"flex",overflow:"hidden",minHeight:0}},{children:[u&&r(a,e({sx:{width:"35%",flexShrink:0,borderRight:"1px solid #E5E7EB",display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[r(a,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",gap:1}},{children:[t(h,{label:"APB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:10,height:20,borderRadius:1}}),t(d,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:l}))]})),t(a,e({sx:{flex:1,p:2,overflowY:"auto"}},{children:r(a,e({sx:{border:"1px solid #E5E7EB",borderRadius:"8px",p:1.5}},{children:[t(d,e({sx:{fontWeight:600,fontSize:"0.8rem",color:"#111827",mb:.75}},{children:"Description"})),t(d,e({sx:{fontSize:"0.73rem",color:"#6B7280",lineHeight:1.6}},{children:u}))]}))}))]})),r(a,e({sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",overflow:"hidden"}},{children:[r(a,e({sx:{px:2,py:1.25,borderBottom:"1px solid #E5E7EB",display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[t(d,e({sx:{fontWeight:600,fontSize:"0.85rem",color:"#111827"}},{children:"Prompt Preview"})),t(w,{isDarkMode:F,onChange:L})]})),t(a,e({sx:{flex:1,minHeight:0,p:1.5}},{children:t(C,{content:p,selectedTag:v,highlightVariable:k,isDarkMode:F,height:"100%",fontSize:13})}))]}))]}))]}))]})};export{y as default};
2
+ //# sourceMappingURL=PromptemonBlockViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptemonBlockViewer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__assign as e,__spreadArray as n}from"tslib";import{jsxs as o,jsx as t,Fragment as i}from"react/jsx-runtime";import{useState as r,useRef as l,useEffect as d}from"react";import{Box as a,Stack as c,IconButton as s,Typography as u,Button as f,Tooltip as p,Chip as h,TextField as g,Accordion as m,AccordionSummary as x,AccordionDetails as b,Select as v,MenuItem as y,Divider as w,Dialog as S}from"@mui/material";import z from"@mui/icons-material/ExpandMore";import C from"@mui/icons-material/EditOutlined";import _ from"@mui/icons-material/Close";import k from"@mui/icons-material/ArrowBack";import I from"@mui/icons-material/NavigateBefore";import W from"@mui/icons-material/NavigateNext";import R from"@mui/icons-material/InfoOutlined";import A from"@mui/icons-material/AutoFixHighOutlined";import B from"@mui/icons-material/Check";import F from"@mui/icons-material/Add";import L from"@mui/icons-material/DeleteOutline";import D from"@monaco-editor/react";import*as M from"monaco-editor";import T from"@mui/icons-material/DarkMode";import V from"@mui/icons-material/LightMode";var E={base:"vs-dark",inherit:!0,rules:[{token:"tag",foreground:"714be3",fontStyle:"bold"},{token:"attribute.name",foreground:"87CEFA"},{token:"attribute.value",foreground:"98FB98"},{token:"variable",foreground:"00FFFF"},{token:"delimiter",foreground:"888888"},{token:"white",foreground:"AAAAAA"}],colors:{"editor.foreground":"#FFFFFF","editor.background":"#030202","editorLineNumber.foreground":"#858585","editorCursor.foreground":"#FFFFFF","editorIndentGuide.background":"#404040","editorIndentGuide.activeBackground":"#707070"}},O={base:"vs",inherit:!0,rules:[{token:"tag",foreground:"5928ED",fontStyle:"bold"},{token:"attribute.name",foreground:"AF00DB"},{token:"attribute.value",foreground:"008000"},{token:"variable",foreground:"B000B0"},{token:"delimiter",foreground:"808080"},{token:"white",foreground:"000000"}],colors:{"editor.foreground":"#000000","editor.background":"#FFFFFF","editorLineNumber.foreground":"#999999","editorCursor.foreground":"#000000","editorIndentGuide.background":"#CCCCCC","editorIndentGuide.activeBackground":"#999999"}},P=function(n){var i=n.description,c=r(!1),s=c[0],f=c[1],p=r(!1),h=p[0],g=p[1],m=l(null);return d(function(){var e=m.current;e&&g(e.scrollHeight>e.clientHeight+1)},[i,s]),o(a,e({sx:{mt:1.5,border:"1px solid #e5e7eb",borderRadius:2,bgcolor:"#fff",display:"flex",flexDirection:"column",px:1.25,py:1}},{children:[t(u,e({ref:m,component:"div",sx:e({fontSize:11,color:"#6b7280",lineHeight:1.5,overflowY:s?"auto":"hidden",maxHeight:s?"calc(1.6em * 5)":"calc(1.6em * 3)",whiteSpace:"normal",display:s?"block":"-webkit-box"},s?{}:{WebkitBoxOrient:"vertical",WebkitLineClamp:3})},{children:i})),h&&t(u,e({component:"span",onClick:function(){return f(function(e){return!e})},sx:{mt:.75,alignSelf:"flex-end",fontSize:10,color:"#7c3aed",cursor:"pointer",fontWeight:500}},{children:s?"View less":"View more"}))]}))},j=function(n){var i=n.value,l=n.onChange,d=n.onDelete,f=r(!1),p=f[0],h=f[1];return o(a,e({sx:{display:"flex",alignItems:"flex-start",gap:1,p:1,border:"1px solid #e5e7eb",borderRadius:"8px",bgcolor:"#fff"}},{children:[t(a,e({sx:{width:18,height:18,borderRadius:"4px",bgcolor:"#f1f5f9",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,color:"#64748b",flexShrink:0,mt:.1}},{children:"a"})),p?t(g,{autoFocus:!0,value:i,onChange:function(e){return l(e.target.value)},onBlur:function(){return h(!1)},size:"small",fullWidth:!0,multiline:!0,sx:{"& .MuiOutlinedInput-input":{fontSize:12.5}}}):t(u,e({sx:{fontSize:12.5,color:"#374151",lineHeight:1.55,flex:1}},{children:i})),o(c,e({direction:"row",gap:.25,sx:{flexShrink:0}},{children:[t(s,e({size:"small",onClick:function(){return h(!0)},sx:{color:"#6b7280"}},{children:t(C,{sx:{fontSize:14}})})),t(s,e({size:"small",onClick:d,sx:{color:"#dc2626"}},{children:t(L,{sx:{fontSize:14}})}))]}))]}))},N=function(n){var o=n.isDarkMode,i=n.onChange;return t(a,e({onClick:function(){return i(!o)},sx:{width:52,height:24,borderRadius:"12px",bgcolor:o?"#5928ed":"#f0f0f0",border:"1px solid",borderColor:o?"#5928ed":"#d1d5db",display:"flex",alignItems:"center",px:.4,cursor:"pointer",transition:"all 0.2s",justifyContent:o?"flex-end":"flex-start"}},{children:t(a,e({sx:{width:18,height:18,borderRadius:"50%",bgcolor:o?"#1e1e2e":"#f59e0b",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s"}},{children:t(o?T:V,{sx:{fontSize:11,color:"#fff"}})}))}))},G=function(n){var r=n.content,c=n.selectedTag,s=n.highlightVariable,u=n.isDarkMode,f=n.height,p=void 0===f?250:f,h=n.fontSize,g=void 0===h?12:h,m=l(),x=l();return d(function(){if(c&&m.current&&x.current){var e=m.current,n=e.getModel();if(n){for(var o=n.getValue().split("\n"),t=-1,i=0;i<o.length;i++){var r=o[i].match(/<([^\s>\/]+(?:\s[^\s>\/]+)*)/);if(r&&r[1].trim().toLowerCase()===c.toLowerCase()){t=i+1;break}}if(t>0){var l=t,d="</".concat(c.toLowerCase(),">");for(i=t;i<o.length;i++)if(o[i].toLowerCase().includes(d)){l=i+1;break}e.setSelection(new x.current.Selection(t,1,t,1)),e.trigger(null,"editor.unfold",{}),e.revealLineInCenterIfOutsideViewport(t);var a=e.deltaDecorations([],[{range:new x.current.Range(t,1,l,o[l-1].length+1),options:{isWholeLine:!0,className:"promptemon-viewer-highlight",inlineClassName:"promptemon-viewer-highlight"}}]);setTimeout(function(){return e.deltaDecorations(a,[])},2e3)}}}},[c]),d(function(){if(s&&m.current&&x.current){var e=m.current,n=e.getModel();if(n){for(var o=n.getValue().split("\n"),t=[],i=0;i<o.length;i++)for(var r=o[i].indexOf(s);-1!==r;)t.push(new M.Range(i+1,r+1,i+1,r+s.length+1)),r=o[i].indexOf(s,r+1);if(0!==t.length){e.revealLineInCenterIfOutsideViewport(t[0].startLineNumber);var l=e.deltaDecorations([],t.map(function(e){return{range:e,options:{inlineClassName:"promptemon-viewer-variable-highlight"}}}));setTimeout(function(){return e.deltaDecorations(l,[])},2e3)}}}},[s]),d(function(){x.current&&x.current.editor.setTheme(u?"promptemonViewerDark":"promptemonViewerLight")},[u]),o(i,{children:[t("style",{children:"\n .promptemon-viewer-highlight { background-color: rgba(89, 40, 237, 0.15); }\n .promptemon-viewer-variable-highlight { background-color: rgba(0, 255, 255, 0.2); border-radius: 2px; }\n "}),o(a,e({sx:{width:"100%",height:p,display:"flex",flexDirection:"column"}},{children:[t(a,{sx:{width:"100%",height:20,bgcolor:u?"#030202":"#fff",borderTopLeftRadius:8,borderTopRightRadius:8}}),t(a,e({sx:{flex:1,minHeight:0,overflow:"hidden"}},{children:t(D,{onMount:function(e,n){m.current=e,x.current=n,n.editor.defineTheme("promptemonViewerDark",E),n.editor.defineTheme("promptemonViewerLight",O),n.editor.setTheme(u?"promptemonViewerDark":"promptemonViewerLight"),n.languages.register({id:"promptemonViewerLang"}),n.languages.setMonarchTokensProvider("promptemonViewerLang",{tokenizer:{root:[[/(<)([a-zA-Z0-9\-]+)(\s*)/,["delimiter","tag","white"],"@tagBody"],[/(<\/)([a-zA-Z0-9\-]+)(\s*)(>)/,["delimiter","tag","white","delimiter"]],[/{{[^}]+}}/,"variable"]],tagBody:[[/[a-zA-Z0-9\:\-]+(?=\=)/,"attribute.name"],[/=/,"delimiter"],[/(".*?"|'.*?')/,"attribute.value"],[/\s+/,"white"],[/(\/?>)/,{token:"delimiter",next:"@pop"}]]}}),n.languages.registerFoldingRangeProvider("promptemonViewerLang",{provideFoldingRanges:function(e){var n=e.getLinesContent(),o=[],t=[];return n.forEach(function(e,n){var i=n+1,r=e.match(/<([a-zA-Z0-9\-]+)(\s[^>]*)?>/),l=e.match(/<\/([a-zA-Z0-9\-]+)>/);if(r&&!e.includes("/>")&&t.push({tag:r[1],start:i}),l)for(var d=l[1],a=t.length-1;a>=0;a--)if(t[a].tag===d){o.push({start:t[a].start,end:i}),t.splice(a,1);break}}),o}})},beforeMount:function(e){e.editor.defineTheme("promptemonViewerDark",E),e.editor.defineTheme("promptemonViewerLight",O),e.editor.setTheme(u?"promptemonViewerDark":"promptemonViewerLight")},theme:u?"promptemonViewerDark":"promptemonViewerLight",value:r,language:"promptemonViewerLang",onChange:function(){},options:{fontSize:g,minimap:{enabled:!1},wordWrap:"on",lineNumbers:"on",readOnly:!0,domReadOnly:!0,scrollBeyondLastLine:!1,padding:{top:4,bottom:12},folding:!0,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible",verticalScrollbarSize:8}}})})),t(a,{sx:{width:"100%",height:20,bgcolor:u?"#030202":"#fff",borderBottomLeftRadius:8,borderBottomRightRadius:8}})]}))]})},H=function(i){var l,d,k,I,W=i.block,A=i.isExtracted,D=i.isSaved,M=i.showEditMode,T=i.onBlockUpdate,V=i.onTagSelect,E=i.onVariableSelect,O=i.categories,N=i.subCategories,G=i.selectedCategoryId,H=i.selectedSubCategoryId,Z=i.onCategoryChange,U=i.onSubCategoryChange,Y=r(!0),q=Y[0],J=Y[1],K=r(!0),Q=K[0],X=K[1],$=r(!0),ee=$[0],ne=$[1],oe=r(!0),te=oe[0],ie=oe[1],re=r(!1),le=re[0],de=re[1],ae=r(!0),ce=ae[0],se=ae[1],ue=r(!0),fe=ue[0],pe=ue[1],he=r(!1),ge=he[0],me=he[1],xe=r(!1),be=xe[0],ve=xe[1],ye=r(!1),we=ye[0],Se=ye[1],ze=r((null==W?void 0:W.title)||""),Ce=ze[0],_e=ze[1],ke=r((null==W?void 0:W.short_description)||""),Ie=ke[0],We=ke[1],Re=r((null==W?void 0:W.members)||[]),Ae=Re[0],Be=Re[1],Fe=r(Array.isArray(null==W?void 0:W.when_to_apply)?W.when_to_apply:(null==W?void 0:W.when_to_apply)?[W.when_to_apply]:[]),Le=Fe[0],De=Fe[1],Me=r(Array.isArray(null==W?void 0:W.when_not_to_apply)?W.when_not_to_apply:(null==W?void 0:W.when_not_to_apply)?[W.when_not_to_apply]:[]),Te=Me[0],Ve=Me[1],Ee=r(!1),Oe=Ee[0],Pe=Ee[1],je=r(""),Ne=je[0],Ge=je[1],He=r(""),Ze=He[0],Ue=He[1],Ye={boxShadow:"none",border:"1px solid #e5e7eb",borderRadius:"8px !important",mb:1.5,"&:before":{display:"none"},"&.Mui-expanded":{margin:"0 0 12px 0"}},qe={minHeight:44,px:2,borderRadius:2,"&.Mui-expanded":{minHeight:44},"& .MuiAccordionSummary-content":{my:"10px"}};return o(a,e({sx:{width:820,flexShrink:0,display:"flex",flexDirection:"column",overflow:"hidden",borderRight:"1px solid #e5e7eb"}},{children:[o(a,e({sx:{px:2.5,py:2,borderBottom:"1px solid #e5e7eb"}},{children:[o(c,e({direction:"row",alignItems:"center",justifyContent:"space-between"},{children:[o(c,e({direction:"row",alignItems:"center",gap:1,sx:{flex:1,minWidth:0}},{children:[t(p,e({title:"Functional Prompt Block",placement:"top"},{children:t(h,{label:"FPB",size:"small",sx:{bgcolor:"#f1f5f9",color:"#475569",fontWeight:700,fontSize:11,height:22,borderRadius:1}})})),we?t(g,{value:Ce,onChange:function(e){return _e(e.target.value)},size:"small",fullWidth:!0,sx:{"& .MuiOutlinedInput-input":{fontSize:15,fontWeight:700,py:.5}}}):t(u,e({sx:{fontWeight:700,fontSize:15,color:"#111827"}},{children:(null==W?void 0:W.title)||"—"}))]})),we?o(c,e({direction:"row",gap:.5},{children:[t(s,e({size:"small",sx:{color:"#6b7280"},onClick:function(){return Se(!1)}},{children:t(_,{sx:{fontSize:16}})})),t(s,e({size:"small",sx:{color:"#16a34a"},onClick:function(){T(e(e({},W),{title:Ce,short_description:Ie,members:Ae,when_to_apply:Le,when_not_to_apply:Te})),Se(!1)}},{children:t(B,{sx:{fontSize:16}})}))]})):!D&&M&&t(s,e({size:"small",sx:{color:"#6b7280"},onClick:function(){_e((null==W?void 0:W.title)||""),We((null==W?void 0:W.short_description)||""),Be((null==W?void 0:W.members)||[]),De(Array.isArray(null==W?void 0:W.when_to_apply)?W.when_to_apply:(null==W?void 0:W.when_to_apply)?[W.when_to_apply]:[]),Ve(Array.isArray(null==W?void 0:W.when_not_to_apply)?W.when_not_to_apply:(null==W?void 0:W.when_not_to_apply)?[W.when_not_to_apply]:[]),Se(!0)}},{children:t(C,{sx:{fontSize:16}})}))]})),we&&t(u,e({sx:{fontSize:11,color:"#5928ed",mt:.5}},{children:"Editing — changes won't be saved until you confirm"})),we?t(g,{value:Ie,onChange:function(e){return We(e.target.value)},size:"small",fullWidth:!0,multiline:!0,minRows:3,sx:{mt:1.5,"& .MuiOutlinedInput-input":{fontSize:12}}}):t(P,{description:(null==W?void 0:W.short_description)||"—"}),o(a,e({sx:{mt:1.5,border:"0.5px solid #d1d5db",borderRadius:"8px",display:"flex",overflow:"hidden"}},{children:[t(a,e({sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #d1d5db",p:.5}},{children:o(c,e({direction:"row",alignItems:"center",gap:1},{children:[t(u,e({sx:{fontSize:10,color:"#87898d"}},{children:"Total APBs :"})),t(u,e({sx:{fontSize:10,fontWeight:700,color:"#5f5f5f"}},{children:(null===(l=null==W?void 0:W.members)||void 0===l?void 0:l.length)||0}))]}))})),t(a,e({sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",p:.5}},{children:o(c,e({direction:"row",alignItems:"center",gap:1},{children:[t(u,e({sx:{fontSize:10,color:"#87898d"}},{children:"Total Lines :"})),t(u,e({sx:{fontSize:10,fontWeight:700,color:"#5f5f5f"}},{children:(null===(d=null==W?void 0:W.members)||void 0===d?void 0:d.reduce(function(e,n){var o,t;return e+((null!==(o=n.end_line)&&void 0!==o?o:0)-(null!==(t=n.start_line)&&void 0!==t?t:0)+1)},0))||0}))]}))}))]}))]})),o(a,e({sx:{flex:1,overflow:"auto",px:2,py:2,"&::-webkit-scrollbar":{width:4},"&::-webkit-scrollbar-thumb":{bgcolor:"#e5e7eb",borderRadius:2}}},{children:[o(m,e({expanded:q,onChange:function(){return J(function(e){return!e})},sx:Ye,disableGutters:!0},{children:[t(x,e({expandIcon:t(z,{sx:{fontSize:18}}),sx:qe},{children:t(u,e({sx:{fontSize:13,fontWeight:600,color:"#374151"}},{children:"Categories"}))})),t(b,e({sx:{pt:0,px:2,pb:2}},{children:o(c,e({gap:1.5},{children:[o(a,{children:[t(u,e({sx:{fontSize:12,color:"#6b7280",mb:.5}},{children:"Category"})),we?t(v,e({fullWidth:!0,size:"small",value:G,onChange:function(e){Z(e.target.value),U("")},sx:{fontSize:13,borderRadius:1.5,"& fieldset":{borderColor:"#e5e7eb"}}},{children:O.map(function(n){return t(y,e({value:n.category_id},{children:n.category_name}),n.category_id)})})):t(g,{fullWidth:!0,size:"small",value:(null===(k=O.find(function(e){return e.category_id===G}))||void 0===k?void 0:k.category_name)||"—",InputProps:{readOnly:!0},sx:{"& .MuiOutlinedInput-root":{fontSize:13,borderRadius:1.5,"& fieldset":{borderColor:"#e5e7eb"}}}})]}),o(a,{children:[t(u,e({sx:{fontSize:12,color:"#6b7280",mb:.5}},{children:"Sub-Category"})),we?t(v,e({fullWidth:!0,size:"small",value:H,onChange:function(e){return U(e.target.value)},disabled:!G,sx:{fontSize:13,borderRadius:1.5,"& fieldset":{borderColor:"#e5e7eb"}}},{children:N.filter(function(e){return e.category_id===G}).map(function(n){return t(y,e({value:n.sub_category_id},{children:n.sub_category_name}),n.sub_category_id)})})):t(g,{fullWidth:!0,size:"small",value:(null===(I=N.find(function(e){return e.sub_category_id===H}))||void 0===I?void 0:I.sub_category_name)||"—",InputProps:{readOnly:!0},sx:{"& .MuiOutlinedInput-root":{fontSize:13,borderRadius:1.5,"& fieldset":{borderColor:"#e5e7eb"}}}})]})]}))}))]})),o(m,e({expanded:Q,onChange:function(){return X(function(e){return!e})},sx:Ye,disableGutters:!0},{children:[t(x,e({expandIcon:t(z,{sx:{fontSize:18}}),sx:qe},{children:t(u,e({sx:{fontSize:13,fontWeight:600,color:"#374151"}},{children:"Atomic Prompt Blocks (APBs)"}))})),o(b,e({sx:{pt:0,px:1,pb:2}},{children:[t(c,e({gap:1},{children:(we?Ae:(null==W?void 0:W.members)||[]).map(function(n,i){return o(a,e({sx:{px:2,py:1,borderRadius:2,bgcolor:"#fff"}},{children:[o(a,e({sx:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",mb:1,gap:1}},{children:[o(u,e({sx:{fontSize:14,fontWeight:500,color:"#111827"}},{children:[i+1,". ",n.section_name]})),we?t(s,e({size:"small",onClick:function(){return Be(function(e){return e.filter(function(e,n){return n!==i})})},sx:{color:"#dc2626",flexShrink:0}},{children:t(L,{sx:{fontSize:16}})})):t(a,e({onClick:function(){return V(n.section_name.split("_").map(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}).join("_"))},sx:{fontSize:14,color:"#475569",cursor:"pointer",flexShrink:0}},{children:"↗"}))]})),t(u,e({sx:{fontSize:12,lineHeight:1.5,color:"#64748b"}},{children:n.reason_for_inclusion})),A&&(r=n.segments||[],0===r.length?null:t(a,e({sx:{mt:1}},{children:t(a,e({sx:{display:"flex",flexWrap:"wrap",gap:1}},{children:r.map(function(e,n){return t(h,{clickable:!0,onClick:function(){return E(e.segmentized_text)},label:e.segmentized_text,sx:{borderRadius:1,bgcolor:"#eff6ff",color:"#3b82f6",border:"1px dashed #bfdbfe"}},n)})}))}))),t(w,{sx:{mt:2}})]}),i);var r})})),we&&o(a,e({onClick:function(){Ge(""),Ue(""),Pe(!0)},sx:{mt:1,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,py:1,border:"1px dashed #d1d5db",borderRadius:1.5,cursor:"pointer",color:"#5928ed",fontSize:13,fontWeight:600,"&:hover":{bgcolor:"#f5f0ff"}}},{children:[t(F,{sx:{fontSize:16}})," Add APB"]}))]}))]})),o(m,e({expanded:ee,onChange:function(){return ne(function(e){return!e})},sx:Ye,disableGutters:!0},{children:[t(x,e({expandIcon:t(z,{sx:{fontSize:18}}),sx:qe},{children:o(u,e({sx:{fontSize:14,fontWeight:600,color:"#374151",display:"flex",alignItems:"center",flexDirection:"row"}},{children:["Applicability ",t("span",e({style:{color:"#94a3b8",fontWeight:400,fontSize:10,marginLeft:"12px"}},{children:"• When to apply / When not to apply"}))]}))})),o(b,e({sx:{pt:0,px:1.5,pb:1.5}},{children:[o(m,e({expanded:te,onChange:function(){return ie(function(e){return!e})},sx:{boxShadow:"none",border:"1px solid #e5e7eb",borderRadius:"6px !important",mb:1,"&:before":{display:"none"},"&.Mui-expanded":{margin:"0 0 8px 0"}},disableGutters:!0},{children:[t(x,e({expandIcon:t(z,{sx:{fontSize:16}}),sx:e(e({},qe),{bgcolor:"#f9fafb",borderRadius:"6px"})},{children:t(u,e({sx:{fontSize:12.5,fontWeight:500,color:"#374151"}},{children:"When to Apply this FPB"}))})),t(b,e({sx:{pt:.5,px:2,pb:1.5}},{children:o(c,e({gap:.75},{children:[(we?Le:Array.isArray(null==W?void 0:W.when_to_apply)?W.when_to_apply:(null==W?void 0:W.when_to_apply)?[W.when_to_apply]:["— Not yet available"]).map(function(n,i){return we?t(j,{value:n,onChange:function(e){return De(function(n){return n.map(function(n,o){return o===i?e:n})})},onDelete:function(){return De(function(e){return e.filter(function(e,n){return n!==i})})}},i):o(c,e({direction:"row",gap:1,alignItems:"flex-start"},{children:[o(u,e({sx:{fontSize:12,color:"#374151",fontWeight:700,mt:.1}},{children:[i+1,"."]})),t(u,e({sx:{fontSize:12.5,color:"#374151",lineHeight:1.55}},{children:n}))]}),i)}),we&&o(a,e({onClick:function(){return De(function(e){return n(n([],e,!0),[""],!1)})},sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,py:.75,border:"1px dashed #d1d5db",borderRadius:1.5,cursor:"pointer",color:"#5928ed",fontSize:12.5,fontWeight:600,"&:hover":{bgcolor:"#f5f0ff"}}},{children:[t(F,{sx:{fontSize:15}})," Add When to Apply"]}))]}))}))]})),o(m,e({expanded:le,onChange:function(){return de(function(e){return!e})},sx:{boxShadow:"none",border:"1px solid #e5e7eb",borderRadius:"6px !important","&:before":{display:"none"}},disableGutters:!0},{children:[t(x,e({expandIcon:t(z,{sx:{fontSize:16}}),sx:e(e({},qe),{bgcolor:"#f9fafb",borderRadius:"6px"})},{children:t(u,e({sx:{fontSize:12.5,fontWeight:500,color:"#374151"}},{children:"When NOT to Apply this FPB"}))})),t(b,e({sx:{pt:.5,px:2,pb:1.5}},{children:we?o(c,e({gap:.75},{children:[Te.map(function(e,n){return t(j,{value:e,onChange:function(e){return Ve(function(o){return o.map(function(o,t){return t===n?e:o})})},onDelete:function(){return Ve(function(e){return e.filter(function(e,o){return o!==n})})}},n)}),o(a,e({onClick:function(){return Ve(function(e){return n(n([],e,!0),[""],!1)})},sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:.5,py:.75,border:"1px dashed #d1d5db",borderRadius:1.5,cursor:"pointer",color:"#5928ed",fontSize:12.5,fontWeight:600,"&:hover":{bgcolor:"#f5f0ff"}}},{children:[t(F,{sx:{fontSize:15}})," Add When NOT to Apply"]}))]})):Array.isArray(null==W?void 0:W.when_not_to_apply)||(null==W?void 0:W.when_not_to_apply)?t(c,e({gap:.75},{children:(Array.isArray(null==W?void 0:W.when_not_to_apply)?W.when_not_to_apply:[W.when_not_to_apply]).map(function(n,i){return o(c,e({direction:"row",gap:1,alignItems:"flex-start"},{children:[o(u,e({sx:{fontSize:12,color:"#374151",fontWeight:700,mt:.1}},{children:[i+1,"."]})),t(u,e({sx:{fontSize:12.5,color:"#374151",lineHeight:1.55}},{children:n}))]}),i)})})):t(u,e({sx:{fontSize:12.5,color:"#9ca3af",fontStyle:"italic"}},{children:"No conditions defined yet."}))}))]}))]}))]})),o(m,e({expanded:ce,onChange:function(){return se(function(e){return!e})},sx:Ye,disableGutters:!0},{children:[t(x,e({expandIcon:t(z,{sx:{fontSize:18}}),sx:qe},{children:o(u,e({sx:{fontSize:14,fontWeight:600,color:"#374151",display:"flex",alignItems:"center",flexDirection:"row"}},{children:["Specifications ",t("span",e({style:{color:"#94a3b8",fontWeight:400,fontSize:10,marginLeft:"12px"}},{children:"• Strict Rules / Input / Output"}))]}))})),t(b,e({sx:{pt:0,px:1.5,pb:1.5}},{children:[{label:"Guidelines",expanded:fe,setExpanded:pe,content:null==W?void 0:W.additional_guidelines},{label:"Input",expanded:ge,setExpanded:me,content:null},{label:"Output",expanded:be,setExpanded:ve,content:null}].map(function(n,i){var r=n.label,l=n.expanded,d=n.setExpanded,a=n.content;return o(m,e({expanded:l,onChange:function(){return d(function(e){return!e})},sx:{boxShadow:"none",border:"1px solid #e5e7eb",borderRadius:"6px !important",mb:i<2?1:0,"&:before":{display:"none"},"&.Mui-expanded":{margin:i<2?"0 0 8px 0":0}},disableGutters:!0},{children:[t(x,e({expandIcon:t(z,{sx:{fontSize:16}}),sx:e(e({},qe),{bgcolor:"#f9fafb",borderRadius:"6px"})},{children:o(c,e({direction:"row",alignItems:"center",gap:.5},{children:[t(u,e({sx:{fontSize:12.5,fontWeight:500,color:"#374151"}},{children:r})),"Guidelines"!==r&&t(R,{sx:{fontSize:13,color:"#9ca3af"}})]}))})),t(b,e({sx:{pt:.5,px:2,pb:1.5}},{children:t(u,e({sx:{fontSize:12.5,color:a?"#374151":"#9ca3af",fontStyle:a?"normal":"italic"}},{children:a||"No ".concat(r.toLowerCase()," defined yet.")}))}))]}),r)})}))]}))]})),o(S,e({open:Oe,onClose:function(){return Pe(!1)},maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{borderRadius:"12px"}}},{children:[o(a,e({sx:{px:3,py:2,display:"flex",alignItems:"center",justifyContent:"space-between",borderBottom:"1px solid #e5e7eb"}},{children:[t(u,e({sx:{fontWeight:700,fontSize:"1rem",color:"#111827"}},{children:"Add new APB"})),t(s,e({size:"small",onClick:function(){return Pe(!1)}},{children:t(_,{sx:{fontSize:"1.1rem",color:"#6b7280"}})}))]})),o(a,e({sx:{px:3,py:2.5,display:"flex",flexDirection:"column",gap:2}},{children:[o(a,{children:[t(u,e({sx:{fontSize:13,fontWeight:600,color:"#374151",mb:.75}},{children:"Title"})),t(g,{fullWidth:!0,size:"small",placeholder:"Specify the title of APB",value:Ne,onChange:function(e){return Ge(e.target.value)}})]}),o(a,{children:[t(u,e({sx:{fontSize:13,fontWeight:600,color:"#374151",mb:.75}},{children:"Description"})),t(g,{fullWidth:!0,size:"small",multiline:!0,minRows:3,placeholder:"Describe the APB",value:Ze,onChange:function(e){return Ue(e.target.value)}})]})]})),o(a,e({sx:{px:3,py:2,display:"flex",justifyContent:"flex-end",gap:1,borderTop:"1px solid #e5e7eb"}},{children:[t(f,e({variant:"outlined",onClick:function(){return Pe(!1)},sx:{textTransform:"none",borderColor:"#d1d5db",color:"#374151"}},{children:"Cancel"})),t(f,e({variant:"contained",onClick:function(){Be(function(e){return n(n([],e,!0),[{section_name:Ne,reason_for_inclusion:Ze,content:""}],!1)}),Pe(!1)},sx:{textTransform:"none",bgcolor:"#5928ed","&:hover":{bgcolor:"#4c1d95"}}},{children:"Save"}))]}))]}))]}))},Z=function(n){var i,l,d,p,h,g=n.block,m=n.onBlockUpdate,x=n.isExtracting,b=n.isExtracted,v=n.onExtractSegments,y=n.isSaving,w=n.isSaved,S=n.onSave,z=n.onBack,C=n.title,R=void 0===C?"FPB Promptemon":C,B=n.categories,F=n.subCategories,L=n.selectedCategoryId,D=n.selectedSubCategoryId,M=n.onCategoryChange,T=n.onSubCategoryChange,V=n.showEditMode,E=void 0===V||V,O=n.showExtractSegments,P=void 0===O||O,j=r(1),Z=j[0],U=j[1],Y=r(!0),q=Y[0],J=Y[1],K=r(""),Q=K[0],X=K[1],$=r(""),ee=$[0],ne=$[1],oe=(null===(i=null==g?void 0:g.members)||void 0===i?void 0:i.map(function(e){if(!b||!e.segments||0===e.segments.length)return e.content||"";var n=e.content||"";return e.segments.forEach(function(e){e.raw_text&&e.segmentized_text&&(n=n.split(e.raw_text).join(e.segmentized_text))}),n}).join("\n\n"))||"";return o(a,e({sx:{width:"100%",height:"100%",display:"flex",flexDirection:"column",bgcolor:"#fff",overflow:"hidden"}},{children:[o(a,e({sx:{px:2.5,py:1.5,borderBottom:"1px solid #e5e7eb",display:"flex",alignItems:"center",justifyContent:"space-between",bgcolor:"#fff",flexShrink:0}},{children:[o(c,e({direction:"row",alignItems:"center",gap:1},{children:[t(s,e({size:"small",sx:{color:"#6b7280"},onClick:z},{children:t(k,{sx:{fontSize:18}})})),t(u,e({sx:{fontSize:14,fontWeight:600,color:"#111827"}},{children:R}))]})),o(a,e({sx:{display:"flex",alignItems:"center",gap:1}},{children:[t(f,e({variant:"contained",size:"small",disabled:!b||y||w,onClick:S,sx:{textTransform:"none",fontSize:"0.78rem",fontWeight:600,bgcolor:"#5928ed",px:2,py:.6,"&:hover":{bgcolor:"#4c1d95"},"&.Mui-disabled":{bgcolor:"#5928ed",color:"#fff",opacity:.4}}},{children:y?"Saving...":w?"Saved ✓":"Save FPB"})),t(s,e({size:"small",sx:{color:"#6b7280"},onClick:z},{children:t(_,{sx:{fontSize:18}})}))]}))]})),o(a,e({sx:{display:"flex",flex:1,overflow:"hidden"}},{children:[t(H,{block:g,isExtracted:b,isSaved:w,showEditMode:E,onBlockUpdate:m,onTagSelect:function(e){X(""),setTimeout(function(){return X(e)},50)},onVariableSelect:function(e){ne(""),setTimeout(function(){return ne(e)},50)},categories:B,subCategories:F,selectedCategoryId:L,selectedSubCategoryId:D,onCategoryChange:M,onSubCategoryChange:T}),o(a,e({sx:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden",p:2,gap:1.5}},{children:[o(a,e({sx:{display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0}},{children:[o(c,e({direction:"row",alignItems:"center",gap:1},{children:[o(u,e({sx:{fontSize:13,fontWeight:600,color:"#374151"}},{children:[(null==g?void 0:g.title)||"—"," APBs"]})),o(c,e({direction:"row",alignItems:"center",gap:.5},{children:[t(s,e({size:"small",onClick:function(){return U(function(e){return Math.max(1,e-1)})},disabled:1===Z,sx:{color:"#6b7280",p:.4}},{children:t(I,{sx:{fontSize:16}})})),o(u,e({sx:{fontSize:12.5,color:"#6b7280"}},{children:[Z," of ",(null===(l=null==g?void 0:g.members)||void 0===l?void 0:l.length)||0]})),t(s,e({size:"small",onClick:function(){return U(function(e){var n;return Math.min((null===(n=null==g?void 0:g.members)||void 0===n?void 0:n.length)||0,e+1)})},disabled:Z===((null===(d=null==g?void 0:g.members)||void 0===d?void 0:d.length)||0),sx:{color:"#6b7280",p:.4}},{children:t(W,{sx:{fontSize:16}})}))]}))]})),t(c,e({direction:"row",alignItems:"center",gap:1.5},{children:P&&(b?o(c,e({direction:"row",alignItems:"center",gap:1},{children:[t(u,e({sx:{fontSize:12.5,color:"#6b7280"}},{children:"Show Segments"})),t(a,e({sx:{width:36,height:20,borderRadius:"10px",bgcolor:"#7c3aed",display:"flex",alignItems:"center",px:.3,cursor:"pointer"}},{children:t(a,{sx:{width:14,height:14,borderRadius:"50%",bgcolor:"#fff",ml:"auto"}})}))]})):o(a,e({onClick:v,sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.85,borderRadius:1.5,bgcolor:"#7c3aed",cursor:x?"default":"pointer","&:hover":{bgcolor:"#6d28d9"},userSelect:"none",opacity:x?.7:1}},{children:[t(A,{sx:{fontSize:15,color:"#fff"}}),t(u,e({sx:{fontSize:13,fontWeight:600,color:"#fff"}},{children:x?"Extracting...":"Extract Segments"}))]})))}))]})),o(a,e({sx:{flex:1,minHeight:0,position:"relative"}},{children:[x&&t(a,e({sx:{position:"absolute",top:0,left:0,right:0,bottom:0,bgcolor:"rgba(0,0,0,0.6)",zIndex:10,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1}},{children:t(u,e({sx:{color:"#fff",fontSize:14,fontWeight:600}},{children:"Extracting segments..."}))})),o(a,e({sx:{border:"1px solid #30363d",borderRadius:1,overflow:"hidden",height:"100%"}},{children:[o(a,e({sx:{px:2,py:1,borderBottom:"1px solid #30363d",display:"flex",alignItems:"center",gap:1,bgcolor:"#161b22",flexShrink:0}},{children:[t(a,{sx:{width:12,height:12,borderRadius:"50%",bgcolor:"#ff5f57"}}),t(a,{sx:{width:12,height:12,borderRadius:"50%",bgcolor:"#febc2e"}}),t(a,{sx:{width:12,height:12,borderRadius:"50%",bgcolor:"#28c840"}}),o(u,e({sx:{ml:1,fontSize:11,color:"#8b949e",fontFamily:"monospace"}},{children:[(null===(h=null===(p=null==g?void 0:g.members)||void 0===p?void 0:p[Z-1])||void 0===h?void 0:h.section_name)||"—",".xml"]})),t(a,{sx:{flex:1}}),t(N,{isDarkMode:q,onChange:J})]})),t(G,{content:oe,selectedTag:Q,highlightVariable:ee,isDarkMode:q,height:"100%",fontSize:14})]}))]}))]}))]}))]}))};export{Z as default};
2
+ //# sourceMappingURL=PromptemonViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptemonViewer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
1
+ export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompareTest.d.ts","sourceRoot":"","sources":["../../../src/CognitiveCompareTest.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,oBAAoB,+CA4MzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"CognitiveCompareTest.d.ts","sourceRoot":"","sources":["../../../src/CognitiveCompareTest.tsx"],"names":[],"mappings":"AAOA,QAAA,MAAM,oBAAoB,+CAkNzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const PromptemonBlockViewerTest: () => import("react/jsx-runtime").JSX.Element;
2
+ export default PromptemonBlockViewerTest;
3
+ //# sourceMappingURL=PromptemonBlockViewerTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptemonBlockViewerTest.d.ts","sourceRoot":"","sources":["../../../src/PromptemonBlockViewerTest.tsx"],"names":[],"mappings":"AAyBA,QAAA,MAAM,yBAAyB,+CAqC9B,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const PromptemonViewerTest: () => import("react/jsx-runtime").JSX.Element;
2
+ export default PromptemonViewerTest;
3
+ //# sourceMappingURL=PromptemonViewerTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PromptemonViewerTest.d.ts","sourceRoot":"","sources":["../../../src/PromptemonViewerTest.tsx"],"names":[],"mappings":"AA+CA,QAAA,MAAM,oBAAoB,+CAiEzB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -2,6 +2,8 @@ import React, { CSSProperties } from "react";
2
2
  interface CitationAnchorProps {
3
3
  href: string;
4
4
  children: any;
5
+ citationType?: string;
6
+ citationReason?: string;
5
7
  chevronUpComponent?: React.ReactNode;
6
8
  chevronDownComponent?: React.ReactNode;
7
9
  customStyle?: {
@@ -21,6 +23,7 @@ interface CitationAnchorProps {
21
23
  };
22
24
  defaultState?: boolean;
23
25
  metaData?: any;
26
+ onFullscreenChange?: (isFullscreen: boolean) => void;
24
27
  }
25
28
  declare const CitationAnchor: React.FC<CitationAnchorProps>;
26
29
  export default CitationAnchor;
@@ -1 +1 @@
1
- {"version":3,"file":"CitationAnchor.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CitationAnchor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EACV,aAAa,EAKhB,MAAM,OAAO,CAAC;AAKf,UAAU,mBAAmB;IACzB,IAA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,EAAE,KAAK,CAAC,SAAS,CAAC;IACvC,WAAW,CAAC,EAAE;QACV,qBAAqB,CAAC,EAAE,aAAa,CAAC;QACtC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,cAAc,CAAC,EAAE,aAAa,CAAC;QAC/B,iBAAiB,CAAC,EAAE,aAAa,CAAC;QAClC,UAAU,CAAC,EAAE,aAAa,CAAC;QAC3B,QAAQ,CAAC,EAAE,aAAa,CAAC;QACzB,SAAS,CAAC,EAAE,aAAa,CAAC;QAC1B,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,mBAAmB,CAAC,EAAE,aAAa,CAAC;QACpC,eAAe,CAAC,EAAE,aAAa,CAAC;QAChC,oBAAoB,CAAC,EAAE,aAAa,CAAC;QACrC,eAAe,CAAC,EAAE,aAAa,CAAC;KACnC,CAAC;IACF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;CACxD;AAuaD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwNjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -4,8 +4,10 @@ type Props = {
4
4
  citations?: Record<string, any>;
5
5
  styles?: Record<string, any>;
6
6
  docData?: Record<string, any> | null;
7
+ deviationData?: Record<string, any> | null;
7
8
  open: boolean;
9
+ onCitationFullscreenChange?: (isFullscreen: boolean) => void;
8
10
  };
9
- declare function CitationRenderer({ content, title, citations, styles, docData, open }: Props): import("react/jsx-runtime").JSX.Element;
11
+ declare function CitationRenderer({ content, title, citations, styles, docData, deviationData, open, onCitationFullscreenChange, }: Props): import("react/jsx-runtime").JSX.Element;
10
12
  export default CitationRenderer;
11
13
  //# sourceMappingURL=CitationRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CitationRenderer.tsx"],"names":[],"mappings":"AAKA,KAAK,KAAK,GAAG;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACrC,IAAI,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,iBAAS,gBAAgB,CAAC,EACtB,OAAY,EACZ,KAAU,EACV,SAAc,EACd,MAAW,EACX,OAAmC,EACnC,IAAI,EACP,EAAE,KAAK,2CA2EP;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"CitationRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CitationRenderer.tsx"],"names":[],"mappings":"AAOA,KAAK,KAAK,GAAG;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,0BAA0B,CAAC,EAAE,CAAC,YAAY,EAAE,OAAO,KAAK,IAAI,CAAC;CAChE,CAAA;AAkCD,iBAAS,gBAAgB,CAAC,EACtB,OAAY,EACZ,KAAU,EACV,SAAc,EACd,MAAW,EACX,OAAmC,EACnC,aAAoB,EACpB,IAAI,EACJ,0BAA0B,GAC7B,EAAE,KAAK,2CAmHP;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { CognitiveCompareProps } from "./CognitiveCompareTypes";
2
2
  import { SHARED_MARKDOWN_STYLES } from "./CognitiveCompareConfig";
3
- declare const CognitiveCompare: ({ componentHeaderText, treeData, comparisonConfig, leftColumnTitleText, rightColumnTitleText, markdownStyles, resetTrigger, displayConfig, onMaintainRelativeOrderChange, popupConfig, deviationData, deviationNodeIdToView, resetDeviationNodeId, isProposingFix, proposingFixNodeId, isRedlineFlow, badgeStyleOverride, }: CognitiveCompareProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const CognitiveCompare: ({ componentHeaderText, treeData, comparisonConfig, leftColumnTitleText, rightColumnTitleText, markdownStyles, resetTrigger, displayConfig, onMaintainRelativeOrderChange, popupConfig, deviationData, deviationNodeIdToView, resetDeviationNodeId, isProposingFix, proposingFixNodeId, isRedlineFlow, badgeStyleOverride, guidelinesData, gptWebCitationConfig }: CognitiveCompareProps) => import("react/jsx-runtime").JSX.Element;
4
4
  export { SHARED_MARKDOWN_STYLES };
5
5
  export default CognitiveCompare;
6
6
  //# sourceMappingURL=CognitiveCompare.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompare.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompare.tsx"],"names":[],"mappings":"AA0CA,OAAO,EAEL,qBAAqB,EAOtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AA0BlC,QAAA,MAAM,gBAAgB,gUA2BnB,qBAAqB,4CA6iFvB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CognitiveCompare.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompare.tsx"],"names":[],"mappings":"AA4CA,OAAO,EAEL,qBAAqB,EAOtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,sBAAsB,EACvB,MAAM,0BAA0B,CAAC;AA6BlC,QAAA,MAAM,gBAAgB,qWA6BnB,qBAAqB,4CAm7FvB,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,eAAe,gBAAgB,CAAC"}
@@ -94,7 +94,17 @@ export type ConflictBadgeStyleFn = (scoreText: string | null | undefined) => {
94
94
  text: string;
95
95
  border: string;
96
96
  } | null;
97
+ export interface GptWebCitationConfig {
98
+ endpoint: string;
99
+ userEmail: string;
100
+ userId: string;
101
+ userName: string;
102
+ headers?: Record<string, string>;
103
+ }
97
104
  export interface CognitiveCompareProps {
105
+ guidelinesData?: Record<string, any> | null;
106
+ gptWebCitationConfig?: GptWebCitationConfig;
107
+ isGuidelineMode?: boolean;
98
108
  componentHeaderText?: string;
99
109
  treeData?: Record<string, any> | null;
100
110
  comparisonConfig?: Partial<ComparisonConfig>;
@@ -177,6 +187,10 @@ export interface CognitivePopupProps {
177
187
  }
178
188
  export type SectionBlock = {
179
189
  id?: string;
190
+ nodeId?: string;
191
+ contentId?: string;
192
+ parentContentId?: string | null;
193
+ refContentIds?: string[];
180
194
  title: string;
181
195
  content: string;
182
196
  change_history?: string;
@@ -188,6 +202,7 @@ export type SectionBlock = {
188
202
  selfIndex?: number;
189
203
  refIndexes?: number[];
190
204
  evaluationResult?: DeviationDataEntry;
205
+ evaluationResults?: DeviationDataEntry[];
191
206
  displayContent?: boolean;
192
207
  displayTitle?: boolean;
193
208
  };
@@ -204,6 +219,7 @@ export type SectionPopupState = {
204
219
  docData: Record<string, any> | null;
205
220
  deviationData?: DeviationDataEntry | null;
206
221
  isLoading?: boolean;
222
+ hasGuidelineMatches?: boolean;
207
223
  };
208
224
  export type Row = {
209
225
  left?: SectionBlock;
@@ -252,6 +268,9 @@ export interface CachedBadgePosition {
252
268
  rhsArrayIdx: number | string;
253
269
  styleColor: string;
254
270
  styleId: string;
271
+ styleBg?: string;
272
+ styleText?: string;
273
+ centerX?: number;
255
274
  }
256
275
  export type CognitiveSummaryPopupProps = {
257
276
  open: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"CognitiveCompareTypes.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompareTypes.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,0BAA0B,EAAE;QAC1B,OAAO,EAAE;YACP,aAAa,EAAE,MAAM,CAAC;YACtB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,GACV,uBAAuB,GACvB;gBAAE,KAAK,EAAE,MAAM,CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;aAAE,CAAC;SAC1D,CAAC;KACH,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,qBAAqB,CAAC,EAAE;QACtB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC/B,gBAAgB,CAAC,EAAE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IAAI,CAAC;IAC7C,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAA;AAGD,MAAM,MAAM,cAAc,GAAG;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEJ,MAAM,MAAM,SAAS,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,IAAI,MAAM,CAC3E,GAAG,EACH,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAChC,CAAC"}
1
+ {"version":3,"file":"CognitiveCompareTypes.d.ts","sourceRoot":"","sources":["../../../../../src/features/CognitiveCompare/CognitiveCompareTypes.ts"],"names":[],"mappings":";AAEA,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE;QACX,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;QACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,0BAA0B,EAAE;QAC1B,OAAO,EAAE;YACP,aAAa,EAAE,MAAM,CAAC;YACtB,eAAe,EAAE,MAAM,CAAC;SACzB,CAAC;QACF,MAAM,EAAE;YACN,CAAC,GAAG,EAAE,MAAM,G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