@e-llm-studio/citation 0.0.234-beta.1 → 0.0.235

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 (50) hide show
  1. package/dist/cjs/features/CognitiveCompare/CitationAnchor.js +1 -1
  2. package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
  3. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/helper.js +1 -1
  4. package/dist/cjs/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +1 -1
  5. package/dist/cjs/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  6. package/dist/cjs/features/CognitiveCompare/components/SvgConnectors.js +1 -1
  7. package/dist/cjs/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  8. package/dist/cjs/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  9. package/dist/cjs/features/CognitiveCompare/utils/buildComparisonRows.js +2 -0
  10. package/dist/cjs/features/CognitiveCompare/utils/buildComparisonRows.js.map +1 -0
  11. package/dist/cjs/features/ManageRemainders/ManageRemainder.module.css.js +1 -1
  12. package/dist/cjs/hooks/useOnDemandCitationFetch.js +1 -1
  13. package/dist/cjs/service/onDemandApi.js +1 -1
  14. package/dist/features/CognitiveCompare/CitationAnchor.js +1 -1
  15. package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
  16. package/dist/features/CognitiveCompare/Guidelines/utils/helper.js +1 -1
  17. package/dist/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.js +1 -1
  18. package/dist/features/CognitiveCompare/components/SectionAccordion.js +1 -1
  19. package/dist/features/CognitiveCompare/components/SvgConnectors.js +1 -1
  20. package/dist/features/CognitiveCompare/hooks/useCompareData.js +1 -1
  21. package/dist/features/CognitiveCompare/hooks/useLinesCalculator.js +1 -1
  22. package/dist/features/CognitiveCompare/utils/buildComparisonRows.js +2 -0
  23. package/dist/features/CognitiveCompare/utils/buildComparisonRows.js.map +1 -0
  24. package/dist/features/ManageRemainders/ManageRemainder.module.css.js +1 -1
  25. package/dist/hooks/useOnDemandCitationFetch.js +1 -1
  26. package/dist/service/onDemandApi.js +1 -1
  27. package/dist/types/src/CognitiveCompareTest.d.ts.map +1 -1
  28. package/dist/types/src/features/CognitiveCompare/CitationAnchor.d.ts.map +1 -1
  29. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
  30. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts +13 -0
  31. package/dist/types/src/features/CognitiveCompare/CognitiveCompareTypes.d.ts.map +1 -1
  32. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts +1421 -898
  33. package/dist/types/src/features/CognitiveCompare/Guidelines/constants/guidelines.mockData.d.ts.map +1 -1
  34. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/helper.d.ts.map +1 -1
  35. package/dist/types/src/features/CognitiveCompare/Guidelines/utils/processGuidelinesMarkdown.d.ts.map +1 -1
  36. package/dist/types/src/features/CognitiveCompare/components/SectionAccordion.d.ts.map +1 -1
  37. package/dist/types/src/features/CognitiveCompare/components/SvgConnectors.d.ts.map +1 -1
  38. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts +2 -1
  39. package/dist/types/src/features/CognitiveCompare/hooks/useCompareData.d.ts.map +1 -1
  40. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +1 -0
  41. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
  42. package/dist/types/src/features/CognitiveCompare/hooks/useLinesCalculator.d.ts.map +1 -1
  43. package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.d.ts +11 -0
  44. package/dist/types/src/features/CognitiveCompare/utils/buildComparisonRows.d.ts.map +1 -0
  45. package/dist/types/src/hooks/useOnDemandCitationFetch.d.ts.map +1 -1
  46. package/dist/types/src/service/onDemandApi.d.ts +2 -2
  47. package/dist/types/src/service/onDemandApi.d.ts.map +1 -1
  48. package/dist/types/src/types/onDemandApi.types.d.ts +5 -0
  49. package/dist/types/src/types/onDemandApi.types.d.ts.map +1 -1
  50. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("../CognitiveComparehelpers.js");exports.useLinesCalculator=function(n){var i=n.containerRef,r=n.leftContainerRef,c=n.rightContainerRef;n.svgContainerRef;var l=n.pathRefs,o=n.leftHeaderRef,u=n.rightHeaderRef,a=n.proposedSections,d=n.existingSections,s=n.visibleFields,v=n.leftRefs,h=n.rightRefs,g=n.sectionLeftRefs,f=n.sectionRightRefs,b=n.subSectionLeftRefs,p=n.subSectionRightRefs,A=n.lhsBadgeRefs,y=n.rhsBadgeRefs,R=n.sectionRowRefs,x=n.expandedSections,m=n.expandedSubSections,B=n.connectedSections,S=n.isSideBySide,T=n.activeSideBySideSection,C=n.maintainRelativeOrder,I=n.isGuidelineMode,E=n.cognitiveMap,M=n.getSectionCompareStyle,D=n.getSubSectionCompareStyle,O=n.getDeviationStyleByKey,L=n.isArrowVisible,_=n.isAnimatingRef,F=n.isSideBySideRef,N=n.sideBySideCacheRef,H=n.sideBySideLineRef,P=n.activeSideBySideSectionRef,k=n.activeSideBySideRightSectionRef,G=n.connectedLines,w=n.setConnectedLines,V=n.cachedConnectedPositions,Y=n.calculateLinesRef,j=n.resizeTimerRef,z=n.scrollLock,Q=n.scrollSyncLocked,X=n.handleResizeRef,q=n.activeProposed,K=n.existingRule,J=n.analysisData,U=n.pendingScrollTargetRef,W=n.pendingScrollCallbackRef,Z=n.resolvedComparisonConfig,$=n.getFieldData,tt=t.useState([]),et=tt[0],nt=tt[1],it=t.useState(null),rt=it[0],ct=it[1],lt=t.useState([]),ot=lt[0],ut=lt[1],at=null!=G?G:ot,dt=null!=w?w:ut,st=t.useState({width:0,height:0}),vt=st[0],ht=st[1],gt=t.useRef(!1),ft=t.useRef(!1),bt=t.useRef(!1),pt=t.useRef(null),At=t.useRef([]),yt=null!=V?V:At,Rt=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)},xt=t.useCallback(function(){var t,n,l,R,L,F,N,H,P,k,G,w,V,Y,j,z,Q,X;if(!gt.current&&!_.current){gt.current=!0;try{if(!i.current)return;var q=function(t){var e=t.split("-"),n=e[0];if(!x[n]&&!1===C)return!1;if(C&&!x["left-".concat(n)]&&!x["right-".concat(n)]&&!x[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!m[i])return!1;return!0},K=i.current.getBoundingClientRect();ht({width:K.width,height:K.height});var J=[];if(s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.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")}),!_.current){for(var U=0;U<Math.max(a.length,d.length);U++){var W=null===(t=g.current[U])||void 0===t?void 0:t.current,Z=null===(n=f.current[U])||void 0===n?void 0:n.current;W&&(W.style.height="auto",W.style.minHeight="0px"),Z&&(Z.style.height="auto",Z.style.minHeight="0px")}C||Object.keys(b.current).forEach(function(t){var e,n;if(q(t)){var i=null===(e=b.current[t])||void 0===e?void 0:e.current,r=null===(n=p.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 $={};s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.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(!_.current)if(C){if(S&&null!==T)if("number"==typeof T){var it=T,rt=a[it],lt=null===(L=g.current[it])||void 0===L?void 0:L.current;lt&&rt&&(rt.refIndexes||[]).forEach(function(t){var e,n=d.findIndex(function(e){return e.selfIndex===t}),i=null===(e=f.current[n])||void 0===e?void 0:e.current;if(i&&(x["left-".concat(it)]||x["right-".concat(n)])){var r=Math.max(lt.getBoundingClientRect().height,i.getBoundingClientRect().height);tt.left[it]=Math.max(tt.left[it]||0,r),tt.right[n]=Math.max(tt.right[n]||0,r)}})}else{var ot=T.split(e.DEVIATION_BADGE_SEPARATOR)[2];if(ot){W=null===(F=b.current[ot])||void 0===F?void 0:F.current,Z=null===(N=p.current[ot])||void 0===N?void 0:N.current;if(W&&Z){ut=Math.max(W.getBoundingClientRect().height,Z.getBoundingClientRect().height);et[ot]=Math.max(et[ot]||0,ut)}}}}else{Object.keys(b.current).forEach(function(t){var e,n;if(q(t)){var i=null===(e=b.current[t])||void 0===e?void 0:e.current,r=null===(n=p.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(U=0;U<Math.min(a.length,d.length);U++){var W=null===(l=g.current[U])||void 0===l?void 0:l.current,Z=null===(R=f.current[U])||void 0===R?void 0:R.current;if(W&&Z){var ut=Math.max(W.getBoundingClientRect().height,Z.getBoundingClientRect().height);tt.left[U]=ut,tt.right[U]=ut}}}if(s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.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")}}),_.current||(Object.entries(tt.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=g.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=f.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),C||Object.keys(et).forEach(function(t){var e,n,i=null===(e=b.current[t])||void 0===e?void 0:e.current,r=null===(n=p.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")}})),!I){a.forEach(function(t,e){var n,i=null===(n=g.current[e])||void 0===n?void 0:n.current;if(i){var l=function(t,e){var n=(t.refIndexes||[]).map(function(t){return d.findIndex(function(e){return e.selfIndex===t})}).filter(function(t){return-1!==t});return!n.length&&d[e]?[e]:Array.from(new Set(n))}(t,e);l.forEach(function(n){var l,o,u,a,s,v,h,g,b,p,A=null===(l=f.current[n])||void 0===l?void 0:l.current;if(A){var y=i.getBoundingClientRect(),R=A.getBoundingClientRect(),x=y.right-K.left,m=R.left-K.left,B=y.top+18-K.top,I=R.top+18-K.top;if(C&&S&&T===e){var D=null!==(u=null===(o=r.current)||void 0===o?void 0:o.getBoundingClientRect().top)&&void 0!==u?u:0,O=null!==(s=null===(a=c.current)||void 0===a?void 0:a.getBoundingClientRect().top)&&void 0!==s?s:0,L=D+(null!==(h=null===(v=r.current)||void 0===v?void 0:v.clientHeight)&&void 0!==h?h:1/0),_=O+(null!==(b=null===(g=c.current)||void 0===g?void 0:g.clientHeight)&&void 0!==b?b:1/0),F=function(t,e,n){return Math.max(e,Math.min(n,t))};B=F(y.top+18,D,L)-K.top,I=F(R.top+18,O,_)-K.top}var N=M(e);N&&J.push({id:"line-".concat(e,"-").concat(n),x1:x,y1:B,x2:m,y2:I,style:N,sectionIdx:e,targetRightIdx:n,isSubSection:!1,hasCognitive:!!((null==t?void 0:t.cognitiveData)||(null===(p=d[n])||void 0===p?void 0:p.cognitiveData)||(null==t?void 0:t.nodeId)&&E[t.nodeId])})}})}})}if(!I&&S&&"string"==typeof T&&T.includes(e.DEVIATION_BADGE_SEPARATOR)){var at=T.split(e.DEVIATION_BADGE_SEPARATOR),st=at[0],vt=at[1],ft=at[2],bt=(at[3],"".concat(st).concat(e.DEVIATION_BADGE_SEPARATOR).concat(vt)),pt=null===(H=A.current[bt])||void 0===H?void 0:H.current,At=null===(P=y.current[bt])||void 0===P?void 0:P.current;if(pt&&At){var xt=pt.getBoundingClientRect(),Bt=At.getBoundingClientRect(),St=xt.right-K.left,Tt=Bt.left-K.left,Ct=xt.top+xt.height/2-K.top,It=Bt.top+Bt.height/2-K.top;if(C){var Et=null!==(G=null===(k=r.current)||void 0===k?void 0:k.getBoundingClientRect().top)&&void 0!==G?G:0,Mt=null!==(V=null===(w=c.current)||void 0===w?void 0:w.getBoundingClientRect().top)&&void 0!==V?V:0,Dt=Et+(null!==(j=null===(Y=r.current)||void 0===Y?void 0:Y.clientHeight)&&void 0!==j?j:1/0),Ot=Mt+(null!==(Q=null===(z=c.current)||void 0===z?void 0:z.clientHeight)&&void 0!==Q?Q:1/0),Lt=function(t,e,n){return Math.max(e,Math.min(n,t))};Ct=Lt(xt.top+xt.height/2,Et,Dt)-K.top,It=Lt(Bt.top+Bt.height/2,Mt,Ot)-K.top}var _t=null!==(X=O(st,vt))&&void 0!==X?X:D(ft);_t&&J.push({id:"line-subsec-".concat(bt),x1:St,y1:Ct,x2:Tt,y2:It,style:_t,sectionIdx:Number(ft.split("-")[0]),isSubSection:!0,subSectionKeyPath:T})}}if(nt(J),o.current&&u.current){var Ft=o.current.getBoundingClientRect(),Nt=u.current.getBoundingClientRect(),Ht=(Ft.top+Ft.height/2-K.top+Nt.top+Nt.height/2-K.top)/2;ct({x1:Ft.right-K.left,x2:Nt.left-K.left,y:Ht})}else ct(null);if(B.size>0){var Pt=[],kt=r.current,Gt=c.current;if(kt&&Gt){var wt=[],Vt=kt.getBoundingClientRect().top,Yt=Gt.getBoundingClientRect().top,jt=Vt+kt.clientHeight,zt=Yt+Gt.clientHeight,Qt=kt.scrollTop,Xt=Gt.scrollTop,qt=K.top,Kt=function(t,e,n){return Math.max(e,Math.min(n,t))};B.forEach(function(t){var n,i,r,c,l,o,u,s,v;if(I){var h=null,g=null,f=null;if("string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)){var b=t.split(e.DEVIATION_BADGE_SEPARATOR),p=b[0],R=b[1],x=b[2],m="".concat(p).concat(e.DEVIATION_BADGE_SEPARATOR).concat(R);h=null===(n=A.current[m])||void 0===n?void 0:n.current,f=null!==(i=O(p,R))&&void 0!==i?i:D(x),g=Number((null==x?void 0:x.split("-")[0])||0)}else g=Number(t),h=null===(r=A.current[g])||void 0===r?void 0:r.current,f=M(g);if(!h)return;var B=document.querySelectorAll('[id^="guideline-target-"]');B.forEach(function(n,i){var r=h.getBoundingClientRect(),c=n.getBoundingClientRect(),l=r.right-K.left,o=c.left-K.left-0,u=l+75,a=r.top+r.height/2,d=c.top+c.height/2,s=a-Vt+Qt,v=d-Yt+Xt,g="conn-guide-".concat(t,"-").concat(i),b="";"string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)?b=(t.split(e.DEVIATION_BADGE_SEPARATOR)[2]||"").split("-").map(function(t){return Number(t)+1}).join("."):b=String(Number(t)+1);var p=String.fromCharCode(97+i),A=1===B.length?null:"".concat(b,"(").concat(p,")");wt.push({lhsScrollY:s,rhsScrollY:v,x1:l,x2:o,containerTop:qt,leftIdx:t,rhsArrayIdx:i,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 y=Kt(a,Vt,jt),R=Kt(d,Yt,zt),x=y-qt,m=R-qt,S=Rt(l,x,o,m,u,a>=Vt-4&&a<=jt+4,d>=Yt-4&&d<=zt+4);Pt.push({id:g,pathD:S,style:f,leftIdx:t,rhsArrayIdx:i,x1:l,x2:o,y1:x,y2:m,centerX:u,matchLabel:A,isGuideline:!0})})}else if("string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)){var S=t.split(e.DEVIATION_BADGE_SEPARATOR),T=(p=S[0],R=S[1],x=S[2],S[3],m="".concat(p).concat(e.DEVIATION_BADGE_SEPARATOR).concat(R),null===(c=A.current[m])||void 0===c?void 0:c.current),E=null===(l=y.current[m])||void 0===l?void 0:l.current;if(!T||!E)return;var L=T.getBoundingClientRect(),_=E.getBoundingClientRect(),F=null!==(o=O(p,R))&&void 0!==o?o:D(x),N=L.right-K.left,H=_.left-K.left-0,P=N+75,k=L.top+L.height/2,G=_.top+_.height/2,w=k-Vt+Qt,V=G-Yt+Xt,Y="conn-subsec-".concat(m),j=((x||"").split("-").map(function(t){return Number(t)+1}).join("."),null);wt.push({lhsScrollY:w,rhsScrollY:V,x1:N,x2:H,containerTop:qt,leftIdx:t,rhsArrayIdx:t,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:Y,centerX:P});var z=Kt(k,Vt,jt),Q=Kt(G,Yt,zt),X=Rt(N,Z=z-qt,H,$=Q-qt,P,k>=Vt-4&&k<=jt+4,G>=Yt-4&&G<=zt+4);Pt.push({id:Y,pathD:X,style:F,leftIdx:t,rhsArrayIdx:t,x1:N,x2:H,y1:Z,y2:$,matchLabel:j})}else if(C){var q=t,J=a[q];if(!(null===(v=null==J?void 0:J.refIndexes)||void 0===v?void 0:v.length))return;J.refIndexes.forEach(function(e,n){var i,r,c=d.findIndex(function(t){return t.selfIndex===e});if(-1!==c){var l=null===(i=A.current[q])||void 0===i?void 0:i.current,o=null===(r=y.current[c])||void 0===r?void 0:r.current;if(l&&o){var u=l.getBoundingClientRect(),a=o.getBoundingClientRect(),s=M(q),v=u.right-K.left,h=a.left-K.left-0,g=v+75,f=u.top+u.height/2,b=a.top+a.height/2,p=f-Vt+Qt,R=b-Yt+Xt,x="conn-".concat(q,"-").concat(c),m=String(Number(t)+1),B=String.fromCharCode(97+n),S=1===J.refIndexes.length?null:"".concat(m,"(").concat(B,")");wt.push({lhsScrollY:p,rhsScrollY:R,x1:v,x2:h,containerTop:qt,leftIdx:q,rhsArrayIdx:c,styleColor:(null==s?void 0:s.badgeBorder)||"#6366F1",styleBg:(null==s?void 0:s.badgeBg)||"#FFFFFF",styleText:(null==s?void 0:s.badgeText)||"#A16207",styleId:x,centerX:g});var T=Kt(f,Vt,jt),C=Kt(b,Yt,zt),I=T-qt,E=C-qt,D=Rt(v,I,h,E,g,f>=Vt-4&&f<=jt+4,b>=Yt-4&&b<=zt+4);Pt.push({id:x,pathD:D,style:s,leftIdx:q,rhsArrayIdx:c,x1:v,x2:h,y1:I,y2:E,matchLabel:S})}}})}else{var U=t,W=U;T=null===(u=A.current[U])||void 0===u?void 0:u.current,E=null===(s=y.current[W])||void 0===s?void 0:s.current;if(!T||!E)return;L=T.getBoundingClientRect(),_=E.getBoundingClientRect(),F=M(U),N=L.right-K.left,H=_.left-K.left-0,P=N+75,k=L.top+L.height/2,G=_.top+_.height/2,w=k-Vt+Qt,V=G-Yt+Xt,Y="conn-".concat(U,"-").concat(W),String(Number(t)+1),j=null;wt.push({lhsScrollY:w,rhsScrollY:V,x1:N,x2:H,containerTop:qt,leftIdx:U,rhsArrayIdx:W,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:Y,centerX:P});var Z,$;z=Kt(k,Vt,jt),Q=Kt(G,Yt,zt),X=Rt(N,Z=z-qt,H,$=Q-qt,P,k>=Vt-4&&k<=jt+4,G>=Yt-4&&G<=zt+4);Pt.push({id:Y,pathD:X,style:F,leftIdx:U,rhsArrayIdx:W,x1:N,x2:H,y1:Z,y2:$,matchLabel:j})}}),yt.current=wt}dt(Pt),setTimeout(function(){return mt()},10)}else dt([]),yt.current=[],setTimeout(function(){return mt()},10)}catch(t){console.error("Line render safe fail: ",t)}finally{gt.current=!1}}},[s,a,d,E,Z,$,M,O,C,S,T,B,x,m,I]),mt=t.useCallback(function(){var t,e,n,o,u,a,d,s,v,h,g,f,b,p,A,y,R,x,m,B=yt.current;if(!B.length)return null===(t=l.current["guideline-up-stroke"])||void 0===t||t.setAttribute("visibility","hidden"),null===(e=l.current["guideline-up-badge"])||void 0===e||e.setAttribute("visibility","hidden"),null===(n=l.current["guideline-down-stroke"])||void 0===n||n.setAttribute("visibility","hidden"),void(null===(o=l.current["guideline-down-badge"])||void 0===o||o.setAttribute("visibility","hidden"));if(!_.current){var S=null!==(a=null===(u=r.current)||void 0===u?void 0:u.scrollTop)&&void 0!==a?a:0,T=null!==(s=null===(d=c.current)||void 0===d?void 0:d.scrollTop)&&void 0!==s?s:0,C=null!==(h=null===(v=r.current)||void 0===v?void 0:v.clientHeight)&&void 0!==h?h:1/0,I=null!==(f=null===(g=c.current)||void 0===g?void 0:g.clientHeight)&&void 0!==f?f:1/0,E=null!==(p=null===(b=r.current)||void 0===b?void 0:b.getBoundingClientRect().top)&&void 0!==p?p:0,M=null!==(y=null===(A=c.current)||void 0===A?void 0:A.getBoundingClientRect().top)&&void 0!==y?y:0,D=E+C,O=M+I,L=null===(R=i.current)||void 0===R?void 0:R.getBoundingClientRect(),F=null!==(x=null==L?void 0:L.top)&&void 0!==x?x:0,N=null!==(m=null==L?void 0:L.height)&&void 0!==m?m:1/0,H=function(t,e,n){return Math.max(e,Math.min(n,t))},P=0,k=0,G=0,w=0,V="#6366F1",Y="#A16207",j=!1,z=0;if(B.forEach(function(t){var e=t.lhsScrollY-S+E,n=t.rhsScrollY-T+M,i=l.current[t.styleId+"-stroke"],r=l.current[t.styleId+"-bg"],c=l.current[t.styleId+"-btn"],o=l.current[t.styleId+"-number"];if(i||r){var u=H(e,E,D),a=H(n,M,O),d=u-F,s=a-F,v=e>=E-4&&e<=D+4,h=n>=M-4&&n<=O+4,g=!0;j=!0;var f=t.centerX||t.x1+75;0===G&&(G=t.x1,w=d,z=f,V=t.styleColor,t.styleBg,Y=t.styleText||"#A16207"),n<M-4?(P++,g=!1):n>O+4&&(k++,g=!1);var b=Rt(t.x1,d,t.x2,s,z,v,h);i&&(g&&b?(i.setAttribute("visibility","visible"),i.setAttribute("d",b)):i.setAttribute("visibility","hidden")),r&&(g&&b?(r.setAttribute("visibility","visible"),r.setAttribute("d",b)):r.setAttribute("visibility","hidden")),c&&(v&&g?(c.setAttribute("visibility","visible"),c.setAttribute("y",String(d-12))):c.setAttribute("visibility","hidden")),o&&(v&&g?(o.setAttribute("visibility","visible"),o.setAttribute("transform","translate(".concat(t.x2-42,", ").concat(s,")"))):o.setAttribute("visibility","hidden"))}}),j&&z>0){var Q=l.current["guideline-up-stroke"],X=l.current["guideline-up-badge"],q=l.current["guideline-up-arrow"],K=l.current["guideline-up-text"],J=l.current["guideline-up-badge-rect"];if(P>0){var U=Math.max(15,M-F+15),W=Math.min(15,Math.abs(z-G),Math.max(0,w-U)),Z="M ".concat(G,",").concat(w," L ").concat(z-W,",").concat(w," Q ").concat(z,",").concat(w," ").concat(z,",").concat(w-W," L ").concat(z,",").concat(U);null==Q||Q.setAttribute("visibility","visible"),null==Q||Q.setAttribute("d",Z),null==Q||Q.setAttribute("stroke",V),null==X||X.setAttribute("visibility","visible"),null==X||X.setAttribute("transform","translate(".concat(z,", ").concat(U,")")),q&&q.setAttribute("fill",V),K&&(K.textContent="+".concat(P),K.setAttribute("fill",Y)),J&&J.setAttribute("stroke",V)}else null==Q||Q.setAttribute("visibility","hidden"),null==X||X.setAttribute("visibility","hidden");var $=l.current["guideline-down-stroke"],tt=l.current["guideline-down-badge"],et=l.current["guideline-down-arrow"],nt=l.current["guideline-down-text"],it=l.current["guideline-down-badge-rect"];if(k>0){var rt=Math.min(N-15,O-F-15);W=Math.min(15,Math.abs(z-G),Math.max(0,rt-w)),Z="M ".concat(G,",").concat(w," L ").concat(z-W,",").concat(w," Q ").concat(z,",").concat(w," ").concat(z,",").concat(w+W," L ").concat(z,",").concat(rt);null==$||$.setAttribute("visibility","visible"),null==$||$.setAttribute("d",Z),null==$||$.setAttribute("stroke",V),null==tt||tt.setAttribute("visibility","visible"),null==tt||tt.setAttribute("transform","translate(".concat(z,", ").concat(rt,")")),et&&et.setAttribute("fill",V),nt&&(nt.textContent="+".concat(k),nt.setAttribute("fill",Y)),it&&it.setAttribute("stroke",V)}else null==$||$.setAttribute("visibility","hidden"),null==tt||tt.setAttribute("visibility","hidden")}}},[]),Bt=t.useCallback(function(){yt.current.length>0&&!_.current||(null!==pt.current&&clearTimeout(pt.current),pt.current=setTimeout(function(){Y.current(),pt.current=null},50))},[]),St=t.useCallback(function(t){if(null!==U.current&&W.current&&Math.abs(t.currentTarget.scrollTop-U.current)<=2){var n=W.current;U.current=null,W.current=null,n()}if(!bt.current&&!z.current){if(C&&Q&&(F.current||B.size>0)){var l=t.currentTarget,o=r.current,u=c.current,a=l===o?u:l===u?o:null;if(l&&a){var d=function(){var t,n,i,r,c,l,o,u,a,d,s,v=P.current,h=k.current;if(null===v)return{leftAnchor:null,rightAnchor:null};if("string"==typeof v&&v.includes(e.DEVIATION_BADGE_SEPARATOR)){var x=v.split(e.DEVIATION_BADGE_SEPARATOR),m="".concat(x[0]).concat(e.DEVIATION_BADGE_SEPARATOR).concat(x[1]);return{leftAnchor:(null===(t=A.current[m])||void 0===t?void 0:t.current)||(null===(n=b.current[x[2]])||void 0===n?void 0:n.current)||(null===(i=g.current[Number(x[2])])||void 0===i?void 0:i.current)||null,rightAnchor:(null===(r=y.current[m])||void 0===r?void 0:r.current)||(null===(c=p.current[x[3]])||void 0===c?void 0:c.current)||(null===(l=f.current[Number(x[3])])||void 0===l?void 0:l.current)||null}}var B=Number(v),S=null!==h?Number(h):B;return{leftAnchor:(null===(o=A.current[B])||void 0===o?void 0:o.current)||(null===(u=R.current[B])||void 0===u?void 0:u.current)||(null===(a=g.current[B])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=y.current[S])||void 0===d?void 0:d.current)||(null===(s=f.current[S])||void 0===s?void 0:s.current)||null}}(),s=d.leftAnchor,v=d.rightAnchor,h=l===o?s:v,x=l===o?v:s,m=null;if(h&&x){var S=h.getBoundingClientRect(),T=x.getBoundingClientRect(),I=a.getBoundingClientRect(),E=S.top+S.height/2;m=T.top-I.top+a.scrollTop+T.height/2-(E-I.top)}else{var M=Math.max(0,l.scrollHeight-l.clientHeight),D=Math.max(0,a.scrollHeight-a.clientHeight);m=M>0?l.scrollTop/M*D:l.scrollTop}var O=Math.max(0,a.scrollHeight-a.clientHeight);m=Math.max(0,Math.min(m,O)),Math.abs(a.scrollTop-m)>1&&(bt.current=!0,a.scrollTop=m,requestAnimationFrame(function(){bt.current=!1}))}}C||Bt(),ft.current||(ft.current=!0,requestAnimationFrame(function(){var t,n,l,o,u,a,d;if(F.current){var s=r.current,v=c.current;if(s&&v&&H.current){if(!N.current){var h=P.current,g=void 0;if("string"==typeof h&&h.includes(e.DEVIATION_BADGE_SEPARATOR)){var f=h.split(e.DEVIATION_BADGE_SEPARATOR),b="".concat(f[0]).concat(e.DEVIATION_BADGE_SEPARATOR).concat(f[1]);g=null===(t=A.current[b])||void 0===t?void 0:t.current}else g=null===(n=A.current[h])||void 0===n?void 0:n.current;if(g){var p=g.getBoundingClientRect();N.current={badgeScreenY:p.top+p.height/2,initialScrollTop:s.scrollTop,leftTop:s.getBoundingClientRect().top,leftBottom:s.getBoundingClientRect().top+s.clientHeight,cTop:null!==(o=null===(l=i.current)||void 0===l?void 0:l.getBoundingClientRect().top)&&void 0!==o?o:0}}}if(N.current){var y=N.current,R=s.scrollTop-y.initialScrollTop,x=y.badgeScreenY-R,m=((u=x,a=y.leftTop,d=y.leftBottom,Math.max(a,Math.min(d,u)))-y.cTop).toString(),B=x>=y.leftTop-4&&x<=y.leftBottom+4;H.current.setAttribute("y1",m),H.current.setAttribute("y2",m),H.current.setAttribute("visibility",B?"visible":"hidden")}}}mt(),ft.current=!1}))}},[mt,C,Q,B,Bt]);return t.useEffect(function(){Y.current=xt},[xt]),t.useEffect(function(){var t=setTimeout(Bt,250),e=function(){return X.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==pt.current&&clearTimeout(pt.current),null!==j.current&&clearTimeout(j.current),window.removeEventListener("resize",e)}},[q,K,J,s,x,m,a,d,Z,Bt,S,T,L,B]),{lines:et,setLines:nt,overallConnector:rt,setOverallConnector:ct,connectedLines:at,setConnectedLines:dt,svgDimensions:vt,cachedConnectedPositions:yt,calculateLines:xt,calculateLinesRef:Y,calculateLinesDebounced:Bt,handleColumnScroll:St}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),e=require("../CognitiveComparehelpers.js");exports.useLinesCalculator=function(n){var i=n.containerRef,r=n.leftContainerRef,c=n.rightContainerRef;n.svgContainerRef;var l=n.pathRefs,o=n.leftHeaderRef,u=n.rightHeaderRef,a=n.proposedSections,d=n.existingSections,s=n.visibleFields,v=n.leftRefs,h=n.rightRefs,g=n.sectionLeftRefs,f=n.sectionRightRefs,p=n.subSectionLeftRefs,b=n.subSectionRightRefs,A=n.lhsBadgeRefs,y=n.rhsBadgeRefs,R=n.sectionRowRefs,x=n.expandedSections,m=n.expandedSubSections,B=n.connectedSections,S=n.isSideBySide,I=n.activeSideBySideSection,T=n.maintainRelativeOrder,C=n.isGuidelineMode,E=n.cognitiveMap,M=n.getSectionCompareStyle,D=n.getSubSectionCompareStyle,O=n.getDeviationStyleByKey,L=n.isArrowVisible,_=n.isAnimatingRef,F=n.isSideBySideRef,N=n.sideBySideCacheRef,H=n.sideBySideLineRef,P=n.activeSideBySideSectionRef,k=n.activeSideBySideRightSectionRef,w=n.connectedLines,G=n.setConnectedLines,V=n.cachedConnectedPositions,Y=n.calculateLinesRef,j=n.resizeTimerRef,z=n.scrollLock,Q=n.scrollSyncLocked,X=n.handleResizeRef,q=n.activeProposed,K=n.existingRule,J=n.analysisData,U=n.pendingScrollTargetRef,W=n.pendingScrollCallbackRef,Z=n.resolvedComparisonConfig,$=n.getFieldData,tt=t.useState([]),et=tt[0],nt=tt[1],it=t.useState(null),rt=it[0],ct=it[1],lt=t.useState([]),ot=lt[0],ut=lt[1],at=null!=w?w:ot,dt=null!=G?G:ut,st=t.useState({width:0,height:0}),vt=st[0],ht=st[1],gt=t.useRef(!1),ft=t.useRef(!1),pt=t.useRef(!1),bt=t.useRef(null),At=t.useRef([]),yt=null!=V?V:At,Rt=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)},xt=t.useCallback(function(){var t,n,l,R,L,F,N,H,P,k,w,G,V,Y,j,z,Q,X;if(!gt.current&&!_.current){gt.current=!0;try{if(!i.current)return;var q=function(t){var e=t.split("-"),n=e[0];if(!x[n]&&!1===T)return!1;if(T&&!x["left-".concat(n)]&&!x["right-".concat(n)]&&!x[n])return!1;for(var i=n,r=1;r<e.length-1;r++)if(i+="-".concat(e[r]),!m[i])return!1;return!0},K=i.current.getBoundingClientRect();ht({width:K.width,height:K.height});var J=[];if(s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.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")}),!_.current){for(var U=0;U<Math.max(a.length,d.length);U++){var W=null===(t=g.current[U])||void 0===t?void 0:t.current,Z=null===(n=f.current[U])||void 0===n?void 0:n.current;W&&(W.style.height="auto",W.style.minHeight="0px"),Z&&(Z.style.height="auto",Z.style.minHeight="0px")}T||Object.keys(p.current).forEach(function(t){var e,n;if(q(t)){var i=null===(e=p.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 $={};s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.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(!_.current)if(T){if(S&&null!==I)if("number"==typeof I){var it=I,rt=a[it],lt=null===(L=g.current[it])||void 0===L?void 0:L.current;lt&&rt&&(rt.refIndexes||[]).forEach(function(t){var e,n=d.findIndex(function(e){return e.selfIndex===t}),i=null===(e=f.current[n])||void 0===e?void 0:e.current;if(i&&(x["left-".concat(it)]||x["right-".concat(n)])){var r=Math.max(lt.getBoundingClientRect().height,i.getBoundingClientRect().height);tt.left[it]=Math.max(tt.left[it]||0,r),tt.right[n]=Math.max(tt.right[n]||0,r)}})}else{var ot=I.split(e.DEVIATION_BADGE_SEPARATOR)[2];if(ot){W=null===(F=p.current[ot])||void 0===F?void 0:F.current,Z=null===(N=b.current[ot])||void 0===N?void 0:N.current;if(W&&Z){ut=Math.max(W.getBoundingClientRect().height,Z.getBoundingClientRect().height);et[ot]=Math.max(et[ot]||0,ut)}}}}else{Object.keys(p.current).forEach(function(t){var e,n;if(q(t)){var i=null===(e=p.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(),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(U=0;U<Math.min(a.length,d.length);U++){var W=null===(l=g.current[U])||void 0===l?void 0:l.current,Z=null===(R=f.current[U])||void 0===R?void 0:R.current;if(W&&Z){var ut=Math.max(W.getBoundingClientRect().height,Z.getBoundingClientRect().height);tt.left[U]=ut,tt.right[U]=ut}}}if(s.forEach(function(t){var e,n,i=t.key,r=null===(e=v.current[i])||void 0===e?void 0:e.current,c=null===(n=h.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")}}),_.current||(Object.entries(tt.left).forEach(function(t){var e,n=t[0],i=t[1],r=null===(e=g.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=f.current[Number(n)])||void 0===e?void 0:e.current;r&&(r.style.minHeight="".concat(i,"px"))}),T||Object.keys(et).forEach(function(t){var e,n,i=null===(e=p.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&&et[t]){var c=et[t];i.style.minHeight="".concat(c,"px"),r.style.minHeight="".concat(c,"px")}})),!C){a.forEach(function(t,e){var n,i=t.continuationSourceRowId?a.findIndex(function(e){return e.comparisonRowId===t.continuationSourceRowId}):-1,l=i>=0?i:e,o=null===(n=g.current[l])||void 0===n?void 0:n.current;if(o){var u=function(t,e){if(!T)return d[e]?[e]:[];var n=(t.refIndexes||[]).map(function(t){return d.findIndex(function(e){return e.selfIndex===t})}).filter(function(t){return-1!==t});return!n.length&&d[e]?[e]:Array.from(new Set(n))}(t,e);u.forEach(function(t){var n,u,s,v,h,g,p,b,A,y,R,x,m=null===(n=f.current[t])||void 0===n?void 0:n.current;if(m){var B=o.getBoundingClientRect(),C=m.getBoundingClientRect(),D=B.right-K.left,O=C.left-K.left,L=B.top+18-K.top,_=C.top+18-K.top;if(T&&S&&I===e){var F=null!==(s=null===(u=r.current)||void 0===u?void 0:u.getBoundingClientRect().top)&&void 0!==s?s:0,N=null!==(h=null===(v=c.current)||void 0===v?void 0:v.getBoundingClientRect().top)&&void 0!==h?h:0,H=F+(null!==(p=null===(g=r.current)||void 0===g?void 0:g.clientHeight)&&void 0!==p?p:1/0),P=N+(null!==(A=null===(b=c.current)||void 0===b?void 0:b.clientHeight)&&void 0!==A?A:1/0),k=function(t,e,n){return Math.max(e,Math.min(n,t))};L=k(B.top+18,F,H)-K.top,_=k(C.top+18,N,P)-K.top}var w=M(l);w&&J.push({id:"line-".concat(l,"-").concat(t),x1:D,y1:L,x2:O,y2:_,style:w,sectionIdx:l,targetRightIdx:t,isSubSection:!1,isMappingContinuation:i>=0,hasCognitive:!!((null===(y=a[l])||void 0===y?void 0:y.cognitiveData)||(null===(R=d[t])||void 0===R?void 0:R.cognitiveData)||(null===(x=a[l])||void 0===x?void 0:x.nodeId)&&E[a[l].nodeId])})}})}})}if(!C&&S&&"string"==typeof I&&I.includes(e.DEVIATION_BADGE_SEPARATOR)){var at=I.split(e.DEVIATION_BADGE_SEPARATOR),st=at[0],vt=at[1],ft=at[2],pt=(at[3],"".concat(st).concat(e.DEVIATION_BADGE_SEPARATOR).concat(vt)),bt=null===(H=A.current[pt])||void 0===H?void 0:H.current,At=null===(P=y.current[pt])||void 0===P?void 0:P.current;if(bt&&At){var xt=bt.getBoundingClientRect(),Bt=At.getBoundingClientRect(),St=xt.right-K.left,It=Bt.left-K.left,Tt=xt.top+xt.height/2-K.top,Ct=Bt.top+Bt.height/2-K.top;if(T){var Et=null!==(w=null===(k=r.current)||void 0===k?void 0:k.getBoundingClientRect().top)&&void 0!==w?w:0,Mt=null!==(V=null===(G=c.current)||void 0===G?void 0:G.getBoundingClientRect().top)&&void 0!==V?V:0,Dt=Et+(null!==(j=null===(Y=r.current)||void 0===Y?void 0:Y.clientHeight)&&void 0!==j?j:1/0),Ot=Mt+(null!==(Q=null===(z=c.current)||void 0===z?void 0:z.clientHeight)&&void 0!==Q?Q:1/0),Lt=function(t,e,n){return Math.max(e,Math.min(n,t))};Tt=Lt(xt.top+xt.height/2,Et,Dt)-K.top,Ct=Lt(Bt.top+Bt.height/2,Mt,Ot)-K.top}var _t=null!==(X=O(st,vt))&&void 0!==X?X:D(ft);_t&&J.push({id:"line-subsec-".concat(pt),x1:St,y1:Tt,x2:It,y2:Ct,style:_t,sectionIdx:Number(ft.split("-")[0]),isSubSection:!0,subSectionKeyPath:I})}}if(nt(J),o.current&&u.current){var Ft=o.current.getBoundingClientRect(),Nt=u.current.getBoundingClientRect(),Ht=(Ft.top+Ft.height/2-K.top+Nt.top+Nt.height/2-K.top)/2;ct({x1:Ft.right-K.left,x2:Nt.left-K.left,y:Ht})}else ct(null);if(B.size>0){var Pt=[],kt=r.current,wt=c.current;if(kt&&wt){var Gt=[],Vt=kt.getBoundingClientRect().top,Yt=wt.getBoundingClientRect().top,jt=Vt+kt.clientHeight,zt=Yt+wt.clientHeight,Qt=kt.scrollTop,Xt=wt.scrollTop,qt=K.top,Kt=function(t,e,n){return Math.max(e,Math.min(n,t))};B.forEach(function(t){var n,i,r,c,l,o,u,s,v;if(C){var h=null,g=null,f=null;if("string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)){var p=t.split(e.DEVIATION_BADGE_SEPARATOR),b=p[0],R=p[1],x=p[2],m="".concat(b).concat(e.DEVIATION_BADGE_SEPARATOR).concat(R);h=null===(n=A.current[m])||void 0===n?void 0:n.current,f=null!==(i=O(b,R))&&void 0!==i?i:D(x),g=Number((null==x?void 0:x.split("-")[0])||0)}else g=Number(t),h=null===(r=A.current[g])||void 0===r?void 0:r.current,f=M(g);if(!h)return;var B=document.querySelectorAll('[id^="guideline-target-"]');B.forEach(function(n,i){var r=h.getBoundingClientRect(),c=n.getBoundingClientRect(),l=r.right-K.left,o=c.left-K.left-0,u=l+75,a=r.top+r.height/2,d=c.top+c.height/2,s=a-Vt+Qt,v=d-Yt+Xt,g="conn-guide-".concat(t,"-").concat(i),p="";"string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)?p=(t.split(e.DEVIATION_BADGE_SEPARATOR)[2]||"").split("-").map(function(t){return Number(t)+1}).join("."):p=String(Number(t)+1);var b=String.fromCharCode(97+i),A=1===B.length?null:"".concat(p,"(").concat(b,")");Gt.push({lhsScrollY:s,rhsScrollY:v,x1:l,x2:o,containerTop:qt,leftIdx:t,rhsArrayIdx:i,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 y=Kt(a,Vt,jt),R=Kt(d,Yt,zt),x=y-qt,m=R-qt,S=Rt(l,x,o,m,u,a>=Vt-4&&a<=jt+4,d>=Yt-4&&d<=zt+4);Pt.push({id:g,pathD:S,style:f,leftIdx:t,rhsArrayIdx:i,x1:l,x2:o,y1:x,y2:m,centerX:u,matchLabel:A,isGuideline:!0})})}else if("string"==typeof t&&t.includes(e.DEVIATION_BADGE_SEPARATOR)){var S=t.split(e.DEVIATION_BADGE_SEPARATOR),I=(b=S[0],R=S[1],x=S[2],S[3],m="".concat(b).concat(e.DEVIATION_BADGE_SEPARATOR).concat(R),null===(c=A.current[m])||void 0===c?void 0:c.current),E=null===(l=y.current[m])||void 0===l?void 0:l.current;if(!I||!E)return;var L=I.getBoundingClientRect(),_=E.getBoundingClientRect(),F=null!==(o=O(b,R))&&void 0!==o?o:D(x),N=L.right-K.left,H=_.left-K.left-0,P=N+75,k=L.top+L.height/2,w=_.top+_.height/2,G=k-Vt+Qt,V=w-Yt+Xt,Y="conn-subsec-".concat(m),j=((x||"").split("-").map(function(t){return Number(t)+1}).join("."),null);Gt.push({lhsScrollY:G,rhsScrollY:V,x1:N,x2:H,containerTop:qt,leftIdx:t,rhsArrayIdx:t,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:Y,centerX:P});var z=Kt(k,Vt,jt),Q=Kt(w,Yt,zt),X=Rt(N,Z=z-qt,H,$=Q-qt,P,k>=Vt-4&&k<=jt+4,w>=Yt-4&&w<=zt+4);Pt.push({id:Y,pathD:X,style:F,leftIdx:t,rhsArrayIdx:t,x1:N,x2:H,y1:Z,y2:$,matchLabel:j})}else if(T){var q=t,J=a[q];if(!(null===(v=null==J?void 0:J.refIndexes)||void 0===v?void 0:v.length))return;J.refIndexes.forEach(function(e,n){var i,r,c=d.findIndex(function(t){return t.selfIndex===e});if(-1!==c){var l=null===(i=A.current[q])||void 0===i?void 0:i.current,o=null===(r=y.current[c])||void 0===r?void 0:r.current;if(l&&o){var u=l.getBoundingClientRect(),a=o.getBoundingClientRect(),s=M(q),v=u.right-K.left,h=a.left-K.left-0,g=v+75,f=u.top+u.height/2,p=a.top+a.height/2,b=f-Vt+Qt,R=p-Yt+Xt,x="conn-".concat(q,"-").concat(c),m=String(Number(t)+1),B=String.fromCharCode(97+n),S=1===J.refIndexes.length?null:"".concat(m,"(").concat(B,")");Gt.push({lhsScrollY:b,rhsScrollY:R,x1:v,x2:h,containerTop:qt,leftIdx:q,rhsArrayIdx:c,styleColor:(null==s?void 0:s.badgeBorder)||"#6366F1",styleBg:(null==s?void 0:s.badgeBg)||"#FFFFFF",styleText:(null==s?void 0:s.badgeText)||"#A16207",styleId:x,centerX:g});var I=Kt(f,Vt,jt),T=Kt(p,Yt,zt),C=I-qt,E=T-qt,D=Rt(v,C,h,E,g,f>=Vt-4&&f<=jt+4,p>=Yt-4&&p<=zt+4);Pt.push({id:x,pathD:D,style:s,leftIdx:q,rhsArrayIdx:c,x1:v,x2:h,y1:C,y2:E,matchLabel:S})}}})}else{var U=t,W=U;I=null===(u=A.current[U])||void 0===u?void 0:u.current,E=null===(s=y.current[W])||void 0===s?void 0:s.current;if(!I||!E)return;L=I.getBoundingClientRect(),_=E.getBoundingClientRect(),F=M(U),N=L.right-K.left,H=_.left-K.left-0,P=N+75,k=L.top+L.height/2,w=_.top+_.height/2,G=k-Vt+Qt,V=w-Yt+Xt,Y="conn-".concat(U,"-").concat(W),String(Number(t)+1),j=null;Gt.push({lhsScrollY:G,rhsScrollY:V,x1:N,x2:H,containerTop:qt,leftIdx:U,rhsArrayIdx:W,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:Y,centerX:P});var Z,$;z=Kt(k,Vt,jt),Q=Kt(w,Yt,zt),X=Rt(N,Z=z-qt,H,$=Q-qt,P,k>=Vt-4&&k<=jt+4,w>=Yt-4&&w<=zt+4);Pt.push({id:Y,pathD:X,style:F,leftIdx:U,rhsArrayIdx:W,x1:N,x2:H,y1:Z,y2:$,matchLabel:j})}}),yt.current=Gt}dt(Pt),setTimeout(function(){return mt()},10)}else dt([]),yt.current=[],setTimeout(function(){return mt()},10)}catch(t){console.error("Line render safe fail: ",t)}finally{gt.current=!1}}},[s,a,d,E,Z,$,M,O,T,S,I,B,x,m,C]),mt=t.useCallback(function(){var t,e,n,o,u,a,d,s,v,h,g,f,p,b,A,y,R,x,m,B=yt.current;if(!B.length)return null===(t=l.current["guideline-up-stroke"])||void 0===t||t.setAttribute("visibility","hidden"),null===(e=l.current["guideline-up-badge"])||void 0===e||e.setAttribute("visibility","hidden"),null===(n=l.current["guideline-down-stroke"])||void 0===n||n.setAttribute("visibility","hidden"),void(null===(o=l.current["guideline-down-badge"])||void 0===o||o.setAttribute("visibility","hidden"));if(!_.current){var S=null!==(a=null===(u=r.current)||void 0===u?void 0:u.scrollTop)&&void 0!==a?a:0,I=null!==(s=null===(d=c.current)||void 0===d?void 0:d.scrollTop)&&void 0!==s?s:0,T=null!==(h=null===(v=r.current)||void 0===v?void 0:v.clientHeight)&&void 0!==h?h:1/0,C=null!==(f=null===(g=c.current)||void 0===g?void 0:g.clientHeight)&&void 0!==f?f:1/0,E=null!==(b=null===(p=r.current)||void 0===p?void 0:p.getBoundingClientRect().top)&&void 0!==b?b:0,M=null!==(y=null===(A=c.current)||void 0===A?void 0:A.getBoundingClientRect().top)&&void 0!==y?y:0,D=E+T,O=M+C,L=null===(R=i.current)||void 0===R?void 0:R.getBoundingClientRect(),F=null!==(x=null==L?void 0:L.top)&&void 0!==x?x:0,N=null!==(m=null==L?void 0:L.height)&&void 0!==m?m:1/0,H=function(t,e,n){return Math.max(e,Math.min(n,t))},P=0,k=0,w=0,G=0,V="#6366F1",Y="#A16207",j=!1,z=0;if(B.forEach(function(t){var e=t.lhsScrollY-S+E,n=t.rhsScrollY-I+M,i=l.current[t.styleId+"-stroke"],r=l.current[t.styleId+"-bg"],c=l.current[t.styleId+"-btn"],o=l.current[t.styleId+"-number"];if(i||r){var u=H(e,E,D),a=H(n,M,O),d=u-F,s=a-F,v=e>=E-4&&e<=D+4,h=n>=M-4&&n<=O+4,g=!0;j=!0;var f=t.centerX||t.x1+75;0===w&&(w=t.x1,G=d,z=f,V=t.styleColor,t.styleBg,Y=t.styleText||"#A16207"),n<M-4?(P++,g=!1):n>O+4&&(k++,g=!1);var p=Rt(t.x1,d,t.x2,s,z,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")),o&&(v&&g?(o.setAttribute("visibility","visible"),o.setAttribute("transform","translate(".concat(t.x2-42,", ").concat(s,")"))):o.setAttribute("visibility","hidden"))}}),j&&z>0){var Q=l.current["guideline-up-stroke"],X=l.current["guideline-up-badge"],q=l.current["guideline-up-arrow"],K=l.current["guideline-up-text"],J=l.current["guideline-up-badge-rect"];if(P>0){var U=Math.max(15,M-F+15),W=Math.min(15,Math.abs(z-w),Math.max(0,G-U)),Z="M ".concat(w,",").concat(G," L ").concat(z-W,",").concat(G," Q ").concat(z,",").concat(G," ").concat(z,",").concat(G-W," L ").concat(z,",").concat(U);null==Q||Q.setAttribute("visibility","visible"),null==Q||Q.setAttribute("d",Z),null==Q||Q.setAttribute("stroke",V),null==X||X.setAttribute("visibility","visible"),null==X||X.setAttribute("transform","translate(".concat(z,", ").concat(U,")")),q&&q.setAttribute("fill",V),K&&(K.textContent="+".concat(P),K.setAttribute("fill",Y)),J&&J.setAttribute("stroke",V)}else null==Q||Q.setAttribute("visibility","hidden"),null==X||X.setAttribute("visibility","hidden");var $=l.current["guideline-down-stroke"],tt=l.current["guideline-down-badge"],et=l.current["guideline-down-arrow"],nt=l.current["guideline-down-text"],it=l.current["guideline-down-badge-rect"];if(k>0){var rt=Math.min(N-15,O-F-15);W=Math.min(15,Math.abs(z-w),Math.max(0,rt-G)),Z="M ".concat(w,",").concat(G," L ").concat(z-W,",").concat(G," Q ").concat(z,",").concat(G," ").concat(z,",").concat(G+W," L ").concat(z,",").concat(rt);null==$||$.setAttribute("visibility","visible"),null==$||$.setAttribute("d",Z),null==$||$.setAttribute("stroke",V),null==tt||tt.setAttribute("visibility","visible"),null==tt||tt.setAttribute("transform","translate(".concat(z,", ").concat(rt,")")),et&&et.setAttribute("fill",V),nt&&(nt.textContent="+".concat(k),nt.setAttribute("fill",Y)),it&&it.setAttribute("stroke",V)}else null==$||$.setAttribute("visibility","hidden"),null==tt||tt.setAttribute("visibility","hidden")}}},[]),Bt=t.useCallback(function(){yt.current.length>0&&!_.current||(null!==bt.current&&clearTimeout(bt.current),bt.current=setTimeout(function(){Y.current(),bt.current=null},50))},[]),St=t.useCallback(function(t){if(null!==U.current&&W.current&&Math.abs(t.currentTarget.scrollTop-U.current)<=2){var n=W.current;U.current=null,W.current=null,n()}if(!pt.current&&!z.current){if(T&&Q&&(F.current||B.size>0)){var l=t.currentTarget,o=r.current,u=c.current,a=l===o?u:l===u?o:null;if(l&&a){var d=function(){var t,n,i,r,c,l,o,u,a,d,s,v=P.current,h=k.current;if(null===v)return{leftAnchor:null,rightAnchor:null};if("string"==typeof v&&v.includes(e.DEVIATION_BADGE_SEPARATOR)){var x=v.split(e.DEVIATION_BADGE_SEPARATOR),m="".concat(x[0]).concat(e.DEVIATION_BADGE_SEPARATOR).concat(x[1]);return{leftAnchor:(null===(t=A.current[m])||void 0===t?void 0:t.current)||(null===(n=p.current[x[2]])||void 0===n?void 0:n.current)||(null===(i=g.current[Number(x[2])])||void 0===i?void 0:i.current)||null,rightAnchor:(null===(r=y.current[m])||void 0===r?void 0:r.current)||(null===(c=b.current[x[3]])||void 0===c?void 0:c.current)||(null===(l=f.current[Number(x[3])])||void 0===l?void 0:l.current)||null}}var B=Number(v),S=null!==h?Number(h):B;return{leftAnchor:(null===(o=A.current[B])||void 0===o?void 0:o.current)||(null===(u=R.current[B])||void 0===u?void 0:u.current)||(null===(a=g.current[B])||void 0===a?void 0:a.current)||null,rightAnchor:(null===(d=y.current[S])||void 0===d?void 0:d.current)||(null===(s=f.current[S])||void 0===s?void 0:s.current)||null}}(),s=d.leftAnchor,v=d.rightAnchor,h=l===o?s:v,x=l===o?v:s,m=null;if(h&&x){var S=h.getBoundingClientRect(),I=x.getBoundingClientRect(),C=a.getBoundingClientRect(),E=S.top+S.height/2;m=I.top-C.top+a.scrollTop+I.height/2-(E-C.top)}else{var M=Math.max(0,l.scrollHeight-l.clientHeight),D=Math.max(0,a.scrollHeight-a.clientHeight);m=M>0?l.scrollTop/M*D:l.scrollTop}var O=Math.max(0,a.scrollHeight-a.clientHeight);m=Math.max(0,Math.min(m,O)),Math.abs(a.scrollTop-m)>1&&(pt.current=!0,a.scrollTop=m,requestAnimationFrame(function(){pt.current=!1}))}}T||Bt(),ft.current||(ft.current=!0,requestAnimationFrame(function(){var t,n,l,o,u,a,d;if(F.current){var s=r.current,v=c.current;if(s&&v&&H.current){if(!N.current){var h=P.current,g=void 0;if("string"==typeof h&&h.includes(e.DEVIATION_BADGE_SEPARATOR)){var f=h.split(e.DEVIATION_BADGE_SEPARATOR),p="".concat(f[0]).concat(e.DEVIATION_BADGE_SEPARATOR).concat(f[1]);g=null===(t=A.current[p])||void 0===t?void 0:t.current}else g=null===(n=A.current[h])||void 0===n?void 0:n.current;if(g){var b=g.getBoundingClientRect();N.current={badgeScreenY:b.top+b.height/2,initialScrollTop:s.scrollTop,leftTop:s.getBoundingClientRect().top,leftBottom:s.getBoundingClientRect().top+s.clientHeight,cTop:null!==(o=null===(l=i.current)||void 0===l?void 0:l.getBoundingClientRect().top)&&void 0!==o?o:0}}}if(N.current){var y=N.current,R=s.scrollTop-y.initialScrollTop,x=y.badgeScreenY-R,m=((u=x,a=y.leftTop,d=y.leftBottom,Math.max(a,Math.min(d,u)))-y.cTop).toString(),B=x>=y.leftTop-4&&x<=y.leftBottom+4;H.current.setAttribute("y1",m),H.current.setAttribute("y2",m),H.current.setAttribute("visibility",B?"visible":"hidden")}}}mt(),ft.current=!1}))}},[mt,T,Q,B,Bt]);return t.useEffect(function(){Y.current=xt},[xt]),t.useEffect(function(){var t=setTimeout(Bt,250),e=function(){return X.current()};return window.addEventListener("resize",e),function(){clearTimeout(t),null!==bt.current&&clearTimeout(bt.current),null!==j.current&&clearTimeout(j.current),window.removeEventListener("resize",e)}},[q,K,J,s,x,m,a,d,Z,Bt,S,I,L,B]),{lines:et,setLines:nt,overallConnector:rt,setOverallConnector:ct,connectedLines:at,setConnectedLines:dt,svgDimensions:vt,cachedConnectedPositions:yt,calculateLines:xt,calculateLinesRef:Y,calculateLinesDebounced:Bt,handleColumnScroll:St}};
2
2
  //# sourceMappingURL=useLinesCalculator.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),t=function(n,t){return(null==n?void 0:n.contentId)||(null==n?void 0:n.id)||t},e=function(n,t,e,i){return{id:"".concat(t,":").concat(e,":empty"),nodeId:n,title:"",content:"",change_history:"",subsections:[],relation:"not_defined",selfIndex:-1,refIndexes:[],refContentIds:[],displayTitle:!1,displayContent:!1,layoutKey:"".concat(t,":").concat(e,":empty"),comparisonRowId:t,isMappingContinuation:Boolean(i),continuationSourceRowId:i}},i=function(i,o,l,r,d,u){var a,c;if(void 0===u&&(u=!1),!i)return e(l,r,d);var s=Number(null==o?void 0:o.selfIndex),f=null!=o&&Number.isFinite(s)&&s>=0;return n.__assign(n.__assign({},i),{refIndexes:f?[s]:[],refContentIds:(null==o?void 0:o.contentId)?[o.contentId]:[],layoutKey:"".concat(r,":").concat(d,":").concat(t(i,String(d))),comparisonRowId:r,isMultipleMapping:u||i.isMultipleMapping||(null!==(c=null===(a=i.refContentIds)||void 0===a?void 0:a.length)&&void 0!==c?c:0)>1})};exports.buildComparisonRows=function(n,o,l){if(0===o.length&&0===l.length)return[];var r=o.length>0?o:[void 0],d=l.length>0?l:[void 0],u=[];return r.forEach(function(o,r){var a=d[0],c=[n,r,t(o,"empty-left"),0,t(a,"empty-right")].join("::");d.forEach(function(d,a){var s=[n,r,t(o,"empty-left"),a,t(d,"empty-right")].join("::"),f=null!=o&&a>0;u.push({id:s,nodeId:n,left:f?e(n,s,"left",c):i(o,d,n,s,"left",l.length>1),right:i(d,o,n,s,"right"),leftOrdinal:r,rightOrdinal:a})})}),u};
2
+ //# sourceMappingURL=buildComparisonRows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buildComparisonRows.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const a=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;a&&e.setAttribute("nonce",a),e.appendChild(document.createTextNode(".ManageRemainder-module_mrContainer__kVgxT{align-items:center;display:flex;flex-direction:column;gap:1rem;justify-content:center;margin-top:1rem}.ManageRemainder-module_mrSectionBox__bEDtY{border:1px solid #b6c1ca;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;gap:.75rem;padding:.75rem;width:100%}.ManageRemainder-module_mrSectionHeader__5k1HQ{display:flex;flex-direction:column;gap:.25rem}.ManageRemainder-module_mrSectionHeaderContent__eKJWh{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrSectionHeaderLeft__I-hzD{display:flex;flex-direction:column;gap:.25rem}.ManageRemainder-module_mrSectionHeaderRight__W-BY3{align-items:center;display:flex;gap:.25rem;justify-content:flex-start}.ManageRemainder-module_mrSectionTitleWrapper__NA6i-{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrSectionTitleIcon__6pWZz{align-items:center;display:flex;height:.75rem;justify-content:center;width:.75rem}.ManageRemainder-module_mrSectionTitle__BPAU2{color:#334155;font-size:.875rem;font-weight:600}.ManageRemainder-module_mrSectionDescription__HdkjC{color:#334155;font-size:.75rem;font-weight:400}.ManageRemainder-module_mrIconSmall__kbiWd{color:#334155;height:.75rem;width:.75rem}.ManageRemainder-module_mrIconInfo__U8Ylz{color:#64748b;height:1rem;width:1rem}.ManageRemainder-module_mrIconArrow__wMp9q{stroke:#334155;height:.75rem;width:.75rem}.ManageRemainder-module_mrIconAction__l9uVi{height:1rem;width:1rem}.ManageRemainder-module_mrIconPreview__oYo84{stroke:#64748b;height:1rem;width:1rem}.ManageRemainder-module_mrIconCalendar__2gaaf{color:#1e293b;height:1.25rem;width:1.25rem}.ManageRemainder-module_mrIconChevronToggle__LjUy1{color:#4f46e5;height:1rem;position:fixed;width:1rem}.ManageRemainder-module_mrIconDropdown__-heGj{height:.75rem;width:.75rem}.ManageRemainder-module_mrIconSuccess__EMJrR{color:#16a34a;height:1.5rem;width:1.5rem}.ManageRemainder-module_mrChevronButton__QKLsI{align-items:center;display:flex;justify-content:center}.ManageRemainder-module_mrChevronIcon__CxLkq{height:1.25rem;transition:transform .2s ease;width:1.25rem}.ManageRemainder-module_mrChevronIcon__CxLkq.ManageRemainder-module_mrChevronRotated__NL7Ho{transform:rotate(180deg)}.ManageRemainder-module_mrSuccessMessage__4N0gO{align-items:center;display:inline-flex;flex-direction:column;gap:.75rem;width:100%}.ManageRemainder-module_mrSuccessIcon__PsybU{align-items:center;background-color:#dcfce7;border-radius:9999px;box-shadow:0 0 0 4px #fff;display:flex;height:3rem;justify-content:center;width:3rem}.ManageRemainder-module_mrSuccessIconInner__yEl8-{height:1.5rem;position:relative;width:1.5rem}.ManageRemainder-module_mrSuccessText__-hXJh{align-items:center;display:flex;flex-direction:column;gap:.25rem;text-align:center}.ManageRemainder-module_mrSuccessTitle__Zakof{color:#166534;font-size:1rem;font-weight:500;line-height:1.5}.ManageRemainder-module_mrSuccessDescription__-r7A8{color:#22c55e;font-size:.875rem;font-weight:400;line-height:1.25}.ManageRemainder-module_mrRecipientsSection__L0f1k{display:flex;flex-direction:column;gap:.5rem}.ManageRemainder-module_mrRecipientsLabel__Escta{color:#3f3f46;font-size:.75rem;font-weight:500}.ManageRemainder-module_mrRecipientsGrid__-7giX{display:flex;flex-wrap:wrap;gap:.75rem;margin-bottom:.75rem}.ManageRemainder-module_mrRecipientItem__C0uw5{align-items:center;background-color:#fff;border:1px solid #cbd5e1;border-radius:.375rem;display:flex;gap:.5rem;padding:.25rem .5rem}.ManageRemainder-module_mrRecipientInfo__djuEp{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrRecipientAvatar__g6YDo{align-items:center;border-radius:9999px;display:flex;font-size:.6875rem;font-weight:500;height:1.5rem;justify-content:center;width:1.5rem}.ManageRemainder-module_mrRecipientName__gFCJU{color:#3f3f46;font-size:.875rem}.ManageRemainder-module_mrCheckboxUnchecked__j0wYE{background-color:#fff;border:1px solid #d0d5dd;border-radius:.25rem;height:1rem;width:1rem}.ManageRemainder-module_mrCheckboxChecked__TowNb{align-items:center;background-color:#fff;border:1px solid #6938ef;border-radius:.25rem;display:flex;height:1rem;justify-content:center;width:1rem}.ManageRemainder-module_mrCheckboxIcon__RVL-V{height:.625rem;width:.625rem}.ManageRemainder-module_mrActionsSection__in30u{display:flex;gap:.75rem}.ManageRemainder-module_mrActionButton__x9IEC{align-items:center;border:none;border-radius:.375rem;cursor:pointer;display:flex;flex:1;font-size:.875rem;font-weight:500;gap:.5rem;height:2.25rem;justify-content:center}.ManageRemainder-module_mrActionButtonSecondary__GBvpQ{background-color:#fff;border:1px solid #a5b4fc;color:#4f46e5}.ManageRemainder-module_mrActionButtonSecondary__GBvpQ:hover{background-color:#f3f4f6}.ManageRemainder-module_mrActionButtonPrimary__vRNbF{background-color:#4f46e5;color:#fff}.ManageRemainder-module_mrActionButtonPrimary__vRNbF:hover{background-color:#4338ca}.ManageRemainder-module_mrMainContent__2gAUU{display:flex;flex-direction:row;gap:1.75rem;width:100%}.ManageRemainder-module_mrEscalationContainer__V4PfB{background-color:#ffffffb3;border-radius:10px;display:flex;flex:1;flex-direction:column;gap:.75rem;min-width:0;outline:1px solid #b6c1ca;outline-offset:-1px;padding:.75rem}.ManageRemainder-module_mrEscalationHeaderWrapper__vOg2K{cursor:pointer;display:flex;flex-direction:column;gap:.25rem;justify-content:space-between}.ManageRemainder-module_mrEscalationHeader__sV-tw{align-items:center;display:flex;gap:.5rem;justify-content:space-between}.ManageRemainder-module_mrEscalationTitleWrapper__G90xv{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrEscalationTitleText__X233z{color:#3f3f46;font-size:.875rem;font-weight:600;line-height:1.25}.ManageRemainder-module_mrTooltipIcon__QpPGO{height:1rem;overflow:hidden;position:relative;width:1rem}.ManageRemainder-module_mrEscalationActions__RoHhx{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrEscalationPreviewButton__68J90{align-items:center;background-color:#fff;border:none;border-radius:1.29rem;box-shadow:0 1px 2px 0 #0000000d;cursor:pointer;display:flex;gap:.375rem;height:1.75rem;outline:.54px solid #d1d5db;outline-offset:-.54px;padding:.375rem .875rem}.ManageRemainder-module_mrEscalationPreviewIcon__KNa9K{height:1rem;overflow:hidden;position:relative;width:1rem}.ManageRemainder-module_mrEscalationPreviewText__FM5S5{color:#6b7280;font-size:.75rem;font-weight:400;line-height:1rem}.ManageRemainder-module_mrEscalationDescription__z-3q8{color:#334155;font-size:.75rem;font-weight:400}.ManageRemainder-module_mrReorderGroup__sLaAn{display:flex;flex-direction:column;gap:1.5rem}.ManageRemainder-module_mrReminderItem__kwd0b{display:flex;gap:1rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrReminderLabelBox__KRi5V{display:flex;flex-shrink:0;justify-content:center;width:90px}.ManageRemainder-module_mrReminderLabelInner__GuTh-{align-items:center;display:flex}.ManageRemainder-module_mrReminderContent__yKbGS{align-items:center;display:flex;gap:1rem;width:100%}.ManageRemainder-module_mrDragHandle__4Lz8t{align-items:center;cursor:grab;display:flex;gap:.75rem}.ManageRemainder-module_mrReminderBox__ur54z{border-radius:.75rem;padding:.5rem;width:100%}.ManageRemainder-module_mrReminderFields__yQROF{display:flex;flex-direction:column;flex-wrap:wrap;gap:1rem;width:100%}.ManageRemainder-module_mrReminderHeader__wMUF6{align-items:flex-start;display:flex;gap:1rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrReminderAssignee__0p1Gb{align-items:center;display:flex;gap:.75rem}.ManageRemainder-module_mrReminderAvatar__6KM5V{align-items:center;background-color:#dbeafe;border-radius:9999px;display:flex;height:1.75rem;justify-content:center;width:1.75rem}.ManageRemainder-module_mrReminderInitials__bUFkd{color:#1e40af;font-size:.625rem;font-weight:500}.ManageRemainder-module_mrReminderName__zjceM{color:#1f2937;font-size:.75rem;font-weight:500}.ManageRemainder-module_mrReminderStatement__7Y0B-{border-radius:9999px;display:flex;padding:.5rem .75rem}.ManageRemainder-module_mrReminderStatementText__LodbK{font-size:.625rem;font-weight:500;letter-spacing:-.01em}.ManageRemainder-module_mrReminderDateFields__GT4N9{align-items:flex-start;display:flex;gap:1.5rem;width:100%}.ManageRemainder-module_mrReminderField__XBiO4{width:100%}.ManageRemainder-module_mrReminderFieldLabel__S9dXV{color:#3f3f46;font-size:.75rem;font-weight:500;margin-bottom:.25rem}.ManageRemainder-module_mrReminderDatePicker__Vgbui{align-items:center;box-shadow:0 1px 2px 0 #0000000d;color:#3f3f46;display:flex;font-size:.75rem;gap:.75rem;height:1.75rem;justify-content:space-between}.ManageRemainder-module_mrReminderDueDate__7nawQ{align-items:center;background-color:#f1f5f9;border:.5px solid #cbd5e1;border-radius:0;color:#64748b;display:flex;font-size:.75rem;height:1.75rem;padding:0 .75rem}.ManageRemainder-module_mrReminderFrequency__Qq1qa{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrReminderFrequencyText__lGfl0{color:#374151;font-size:.75rem}.ManageRemainder-module_mrEscalationCheckbox__xZrG3{align-items:flex-start;border:1px solid #e5e7eb;border-radius:.25rem;color:#3f3f46;display:flex;flex-direction:column;font-size:.75rem;font-weight:500;gap:.5rem;padding:.5rem;width:100%}.ManageRemainder-module_mrEscalationCheckboxHeader__1GgFB{align-items:flex-start;display:flex;gap:.5rem;justify-content:flex-start;width:100%}.ManageRemainder-module_mrEscalationContent__ItAyr{display:flex;flex-direction:column;gap:.5rem;overflow:hidden;width:100%}.ManageRemainder-module_mrEscalationCondition__4GCeD{color:#3f3f46;font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1;margin-top:.75rem;width:100%}.ManageRemainder-module_mrEscalationFields__oFHp-{align-items:flex-end;display:flex;flex-wrap:wrap;gap:1.5rem;gap:.625rem;width:100%}.ManageRemainder-module_mrEscalationFieldGroup__uES3-{display:flex;flex:1;gap:.75rem;min-width:130px}.ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP{flex:1;min-width:265px}.ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ{display:flex;flex:1;min-width:88px}.ManageRemainder-module_mrEscalationFieldText__n7EfI{color:#3f3f46;font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1.5;min-width:152px}.ManageRemainder-module_mrDropdownButton__9wvGh{align-items:center;cursor:pointer;display:flex;justify-content:center}.ManageRemainder-module_mrCalendarPanel__PnMpt{flex-shrink:0;position:relative}.ManageRemainder-module_mrCalendarCollapsed__mb-bI{background-color:#fff;border:1px solid #b6c1ca;border-radius:10px;display:flex;height:100%;justify-content:center;padding-top:281px;width:43px}.ManageRemainder-module_mrCalendarToggle__9HIet{align-items:center;background:none;border:none;cursor:pointer;display:flex;height:3rem;justify-content:center;left:-26px;position:absolute;top:50%;transform:translateY(-50%);width:2.25rem;z-index:10}@media (max-width:1024px){.ManageRemainder-module_mrMainContent__2gAUU{flex-direction:column;gap:1rem}.ManageRemainder-module_mrCalendarPanel__PnMpt{width:100%}.ManageRemainder-module_mrCalendarToggle__9HIet{display:none}}@media (max-width:768px){.ManageRemainder-module_mrContainer__kVgxT{gap:.5rem;margin-top:.5rem}.ManageRemainder-module_mrSectionBox__bEDtY{gap:.5rem;padding:.5rem}.ManageRemainder-module_mrActionsSection__in30u,.ManageRemainder-module_mrSectionHeaderContent__eKJWh{flex-direction:column}.ManageRemainder-module_mrActionButton__x9IEC{height:2rem}.ManageRemainder-module_mrReminderDateFields__GT4N9{flex-direction:column;gap:1rem}.ManageRemainder-module_mrReminderContent__yKbGS,.ManageRemainder-module_mrReminderItem__kwd0b{gap:.5rem}.ManageRemainder-module_mrEscalationFields__oFHp-{flex-direction:column}.ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP,.ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ,.ManageRemainder-module_mrEscalationFieldGroup__uES3-{min-width:100%;width:100%}.ManageRemainder-module_mrEscalationFieldText__n7EfI{min-width:auto}.ManageRemainder-module_mrReminderLabelBox__KRi5V{width:100%}}button:focus{outline:2px solid #4f46e5;outline-offset:2px}button:active{opacity:.9}.ManageRemainder-module_mrHiddenSection__c67oj{overflow:hidden}.ManageRemainder-module_mrNoPointerEvents__OQbav{pointer-events:none}.ManageRemainder-module_mrPointerEventsAuto__0avRT{pointer-events:auto}.ManageRemainder-module_calendarContainer__N804t{background-color:#fff;border:1px solid #b6c1ca;border-radius:8px;height:100%;min-width:345px;padding:16px}.ManageRemainder-module_calendarHeader__BjE9o{align-items:center;display:flex;gap:6px;margin-bottom:24px}.ManageRemainder-module_calendarHeaderTitle__U8NmV{align-items:center;color:#334155;display:flex;font-size:14px;font-weight:600;gap:6px;line-height:20px}.ManageRemainder-module_calendarHeaderInfo__s05VQ{height:16px;width:16px}.ManageRemainder-module_monthNav__FBbyi{align-items:center;display:flex;justify-content:space-between;margin-bottom:24px}.ManageRemainder-module_monthNavBtn__oor7V{align-items:center;background:none;border:1px solid #dce0e5;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px}.ManageRemainder-module_monthNavTitle__zgDDq{color:#14181f;font-size:15px;font-weight:600;margin:0}.ManageRemainder-module_weekdayHeader__XciP8{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.ManageRemainder-module_weekdayLabel__dDWJo{color:#6f7c8e;font-size:15px;font-weight:400;text-align:center}.ManageRemainder-module_dayGrid__dT0og{display:grid;gap:8px 11px;grid-template-columns:repeat(7,1fr);margin-top:16px}.ManageRemainder-module_dayCell__AGx-w{align-items:center;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;height:35px;justify-content:center}.ManageRemainder-module_dayCellPast__91hbu{background-color:#daf7d2}.ManageRemainder-module_dayCellToday__q8Wvi{border:2px solid #4f46e5}.ManageRemainder-module_dayNumber__6yOVW{font-size:14px}.ManageRemainder-module_dayNumberCurrent__6ML9j{color:#0f172a}.ManageRemainder-module_dayNumberOutside__JQ-t7{color:#94a3b8}.ManageRemainder-module_indicatorWrapper__5FOym{align-items:center;display:flex}.ManageRemainder-module_indicatorDot__ElweF{border-radius:50%;height:6px;width:6px}.ManageRemainder-module_indicatorDotOverlap__QPBRy{margin-left:-1px}.ManageRemainder-module_tooltipContent__ErzOu{background-color:#f8fafc;border-radius:8px;min-width:120px;padding:8px}.ManageRemainder-module_tooltipHeader__Q4qHO{border-bottom:1px solid #cbd5e1;margin-bottom:4px;padding-bottom:4px}.ManageRemainder-module_tooltipTitle__iZtI4{color:#0f172a;font-size:10px;font-weight:500;line-height:16px}.ManageRemainder-module_tooltipDate__ulMaQ{color:#334155;font-size:8px;font-weight:400;line-height:16px}.ManageRemainder-module_tooltipAssignees__jGc-Y{display:flex;flex-direction:column;gap:2px}.ManageRemainder-module_tooltipAssigneeRow__nzr3m{align-items:center;display:flex;gap:12px;justify-content:space-between}.ManageRemainder-module_tooltipAssigneeInfo__vIXTP{align-items:center;display:flex;gap:4px}.ManageRemainder-module_tooltipAssigneeDot__yz6E6{border-radius:50%;height:8px;width:8px}.ManageRemainder-module_tooltipAssigneeName__JJbid{color:#0f172a;font-size:9px;font-weight:400;line-height:16px}.ManageRemainder-module_tooltipAssigneeCount__49OVk{color:#0f172a;font-size:9px;font-weight:500;line-height:16px}.ManageRemainder-module_legendWrapper__OfxhE{align-items:flex-start;display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:38px}.ManageRemainder-module_legendInner__iwIe7{align-items:flex-start;display:flex;gap:6px}.ManageRemainder-module_legendItem__zbxBG{align-items:center;border-radius:4px;cursor:pointer;display:flex;gap:4px;padding:4px 8px;width:100%}.ManageRemainder-module_legendItemAssignee1__I6F-D{background-color:#fdf2f8;border:1px solid #be185d}.ManageRemainder-module_legendItemAssignee2__YObVW{background-color:#eef2ff;border:1px solid #4338ca}.ManageRemainder-module_legendItemAssignee3__uCkBW{background-color:#fff7ed;border:1px solid #f87171;justify-content:center}.ManageRemainder-module_legendLabel__Va4Sw{font-size:12px;font-weight:500}.ManageRemainder-module_legendLabelAssignee1__vG-F4{color:#be185d}.ManageRemainder-module_legendLabelAssignee2__CbGVb{color:#4338ca}.ManageRemainder-module_legendLabelAssignee3__cz-57{color:#f87171}.ManageRemainder-module_checkboxIconUnchecked__xoI0S{background-color:#fff;border:1px solid #d0d5dd;border-radius:4px;height:16px;width:16px}.ManageRemainder-module_checkboxIconChecked__Y3mN2{align-items:center;background-color:#fff;border-radius:4px;display:flex;height:16px;justify-content:center;width:16px}.ManageRemainder-module_checkboxIconCheckedAssignee1__817aZ{border:1px solid #c11574}.ManageRemainder-module_checkboxIconCheckedAssignee2__hTAKp{border:1px solid #3538cd}.ManageRemainder-module_checkboxIconCheckedAssignee3__hQwwN{border:1px solid #ff6058}.ManageRemainder-module_checkboxCheckSvg__R87mg{height:10px;width:10px}.ManageRemainder-module_bottomLegend__rRzkt{align-items:center;display:inline-flex;gap:24px;margin-left:4px;margin-top:16px}.ManageRemainder-module_bottomLegendItem__u90vA{align-items:center;display:flex;gap:4px}.ManageRemainder-module_bottomLegendSwatch__9uu1M{border-radius:2px;height:12px;width:12px}.ManageRemainder-module_bottomLegendSwatchPast__-DcRZ{background-color:#daf7d2}.ManageRemainder-module_bottomLegendSwatchFailed__9lK2I{background-color:#fecaca}.ManageRemainder-module_bottomLegendLabel__9eDD-{color:#334155;font-size:12px;font-weight:500}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={mrContainer:"ManageRemainder-module_mrContainer__kVgxT",mrSectionBox:"ManageRemainder-module_mrSectionBox__bEDtY",mrSectionHeader:"ManageRemainder-module_mrSectionHeader__5k1HQ",mrSectionHeaderContent:"ManageRemainder-module_mrSectionHeaderContent__eKJWh",mrSectionHeaderLeft:"ManageRemainder-module_mrSectionHeaderLeft__I-hzD",mrSectionHeaderRight:"ManageRemainder-module_mrSectionHeaderRight__W-BY3",mrSectionTitleWrapper:"ManageRemainder-module_mrSectionTitleWrapper__NA6i-",mrSectionTitleIcon:"ManageRemainder-module_mrSectionTitleIcon__6pWZz",mrSectionTitle:"ManageRemainder-module_mrSectionTitle__BPAU2",mrSectionDescription:"ManageRemainder-module_mrSectionDescription__HdkjC",mrIconSmall:"ManageRemainder-module_mrIconSmall__kbiWd",mrIconInfo:"ManageRemainder-module_mrIconInfo__U8Ylz",mrIconArrow:"ManageRemainder-module_mrIconArrow__wMp9q",mrIconAction:"ManageRemainder-module_mrIconAction__l9uVi",mrIconPreview:"ManageRemainder-module_mrIconPreview__oYo84",mrIconCalendar:"ManageRemainder-module_mrIconCalendar__2gaaf",mrIconChevronToggle:"ManageRemainder-module_mrIconChevronToggle__LjUy1",mrIconDropdown:"ManageRemainder-module_mrIconDropdown__-heGj",mrIconSuccess:"ManageRemainder-module_mrIconSuccess__EMJrR",mrChevronButton:"ManageRemainder-module_mrChevronButton__QKLsI",mrChevronIcon:"ManageRemainder-module_mrChevronIcon__CxLkq",mrChevronRotated:"ManageRemainder-module_mrChevronRotated__NL7Ho",mrSuccessMessage:"ManageRemainder-module_mrSuccessMessage__4N0gO",mrSuccessIcon:"ManageRemainder-module_mrSuccessIcon__PsybU",mrSuccessIconInner:"ManageRemainder-module_mrSuccessIconInner__yEl8-",mrSuccessText:"ManageRemainder-module_mrSuccessText__-hXJh",mrSuccessTitle:"ManageRemainder-module_mrSuccessTitle__Zakof",mrSuccessDescription:"ManageRemainder-module_mrSuccessDescription__-r7A8",mrHiddenSection:"ManageRemainder-module_mrHiddenSection__c67oj",mrRecipientsSection:"ManageRemainder-module_mrRecipientsSection__L0f1k",mrRecipientsLabel:"ManageRemainder-module_mrRecipientsLabel__Escta",mrRecipientsGrid:"ManageRemainder-module_mrRecipientsGrid__-7giX",mrRecipientItem:"ManageRemainder-module_mrRecipientItem__C0uw5",mrRecipientInfo:"ManageRemainder-module_mrRecipientInfo__djuEp",mrRecipientAvatar:"ManageRemainder-module_mrRecipientAvatar__g6YDo",mrRecipientName:"ManageRemainder-module_mrRecipientName__gFCJU",mrCheckboxUnchecked:"ManageRemainder-module_mrCheckboxUnchecked__j0wYE",mrCheckboxChecked:"ManageRemainder-module_mrCheckboxChecked__TowNb",mrCheckboxIcon:"ManageRemainder-module_mrCheckboxIcon__RVL-V",mrActionsSection:"ManageRemainder-module_mrActionsSection__in30u",mrActionButton:"ManageRemainder-module_mrActionButton__x9IEC",mrActionButtonSecondary:"ManageRemainder-module_mrActionButtonSecondary__GBvpQ",mrActionButtonPrimary:"ManageRemainder-module_mrActionButtonPrimary__vRNbF",mrMainContent:"ManageRemainder-module_mrMainContent__2gAUU",mrEscalationContainer:"ManageRemainder-module_mrEscalationContainer__V4PfB",mrEscalationHeaderWrapper:"ManageRemainder-module_mrEscalationHeaderWrapper__vOg2K",mrEscalationHeader:"ManageRemainder-module_mrEscalationHeader__sV-tw",mrEscalationTitleWrapper:"ManageRemainder-module_mrEscalationTitleWrapper__G90xv",mrEscalationTitleText:"ManageRemainder-module_mrEscalationTitleText__X233z",mrTooltipIcon:"ManageRemainder-module_mrTooltipIcon__QpPGO",mrEscalationActions:"ManageRemainder-module_mrEscalationActions__RoHhx",mrEscalationPreviewButton:"ManageRemainder-module_mrEscalationPreviewButton__68J90",mrEscalationPreviewIcon:"ManageRemainder-module_mrEscalationPreviewIcon__KNa9K",mrEscalationPreviewText:"ManageRemainder-module_mrEscalationPreviewText__FM5S5",mrEscalationDescription:"ManageRemainder-module_mrEscalationDescription__z-3q8",mrReorderGroup:"ManageRemainder-module_mrReorderGroup__sLaAn",mrReminderItem:"ManageRemainder-module_mrReminderItem__kwd0b",mrReminderLabelBox:"ManageRemainder-module_mrReminderLabelBox__KRi5V",mrReminderLabelInner:"ManageRemainder-module_mrReminderLabelInner__GuTh-",mrReminderContent:"ManageRemainder-module_mrReminderContent__yKbGS",mrDragHandle:"ManageRemainder-module_mrDragHandle__4Lz8t",mrReminderBox:"ManageRemainder-module_mrReminderBox__ur54z",mrReminderFields:"ManageRemainder-module_mrReminderFields__yQROF",mrReminderHeader:"ManageRemainder-module_mrReminderHeader__wMUF6",mrReminderAssignee:"ManageRemainder-module_mrReminderAssignee__0p1Gb",mrReminderAvatar:"ManageRemainder-module_mrReminderAvatar__6KM5V",mrReminderInitials:"ManageRemainder-module_mrReminderInitials__bUFkd",mrReminderName:"ManageRemainder-module_mrReminderName__zjceM",mrReminderStatement:"ManageRemainder-module_mrReminderStatement__7Y0B-",mrReminderStatementText:"ManageRemainder-module_mrReminderStatementText__LodbK",mrReminderDateFields:"ManageRemainder-module_mrReminderDateFields__GT4N9",mrReminderField:"ManageRemainder-module_mrReminderField__XBiO4",mrReminderFieldLabel:"ManageRemainder-module_mrReminderFieldLabel__S9dXV",mrReminderDatePicker:"ManageRemainder-module_mrReminderDatePicker__Vgbui",mrReminderDueDate:"ManageRemainder-module_mrReminderDueDate__7nawQ",mrReminderFrequency:"ManageRemainder-module_mrReminderFrequency__Qq1qa",mrReminderFrequencyText:"ManageRemainder-module_mrReminderFrequencyText__lGfl0",mrEscalationCheckbox:"ManageRemainder-module_mrEscalationCheckbox__xZrG3",mrEscalationCheckboxHeader:"ManageRemainder-module_mrEscalationCheckboxHeader__1GgFB",mrEscalationContent:"ManageRemainder-module_mrEscalationContent__ItAyr",mrEscalationCondition:"ManageRemainder-module_mrEscalationCondition__4GCeD",mrEscalationFields:"ManageRemainder-module_mrEscalationFields__oFHp-",mrEscalationFieldGroup:"ManageRemainder-module_mrEscalationFieldGroup__uES3-",mrEscalationFieldGroupLarge:"ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP",mrEscalationFieldGroupSmall:"ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ",mrEscalationFieldText:"ManageRemainder-module_mrEscalationFieldText__n7EfI",mrDropdownButton:"ManageRemainder-module_mrDropdownButton__9wvGh",mrCalendarPanel:"ManageRemainder-module_mrCalendarPanel__PnMpt",mrCalendarCollapsed:"ManageRemainder-module_mrCalendarCollapsed__mb-bI",mrCalendarToggle:"ManageRemainder-module_mrCalendarToggle__9HIet",mrNoPointerEvents:"ManageRemainder-module_mrNoPointerEvents__OQbav",mrPointerEventsAuto:"ManageRemainder-module_mrPointerEventsAuto__0avRT",calendarContainer:"ManageRemainder-module_calendarContainer__N804t",calendarHeader:"ManageRemainder-module_calendarHeader__BjE9o",calendarHeaderTitle:"ManageRemainder-module_calendarHeaderTitle__U8NmV",calendarHeaderInfo:"ManageRemainder-module_calendarHeaderInfo__s05VQ",monthNav:"ManageRemainder-module_monthNav__FBbyi",monthNavBtn:"ManageRemainder-module_monthNavBtn__oor7V",monthNavTitle:"ManageRemainder-module_monthNavTitle__zgDDq",weekdayHeader:"ManageRemainder-module_weekdayHeader__XciP8",weekdayLabel:"ManageRemainder-module_weekdayLabel__dDWJo",dayGrid:"ManageRemainder-module_dayGrid__dT0og",dayCell:"ManageRemainder-module_dayCell__AGx-w",dayCellPast:"ManageRemainder-module_dayCellPast__91hbu",dayCellToday:"ManageRemainder-module_dayCellToday__q8Wvi",dayNumber:"ManageRemainder-module_dayNumber__6yOVW",dayNumberCurrent:"ManageRemainder-module_dayNumberCurrent__6ML9j",dayNumberOutside:"ManageRemainder-module_dayNumberOutside__JQ-t7",indicatorWrapper:"ManageRemainder-module_indicatorWrapper__5FOym",indicatorDot:"ManageRemainder-module_indicatorDot__ElweF",indicatorDotOverlap:"ManageRemainder-module_indicatorDotOverlap__QPBRy",tooltipContent:"ManageRemainder-module_tooltipContent__ErzOu",tooltipHeader:"ManageRemainder-module_tooltipHeader__Q4qHO",tooltipTitle:"ManageRemainder-module_tooltipTitle__iZtI4",tooltipDate:"ManageRemainder-module_tooltipDate__ulMaQ",tooltipAssignees:"ManageRemainder-module_tooltipAssignees__jGc-Y",tooltipAssigneeRow:"ManageRemainder-module_tooltipAssigneeRow__nzr3m",tooltipAssigneeInfo:"ManageRemainder-module_tooltipAssigneeInfo__vIXTP",tooltipAssigneeDot:"ManageRemainder-module_tooltipAssigneeDot__yz6E6",tooltipAssigneeName:"ManageRemainder-module_tooltipAssigneeName__JJbid",tooltipAssigneeCount:"ManageRemainder-module_tooltipAssigneeCount__49OVk",legendWrapper:"ManageRemainder-module_legendWrapper__OfxhE",legendInner:"ManageRemainder-module_legendInner__iwIe7",legendItem:"ManageRemainder-module_legendItem__zbxBG",legendItemAssignee1:"ManageRemainder-module_legendItemAssignee1__I6F-D",legendItemAssignee2:"ManageRemainder-module_legendItemAssignee2__YObVW",legendItemAssignee3:"ManageRemainder-module_legendItemAssignee3__uCkBW",legendLabel:"ManageRemainder-module_legendLabel__Va4Sw",legendLabelAssignee1:"ManageRemainder-module_legendLabelAssignee1__vG-F4",legendLabelAssignee2:"ManageRemainder-module_legendLabelAssignee2__CbGVb",legendLabelAssignee3:"ManageRemainder-module_legendLabelAssignee3__cz-57",checkboxIconUnchecked:"ManageRemainder-module_checkboxIconUnchecked__xoI0S",checkboxIconChecked:"ManageRemainder-module_checkboxIconChecked__Y3mN2",checkboxIconCheckedAssignee1:"ManageRemainder-module_checkboxIconCheckedAssignee1__817aZ",checkboxIconCheckedAssignee2:"ManageRemainder-module_checkboxIconCheckedAssignee2__hTAKp",checkboxIconCheckedAssignee3:"ManageRemainder-module_checkboxIconCheckedAssignee3__hQwwN",checkboxCheckSvg:"ManageRemainder-module_checkboxCheckSvg__R87mg",bottomLegend:"ManageRemainder-module_bottomLegend__rRzkt",bottomLegendItem:"ManageRemainder-module_bottomLegendItem__u90vA",bottomLegendSwatch:"ManageRemainder-module_bottomLegendSwatch__9uu1M",bottomLegendSwatchPast:"ManageRemainder-module_bottomLegendSwatchPast__-DcRZ",bottomLegendSwatchFailed:"ManageRemainder-module_bottomLegendSwatchFailed__9lK2I",bottomLegendLabel:"ManageRemainder-module_bottomLegendLabel__9eDD-"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const a=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;a&&e.setAttribute("nonce",a),e.appendChild(document.createTextNode(".ManageRemainder-module_mrContainer__kVgxT{align-items:center;display:flex;flex-direction:column;gap:1rem;justify-content:center;margin-top:1rem}.ManageRemainder-module_mrSectionBox__bEDtY{border:1px solid #b6c1ca;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;gap:.75rem;padding:.75rem;width:100%}.ManageRemainder-module_mrSectionHeader__5k1HQ{display:flex;flex-direction:column;gap:.25rem}.ManageRemainder-module_mrSectionHeaderContent__eKJWh{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrSectionHeaderLeft__I-hzD{display:flex;flex-direction:column;gap:.25rem}.ManageRemainder-module_mrSectionHeaderRight__W-BY3{align-items:center;display:flex;gap:.25rem;justify-content:flex-start}.ManageRemainder-module_mrSectionTitleWrapper__NA6i-{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrSectionTitleIcon__6pWZz{align-items:center;display:flex;height:.75rem;justify-content:center;width:.75rem}.ManageRemainder-module_mrSectionTitle__BPAU2{color:#334155;font-size:.875rem;font-weight:600}.ManageRemainder-module_mrSectionDescription__HdkjC{color:#334155;font-size:.75rem;font-weight:400}.ManageRemainder-module_mrIconSmall__kbiWd{color:#334155;height:.75rem;width:.75rem}.ManageRemainder-module_mrIconInfo__U8Ylz{color:#64748b;height:1rem;width:1rem}.ManageRemainder-module_mrIconArrow__wMp9q{stroke:#334155;height:.75rem;width:.75rem}.ManageRemainder-module_mrIconAction__l9uVi{height:1rem;width:1rem}.ManageRemainder-module_mrIconPreview__oYo84{stroke:#64748b;height:1rem;width:1rem}.ManageRemainder-module_mrIconCalendar__2gaaf{color:#1e293b;height:1.25rem;width:1.25rem}.ManageRemainder-module_mrIconChevronToggle__LjUy1{color:#4f46e5;height:1rem;position:fixed;width:1rem}.ManageRemainder-module_mrIconDropdown__-heGj{height:.75rem;width:.75rem}.ManageRemainder-module_mrIconSuccess__EMJrR{color:#16a34a;height:1.5rem;width:1.5rem}.ManageRemainder-module_mrChevronButton__QKLsI{align-items:center;display:flex;justify-content:center}.ManageRemainder-module_mrChevronIcon__CxLkq{height:1.25rem;transition:transform .2s ease;width:1.25rem}.ManageRemainder-module_mrChevronIcon__CxLkq.ManageRemainder-module_mrChevronRotated__NL7Ho{transform:rotate(180deg)}.ManageRemainder-module_mrSuccessMessage__4N0gO{align-items:center;display:inline-flex;flex-direction:column;gap:.75rem;width:100%}.ManageRemainder-module_mrSuccessIcon__PsybU{align-items:center;background-color:#dcfce7;border-radius:9999px;box-shadow:0 0 0 4px #fff;display:flex;height:3rem;justify-content:center;width:3rem}.ManageRemainder-module_mrSuccessIconInner__yEl8-{height:1.5rem;position:relative;width:1.5rem}.ManageRemainder-module_mrSuccessText__-hXJh{align-items:center;display:flex;flex-direction:column;gap:.25rem;text-align:center}.ManageRemainder-module_mrSuccessTitle__Zakof{color:#166534;font-size:1rem;font-weight:500;line-height:1.5}.ManageRemainder-module_mrSuccessDescription__-r7A8{color:#22c55e;font-size:.875rem;font-weight:400;line-height:1.25}.ManageRemainder-module_mrRecipientsSection__L0f1k{display:flex;flex-direction:column;gap:.5rem}.ManageRemainder-module_mrRecipientsLabel__Escta{color:#3f3f46;font-size:.75rem;font-weight:500}.ManageRemainder-module_mrRecipientsGrid__-7giX{display:flex;flex-wrap:wrap;gap:.75rem;margin-bottom:.75rem}.ManageRemainder-module_mrRecipientItem__C0uw5{align-items:center;background-color:#fff;border:1px solid #cbd5e1;border-radius:.375rem;display:flex;gap:.5rem;padding:.25rem .5rem}.ManageRemainder-module_mrRecipientInfo__djuEp{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrRecipientAvatar__g6YDo{align-items:center;border-radius:9999px;display:flex;font-size:.6875rem;font-weight:500;height:1.5rem;justify-content:center;width:1.5rem}.ManageRemainder-module_mrRecipientName__gFCJU{color:#3f3f46;font-size:.875rem}.ManageRemainder-module_mrCheckboxUnchecked__j0wYE{background-color:#fff;border:1px solid #d0d5dd;border-radius:.25rem;height:1rem;width:1rem}.ManageRemainder-module_mrCheckboxChecked__TowNb{align-items:center;background-color:#fff;border:1px solid #6938ef;border-radius:.25rem;display:flex;height:1rem;justify-content:center;width:1rem}.ManageRemainder-module_mrCheckboxIcon__RVL-V{height:.625rem;width:.625rem}.ManageRemainder-module_mrActionsSection__in30u{display:flex;gap:.75rem}.ManageRemainder-module_mrActionButton__x9IEC{align-items:center;border:none;border-radius:.375rem;cursor:pointer;display:flex;flex:1;font-size:.875rem;font-weight:500;gap:.5rem;height:2.25rem;justify-content:center}.ManageRemainder-module_mrActionButtonSecondary__GBvpQ{background-color:#fff;border:1px solid #a5b4fc;color:#4f46e5}.ManageRemainder-module_mrActionButtonSecondary__GBvpQ:hover{background-color:#f3f4f6}.ManageRemainder-module_mrActionButtonPrimary__vRNbF{background-color:#4f46e5;color:#fff}.ManageRemainder-module_mrActionButtonPrimary__vRNbF:hover{background-color:#4338ca}.ManageRemainder-module_mrMainContent__2gAUU{display:flex;flex-direction:row;gap:1.75rem;width:100%}.ManageRemainder-module_mrEscalationContainer__V4PfB{background-color:#ffffffb3;border-radius:10px;display:flex;flex:1;flex-direction:column;gap:.75rem;min-width:0;outline:1px solid #b6c1ca;outline-offset:-1px;padding:.75rem}.ManageRemainder-module_mrEscalationHeaderWrapper__vOg2K{cursor:pointer;display:flex;flex-direction:column;gap:.25rem;justify-content:space-between}.ManageRemainder-module_mrEscalationHeader__sV-tw{align-items:center;display:flex;gap:.5rem;justify-content:space-between}.ManageRemainder-module_mrEscalationTitleWrapper__G90xv{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrEscalationTitleText__X233z{color:#3f3f46;font-size:.875rem;font-weight:600;line-height:1.25}.ManageRemainder-module_mrTooltipIcon__QpPGO{height:1rem;overflow:hidden;position:relative;width:1rem}.ManageRemainder-module_mrEscalationActions__RoHhx{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrEscalationPreviewButton__68J90{align-items:center;background-color:#fff;border:none;border-radius:1.29rem;box-shadow:0 1px 2px 0 #0000000d;cursor:pointer;display:flex;gap:.375rem;height:1.75rem;outline:.54px solid #d1d5db;outline-offset:-.54px;padding:.375rem .875rem}.ManageRemainder-module_mrEscalationPreviewIcon__KNa9K{height:1rem;overflow:hidden;position:relative;width:1rem}.ManageRemainder-module_mrEscalationPreviewText__FM5S5{color:#6b7280;font-size:.75rem;font-weight:400;line-height:1rem}.ManageRemainder-module_mrEscalationDescription__z-3q8{color:#334155;font-size:.75rem;font-weight:400}.ManageRemainder-module_mrReorderGroup__sLaAn{display:flex;flex-direction:column;gap:1.5rem}.ManageRemainder-module_mrReminderItem__kwd0b{display:flex;gap:1rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrReminderLabelBox__KRi5V{display:flex;flex-shrink:0;justify-content:center;width:90px}.ManageRemainder-module_mrReminderLabelInner__GuTh-{align-items:center;display:flex}.ManageRemainder-module_mrReminderContent__yKbGS{align-items:center;display:flex;gap:1rem;width:100%}.ManageRemainder-module_mrDragHandle__4Lz8t{align-items:center;cursor:grab;display:flex;gap:.75rem}.ManageRemainder-module_mrReminderBox__ur54z{border-radius:.75rem;padding:.5rem;width:100%}.ManageRemainder-module_mrReminderFields__yQROF{display:flex;flex-direction:column;flex-wrap:wrap;gap:1rem;width:100%}.ManageRemainder-module_mrReminderHeader__wMUF6{align-items:flex-start;display:flex;gap:1rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrReminderAssignee__0p1Gb{align-items:center;display:flex;gap:.75rem}.ManageRemainder-module_mrReminderAvatar__6KM5V{align-items:center;background-color:#dbeafe;border-radius:9999px;display:flex;height:1.75rem;justify-content:center;width:1.75rem}.ManageRemainder-module_mrReminderInitials__bUFkd{color:#1e40af;font-size:.625rem;font-weight:500}.ManageRemainder-module_mrReminderName__zjceM{color:#1f2937;font-size:.75rem;font-weight:500}.ManageRemainder-module_mrReminderStatement__7Y0B-{border-radius:9999px;display:flex;padding:.5rem .75rem}.ManageRemainder-module_mrReminderStatementText__LodbK{font-size:.625rem;font-weight:500;letter-spacing:-.01em}.ManageRemainder-module_mrReminderDateFields__GT4N9{align-items:flex-start;display:flex;gap:1.5rem;width:100%}.ManageRemainder-module_mrReminderField__XBiO4{width:100%}.ManageRemainder-module_mrReminderFieldLabel__S9dXV{color:#3f3f46;font-size:.75rem;font-weight:500;margin-bottom:.25rem}.ManageRemainder-module_mrReminderDatePicker__Vgbui{align-items:center;box-shadow:0 1px 2px 0 #0000000d;color:#3f3f46;display:flex;font-size:.75rem;gap:.75rem;height:1.75rem;justify-content:space-between}.ManageRemainder-module_mrReminderDueDate__7nawQ{align-items:center;background-color:#f1f5f9;border:.5px solid #cbd5e1;border-radius:0;color:#64748b;display:flex;font-size:.75rem;height:1.75rem;padding:0 .75rem}.ManageRemainder-module_mrReminderFrequency__Qq1qa{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrReminderFrequencyText__lGfl0{color:#374151;font-size:.75rem}.ManageRemainder-module_mrEscalationCheckbox__xZrG3{align-items:flex-start;border:1px solid #e5e7eb;border-radius:.25rem;color:#3f3f46;display:flex;flex-direction:column;font-size:.75rem;font-weight:500;gap:.5rem;padding:.5rem;width:100%}.ManageRemainder-module_mrEscalationCheckboxHeader__1GgFB{align-items:flex-start;display:flex;gap:.5rem;justify-content:flex-start;width:100%}.ManageRemainder-module_mrEscalationContent__ItAyr{display:flex;flex-direction:column;gap:.5rem;overflow:hidden;width:100%}.ManageRemainder-module_mrEscalationCondition__4GCeD{color:#3f3f46;font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1;margin-top:.75rem;width:100%}.ManageRemainder-module_mrEscalationFields__oFHp-{align-items:flex-end;display:flex;flex-wrap:wrap;gap:1.5rem;gap:.625rem;width:100%}.ManageRemainder-module_mrEscalationFieldGroup__uES3-{display:flex;flex:1;gap:.75rem;min-width:130px}.ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP{flex:1;min-width:265px}.ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ{display:flex;flex:1;min-width:88px}.ManageRemainder-module_mrEscalationFieldText__n7EfI{color:#3f3f46;font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1.5;min-width:152px}.ManageRemainder-module_mrDropdownButton__9wvGh{align-items:center;cursor:pointer;display:flex;justify-content:center}.ManageRemainder-module_mrCalendarPanel__PnMpt{flex-shrink:0;position:relative}.ManageRemainder-module_mrCalendarCollapsed__mb-bI{background-color:#fff;border:1px solid #b6c1ca;border-radius:10px;display:flex;height:100%;justify-content:center;padding-top:281px;width:43px}.ManageRemainder-module_mrCalendarToggle__9HIet{align-items:center;background:none;border:none;cursor:pointer;display:flex;height:3rem;justify-content:center;left:-26px;position:absolute;top:50%;transform:translateY(-50%);width:2.25rem;z-index:10}@media (max-width:1024px){.ManageRemainder-module_mrMainContent__2gAUU{flex-direction:column;gap:1rem}.ManageRemainder-module_mrCalendarPanel__PnMpt{width:100%}.ManageRemainder-module_mrCalendarToggle__9HIet{display:none}}@media (max-width:768px){.ManageRemainder-module_mrContainer__kVgxT{gap:.5rem;margin-top:.5rem}.ManageRemainder-module_mrSectionBox__bEDtY{gap:.5rem;padding:.5rem}.ManageRemainder-module_mrActionsSection__in30u,.ManageRemainder-module_mrSectionHeaderContent__eKJWh{flex-direction:column}.ManageRemainder-module_mrActionButton__x9IEC{height:2rem}.ManageRemainder-module_mrReminderDateFields__GT4N9{flex-direction:column;gap:1rem}.ManageRemainder-module_mrReminderContent__yKbGS,.ManageRemainder-module_mrReminderItem__kwd0b{gap:.5rem}.ManageRemainder-module_mrEscalationFields__oFHp-{flex-direction:column}.ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP,.ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ,.ManageRemainder-module_mrEscalationFieldGroup__uES3-{min-width:100%;width:100%}.ManageRemainder-module_mrEscalationFieldText__n7EfI{min-width:auto}.ManageRemainder-module_mrReminderLabelBox__KRi5V{width:100%}}button:focus{outline:2px solid #4f46e5;outline-offset:2px}button:active{opacity:.9}.ManageRemainder-module_mrHiddenSection__c67oj{overflow:hidden}.ManageRemainder-module_mrNoPointerEvents__OQbav{pointer-events:none}.ManageRemainder-module_mrPointerEventsAuto__0avRT{pointer-events:auto}.ManageRemainder-module_calendarContainer__N804t{background-color:#fff;border:1px solid #b6c1ca;border-radius:8px;height:100%;min-width:345px;padding:16px}.ManageRemainder-module_calendarHeader__BjE9o{align-items:center;display:flex;gap:6px;margin-bottom:24px}.ManageRemainder-module_calendarHeaderTitle__U8NmV{align-items:center;color:#334155;display:flex;font-size:14px;font-weight:600;gap:6px;line-height:20px}.ManageRemainder-module_calendarHeaderInfo__s05VQ{height:16px;width:16px}.ManageRemainder-module_monthNav__FBbyi{align-items:center;display:flex;justify-content:space-between;margin-bottom:24px}.ManageRemainder-module_monthNavBtn__oor7V{align-items:center;background:none;border:1px solid #dce0e5;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px}.ManageRemainder-module_monthNavTitle__zgDDq{color:#14181f;font-size:15px;font-weight:600;margin:0}.ManageRemainder-module_weekdayHeader__XciP8{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.ManageRemainder-module_weekdayLabel__dDWJo{color:#6f7c8e;font-size:15px;font-weight:400;text-align:center}.ManageRemainder-module_dayGrid__dT0og{display:grid;gap:8px 11px;grid-template-columns:repeat(7,1fr);margin-top:16px}.ManageRemainder-module_dayCell__AGx-w{align-items:center;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;height:35px;justify-content:center}.ManageRemainder-module_dayCellPast__91hbu{background-color:#daf7d2}.ManageRemainder-module_dayCellToday__q8Wvi{border:2px solid #4f46e5}.ManageRemainder-module_dayNumber__6yOVW{font-size:14px}.ManageRemainder-module_dayNumberCurrent__6ML9j{color:#0f172a}.ManageRemainder-module_dayNumberOutside__JQ-t7{color:#94a3b8}.ManageRemainder-module_indicatorWrapper__5FOym{align-items:center;display:flex}.ManageRemainder-module_indicatorDot__ElweF{border-radius:50%;height:6px;width:6px}.ManageRemainder-module_indicatorDotOverlap__QPBRy{margin-left:-1px}.ManageRemainder-module_tooltipContent__ErzOu{background-color:#f8fafc;border-radius:8px;min-width:120px;padding:8px}.ManageRemainder-module_tooltipHeader__Q4qHO{border-bottom:1px solid #cbd5e1;margin-bottom:4px;padding-bottom:4px}.ManageRemainder-module_tooltipTitle__iZtI4{color:#0f172a;font-size:10px;font-weight:500;line-height:16px}.ManageRemainder-module_tooltipDate__ulMaQ{color:#334155;font-size:8px;font-weight:400;line-height:16px}.ManageRemainder-module_tooltipAssignees__jGc-Y{display:flex;flex-direction:column;gap:2px}.ManageRemainder-module_tooltipAssigneeRow__nzr3m{align-items:center;display:flex;gap:12px;justify-content:space-between}.ManageRemainder-module_tooltipAssigneeInfo__vIXTP{align-items:center;display:flex;gap:4px}.ManageRemainder-module_tooltipAssigneeDot__yz6E6{border-radius:50%;height:8px;width:8px}.ManageRemainder-module_tooltipAssigneeName__JJbid{color:#0f172a;font-size:9px;font-weight:400;line-height:16px}.ManageRemainder-module_tooltipAssigneeCount__49OVk{color:#0f172a;font-size:9px;font-weight:500;line-height:16px}.ManageRemainder-module_legendWrapper__OfxhE{align-items:flex-start;display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:38px}.ManageRemainder-module_legendInner__iwIe7{align-items:flex-start;display:flex;flex-wrap:wrap;gap:5px;justify-content:space-evenly}.ManageRemainder-module_legendItem__zbxBG{align-items:center;border-radius:4px;cursor:pointer;display:flex;gap:4px;padding:4px 8px}.ManageRemainder-module_legendItemAssignee1__I6F-D{background-color:#fdf2f8;border:1px solid #be185d}.ManageRemainder-module_legendItemAssignee2__YObVW{background-color:#eef2ff;border:1px solid #4338ca}.ManageRemainder-module_legendItemAssignee3__uCkBW{background-color:#fff7ed;border:1px solid #f87171;justify-content:center}.ManageRemainder-module_legendLabel__Va4Sw{font-size:12px;font-weight:500}.ManageRemainder-module_legendLabelAssignee1__vG-F4{color:#be185d}.ManageRemainder-module_legendLabelAssignee2__CbGVb{color:#4338ca}.ManageRemainder-module_legendLabelAssignee3__cz-57{color:#f87171}.ManageRemainder-module_checkboxIconUnchecked__xoI0S{background-color:#fff;border:1px solid #d0d5dd;border-radius:4px;height:16px;width:16px}.ManageRemainder-module_checkboxIconChecked__Y3mN2{align-items:center;background-color:#fff;border-radius:4px;display:flex;height:16px;justify-content:center;width:16px}.ManageRemainder-module_checkboxIconCheckedAssignee1__817aZ{border:1px solid #c11574}.ManageRemainder-module_checkboxIconCheckedAssignee2__hTAKp{border:1px solid #3538cd}.ManageRemainder-module_checkboxIconCheckedAssignee3__hQwwN{border:1px solid #ff6058}.ManageRemainder-module_checkboxCheckSvg__R87mg{height:10px;width:10px}.ManageRemainder-module_bottomLegend__rRzkt{align-items:center;display:inline-flex;gap:24px;margin-left:4px;margin-top:16px}.ManageRemainder-module_bottomLegendItem__u90vA{align-items:center;display:flex;gap:4px}.ManageRemainder-module_bottomLegendSwatch__9uu1M{border-radius:2px;height:12px;width:12px}.ManageRemainder-module_bottomLegendSwatchPast__-DcRZ{background-color:#daf7d2}.ManageRemainder-module_bottomLegendSwatchFailed__9lK2I{background-color:#fecaca}.ManageRemainder-module_bottomLegendLabel__9eDD-{color:#334155;font-size:12px;font-weight:500}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={mrContainer:"ManageRemainder-module_mrContainer__kVgxT",mrSectionBox:"ManageRemainder-module_mrSectionBox__bEDtY",mrSectionHeader:"ManageRemainder-module_mrSectionHeader__5k1HQ",mrSectionHeaderContent:"ManageRemainder-module_mrSectionHeaderContent__eKJWh",mrSectionHeaderLeft:"ManageRemainder-module_mrSectionHeaderLeft__I-hzD",mrSectionHeaderRight:"ManageRemainder-module_mrSectionHeaderRight__W-BY3",mrSectionTitleWrapper:"ManageRemainder-module_mrSectionTitleWrapper__NA6i-",mrSectionTitleIcon:"ManageRemainder-module_mrSectionTitleIcon__6pWZz",mrSectionTitle:"ManageRemainder-module_mrSectionTitle__BPAU2",mrSectionDescription:"ManageRemainder-module_mrSectionDescription__HdkjC",mrIconSmall:"ManageRemainder-module_mrIconSmall__kbiWd",mrIconInfo:"ManageRemainder-module_mrIconInfo__U8Ylz",mrIconArrow:"ManageRemainder-module_mrIconArrow__wMp9q",mrIconAction:"ManageRemainder-module_mrIconAction__l9uVi",mrIconPreview:"ManageRemainder-module_mrIconPreview__oYo84",mrIconCalendar:"ManageRemainder-module_mrIconCalendar__2gaaf",mrIconChevronToggle:"ManageRemainder-module_mrIconChevronToggle__LjUy1",mrIconDropdown:"ManageRemainder-module_mrIconDropdown__-heGj",mrIconSuccess:"ManageRemainder-module_mrIconSuccess__EMJrR",mrChevronButton:"ManageRemainder-module_mrChevronButton__QKLsI",mrChevronIcon:"ManageRemainder-module_mrChevronIcon__CxLkq",mrChevronRotated:"ManageRemainder-module_mrChevronRotated__NL7Ho",mrSuccessMessage:"ManageRemainder-module_mrSuccessMessage__4N0gO",mrSuccessIcon:"ManageRemainder-module_mrSuccessIcon__PsybU",mrSuccessIconInner:"ManageRemainder-module_mrSuccessIconInner__yEl8-",mrSuccessText:"ManageRemainder-module_mrSuccessText__-hXJh",mrSuccessTitle:"ManageRemainder-module_mrSuccessTitle__Zakof",mrSuccessDescription:"ManageRemainder-module_mrSuccessDescription__-r7A8",mrHiddenSection:"ManageRemainder-module_mrHiddenSection__c67oj",mrRecipientsSection:"ManageRemainder-module_mrRecipientsSection__L0f1k",mrRecipientsLabel:"ManageRemainder-module_mrRecipientsLabel__Escta",mrRecipientsGrid:"ManageRemainder-module_mrRecipientsGrid__-7giX",mrRecipientItem:"ManageRemainder-module_mrRecipientItem__C0uw5",mrRecipientInfo:"ManageRemainder-module_mrRecipientInfo__djuEp",mrRecipientAvatar:"ManageRemainder-module_mrRecipientAvatar__g6YDo",mrRecipientName:"ManageRemainder-module_mrRecipientName__gFCJU",mrCheckboxUnchecked:"ManageRemainder-module_mrCheckboxUnchecked__j0wYE",mrCheckboxChecked:"ManageRemainder-module_mrCheckboxChecked__TowNb",mrCheckboxIcon:"ManageRemainder-module_mrCheckboxIcon__RVL-V",mrActionsSection:"ManageRemainder-module_mrActionsSection__in30u",mrActionButton:"ManageRemainder-module_mrActionButton__x9IEC",mrActionButtonSecondary:"ManageRemainder-module_mrActionButtonSecondary__GBvpQ",mrActionButtonPrimary:"ManageRemainder-module_mrActionButtonPrimary__vRNbF",mrMainContent:"ManageRemainder-module_mrMainContent__2gAUU",mrEscalationContainer:"ManageRemainder-module_mrEscalationContainer__V4PfB",mrEscalationHeaderWrapper:"ManageRemainder-module_mrEscalationHeaderWrapper__vOg2K",mrEscalationHeader:"ManageRemainder-module_mrEscalationHeader__sV-tw",mrEscalationTitleWrapper:"ManageRemainder-module_mrEscalationTitleWrapper__G90xv",mrEscalationTitleText:"ManageRemainder-module_mrEscalationTitleText__X233z",mrTooltipIcon:"ManageRemainder-module_mrTooltipIcon__QpPGO",mrEscalationActions:"ManageRemainder-module_mrEscalationActions__RoHhx",mrEscalationPreviewButton:"ManageRemainder-module_mrEscalationPreviewButton__68J90",mrEscalationPreviewIcon:"ManageRemainder-module_mrEscalationPreviewIcon__KNa9K",mrEscalationPreviewText:"ManageRemainder-module_mrEscalationPreviewText__FM5S5",mrEscalationDescription:"ManageRemainder-module_mrEscalationDescription__z-3q8",mrReorderGroup:"ManageRemainder-module_mrReorderGroup__sLaAn",mrReminderItem:"ManageRemainder-module_mrReminderItem__kwd0b",mrReminderLabelBox:"ManageRemainder-module_mrReminderLabelBox__KRi5V",mrReminderLabelInner:"ManageRemainder-module_mrReminderLabelInner__GuTh-",mrReminderContent:"ManageRemainder-module_mrReminderContent__yKbGS",mrDragHandle:"ManageRemainder-module_mrDragHandle__4Lz8t",mrReminderBox:"ManageRemainder-module_mrReminderBox__ur54z",mrReminderFields:"ManageRemainder-module_mrReminderFields__yQROF",mrReminderHeader:"ManageRemainder-module_mrReminderHeader__wMUF6",mrReminderAssignee:"ManageRemainder-module_mrReminderAssignee__0p1Gb",mrReminderAvatar:"ManageRemainder-module_mrReminderAvatar__6KM5V",mrReminderInitials:"ManageRemainder-module_mrReminderInitials__bUFkd",mrReminderName:"ManageRemainder-module_mrReminderName__zjceM",mrReminderStatement:"ManageRemainder-module_mrReminderStatement__7Y0B-",mrReminderStatementText:"ManageRemainder-module_mrReminderStatementText__LodbK",mrReminderDateFields:"ManageRemainder-module_mrReminderDateFields__GT4N9",mrReminderField:"ManageRemainder-module_mrReminderField__XBiO4",mrReminderFieldLabel:"ManageRemainder-module_mrReminderFieldLabel__S9dXV",mrReminderDatePicker:"ManageRemainder-module_mrReminderDatePicker__Vgbui",mrReminderDueDate:"ManageRemainder-module_mrReminderDueDate__7nawQ",mrReminderFrequency:"ManageRemainder-module_mrReminderFrequency__Qq1qa",mrReminderFrequencyText:"ManageRemainder-module_mrReminderFrequencyText__lGfl0",mrEscalationCheckbox:"ManageRemainder-module_mrEscalationCheckbox__xZrG3",mrEscalationCheckboxHeader:"ManageRemainder-module_mrEscalationCheckboxHeader__1GgFB",mrEscalationContent:"ManageRemainder-module_mrEscalationContent__ItAyr",mrEscalationCondition:"ManageRemainder-module_mrEscalationCondition__4GCeD",mrEscalationFields:"ManageRemainder-module_mrEscalationFields__oFHp-",mrEscalationFieldGroup:"ManageRemainder-module_mrEscalationFieldGroup__uES3-",mrEscalationFieldGroupLarge:"ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP",mrEscalationFieldGroupSmall:"ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ",mrEscalationFieldText:"ManageRemainder-module_mrEscalationFieldText__n7EfI",mrDropdownButton:"ManageRemainder-module_mrDropdownButton__9wvGh",mrCalendarPanel:"ManageRemainder-module_mrCalendarPanel__PnMpt",mrCalendarCollapsed:"ManageRemainder-module_mrCalendarCollapsed__mb-bI",mrCalendarToggle:"ManageRemainder-module_mrCalendarToggle__9HIet",mrNoPointerEvents:"ManageRemainder-module_mrNoPointerEvents__OQbav",mrPointerEventsAuto:"ManageRemainder-module_mrPointerEventsAuto__0avRT",calendarContainer:"ManageRemainder-module_calendarContainer__N804t",calendarHeader:"ManageRemainder-module_calendarHeader__BjE9o",calendarHeaderTitle:"ManageRemainder-module_calendarHeaderTitle__U8NmV",calendarHeaderInfo:"ManageRemainder-module_calendarHeaderInfo__s05VQ",monthNav:"ManageRemainder-module_monthNav__FBbyi",monthNavBtn:"ManageRemainder-module_monthNavBtn__oor7V",monthNavTitle:"ManageRemainder-module_monthNavTitle__zgDDq",weekdayHeader:"ManageRemainder-module_weekdayHeader__XciP8",weekdayLabel:"ManageRemainder-module_weekdayLabel__dDWJo",dayGrid:"ManageRemainder-module_dayGrid__dT0og",dayCell:"ManageRemainder-module_dayCell__AGx-w",dayCellPast:"ManageRemainder-module_dayCellPast__91hbu",dayCellToday:"ManageRemainder-module_dayCellToday__q8Wvi",dayNumber:"ManageRemainder-module_dayNumber__6yOVW",dayNumberCurrent:"ManageRemainder-module_dayNumberCurrent__6ML9j",dayNumberOutside:"ManageRemainder-module_dayNumberOutside__JQ-t7",indicatorWrapper:"ManageRemainder-module_indicatorWrapper__5FOym",indicatorDot:"ManageRemainder-module_indicatorDot__ElweF",indicatorDotOverlap:"ManageRemainder-module_indicatorDotOverlap__QPBRy",tooltipContent:"ManageRemainder-module_tooltipContent__ErzOu",tooltipHeader:"ManageRemainder-module_tooltipHeader__Q4qHO",tooltipTitle:"ManageRemainder-module_tooltipTitle__iZtI4",tooltipDate:"ManageRemainder-module_tooltipDate__ulMaQ",tooltipAssignees:"ManageRemainder-module_tooltipAssignees__jGc-Y",tooltipAssigneeRow:"ManageRemainder-module_tooltipAssigneeRow__nzr3m",tooltipAssigneeInfo:"ManageRemainder-module_tooltipAssigneeInfo__vIXTP",tooltipAssigneeDot:"ManageRemainder-module_tooltipAssigneeDot__yz6E6",tooltipAssigneeName:"ManageRemainder-module_tooltipAssigneeName__JJbid",tooltipAssigneeCount:"ManageRemainder-module_tooltipAssigneeCount__49OVk",legendWrapper:"ManageRemainder-module_legendWrapper__OfxhE",legendInner:"ManageRemainder-module_legendInner__iwIe7",legendItem:"ManageRemainder-module_legendItem__zbxBG",legendItemAssignee1:"ManageRemainder-module_legendItemAssignee1__I6F-D",legendItemAssignee2:"ManageRemainder-module_legendItemAssignee2__YObVW",legendItemAssignee3:"ManageRemainder-module_legendItemAssignee3__uCkBW",legendLabel:"ManageRemainder-module_legendLabel__Va4Sw",legendLabelAssignee1:"ManageRemainder-module_legendLabelAssignee1__vG-F4",legendLabelAssignee2:"ManageRemainder-module_legendLabelAssignee2__CbGVb",legendLabelAssignee3:"ManageRemainder-module_legendLabelAssignee3__cz-57",checkboxIconUnchecked:"ManageRemainder-module_checkboxIconUnchecked__xoI0S",checkboxIconChecked:"ManageRemainder-module_checkboxIconChecked__Y3mN2",checkboxIconCheckedAssignee1:"ManageRemainder-module_checkboxIconCheckedAssignee1__817aZ",checkboxIconCheckedAssignee2:"ManageRemainder-module_checkboxIconCheckedAssignee2__hTAKp",checkboxIconCheckedAssignee3:"ManageRemainder-module_checkboxIconCheckedAssignee3__hQwwN",checkboxCheckSvg:"ManageRemainder-module_checkboxCheckSvg__R87mg",bottomLegend:"ManageRemainder-module_bottomLegend__rRzkt",bottomLegendItem:"ManageRemainder-module_bottomLegendItem__u90vA",bottomLegendSwatch:"ManageRemainder-module_bottomLegendSwatch__9uu1M",bottomLegendSwatchPast:"ManageRemainder-module_bottomLegendSwatchPast__-DcRZ",bottomLegendSwatchFailed:"ManageRemainder-module_bottomLegendSwatchFailed__9lK2I",bottomLegendLabel:"ManageRemainder-module_bottomLegendLabel__9eDD-"};
2
2
  //# sourceMappingURL=ManageRemainder.module.css.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),i=require("react"),t=require("@tanstack/react-query"),e=require("../service/onDemandApi.js"),o=function(n,i,t){var e;return Array.isArray(n)?Array.isArray(i)&&0!==i.length?Number.isNaN(t)?(console.warn("[findCitation] citationNumber is NaN"),null):null!==(e=n.find(function(n){var e,o=function(n){var i,t,e,o,a;if(null==n)return console.warn("[getCitationType] received null or undefined citation"),"";var l=null!==(a=null!==(o=null!==(t=null===(i=null==n?void 0:n.customMetaData)||void 0===i?void 0:i.type)&&void 0!==t?t:null===(e=null==n?void 0:n.customMetadata)||void 0===e?void 0:e.type)&&void 0!==o?o:null==n?void 0:n.type)&&void 0!==a?a:"";return l||console.warn("[getCitationType] citation has no resolvable type field",n),l}(n);return(null===(e=function(n){var i;return null==n?(console.warn("[getCitationNumber] received null or undefined citation"),""):(null==n.citation_number&&console.warn("[getCitationNumber] citation is missing citation_number field",n),null!==(i=null==n?void 0:n.citation_number)&&void 0!==i?i:"")}(n))||void 0===e?void 0:e.toString())===t.toString()&&i.some(function(n){return null==o?void 0:o.includes(n)})}))&&void 0!==e?e:null:(console.warn("[findCitation] citationTypes is empty or falsy",i),null):(console.warn("[findCitation] citations is not an array",n),null)};exports.useOnDemandCitationFetch=function(a){var l=a.msg,r=a.citationType,u=a.citationNumber,c=a.enabled,s=void 0!==c&&c,d=a.accessToken,v=a.baseUrl,_=a.orgName,f=a.citationAssistantProcessingName,m=a.citationAgentName,h=(null==l?void 0:l.requestId)||(null==l?void 0:l.id)||"",y=i.useMemo(function(){return function(n){switch(n){case"artifact_chunks":return["artifact_chunks","scanned_doc_citation","scanned_doc_citations"];case"rai_artifact_citation":return["rai_artifact_citation","rai_artifact_citations"];case"json_chunks":return["json_chunks"];case"scanned_doc_citation":return["scanned_doc_citation","scanned_doc_citations","artifact_chunks"];case"scanned_doc_citations":return["scanned_doc_citations","scanned_doc_citation","artifact_chunks"];default:return[n]}}(r)},[r]),g=function(){switch(r){case"artifact_chunks":case"scanned_doc_citations":return"scanned_doc_citation";case"rai_artifact_citation":return"rai_artifact_citation";default:return r}}(),p=(null==l?void 0:l.isEcgPayloadActive)?i.useMemo(function(){return["onDemandCitationFetch",h,g,null==l?void 0:l.customCitationId,null==l?void 0:l.ecg_agent_name]},[h,g,null==l?void 0:l.customCitationId,null==l?void 0:l.ecg_agent_name]):i.useMemo(function(){return["onDemandCitationFetch",h,g,u]},[h,g,u]),C=i.useMemo(function(){return o(null==l?void 0:l.citations,y,u)},[null==l?void 0:l.citations,y,u]),b=Boolean(s&&h&&g&&v&&_&&!Number.isNaN(u)&&!C),N=d,w=!0===(null==l?void 0:l.isStreamEnd),A=t.useQuery({queryKey:p,queryFn:function(){return n.__awaiter(void 0,void 0,void 0,function(){var i,t,o,a,r,c,s,d;return n.__generator(this,function(n){switch(n.label){case 0:return[4,e.fetchOnDemandCitation(h,g,u,null!==(t=null==l?void 0:l.content)&&void 0!==t?t:"",N,v,null!=f?f:"",_,null!=m?m:"",null!==(o=null==l?void 0:l.isEcgPayloadActive)&&void 0!==o&&o,null!==(a=null==l?void 0:l.ecg_agent_name)&&void 0!==a?a:"",null!==(r=null==l?void 0:l.customCitationId)&&void 0!==r?r:"",null!==(c=null==l?void 0:l.plan_id)&&void 0!==c?c:"",null!==(s=null==l?void 0:l.ui_chat_history)&&void 0!==s?s:void 0)];case 1:if((i=n.sent()).error||!i.responseData)throw new Error((null===(d=i.error)||void 0===d?void 0:d.errorMessage)||"Failed to fetch on-demand citation");return[2,i.responseData]}})})},enabled:b&&w&&Boolean(null==l?void 0:l.content),staleTime:1/0,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,retry:!1}),M=i.useMemo(function(){var n,i,t,e,a,r,c,s=null!==(t=null===(i=null===(n=A.data)||void 0===n?void 0:n.result)||void 0===i?void 0:i.citations)&&void 0!==t?t:[];return Array.isArray(s)&&0!==s.length?(null==l?void 0:l.customCitationId)?null!==(a=null!==(e=s.find(function(n){var i,t,e=null!==(t=null!==(i=null==n?void 0:n.title)&&void 0!==i?i:null==n?void 0:n.display_name)&&void 0!==t?t:"";return"string"==typeof e&&e.includes(l.customCitationId)}))&&void 0!==e?e:s[0])&&void 0!==a?a:null:null!==(c=null!==(r=o(s,y,u))&&void 0!==r?r:s[0])&&void 0!==c?c:null:null},[null==l?void 0:l.customCitationId,u,y,A.data]);return{citation:null!=C?C:M,isFetching:A.isFetching,isLoading:A.isLoading,isComplete:A.isSuccess,status:A.status,refetch:A.refetch}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var n=require("tslib"),i=require("react"),t=require("@tanstack/react-query"),e=require("../service/onDemandApi.js"),o=function(n,i,t){var e;return Array.isArray(n)?Array.isArray(i)&&0!==i.length?Number.isNaN(t)?(console.warn("[findCitation] citationNumber is NaN"),null):null!==(e=n.find(function(n){var e,o=function(n){var i,t,e,o,a;if(null==n)return console.warn("[getCitationType] received null or undefined citation"),"";var l=null!==(a=null!==(o=null!==(t=null===(i=null==n?void 0:n.customMetaData)||void 0===i?void 0:i.type)&&void 0!==t?t:null===(e=null==n?void 0:n.customMetadata)||void 0===e?void 0:e.type)&&void 0!==o?o:null==n?void 0:n.type)&&void 0!==a?a:"";return l||console.warn("[getCitationType] citation has no resolvable type field",n),l}(n);return(null===(e=function(n){var i;return null==n?(console.warn("[getCitationNumber] received null or undefined citation"),""):(null==n.citation_number&&console.warn("[getCitationNumber] citation is missing citation_number field",n),null!==(i=null==n?void 0:n.citation_number)&&void 0!==i?i:"")}(n))||void 0===e?void 0:e.toString())===t.toString()&&i.some(function(n){return null==o?void 0:o.includes(n)})}))&&void 0!==e?e:null:(console.warn("[findCitation] citationTypes is empty or falsy",i),null):(console.warn("[findCitation] citations is not an array",n),null)};exports.useOnDemandCitationFetch=function(a){var l=a.msg,r=a.citationType,u=a.citationNumber,c=a.enabled,d=void 0!==c&&c,s=a.accessToken,v=a.baseUrl,_=a.orgName,f=a.citationAssistantProcessingName,m=a.citationAgentName,y=(null==l?void 0:l.requestId)||(null==l?void 0:l.id)||"",g=i.useMemo(function(){return function(n){switch(n){case"artifact_chunks":return["artifact_chunks","scanned_doc_citation","scanned_doc_citations"];case"rai_artifact_citation":return["rai_artifact_citation","rai_artifact_citations"];case"json_chunks":return["json_chunks"];case"scanned_doc_citation":return["scanned_doc_citation","scanned_doc_citations","artifact_chunks"];case"scanned_doc_citations":return["scanned_doc_citations","scanned_doc_citation","artifact_chunks"];default:return[n]}}(r)},[r]),h=function(){switch(r){case"artifact_chunks":case"scanned_doc_citations":return"scanned_doc_citation";case"rai_artifact_citation":return"rai_artifact_citation";default:return r}}(),p=(null==l?void 0:l.isEcgPayloadActive)?i.useMemo(function(){return["onDemandCitationFetch",y,h,null==l?void 0:l.customCitationId,null==l?void 0:l.ecg_agent_name]},[y,h,null==l?void 0:l.customCitationId,null==l?void 0:l.ecg_agent_name]):i.useMemo(function(){return["onDemandCitationFetch",y,h,u]},[y,h,u]),C=i.useMemo(function(){return o(null==l?void 0:l.citations,g,u)},[null==l?void 0:l.citations,g,u]),b=Boolean(d&&y&&h&&v&&_&&!Number.isNaN(u)&&!C),A=s,N=!0===(null==l?void 0:l.isStreamEnd),w=t.useQuery({queryKey:p,queryFn:function(){return n.__awaiter(void 0,void 0,void 0,function(){var i,t,o,a,r,c,d,s,g;return n.__generator(this,function(n){switch(n.label){case 0:return[4,e.fetchOnDemandCitation(y,h,u,null!==(t=null==l?void 0:l.content)&&void 0!==t?t:"",A,v,null!=f?f:"",_,null!=m?m:"",null!==(o=null==l?void 0:l.isEcgPayloadActive)&&void 0!==o&&o,"boolean"==typeof(null==l?void 0:l.isReqPayloadActive)&&l.isReqPayloadActive,null!==(a=null==l?void 0:l.ecg_agent_name)&&void 0!==a?a:"",null!==(r=null==l?void 0:l.customCitationId)&&void 0!==r?r:"",null!==(c=null==l?void 0:l.plan_id)&&void 0!==c?c:"",null!==(d=null==l?void 0:l.ui_chat_history)&&void 0!==d?d:void 0,null!==(s=null==l?void 0:l.mmvf_list)&&void 0!==s?s:void 0,Array.isArray(null==l?void 0:l.files)?l.files:[],"string"==typeof(null==l?void 0:l.metadata)&&l.metadata.trim()?l.metadata:"")];case 1:if((i=n.sent()).error||!i.responseData)throw new Error((null===(g=i.error)||void 0===g?void 0:g.errorMessage)||"Failed to fetch on-demand citation");return[2,i.responseData]}})})},enabled:b&&N&&Boolean(null==l?void 0:l.content),staleTime:1/0,cacheTime:1/0,refetchOnMount:!1,refetchOnWindowFocus:!1,retry:!1}),q=i.useMemo(function(){var n,i,t,e,a,r,c,d=null!==(t=null===(i=null===(n=w.data)||void 0===n?void 0:n.result)||void 0===i?void 0:i.citations)&&void 0!==t?t:[];return Array.isArray(d)&&0!==d.length?(null==l?void 0:l.customCitationId)?null!==(a=null!==(e=d.find(function(n){var i,t,e=null!==(t=null!==(i=null==n?void 0:n.title)&&void 0!==i?i:null==n?void 0:n.display_name)&&void 0!==t?t:"";return"string"==typeof e&&e.includes(l.customCitationId)}))&&void 0!==e?e:d[0])&&void 0!==a?a:null:null!==(c=null!==(r=o(d,g,u))&&void 0!==r?r:d[0])&&void 0!==c?c:null:null},[null==l?void 0:l.customCitationId,u,g,w.data]);return{citation:null!=C?C:q,isFetching:w.isFetching,isLoading:w.isLoading,isComplete:w.isSuccess,status:w.status,refetch:w.refetch}};
2
2
  //# sourceMappingURL=useOnDemandCitationFetch.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("axios"),t=require("./apicache.service.js"),n=require("../types/onDemandApi.types.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(r),o=72e5,i=function(e){if(e&&"object"==typeof e){var r=e;return"string"==typeof r.message?r.message:"string"==typeof r.errorMessage?r.errorMessage:"string"==typeof r.error?r.error:r.error&&"object"==typeof r.error&&"string"==typeof r.error.message?r.error.message:"string"==typeof r.details?r.details:r}},c=function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){if(s.default.isAxiosError(r)){if("ECONNABORTED"===(t=r).code)return[2,{type:n.NetworkErrorType.TIMEOUT,message:"The request took too long to complete. Please try again.",originalError:r}];if(t.message.includes("net::ERR_NETWORK_CHANGED")||t.message.includes("net::ERR_INTERNET_DISCONNECTED")||t.message.includes("net::ERR_NAME_NOT_RESOLVED"))return[2,{type:n.NetworkErrorType.INTERNET_DISCONNECTED,message:"Internet connection issue detected. Please check your network.",originalError:r}];if(t.message.includes("Network Error")||"ERR_NETWORK"===t.code||t.message.includes("net::ERR_CONNECTION_REFUSED")||t.message.includes("net::ERR_EMPTY_RESPONSE"))return[2,{type:n.NetworkErrorType.SERVER_UNREACHABLE,message:"Unable to connect to server. The service may be down or unreachable.",originalError:r}];if(t.response&&t.response.status>=500)return[2,{type:n.NetworkErrorType.SERVER_ERROR,message:"Service Unavailable. Server error (".concat(t.response.status,")."),status:t.response.status,originalError:r}];if(t.response&&t.response.status>=400&&t.response.status<500)return[2,{type:n.NetworkErrorType.SERVER_ERROR,message:i(t.response.data)||"Request failed with status code ".concat(t.response.status),status:t.response.status,originalError:r}]}return[2,{type:n.NetworkErrorType.UNKNOWN_ERROR,message:"An unexpected error occurred. Please try again later.",originalError:r}]})})},u=function(r,t){void 0===t&&(t=18e4);var n=s.default.create({baseURL:r,timeout:t});return n.interceptors.request.use(function(r){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){return[2,r]})})},function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,c(r)];case 1:return t=e.sent(),[2,Promise.reject(t)]}})})}),n.interceptors.response.use(function(e){return e},function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,c(r)];case 1:return t=e.sent(),console.error("API Request Failed:",t),[2,Promise.reject(t)]}})})}),n},p=function(e,r,t){return"".concat(e,":").concat(r,":").concat(JSON.stringify(t||{}))},l=u(),_=function(r,t,a){return e.__awaiter(void 0,void 0,void 0,function(){var s,o,i,p,_,d,E;return e.__generator(this,function(g){switch(g.label){case 0:switch(g.trys.push([0,13,,15]),s=(null==a?void 0:a.baseURL)?u(a.baseURL):l,i=(o=a||{}).data,p=o.config,_=void 0,r.toLowerCase()){case"get":return[3,1];case"post":return[3,3];case"put":return[3,5];case"patch":return[3,7];case"delete":return[3,9]}return[3,11];case 1:return[4,s.get(t,p)];case 2:case 4:case 6:case 8:case 10:return _=g.sent(),[3,12];case 3:return[4,s.post(t,i,p)];case 5:return[4,s.put(t,i,p)];case 7:return[4,s.patch(t,i,p)];case 9:return d=e.__assign(e.__assign({},p),{data:i}),[4,s.delete(t,d)];case 11:throw new Error("Unsupported method: ".concat(r));case 12:return[2,{responseData:_.data,error:null}];case 13:return(E=g.sent()).type&&Object.values(n.NetworkErrorType).includes(E.type)?[2,{responseData:null,error:E}]:[4,c(E)];case 14:return[2,{responseData:null,error:g.sent()}];case 15:return[2]}})})},d=function(r,a,s){return e.__awaiter(void 0,void 0,void 0,function(){var i,c,u,l,d,E,g,f,y,h,v,R,m,N;return e.__generator(this,function(T){switch(T.label){case 0:return c=(i=s||{}).data,u=i.params,l=i.config,d=i.errorMessage,E=i.baseURL,g=i.cacheOption,f=i.shouldCache,y=null!==(N=null==g?void 0:g.ttl)&&void 0!==N?N:o,h=(null==g?void 0:g.key)||p(r,a,u),(null==g?void 0:g.forceRefresh)||(null==g?void 0:g.skipCache)?[3,2]:[4,t.apiCache.get(h)];case 1:if(v=T.sent())return[2,{responseData:v.data,error:null,cacheMeta:{isFromCache:!0,timestamp:v.timestamp,ttl:v.ttl,cacheKey:h}}];T.label=2;case 2:return R=e.__assign(e.__assign({},l),u&&{params:u}),[4,_(r,a,{data:c,config:R,baseURL:E})];case 3:return m=T.sent(),!(null==g?void 0:g.skipCache)&&null!=m.responseData&&(!f||f(m.responseData))?[4,t.apiCache.set(h,m.responseData,y)]:[3,5];case 4:T.sent(),T.label=5;case 5:return[2,{responseData:m.responseData,error:m.error?{errorMessage:m.error.type===n.NetworkErrorType.INTERNET_DISCONNECTED||m.error.type===n.NetworkErrorType.SLOW_CONNECTION||m.error.type===n.NetworkErrorType.TIMEOUT?m.error.message:m.error.type===n.NetworkErrorType.SERVER_UNREACHABLE?"Unable to connect to server. Please try again later.":d||m.error.message,errorObjData:m.error}:null,cacheMeta:{isFromCache:!1,timestamp:Date.now(),ttl:y,cacheKey:h}}]}})})};Object.defineProperty(exports,"NetworkErrorType",{enumerable:!0,get:function(){return n.NetworkErrorType}}),exports.DEFAULT_CACHE_TTL=o,exports.createApiInstance=u,exports.fetchOnDemandCitation=function(r,t,n,a,s,o,i,c,u,p,l,_,E,g){return e.__awaiter(void 0,void 0,void 0,function(){var s,f,y,h;return e.__generator(this,function(v){return s="artifact_chunks"===t||"scanned_doc_citation"===t?"artifact_chunks":t,f=p?_:"".concat(s,"_").concat(n),[2,d(y="post",h="/api/chat/chatResponse",{baseURL:o,data:{name:i||"citationsprocessing",organizationName:c,prompt:"",useAgent:{agent_name:u||"ProcessCitationsAgent",arguments:e.__assign(e.__assign({citation_type:t,is_primary_agent_request:!1},p&&{check_possible_citation_payload:!1}),{ui_request_body:e.__assign(e.__assign(e.__assign({llm_formatted_response:a,request_id:r,max_concurrent_citations:10,citation_id:f},p&&l&&{ecg_agent_name:l}),p&&E&&{plan_id:E}),p&&g&&{ui_chat_history:g})})}},config:{headers:{"Content-Type":"application/json"},withCredentials:!0},errorMessage:"Failed to fetch on-demand citation",cacheOption:{key:"".concat(y,":").concat(h,":onDemandCitation:").concat(r,":").concat(t,":").concat(p?_:n,":").concat(p?l:"")},shouldCache:function(e){var r;return Array.isArray(null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.citations)&&Boolean(e.result.citations[0])}})]})})},exports.generateCacheKey=p,exports.makeApiRequest=_,exports.makeApiRequestWithTTLCache=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("axios"),t=require("./apicache.service.js"),a=require("../types/onDemandApi.types.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=s(r),o=72e5,i=function(e){if(e&&"object"==typeof e){var r=e;return"string"==typeof r.message?r.message:"string"==typeof r.errorMessage?r.errorMessage:"string"==typeof r.error?r.error:r.error&&"object"==typeof r.error&&"string"==typeof r.error.message?r.error.message:"string"==typeof r.details?r.details:r}},c=function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){if(n.default.isAxiosError(r)){if("ECONNABORTED"===(t=r).code)return[2,{type:a.NetworkErrorType.TIMEOUT,message:"The request took too long to complete. Please try again.",originalError:r}];if(t.message.includes("net::ERR_NETWORK_CHANGED")||t.message.includes("net::ERR_INTERNET_DISCONNECTED")||t.message.includes("net::ERR_NAME_NOT_RESOLVED"))return[2,{type:a.NetworkErrorType.INTERNET_DISCONNECTED,message:"Internet connection issue detected. Please check your network.",originalError:r}];if(t.message.includes("Network Error")||"ERR_NETWORK"===t.code||t.message.includes("net::ERR_CONNECTION_REFUSED")||t.message.includes("net::ERR_EMPTY_RESPONSE"))return[2,{type:a.NetworkErrorType.SERVER_UNREACHABLE,message:"Unable to connect to server. The service may be down or unreachable.",originalError:r}];if(t.response&&t.response.status>=500)return[2,{type:a.NetworkErrorType.SERVER_ERROR,message:"Service Unavailable. Server error (".concat(t.response.status,")."),status:t.response.status,originalError:r}];if(t.response&&t.response.status>=400&&t.response.status<500)return[2,{type:a.NetworkErrorType.SERVER_ERROR,message:i(t.response.data)||"Request failed with status code ".concat(t.response.status),status:t.response.status,originalError:r}]}return[2,{type:a.NetworkErrorType.UNKNOWN_ERROR,message:"An unexpected error occurred. Please try again later.",originalError:r}]})})},u=function(r,t){void 0===t&&(t=18e4);var a=n.default.create({baseURL:r,timeout:t});return a.interceptors.request.use(function(r){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){return[2,r]})})},function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,c(r)];case 1:return t=e.sent(),[2,Promise.reject(t)]}})})}),a.interceptors.response.use(function(e){return e},function(r){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return[4,c(r)];case 1:return t=e.sent(),console.error("API Request Failed:",t),[2,Promise.reject(t)]}})})}),a},p=function(e,r,t){return"".concat(e,":").concat(r,":").concat(JSON.stringify(t||{}))},l=u(),_=function(r,t,s){return e.__awaiter(void 0,void 0,void 0,function(){var n,o,i,p,_,d,g;return e.__generator(this,function(E){switch(E.label){case 0:switch(E.trys.push([0,13,,15]),n=(null==s?void 0:s.baseURL)?u(s.baseURL):l,i=(o=s||{}).data,p=o.config,_=void 0,r.toLowerCase()){case"get":return[3,1];case"post":return[3,3];case"put":return[3,5];case"patch":return[3,7];case"delete":return[3,9]}return[3,11];case 1:return[4,n.get(t,p)];case 2:case 4:case 6:case 8:case 10:return _=E.sent(),[3,12];case 3:return[4,n.post(t,i,p)];case 5:return[4,n.put(t,i,p)];case 7:return[4,n.patch(t,i,p)];case 9:return d=e.__assign(e.__assign({},p),{data:i}),[4,n.delete(t,d)];case 11:throw new Error("Unsupported method: ".concat(r));case 12:return[2,{responseData:_.data,error:null}];case 13:return(g=E.sent()).type&&Object.values(a.NetworkErrorType).includes(g.type)?[2,{responseData:null,error:g}]:[4,c(g)];case 14:return[2,{responseData:null,error:E.sent()}];case 15:return[2]}})})},d=function(r,s,n){return e.__awaiter(void 0,void 0,void 0,function(){var i,c,u,l,d,g,E,f,y,v,h,m,R,N;return e.__generator(this,function(T){switch(T.label){case 0:return c=(i=n||{}).data,u=i.params,l=i.config,d=i.errorMessage,g=i.baseURL,E=i.cacheOption,f=i.shouldCache,y=null!==(N=null==E?void 0:E.ttl)&&void 0!==N?N:o,v=(null==E?void 0:E.key)||p(r,s,u),(null==E?void 0:E.forceRefresh)||(null==E?void 0:E.skipCache)?[3,2]:[4,t.apiCache.get(v)];case 1:if(h=T.sent())return[2,{responseData:h.data,error:null,cacheMeta:{isFromCache:!0,timestamp:h.timestamp,ttl:h.ttl,cacheKey:v}}];T.label=2;case 2:return m=e.__assign(e.__assign({},l),u&&{params:u}),[4,_(r,s,{data:c,config:m,baseURL:g})];case 3:return R=T.sent(),!(null==E?void 0:E.skipCache)&&null!=R.responseData&&(!f||f(R.responseData))?[4,t.apiCache.set(v,R.responseData,y)]:[3,5];case 4:T.sent(),T.label=5;case 5:return[2,{responseData:R.responseData,error:R.error?{errorMessage:R.error.type===a.NetworkErrorType.INTERNET_DISCONNECTED||R.error.type===a.NetworkErrorType.SLOW_CONNECTION||R.error.type===a.NetworkErrorType.TIMEOUT?R.error.message:R.error.type===a.NetworkErrorType.SERVER_UNREACHABLE?"Unable to connect to server. Please try again later.":d||R.error.message,errorObjData:R.error}:null,cacheMeta:{isFromCache:!1,timestamp:Date.now(),ttl:y,cacheKey:v}}]}})})};Object.defineProperty(exports,"NetworkErrorType",{enumerable:!0,get:function(){return a.NetworkErrorType}}),exports.DEFAULT_CACHE_TTL=o,exports.createApiInstance=u,exports.fetchOnDemandCitation=function(r,t,a,s,n,o,i,c,u,p,l,_,g,E,f,y,v,h){return e.__awaiter(void 0,void 0,void 0,function(){var n,m,R,N;return e.__generator(this,function(T){return n="artifact_chunks"===t||"scanned_doc_citation"===t?"artifact_chunks":t,m=p?g:"".concat(n,"_").concat(a),[2,d(R="post",N="/api/chat/chatResponse",{baseURL:o,data:{name:i||"citationsprocessing",organizationName:c,prompt:"",useAgent:{agent_name:u||"ProcessCitationsAgent",metadata:l?h:void 0,arguments:e.__assign(e.__assign({citation_type:t,is_primary_agent_request:!1},p&&{check_possible_citation_payload:!1}),{ui_request_body:e.__assign(e.__assign(e.__assign(e.__assign(e.__assign({llm_formatted_response:s,request_id:r,max_concurrent_citations:10,citation_id:m},p&&_&&{ecg_agent_name:_}),p&&E&&{plan_id:E}),p&&f&&{ui_chat_history:f}),l&&y&&{mmvf_list:y}),l&&v&&{files:v})})}},config:{headers:{"Content-Type":"application/json"},withCredentials:!0},errorMessage:"Failed to fetch on-demand citation",cacheOption:{key:"".concat(R,":").concat(N,":onDemandCitation:").concat(r,":").concat(t,":").concat(p?g:a,":").concat(p?_:"")},shouldCache:function(e){var r;return Array.isArray(null===(r=null==e?void 0:e.result)||void 0===r?void 0:r.citations)&&Boolean(e.result.citations[0])}})]})})},exports.generateCacheKey=p,exports.makeApiRequest=_,exports.makeApiRequestWithTTLCache=d;
2
2
  //# sourceMappingURL=onDemandApi.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i,__awaiter as n,__generator as o}from"tslib";import{jsxs as t,jsx as e,Fragment as l}from"react/jsx-runtime";import{Globe as r,ChevronUp as a,ChevronDown as d,Maximize2 as u,X as c,ExternalLink as s}from"lucide-react";import{useState as v,useEffect as p,useMemo as h,useRef as m}from"react";import g from"./ResizableSplitPane.js";import f from"../PdfViewer/PdfViewer.js";import{DefaultFullScreenCloseIcon as x,DefaultFullScreenIcon as b}from"../../assests/svg/PdfViewerIcons.js";import _ from"react-markdown";import y from"rehype-raw";import{Dialog as w,Box as C}from"@mui/material";import{SHARED_MARKDOWN_STYLES as F}from"./CognitiveCompareConfig.js";import"react-dom";import{useCompareContext as D}from"./CompareContext.js";import{processGuidelinesMarkdown as P}from"./Guidelines/utils/processGuidelinesMarkdown.js";import S from"../GptWebCitation/GptWebCitation.js";import{CitationType as T}from"../GptWebCitation/types.js";import"./MoreFunctionsPopup.js";import"./components/SubSectionAccordion.js";import"./components/LHSSectionRow.js";import"./components/RHSSectionRow.js";var k=function(i){var n,o,t;return(null===(t=null===(o=null===(n=(null==i?void 0:i.extraMetaData)||i)||void 0===n?void 0:n.aiReasoningCitation)||void 0===o?void 0:o.gpt_citation)||void 0===t?void 0:t[0])||null},j="https://dev-proposals-ai.techo.camp/utility/ca-workflow-composer-agent/get_citation",I="sai.siddhartha@techolution.com",G="672e32f7a0e8fe2e8e50bcba",N="TNV Sai Siddhartha",R="90vh",E="calc(".concat(R," - 120px)"),M=function(){var i;return"function"==typeof(null===(i=globalThis.crypto)||void 0===i?void 0:i.randomUUID)?globalThis.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var n=Math.floor(16*Math.random());return("x"===i?n:n%4+8).toString(16)})},A=function(i,n){var o=function(i){var n;return(null==i?void 0:i.payloadCitationId)||(null===(n=null==i?void 0:i.extraMetaData)||void 0===n?void 0:n.payloadCitationId)||""}(i)||n||M();return function(i,n){i&&"object"==typeof i&&(i.payloadCitationId=n,i.extraMetaData&&"object"==typeof i.extraMetaData&&(i.extraMetaData.payloadCitationId=n))}(i,o),o},U=function(t){var l,r=t.metaData,g=t.isFullscreen,f=void 0!==g&&g,x=D().gptWebCitationConfig,b=h(function(){return function(i){return{endpoint:(null==i?void 0:i.endpoint)||j,userEmail:(null==i?void 0:i.userEmail)||I,userId:(null==i?void 0:i.userId)||G,userName:(null==i?void 0:i.userName)||N,headers:null==i?void 0:i.headers}}(x)},[x]),_=null==r?void 0:r.webGpt,y=m(null);y.current||(y.current=M());var w=h(function(){return function(i,n,o){var t,e,l=k(i),r=(null==l?void 0:l.customMetaData)||{},a=(null==r?void 0:r.value)||{},d=(null==i?void 0:i.webSearchAnswer)||{},u=(null==i?void 0:i.extraMetaData)||i||{};return{userEmail:(null==i?void 0:i.userEmail)||(null==d?void 0:d.userEmail)||(null==n?void 0:n.userEmail)||"",userId:(null==i?void 0:i.userId)||(null==d?void 0:d.userId)||(null==n?void 0:n.userId)||"",userName:(null==i?void 0:i.userName)||(null==d?void 0:d.userName)||(null==n?void 0:n.userName)||"",citationId:A(i,o),citationUrl:(null==a?void 0:a.citationUrl)||(null==d?void 0:d.citationUrl)||"",content:(null==u?void 0:u.Reasoning)||(null==d?void 0:d.enhanced_content)||"",citationType:(null==a?void 0:a.citationType)||"web",citatioNumber:null!==(e=null!==(t=null==r?void 0:r.citation_number)&&void 0!==t?t:null==l?void 0:l.citation_number)&&void 0!==e?e:Number((null==i?void 0:i.reasoningId)||0)}}(_,b,y.current||void 0)},[_,b]),C=h(function(){return k(_)},[_]),F=(null===(l=null==C?void 0:C.customMetaData)||void 0===l?void 0:l.value)||{},P=(null==_?void 0:_.extraMetaData)||_||{},R=v(),U=R[0],W=R[1],H=v("pending"),z=H[0],V=H[1],B=v(!0),O=B[0],L=B[1];p(function(){var t=!0;return n(void 0,void 0,void 0,function(){var n,e,l,r;return o(this,function(o){switch(o.label){case 0:if(!b.endpoint||!(null==w?void 0:w.citationUrl)||!(null==w?void 0:w.content))return V("error"),[2];V("pending"),o.label=1;case 1:return o.trys.push([1,4,,5]),[4,fetch(b.endpoint,{method:"POST",headers:i({"actor-id":w.userEmail,Accept:"application/json, text/plain, */*","Content-Type":"application/json"},b.headers||{}),body:JSON.stringify(w)})];case 2:if(!(n=o.sent()).ok)throw new Error("Failed to fetch GPT web citation (".concat(n.status,")"));return[4,n.json()];case 3:return e=o.sent(),l=(null==e?void 0:e.responseData)||(null==e?void 0:e.result)||(null==e?void 0:e.data)||e,t?(W(l),V("success"),[3,5]):[2];case 4:return r=o.sent(),t?(console.error("Failed to load GPT web citation",r),V("error"),[3,5]):[2];case 5:return[2]}})}),function(){t=!1}},[w,b]);var J=h(function(){return{item:{confidence_score:Number((null==P?void 0:P.Confidence_score)||0),text:(null==F?void 0:F.paraphrase)||"Web citation reasoning",dataSource:(null==F?void 0:F.text)||(null==P?void 0:P.Reasoning)||"",paraphrase:(null==F?void 0:F.paraphrase)||""},headerTitle:"GPT Web Citation",index:Number((null==w?void 0:w.citatioNumber)||1)-1,iconsConfig:{ChevronDownIcon:d,ChevronUpIcon:a,MaximizeIcon:u,CloseIcon:c}}},[F,null==w?void 0:w.citatioNumber,P]),q=h(function(){return i(i({},J),f?{bodyHeight:E}:{})},[J,f]);return e(S,{gptCitation:q,defaultCitationUrl:(null==w?void 0:w.citationUrl)||"",citationType:T.GPT_WEB,webCitationData:U,webCitationStatus:z,showWebCitation:O,onToggleCitationView:function(){return L(function(i){return!i})},iconsConfig:{MaximizeIcon:u,ExternalLinkIcon:s},isFixedHeight:!0})},W=function(n){var o,t,r,a,d,u,c,s=n.href,v=n.metaData,p=n.citationTitle,m=n.citationType,x=n.citationReason,b=n.isFullscreen,w=D().guidelinesData,S=function(i){try{var n=new URL(i,window.location.origin);return{citationNumber:n.searchParams.get("citationNumber"),phraseToHighlight:n.searchParams.get("phrase_to_highlight")}}catch(i){return{citationNumber:null,phraseToHighlight:null}}}(s),T=S.citationNumber,k=S.phraseToHighlight,j=T&&(null===(o=null==v?void 0:v.citations)||void 0===o?void 0:o[T])||{},I=(null===(t=null==v?void 0:v.docData)||void 0===t?void 0:t.documents)||{},G=(null===(r=null==v?void 0:v.docData)||void 0===r?void 0:r.input_index_map)||{},N=Object.keys((null==v?void 0:v.citations)||{}).length>0||Object.keys((null==v?void 0:v.docData)||{}).length>0,R=null==G?void 0:G[0],E=null==G?void 0:G[1],M=R?I[R]:null,A=E?I[E]:null,W=R?j[R]:null,H=E?j[E]:null,z=h(function(){var i,n,o,t;return W&&M?e(f,{defaultScale:"PageWidth",showFullScreenAction:!1,showHighlightsAction:!1,pdfName:null==M?void 0:M.title,pdfUrl:null==M?void 0:M.signed_url,highlightText:[null!==(i=null==W?void 0:W.highlighted_text)&&void 0!==i?i:""],highlightPages:{1:null===(n=null==W?void 0:W.custom_metadata)||void 0===n?void 0:n.pdf_start_page_number},jumpToPageValue:1,highlightCordinatePages:[],useCoordinates:!1,useRange:!0,rangeOfPages:[null===(o=null==W?void 0:W.custom_metadata)||void 0===o?void 0:o.pdf_start_page_number,null===(t=null==W?void 0:W.custom_metadata)||void 0===t?void 0:t.pdf_end_page_number]}):null},[null==M?void 0:M.title,null==M?void 0:M.signed_url,null==W?void 0:W.highlighted_text,null===(a=null==W?void 0:W.custom_metadata)||void 0===a?void 0:a.pdf_start_page_number,null===(d=null==W?void 0:W.custom_metadata)||void 0===d?void 0:d.pdf_end_page_number]),V=h(function(){var i,n,o,t;return H&&A?e(f,{defaultScale:"PageWidth",showFullScreenAction:!1,showHighlightsAction:!1,pdfName:null==A?void 0:A.title,pdfUrl:null==A?void 0:A.signed_url,jumpToPageValue:1,highlightText:[null!==(i=null==H?void 0:H.highlighted_text)&&void 0!==i?i:""],highlightPages:{1:null===(n=null==H?void 0:H.custom_metadata)||void 0===n?void 0:n.pdf_start_page_number},highlightCordinatePages:[],useCoordinates:!1,useRange:!0,rangeOfPages:[null===(o=null==H?void 0:H.custom_metadata)||void 0===o?void 0:o.pdf_start_page_number,null===(t=null==H?void 0:H.custom_metadata)||void 0===t?void 0:t.pdf_end_page_number]}):null},[null==A?void 0:A.title,null==A?void 0:A.signed_url,null==H?void 0:H.highlighted_text,null===(u=null==H?void 0:H.custom_metadata)||void 0===u?void 0:u.pdf_start_page_number,null===(c=null==H?void 0:H.custom_metadata)||void 0===c?void 0:c.pdf_end_page_number]),B="dual_citation"===m,O=B&&!!(null==v?void 0:v.webGpt),L=h(function(){if(!z)return null;var n=O?e(U,{metaData:v,isFullscreen:b}):"rulebook_citation"===m?e(l,{children:e(C,i({sx:i(i({padding:"0px 20px",backgroundColor:"#FFFFFF",borderRadius:"8px"},F),{overflow:"auto"})},{children:e(_,i({rehypePlugins:[y]},{children:P({guidelinesData:w,targetHighlights:[k],labelColor:"#FEF08A"})}))}))}):V;return n?e(g,{leftComponent:z,rightComponent:n,isFullscreen:b}):z},[z,V,m,O,v,b]);return(null==v?void 0:v.webGpt)&&!N?e(U,{metaData:v,isFullscreen:b}):T?"rulebook_citation"===m?e("div",W?i({style:{height:"100%",display:"flex",flexDirection:"column"}},{children:L}):i({style:{padding:"12px",fontSize:"13px",color:"#344054",lineHeight:1.5}},{children:x||"Rulebook citation selected."})):B?W||H?e("div",i({style:{height:"100%",display:"flex",flexDirection:"column"}},{children:L})):(null==v?void 0:v.webGpt)?e(U,{metaData:v,isFullscreen:b}):e("div",{children:"Missing PDF Citation. Please try again later"}):["contract","clause"].includes(p)?e("div",W||H?i({style:{height:"100%",display:"flex",flexDirection:"column"}},{children:L}):{children:"Missing PDF Citation. Please try again later"}):e("div",{children:"No Citation Found. Please try again later"}):null},H=function(n){var o,l,u,c,s,h,m,g=n.href,f=n.children,_=n.citationType,y=n.citationReason,C=n.metaData,F=n.chevronUpComponent,D=void 0===F?null:F,P=n.chevronDownComponent,S=void 0===P?null:P,T=n.customStyle,k=void 0===T?{}:T,j=n.defaultState,I=void 0!==j&&j,G=n.onFullscreenChange,N=v(I),E=N[0],M=N[1],A=v(!1),U=A[0],H=A[1],z="string"==typeof f&&(null===(o=null==f?void 0:f.split("\n"))||void 0===o?void 0:o.length)>1?f.split("\n").join(" "):f;p(function(){if(null==G||G(U),U)return function(){null==G||G(!1)}},[U,G]);var V="string"==typeof f?f:f[0],B=null!=D?D:function(i){var n,o;return e(a,{size:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:16,color:null!==(o=null==i?void 0:i.color)&&void 0!==o?o:"rgb(214, 51, 132)"})}(null!==(l=null==k?void 0:k.arrow)&&void 0!==l?l:{}),O=null!=S?S:function(i){var n,o;return e(d,{size:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:16,color:null!==(o=null==i?void 0:i.color)&&void 0!==o?o:"rgb(214, 51, 132)"})}(null!==(u=null==k?void 0:k.arrow)&&void 0!==u?u:{}),L=t("div",i({style:{boxSizing:"border-box",border:U?"none":"1px solid #E4E7EC",borderRadius:U?0:"8px",overflow:"hidden",marginTop:U?0:"8px",display:"flex",flexDirection:"column",width:"100%",height:U?"100%":void 0,backgroundColor:"#FAFAFA"}},{children:[e("div",i({style:{display:"flex",justifyContent:"flex-end",padding:"6px 10px",borderBottom:"1px solid #E4E7EC",backgroundColor:"#FFFFFF",flexShrink:0}},{children:e("button",i({onClick:function(){H(function(i){return!i})},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:"6px",color:"#475467",marginRight:"9px"}},{children:e(U?x:b,{})}))})),e("div",i({style:{flex:1,minHeight:0,height:"100%",overflow:"hidden"}},{children:e(W,{href:g,children:f,metaData:C,citationTitle:V,citationType:_,citationReason:y,isFullscreen:U})}))]}));return t("span",i({style:i({display:"inline"},k.relativeWrapper||{})},{children:[e("div",i({style:i({display:"inline",marginTop:0},k.citationButtonWrapper||{})},{children:t("button",i({type:"button",onClick:function(){return M(function(i){return!i})},style:i({display:(null==C?void 0:C.webGpt)?"inline":"inline-flex",alignItems:(null==C?void 0:C.webGpt)?void 0:"center",gap:(null==C?void 0:C.webGpt)?void 0:"3px",fontFamily:'"Inter", sans-serif',backgroundColor:"transparent",padding:0,margin:0,fontSize:"13px",borderRadius:9999,cursor:"pointer",fontWeight:(null==C?void 0:C.webGpt)?600:700,color:(null==C?void 0:C.webGpt)?"#6D28D9":"rgb(214, 51, 132)",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},k.citationButton||{})},{children:[(null==C?void 0:C.webGpt)&&e(r,{size:null!==(s=null===(c=k.arrow)||void 0===c?void 0:c.fontSize)&&void 0!==s?s:"1em",color:null!==(m=null===(h=k.arrow)||void 0===h?void 0:h.color)&&void 0!==m?m:"#6D28D9",style:{display:"inline-block",width:"1em",height:"1em",marginRight:"3px",verticalAlign:"-0.125em",flexShrink:0}}),e("span",{children:z}),e("span",i({style:{display:"inline-flex",alignItems:"center",marginLeft:(null==C?void 0:C.webGpt)?"3px":void 0,verticalAlign:(null==C?void 0:C.webGpt)?"-0.125em":void 0}},{children:E?B:O}))]}))})),E&&(U?e(w,i({open:U,onClose:function(){return H(!1)},maxWidth:!1,BackdropProps:{sx:{backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(4px)"}},PaperProps:{sx:{backgroundColor:"#FAFAFA",borderRadius:"16px",height:R,m:0,maxHeight:R,maxWidth:"95vw",overflow:"hidden",width:"95vw"}}},{children:L})):L)]}))};export{H as default};
1
+ import{__assign as i,__awaiter as n,__generator as t}from"tslib";import{jsxs as o,jsx as e,Fragment as l}from"react/jsx-runtime";import{Globe as r,ChevronUp as a,ChevronDown as d,Maximize2 as u,X as c,ExternalLink as s}from"lucide-react";import{useState as v,useEffect as p,useMemo as m,useRef as h}from"react";import g from"./ResizableSplitPane.js";import f from"../PdfViewer/PdfViewer.js";import{DefaultFullScreenCloseIcon as b,DefaultFullScreenIcon as x}from"../../assests/svg/PdfViewerIcons.js";import _ from"react-markdown";import y from"rehype-raw";import{Dialog as w,Box as C}from"@mui/material";import{SHARED_MARKDOWN_STYLES as F}from"./CognitiveCompareConfig.js";import"react-dom";import{useCompareContext as D}from"./CompareContext.js";import{processGuidelinesMarkdown as P}from"./Guidelines/utils/processGuidelinesMarkdown.js";import T from"../GptWebCitation/GptWebCitation.js";import{CitationType as S}from"../GptWebCitation/types.js";import"./MoreFunctionsPopup.js";import"./components/SubSectionAccordion.js";import"./components/LHSSectionRow.js";import"./components/RHSSectionRow.js";var k=function(i){var n,t,o;return(null===(o=null===(t=null===(n=(null==i?void 0:i.extraMetaData)||i)||void 0===n?void 0:n.aiReasoningCitation)||void 0===t?void 0:t.gpt_citation)||void 0===o?void 0:o[0])||null},N="https://dev-proposals-ai.techo.camp/utility/ca-workflow-composer-agent/get_citation",j="sai.siddhartha@techolution.com",I="672e32f7a0e8fe2e8e50bcba",R="TNV Sai Siddhartha",G="90vh",U="calc(".concat(G," - 120px)"),E=function(){var i;return"function"==typeof(null===(i=globalThis.crypto)||void 0===i?void 0:i.randomUUID)?globalThis.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){var n=Math.floor(16*Math.random());return("x"===i?n:n%4+8).toString(16)})},M=function(i,n){var t=function(i){var n;return(null==i?void 0:i.payloadCitationId)||(null===(n=null==i?void 0:i.extraMetaData)||void 0===n?void 0:n.payloadCitationId)||""}(i)||n||E();return function(i,n){i&&"object"==typeof i&&(i.payloadCitationId=n,i.extraMetaData&&"object"==typeof i.extraMetaData&&(i.extraMetaData.payloadCitationId=n))}(i,t),t},A=function(o){var l,r=o.metaData,g=o.isFullscreen,f=void 0!==g&&g,b=D().gptWebCitationConfig,x=m(function(){return function(i){return{endpoint:(null==i?void 0:i.endpoint)||N,userEmail:(null==i?void 0:i.userEmail)||j,userId:(null==i?void 0:i.userId)||I,userName:(null==i?void 0:i.userName)||R,headers:null==i?void 0:i.headers}}(b)},[b]),_=null==r?void 0:r.webGpt,y=h(null);y.current||(y.current=E());var w=m(function(){return function(i,n,t){var o,e,l=k(i),r=(null==l?void 0:l.customMetaData)||{},a=(null==r?void 0:r.value)||{},d=(null==i?void 0:i.webSearchAnswer)||{},u=(null==i?void 0:i.extraMetaData)||i||{};return{userEmail:(null==i?void 0:i.userEmail)||(null==d?void 0:d.userEmail)||(null==n?void 0:n.userEmail)||"",userId:(null==i?void 0:i.userId)||(null==d?void 0:d.userId)||(null==n?void 0:n.userId)||"",userName:(null==i?void 0:i.userName)||(null==d?void 0:d.userName)||(null==n?void 0:n.userName)||"",citationId:M(i,t),citationUrl:(null==a?void 0:a.citationUrl)||(null==d?void 0:d.citationUrl)||"",content:(null==u?void 0:u.Reasoning)||(null==d?void 0:d.enhanced_content)||"",citationType:(null==a?void 0:a.citationType)||"web",citatioNumber:null!==(e=null!==(o=null==r?void 0:r.citation_number)&&void 0!==o?o:null==l?void 0:l.citation_number)&&void 0!==e?e:Number((null==i?void 0:i.reasoningId)||0)}}(_,x,y.current||void 0)},[_,x]),C=m(function(){return k(_)},[_]),F=(null===(l=null==C?void 0:C.customMetaData)||void 0===l?void 0:l.value)||{},P=(null==_?void 0:_.extraMetaData)||_||{},G=v(),A=G[0],H=G[1],W=v("pending"),z=W[0],O=W[1],V=v(!0),B=V[0],L=V[1];p(function(){var o=!0;return n(void 0,void 0,void 0,function(){var n,e,l,r;return t(this,function(t){switch(t.label){case 0:if(!x.endpoint||!(null==w?void 0:w.citationUrl)||!(null==w?void 0:w.content))return O("error"),[2];O("pending"),t.label=1;case 1:return t.trys.push([1,4,,5]),[4,fetch(x.endpoint,{method:"POST",headers:i({"actor-id":w.userEmail,Accept:"application/json, text/plain, */*","Content-Type":"application/json"},x.headers||{}),body:JSON.stringify(w)})];case 2:if(!(n=t.sent()).ok)throw new Error("Failed to fetch GPT web citation (".concat(n.status,")"));return[4,n.json()];case 3:return e=t.sent(),l=(null==e?void 0:e.responseData)||(null==e?void 0:e.result)||(null==e?void 0:e.data)||e,o?(H(l),O("success"),[3,5]):[2];case 4:return r=t.sent(),o?(console.error("Failed to load GPT web citation",r),O("error"),[3,5]):[2];case 5:return[2]}})}),function(){o=!1}},[w,x]);var J=m(function(){return{item:{confidence_score:Number((null==P?void 0:P.Confidence_score)||0),text:(null==F?void 0:F.paraphrase)||"Web citation reasoning",dataSource:(null==F?void 0:F.text)||(null==P?void 0:P.Reasoning)||"",paraphrase:(null==F?void 0:F.paraphrase)||""},headerTitle:"GPT Web Citation",index:Number((null==w?void 0:w.citatioNumber)||1)-1,iconsConfig:{ChevronDownIcon:d,ChevronUpIcon:a,MaximizeIcon:u,CloseIcon:c}}},[F,null==w?void 0:w.citatioNumber,P]),$=m(function(){return i(i({},J),f?{bodyHeight:U}:{})},[J,f]);return e(T,{gptCitation:$,defaultCitationUrl:(null==w?void 0:w.citationUrl)||"",citationType:S.GPT_WEB,webCitationData:A,webCitationStatus:z,showWebCitation:B,onToggleCitationView:function(){return L(function(i){return!i})},iconsConfig:{MaximizeIcon:u,ExternalLinkIcon:s},isFixedHeight:!0})},H=function(n){var t,o,r,a,d,u,c,s=n.href,v=n.metaData,p=n.citationTitle,h=n.citationType,b=n.citationReason,x=n.isFullscreen,w=D().guidelinesData,T=function(i){try{var n=function(i){var n=i.match(/^(?:pdf_citation|deviation_summary)\$(\d+)/);if(n)try{var t=i.indexOf("?"),o=t>=0?i.slice(t):"";return{citationNumber:n[1],parsedUrl:new URL(o||"./",window.location.origin)}}catch(i){return{citationNumber:n[1],parsedUrl:null}}try{var e=new URL(i,window.location.origin);return{citationNumber:e.searchParams.get("citationNumber")||e.searchParams.get("citation_number"),parsedUrl:e}}catch(i){return{citationNumber:null,parsedUrl:null}}}(i),t=n.citationNumber,o=n.parsedUrl;return{citationNumber:t,phraseToHighlight:(null==o?void 0:o.searchParams.get("phrase_to_highlight"))||null,citationTypeFromHref:(null==o?void 0:o.searchParams.get("citation_type"))||null}}catch(i){return{citationNumber:null,phraseToHighlight:null,citationTypeFromHref:null}}}(s),S=T.citationNumber,k=T.phraseToHighlight,N=T.citationTypeFromHref,j=h||N||void 0,I="il_rulebook_citation"===j?"rulebook_citation":j,R=S&&(null===(t=null==v?void 0:v.citations)||void 0===t?void 0:t[S])||{},G=(null===(o=null==v?void 0:v.docData)||void 0===o?void 0:o.documents)||{},U=(null===(r=null==v?void 0:v.docData)||void 0===r?void 0:r.input_index_map)||{},E=Object.keys((null==v?void 0:v.citations)||{}).length>0||Object.keys((null==v?void 0:v.docData)||{}).length>0,M=null==U?void 0:U[0],H=null==U?void 0:U[1],W=M?G[M]:null,z=H?G[H]:null,O=M?R[M]:null,V=H?R[H]:null,B=m(function(){var i,n,t,o;return O&&W?e(f,{defaultScale:"PageWidth",showFullScreenAction:!1,showHighlightsAction:!1,pdfName:null==W?void 0:W.title,pdfUrl:null==W?void 0:W.signed_url,highlightText:[null!==(i=null==O?void 0:O.highlighted_text)&&void 0!==i?i:""],highlightPages:{1:null===(n=null==O?void 0:O.custom_metadata)||void 0===n?void 0:n.pdf_start_page_number},jumpToPageValue:1,highlightCordinatePages:[],useCoordinates:!1,useRange:!0,rangeOfPages:[null===(t=null==O?void 0:O.custom_metadata)||void 0===t?void 0:t.pdf_start_page_number,null===(o=null==O?void 0:O.custom_metadata)||void 0===o?void 0:o.pdf_end_page_number]}):null},[null==W?void 0:W.title,null==W?void 0:W.signed_url,null==O?void 0:O.highlighted_text,null===(a=null==O?void 0:O.custom_metadata)||void 0===a?void 0:a.pdf_start_page_number,null===(d=null==O?void 0:O.custom_metadata)||void 0===d?void 0:d.pdf_end_page_number]),L=m(function(){var i,n,t,o;return V&&z?e(f,{defaultScale:"PageWidth",showFullScreenAction:!1,showHighlightsAction:!1,pdfName:null==z?void 0:z.title,pdfUrl:null==z?void 0:z.signed_url,jumpToPageValue:1,highlightText:[null!==(i=null==V?void 0:V.highlighted_text)&&void 0!==i?i:""],highlightPages:{1:null===(n=null==V?void 0:V.custom_metadata)||void 0===n?void 0:n.pdf_start_page_number},highlightCordinatePages:[],useCoordinates:!1,useRange:!0,rangeOfPages:[null===(t=null==V?void 0:V.custom_metadata)||void 0===t?void 0:t.pdf_start_page_number,null===(o=null==V?void 0:V.custom_metadata)||void 0===o?void 0:o.pdf_end_page_number]}):null},[null==z?void 0:z.title,null==z?void 0:z.signed_url,null==V?void 0:V.highlighted_text,null===(u=null==V?void 0:V.custom_metadata)||void 0===u?void 0:u.pdf_start_page_number,null===(c=null==V?void 0:V.custom_metadata)||void 0===c?void 0:c.pdf_end_page_number]),J="dual_citation"===I,$=J&&!!(null==v?void 0:v.webGpt),q=m(function(){if(!B)return null;var n=$?e(A,{metaData:v,isFullscreen:x}):"rulebook_citation"===I?e(l,{children:e(C,i({sx:i(i({padding:"0px 20px",backgroundColor:"#FFFFFF",borderRadius:"8px"},F),{overflow:"auto"})},{children:e(_,i({rehypePlugins:[y]},{children:P({guidelinesData:w,targetHighlights:[k],labelColor:"#FEF08A"})}))}))}):L;return n?e(g,{leftComponent:B,rightComponent:n,isFullscreen:x}):B},[B,L,I,$,v,x,w,k]);return(null==v?void 0:v.webGpt)&&!E?e(A,{metaData:v,isFullscreen:x}):S?"rulebook_citation"===I?e("div",O?i({style:{height:"100%",display:"flex",flexDirection:"column"}},{children:q}):i({style:{padding:"12px",fontSize:"13px",color:"#344054",lineHeight:1.5}},{children:b||"Rulebook citation selected."})):J?O||V?e("div",i({style:{height:"100%",display:"flex",flexDirection:"column"}},{children:q})):(null==v?void 0:v.webGpt)?e(A,{metaData:v,isFullscreen:x}):e("div",{children:"Missing PDF Citation. Please try again later"}):["contract","clause"].includes(p)?e("div",O||V?i({style:{height:"100%",display:"flex",flexDirection:"column"}},{children:q}):{children:"Missing PDF Citation. Please try again later"}):e("div",{children:"No Citation Found. Please try again later"}):null},W=function(n){var t,l,u,c,s,m,h,g=n.href,f=n.children,_=n.citationType,y=n.citationReason,C=n.metaData,F=n.chevronUpComponent,D=void 0===F?null:F,P=n.chevronDownComponent,T=void 0===P?null:P,S=n.customStyle,k=void 0===S?{}:S,N=n.defaultState,j=void 0!==N&&N,I=n.onFullscreenChange,R=v(j),U=R[0],E=R[1],M=v(!1),A=M[0],W=M[1],z="string"==typeof f&&(null===(t=null==f?void 0:f.split("\n"))||void 0===t?void 0:t.length)>1?f.split("\n").join(" "):f;p(function(){if(null==I||I(A),A)return function(){null==I||I(!1)}},[A,I]);var O="string"==typeof f?f:f[0],V=null!=D?D:function(i){var n,t;return e(a,{size:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:16,color:null!==(t=null==i?void 0:i.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(l=null==k?void 0:k.arrow)&&void 0!==l?l:{}),B=null!=T?T:function(i){var n,t;return e(d,{size:null!==(n=null==i?void 0:i.fontSize)&&void 0!==n?n:16,color:null!==(t=null==i?void 0:i.color)&&void 0!==t?t:"rgb(214, 51, 132)"})}(null!==(u=null==k?void 0:k.arrow)&&void 0!==u?u:{}),L=o("div",i({style:{boxSizing:"border-box",border:A?"none":"1px solid #E4E7EC",borderRadius:A?0:"8px",overflow:"hidden",marginTop:A?0:"8px",display:"flex",flexDirection:"column",width:"100%",height:A?"100%":void 0,backgroundColor:"#FAFAFA"}},{children:[e("div",i({style:{display:"flex",justifyContent:"flex-end",padding:"6px 10px",borderBottom:"1px solid #E4E7EC",backgroundColor:"#FFFFFF",flexShrink:0}},{children:e("button",i({onClick:function(){W(function(i){return!i})},style:{background:"none",border:"none",cursor:"pointer",padding:"4px",borderRadius:"6px",color:"#475467",marginRight:"9px"}},{children:e(A?b:x,{})}))})),e("div",i({style:{flex:1,minHeight:0,height:"100%",overflow:"hidden"}},{children:e(H,{href:g,children:f,metaData:C,citationTitle:O,citationType:_,citationReason:y,isFullscreen:A})}))]}));return o("span",i({style:i({display:"inline"},k.relativeWrapper||{})},{children:[e("div",i({style:i({display:"inline",marginTop:0},k.citationButtonWrapper||{})},{children:o("button",i({type:"button",onClick:function(){return E(function(i){return!i})},style:i({display:(null==C?void 0:C.webGpt)?"inline":"inline-flex",alignItems:(null==C?void 0:C.webGpt)?void 0:"center",gap:(null==C?void 0:C.webGpt)?void 0:"3px",fontFamily:'"Inter", sans-serif',backgroundColor:"transparent",padding:0,margin:0,fontSize:"13px",borderRadius:9999,cursor:"pointer",fontWeight:(null==C?void 0:C.webGpt)?600:700,color:(null==C?void 0:C.webGpt)?"#6D28D9":"rgb(214, 51, 132)",border:"none",textDecoration:"none",wordBreak:"break-word",whiteSpace:"normal"},k.citationButton||{})},{children:[(null==C?void 0:C.webGpt)&&e(r,{size:null!==(s=null===(c=k.arrow)||void 0===c?void 0:c.fontSize)&&void 0!==s?s:"1em",color:null!==(h=null===(m=k.arrow)||void 0===m?void 0:m.color)&&void 0!==h?h:"#6D28D9",style:{display:"inline-block",width:"1em",height:"1em",marginRight:"3px",verticalAlign:"-0.125em",flexShrink:0}}),e("span",{children:z}),e("span",i({style:{display:"inline-flex",alignItems:"center",marginLeft:(null==C?void 0:C.webGpt)?"3px":void 0,verticalAlign:(null==C?void 0:C.webGpt)?"-0.125em":void 0}},{children:U?V:B}))]}))})),U&&(A?e(w,i({open:A,onClose:function(){return W(!1)},maxWidth:!1,BackdropProps:{sx:{backgroundColor:"rgba(0, 0, 0, 0.6)",backdropFilter:"blur(4px)"}},PaperProps:{sx:{backgroundColor:"#FAFAFA",borderRadius:"16px",height:G,m:0,maxHeight:G,maxWidth:"95vw",overflow:"hidden",width:"95vw"}}},{children:L})):L)]}))};export{W as default};
2
2
  //# sourceMappingURL=CitationAnchor.js.map