@viswa-test/test-citation 0.0.298 → 0.0.300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/SegmentReviewComponents/BoundaryCard.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/CardWrapper.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/CognitiveIntegrity.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/LabelCheck.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js +2 -0
- package/dist/cjs/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
- package/dist/cjs/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +1 -1
- package/dist/cjs/features/SegmentReviewComponents/reviewStepAdapters.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/features/SegmentReviewComponents/BoundaryCard.js +1 -1
- package/dist/features/SegmentReviewComponents/CardWrapper.js +1 -1
- package/dist/features/SegmentReviewComponents/CognitiveIntegrity.js +1 -1
- package/dist/features/SegmentReviewComponents/LabelCheck.js +1 -1
- package/dist/features/SegmentReviewComponents/ReviewedCard.js +2 -0
- package/dist/features/SegmentReviewComponents/ReviewedCard.js.map +1 -0
- package/dist/features/SegmentReviewComponents/SegmentReviewPdfWrapper.js +1 -1
- package/dist/features/SegmentReviewComponents/reviewStepAdapters.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +0 -1
- package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts +9 -2
- package/dist/types/src/features/SegmentReviewComponents/BoundaryCard.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/CardWrapper.d.ts +5 -2
- package/dist/types/src/features/SegmentReviewComponents/CardWrapper.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/CognitiveIntegrity.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts +7 -2
- package/dist/types/src/features/SegmentReviewComponents/LabelCheck.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts +35 -0
- package/dist/types/src/features/SegmentReviewComponents/ReviewedCard.d.ts.map +1 -0
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts +4 -2
- package/dist/types/src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/index.d.ts +5 -3
- package/dist/types/src/features/SegmentReviewComponents/index.d.ts.map +1 -1
- package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts +104 -2
- package/dist/types/src/features/SegmentReviewComponents/reviewStepAdapters.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("@mui/icons-material/ChevronRight"),r=require("@mui/icons-material/Close"),a=require("@mui/material/Box"),o=require("@mui/material/Button"),s=require("@mui/material/ButtonBase"),l=require("@mui/material/Divider"),d=require("@mui/material/IconButton"),u=require("@mui/material/Paper"),c=require("@mui/material/Radio"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),i=require("react"),n=require("@mui/icons-material/ChevronRight"),r=require("@mui/icons-material/Close"),a=require("@mui/material/Box"),o=require("@mui/material/Button"),s=require("@mui/material/ButtonBase"),l=require("@mui/material/Divider"),d=require("@mui/material/IconButton"),u=require("@mui/material/Paper"),c=require("@mui/material/Radio"),x=require("@mui/material/Stack"),m=require("@mui/material/TextField"),g=require("@mui/material/Typography"),f=require("./CognitiveIcon.js"),p=require("./CognitiveScoreBadge.js"),h=require("../../assests/icons/InfoAlert.js");function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v,b=_(n),E=_(r),j=_(a),y=_(o),S=_(s),C=_(l),R=_(d),w=_(u),A=_(c),I=_(x),M=_(m),q=_(g),P=function(t,i){return e.__spreadArray([t],Array.isArray(i)?i:null==i?[]:[i],!0)};exports.BoundaryReviewActionEnum=void 0,(v=exports.BoundaryReviewActionEnum||(exports.BoundaryReviewActionEnum={})).KEEP="KEEP",v.SPLIT_HERE="SPLIT_HERE",v.MERGE_NEXT="MERGE_NEXT",v.MERGE_PREVIOUS="MERGE_PREVIOUS",v.SET_RANGE="SET_RANGE";var B=function(e){return Object.values(exports.BoundaryReviewActionEnum).includes(e)},N=function(e){return e.user_actions.map(function(t){var i=e.focus_page;switch(t){case"KEEP":return{id:t,title:"Keep as is",description:"Keep the current document boundary unchanged."};case"SPLIT_HERE":return{id:t,title:"Create a separate document",description:i?"Start a new document at page ".concat(i,"."):"Create a new document at this boundary."};case"MERGE_NEXT":return{id:t,title:"Merge into next document",description:i?"Move page ".concat(i," onward into the next document."):"Merge this segment into the next document."};case"MERGE_PREVIOUS":return{id:t,title:"Merge into previous document",description:"Merge this segment into the previous document."};case"SET_RANGE":return{id:t,title:"Adjust page range",description:"Set the start and end pages manually."}}})};exports.createBoundaryCardOptions=N,exports.default=function(n){var r=n.headerName,a=void 0===r?"Boundary Check":r,o=n.title,s=n.pageNo,l=n.content,d=n.cognitiveScore,u=n.config,c=n.metadata,x=n.selectedIndex,m=n.defaultSelectedIndex,g=void 0===m?null:m,_=n.defaultStartPage,v=n.defaultEndPage,T=n.onSelectionChange,k=n.onConfirm,z=n.onActionConfirm,G=n.onCognitiveClick;n.onAdjustManually;var F=n.onClose,W=n.confirmLabel,H=void 0===W?"Confirm":W;n.manualPrompt,n.manualActionLabel;var L=n.cognitiveLabel,O=void 0===L?"Cognitive Integrity":L;n.showAdjustManually;var D=n.showCognitiveIntegrity,K=void 0===D||D,U=n.showCloseButton,V=void 0===U||U,X=n.confirmDisabled,J=void 0!==X&&X,Q=n.width,Y=void 0===Q?260:Q,Z=n.maxWidth,$=void 0===Z?260:Z,ee=n.className,te=n.styles,ie=i.useMemo(function(){return null!=u?u:c?N(c):[]},[u,c]),ne=i.useState(g),re=ne[0],ae=ne[1],oe=i.useState(null==_?"":String(_)),se=oe[0],le=oe[1],de=i.useState(null==v?"":String(v)),ue=de[0],ce=de[1],xe=void 0===x?re:x,me=null==xe?void 0:ie[xe],ge=Number(se),fe=Number(ue),pe="SET_RANGE"===(null==me?void 0:me.id),he=se.trim().length>0&&ue.trim().length>0&&Number.isInteger(ge)&&Number.isInteger(fe)&&ge>0&&fe>0&&ge<=fe,_e=J||!me||!0===me.disabled||pe&&!he||!k&&!z;return t.jsx(w.default,e.__assign({className:ee,elevation:4,sx:P({width:Y,maxWidth:$,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==te?void 0:te.root)},{children:t.jsxs(I.default,e.__assign({spacing:.75,sx:{p:1}},{children:[t.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==te?void 0:te.header},{children:[t.jsx(h.default,{color:"error",height:16,width:16}),t.jsx(q.default,e.__assign({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:a})),V&&t.jsx(R.default,e.__assign({size:"small",onClick:F,disabled:!F,"aria-label":"Close boundary check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:t.jsx(E.default,{sx:{fontSize:17}})}))]})),t.jsxs(j.default,{children:[t.jsx(q.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:o})),null!=s&&t.jsx(q.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:s})),t.jsx(C.default,{sx:{my:.625}}),null!=l&&t.jsx(q.default,e.__assign({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:l}))]}),t.jsxs(I.default,e.__assign({spacing:.625,role:"radiogroup","aria-label":"Boundary options"},{children:[ie.map(function(i,n){var r=xe===n;return t.jsxs(w.default,e.__assign({variant:"outlined",sx:P({borderColor:r?"#1976d2":"divider",borderRadius:2,overflow:"hidden"},null==te?void 0:te.option)},{children:[t.jsxs(S.default,e.__assign({role:"radio","aria-checked":r,disabled:i.disabled,onClick:function(){return function(e,t){t.disabled||(void 0===x&&ae(e),null==T||T(e,t))}(n,i)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[t.jsx(A.default,{checked:r,disabled:i.disabled,tabIndex:-1,size:"small",sx:{p:.25,mr:.5}}),t.jsxs(j.default,e.__assign({sx:{minWidth:0}},{children:[t.jsx(q.default,e.__assign({sx:{color:"text.primary",fontSize:12.5,fontWeight:500}},{children:i.title})),null!=i.description&&t.jsx(q.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:11}},{children:i.description}))]}))]})),r&&"SET_RANGE"===i.id&&t.jsxs(I.default,e.__assign({direction:"row",spacing:1,sx:{px:1.75,pb:1.5,pl:5.75}},{children:[t.jsx(M.default,{fullWidth:!0,size:"small",type:"number",label:"Start page",value:se,onChange:function(e){return le(e.target.value)},inputProps:{min:1,step:1,inputMode:"numeric"},sx:null==te?void 0:te.rangeInput}),t.jsx(M.default,{fullWidth:!0,size:"small",type:"number",label:"End page",value:ue,error:se.trim().length>0&&ue.trim().length>0&&ge>fe,onChange:function(e){return ce(e.target.value)},inputProps:{min:1,step:1,inputMode:"numeric"},sx:null==te?void 0:te.rangeInput})]}))]}),i.id)}),t.jsx(y.default,e.__assign({variant:"contained",fullWidth:!0,disabled:_e,onClick:function(){!_e&&null!=xe&&me&&(null==k||k(xe,me),z&&B(me.id)&&z(me.id,e.__assign({selectedIndex:xe,option:me,metadata:c},"SET_RANGE"===me.id&&he?{startPage:ge,endPage:fe}:{})))},sx:P({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==te?void 0:te.confirmButton)},{children:H}))]})),t.jsx(I.default,e.__assign({spacing:.625,sx:null==te?void 0:te.footer},{children:K&&t.jsxs(t.Fragment,{children:[t.jsx(C.default,{}),t.jsxs(S.default,e.__assign({onClick:G,disabled:!G,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:G?"pointer":"not-allowed"}},{children:[t.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:1},{children:[t.jsx(f.default,{sx:{color:"text.secondary"}}),t.jsx(q.default,e.__assign({sx:{color:"text.primary",fontSize:12}},{children:O}))]})),t.jsxs(I.default,e.__assign({direction:"row",alignItems:"center",spacing:.5},{children:[t.jsx(p.default,{score:d}),t.jsx(b.default,{sx:{color:"text.secondary"}})]}))]}))]})}))]}))}))},exports.isBoundaryReviewAction=B;
|
|
2
2
|
//# sourceMappingURL=BoundaryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("@mui/material/Box"),r=require("@mui/material/Popper");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(i),l=o(r);exports.default=function(i){var r,o,u=i.anchorRef,s=i.anchorElement,c=i.children,d=i.className,f=i.offset,m=void 0===f?{}:f,p=i.placement,v=void 0===p?"bottom-start":p,x=i.width,h=i.maxWidth;i.customStyles;var b=n.useState(null),w=b[0],y=b[1],g=n.useState(!0),E=g[0],q=g[1],z=n.useState(null),S=z[0],W=z[1],_=n.useRef(null);return n.useLayoutEffect(function(){var e,t=null!==(e=null!=s?s:null==u?void 0:u.current)&&void 0!==e?e:null;y(function(e){return e===t?e:t})},[s,u]),n.useLayoutEffect(function(){if(w){var e=null,t=function(){q(w.isConnected&&"hidden"!==w.style.visibility),W(Math.max(0,window.innerWidth-w.getBoundingClientRect().left-8)),null!=e&&cancelAnimationFrame(e),e=requestAnimationFrame(function(){var t;e=null,null===(t=_.current)||void 0===t||t.update()})},n=new MutationObserver(t);return n.observe(w,{attributes:!0,attributeFilter:["style","class"]}),window.addEventListener("resize",t),t(),function(){n.disconnect(),window.removeEventListener("resize",t),null!=e&&cancelAnimationFrame(e)}}q(!1)},[w]),t.jsx(l.default,e.__assign({open:Boolean(w)&&E,anchorEl:w,popperRef:_,placement:v,className:d,popperOptions:{strategy:"fixed"},modifiers:[{name:"offset",options:{offset:[null!==(r=m.left)&&void 0!==r?r:0,null!==(o=m.top)&&void 0!==o?o:0]}},{name:"flip",enabled:!1},{name:"preventOverflow",options:{mainAxis:!1,altAxis:!0,tether:!1}}],sx:{zIndex:function(e){return e.zIndex.tooltip},width:x,maxWidth:null==S?h:"min(".concat("number"==typeof h?"".concat(h,"px"):null!=h?h:"100vw",", ").concat(S,"px)"),minWidth:0,boxSizing:"border-box"}},{children:t.jsx(a.default,e.__assign({sx:{width:"100%",maxWidth:"100%",minWidth:0,maxHeight:"calc(85vh - 10px)",overflowY:"auto",pointerEvents:"auto",boxSizing:"border-box"}},{children:c}))}))};
|
|
2
2
|
//# sourceMappingURL=CardWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("@mui/icons-material/ChevronLeft"),a=require("@mui/icons-material/Close"),s=require("@mui/material/Box"),n=require("@mui/material/Divider"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("@mui/icons-material/ChevronLeft"),a=require("@mui/icons-material/Close"),s=require("@mui/material/Box"),n=require("@mui/material/Divider"),t=require("@mui/material/IconButton"),l=require("@mui/material/Paper"),o=require("@mui/material/Stack"),d=require("@mui/material/Typography"),u=require("../CitationRenderer/MarkdownRenderer.js"),c=require("./CognitiveIcon.js"),x=require("./CognitiveScoreBadge.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=m(r),f=m(a),h=m(s),_=m(n),v=m(t),p=m(l),j=m(o),y=m(d),b=function(i,r){return e.__spreadArray([i],Array.isArray(r)?r:null==r?[]:[r],!0)};exports.default=function(r){var a,s,n=r.reason,t=r.gap,l=r.score,o=r.headerName,d=void 0===o?"Cognitive Integrity":o,m=r.onBack,C=r.onClose,q=r.showCloseButton,w=void 0===q||q,k=r.width,S=void 0===k?260:k,z=r.maxWidth,W=void 0===z?260:z,R=r.className,A=r.styles,B=null!==(a=null==n?void 0:n.trim())&&void 0!==a?a:"",I=null!==(s=null==t?void 0:t.trim())&&void 0!==s?s:"";if(!B&&!I)return null;var M,N=(M=null==A?void 0:A.markdown,e.__assign(e.__assign({},M),{containerWrapper:e.__assign({display:"block",height:"auto"},null==M?void 0:M.containerWrapper),mainCard:e.__assign({height:"auto",padding:0,border:"none",borderRadius:0,boxShadow:"none",backgroundColor:"transparent"},null==M?void 0:M.mainCard),scrollArea:e.__assign({height:"auto",overflowY:"visible",paddingRight:0,color:"#475467",fontSize:11.5,lineHeight:1.3},null==M?void 0:M.scrollArea)}));return i.jsx(p.default,e.__assign({className:R,elevation:4,sx:b({width:S,maxWidth:W,borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==A?void 0:A.root)},{children:i.jsxs(j.default,e.__assign({spacing:.75,sx:{p:1}},{children:[i.jsxs(j.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==A?void 0:A.header},{children:[m&&i.jsx(v.default,e.__assign({size:"small",onClick:m,"aria-label":"Return to review check",sx:{p:0,color:"#6941C6"}},{children:i.jsx(g.default,{sx:{fontSize:17}})})),i.jsx(c.default,{sx:{color:"#6941C6"}}),i.jsx(y.default,e.__assign({sx:{flex:1,fontSize:12,fontWeight:500,alignItems:"center",display:"flex",lineHeight:1.25,textTransform:"capitalise"}},{children:d})),i.jsx(x.default,{score:l}),w&&i.jsx(v.default,e.__assign({size:"small",onClick:C,disabled:!C,"aria-label":"Close cognitive integrity",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(f.default,{sx:{fontSize:17}})}))]})),i.jsxs(j.default,e.__assign({spacing:.75,sx:null==A?void 0:A.content},{children:[B&&i.jsxs(h.default,e.__assign({sx:{marginTop:4}},{children:[i.jsx(y.default,e.__assign({sx:{mt:1,mb:.25,color:"text.primary",fontSize:12,fontWeight:500}},{children:"Decision Making Factors"})),i.jsx(_.default,{sx:{my:.625}}),i.jsx(u.default,{value:"<summary>".concat(B,"</summary>"),styles:N})]})),B&&I&&i.jsx(_.default,{}),I&&i.jsxs(h.default,e.__assign({sx:null==A?void 0:A.section},{children:[i.jsx(y.default,e.__assign({sx:{mb:.25,color:"text.primary",fontSize:12,fontWeight:600}},{children:"Gap"})),i.jsx(_.default,{sx:{my:.625}}),i.jsx(u.default,{value:"<summary>".concat(I,"</summary>"),styles:N})]}))]}))]}))}))};
|
|
2
2
|
//# sourceMappingURL=CognitiveIntegrity.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("@mui/icons-material/ChevronRight"),r=require("@mui/icons-material/Close"),o=require("@mui/material/Box"),l=require("@mui/material/Button"),a=require("@mui/material/ButtonBase"),s=require("@mui/material/Divider"),d=require("@mui/material/IconButton"),u=require("@mui/material/Paper"),c=require("@mui/material/Radio"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),t=require("react"),n=require("@mui/icons-material/ChevronRight"),r=require("@mui/icons-material/Close"),o=require("@mui/material/Box"),l=require("@mui/material/Button"),a=require("@mui/material/ButtonBase"),s=require("@mui/material/Divider"),d=require("@mui/material/IconButton"),u=require("@mui/material/Paper"),c=require("@mui/material/Radio"),x=require("@mui/material/Stack"),f=require("@mui/material/TextField"),m=require("@mui/material/Typography"),h=require("./CognitiveIcon.js"),g=require("./CognitiveScoreBadge.js"),p=require("../../assests/icons/InfoAlert.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v,_=b(n),j=b(r),C=b(o),y=b(l),E=b(a),L=b(s),S=b(d),w=b(u),A=b(c),q=b(x),T=b(f),I=b(m),k=function(i,t){return e.__spreadArray([i],Array.isArray(t)?t:null==t?[]:[t],!0)};exports.LabelReviewActionEnum=void 0,(v=exports.LabelReviewActionEnum||(exports.LabelReviewActionEnum={})).KEEP_LABEL="KEEP_LABEL",v.SET_CUSTOM_LABEL="SET_CUSTOM_LABEL",v.SET_TYPE="SET_TYPE";var B=function(e){return e.user_actions.map(function(i){switch(i){case"KEEP_LABEL":return{id:i,title:"Keep as is",description:e.current_label?'Label stays "'.concat(e.current_label,'"'):"Keep the current document label"};case"SET_CUSTOM_LABEL":case"SET_TYPE":return{id:i,title:"Enter a custom label",description:"Create your own document label",requiresInput:!0,inputPlaceholder:e.current_label?"e.g. ".concat(e.current_label):"Enter a document label"}}})},z=function(e){return Object.values(exports.LabelReviewActionEnum).includes(e)};exports.createLabelCheckOptions=B,exports.default=function(n){var r,o=n.headerName,l=void 0===o?"Title Check":o,a=n.title,s=n.pageNo,d=n.content,u=void 0===d?"We're not fully confident about this label. Confirm it, choose a different type, or add a new one.":d,c=n.cognitiveScore,x=n.config,f=n.metadata,m=n.selectedIndex,b=n.defaultSelectedIndex,v=void 0===b?null:b,P=n.onSelectionChange,F=n.customLabel,R=n.defaultCustomLabel,W=n.onCustomLabelChange,M=n.onConfirm,D=n.onActionConfirm,K=n.onCognitiveClick;n.onAdjustManually;var O=n.onClose,N=n.confirmLabel,H=void 0===N?"Confirm":N,U=n.customInputAriaLabel,Y=void 0===U?"Custom document label":U;n.manualPrompt,n.manualActionLabel;var G=n.cognitiveLabel,J=void 0===G?"Cognitive Integrity":G;n.showAdjustManually;var Q=n.showCognitiveIntegrity,V=void 0===Q||Q,X=n.showCloseButton,Z=void 0===X||X,$=n.confirmDisabled,ee=void 0!==$&&$,ie=n.width,te=void 0===ie?260:ie,ne=n.maxWidth,re=void 0===ne?260:ne,oe=n.className,le=n.styles,ae=t.useMemo(function(){return null!=x?x:f?B(f):[]},[x,f]),se=t.useState(v),de=se[0],ue=se[1],ce=t.useState(null!==(r=null!=R?R:null==f?void 0:f.custom_label)&&void 0!==r?r:""),xe=ce[0],fe=ce[1],me=void 0===m?de:m,he=void 0===F?xe:F,ge=null==me?void 0:ae[me],pe=Boolean(null==ge?void 0:ge.requiresInput),be=ee||!M&&!D||!ge||!0===ge.disabled||pe&&0===he.trim().length,ve=function(){if(!be&&null!=me&&ge){var e=pe?he.trim():void 0;null==M||M(me,ge,e),D&&z(ge.id)&&D(ge.id,{selectedIndex:me,option:ge,customLabel:e,metadata:f})}};return i.jsx(w.default,e.__assign({className:oe,elevation:4,sx:k({width:te,maxWidth:re,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==le?void 0:le.root)},{children:i.jsxs(q.default,e.__assign({spacing:.75,sx:{p:1}},{children:[i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:null==le?void 0:le.header},{children:[i.jsx(p.default,{color:"error",height:16,width:16}),i.jsx(I.default,e.__assign({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:l})),Z&&i.jsx(S.default,e.__assign({size:"small",onClick:O,disabled:!O,"aria-label":"Close label check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(j.default,{sx:{fontSize:17}})}))]})),i.jsxs(C.default,{children:[i.jsx(I.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:a})),null!=s&&i.jsx(I.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:s})),i.jsx(L.default,{sx:{my:.625}}),null!=u&&i.jsx(I.default,e.__assign({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:u}))]}),i.jsxs(q.default,e.__assign({spacing:.625,role:"radiogroup","aria-label":"Label options"},{children:[ae.map(function(t,n){var r=me===n;return i.jsxs(w.default,e.__assign({variant:"outlined",sx:k({borderColor:r?"#1976d2":"divider",borderRadius:2,overflow:"hidden"},null==le?void 0:le.option)},{children:[i.jsxs(E.default,e.__assign({role:"radio","aria-checked":r,disabled:t.disabled,onClick:function(){return function(e,i){i.disabled||(void 0===m&&ue(e),null==P||P(e,i))}(n,t)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[i.jsx(A.default,{checked:r,disabled:t.disabled,tabIndex:-1,size:"small",sx:{p:.25,mr:.5}}),i.jsxs(C.default,e.__assign({sx:{minWidth:0}},{children:[i.jsx(I.default,e.__assign({sx:{color:"text.primary",fontSize:12.5,fontWeight:500}},{children:t.title})),null!=t.description&&i.jsx(I.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:11}},{children:t.description}))]}))]})),r&&t.requiresInput&&i.jsx(C.default,e.__assign({sx:{px:1.75,pb:1.5,pl:5.75}},{children:i.jsx(T.default,{autoFocus:!0,fullWidth:!0,size:"small",value:he,placeholder:t.inputPlaceholder,inputProps:{"aria-label":Y},onChange:function(e){return i=e.target.value,void 0===F&&fe(i),void(null==W||W(i));var i},onKeyDown:function(e){"Enter"===e.key&&ve()},sx:null==le?void 0:le.customInput})}))]}),t.id)}),i.jsx(y.default,e.__assign({variant:"contained",fullWidth:!0,disabled:be,onClick:ve,sx:k({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==le?void 0:le.confirmButton)},{children:H}))]})),i.jsx(q.default,e.__assign({spacing:.625,sx:null==le?void 0:le.footer},{children:V&&i.jsxs(i.Fragment,{children:[i.jsx(L.default,{}),i.jsxs(E.default,e.__assign({onClick:K,disabled:!K,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:K?"pointer":"not-allowed"}},{children:[i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:1},{children:[i.jsx(h.default,{sx:{color:"text.secondary"}}),i.jsx(I.default,e.__assign({sx:{color:"text.primary",fontSize:12}},{children:J}))]})),i.jsxs(q.default,e.__assign({direction:"row",alignItems:"center",spacing:.75},{children:[i.jsx(g.default,{score:c}),i.jsx(_.default,{sx:{color:"text.secondary",fontSize:18}})]}))]}))]})}))]}))}))},exports.isLabelReviewAction=z;
|
|
2
2
|
//# sourceMappingURL=LabelCheck.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),i=require("react/jsx-runtime"),r=require("@mui/icons-material/ChevronRight"),t=require("@mui/icons-material/Close"),n=require("@mui/material/Box"),o=require("@mui/material/ButtonBase"),a=require("@mui/material/Divider"),s=require("@mui/material/IconButton"),l=require("@mui/material/Paper"),d=require("@mui/material/Stack"),u=require("@mui/material/Typography"),c=require("../../assests/icons/InfoAlert.js"),x=require("./CognitiveIcon.js"),m=require("./CognitiveScoreBadge.js"),f=require("./BoundaryCard.js"),h=require("./LabelCheck.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g,v=p(r),_=p(t),j=p(n),y=p(o),w=p(a),E=p(s),b=p(l),A=p(d),S=p(u),C=((g={})[f.BoundaryReviewActionEnum.KEEP]="Boundary Approved",g[f.BoundaryReviewActionEnum.SPLIT_HERE]="Split Approved",g[f.BoundaryReviewActionEnum.MERGE_NEXT]="Merge Approved",g[f.BoundaryReviewActionEnum.MERGE_PREVIOUS]="Merge Approved",g[f.BoundaryReviewActionEnum.SET_RANGE]="Split Approved",g[h.LabelReviewActionEnum.KEEP_LABEL]="Label Approved",g[h.LabelReviewActionEnum.SET_CUSTOM_LABEL]="Label Change Approved",g[h.LabelReviewActionEnum.SET_TYPE]="Label Change Approved",g),R=function(e){return e&&e in C?C[e]:"Reviewed"},q=function(i,r){return e.__spreadArray([i],Array.isArray(r)?r:null==r?[]:[r],!0)};exports.default=function(r){var t=r.headerName,n=r.action,o=r.title,a=r.pageNo,s=r.summary,l=r.cognitiveScore,d=r.onCognitiveClick,u=r.onClose,f=r.cognitiveLabel,h=void 0===f?"Cognitive Integrity":f,p=r.showCognitiveIntegrity,g=void 0===p||p,C=r.showCloseButton,B=void 0===C||C,W=r.width,L=void 0===W?260:W,I=r.maxWidth,T=void 0===I?260:I,z=r.className,k=r.styles,M=null!=t?t:R(n);return i.jsx(b.default,e.__assign({className:z,elevation:4,sx:q({width:L,maxWidth:"min(".concat(T,"number"==typeof T?"px, 100%)":", 100%)"),minWidth:0,flexShrink:1,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==k?void 0:k.root)},{children:i.jsxs(A.default,e.__assign({spacing:.75,sx:{p:1}},{children:[i.jsxs(A.default,e.__assign({direction:"row",alignItems:"center",spacing:.75,sx:q({minWidth:0},null==k?void 0:k.header)},{children:[i.jsx(c.default,{color:"success",height:16,width:16}),i.jsx(S.default,e.__assign({sx:{flex:1,minWidth:0,color:"success.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase",overflowWrap:"anywhere"}},{children:M})),B&&i.jsx(E.default,e.__assign({size:"small",onClick:u,disabled:!u,"aria-label":"Close reviewed card",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i.jsx(_.default,{sx:{fontSize:17}})}))]})),i.jsxs(j.default,{children:[i.jsx(S.default,e.__assign({sx:{color:"text.primary",fontSize:14,fontWeight:500,overflowWrap:"anywhere"}},{children:o})),null!=a&&i.jsx(S.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:a})),i.jsx(w.default,{sx:{my:.625}})]}),i.jsx(A.default,{sx:null==k?void 0:k.content}),i.jsx(j.default,{children:s&&i.jsxs(i.Fragment,{children:[i.jsx(S.default,e.__assign({sx:{color:"text.primary",fontSize:12,fontWeight:500}},{children:"Summary"})),i.jsx(S.default,e.__assign({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:s}))]})}),g&&i.jsxs(A.default,e.__assign({spacing:.625,sx:null==k?void 0:k.footer},{children:[i.jsx(w.default,{}),i.jsxs(y.default,e.__assign({onClick:d,disabled:!d,sx:{width:"100%",minWidth:0,justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:d?"pointer":"not-allowed"}},{children:[i.jsxs(A.default,e.__assign({direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,flex:1}},{children:[i.jsx(x.default,{sx:{color:"text.secondary"}}),i.jsx(S.default,e.__assign({sx:{minWidth:0,color:"text.primary",fontSize:12,overflowWrap:"anywhere"}},{children:h}))]})),i.jsxs(A.default,e.__assign({direction:"row",alignItems:"center",spacing:.5,sx:{flexShrink:0}},{children:[i.jsx(m.default,{score:l}),i.jsx(v.default,{sx:{color:"text.secondary"}})]}))]}))]}))]}))}))},exports.getReviewedCardHeader=R;
|
|
2
|
+
//# sourceMappingURL=ReviewedCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewedCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),r=require("../PdfViewer/PdfViewer.js"),i=require("./BoundaryCard.js"),o=require("./CardWrapper.js"),a=require("./CognitiveIntegrity.js"),u=require("./LabelCheck.js"),l=require("./reviewStepAdapters.js"),s=function(e){return{reviewId:e.review.id,segment:e.review.segment,pageNumber:e.pageNumber}},d=function(e){switch(null==e?void 0:e.trim().toLowerCase()){case"low":return{border:"#FECACA",cardBorder:"#B91C1C",background:"#FEF2F2",text:"#B91C1C",divider:"#FCA5A5"};case"medium":return{border:"#d9cda2",cardBorder:"#997800",background:"#fff1bf",text:"#997800",divider:"#e6b400"};case"high":return{border:"#16A34A",cardBorder:"#4F9E6C",background:"#F0FDF4",text:"#4F9E6C",divider:"#00A43C"};default:return{border:"#E5E7EB",cardBorder:"#374151",background:"#F9FAFB",text:"#374151",divider:"#D1D5DB"}}};exports.default=function(c){var v,g,f=this,p=c.pdfUrl,w=c.pdfName,m=c.segments,b=c.pdfViewerProps,h=c.showBadges,_=void 0===h||h,x=c.sortByConfidence,y=void 0===x?"low":x,C=c.filterByConfidence,k=void 0===C?"all":C,S=c.showBadgeNavigation,E=void 0===S||S,F=c.autoSelectReviewOnPageChange,N=void 0!==F&&F,A=c.autoAdvanceAfterConfirm,j=void 0===A||A,M=c.badgePreloadPages,R=void 0===M?8:M,B=c.badgeOffsetTop,I=void 0===B?20:B,P=c.badgeOffsetRight,q=void 0===P?8:P,L=c.initialReviewId,z=c.onBoundaryAction,D=c.onLabelAction,T=c.onActiveReviewChange,O=c.onCurrentPageChange,W=c.onActionError,H=c.onAdjustManually,V=c.onCognitiveClick,G=c.className,U=c.style,X=c.viewerStyle,J=c.railStyle,K=c.redirectionData,Q=t.useMemo(function(){return l.extractSegmentReviewData(m)},[m]),Y=Q.boundaryReviews,Z=Q.labelReviews,$=t.useMemo(function(){return new Map(m.map(function(e,n){return[e.stable_key,n+1]}))},[m]),ee=t.useMemo(function(){return e.__spreadArray(e.__spreadArray([],Y.map(function(e){var n;return{kind:"boundary",pageNumber:null!==(n=e.metadata.focus_page)&&void 0!==n?n:e.segment.start_page,review:e}}),!0),Z.map(function(e){return{kind:"label",pageNumber:e.segment.start_page,review:e}}),!0).sort(function(e,n){var t,r,i=null!==(t=$.get(e.review.segment.stable_key))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(r=$.get(n.review.segment.stable_key))&&void 0!==r?r:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||i-o||("label"===e.kind?0:1)-("label"===n.kind?0:1)||e.review.id.localeCompare(n.review.id)})},[Y,Z,$]),ne=t.useMemo(function(){return m.map(function(e){return{title:e.label||e.title,start_page:e.start_page,end_page:e.end_page,page_count:e.end_page-e.start_page+1}})},[m]),te=t.useState(1),re=te[0],ie=te[1],oe=t.useState(null!=L?L:null),ae=oe[0],ue=oe[1],le=t.useState(null!=L?L:null),se=le[0],de=le[1],ce=t.useState(!1),ve=ce[0],ge=ce[1],fe=t.useState(null),pe=fe[0],we=fe[1],me=t.useState(null),be=me[0],he=me[1],_e=t.useState(function(){return new Set}),xe=_e[0],ye=_e[1],Ce=t.useState(null),ke=Ce[0],Se=Ce[1],Ee=t.useRef(0),Fe=t.useRef(null),Ne=t.useRef(new Map),Ae=t.useRef(null),je=t.useRef(null),Me=t.useMemo(function(){var e=new Set(xe);return ee.forEach(function(n){null!=n.review.step.review&&e.add(n.review.id)}),e},[xe,ee]),Re=t.useMemo(function(){return ee.filter(function(e){return!Me.has(e.review.id)}).filter(function(e){var n;return"all"===k||(null===(n=e.review.step.confidence)||void 0===n?void 0:n.trim().toLowerCase())===k})},[k,Me,ee]),Be=t.useMemo(function(){var e;return null!==(e=ee.find(function(e){return e.review.id===ae}))&&void 0!==e?e:null},[ae,ee]),Ie=d(null==Be?void 0:Be.review.step.confidence),Pe=Boolean((null===(v=null==Be?void 0:Be.review.step.reason)||void 0===v?void 0:v.trim())||(null===(g=null==Be?void 0:Be.review.step.gap)||void 0===g?void 0:g.trim())),qe=t.useCallback(function(e,n){Ee.current+=1,Fe.current={requestId:Ee.current,pageNumber:e,reviewId:n},he({pageNumber:e,requestId:Ee.current})},[]),Le=t.useCallback(function(e){ue(e.review.id),de(e.review.id),ge(!1),we(null),qe(e.pageNumber,e.review.id),null==T||T(e.review.id)},[T,qe]);t.useEffect(function(){if((null==K?void 0:K.pageNumber)&&K.type){var e=Number(K.pageNumber);if(Number.isInteger(e)&&!(e<1)){var n=Re.find(function(n){return n.review.segment.start_page===e&&n.kind===K.type});n&&Le(n)}}},[K,Le,Re]);var ze=t.useCallback(function(){Fe.current=null,ge(!1),ue(null),we(null),null==T||T(null)},[T]),De=t.useCallback(function(e){var n;if(j){var t=ee.findIndex(function(n){return n.review.id===e}),r=new Set(Re.map(function(e){return e.review.id})),i=null!==(n=ee.find(function(n,i){return i>t&&n.review.id!==e&&r.has(n.review.id)}))&&void 0!==n?n:Re.find(function(n){return n.review.id!==e});i?requestAnimationFrame(function(){return Le(i)}):ze()}else ze()},[j,ze,ee,Le,Re]),Te=t.useCallback(function(n,t,r){return e.__awaiter(f,void 0,void 0,function(){var i,o;return e.__generator(this,function(e){switch(e.label){case 0:i=s(n),Se(n.review.id),e.label=1;case 1:return e.trys.push([1,6,7,8]),"boundary"!==n.kind?[3,3]:[4,null==z?void 0:z(t,r,i)];case 2:return e.sent(),[3,5];case 3:return[4,null==D?void 0:D(t,r,i)];case 4:e.sent(),e.label=5;case 5:return ye(function(e){var t=new Set(e);return t.add(n.review.id),t}),De(n.review.id),[3,8];case 6:return o=e.sent(),null==W||W(o,i),[3,8];case 7:return Se(null),[7];case 8:return[2]}})})},[W,z,D,De]);t.useEffect(function(){ae&&!ee.some(function(e){return e.review.id===ae})&&ze()},[ae,ze,ee]),t.useEffect(function(){if(N){var e=Re.find(function(e){return e.pageNumber===re});e&&e.review.id!==ae&&Le(e)}},[ae,N,re,Le,Re]),t.useEffect(function(){ae&&!Re.some(function(e){return e.review.id===ae})&&ze()},[ae,ze,Re]);var Oe=t.useMemo(function(){if("all"===k)return Re;var n=["low","medium","high"].filter(function(e){return e!==y}),t=e.__spreadArray([y],n,!0),r=new Map(t.map(function(e,n){return[e,n]}));return Re.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var i,o,a,u,l=null===(i=e.item.review.step.confidence)||void 0===i?void 0:i.trim().toLowerCase(),s=null===(o=n.item.review.step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==l?t.length:null!==(a=r.get(l))&&void 0!==a?a:t.length)-(null==s?t.length:null!==(u=r.get(s))&&void 0!==u?u:t.length)||e.index-n.index}).map(function(e){return e.item})},[k,y,Re]),We=Oe.findIndex(function(e){return e.review.id===se}),He=t.useState(null),Ve=He[0],Ge=He[1],Ue=t.useRef(!1),Xe=t.useCallback(function(e){var n=Oe[e];n&&Le(n)},[Oe,Le]);t.useEffect(function(){se&&!Oe.some(function(e){return e.review.id===se})&&de(null)},[Oe,se]),t.useEffect(function(){Ue.current=!1,Ge(We>=0?String(We+1):null)},[We,Oe.length]),t.useEffect(function(){if(Ue.current&&null!=Ve){var e=window.setTimeout(function(){var e=Number(Ve.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<Oe.length&&(Ue.current=!1,Xe(n))},300);return function(){return window.clearTimeout(e)}}},[Xe,Ve,Oe.length]);var Je=t.useMemo(function(){var e=new Set(Z.map(function(e){return e.segment.stable_key}));return new Map(ee.map(function(n){var t,r=n.review.segment.stable_key,i=null!==(t=$.get(r))&&void 0!==t?t:1,o="label"!==n.kind&&e.has(r)?"B":"A";return[n.review.id,"".concat(i).concat(o)]}))},[Z,ee,$]),Ke=t.useMemo(function(){var e=new Map;Re.forEach(function(n){var t,r=null!==(t=e.get(n.pageNumber))&&void 0!==t?t:[];r.push(n),e.set(n.pageNumber,r)});var n=new Map;return e.forEach(function(e){e.forEach(function(e,t){return n.set(e.review.id,t)})}),n},[Re]),Qe=t.useCallback(function(e){return{startPage:Math.max(0,e.startPage-R),endPage:Math.min(e.numPages-1,e.endPage+R)}},[R]),Ye=t.useCallback(function(){var e,n=Ae.current,t=je.current;if(n&&t){var r=n.getBoundingClientRect(),i=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==i?void 0:i.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();Re.forEach(function(e){var n,i=Ne.current.get(e.review.id);if(i){var a=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(a){var u=a.getBoundingClientRect(),l=null!==(n=Ke.get(e.review.id))&&void 0!==n?n:0,s=u.top+I+40*l,d=s+(i.offsetHeight||32),c=s>=o.top&&d<=o.bottom;i.style.top="".concat(s-r.top,"px"),i.style.visibility=c?"visible":"hidden"}else i.style.visibility="hidden"}})}},[I,Ke,Re]),Ze=t.useCallback(function(e){var n=Fe.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Fe.current=null,Ye(),requestAnimationFrame(function(){if(null==Fe.current){var e=Ne.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&we(e)}}))},[Ye]);return t.useEffect(function(){var e=je.current;if(e&&_){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,Ye()}))};e.addEventListener("scroll",t,!0),window.addEventListener("resize",t);var r=new MutationObserver(t);r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]});var i="undefined"==typeof ResizeObserver?null:new ResizeObserver(t);return null==i||i.observe(e),t(),function(){null!=n&&cancelAnimationFrame(n),e.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t),r.disconnect(),null==i||i.disconnect()}}},[_,Ye]),n.jsxs("div",e.__assign({ref:Ae,className:G,style:e.__assign({display:"flex",alignItems:"stretch",gap:0,position:"relative",width:"100%",height:"100%",minWidth:0},U)},{children:[n.jsx("div",e.__assign({ref:je,style:e.__assign(e.__assign({},X),{flex:_?"0 0 70%":"1 1 100%",width:_?"70%":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:n.jsx(r.default,e.__assign({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},b,{pdfUrl:p,pdfName:w,segments:ne,navigationRequest:be,onNavigationSettled:Ze,setRenderRange:Qe,onCurrentPageChange:function(e){ie(e),null==Fe.current&&Be&&Be.pageNumber!==e&&ze(),null==O||O(e)}}))})),_&&n.jsxs("aside",e.__assign({"aria-label":"Page review badges",style:e.__assign(e.__assign({},J),{position:"relative",width:"30%",flex:"0 0 30%",minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[E&&Oe.length>0&&n.jsxs("nav",e.__assign({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:q,zIndex:2,display:"flex",alignItems:"center",gap:7,width:128,minHeight:40,padding:"4px 6px",border:"1px solid #CBD5E1",borderRadius:6,backgroundColor:"#FFFFFF",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.06)",font:"inherit"}},{children:[n.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=Ve?Ve:"-","aria-label":"Review badge number",onChange:function(e){Ue.current=!0,Ge(e.target.value)},style:{width:30,height:28,padding:0,border:"1px solid #A5B4FC",borderRadius:3,color:"#4F46E5",backgroundColor:"#FFFFFF",textAlign:"center",font:"inherit",fontSize:15,outline:"none"}}),n.jsxs("span",e.__assign({"aria-label":"".concat(Oe.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",Oe.length]})),["previous","next"].map(function(t){var r="previous"===t,i=We+(r?-1:1),o=i<0||i>=Oe.length;return n.jsx("button",e.__assign({type:"button","aria-label":"".concat(r?"Previous":"Next"," review badge"),disabled:o,onClick:function(){return Xe(i)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:o?"#C7D2FE":"#4F46E5",cursor:o?"default":"pointer"}},{children:n.jsx("svg",e.__assign({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:n.jsx("path",{d:r?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),t)})]})),Re.map(function(t){var r,i,o=ae===t.review.id,a=null!==(r=Je.get(t.review.id))&&void 0!==r?r:"1A",u=d(t.review.step.confidence),l=null===(i=t.review.step.confidence)||void 0===i?void 0:i.trim().toLowerCase();return n.jsxs("button",e.__assign({ref:function(e){e?Ne.current.set(t.review.id,e):Ne.current.delete(t.review.id)},type:"button","aria-pressed":o,title:"".concat(t.review.step.type," · Page ").concat(t.pageNumber),onClick:function(){return Le(t)},style:{position:"absolute",top:0,left:0,visibility:"hidden",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:86,minHeight:29,padding:"2px 5px",border:"1px solid ".concat(u.border),borderRadius:16,backgroundColor:u.background,color:u.text,cursor:"pointer",font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:[n.jsx("span",e.__assign({style:{fontSize:13,fontWeight:600}},{children:a})),n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:[n.jsx("svg",e.__assign({width:"2",height:"17",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n.jsx("path",{d:"M0.399902 0V14",stroke:u.divider,strokeWidth:"0.8"})})),n.jsx("span",e.__assign({style:{fontSize:13,fontWeight:600,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:t.review.step.score?"".concat(t.review.step.score,"%"):"low"===l?"40%":"high"===l?"95%":"70%"}))]}))]}),t.review.id)})]})),Be&&pe&&n.jsxs(o.default,e.__assign({anchorElement:pe,placement:"bottom-start",offset:{top:8}},{children:[ve&&n.jsx(a.default,{score:Be.review.step.score,reason:Be.review.step.reason,gap:Be.review.step.gap,onBack:function(){return ge(!1)},onClose:ze}),n.jsx("div",e.__assign({style:{display:ve?"none":"block"}},{children:"boundary"===Be.kind?n.jsx(i.default,{title:Be.review.segment.label||Be.review.segment.title,pageNo:"Page ".concat(Be.pageNumber),content:Be.review.step.reason,cognitiveScore:Be.review.step.score?"".concat(Be.review.step.score,"%"):null,metadata:Be.review.metadata,defaultStartPage:Be.review.segment.start_page,defaultEndPage:Be.review.segment.end_page,styles:{root:{borderColor:Ie.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Ie.text}}},confirmDisabled:ke===Be.review.id,onActionConfirm:function(e,n){Te(Be,e,n)},onAdjustManually:function(){return null==H?void 0:H(s(Be))},onCognitiveClick:Pe?function(){ge(!0),null==V||V(s(Be))}:void 0,onClose:ze},Be.review.id):n.jsx(u.default,{title:Be.review.metadata.current_label||Be.review.segment.label||Be.review.segment.title,pageNo:"Pages ".concat(Be.review.segment.start_page,"-").concat(Be.review.segment.end_page),content:Be.review.step.reason,cognitiveScore:Be.review.step.score,metadata:Be.review.metadata,styles:{root:{borderColor:Ie.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Ie.text}}},confirmDisabled:ke===Be.review.id,onActionConfirm:function(e,n){Te(Be,e,n)},onAdjustManually:function(){return null==H?void 0:H(s(Be))},onCognitiveClick:Pe?function(){ge(!0),null==V||V(s(Be))}:void 0,onClose:ze},Be.review.id)}))]}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("@react-pdf-viewer/core"),r=require("../PdfViewer/PdfViewer.js"),a=require("./BoundaryCard.js"),o=require("./CardWrapper.js"),s=require("./CognitiveIntegrity.js"),l=require("./LabelCheck.js"),u=require("./reviewStepAdapters.js"),d=require("lucide-react"),c=require("@mui/material"),g=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}},f=function(e){switch(null==e?void 0:e.trim().toLowerCase()){case"low":return{border:"#FECACA",cardBorder:"#B91C1C",background:"#FEF2F2",text:"#B91C1C",divider:"#FCA5A5"};case"medium":return{border:"#d9cda2",cardBorder:"#997800",background:"#fff1bf",text:"#997800",divider:"#e6b400"};case"high":return{border:"#16A34A",cardBorder:"#4F9E6C",background:"#F0FDF4",text:"#4F9E6C",divider:"#00A43C"};default:return{border:"#E5E7EB",cardBorder:"#374151",background:"#F9FAFB",text:"#374151",divider:"#D1D5DB"}}};exports.default=function(v){var p,h,m,b,w=this,_=v.pdfUrl,x=v.pdfName,y=v.segments,C=v.styles,k=v.pdfViewerProps,j=v.showBadges,S=void 0===j||j,F=v.sortByConfidence,E=void 0===F?"low":F,A=v.filterByConfidence,N=void 0===A?"all":A,M=v.showBadgeNavigation,B=void 0===M||M,R=v.autoSelectReviewOnPageChange,I=void 0!==R&&R,P=v.autoAdvanceAfterConfirm,q=void 0===P||P,L=v.badgePreloadPages,z=void 0===L?8:L,W=v.badgeOffsetTop,D=void 0===W?20:W,T=v.badgeOffsetRight,O=void 0===T?8:T,V=v.initialReviewId,H=v.onBoundaryAction,G=v.onLabelAction,U=v.onActiveReviewChange,X=v.onCurrentPageChange,Z=v.onActionError,J=v.onAdjustManually,K=v.onCognitiveClick,Q=v.className,Y=v.style,$=v.viewerStyle,ee=v.railStyle,ne=v.redirectionData,te=t.useMemo(function(){return u.extractSegmentReviewData(y)},[y]),ie=te.boundaryReviews,re=te.labelReviews,ae=t.useMemo(function(){return new Map(y.map(function(e,n){return[e.stable_key,n+1]}))},[y]),oe=t.useRef(null),se=t.useMemo(function(){return e.__spreadArray(e.__spreadArray([],ie.map(function(n){var t;return e.__assign(e.__assign({},n),{kind:"boundary",pageNumber:null!==(t=n.metadata.focus_page)&&void 0!==t?t:n.segment.start_page})}),!0),re.map(function(n){return e.__assign(e.__assign({},n),{kind:"label",pageNumber:n.segment.start_page})}),!0).sort(function(e,n){var t,i,r=null!==(t=ae.get(e.segment.stable_key))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,a=null!==(i=ae.get(n.segment.stable_key))&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||r-a||("label"===e.kind?0:1)-("label"===n.kind?0:1)||e.id.localeCompare(n.id)})},[ie,re,ae]),le=t.useMemo(function(){return e.__spreadArray([],y,!0)},[y]),ue=t.useState(1),de=ue[0],ce=ue[1],ge=t.useState(null!=V?V:null),fe=ge[0],ve=ge[1],pe=t.useState(null!=V?V:null),he=pe[0],me=pe[1],be=t.useState(!1),we=be[0],_e=be[1],xe=t.useState(null),ye=xe[0],Ce=xe[1],ke=t.useState(null),je=ke[0],Se=ke[1],Fe=t.useState(function(){return new Set}),Ee=Fe[0],Ae=Fe[1],Ne=t.useState(null),Me=Ne[0],Be=Ne[1],Re=t.useRef(0),Ie=t.useRef(null),Pe=t.useRef(new Map),qe=t.useRef(null),Le=t.useRef(null),ze=t.useState(260),We=ze[0],De=ze[1];t.useEffect(function(){var e=oe.current;if(e&&S){var n=function(){var n=e.getBoundingClientRect().width;n>0&&De(n)};n();var t="undefined"==typeof ResizeObserver?null:new ResizeObserver(n);return null==t||t.observe(e),function(){return null==t?void 0:t.disconnect()}}},[S]),t.useMemo(function(){var e=new Set(Ee);return se.forEach(function(n){null!=n.review_step.review&&e.add(n.id)}),e},[Ee,se]);var Te=t.useMemo(function(){var e;return null!==(e=se.find(function(e){return e.id===fe}))&&void 0!==e?e:null},[fe,se]),Oe=f(null==Te?void 0:Te.review_step.confidence),Ve=Boolean((null===(p=null==Te?void 0:Te.review_step.reason)||void 0===p?void 0:p.trim())||(null===(h=null==Te?void 0:Te.review_step.gap)||void 0===h?void 0:h.trim())),He=t.useCallback(function(e,n){Re.current+=1,Ie.current={requestId:Re.current,pageNumber:e,reviewId:n},Se({pageNumber:e,requestId:Re.current})},[]),Ge=t.useCallback(function(e){ve(e.id),me(e.id),_e(!1),Ce(null),He(e.pageNumber,e.id),null==U||U(e.id,e.segment)},[U,He]);t.useEffect(function(){if((null==ne?void 0:ne.pageNumber)&&ne.type){var e=Number(ne.pageNumber);if(Number.isInteger(e)&&!(e<1)){var n=se.find(function(n){return n.segment.start_page===e&&n.kind===ne.type});n&&Ge(n)}}},[ne,Ge,se]);var Ue=t.useCallback(function(){Ie.current=null,_e(!1),ve(null),Ce(null),null==U||U(null,null)},[U]),Xe=t.useCallback(function(e){var n;if(q){var t=se.findIndex(function(n){return n.id===e}),i=new Set(se.map(function(e){return e.id})),r=null!==(n=se.find(function(n,r){return r>t&&n.id!==e&&i.has(n.id)}))&&void 0!==n?n:se.find(function(n){return n.id!==e});r?requestAnimationFrame(function(){return Ge(r)}):Ue()}else Ue()},[q,Ue,se,Ge,se]),Ze=t.useCallback(function(n,t,i){return e.__awaiter(w,void 0,void 0,function(){var r,a;return e.__generator(this,function(e){switch(e.label){case 0:r=g(n),Be(n.id),e.label=1;case 1:return e.trys.push([1,6,7,8]),"boundary"!==n.kind?[3,3]:[4,null==H?void 0:H(t,i,r)];case 2:return e.sent(),[3,5];case 3:return[4,null==G?void 0:G(t,i,r)];case 4:e.sent(),e.label=5;case 5:return Ae(function(e){var t=new Set(e);return t.add(n.id),t}),Xe(n.id),[3,8];case 6:return a=e.sent(),null==Z||Z(a,r),[3,8];case 7:return Be(null),[7];case 8:return[2]}})})},[Z,H,G,Xe]);t.useEffect(function(){fe&&!se.some(function(e){return e.id===fe})&&Ue()},[fe,Ue,se]),t.useEffect(function(){if(I){var e=se.find(function(e){return e.pageNumber===de});e&&e.id!==fe&&Ge(e)}},[fe,I,de,Ge,se]),t.useEffect(function(){fe&&!se.some(function(e){return e.id===fe})&&Ue()},[fe,Ue,se]);var Je=t.useMemo(function(){if("all"===N)return se;var n=["low","medium","high"].filter(function(e){return e!==E}),t=e.__spreadArray([E],n,!0),i=new Map(t.map(function(e,n){return[e,n]}));return se.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var r,a,o,s,l=null===(r=e.item.review_step.confidence)||void 0===r?void 0:r.trim().toLowerCase(),u=null===(a=n.item.review_step.confidence)||void 0===a?void 0:a.trim().toLowerCase();return(null==l?t.length:null!==(o=i.get(l))&&void 0!==o?o:t.length)-(null==u?t.length:null!==(s=i.get(u))&&void 0!==s?s:t.length)||e.index-n.index}).map(function(e){return e.item})},[N,E,se]),Ke=Je.findIndex(function(e){return e.id===he}),Qe=t.useState(null),Ye=Qe[0],$e=Qe[1],en=t.useRef(!1),nn=t.useCallback(function(e){var n=Je[e];n&&Ge(n)},[Je,Ge]);t.useEffect(function(){he&&!Je.some(function(e){return e.id===he})&&me(null)},[Je,he]),t.useEffect(function(){en.current=!1,$e(Ke>=0?String(Ke+1):null)},[Ke,Je.length]),t.useEffect(function(){if(en.current&&null!=Ye){var e=window.setTimeout(function(){var e=Number(Ye.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<Je.length&&(en.current=!1,nn(n))},300);return function(){return window.clearTimeout(e)}}},[nn,Ye,Je.length]);var tn=t.useMemo(function(){var e=new Set(re.map(function(e){return e.segment.stable_key}));return new Map(se.map(function(n){var t,i=n.segment.stable_key,r=null!==(t=ae.get(i))&&void 0!==t?t:1,a="label"!==n.kind&&e.has(i)?"B":"A";return[n.id,"".concat(r).concat(a)]}))},[re,se,ae]),rn=t.useMemo(function(){var e=new Map;se.forEach(function(n){var t,i=null!==(t=e.get(n.pageNumber))&&void 0!==t?t:[];i.push(n),e.set(n.pageNumber,i)});var n=new Map;return e.forEach(function(e){e.forEach(function(e,t){return n.set(e.id,t)})}),n},[se]),an=t.useCallback(function(e){return{startPage:Math.max(0,e.startPage-z),endPage:Math.min(e.numPages-1,e.endPage+z)}},[z]),on=t.useCallback(function(){var e,n=qe.current,t=Le.current;if(n&&t){var i=n.getBoundingClientRect(),r=t.querySelector(".rpv-core__inner-pages"),a=null!==(e=null==r?void 0:r.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();se.forEach(function(e){var n,r=Pe.current.get(e.id);if(r){var o=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(o){var s=o.getBoundingClientRect(),l=null!==(n=rn.get(e.id))&&void 0!==n?n:0,u=s.top+D+40*l,d=u+(r.offsetHeight||32),c=u>=a.top&&d<=a.bottom;r.style.top="".concat(u-i.top,"px"),r.style.visibility=c?"visible":"hidden"}else r.style.visibility="hidden"}})}},[D,rn,se]),sn=t.useCallback(function(e){var n=Ie.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Ie.current=null,on(),requestAnimationFrame(function(){if(null==Ie.current){var e=Pe.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&Ce(e)}}))},[on]);return t.useEffect(function(){var e=Le.current;if(e&&S){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,on()}))};e.addEventListener("scroll",t,!0),window.addEventListener("resize",t);var i=new MutationObserver(t);i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]});var r="undefined"==typeof ResizeObserver?null:new ResizeObserver(t);return null==r||r.observe(e),t(),function(){null!=n&&cancelAnimationFrame(n),e.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t),i.disconnect(),null==r||r.disconnect()}}},[S,on]),n.jsxs("div",e.__assign({ref:qe,className:Q,style:e.__assign({display:"flex",alignItems:"stretch",gap:0,position:"relative",width:"100%",height:"100%",minWidth:0},Y)},{children:[n.jsx("div",e.__assign({ref:Le,style:e.__assign(e.__assign({},$),{flex:S?"0 0 60%":"1 1 100%",width:S?null!==(m=null==C?void 0:C.container.width)&&void 0!==m?m:"60%":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:n.jsx(r.default,e.__assign({defaultScale:i.SpecialZoomLevel.PageFit,highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},k,{pdfUrl:_,pdfName:x,segments:le,navigationRequest:je,onNavigationSettled:sn,setRenderRange:an,onCurrentPageChange:function(e){ce(e),null==Ie.current&&Te&&Te.pageNumber!==e&&Ue(),null==X||X(e)}}))})),S&&n.jsxs("aside",e.__assign({"aria-label":"Page review badges",ref:oe,style:e.__assign(e.__assign({},ee),{position:"relative",width:S?null!==(b=null==C?void 0:C.aside.width)&&void 0!==b?b:"40%":0,flex:"0 0 40%",minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[B&&Je.length>0&&n.jsxs("nav",e.__assign({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:O,zIndex:2,display:"flex",alignItems:"center",gap:7,width:128,minHeight:40,padding:"4px 6px",border:"1px solid #CBD5E1",borderRadius:6,backgroundColor:"#FFFFFF",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.06)",font:"inherit"}},{children:[n.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=Ye?Ye:"-","aria-label":"Review badge number",onChange:function(e){en.current=!0,$e(e.target.value)},style:{width:30,height:28,padding:0,border:"1px solid #A5B4FC",borderRadius:3,color:"#4F46E5",backgroundColor:"#FFFFFF",textAlign:"center",font:"inherit",fontSize:15,outline:"none"}}),n.jsxs("span",e.__assign({"aria-label":"".concat(Je.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",Je.length]})),["previous","next"].map(function(t){var i="previous"===t,r=Ke+(i?-1:1),a=r<0||r>=Je.length;return n.jsx("button",e.__assign({type:"button","aria-label":"".concat(i?"Previous":"Next"," review badge"),disabled:a,onClick:function(){return nn(r)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:a?"#C7D2FE":"#4F46E5",cursor:a?"default":"pointer"}},{children:n.jsx("svg",e.__assign({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:n.jsx("path",{d:i?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),t)})]})),se.map(function(t){var i,r,a=fe===t.id,o=null!==(i=tn.get(t.id))&&void 0!==i?i:"1A",s=t.review_step.score,l="number"==typeof s?"".concat(s,"%"):null,u=f(t.review_step.confidence),g=t.review_step.review&&null!==t.review_step.review.action,v=null===(r=t.review_step.confidence)||void 0===r?void 0:r.trim().toLowerCase();return n.jsx("button",e.__assign({ref:function(e){e?Pe.current.set(t.id,e):Pe.current.delete(t.id)},disabled:!!g,type:"button","aria-pressed":a,title:"".concat(t.review_step.type," · Page ").concat(t.pageNumber),onClick:function(){return Ge(t)},style:{position:"absolute",top:0,left:0,visibility:"hidden",cursor:g?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:g?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(g?"#E2E8F0":u.border),borderRadius:16,backgroundColor:g?"#F8FAFC":u.background,color:g?"#475569":u.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:g?n.jsxs(c.Typography,e.__assign({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},{children:[n.jsx("span",e.__assign({style:{fontSize:11,fontWeight:500}},{children:o})),n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:[n.jsx("svg",e.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n.jsx("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),n.jsx("span",e.__assign({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:null!==l?l:"low"===v?"40%":"high"===v?"95%":"70%"}))]})),n.jsxs("span",e.__assign({style:{fontSize:11,fontWeight:500,display:"flex",alignItems:"center"}},{children:[n.jsx("svg",e.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n.jsx("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),n.jsx("span",e.__assign({style:{display:"flex",marginLeft:"7px",alignItems:"center"}},{children:n.jsx(d.CircleCheck,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]})):n.jsxs(c.Typography,e.__assign({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},{children:[n.jsx("span",e.__assign({style:{fontSize:11,fontWeight:500}},{children:o})),n.jsxs("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:[n.jsx("svg",e.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n.jsx("path",{d:"M0.399902 0V14",stroke:u.divider,strokeWidth:"0.8"})})),n.jsx("span",e.__assign({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:null!==l?l:"low"===v?"40%":"high"===v?"95%":"70%"}))]}))]}))}),t.id)})]})),Te&&ye&&n.jsxs(o.default,e.__assign({anchorElement:ye,placement:"bottom-start",offset:{top:8},width:We,maxWidth:240},{children:[we&&n.jsx(s.default,{width:"100%",maxWidth:"100%",score:Te.review_step.score,reason:Te.review_step.reason,gap:Te.review_step.gap,onBack:function(){return _e(!1)},onClose:Ue}),n.jsx("div",e.__assign({style:{display:we?"none":"block"}},{children:Te.review_step.review&&Te.review_step.human_resolution?n.jsx(n.Fragment,{}):"boundary"===Te.kind?n.jsx(a.default,{width:"100%",maxWidth:"100%",title:Te.segment.label||Te.segment.title,pageNo:"Page ".concat(Te.pageNumber),content:Te.review_step.reason,cognitiveScore:Te.review_step.score,metadata:Te.metadata,defaultStartPage:Te.segment.start_page,defaultEndPage:Te.segment.end_page,styles:{root:{borderColor:Oe.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Oe.text}}},confirmDisabled:Me===Te.id,onActionConfirm:function(e,n){Ze(Te,e,n)},onAdjustManually:function(){return null==J?void 0:J(g(Te))},onCognitiveClick:Ve?function(){_e(!0),null==K||K(g(Te))}:void 0,onClose:Ue},Te.id):n.jsx(l.default,{width:"100%",maxWidth:"100%",title:Te.metadata.current_label||Te.segment.label||Te.segment.title,pageNo:"Pages ".concat(Te.segment.start_page,"-").concat(Te.segment.end_page),content:Te.review_step.reason,cognitiveScore:Te.review_step.score,metadata:Te.metadata,styles:{root:{borderColor:Oe.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Oe.text}}},confirmDisabled:Me===Te.id,onActionConfirm:function(e,n){Ze(Te,e,n)},onAdjustManually:function(){return null==J?void 0:J(g(Te))},onCognitiveClick:Ve?function(){_e(!0),null==K||K(g(Te))}:void 0,onClose:Ue},Te.id)}))]}))]}))};
|
|
2
2
|
//# sourceMappingURL=SegmentReviewPdfWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./BoundaryCard.js"),r=require("./LabelCheck.js"),t=function(e){return"object"==typeof e&&null!==e?e:{}},a=function(e){return"string"==typeof e?e:null},n=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},u=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},o=function(e){var n=t(e);return{current_label:a(n.current_label),custom_label:a(n.custom_label),group_id:a(n.group_id),user_actions:u(n.user_actions).filter(r.isLabelReviewAction)}};exports.extractSegmentReviewData=function(r){var a=[],i=[];return r.forEach(function(r){r.review_steps.forEach(function(l,s){var c,b,f,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./BoundaryCard.js"),r=require("./LabelCheck.js"),t=function(e){return"object"==typeof e&&null!==e?e:{}},a=function(e){return"string"==typeof e?e:null},n=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},u=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},o=function(e){var n=t(e);return{current_label:a(n.current_label),custom_label:a(n.custom_label),group_id:a(n.group_id),user_actions:u(n.user_actions).filter(r.isLabelReviewAction)}};exports.extractSegmentReviewData=function(r){var a=[],i=[];return r.forEach(function(r){r.review_steps.forEach(function(l,s){var c,b,f,_=(b=l.type,"page_boundary"===(f=b.trim().toLowerCase())||"page boundary review"===f?"boundary":"label"===f||"label review"===f?"label":null);if("boundary"===_){var d=function(r){var a=t(r);return{focus_page:n(a.focus_page),boundary_margin:n(a.boundary_margin),user_actions:u(a.user_actions).filter(e.isBoundaryReviewAction)}}(l.metadata);a.push({id:"".concat(r.stable_key,":boundary:").concat(null!==(c=d.focus_page)&&void 0!==c?c:s),segment:r,review_step:l,metadata:d})}"label"===_&&i.push({id:"".concat(r.stable_key,":label:").concat(s),segment:r,review_step:l,metadata:o(l.metadata)})})}),{boundaryReviews:a,labelReviews:i}};
|
|
2
2
|
//# sourceMappingURL=reviewStepAdapters.js.map
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),r=require("./features/Bookemon/Bookemon.js"),o=require("./features/PdfEditorCitation/PdfEditorCitation.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./features/CodeCitation/CodeCitation.js"),t=require("./features/ProjectAccordion/ProjectAccordion.js"),i=require("./features/BookCitation/BookCitation.js"),r=require("./features/Bookemon/Bookemon.js"),o=require("./features/PdfEditorCitation/PdfEditorCitation.js"),n=require("./features/CitationRenderer/CitationRenderer.js"),a=require("./features/CitationRenderer/MarkdownRenderer.js"),s=require("./features/CodeCitation/_components/CodeEditor.js"),u=require("./features/PaginatedTable/PaginatedTable.js"),C=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js"),p=require("./features/ChatCitation/ChatCitationRenderer.js"),l=require("./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js"),d=require("./features/PdfViewer/PdfViewer.js"),f=require("./features/SegmentReviewComponents/BoundaryCard.js");require("tslib"),require("react/jsx-runtime"),require("react"),require("@mui/material/Box"),require("@mui/material/Popper"),require("@mui/material/SvgIcon");var m=require("./features/SegmentReviewComponents/CognitiveIntegrity.js"),x=require("./features/SegmentReviewComponents/LabelCheck.js"),g=require("./features/SegmentReviewComponents/ReviewedCard.js"),c=require("./features/SegmentReviewComponents/reviewStepAdapters.js"),q=require("./features/SegmentReviewComponents/SegmentReviewPdfWrapper.js"),R=require("./features/CognitiveDecisioning/FaqCitation/FaqCitation.js"),w=require("./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js"),j=require("./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js"),v=require("./features/RequirementAiCitations/FileCitation/FileCitationContent.js"),S=require("./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js"),P=require("./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js"),b=require("./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js"),I=require("./features/TableCitation/TableCitationContent.js"),A=require("./features/ReviewPanel/ReviewPanel.js"),D=require("./features/CitationViewer/CitationsViewer.js"),T=require("./features/ExcelCitation/ExcelCitations.js"),B=require("./features/ScannedDocCitation/ScannedDocCitation.js"),E=require("./features/ChatDrawer/ChatDrawer.js"),h=require("./features/ChatDrawer/constants/ChatDrawer.js"),y=require("./features/SplitterCitations/SplitterCitationsComponent.js"),W=require("./features/DualCitation/SourceBQDataCompnent.js"),k=require("./features/CognitiveCompare/CognitiveCompare.js"),V=require("./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js"),L=require("./features/TextualGuidelines/TextualGuideLinesComponent.js"),F=require("./features/RulebookCitations/RuleBookCitationWrapper.js"),G=require("./features/IngestionStatus/IngestionStatusComponent.js"),O=require("./features/ManageRemainders/ManageReminders.js"),U=require("./features/PromptemonBlockViewer/PromptemonBlockViewer.js"),_=require("./features/PromptemonViewer/PromptemonViewer.js"),M=require("./features/SPBAnalysisPanel/Spbanalysispanel.js"),H=require("./features/GptWebCitation/GptWebCitation.js"),N=require("./hooks/useOnDemandCitationFetch.js"),Q=require("./features/InstantLearningCitation/InstantLearningCitationComponent.js"),z=require("./features/BPACitationRenderer/BPACitationRenderer.js"),X=require("./features/GptWebCitation/utils/citationData.utils.js"),Y=require("./features/GptWebCitation/types.js");exports.CodeCitation=e.default,exports.ProjectAccordian=t.default,exports.BookCitation=i.default,exports.Bookemon=r.default,exports.PdfCitation=o.PdfEditorCitation,exports.CitationRenderer=n.default,exports.MarkdownRenderer=a.default,Object.defineProperty(exports,"DiagnosticSeverity",{enumerable:!0,get:function(){return s.DiagnosticSeverity}}),exports.PaginatedTable=u.default,exports.InternalgptReasoningComponent=C.default,exports.NonWebReasoningComponent=C.default,exports.ChatCitation=p.default,exports.CognitiveDecisioningCard=l.default,exports.PdfViewer=d.default,Object.defineProperty(exports,"BoundaryReviewActionEnum",{enumerable:!0,get:function(){return f.BoundaryReviewActionEnum}}),exports.createBoundaryCardOptions=f.createBoundaryCardOptions,exports.isBoundaryReviewAction=f.isBoundaryReviewAction,exports.CognitiveIntegrity=m.default,Object.defineProperty(exports,"LabelReviewActionEnum",{enumerable:!0,get:function(){return x.LabelReviewActionEnum}}),exports.createLabelCheckOptions=x.createLabelCheckOptions,exports.isLabelReviewAction=x.isLabelReviewAction,exports.ReviewedCard=g.default,exports.getReviewedCardHeader=g.getReviewedCardHeader,exports.extractSegmentReviewData=c.extractSegmentReviewData,exports.SegmentReviewPdfWrapper=q.default,exports.FaqCitation=R.default,exports.ImageCitationContent=w.default,exports.VideoCitationContent=j.default,exports.FileCitationContent=v.default,exports.WebCitationWithImageContent=S.default,exports.MarkdownWithImageCitation=P.default,exports.AiReasoningCitation=b.default,exports.TableCitationContent=I.default,exports.ReviewPanel=A.ReviewPanel,exports.CitationsViewer=D.default,exports.ExcelCitation=T.default,exports.ScannedDocCitation=B.default,exports.ChatDrawer=E.default,exports.FILE_INGESTION_STATUS=h.FILE_INGESTION_STATUS,exports.SUMMARY_EXPAND_HEIGHT_NUDGE=h.SUMMARY_EXPAND_HEIGHT_NUDGE,exports.TRUNCATE_THRESHOLD=h.TRUNCATE_THRESHOLD,exports.SplitterCitationsComponent=y.default,exports.SourcesBQCitation=W.SourcesBQCitation,exports.findSourceCitation=W.findSourceCitation,exports.parseSourcesBQHref=W.parseSourcesBQHref,exports.CognitiveCompare=k.default,exports.CognitiveInternalgptCoreComponent=V.default,exports.TextualGuideLinesComponent=L.default,exports.RuleBookCitationWrapper=F.default,exports.IngestionStatusChip=G.IngestionStatusChip,exports.IngestionStatusComponent=G.IngestionStatusComponent,exports.ManageReminders=O.ManageReminders,exports.PromptemonBlockViewer=U.default,exports.PromptemonViewer=_.default,exports.SPBAnalysisPanel=M.default,exports.GptWebCitation=H.default,exports.useOnDemandCitationFetch=N.useOnDemandCitationFetch,exports.InstantLearningCitationWrapper=Q.default,exports.BPACitationRenderer=z.default,exports.extractLearnedFromUrl=X.extractLearnedFromUrl,exports.extractRelevanceScoreFromContent=X.extractRelevanceScoreFromContent,exports.extractTopicFromContent=X.extractTopicFromContent,exports.getWebCitationImageUrl=X.getWebCitationImageUrl,exports.mapCitationDataToDisplay=X.mapCitationDataToDisplay,exports.resolveSkeletonVisitUrl=X.resolveSkeletonVisitUrl,exports.sanitizeExternalUrl=X.sanitizeExternalUrl,Object.defineProperty(exports,"CitationType",{enumerable:!0,get:function(){return Y.CitationType}}),exports.allowsGptCitationView=Y.allowsGptCitationView,exports.allowsWebCitationView=Y.allowsWebCitationView,exports.showsCitationViewToggle=Y.showsCitationViewToggle;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as i}from"tslib";import{jsx as t,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useMemo as o,useState as a}from"react";import l from"@mui/icons-material/ChevronRight";import d from"@mui/icons-material/Close";import c from"@mui/material/Box";import s from"@mui/material/Button";import u from"@mui/material/ButtonBase";import m from"@mui/material/Divider";import p from"@mui/material/IconButton";import h from"@mui/material/Paper";import g from"@mui/material/Radio";import f from"@mui/material/Stack";import x from"@mui/material/TextField";import v from"@mui/material/Typography";import b from"./CognitiveIcon.js";import E from"./CognitiveScoreBadge.js";import
|
|
1
|
+
import{__assign as e,__spreadArray as i}from"tslib";import{jsx as t,jsxs as r,Fragment as n}from"react/jsx-runtime";import{useMemo as o,useState as a}from"react";import l from"@mui/icons-material/ChevronRight";import d from"@mui/icons-material/Close";import c from"@mui/material/Box";import s from"@mui/material/Button";import u from"@mui/material/ButtonBase";import m from"@mui/material/Divider";import p from"@mui/material/IconButton";import h from"@mui/material/Paper";import g from"@mui/material/Radio";import f from"@mui/material/Stack";import x from"@mui/material/TextField";import v from"@mui/material/Typography";import b from"./CognitiveIcon.js";import E from"./CognitiveScoreBadge.js";import S from"../../assests/icons/InfoAlert.js";var C,y=function(e,t){return i([e],Array.isArray(t)?t:null==t?[]:[t],!0)};!function(e){e.KEEP="KEEP",e.SPLIT_HERE="SPLIT_HERE",e.MERGE_NEXT="MERGE_NEXT",e.MERGE_PREVIOUS="MERGE_PREVIOUS",e.SET_RANGE="SET_RANGE"}(C||(C={}));var R=function(e){return Object.values(C).includes(e)},w=function(e){return e.user_actions.map(function(i){var t=e.focus_page;switch(i){case"KEEP":return{id:i,title:"Keep as is",description:"Keep the current document boundary unchanged."};case"SPLIT_HERE":return{id:i,title:"Create a separate document",description:t?"Start a new document at page ".concat(t,"."):"Create a new document at this boundary."};case"MERGE_NEXT":return{id:i,title:"Merge into next document",description:t?"Move page ".concat(t," onward into the next document."):"Merge this segment into the next document."};case"MERGE_PREVIOUS":return{id:i,title:"Merge into previous document",description:"Merge this segment into the previous document."};case"SET_RANGE":return{id:i,title:"Adjust page range",description:"Set the start and end pages manually."}}})};function I(i){var C=i.headerName,I=void 0===C?"Boundary Check":C,A=i.title,M=i.pageNo,N=i.content,P=i.cognitiveScore,T=i.config,_=i.metadata,k=i.selectedIndex,z=i.defaultSelectedIndex,G=void 0===z?null:z,B=i.defaultStartPage,j=i.defaultEndPage,W=i.onSelectionChange,F=i.onConfirm,H=i.onActionConfirm,L=i.onCognitiveClick;i.onAdjustManually;var D=i.onClose,K=i.confirmLabel,O=void 0===K?"Confirm":K;i.manualPrompt,i.manualActionLabel;var U=i.cognitiveLabel,V=void 0===U?"Cognitive Integrity":U;i.showAdjustManually;var X=i.showCognitiveIntegrity,q=void 0===X||X,J=i.showCloseButton,Q=void 0===J||J,Y=i.confirmDisabled,Z=void 0!==Y&&Y,$=i.width,ee=void 0===$?260:$,ie=i.maxWidth,te=void 0===ie?260:ie,re=i.className,ne=i.styles,oe=o(function(){return null!=T?T:_?w(_):[]},[T,_]),ae=a(G),le=ae[0],de=ae[1],ce=a(null==B?"":String(B)),se=ce[0],ue=ce[1],me=a(null==j?"":String(j)),pe=me[0],he=me[1],ge=void 0===k?le:k,fe=null==ge?void 0:oe[ge],xe=Number(se),ve=Number(pe),be="SET_RANGE"===(null==fe?void 0:fe.id),Ee=se.trim().length>0&&pe.trim().length>0&&Number.isInteger(xe)&&Number.isInteger(ve)&&xe>0&&ve>0&&xe<=ve,Se=Z||!fe||!0===fe.disabled||be&&!Ee||!F&&!H;return t(h,e({className:re,elevation:4,sx:y({width:ee,maxWidth:te,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==ne?void 0:ne.root)},{children:r(f,e({spacing:.75,sx:{p:1}},{children:[r(f,e({direction:"row",alignItems:"center",spacing:.75,sx:null==ne?void 0:ne.header},{children:[t(S,{color:"error",height:16,width:16}),t(v,e({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:I})),Q&&t(p,e({size:"small",onClick:D,disabled:!D,"aria-label":"Close boundary check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:t(d,{sx:{fontSize:17}})}))]})),r(c,{children:[t(v,e({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:A})),null!=M&&t(v,e({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:M})),t(m,{sx:{my:.625}}),null!=N&&t(v,e({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:N}))]}),r(f,e({spacing:.625,role:"radiogroup","aria-label":"Boundary options"},{children:[oe.map(function(i,n){var o=ge===n;return r(h,e({variant:"outlined",sx:y({borderColor:o?"#1976d2":"divider",borderRadius:2,overflow:"hidden"},null==ne?void 0:ne.option)},{children:[r(u,e({role:"radio","aria-checked":o,disabled:i.disabled,onClick:function(){return function(e,i){i.disabled||(void 0===k&&de(e),null==W||W(e,i))}(n,i)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[t(g,{checked:o,disabled:i.disabled,tabIndex:-1,size:"small",sx:{p:.25,mr:.5}}),r(c,e({sx:{minWidth:0}},{children:[t(v,e({sx:{color:"text.primary",fontSize:12.5,fontWeight:500}},{children:i.title})),null!=i.description&&t(v,e({sx:{mt:.125,color:"text.secondary",fontSize:11}},{children:i.description}))]}))]})),o&&"SET_RANGE"===i.id&&r(f,e({direction:"row",spacing:1,sx:{px:1.75,pb:1.5,pl:5.75}},{children:[t(x,{fullWidth:!0,size:"small",type:"number",label:"Start page",value:se,onChange:function(e){return ue(e.target.value)},inputProps:{min:1,step:1,inputMode:"numeric"},sx:null==ne?void 0:ne.rangeInput}),t(x,{fullWidth:!0,size:"small",type:"number",label:"End page",value:pe,error:se.trim().length>0&&pe.trim().length>0&&xe>ve,onChange:function(e){return he(e.target.value)},inputProps:{min:1,step:1,inputMode:"numeric"},sx:null==ne?void 0:ne.rangeInput})]}))]}),i.id)}),t(s,e({variant:"contained",fullWidth:!0,disabled:Se,onClick:function(){!Se&&null!=ge&&fe&&(null==F||F(ge,fe),H&&R(fe.id)&&H(fe.id,e({selectedIndex:ge,option:fe,metadata:_},"SET_RANGE"===fe.id&&Ee?{startPage:xe,endPage:ve}:{})))},sx:y({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==ne?void 0:ne.confirmButton)},{children:O}))]})),t(f,e({spacing:.625,sx:null==ne?void 0:ne.footer},{children:q&&r(n,{children:[t(m,{}),r(u,e({onClick:L,disabled:!L,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:L?"pointer":"not-allowed"}},{children:[r(f,e({direction:"row",alignItems:"center",spacing:1},{children:[t(b,{sx:{color:"text.secondary"}}),t(v,e({sx:{color:"text.primary",fontSize:12}},{children:V}))]})),r(f,e({direction:"row",alignItems:"center",spacing:.5},{children:[t(E,{score:P}),t(l,{sx:{color:"text.secondary"}})]}))]}))]})}))]}))}))}export{C as BoundaryReviewActionEnum,w as createBoundaryCardOptions,I as default,R as isBoundaryReviewAction};
|
|
2
2
|
//# sourceMappingURL=BoundaryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as n}from"tslib";import{jsx as
|
|
1
|
+
import{__assign as n}from"tslib";import{jsx as e}from"react/jsx-runtime";import{useState as t,useRef as i,useLayoutEffect as o}from"react";import r from"@mui/material/Box";import l from"@mui/material/Popper";function a(a){var u,m,c=a.anchorRef,d=a.anchorElement,s=a.children,f=a.className,p=a.offset,v=void 0===p?{}:p,x=a.placement,h=void 0===x?"bottom-start":x,b=a.width,w=a.maxWidth;a.customStyles;var g=t(null),y=g[0],z=g[1],W=t(!0),A=W[0],E=W[1],F=t(null),B=F[0],O=F[1],R=i(null);return o(function(){var n,e=null!==(n=null!=d?d:null==c?void 0:c.current)&&void 0!==n?n:null;z(function(n){return n===e?n:e})},[d,c]),o(function(){if(y){var n=null,e=function(){E(y.isConnected&&"hidden"!==y.style.visibility),O(Math.max(0,window.innerWidth-y.getBoundingClientRect().left-8)),null!=n&&cancelAnimationFrame(n),n=requestAnimationFrame(function(){var e;n=null,null===(e=R.current)||void 0===e||e.update()})},t=new MutationObserver(e);return t.observe(y,{attributes:!0,attributeFilter:["style","class"]}),window.addEventListener("resize",e),e(),function(){t.disconnect(),window.removeEventListener("resize",e),null!=n&&cancelAnimationFrame(n)}}E(!1)},[y]),e(l,n({open:Boolean(y)&&A,anchorEl:y,popperRef:R,placement:h,className:f,popperOptions:{strategy:"fixed"},modifiers:[{name:"offset",options:{offset:[null!==(u=v.left)&&void 0!==u?u:0,null!==(m=v.top)&&void 0!==m?m:0]}},{name:"flip",enabled:!1},{name:"preventOverflow",options:{mainAxis:!1,altAxis:!0,tether:!1}}],sx:{zIndex:function(n){return n.zIndex.tooltip},width:b,maxWidth:null==B?w:"min(".concat("number"==typeof w?"".concat(w,"px"):null!=w?w:"100vw",", ").concat(B,"px)"),minWidth:0,boxSizing:"border-box"}},{children:e(r,n({sx:{width:"100%",maxWidth:"100%",minWidth:0,maxHeight:"calc(85vh - 10px)",overflowY:"auto",pointerEvents:"auto",boxSizing:"border-box"}},{children:s}))}))}export{a as default};
|
|
2
2
|
//# sourceMappingURL=CardWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as i,__spreadArray as o}from"tslib";import{jsx as r,jsxs as e}from"react/jsx-runtime";import t from"@mui/icons-material/ChevronLeft";import
|
|
1
|
+
import{__assign as i,__spreadArray as o}from"tslib";import{jsx as r,jsxs as e}from"react/jsx-runtime";import t from"@mui/icons-material/ChevronLeft";import a from"@mui/icons-material/Close";import n from"@mui/material/Box";import l from"@mui/material/Divider";import m from"@mui/material/IconButton";import s from"@mui/material/Paper";import d from"@mui/material/Stack";import c from"@mui/material/Typography";import u from"../CitationRenderer/MarkdownRenderer.js";import p from"./CognitiveIcon.js";import h from"./CognitiveScoreBadge.js";var v=function(i,r){return o([i],Array.isArray(r)?r:null==r?[]:[r],!0)};function x(o){var x,f,g=o.reason,y=o.gap,b=o.score,C=o.headerName,w=void 0===C?"Cognitive Integrity":C,k=o.onBack,S=o.onClose,z=o.showCloseButton,W=void 0===z||z,R=o.width,B=void 0===R?260:R,I=o.maxWidth,j=void 0===I?260:I,A=o.className,M=o.styles,N=null!==(x=null==g?void 0:g.trim())&&void 0!==x?x:"",T=null!==(f=null==y?void 0:y.trim())&&void 0!==f?f:"";if(!N&&!T)return null;var D,H=(D=null==M?void 0:M.markdown,i(i({},D),{containerWrapper:i({display:"block",height:"auto"},null==D?void 0:D.containerWrapper),mainCard:i({height:"auto",padding:0,border:"none",borderRadius:0,boxShadow:"none",backgroundColor:"transparent"},null==D?void 0:D.mainCard),scrollArea:i({height:"auto",overflowY:"visible",paddingRight:0,color:"#475467",fontSize:11.5,lineHeight:1.3},null==D?void 0:D.scrollArea)}));return r(s,i({className:A,elevation:4,sx:v({width:B,maxWidth:j,borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==M?void 0:M.root)},{children:e(d,i({spacing:.75,sx:{p:1}},{children:[e(d,i({direction:"row",alignItems:"center",spacing:.75,sx:null==M?void 0:M.header},{children:[k&&r(m,i({size:"small",onClick:k,"aria-label":"Return to review check",sx:{p:0,color:"#6941C6"}},{children:r(t,{sx:{fontSize:17}})})),r(p,{sx:{color:"#6941C6"}}),r(c,i({sx:{flex:1,fontSize:12,fontWeight:500,alignItems:"center",display:"flex",lineHeight:1.25,textTransform:"capitalise"}},{children:w})),r(h,{score:b}),W&&r(m,i({size:"small",onClick:S,disabled:!S,"aria-label":"Close cognitive integrity",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:r(a,{sx:{fontSize:17}})}))]})),e(d,i({spacing:.75,sx:null==M?void 0:M.content},{children:[N&&e(n,i({sx:{marginTop:4}},{children:[r(c,i({sx:{mt:1,mb:.25,color:"text.primary",fontSize:12,fontWeight:500}},{children:"Decision Making Factors"})),r(l,{sx:{my:.625}}),r(u,{value:"<summary>".concat(N,"</summary>"),styles:H})]})),N&&T&&r(l,{}),T&&e(n,i({sx:null==M?void 0:M.section},{children:[r(c,i({sx:{mb:.25,color:"text.primary",fontSize:12,fontWeight:600}},{children:"Gap"})),r(l,{sx:{my:.625}}),r(u,{value:"<summary>".concat(T,"</summary>"),styles:H})]}))]}))]}))}))}export{x as default};
|
|
2
2
|
//# sourceMappingURL=CognitiveIntegrity.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__spreadArray as o}from"tslib";import{jsx as i,jsxs as
|
|
1
|
+
import{__assign as e,__spreadArray as o}from"tslib";import{jsx as i,jsxs as t,Fragment as r}from"react/jsx-runtime";import{useMemo as n,useState as l}from"react";import a from"@mui/icons-material/ChevronRight";import d from"@mui/icons-material/Close";import c from"@mui/material/Box";import s from"@mui/material/Button";import u from"@mui/material/ButtonBase";import m from"@mui/material/Divider";import f from"@mui/material/IconButton";import p from"@mui/material/Paper";import h from"@mui/material/Radio";import b from"@mui/material/Stack";import v from"@mui/material/TextField";import x from"@mui/material/Typography";import g from"./CognitiveIcon.js";import C from"./CognitiveScoreBadge.js";import y from"../../assests/icons/InfoAlert.js";var E,S=function(e,i){return o([e],Array.isArray(i)?i:null==i?[]:[i],!0)};!function(e){e.KEEP_LABEL="KEEP_LABEL",e.SET_CUSTOM_LABEL="SET_CUSTOM_LABEL",e.SET_TYPE="SET_TYPE"}(E||(E={}));var L=function(e){return e.user_actions.map(function(o){switch(o){case"KEEP_LABEL":return{id:o,title:"Keep as is",description:e.current_label?'Label stays "'.concat(e.current_label,'"'):"Keep the current document label"};case"SET_CUSTOM_LABEL":case"SET_TYPE":return{id:o,title:"Enter a custom label",description:"Create your own document label",requiresInput:!0,inputPlaceholder:e.current_label?"e.g. ".concat(e.current_label):"Enter a document label"}}})},w=function(e){return Object.values(E).includes(e)};function T(o){var E,T=o.headerName,_=void 0===T?"Title Check":T,A=o.title,I=o.pageNo,B=o.content,k=void 0===B?"We're not fully confident about this label. Confirm it, choose a different type, or add a new one.":B,z=o.cognitiveScore,P=o.config,F=o.metadata,W=o.selectedIndex,j=o.defaultSelectedIndex,M=void 0===j?null:j,D=o.onSelectionChange,K=o.customLabel,R=o.defaultCustomLabel,N=o.onCustomLabelChange,O=o.onConfirm,q=o.onActionConfirm,H=o.onCognitiveClick;o.onAdjustManually;var U=o.onClose,Y=o.confirmLabel,G=void 0===Y?"Confirm":Y,J=o.customInputAriaLabel,Q=void 0===J?"Custom document label":J;o.manualPrompt,o.manualActionLabel;var V=o.cognitiveLabel,X=void 0===V?"Cognitive Integrity":V;o.showAdjustManually;var Z=o.showCognitiveIntegrity,$=void 0===Z||Z,ee=o.showCloseButton,oe=void 0===ee||ee,ie=o.confirmDisabled,te=void 0!==ie&&ie,re=o.width,ne=void 0===re?260:re,le=o.maxWidth,ae=void 0===le?260:le,de=o.className,ce=o.styles,se=n(function(){return null!=P?P:F?L(F):[]},[P,F]),ue=l(M),me=ue[0],fe=ue[1],pe=l(null!==(E=null!=R?R:null==F?void 0:F.custom_label)&&void 0!==E?E:""),he=pe[0],be=pe[1],ve=void 0===W?me:W,xe=void 0===K?he:K,ge=null==ve?void 0:se[ve],Ce=Boolean(null==ge?void 0:ge.requiresInput),ye=te||!O&&!q||!ge||!0===ge.disabled||Ce&&0===xe.trim().length,Ee=function(){if(!ye&&null!=ve&&ge){var e=Ce?xe.trim():void 0;null==O||O(ve,ge,e),q&&w(ge.id)&&q(ge.id,{selectedIndex:ve,option:ge,customLabel:e,metadata:F})}};return i(p,e({className:de,elevation:4,sx:S({width:ne,maxWidth:ae,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==ce?void 0:ce.root)},{children:t(b,e({spacing:.75,sx:{p:1}},{children:[t(b,e({direction:"row",alignItems:"center",spacing:.75,sx:null==ce?void 0:ce.header},{children:[i(y,{color:"error",height:16,width:16}),i(x,e({sx:{flex:1,color:"error.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase"}},{children:_})),oe&&i(f,e({size:"small",onClick:U,disabled:!U,"aria-label":"Close label check",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i(d,{sx:{fontSize:17}})}))]})),t(c,{children:[i(x,e({sx:{color:"text.primary",fontSize:14,fontWeight:500}},{children:A})),null!=I&&i(x,e({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:I})),i(m,{sx:{my:.625}}),null!=k&&i(x,e({component:"div",sx:{color:"text.secondary",fontSize:11.5,lineHeight:1.3}},{children:k}))]}),t(b,e({spacing:.625,role:"radiogroup","aria-label":"Label options"},{children:[se.map(function(o,r){var n=ve===r;return t(p,e({variant:"outlined",sx:S({borderColor:n?"#1976d2":"divider",borderRadius:2,overflow:"hidden"},null==ce?void 0:ce.option)},{children:[t(u,e({role:"radio","aria-checked":n,disabled:o.disabled,onClick:function(){return function(e,o){o.disabled||(void 0===W&&fe(e),null==D||D(e,o))}(r,o)},sx:{width:"100%",justifyContent:"flex-start",px:.75,py:.5,textAlign:"left"}},{children:[i(h,{checked:n,disabled:o.disabled,tabIndex:-1,size:"small",sx:{p:.25,mr:.5}}),t(c,e({sx:{minWidth:0}},{children:[i(x,e({sx:{color:"text.primary",fontSize:12.5,fontWeight:500}},{children:o.title})),null!=o.description&&i(x,e({sx:{mt:.125,color:"text.secondary",fontSize:11}},{children:o.description}))]}))]})),n&&o.requiresInput&&i(c,e({sx:{px:1.75,pb:1.5,pl:5.75}},{children:i(v,{autoFocus:!0,fullWidth:!0,size:"small",value:xe,placeholder:o.inputPlaceholder,inputProps:{"aria-label":Q},onChange:function(e){return o=e.target.value,void 0===K&&be(o),void(null==N||N(o));var o},onKeyDown:function(e){"Enter"===e.key&&Ee()},sx:null==ce?void 0:ce.customInput})}))]}),o.id)}),i(s,e({variant:"contained",fullWidth:!0,disabled:ye,onClick:Ee,sx:S({minHeight:32,mt:.25,borderRadius:2,fontSize:13,fontWeight:600,textTransform:"none",backgroundColor:"#5925DC","&:hover":{backgroundColor:"#4A1FB8"},"&.Mui-disabled":{backgroundColor:"#D9D6FE",color:"#FFFFFF"}},null==ce?void 0:ce.confirmButton)},{children:G}))]})),i(b,e({spacing:.625,sx:null==ce?void 0:ce.footer},{children:$&&t(r,{children:[i(m,{}),t(u,e({onClick:H,disabled:!H,sx:{justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:H?"pointer":"not-allowed"}},{children:[t(b,e({direction:"row",alignItems:"center",spacing:1},{children:[i(g,{sx:{color:"text.secondary"}}),i(x,e({sx:{color:"text.primary",fontSize:12}},{children:X}))]})),t(b,e({direction:"row",alignItems:"center",spacing:.75},{children:[i(C,{score:z}),i(a,{sx:{color:"text.secondary",fontSize:18}})]}))]}))]})}))]}))}))}export{E as LabelReviewActionEnum,L as createLabelCheckOptions,T as default,w as isLabelReviewAction};
|
|
2
2
|
//# sourceMappingURL=LabelCheck.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e,__spreadArray as r}from"tslib";import{jsx as i,jsxs as o,Fragment as t}from"react/jsx-runtime";import n from"@mui/icons-material/ChevronRight";import a from"@mui/icons-material/Close";import l from"@mui/material/Box";import d from"@mui/material/ButtonBase";import m from"@mui/material/Divider";import s from"@mui/material/IconButton";import c from"@mui/material/Paper";import p from"@mui/material/Stack";import h from"@mui/material/Typography";import x from"../../assests/icons/InfoAlert.js";import f from"./CognitiveIcon.js";import u from"./CognitiveScoreBadge.js";import{BoundaryReviewActionEnum as v}from"./BoundaryCard.js";import{LabelReviewActionEnum as g}from"./LabelCheck.js";var y,w=((y={})[v.KEEP]="Boundary Approved",y[v.SPLIT_HERE]="Split Approved",y[v.MERGE_NEXT]="Merge Approved",y[v.MERGE_PREVIOUS]="Merge Approved",y[v.SET_RANGE]="Split Approved",y[g.KEEP_LABEL]="Label Approved",y[g.SET_CUSTOM_LABEL]="Label Change Approved",y[g.SET_TYPE]="Label Change Approved",y),S=function(e){return e&&e in w?w[e]:"Reviewed"},b=function(e,i){return r([e],Array.isArray(i)?i:null==i?[]:[i],!0)};function C(r){var v=r.headerName,g=r.action,y=r.title,w=r.pageNo,C=r.summary,E=r.cognitiveScore,A=r.onCognitiveClick,W=r.onClose,B=r.cognitiveLabel,I=void 0===B?"Cognitive Integrity":B,L=r.showCognitiveIntegrity,T=void 0===L||L,z=r.showCloseButton,R=void 0===z||z,k=r.width,_=void 0===k?260:k,j=r.maxWidth,M=void 0===j?260:j,N=r.className,P=r.styles,G=null!=v?v:S(g);return i(c,e({className:N,elevation:4,sx:b({width:_,maxWidth:"min(".concat(M,"number"==typeof M?"px, 100%)":", 100%)"),minWidth:0,flexShrink:1,borderTop:"4px solid",borderColor:"error.main",borderRadius:2,bgcolor:"background.paper",overflow:"hidden",boxSizing:"border-box","@media (max-width: 372px)":{width:"calc(100vw - 32px)"}},null==P?void 0:P.root)},{children:o(p,e({spacing:.75,sx:{p:1}},{children:[o(p,e({direction:"row",alignItems:"center",spacing:.75,sx:b({minWidth:0},null==P?void 0:P.header)},{children:[i(x,{color:"success",height:16,width:16}),i(h,e({sx:{flex:1,minWidth:0,color:"success.main",fontSize:12,fontWeight:500,lineHeight:1.25,textTransform:"uppercase",overflowWrap:"anywhere"}},{children:G})),R&&i(s,e({size:"small",onClick:W,disabled:!W,"aria-label":"Close reviewed card",sx:{p:0,"&.Mui-disabled":{color:"text.secondary"}}},{children:i(a,{sx:{fontSize:17}})}))]})),o(l,{children:[i(h,e({sx:{color:"text.primary",fontSize:14,fontWeight:500,overflowWrap:"anywhere"}},{children:y})),null!=w&&i(h,e({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:w})),i(m,{sx:{my:.625}})]}),i(p,{sx:null==P?void 0:P.content}),i(l,{children:C&&o(t,{children:[i(h,e({sx:{color:"text.primary",fontSize:12,fontWeight:500}},{children:"Summary"})),i(h,e({sx:{mt:.125,color:"text.secondary",fontSize:12}},{children:C}))]})}),T&&o(p,e({spacing:.625,sx:null==P?void 0:P.footer},{children:[i(m,{}),o(d,e({onClick:A,disabled:!A,sx:{width:"100%",minWidth:0,justifyContent:"space-between",borderRadius:1,textAlign:"left",cursor:A?"pointer":"not-allowed"}},{children:[o(p,e({direction:"row",alignItems:"center",spacing:1,sx:{minWidth:0,flex:1}},{children:[i(f,{sx:{color:"text.secondary"}}),i(h,e({sx:{minWidth:0,color:"text.primary",fontSize:12,overflowWrap:"anywhere"}},{children:I}))]})),o(p,e({direction:"row",alignItems:"center",spacing:.5,sx:{flexShrink:0}},{children:[i(u,{score:E}),i(n,{sx:{color:"text.secondary"}})]}))]}))]}))]}))}))}export{C as default,S as getReviewedCardHeader};
|
|
2
|
+
//# sourceMappingURL=ReviewedCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewedCard.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__spreadArray as e,__awaiter as n,__generator as t,__assign as r}from"tslib";import{jsxs as i,jsx as o}from"react/jsx-runtime";import{useMemo as a,useState as l,useRef as u,useCallback as d,useEffect as c}from"react";import s from"../PdfViewer/PdfViewer.js";import v from"./BoundaryCard.js";import g from"./CardWrapper.js";import f from"./CognitiveIntegrity.js";import p from"./LabelCheck.js";import{extractSegmentReviewData as w}from"./reviewStepAdapters.js";var m=function(e){return{reviewId:e.review.id,segment:e.review.segment,pageNumber:e.pageNumber}},b=function(e){switch(null==e?void 0:e.trim().toLowerCase()){case"low":return{border:"#FECACA",cardBorder:"#B91C1C",background:"#FEF2F2",text:"#B91C1C",divider:"#FCA5A5"};case"medium":return{border:"#d9cda2",cardBorder:"#997800",background:"#fff1bf",text:"#997800",divider:"#e6b400"};case"high":return{border:"#16A34A",cardBorder:"#4F9E6C",background:"#F0FDF4",text:"#4F9E6C",divider:"#00A43C"};default:return{border:"#E5E7EB",cardBorder:"#374151",background:"#F9FAFB",text:"#374151",divider:"#D1D5DB"}}};function h(h){var y,C,x=this,F=h.pdfUrl,N=h.pdfName,k=h.segments,A=h.pdfViewerProps,E=h.showBadges,S=void 0===E||E,_=h.sortByConfidence,B=void 0===_?"low":_,I=h.filterByConfidence,M=void 0===I?"all":I,P=h.showBadgeNavigation,R=void 0===P||P,L=h.autoSelectReviewOnPageChange,j=void 0!==L&&L,z=h.autoAdvanceAfterConfirm,q=void 0===z||z,D=h.badgePreloadPages,T=void 0===D?8:D,W=h.badgeOffsetTop,O=void 0===W?20:W,H=h.badgeOffsetRight,V=void 0===H?8:H,G=h.initialReviewId,U=h.onBoundaryAction,X=h.onLabelAction,J=h.onActiveReviewChange,K=h.onCurrentPageChange,Q=h.onActionError,Y=h.onAdjustManually,Z=h.onCognitiveClick,$=h.className,ee=h.style,ne=h.viewerStyle,te=h.railStyle,re=h.redirectionData,ie=a(function(){return w(k)},[k]),oe=ie.boundaryReviews,ae=ie.labelReviews,le=a(function(){return new Map(k.map(function(e,n){return[e.stable_key,n+1]}))},[k]),ue=a(function(){return e(e([],oe.map(function(e){var n;return{kind:"boundary",pageNumber:null!==(n=e.metadata.focus_page)&&void 0!==n?n:e.segment.start_page,review:e}}),!0),ae.map(function(e){return{kind:"label",pageNumber:e.segment.start_page,review:e}}),!0).sort(function(e,n){var t,r,i=null!==(t=le.get(e.review.segment.stable_key))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(r=le.get(n.review.segment.stable_key))&&void 0!==r?r:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||i-o||("label"===e.kind?0:1)-("label"===n.kind?0:1)||e.review.id.localeCompare(n.review.id)})},[oe,ae,le]),de=a(function(){return k.map(function(e){return{title:e.label||e.title,start_page:e.start_page,end_page:e.end_page,page_count:e.end_page-e.start_page+1}})},[k]),ce=l(1),se=ce[0],ve=ce[1],ge=l(null!=G?G:null),fe=ge[0],pe=ge[1],we=l(null!=G?G:null),me=we[0],be=we[1],he=l(!1),ye=he[0],Ce=he[1],xe=l(null),Fe=xe[0],Ne=xe[1],ke=l(null),Ae=ke[0],Ee=ke[1],Se=l(function(){return new Set}),_e=Se[0],Be=Se[1],Ie=l(null),Me=Ie[0],Pe=Ie[1],Re=u(0),Le=u(null),je=u(new Map),ze=u(null),qe=u(null),De=a(function(){var e=new Set(_e);return ue.forEach(function(n){null!=n.review.step.review&&e.add(n.review.id)}),e},[_e,ue]),Te=a(function(){return ue.filter(function(e){return!De.has(e.review.id)}).filter(function(e){var n;return"all"===M||(null===(n=e.review.step.confidence)||void 0===n?void 0:n.trim().toLowerCase())===M})},[M,De,ue]),We=a(function(){var e;return null!==(e=ue.find(function(e){return e.review.id===fe}))&&void 0!==e?e:null},[fe,ue]),Oe=b(null==We?void 0:We.review.step.confidence),He=Boolean((null===(y=null==We?void 0:We.review.step.reason)||void 0===y?void 0:y.trim())||(null===(C=null==We?void 0:We.review.step.gap)||void 0===C?void 0:C.trim())),Ve=d(function(e,n){Re.current+=1,Le.current={requestId:Re.current,pageNumber:e,reviewId:n},Ee({pageNumber:e,requestId:Re.current})},[]),Ge=d(function(e){pe(e.review.id),be(e.review.id),Ce(!1),Ne(null),Ve(e.pageNumber,e.review.id),null==J||J(e.review.id)},[J,Ve]);c(function(){if((null==re?void 0:re.pageNumber)&&re.type){var e=Number(re.pageNumber);if(Number.isInteger(e)&&!(e<1)){var n=Te.find(function(n){return n.review.segment.start_page===e&&n.kind===re.type});n&&Ge(n)}}},[re,Ge,Te]);var Ue=d(function(){Le.current=null,Ce(!1),pe(null),Ne(null),null==J||J(null)},[J]),Xe=d(function(e){var n;if(q){var t=ue.findIndex(function(n){return n.review.id===e}),r=new Set(Te.map(function(e){return e.review.id})),i=null!==(n=ue.find(function(n,i){return i>t&&n.review.id!==e&&r.has(n.review.id)}))&&void 0!==n?n:Te.find(function(n){return n.review.id!==e});i?requestAnimationFrame(function(){return Ge(i)}):Ue()}else Ue()},[q,Ue,ue,Ge,Te]),Je=d(function(e,r,i){return n(x,void 0,void 0,function(){var n,o;return t(this,function(t){switch(t.label){case 0:n=m(e),Pe(e.review.id),t.label=1;case 1:return t.trys.push([1,6,7,8]),"boundary"!==e.kind?[3,3]:[4,null==U?void 0:U(r,i,n)];case 2:return t.sent(),[3,5];case 3:return[4,null==X?void 0:X(r,i,n)];case 4:t.sent(),t.label=5;case 5:return Be(function(n){var t=new Set(n);return t.add(e.review.id),t}),Xe(e.review.id),[3,8];case 6:return o=t.sent(),null==Q||Q(o,n),[3,8];case 7:return Pe(null),[7];case 8:return[2]}})})},[Q,U,X,Xe]);c(function(){fe&&!ue.some(function(e){return e.review.id===fe})&&Ue()},[fe,Ue,ue]),c(function(){if(j){var e=Te.find(function(e){return e.pageNumber===se});e&&e.review.id!==fe&&Ge(e)}},[fe,j,se,Ge,Te]),c(function(){fe&&!Te.some(function(e){return e.review.id===fe})&&Ue()},[fe,Ue,Te]);var Ke=a(function(){if("all"===M)return Te;var n=["low","medium","high"].filter(function(e){return e!==B}),t=e([B],n,!0),r=new Map(t.map(function(e,n){return[e,n]}));return Te.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var i,o,a,l,u=null===(i=e.item.review.step.confidence)||void 0===i?void 0:i.trim().toLowerCase(),d=null===(o=n.item.review.step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==u?t.length:null!==(a=r.get(u))&&void 0!==a?a:t.length)-(null==d?t.length:null!==(l=r.get(d))&&void 0!==l?l:t.length)||e.index-n.index}).map(function(e){return e.item})},[M,B,Te]),Qe=Ke.findIndex(function(e){return e.review.id===me}),Ye=l(null),Ze=Ye[0],$e=Ye[1],en=u(!1),nn=d(function(e){var n=Ke[e];n&&Ge(n)},[Ke,Ge]);c(function(){me&&!Ke.some(function(e){return e.review.id===me})&&be(null)},[Ke,me]),c(function(){en.current=!1,$e(Qe>=0?String(Qe+1):null)},[Qe,Ke.length]),c(function(){if(en.current&&null!=Ze){var e=window.setTimeout(function(){var e=Number(Ze.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<Ke.length&&(en.current=!1,nn(n))},300);return function(){return window.clearTimeout(e)}}},[nn,Ze,Ke.length]);var tn=a(function(){var e=new Set(ae.map(function(e){return e.segment.stable_key}));return new Map(ue.map(function(n){var t,r=n.review.segment.stable_key,i=null!==(t=le.get(r))&&void 0!==t?t:1,o="label"!==n.kind&&e.has(r)?"B":"A";return[n.review.id,"".concat(i).concat(o)]}))},[ae,ue,le]),rn=a(function(){var e=new Map;Te.forEach(function(n){var t,r=null!==(t=e.get(n.pageNumber))&&void 0!==t?t:[];r.push(n),e.set(n.pageNumber,r)});var n=new Map;return e.forEach(function(e){e.forEach(function(e,t){return n.set(e.review.id,t)})}),n},[Te]),on=d(function(e){return{startPage:Math.max(0,e.startPage-T),endPage:Math.min(e.numPages-1,e.endPage+T)}},[T]),an=d(function(){var e,n=ze.current,t=qe.current;if(n&&t){var r=n.getBoundingClientRect(),i=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==i?void 0:i.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();Te.forEach(function(e){var n,i=je.current.get(e.review.id);if(i){var a=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(a){var l=a.getBoundingClientRect(),u=null!==(n=rn.get(e.review.id))&&void 0!==n?n:0,d=l.top+O+40*u,c=d+(i.offsetHeight||32),s=d>=o.top&&c<=o.bottom;i.style.top="".concat(d-r.top,"px"),i.style.visibility=s?"visible":"hidden"}else i.style.visibility="hidden"}})}},[O,rn,Te]),ln=d(function(e){var n=Le.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Le.current=null,an(),requestAnimationFrame(function(){if(null==Le.current){var e=je.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&Ne(e)}}))},[an]);return c(function(){var e=qe.current;if(e&&S){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,an()}))};e.addEventListener("scroll",t,!0),window.addEventListener("resize",t);var r=new MutationObserver(t);r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]});var i="undefined"==typeof ResizeObserver?null:new ResizeObserver(t);return null==i||i.observe(e),t(),function(){null!=n&&cancelAnimationFrame(n),e.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t),r.disconnect(),null==i||i.disconnect()}}},[S,an]),i("div",r({ref:ze,className:$,style:r({display:"flex",alignItems:"stretch",gap:0,position:"relative",width:"100%",height:"100%",minWidth:0},ee)},{children:[o("div",r({ref:qe,style:r(r({},ne),{flex:S?"0 0 70%":"1 1 100%",width:S?"70%":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:o(s,r({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},A,{pdfUrl:F,pdfName:N,segments:de,navigationRequest:Ae,onNavigationSettled:ln,setRenderRange:on,onCurrentPageChange:function(e){ve(e),null==Le.current&&We&&We.pageNumber!==e&&Ue(),null==K||K(e)}}))})),S&&i("aside",r({"aria-label":"Page review badges",style:r(r({},te),{position:"relative",width:"30%",flex:"0 0 30%",minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[R&&Ke.length>0&&i("nav",r({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:V,zIndex:2,display:"flex",alignItems:"center",gap:7,width:128,minHeight:40,padding:"4px 6px",border:"1px solid #CBD5E1",borderRadius:6,backgroundColor:"#FFFFFF",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.06)",font:"inherit"}},{children:[o("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=Ze?Ze:"-","aria-label":"Review badge number",onChange:function(e){en.current=!0,$e(e.target.value)},style:{width:30,height:28,padding:0,border:"1px solid #A5B4FC",borderRadius:3,color:"#4F46E5",backgroundColor:"#FFFFFF",textAlign:"center",font:"inherit",fontSize:15,outline:"none"}}),i("span",r({"aria-label":"".concat(Ke.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",Ke.length]})),["previous","next"].map(function(e){var n="previous"===e,t=Qe+(n?-1:1),i=t<0||t>=Ke.length;return o("button",r({type:"button","aria-label":"".concat(n?"Previous":"Next"," review badge"),disabled:i,onClick:function(){return nn(t)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:i?"#C7D2FE":"#4F46E5",cursor:i?"default":"pointer"}},{children:o("svg",r({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:o("path",{d:n?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e)})]})),Te.map(function(e){var n,t,a=fe===e.review.id,l=null!==(n=tn.get(e.review.id))&&void 0!==n?n:"1A",u=b(e.review.step.confidence),d=null===(t=e.review.step.confidence)||void 0===t?void 0:t.trim().toLowerCase();return i("button",r({ref:function(n){n?je.current.set(e.review.id,n):je.current.delete(e.review.id)},type:"button","aria-pressed":a,title:"".concat(e.review.step.type," · Page ").concat(e.pageNumber),onClick:function(){return Ge(e)},style:{position:"absolute",top:0,left:0,visibility:"hidden",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:86,minHeight:29,padding:"2px 5px",border:"1px solid ".concat(u.border),borderRadius:16,backgroundColor:u.background,color:u.text,cursor:"pointer",font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:[o("span",r({style:{fontSize:13,fontWeight:600}},{children:l})),i("span",r({style:{display:"flex",alignItems:"center"}},{children:[o("svg",r({width:"2",height:"17",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:u.divider,strokeWidth:"0.8"})})),o("span",r({style:{fontSize:13,fontWeight:600,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:e.review.step.score?"".concat(e.review.step.score,"%"):"low"===d?"40%":"high"===d?"95%":"70%"}))]}))]}),e.review.id)})]})),We&&Fe&&i(g,r({anchorElement:Fe,placement:"bottom-start",offset:{top:8}},{children:[ye&&o(f,{score:We.review.step.score,reason:We.review.step.reason,gap:We.review.step.gap,onBack:function(){return Ce(!1)},onClose:Ue}),o("div",r({style:{display:ye?"none":"block"}},{children:"boundary"===We.kind?o(v,{title:We.review.segment.label||We.review.segment.title,pageNo:"Page ".concat(We.pageNumber),content:We.review.step.reason,cognitiveScore:We.review.step.score?"".concat(We.review.step.score,"%"):null,metadata:We.review.metadata,defaultStartPage:We.review.segment.start_page,defaultEndPage:We.review.segment.end_page,styles:{root:{borderColor:Oe.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Oe.text}}},confirmDisabled:Me===We.review.id,onActionConfirm:function(e,n){Je(We,e,n)},onAdjustManually:function(){return null==Y?void 0:Y(m(We))},onCognitiveClick:He?function(){Ce(!0),null==Z||Z(m(We))}:void 0,onClose:Ue},We.review.id):o(p,{title:We.review.metadata.current_label||We.review.segment.label||We.review.segment.title,pageNo:"Pages ".concat(We.review.segment.start_page,"-").concat(We.review.segment.end_page),content:We.review.step.reason,cognitiveScore:We.review.step.score,metadata:We.review.metadata,styles:{root:{borderColor:Oe.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Oe.text}}},confirmDisabled:Me===We.review.id,onActionConfirm:function(e,n){Je(We,e,n)},onAdjustManually:function(){return null==Y?void 0:Y(m(We))},onCognitiveClick:He?function(){Ce(!0),null==Z||Z(m(We))}:void 0,onClose:Ue},We.review.id)}))]}))]}))}export{h as default};
|
|
1
|
+
import{__spreadArray as e,__assign as n,__awaiter as t,__generator as r}from"tslib";import{jsxs as i,jsx as o,Fragment as l}from"react/jsx-runtime";import{useMemo as a,useRef as u,useState as d,useEffect as s,useCallback as c}from"react";import{SpecialZoomLevel as g}from"@react-pdf-viewer/core";import f from"../PdfViewer/PdfViewer.js";import v from"./BoundaryCard.js";import p from"./CardWrapper.js";import m from"./CognitiveIntegrity.js";import h from"./LabelCheck.js";import{extractSegmentReviewData as b}from"./reviewStepAdapters.js";import{CircleCheck as w}from"lucide-react";import{Typography as y}from"@mui/material";var x=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}},C=function(e){switch(null==e?void 0:e.trim().toLowerCase()){case"low":return{border:"#FECACA",cardBorder:"#B91C1C",background:"#FEF2F2",text:"#B91C1C",divider:"#FCA5A5"};case"medium":return{border:"#d9cda2",cardBorder:"#997800",background:"#fff1bf",text:"#997800",divider:"#e6b400"};case"high":return{border:"#16A34A",cardBorder:"#4F9E6C",background:"#F0FDF4",text:"#4F9E6C",divider:"#00A43C"};default:return{border:"#E5E7EB",cardBorder:"#374151",background:"#F9FAFB",text:"#374151",divider:"#D1D5DB"}}};function _(_){var F,k,N,A,E=this,S=_.pdfUrl,B=_.pdfName,I=_.segments,R=_.styles,M=_.pdfViewerProps,P=_.showBadges,L=void 0===P||P,z=_.sortByConfidence,W=void 0===z?"low":z,j=_.filterByConfidence,D=void 0===j?"all":j,q=_.showBadgeNavigation,O=void 0===q||q,T=_.autoSelectReviewOnPageChange,V=void 0!==T&&T,H=_.autoAdvanceAfterConfirm,G=void 0===H||H,U=_.badgePreloadPages,X=void 0===U?8:U,J=_.badgeOffsetTop,K=void 0===J?20:J,Q=_.badgeOffsetRight,Y=void 0===Q?8:Q,Z=_.initialReviewId,$=_.onBoundaryAction,ee=_.onLabelAction,ne=_.onActiveReviewChange,te=_.onCurrentPageChange,re=_.onActionError,ie=_.onAdjustManually,oe=_.onCognitiveClick,le=_.className,ae=_.style,ue=_.viewerStyle,de=_.railStyle,se=_.redirectionData,ce=a(function(){return b(I)},[I]),ge=ce.boundaryReviews,fe=ce.labelReviews,ve=a(function(){return new Map(I.map(function(e,n){return[e.stable_key,n+1]}))},[I]),pe=u(null),me=a(function(){return e(e([],ge.map(function(e){var t;return n(n({},e),{kind:"boundary",pageNumber:null!==(t=e.metadata.focus_page)&&void 0!==t?t:e.segment.start_page})}),!0),fe.map(function(e){return n(n({},e),{kind:"label",pageNumber:e.segment.start_page})}),!0).sort(function(e,n){var t,r,i=null!==(t=ve.get(e.segment.stable_key))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(r=ve.get(n.segment.stable_key))&&void 0!==r?r:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||i-o||("label"===e.kind?0:1)-("label"===n.kind?0:1)||e.id.localeCompare(n.id)})},[ge,fe,ve]),he=a(function(){return e([],I,!0)},[I]),be=d(1),we=be[0],ye=be[1],xe=d(null!=Z?Z:null),Ce=xe[0],_e=xe[1],Fe=d(null!=Z?Z:null),ke=Fe[0],Ne=Fe[1],Ae=d(!1),Ee=Ae[0],Se=Ae[1],Be=d(null),Ie=Be[0],Re=Be[1],Me=d(null),Pe=Me[0],Le=Me[1],ze=d(function(){return new Set}),We=ze[0],je=ze[1],De=d(null),qe=De[0],Oe=De[1],Te=u(0),Ve=u(null),He=u(new Map),Ge=u(null),Ue=u(null),Xe=d(260),Je=Xe[0],Ke=Xe[1];s(function(){var e=pe.current;if(e&&L){var n=function(){var n=e.getBoundingClientRect().width;n>0&&Ke(n)};n();var t="undefined"==typeof ResizeObserver?null:new ResizeObserver(n);return null==t||t.observe(e),function(){return null==t?void 0:t.disconnect()}}},[L]),a(function(){var e=new Set(We);return me.forEach(function(n){null!=n.review_step.review&&e.add(n.id)}),e},[We,me]);var Qe=a(function(){var e;return null!==(e=me.find(function(e){return e.id===Ce}))&&void 0!==e?e:null},[Ce,me]),Ye=C(null==Qe?void 0:Qe.review_step.confidence),Ze=Boolean((null===(F=null==Qe?void 0:Qe.review_step.reason)||void 0===F?void 0:F.trim())||(null===(k=null==Qe?void 0:Qe.review_step.gap)||void 0===k?void 0:k.trim())),$e=c(function(e,n){Te.current+=1,Ve.current={requestId:Te.current,pageNumber:e,reviewId:n},Le({pageNumber:e,requestId:Te.current})},[]),en=c(function(e){_e(e.id),Ne(e.id),Se(!1),Re(null),$e(e.pageNumber,e.id),null==ne||ne(e.id,e.segment)},[ne,$e]);s(function(){if((null==se?void 0:se.pageNumber)&&se.type){var e=Number(se.pageNumber);if(Number.isInteger(e)&&!(e<1)){var n=me.find(function(n){return n.segment.start_page===e&&n.kind===se.type});n&&en(n)}}},[se,en,me]);var nn=c(function(){Ve.current=null,Se(!1),_e(null),Re(null),null==ne||ne(null,null)},[ne]),tn=c(function(e){var n;if(G){var t=me.findIndex(function(n){return n.id===e}),r=new Set(me.map(function(e){return e.id})),i=null!==(n=me.find(function(n,i){return i>t&&n.id!==e&&r.has(n.id)}))&&void 0!==n?n:me.find(function(n){return n.id!==e});i?requestAnimationFrame(function(){return en(i)}):nn()}else nn()},[G,nn,me,en,me]),rn=c(function(e,n,i){return t(E,void 0,void 0,function(){var t,o;return r(this,function(r){switch(r.label){case 0:t=x(e),Oe(e.id),r.label=1;case 1:return r.trys.push([1,6,7,8]),"boundary"!==e.kind?[3,3]:[4,null==$?void 0:$(n,i,t)];case 2:return r.sent(),[3,5];case 3:return[4,null==ee?void 0:ee(n,i,t)];case 4:r.sent(),r.label=5;case 5:return je(function(n){var t=new Set(n);return t.add(e.id),t}),tn(e.id),[3,8];case 6:return o=r.sent(),null==re||re(o,t),[3,8];case 7:return Oe(null),[7];case 8:return[2]}})})},[re,$,ee,tn]);s(function(){Ce&&!me.some(function(e){return e.id===Ce})&&nn()},[Ce,nn,me]),s(function(){if(V){var e=me.find(function(e){return e.pageNumber===we});e&&e.id!==Ce&&en(e)}},[Ce,V,we,en,me]),s(function(){Ce&&!me.some(function(e){return e.id===Ce})&&nn()},[Ce,nn,me]);var on=a(function(){if("all"===D)return me;var n=["low","medium","high"].filter(function(e){return e!==W}),t=e([W],n,!0),r=new Map(t.map(function(e,n){return[e,n]}));return me.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var i,o,l,a,u=null===(i=e.item.review_step.confidence)||void 0===i?void 0:i.trim().toLowerCase(),d=null===(o=n.item.review_step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==u?t.length:null!==(l=r.get(u))&&void 0!==l?l:t.length)-(null==d?t.length:null!==(a=r.get(d))&&void 0!==a?a:t.length)||e.index-n.index}).map(function(e){return e.item})},[D,W,me]),ln=on.findIndex(function(e){return e.id===ke}),an=d(null),un=an[0],dn=an[1],sn=u(!1),cn=c(function(e){var n=on[e];n&&en(n)},[on,en]);s(function(){ke&&!on.some(function(e){return e.id===ke})&&Ne(null)},[on,ke]),s(function(){sn.current=!1,dn(ln>=0?String(ln+1):null)},[ln,on.length]),s(function(){if(sn.current&&null!=un){var e=window.setTimeout(function(){var e=Number(un.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<on.length&&(sn.current=!1,cn(n))},300);return function(){return window.clearTimeout(e)}}},[cn,un,on.length]);var gn=a(function(){var e=new Set(fe.map(function(e){return e.segment.stable_key}));return new Map(me.map(function(n){var t,r=n.segment.stable_key,i=null!==(t=ve.get(r))&&void 0!==t?t:1,o="label"!==n.kind&&e.has(r)?"B":"A";return[n.id,"".concat(i).concat(o)]}))},[fe,me,ve]),fn=a(function(){var e=new Map;me.forEach(function(n){var t,r=null!==(t=e.get(n.pageNumber))&&void 0!==t?t:[];r.push(n),e.set(n.pageNumber,r)});var n=new Map;return e.forEach(function(e){e.forEach(function(e,t){return n.set(e.id,t)})}),n},[me]),vn=c(function(e){return{startPage:Math.max(0,e.startPage-X),endPage:Math.min(e.numPages-1,e.endPage+X)}},[X]),pn=c(function(){var e,n=Ge.current,t=Ue.current;if(n&&t){var r=n.getBoundingClientRect(),i=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==i?void 0:i.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();me.forEach(function(e){var n,i=He.current.get(e.id);if(i){var l=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(l){var a=l.getBoundingClientRect(),u=null!==(n=fn.get(e.id))&&void 0!==n?n:0,d=a.top+K+40*u,s=d+(i.offsetHeight||32),c=d>=o.top&&s<=o.bottom;i.style.top="".concat(d-r.top,"px"),i.style.visibility=c?"visible":"hidden"}else i.style.visibility="hidden"}})}},[K,fn,me]),mn=c(function(e){var n=Ve.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Ve.current=null,pn(),requestAnimationFrame(function(){if(null==Ve.current){var e=He.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&Re(e)}}))},[pn]);return s(function(){var e=Ue.current;if(e&&L){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,pn()}))};e.addEventListener("scroll",t,!0),window.addEventListener("resize",t);var r=new MutationObserver(t);r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]});var i="undefined"==typeof ResizeObserver?null:new ResizeObserver(t);return null==i||i.observe(e),t(),function(){null!=n&&cancelAnimationFrame(n),e.removeEventListener("scroll",t,!0),window.removeEventListener("resize",t),r.disconnect(),null==i||i.disconnect()}}},[L,pn]),i("div",n({ref:Ge,className:le,style:n({display:"flex",alignItems:"stretch",gap:0,position:"relative",width:"100%",height:"100%",minWidth:0},ae)},{children:[o("div",n({ref:Ue,style:n(n({},ue),{flex:L?"0 0 60%":"1 1 100%",width:L?null!==(N=null==R?void 0:R.container.width)&&void 0!==N?N:"60%":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:o(f,n({defaultScale:g.PageFit,highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},M,{pdfUrl:S,pdfName:B,segments:he,navigationRequest:Pe,onNavigationSettled:mn,setRenderRange:vn,onCurrentPageChange:function(e){ye(e),null==Ve.current&&Qe&&Qe.pageNumber!==e&&nn(),null==te||te(e)}}))})),L&&i("aside",n({"aria-label":"Page review badges",ref:pe,style:n(n({},de),{position:"relative",width:L?null!==(A=null==R?void 0:R.aside.width)&&void 0!==A?A:"40%":0,flex:"0 0 40%",minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[O&&on.length>0&&i("nav",n({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:Y,zIndex:2,display:"flex",alignItems:"center",gap:7,width:128,minHeight:40,padding:"4px 6px",border:"1px solid #CBD5E1",borderRadius:6,backgroundColor:"#FFFFFF",boxSizing:"border-box",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.06)",font:"inherit"}},{children:[o("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=un?un:"-","aria-label":"Review badge number",onChange:function(e){sn.current=!0,dn(e.target.value)},style:{width:30,height:28,padding:0,border:"1px solid #A5B4FC",borderRadius:3,color:"#4F46E5",backgroundColor:"#FFFFFF",textAlign:"center",font:"inherit",fontSize:15,outline:"none"}}),i("span",n({"aria-label":"".concat(on.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",on.length]})),["previous","next"].map(function(e){var t="previous"===e,r=ln+(t?-1:1),i=r<0||r>=on.length;return o("button",n({type:"button","aria-label":"".concat(t?"Previous":"Next"," review badge"),disabled:i,onClick:function(){return cn(r)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:i?"#C7D2FE":"#4F46E5",cursor:i?"default":"pointer"}},{children:o("svg",n({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:o("path",{d:t?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e)})]})),me.map(function(e){var t,r,l=Ce===e.id,a=null!==(t=gn.get(e.id))&&void 0!==t?t:"1A",u=e.review_step.score,d="number"==typeof u?"".concat(u,"%"):null,s=C(e.review_step.confidence),c=e.review_step.review&&null!==e.review_step.review.action,g=null===(r=e.review_step.confidence)||void 0===r?void 0:r.trim().toLowerCase();return o("button",n({ref:function(n){n?He.current.set(e.id,n):He.current.delete(e.id)},disabled:!!c,type:"button","aria-pressed":l,title:"".concat(e.review_step.type," · Page ").concat(e.pageNumber),onClick:function(){return en(e)},style:{position:"absolute",top:0,left:0,visibility:"hidden",cursor:c?"not-allowed":"pointer",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:c?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(c?"#E2E8F0":s.border),borderRadius:16,backgroundColor:c?"#F8FAFC":s.background,color:c?"#475569":s.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:i(y,n({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},c?{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:a})),i("span",n({style:{display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:null!==d?d:"low"===g?"40%":"high"===g?"95%":"70%"}))]})),i("span",n({style:{fontSize:11,fontWeight:500,display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),o("span",n({style:{display:"flex",marginLeft:"7px",alignItems:"center"}},{children:o(w,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]}:{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:a})),i("span",n({style:{display:"flex",alignItems:"center"}},{children:[o("svg",n({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:o("path",{d:"M0.399902 0V14",stroke:s.divider,strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:null!==d?d:"low"===g?"40%":"high"===g?"95%":"70%"}))]}))]}))}),e.id)})]})),Qe&&Ie&&i(p,n({anchorElement:Ie,placement:"bottom-start",offset:{top:8},width:Je,maxWidth:240},{children:[Ee&&o(m,{width:"100%",maxWidth:"100%",score:Qe.review_step.score,reason:Qe.review_step.reason,gap:Qe.review_step.gap,onBack:function(){return Se(!1)},onClose:nn}),o("div",n({style:{display:Ee?"none":"block"}},{children:Qe.review_step.review&&Qe.review_step.human_resolution?o(l,{}):"boundary"===Qe.kind?o(v,{width:"100%",maxWidth:"100%",title:Qe.segment.label||Qe.segment.title,pageNo:"Page ".concat(Qe.pageNumber),content:Qe.review_step.reason,cognitiveScore:Qe.review_step.score,metadata:Qe.metadata,defaultStartPage:Qe.segment.start_page,defaultEndPage:Qe.segment.end_page,styles:{root:{borderColor:Ye.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Ye.text}}},confirmDisabled:qe===Qe.id,onActionConfirm:function(e,n){rn(Qe,e,n)},onAdjustManually:function(){return null==ie?void 0:ie(x(Qe))},onCognitiveClick:Ze?function(){Se(!0),null==oe||oe(x(Qe))}:void 0,onClose:nn},Qe.id):o(h,{width:"100%",maxWidth:"100%",title:Qe.metadata.current_label||Qe.segment.label||Qe.segment.title,pageNo:"Pages ".concat(Qe.segment.start_page,"-").concat(Qe.segment.end_page),content:Qe.review_step.reason,cognitiveScore:Qe.review_step.score,metadata:Qe.metadata,styles:{root:{borderColor:Ye.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Ye.text}}},confirmDisabled:qe===Qe.id,onActionConfirm:function(e,n){rn(Qe,e,n)},onAdjustManually:function(){return null==ie?void 0:ie(x(Qe))},onCognitiveClick:Ze?function(){Se(!0),null==oe||oe(x(Qe))}:void 0,onClose:nn},Qe.id)}))]}))]}))}export{_ as default};
|
|
2
2
|
//# sourceMappingURL=SegmentReviewPdfWrapper.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{isBoundaryReviewAction as e}from"./BoundaryCard.js";import{isLabelReviewAction as r}from"./LabelCheck.js";var t=function(e){return"object"==typeof e&&null!==e?e:{}},a=function(e){return"string"==typeof e?e:null},n=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},o=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},u=function(e){var n=t(e);return{current_label:a(n.current_label),custom_label:a(n.custom_label),group_id:a(n.group_id),user_actions:o(n.user_actions).filter(r)}},i=function(r){var a=[],i=[];return r.forEach(function(r){r.review_steps.forEach(function(l,c){var s,f,b,
|
|
1
|
+
import{isBoundaryReviewAction as e}from"./BoundaryCard.js";import{isLabelReviewAction as r}from"./LabelCheck.js";var t=function(e){return"object"==typeof e&&null!==e?e:{}},a=function(e){return"string"==typeof e?e:null},n=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},o=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},u=function(e){var n=t(e);return{current_label:a(n.current_label),custom_label:a(n.custom_label),group_id:a(n.group_id),user_actions:o(n.user_actions).filter(r)}},i=function(r){var a=[],i=[];return r.forEach(function(r){r.review_steps.forEach(function(l,c){var s,f,b,_=(f=l.type,"page_boundary"===(b=f.trim().toLowerCase())||"page boundary review"===b?"boundary":"label"===b||"label review"===b?"label":null);if("boundary"===_){var p=function(r){var a=t(r);return{focus_page:n(a.focus_page),boundary_margin:n(a.boundary_margin),user_actions:o(a.user_actions).filter(e)}}(l.metadata);a.push({id:"".concat(r.stable_key,":boundary:").concat(null!==(s=p.focus_page)&&void 0!==s?s:c),segment:r,review_step:l,metadata:p})}"label"===_&&i.push({id:"".concat(r.stable_key,":label:").concat(c),segment:r,review_step:l,metadata:u(l.metadata)})})}),{boundaryReviews:a,labelReviews:i}};export{i as extractSegmentReviewData};
|
|
2
2
|
//# sourceMappingURL=reviewStepAdapters.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{createBoundaryCardOptions,isBoundaryReviewAction}from"./features/SegmentReviewComponents/BoundaryCard.js";import"tslib";import"react/jsx-runtime";import"react";import"@mui/material/Box";import"@mui/material/Popper";import"@mui/material/SvgIcon";export{default as CognitiveIntegrity}from"./features/SegmentReviewComponents/CognitiveIntegrity.js";export{createLabelCheckOptions,isLabelReviewAction}from"./features/SegmentReviewComponents/LabelCheck.js";export{extractSegmentReviewData}from"./features/SegmentReviewComponents/reviewStepAdapters.js";export{default as SegmentReviewPdfWrapper}from"./features/SegmentReviewComponents/SegmentReviewPdfWrapper.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{ReviewPanel}from"./features/ReviewPanel/ReviewPanel.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as SPBAnalysisPanel}from"./features/SPBAnalysisPanel/Spbanalysispanel.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
|
|
1
|
+
export{default as CodeCitation}from"./features/CodeCitation/CodeCitation.js";export{default as ProjectAccordian}from"./features/ProjectAccordion/ProjectAccordion.js";export{default as BookCitation}from"./features/BookCitation/BookCitation.js";export{default as Bookemon}from"./features/Bookemon/Bookemon.js";export{PdfEditorCitation as PdfCitation}from"./features/PdfEditorCitation/PdfEditorCitation.js";export{default as CitationRenderer}from"./features/CitationRenderer/CitationRenderer.js";export{default as MarkdownRenderer}from"./features/CitationRenderer/MarkdownRenderer.js";export{DiagnosticSeverity}from"./features/CodeCitation/_components/CodeEditor.js";export{default as PaginatedTable}from"./features/PaginatedTable/PaginatedTable.js";export{default as InternalgptReasoningComponent,default as NonWebReasoningComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptReasoningComponent.js";export{default as ChatCitation}from"./features/ChatCitation/ChatCitationRenderer.js";export{default as CognitiveDecisioningCard}from"./features/CognitiveDecisioning/CognitiveDecisioningWrapper.js";export{default as PdfViewer}from"./features/PdfViewer/PdfViewer.js";export{BoundaryReviewActionEnum,createBoundaryCardOptions,isBoundaryReviewAction}from"./features/SegmentReviewComponents/BoundaryCard.js";import"tslib";import"react/jsx-runtime";import"react";import"@mui/material/Box";import"@mui/material/Popper";import"@mui/material/SvgIcon";export{default as CognitiveIntegrity}from"./features/SegmentReviewComponents/CognitiveIntegrity.js";export{LabelReviewActionEnum,createLabelCheckOptions,isLabelReviewAction}from"./features/SegmentReviewComponents/LabelCheck.js";export{default as ReviewedCard,getReviewedCardHeader}from"./features/SegmentReviewComponents/ReviewedCard.js";export{extractSegmentReviewData}from"./features/SegmentReviewComponents/reviewStepAdapters.js";export{default as SegmentReviewPdfWrapper}from"./features/SegmentReviewComponents/SegmentReviewPdfWrapper.js";export{default as FaqCitation}from"./features/CognitiveDecisioning/FaqCitation/FaqCitation.js";export{default as ImageCitationContent}from"./features/RequirementAiCitations/ImageCitation/ImageCitationContent.js";export{default as VideoCitationContent}from"./features/RequirementAiCitations/VideoCitation/VideoCitationContent.js";export{default as FileCitationContent}from"./features/RequirementAiCitations/FileCitation/FileCitationContent.js";export{default as WebCitationWithImageContent}from"./features/RequirementAiCitations/WebCitation/WebCitationWithImageContent.js";export{default as MarkdownWithImageCitation}from"./features/MarkdownWithImageCitation/MarkdownWithImageCitation.js";export{default as AiReasoningCitation}from"./features/RequirementAiCitations/AiReasoning/AiReasoningCitation.js";export{default as TableCitationContent}from"./features/TableCitation/TableCitationContent.js";export{ReviewPanel}from"./features/ReviewPanel/ReviewPanel.js";export{default as CitationsViewer}from"./features/CitationViewer/CitationsViewer.js";export{default as ExcelCitation}from"./features/ExcelCitation/ExcelCitations.js";export{default as ScannedDocCitation}from"./features/ScannedDocCitation/ScannedDocCitation.js";export{default as ChatDrawer}from"./features/ChatDrawer/ChatDrawer.js";export{FILE_INGESTION_STATUS,SUMMARY_EXPAND_HEIGHT_NUDGE,TRUNCATE_THRESHOLD}from"./features/ChatDrawer/constants/ChatDrawer.js";export{default as SplitterCitationsComponent}from"./features/SplitterCitations/SplitterCitationsComponent.js";export{SourcesBQCitation,findSourceCitation,parseSourcesBQHref}from"./features/DualCitation/SourceBQDataCompnent.js";export{default as CognitiveCompare}from"./features/CognitiveCompare/CognitiveCompare.js";export{default as CognitiveInternalgptCoreComponent}from"./features/CognitiveInternalgptReasoning/CognitiveInternalgptCoreComponent.js";export{default as TextualGuideLinesComponent}from"./features/TextualGuidelines/TextualGuideLinesComponent.js";export{default as RuleBookCitationWrapper}from"./features/RulebookCitations/RuleBookCitationWrapper.js";export{IngestionStatusChip,IngestionStatusComponent}from"./features/IngestionStatus/IngestionStatusComponent.js";export{ManageReminders}from"./features/ManageRemainders/ManageReminders.js";export{default as PromptemonBlockViewer}from"./features/PromptemonBlockViewer/PromptemonBlockViewer.js";export{default as PromptemonViewer}from"./features/PromptemonViewer/PromptemonViewer.js";export{default as SPBAnalysisPanel}from"./features/SPBAnalysisPanel/Spbanalysispanel.js";export{default as GptWebCitation}from"./features/GptWebCitation/GptWebCitation.js";export{useOnDemandCitationFetch}from"./hooks/useOnDemandCitationFetch.js";export{default as InstantLearningCitationWrapper}from"./features/InstantLearningCitation/InstantLearningCitationComponent.js";export{default as BPACitationRenderer}from"./features/BPACitationRenderer/BPACitationRenderer.js";export{extractLearnedFromUrl,extractRelevanceScoreFromContent,extractTopicFromContent,getWebCitationImageUrl,mapCitationDataToDisplay,resolveSkeletonVisitUrl,sanitizeExternalUrl}from"./features/GptWebCitation/utils/citationData.utils.js";export{CitationType,allowsGptCitationView,allowsWebCitationView,showsCitationViewToggle}from"./features/GptWebCitation/types.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const useCompareLayout: (initialMaintainOrder: boolean, scrollContainerRef: React.RefObject<HTMLDivElement>, lhsBadgeRefs: any, rhsBadgeRefs: any, proposedSections: any[], existingSections: any[]) => {
|
|
3
2
|
maintainRelativeOrder: boolean;
|
|
4
3
|
setMaintainRelativeOrder: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompareLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/hooks/useCompareLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCompareLayout.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CognitiveCompare/hooks/useCompareLayout.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,yBACL,OAAO,sBACT,MAAM,SAAS,CAAC,cAAc,CAAC,gBACrC,GAAG,gBACH,GAAG,oBACC,GAAG,EAAE,oBACL,GAAG,EAAE;;;;;;;;;;;;;;;;;;;;;;CAkFxB,CAAC"}
|
|
@@ -6,7 +6,14 @@ export interface BoundaryCardOption {
|
|
|
6
6
|
description?: ReactNode;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export declare enum BoundaryReviewActionEnum {
|
|
10
|
+
KEEP = "KEEP",
|
|
11
|
+
SPLIT_HERE = "SPLIT_HERE",
|
|
12
|
+
MERGE_NEXT = "MERGE_NEXT",
|
|
13
|
+
MERGE_PREVIOUS = "MERGE_PREVIOUS",
|
|
14
|
+
SET_RANGE = "SET_RANGE"
|
|
15
|
+
}
|
|
16
|
+
export type BoundaryReviewAction = `${BoundaryReviewActionEnum}`;
|
|
10
17
|
export interface BoundaryReviewMetadata {
|
|
11
18
|
focus_page?: number | null;
|
|
12
19
|
boundary_margin?: number | null;
|
|
@@ -27,7 +34,7 @@ export interface BoundaryCardStyles {
|
|
|
27
34
|
confirmButton?: SxProps<Theme>;
|
|
28
35
|
footer?: SxProps<Theme>;
|
|
29
36
|
}
|
|
30
|
-
export declare const isBoundaryReviewAction: (value: string) => value is
|
|
37
|
+
export declare const isBoundaryReviewAction: (value: string) => value is "KEEP" | "SPLIT_HERE" | "MERGE_NEXT" | "MERGE_PREVIOUS" | "SET_RANGE";
|
|
31
38
|
export declare const createBoundaryCardOptions: (metadata: BoundaryReviewMetadata) => BoundaryCardOption[];
|
|
32
39
|
export interface BoundaryCardProps {
|
|
33
40
|
headerName?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundaryCard.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/BoundaryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc1D,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAa3D,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,
|
|
1
|
+
{"version":3,"file":"BoundaryCard.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/BoundaryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc1D,OAAO,KAAK,EAAE,O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E,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,UAA6B,EAC7B,KAAK,EACL,MAAM,EACN,OAAO,EACP,cAAc,EACd,MAAM,EACN,QAAQ,EACR,aAAa,EACb,oBAA2B,EAC3B,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,YAAwB,EACxB,YAA8C,EAC9C,iBAAqC,EACrC,cAAsC,EACtC,kBAAyB,EACzB,sBAA6B,EAC7B,eAAsB,EACtB,eAAuB,EACvB,KAAW,EACX,QAAc,EACd,SAAS,EACT,MAAM,GACP,EAAE,iBAAiB,2CAkRnB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode, type RefObject } from 'react';
|
|
1
|
+
import React, { type ReactNode, type RefObject } from 'react';
|
|
2
2
|
import type { PopperProps } from '@mui/material/Popper';
|
|
3
3
|
export interface CardWrapperProps {
|
|
4
4
|
/** Reference to the element the card is attached to. */
|
|
@@ -13,7 +13,10 @@ export interface CardWrapperProps {
|
|
|
13
13
|
left?: number;
|
|
14
14
|
};
|
|
15
15
|
placement?: PopperProps['placement'];
|
|
16
|
+
width?: number | string;
|
|
17
|
+
maxWidth?: number | string;
|
|
18
|
+
customStyles?: Record<string, React.CSSProperties>;
|
|
16
19
|
}
|
|
17
20
|
/** Renders a scrollable card in a portal, anchored below another element. */
|
|
18
|
-
export default function CardWrapper({ anchorRef, anchorElement, children, className, offset, placement, }: CardWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default function CardWrapper({ anchorRef, anchorElement, children, className, offset, placement, width, maxWidth, customStyles, }: CardWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
19
22
|
//# sourceMappingURL=CardWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/CardWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"CardWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/CardWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIZ,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD,MAAM,WAAW,gBAAgB;IAC/B,wDAAwD;IACxD,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IACnC,wDAAwD;IACxD,aAAa,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,MAAM,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,SAAS,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,YAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CACrD;AAED,6EAA6E;AAC7E,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,SAAS,EACT,aAAa,EACb,QAAQ,EACR,SAAS,EACT,MAAW,EACX,SAA0B,EAC1B,KAAK,EACL,QAAQ,EACR,YAAiB,GAClB,EAAE,gBAAgB,2CAwGlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CognitiveIntegrity.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/CognitiveIntegrity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAyB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,sCAAsC,CAAC;AAY9C,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CACnC;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AA+BD,8EAA8E;AAC9E,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,MAAM,EACN,GAAG,EACH,KAAK,EAAE,cAAc,EACrB,UAAkC,EAClC,MAAM,EACN,OAAO,EACP,eAAsB,EACtB,KAAW,EACX,QAAc,EACd,SAAS,EACT,MAAM,GACP,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"CognitiveIntegrity.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/CognitiveIntegrity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAyB,EACvB,KAAK,sBAAsB,EAC5B,MAAM,sCAAsC,CAAC;AAY9C,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CACnC;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC;AA+BD,8EAA8E;AAC9E,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,MAAM,EACN,GAAG,EACH,KAAK,EAAE,cAAc,EACrB,UAAkC,EAClC,MAAM,EACN,OAAO,EACP,eAAsB,EACtB,KAAW,EACX,QAAc,EACd,SAAS,EACT,MAAM,GACP,EAAE,uBAAuB,kDA8FzB"}
|
|
@@ -10,7 +10,12 @@ export interface LabelCheckOption {
|
|
|
10
10
|
inputPlaceholder?: string;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export declare enum LabelReviewActionEnum {
|
|
14
|
+
KEEP_LABEL = "KEEP_LABEL",
|
|
15
|
+
SET_CUSTOM_LABEL = "SET_CUSTOM_LABEL",
|
|
16
|
+
SET_TYPE = "SET_TYPE"
|
|
17
|
+
}
|
|
18
|
+
export type LabelReviewAction = `${LabelReviewActionEnum}`;
|
|
14
19
|
/** Metadata supplied by a `Label Review` review step. */
|
|
15
20
|
export interface LabelReviewMetadata {
|
|
16
21
|
current_label?: string | null;
|
|
@@ -25,7 +30,7 @@ export interface LabelReviewConfirmDetails {
|
|
|
25
30
|
metadata?: LabelReviewMetadata;
|
|
26
31
|
}
|
|
27
32
|
export declare const createLabelCheckOptions: (metadata: LabelReviewMetadata) => LabelCheckOption[];
|
|
28
|
-
export declare const isLabelReviewAction: (value: string) => value is
|
|
33
|
+
export declare const isLabelReviewAction: (value: string) => value is "KEEP_LABEL" | "SET_CUSTOM_LABEL" | "SET_TYPE";
|
|
29
34
|
export interface LabelCheckStyles {
|
|
30
35
|
root?: SxProps<Theme>;
|
|
31
36
|
header?: SxProps<Theme>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelCheck.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/LabelCheck.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM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WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EACP,YAAwB,EACxB,oBAA8C,EAC9C,YAA8C,EAC9C,iBAAqC,EACrC,cAAsC,EACtC,kBAAyB,EACzB,sBAA6B,EAC7B,eAAsB,EACtB,eAAuB,EACvB,KAAW,EACX,QAAc,EACd,SAAS,EACT,MAAM,GACP,EAAE,eAAe,2CAwRjB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SxProps, Theme } from '@mui/material/styles';
|
|
3
|
+
import { type BoundaryReviewAction } from './BoundaryCard';
|
|
4
|
+
import { type LabelReviewAction } from './LabelCheck';
|
|
5
|
+
export type ReviewedCardAction = BoundaryReviewAction | LabelReviewAction;
|
|
6
|
+
export declare const getReviewedCardHeader: (action?: string | null) => string;
|
|
7
|
+
export interface ReviewedCardStyles {
|
|
8
|
+
root?: SxProps<Theme>;
|
|
9
|
+
header?: SxProps<Theme>;
|
|
10
|
+
content?: SxProps<Theme>;
|
|
11
|
+
footer?: SxProps<Theme>;
|
|
12
|
+
}
|
|
13
|
+
export interface ReviewedCardProps {
|
|
14
|
+
headerName?: ReactNode;
|
|
15
|
+
action?: ReviewedCardAction | string | null;
|
|
16
|
+
title: ReactNode;
|
|
17
|
+
pageNo?: ReactNode;
|
|
18
|
+
summary?: ReactNode;
|
|
19
|
+
cognitiveScore?: ReactNode;
|
|
20
|
+
onCognitiveClick?: () => void;
|
|
21
|
+
onClose?: () => void;
|
|
22
|
+
cognitiveLabel?: ReactNode;
|
|
23
|
+
showCognitiveIntegrity?: boolean;
|
|
24
|
+
showCloseButton?: boolean;
|
|
25
|
+
width?: number | string;
|
|
26
|
+
maxWidth?: number | string;
|
|
27
|
+
className?: string;
|
|
28
|
+
styles?: ReviewedCardStyles;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Read-only review card shell. The middle stack is intentionally empty until
|
|
32
|
+
* the reviewed-action content is introduced.
|
|
33
|
+
*/
|
|
34
|
+
export default function ReviewedCard({ headerName, action, title, pageNo, summary, cognitiveScore, onCognitiveClick, onClose, cognitiveLabel, showCognitiveIntegrity, showCloseButton, width, maxWidth, className, styles, }: ReviewedCardProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
//# sourceMappingURL=ReviewedCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReviewedCard.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/ReviewedCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvC,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAI3D,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG,iBAAiB,CAAC;AAa1E,eAAO,MAAM,qBAAqB,YAAa,MAAM,GAAG,IAAI,KAAG,MAG/C,CAAC;AAUjB,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,CAAC;IAC5C,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,UAAU,EACV,MAAM,EACN,KAAK,EACL,MAAM,EACN,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,OAAO,EACP,cAAsC,EACtC,sBAA6B,EAC7B,eAAsB,EACtB,KAAW,EACX,QAAc,EACd,SAAS,EACT,MAAM,GACP,EAAE,iBAAiB,2CA8InB"}
|
|
@@ -41,7 +41,8 @@ export interface SegmentReviewPdfWrapperProps {
|
|
|
41
41
|
initialReviewId?: string;
|
|
42
42
|
onBoundaryAction?: (action: BoundaryReviewAction, details: BoundaryReviewConfirmDetails, context: SegmentReviewActionContext) => void | Promise<void>;
|
|
43
43
|
onLabelAction?: (action: LabelReviewAction, details: LabelReviewConfirmDetails, context: SegmentReviewActionContext) => void | Promise<void>;
|
|
44
|
-
|
|
44
|
+
/** Called when a badge is selected, with its complete source segment. */
|
|
45
|
+
onActiveReviewChange?: (reviewId: string | null, segment: SegmentReviewSource | null) => void;
|
|
45
46
|
onCurrentPageChange?: (pageNumber: number) => void;
|
|
46
47
|
onActionError?: (error: unknown, context: SegmentReviewActionContext) => void;
|
|
47
48
|
onAdjustManually?: (context: SegmentReviewActionContext) => void;
|
|
@@ -51,11 +52,12 @@ export interface SegmentReviewPdfWrapperProps {
|
|
|
51
52
|
viewerStyle?: CSSProperties;
|
|
52
53
|
railStyle?: CSSProperties;
|
|
53
54
|
redirectionData?: RedirectionData;
|
|
55
|
+
styles?: Record<string, React.CSSProperties>;
|
|
54
56
|
}
|
|
55
57
|
/**
|
|
56
58
|
* Orchestrates the PDF, review badges, page navigation, active card and actions.
|
|
57
59
|
* It consumes backend-shaped segments directly; cards never parse the raw payload.
|
|
58
60
|
*/
|
|
59
|
-
export default function SegmentReviewPdfWrapper({ pdfUrl, pdfName, segments, pdfViewerProps, showBadges, sortByConfidence, filterByConfidence, showBadgeNavigation, autoSelectReviewOnPageChange, autoAdvanceAfterConfirm, badgePreloadPages, badgeOffsetTop, badgeOffsetRight, initialReviewId, onBoundaryAction, onLabelAction, onActiveReviewChange, onCurrentPageChange, onActionError, onAdjustManually, onCognitiveClick, className, style, viewerStyle, railStyle, redirectionData, }: SegmentReviewPdfWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export default function SegmentReviewPdfWrapper({ pdfUrl, pdfName, segments, styles, pdfViewerProps, showBadges, sortByConfidence, filterByConfidence, showBadgeNavigation, autoSelectReviewOnPageChange, autoAdvanceAfterConfirm, badgePreloadPages, badgeOffsetTop, badgeOffsetRight, initialReviewId, onBoundaryAction, onLabelAction, onActiveReviewChange, onCurrentPageChange, onActionError, onAdjustManually, onCognitiveClick, className, style, viewerStyle, railStyle, redirectionData, }: SegmentReviewPdfWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
60
62
|
export {};
|
|
61
63
|
//# sourceMappingURL=SegmentReviewPdfWrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentReviewPdfWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAEf,OAAkB,
|
|
1
|
+
{"version":3,"file":"SegmentReviewPdfWrapper.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/SegmentReviewPdfWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AAEf,OAAkB,EAGhB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAqB,EACnB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAClC,MAAM,gBAAgB,CAAC;AAGxB,OAAmB,EACjB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAC;AACtB,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAK9B,KAAK,uBAAuB,GAAG,OAAO,CAAC,IAAI,CACzC,cAAc,EACZ,QAAQ,GACR,SAAS,GACT,UAAU,GACV,qBAAqB,GACrB,mBAAmB,GACnB,qBAAqB,GACrB,YAAY,GACZ,gBAAgB,CACnB,CAAC,CAAC;AAYH,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AACzD,MAAM,MAAM,sBAAsB,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAC;AAC5D,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,mBAAmB,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACzC,cAAc,CAAC,EAAE,uBAAuB,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C,OAAO,EAAE,0BAA0B,KAAK,IAAI,CAAC;IAEjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAC9C;AA6CD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,MAAM,EACN,OAAO,EACP,QAAQ,EACR,MAAM,EACN,cAAc,EACd,UAAiB,EACjB,gBAAwB,EACxB,kBAA0B,EAC1B,mBAA0B,EAC1B,4BAAoC,EACpC,uBAA8B,EAC9B,iBAAqB,EACrB,cAAmB,EACnB,gBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,WAAW,EACX,SAAS,EACT,eAAe,GAChB,EAAE,4BAA4B,2CAo0B9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as BoundaryCard } from './BoundaryCard';
|
|
2
|
-
export { createBoundaryCardOptions, isBoundaryReviewAction } from './BoundaryCard';
|
|
2
|
+
export { BoundaryReviewActionEnum, createBoundaryCardOptions, isBoundaryReviewAction, } from './BoundaryCard';
|
|
3
3
|
export type { BoundaryCardOption, BoundaryCardProps, BoundaryCardStyles, BoundaryReviewAction, BoundaryReviewConfirmDetails, BoundaryReviewMetadata, } from './BoundaryCard';
|
|
4
4
|
export { default as CardWrapper } from './CardWrapper';
|
|
5
5
|
export type { CardWrapperProps } from './CardWrapper';
|
|
@@ -7,10 +7,12 @@ export { default as CognitiveIcon } from './CognitiveIcon';
|
|
|
7
7
|
export { default as CognitiveIntegrity } from './CognitiveIntegrity';
|
|
8
8
|
export type { CognitiveIntegrityProps, CognitiveIntegrityStyles, } from './CognitiveIntegrity';
|
|
9
9
|
export { default as LabelCheck } from './LabelCheck';
|
|
10
|
-
export { createLabelCheckOptions, isLabelReviewAction } from './LabelCheck';
|
|
10
|
+
export { LabelReviewActionEnum, createLabelCheckOptions, isLabelReviewAction, } from './LabelCheck';
|
|
11
11
|
export type { LabelCheckOption, LabelCheckProps, LabelCheckStyles, LabelReviewAction, LabelReviewConfirmDetails, LabelReviewMetadata, } from './LabelCheck';
|
|
12
|
+
export { default as ReviewedCard, getReviewedCardHeader } from './ReviewedCard';
|
|
13
|
+
export type { ReviewedCardAction, ReviewedCardProps, ReviewedCardStyles, } from './ReviewedCard';
|
|
12
14
|
export { extractSegmentReviewData } from './reviewStepAdapters';
|
|
13
|
-
export type { ExtractedBoundaryReview, ExtractedLabelReview, ReviewStepMetadata, ReviewStepReview, ReviewStepSource, SegmentReviewSource, } from './reviewStepAdapters';
|
|
15
|
+
export type { ExtractedBoundaryReview, ExtractedLabelReview, ReviewStepHumanResolution, ReviewStepMetadata, ReviewStepPerformedAction, ReviewStepReview, ReviewStepSource, ReviewStepValueSnapshot, SegmentConfidence, SegmentConfidenceReason, SegmentHumanActionLogEntry, SegmentReviewAction, SegmentReviewSource, SegmentTimings, } from './reviewStepAdapters';
|
|
14
16
|
export { default as SegmentReviewPdfWrapper } from './SegmentReviewPdfWrapper';
|
|
15
17
|
export type { RedirectionData, ReviewConfidence, ReviewConfidenceFilter, ReviewRedirectionType, SegmentReviewActionContext, SegmentReviewPdfWrapperProps, } from './SegmentReviewPdfWrapper';
|
|
16
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,4BAA4B,EAC5B,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,YAAY,EACV,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAChF,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,YAAY,EACV,uBAAuB,EACvB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,uBAAuB,EACvB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAC/E,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC"}
|
|
@@ -5,6 +5,34 @@ export interface ReviewStepReview {
|
|
|
5
5
|
reviewed_by: string;
|
|
6
6
|
reviewed_at: string;
|
|
7
7
|
}
|
|
8
|
+
export interface ReviewStepPerformedAction {
|
|
9
|
+
action: string;
|
|
10
|
+
performed_by: string;
|
|
11
|
+
performed_at: string;
|
|
12
|
+
human_revision: number;
|
|
13
|
+
segment_version: number;
|
|
14
|
+
change_summary: string | null;
|
|
15
|
+
operation_id: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface ReviewStepValueSnapshot {
|
|
18
|
+
label?: string | null;
|
|
19
|
+
type_id?: string | null;
|
|
20
|
+
start_page?: number | null;
|
|
21
|
+
end_page?: number | null;
|
|
22
|
+
}
|
|
23
|
+
export interface ReviewStepHumanResolution {
|
|
24
|
+
state: string;
|
|
25
|
+
changed_by_human: boolean;
|
|
26
|
+
changed_by: string | null;
|
|
27
|
+
changed_at: string | null;
|
|
28
|
+
human_revision: number;
|
|
29
|
+
segment_version: number | null;
|
|
30
|
+
action: string | null;
|
|
31
|
+
change_summary: string | null;
|
|
32
|
+
before: ReviewStepValueSnapshot | null;
|
|
33
|
+
after: ReviewStepValueSnapshot | null;
|
|
34
|
+
operation_id: string | null;
|
|
35
|
+
}
|
|
8
36
|
export interface ReviewStepMetadata {
|
|
9
37
|
focus_page?: number | null;
|
|
10
38
|
boundary_margin?: number | null;
|
|
@@ -12,6 +40,7 @@ export interface ReviewStepMetadata {
|
|
|
12
40
|
custom_label?: string | null;
|
|
13
41
|
group_id?: string | null;
|
|
14
42
|
user_actions?: readonly string[];
|
|
43
|
+
performed_actions?: readonly ReviewStepPerformedAction[];
|
|
15
44
|
}
|
|
16
45
|
export interface ReviewStepSource {
|
|
17
46
|
type: string;
|
|
@@ -26,26 +55,99 @@ export interface ReviewStepSource {
|
|
|
26
55
|
details?: readonly string[];
|
|
27
56
|
/** Object when reviewed; null while this individual check is pending. */
|
|
28
57
|
review: ReviewStepReview | null;
|
|
58
|
+
human_resolution?: ReviewStepHumanResolution | null;
|
|
29
59
|
metadata?: ReviewStepMetadata | null;
|
|
30
60
|
}
|
|
61
|
+
export interface SegmentConfidenceReason {
|
|
62
|
+
text: string;
|
|
63
|
+
type: string;
|
|
64
|
+
}
|
|
65
|
+
export interface SegmentConfidence {
|
|
66
|
+
level: string;
|
|
67
|
+
summary: string;
|
|
68
|
+
decided_by: string;
|
|
69
|
+
awaiting_llm: boolean;
|
|
70
|
+
classification_confidence: string | null;
|
|
71
|
+
reasons: readonly SegmentConfidenceReason[];
|
|
72
|
+
}
|
|
73
|
+
export interface SegmentReviewAction {
|
|
74
|
+
focus_page: number | null;
|
|
75
|
+
allowed_decisions: readonly string[];
|
|
76
|
+
}
|
|
77
|
+
export interface SegmentTimings {
|
|
78
|
+
pages: number;
|
|
79
|
+
total_ms: number;
|
|
80
|
+
allocated: boolean;
|
|
81
|
+
stage0_ms: number;
|
|
82
|
+
stage1_ms: number;
|
|
83
|
+
tables_ms: number;
|
|
84
|
+
table_llm_ms: number;
|
|
85
|
+
stage3_llm_ms: number;
|
|
86
|
+
docai_tables_ms: number;
|
|
87
|
+
}
|
|
88
|
+
export interface SegmentHumanActionLogEntry extends ReviewStepPerformedAction {
|
|
89
|
+
step: string;
|
|
90
|
+
before: ReviewStepValueSnapshot | null;
|
|
91
|
+
after: ReviewStepValueSnapshot | null;
|
|
92
|
+
}
|
|
31
93
|
export interface SegmentReviewSource {
|
|
94
|
+
bundle_id?: string;
|
|
95
|
+
run_id?: string;
|
|
96
|
+
segmentation_index?: number;
|
|
32
97
|
stable_key: string;
|
|
98
|
+
segment_id?: string;
|
|
99
|
+
version?: number;
|
|
33
100
|
title: string;
|
|
34
101
|
label?: string | null;
|
|
102
|
+
category?: string | null;
|
|
103
|
+
type_id?: string | null;
|
|
35
104
|
start_page: number;
|
|
36
105
|
end_page: number;
|
|
106
|
+
page_count: number;
|
|
107
|
+
status?: string;
|
|
108
|
+
reviewed_by?: string | null;
|
|
109
|
+
reviewed_at?: string | null;
|
|
110
|
+
updated_at?: string | null;
|
|
111
|
+
confidence?: SegmentConfidence | null;
|
|
112
|
+
review_action?: SegmentReviewAction | null;
|
|
113
|
+
ingest_mode?: string | null;
|
|
114
|
+
segment_type?: string | null;
|
|
115
|
+
special_tags?: readonly string[];
|
|
116
|
+
table_pages?: readonly number[];
|
|
117
|
+
tables_detected_count?: number;
|
|
118
|
+
table_detection_confidence?: string | null;
|
|
119
|
+
table_detection_confidence_reason?: string | null;
|
|
120
|
+
drawing_pages?: readonly number[];
|
|
121
|
+
drawings_detected_count?: number;
|
|
122
|
+
drawing_detection_confidence?: string | null;
|
|
123
|
+
drawing_detection_confidence_reason?: string | null;
|
|
124
|
+
boundary_margin?: number | null;
|
|
125
|
+
timings?: SegmentTimings | null;
|
|
126
|
+
classification_method?: string | null;
|
|
127
|
+
classification_confidence_reason?: string | null;
|
|
128
|
+
matched_phrase?: string | null;
|
|
129
|
+
runner_up_type_id?: string | null;
|
|
130
|
+
runner_up_evidence?: string | null;
|
|
131
|
+
segment_pdf_gs_url?: string | null;
|
|
132
|
+
page_image_urls?: readonly string[];
|
|
133
|
+
operation_id?: string | null;
|
|
134
|
+
update_stage?: string | null;
|
|
135
|
+
processing_updated_at?: string | null;
|
|
136
|
+
provisional?: boolean;
|
|
137
|
+
human_action_log?: readonly SegmentHumanActionLogEntry[];
|
|
37
138
|
review_steps: readonly ReviewStepSource[];
|
|
139
|
+
segment_score?: string | number | null;
|
|
38
140
|
}
|
|
39
141
|
export interface ExtractedBoundaryReview<TSegment extends SegmentReviewSource> {
|
|
40
142
|
id: string;
|
|
41
143
|
segment: TSegment;
|
|
42
|
-
|
|
144
|
+
review_step: ReviewStepSource;
|
|
43
145
|
metadata: BoundaryReviewMetadata;
|
|
44
146
|
}
|
|
45
147
|
export interface ExtractedLabelReview<TSegment extends SegmentReviewSource> {
|
|
46
148
|
id: string;
|
|
47
149
|
segment: TSegment;
|
|
48
|
-
|
|
150
|
+
review_step: ReviewStepSource;
|
|
49
151
|
metadata: LabelReviewMetadata;
|
|
50
152
|
}
|
|
51
153
|
/** Converts backend-shaped segments into card-ready boundary and label reviews. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewStepAdapters.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/reviewStepAdapters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAEnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAG3E,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,oBAAoB,GAAG,iBAAiB,CAAC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"reviewStepAdapters.d.ts","sourceRoot":"","sources":["../../../../../src/features/Segm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C;IACnC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gBAAgB,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACzD,YAAY,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,uBAAuB,CAAC,QAAQ,SAAS,mBAAmB;IAC3E,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,QAAQ,CAAC;IAClB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,sBAAsB,CAAC;CAClC;AAED,MAAM,WAAW,oBAAoB,CAAC,QAAQ,SAAS,mBAAmB;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,QAAQ,CAAC;IAClB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAmDD,mFAAmF;AACnF,eAAO,MAAM,wBAAwB;;;CAgCpC,CAAC"}
|
|
@@ -11,8 +11,8 @@ export { default as NonWebReasoningComponent } from "./features/CognitiveInterna
|
|
|
11
11
|
export { default as ChatCitation } from "./features/ChatCitation/ChatCitationRenderer";
|
|
12
12
|
export { default as CognitiveDecisioningCard } from "./features/CognitiveDecisioning/CognitiveDecisioningWrapper";
|
|
13
13
|
export { default as PdfViewer } from "./features/PdfViewer/PdfViewer";
|
|
14
|
-
export { CognitiveIntegrity, SegmentReviewPdfWrapper, createBoundaryCardOptions, createLabelCheckOptions, extractSegmentReviewData, isBoundaryReviewAction, isLabelReviewAction } from "./features/SegmentReviewComponents";
|
|
15
|
-
export type { BoundaryCardOption, BoundaryCardProps, BoundaryCardStyles, BoundaryReviewAction, BoundaryReviewConfirmDetails, BoundaryReviewMetadata, CardWrapperProps, CognitiveIntegrityProps, CognitiveIntegrityStyles, ExtractedBoundaryReview, ExtractedLabelReview, LabelCheckOption, LabelCheckProps, LabelCheckStyles, LabelReviewAction, LabelReviewConfirmDetails, LabelReviewMetadata, RedirectionData, ReviewStepMetadata, ReviewStepReview, ReviewStepSource, ReviewConfidence, ReviewConfidenceFilter, ReviewRedirectionType, SegmentReviewSource, SegmentReviewActionContext, SegmentReviewPdfWrapperProps } from "./features/SegmentReviewComponents";
|
|
14
|
+
export { BoundaryReviewActionEnum, CognitiveIntegrity, LabelReviewActionEnum, ReviewedCard, SegmentReviewPdfWrapper, createBoundaryCardOptions, createLabelCheckOptions, extractSegmentReviewData, getReviewedCardHeader, isBoundaryReviewAction, isLabelReviewAction } from "./features/SegmentReviewComponents";
|
|
15
|
+
export type { BoundaryCardOption, BoundaryCardProps, BoundaryCardStyles, BoundaryReviewAction, BoundaryReviewConfirmDetails, BoundaryReviewMetadata, CardWrapperProps, CognitiveIntegrityProps, CognitiveIntegrityStyles, ExtractedBoundaryReview, ExtractedLabelReview, LabelCheckOption, LabelCheckProps, LabelCheckStyles, LabelReviewAction, LabelReviewConfirmDetails, LabelReviewMetadata, RedirectionData, ReviewedCardAction, ReviewedCardProps, ReviewedCardStyles, ReviewStepHumanResolution, ReviewStepMetadata, ReviewStepPerformedAction, ReviewStepReview, ReviewStepSource, ReviewStepValueSnapshot, ReviewConfidence, ReviewConfidenceFilter, ReviewRedirectionType, SegmentConfidence, SegmentConfidenceReason, SegmentHumanActionLogEntry, SegmentReviewAction, SegmentReviewSource, SegmentReviewActionContext, SegmentReviewPdfWrapperProps, SegmentTimings } from "./features/SegmentReviewComponents";
|
|
16
16
|
export { default as FaqCitation } from "./features/CognitiveDecisioning/FaqCitation/FaqCitation";
|
|
17
17
|
export { default as ImageCitationContent } from "./features/RequirementAiCitations/ImageCitation/ImageCitationContent";
|
|
18
18
|
export { default as VideoCitationContent } from "./features/RequirementAiCitations/VideoCitation/VideoCitationContent";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAE,MAAM,gDAAgD,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAC3F,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AAC1G,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,iFAAiF,CAAC;AACtI,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6DAA6D,CAAC;AAClH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAC,kBAAkB,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,mBAAmB,EAAC,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.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