@viswa-test/test-citation 0.0.362 → 0.0.363

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.
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n,t=require("tslib"),i=require("react/jsx-runtime"),r=require("react"),o=require("@react-pdf-viewer/core"),a=require("../PdfViewer/PdfViewer.js"),l=require("./BoundaryCard.js"),u=require("./CardWrapper.js"),s=require("./CognitiveIntegrity.js"),d=require("./LabelCheck.js"),g=require("./PageCheck.js"),c=require("./reviewStepAdapters.js"),v=require("lucide-react"),m=require("@mui/material"),p=require("./ReviewedCard.js"),f=require("./RevertCard.js"),h=require("./RevertSuccessCard.js"),w=require("./helper.js"),_=require("./ChartBreakoutCircle.js"),y=260;exports.SegmentPdfSpecialZoomLevel=void 0,(n=exports.SegmentPdfSpecialZoomLevel||(exports.SegmentPdfSpecialZoomLevel={})).ActualSize="ActualSize",n.PageFit="PageFit",n.PageWidth="PageWidth";var b=((e={})[exports.SegmentPdfSpecialZoomLevel.ActualSize]=o.SpecialZoomLevel.ActualSize,e[exports.SegmentPdfSpecialZoomLevel.PageFit]=o.SpecialZoomLevel.PageFit,e[exports.SegmentPdfSpecialZoomLevel.PageWidth]=o.SpecialZoomLevel.PageWidth,e),S=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}};exports.default=function(e){var n,x,R,E,C,P,k,A,M,j,I,B,N,L,F,T,q,W,K,z,G,O,D,V,Z,H,U,X,Y,J,Q,$,ee=this,ne=e.pdfUrl,te=e.pdfName,ie=e.segments,re=e.styles,oe=e.pdfViewerProps,ae=e.specialZoomLevel,le=e.showBadges,ue=void 0===le||le,se=e.sortByConfidence,de=void 0===se?"low":se,ge=e.filterByConfidence,ce=void 0===ge?"all":ge,ve=e.showBadgeNavigation,me=void 0===ve||ve,pe=e.autoSelectReviewOnPageChange,fe=void 0!==pe&&pe,he=e.autoAdvanceAfterConfirm,we=void 0===he||he,_e=e.badgePreloadPages,ye=void 0===_e?8:_e,be=e.badgeOffsetTop,Se=void 0===be?20:be,xe=e.badgeOffsetRight,Re=void 0===xe?68:xe,Ee=e.badgeOffsetLeft,Ce=void 0===Ee?0:Ee,Pe=e.initialReviewId,ke=e.manualPrompt,Ae=e.heightBuffer,Me=e.onBoundaryAction,je=e.onLabelAction,Ie=e.onPageAction,Be=e.onPageTypeRevert,Ne=e.onRevert,Le=e.onActiveReviewChange,Fe=e.onCurrentPageChange,Te=e.onActionError,qe=e.disableAllActions,We=void 0!==qe&&qe,Ke=e.disablePdfAnnotations,ze=void 0!==Ke&&Ke,Ge=e.disablePdfTextLayer,Oe=void 0===Ge||Ge,De=e.disableTitleCheckUntilBoundaryCheckCompleted,Ve=void 0!==De&&De,Ze=e.onAdjustManually,He=e.onCognitiveClick,Ue=e.className,Xe=e.style,Ye=e.viewerStyle,Je=e.railStyle,Qe=e.redirectionData,$e=r.useMemo(function(){return c.extractSegmentReviewData(ie)},[ie]),en=$e.boundaryReviews,nn=$e.labelReviews,tn=$e.pageReviews,rn=r.useState(function(){return new Map}),on=rn[0],an=rn[1],ln=r.useMemo(function(){var e=new Map,n=1;return ie.forEach(function(t,i){var r=c.getSegmentReviewKey(t,i);e.has(r)||(e.set(r,n),n+=1)}),e},[ie]),un=r.useMemo(function(){return new Set(nn.map(function(e){return c.getSegmentReviewKey(e.segment)}))},[nn]),sn=r.useMemo(function(){return w.getPendingMergeImpactedSegmentKeys(ie)},[ie]);r.useEffect(function(){an(function(e){var n=!1,t=new Map(e);return e.forEach(function(e,i){var r=ie.find(function(e){return c.getSegmentReviewKey(e)===i});r&&!w.hasPolledStructuralAction(r,e)||(t.delete(i),n=!0)}),n?t:e})},[ie]);var dn=r.useMemo(function(){return w.getOptimisticMergeImpactedSegmentKeys(ie,on)},[on,ie]),gn=r.useRef(null),cn=r.useMemo(function(){return t.__spreadArray(t.__spreadArray(t.__spreadArray([],en.filter(function(e){return!sn.has(c.getSegmentReviewKey(e.segment))&&!dn.has(c.getSegmentReviewKey(e.segment))&&!w.shouldHideStructuralBoundaryReview(e.review_step,e.segment,un.has(c.getSegmentReviewKey(e.segment)),on.get(c.getSegmentReviewKey(e.segment)))}).map(function(e){var n;return t.__assign(t.__assign({},e),{kind:"boundary",pageNumber:null!==(n=e.metadata.focus_page)&&void 0!==n?n:e.segment.start_page})}),!0),nn.filter(function(e){return!sn.has(c.getSegmentReviewKey(e.segment))&&!dn.has(c.getSegmentReviewKey(e.segment))}).map(function(e){return t.__assign(t.__assign({},e),{kind:"label",pageNumber:e.segment.start_page})}),!0),tn.filter(function(e){return!sn.has(c.getSegmentReviewKey(e.segment))&&!dn.has(c.getSegmentReviewKey(e.segment))}).map(function(e){var n;return t.__assign(t.__assign({},e),{kind:"page",pageNumber:null!==(n=e.metadata.page_num)&&void 0!==n?n:e.segment.start_page})}),!0).sort(function(e,n){var t,i,r=null!==(t=ln.get(c.getSegmentReviewKey(e.segment)))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(i=ln.get(c.getSegmentReviewKey(n.segment)))&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||r-o||e.reviewStepIndex-n.reviewStepIndex||e.id.localeCompare(n.id)})},[en,nn,tn,dn,on,sn,ln,un]),vn=r.useMemo(function(){return ie.map(function(e){var n,i;return t.__assign(t.__assign({},e),{title:(null===(n=e.label)||void 0===n?void 0:n.trim())||e.title,page_count:null!==(i=e.page_count)&&void 0!==i?i:e.end_page-e.start_page+1})})},[ie]),mn=r.useState(1),pn=mn[0],fn=mn[1],hn=r.useState(null!=Pe?Pe:null),wn=hn[0],_n=hn[1],yn=r.useState(null!=Pe?Pe:null),bn=yn[0],Sn=yn[1],xn=r.useState(!1),Rn=xn[0],En=xn[1],Cn=r.useState(null),Pn=Cn[0],kn=Cn[1],An=r.useState(null),Mn=An[0],jn=An[1],In=r.useState(function(){return new Set}),Bn=In[0],Nn=In[1],Ln=r.useState(null),Fn=Ln[0],Tn=Ln[1],qn=r.useState(null),Wn=qn[0],Kn=qn[1],zn=r.useState(!1),Gn=zn[0],On=zn[1],Dn=r.useRef(0),Vn=r.useRef(null),Zn=r.useRef(null),Hn=r.useRef(new Map),Un=r.useRef(null),Xn=r.useRef(null),Yn=r.useState(y),Jn=Yn[0],Qn=Yn[1],$n=null!==(x=null===(n=null==re?void 0:re.aside)||void 0===n?void 0:n.width)&&void 0!==x?x:"40%",et="min(".concat("number"==typeof $n?"".concat($n,"px"):$n,", ").concat(y,"px, 100%)");r.useEffect(function(){Nn(function(e){if(0===e.size)return e;var n=new Set(e),t=!1;return cn.forEach(function(e){var i;null!=(null===(i=e.review_step.review)||void 0===i?void 0:i.action)&&n.has(e.id)&&(n.delete(e.id),t=!0)}),t?n:e})},[cn]),r.useEffect(function(){var e=gn.current;if(e&&ue){var n=function(){var n=e.getBoundingClientRect().width;n>0&&Qn(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()}}},[ue]);var nt=r.useMemo(function(){var e=new Set;return cn.forEach(function(n){var t;null!=(null===(t=n.review_step.review)||void 0===t?void 0:t.action)&&e.add(n.id)}),e},[cn]),tt=r.useMemo(function(){var e;return null!==(e=cn.find(function(e){return e.id===wn}))&&void 0!==e?e:null},[wn,cn]),it=r.useMemo(function(){return!(!Ve||"label"!==(null==tt?void 0:tt.kind))&&en.some(function(e){if(c.getSegmentReviewKey(e.segment)!==c.getSegmentReviewKey(tt.segment)||nt.has(e.id))return!1;var n=w.getResolvedScore(e.review_step.score,e.review_step.confidence);return null==n||n<85})},[tt,en,Ve,nt]),rt=null==tt?-1:ie.findIndex(function(e){return c.getSegmentReviewKey(e)===c.getSegmentReviewKey(tt.segment)}),ot=rt>0?ie[rt-1]:void 0,at=rt>=0?ie[rt+1]:void 0,lt=(null===(R=null==ot?void 0:ot.label)||void 0===R?void 0:R.trim())||(null==ot?void 0:ot.title),ut=(null===(E=null==at?void 0:at.label)||void 0===E?void 0:E.trim())||(null==at?void 0:at.title),st=w.getConfidenceColors(null==tt?void 0:tt.review_step.score,null==tt?void 0:tt.review_step.confidence,null===(C=null==tt?void 0:tt.segment.confidence)||void 0===C?void 0:C.awaiting_llm),dt=(null===(P=null==tt?void 0:tt.review_step.reasons)||void 0===P?void 0:P.length)?tt.review_step.reasons:null!==(A=null===(k=null==tt?void 0:tt.segment.confidence)||void 0===k?void 0:k.reasons)&&void 0!==A?A:[],gt=Boolean(dt.some(function(e){return e.text.trim()&&["evidence","gap"].includes(e.type.trim().toLowerCase())})||(null===(M=null==tt?void 0:tt.review_step.reason)||void 0===M?void 0:M.trim())||(null===(j=null==tt?void 0:tt.review_step.gap)||void 0===j?void 0:j.trim())),ct=null==tt?null:"boundary"===tt.kind?w.getBoundaryReviewActionBadgeLabel(tt.review_step,tt.segment,on.get(null!==(I=tt.segment.stable_key)&&void 0!==I?I:"")):w.getTitleReviewActionBadgeLabel(tt.review_step,tt.segment,on.get(null!==(B=tt.segment.stable_key)&&void 0!==B?B:"")),vt=null==tt?"":(null===(N=tt.segment.label)||void 0===N?void 0:N.trim())||tt.segment.title,mt=null==tt?void 0:tt.review_step.revert,pt=null==tt?void 0:tt.segment.revert,ft=function(e){return null==e?void 0:e.trim().toLowerCase()},ht=null==tt||null===(F=t.__spreadArray([],null!==(L=tt.segment.review_steps)&&void 0!==L?L:[],!0).reverse().find(function(e){var n,t,i=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===i||"page boundary review"===i)&&"boundary"===ft(null===(t=e.revert)||void 0===t?void 0:t.type)}))||void 0===F?void 0:F.revert,wt=null!==(T=null!=mt?mt:null==tt?void 0:tt.segment.revert)&&void 0!==T?T:ht,_t=null==wt?void 0:wt.decision.trim().toUpperCase(),yt=null!=ct?ct:(null==_t?void 0:_t.includes("SPLIT"))?"Split":(null==_t?void 0:_t.includes("MERGE"))?"Merged":null,bt="label"===(null==tt?void 0:tt.kind)&&"SET_RANGE"===(null===(q=null==ht?void 0:ht.decision)||void 0===q?void 0:q.trim().toUpperCase())&&ht.current_segment_ids.length!==ht.previous_state.length,St="Merged"===ct||"Split"===ct||bt,xt=null==tt?void 0:St?"boundary"===ft(null==ht?void 0:ht.type)?ht:"boundary"===ft(null==pt?void 0:pt.type)?pt:"boundary"===ft(null==mt?void 0:mt.type)?mt:void 0:"label"===tt.kind?"label"===ft(null==mt?void 0:mt.type)?mt:void 0:"boundary"===tt.kind?"boundary"===ft(null==mt?void 0:mt.type)?mt:"boundary"===ft(null==ht?void 0:ht.type)?ht:"boundary"===ft(null==pt?void 0:pt.type)?pt:void 0:void 0,Rt=St&&(null==xt?void 0:xt.operation_id)?ie.flatMap(function(e){var n;return null!==(n=e.review_steps)&&void 0!==n?n:[]}).find(function(e){var n,t,i,r,o,a,l,u=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===u||"page boundary review"===u)&&((null!==(o=null!==(i=null===(t=e.human_resolution)||void 0===t?void 0:t.operation_id)&&void 0!==i?i:null===(r=e.revert)||void 0===r?void 0:r.operation_id)&&void 0!==o?o:e.operation_id)===xt.operation_id&&Boolean(null===(l=null===(a=e.human_resolution)||void 0===a?void 0:a.change_summary)||void 0===l?void 0:l.trim()))}):void 0,Et=(null===(W=null==xt?void 0:xt.summary)||void 0===W?void 0:W.trim())||null,Ct="page"===(null==tt?void 0:tt.kind)?(null===(K=tt.review_step.summary)||void 0===K?void 0:K.trim())||"":St?(null===(G=null===(z=null==Rt?void 0:Rt.human_resolution)||void 0===z?void 0:z.change_summary)||void 0===G?void 0:G.trim())||(null===(O=null==xt?void 0:xt.summary)||void 0===O?void 0:O.trim())||"":(null===(Z=null===(V=null===(D=null==tt?void 0:tt.review_step)||void 0===D?void 0:D.human_resolution)||void 0===V?void 0:V.change_summary)||void 0===Z?void 0:Z.trim())||(null===(U=null===(H=null==tt?void 0:tt.review_step)||void 0===H?void 0:H.summary)||void 0===U?void 0:U.trim())||"",Pt=null==tt?null:xt?{currentSegment:{title:vt,startPage:tt.segment.start_page,endPage:tt.segment.end_page},previousSegments:xt.previous_state.map(function(e){var n,t;return{title:(null===(n=e.label)||void 0===n?void 0:n.trim())||(null===(t=e.title)||void 0===t?void 0:t.trim())||"Untitled document",startPage:e.start_page,endPage:e.end_page}})}:"Split"===yt?{currentSegment:{title:vt,startPage:tt.segment.start_page,endPage:tt.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:vt,startPage:tt.segment.start_page,endPage:tt.segment.end_page}]}:"Merged"===yt?{currentSegment:{title:vt,startPage:tt.segment.start_page,endPage:tt.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:"Request for proposal (RFP)",startPage:26,endPage:76}]}:{currentSegment:{title:vt,startPage:tt.segment.start_page,endPage:tt.segment.end_page},previousSegments:[]},kt="page"===(null==tt?void 0:tt.kind)&&null!==(X=tt.metadata.classification_id)&&void 0!==X?X:null,At="page"===(null==tt?void 0:tt.kind)?Boolean(Be&&kt):Boolean((null==xt?void 0:xt.operation_id)&&(null==xt?void 0:xt.type)&&!1!==(null==xt?void 0:xt.revertable));Boolean(Pt&&At&&("page"!==(null==tt?void 0:tt.kind)||kt));var Mt=r.useCallback(function(e,n){Dn.current+=1,Vn.current={requestId:Dn.current,pageNumber:e,reviewId:n},jn({pageNumber:e,requestId:Dn.current})},[]),jt=r.useCallback(function(e){var n;!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)&&(Kn(null),_n(e.id),Sn(e.id),En(!1),kn(null),Mt(e.pageNumber,e.id),null==Le||Le(e.id,e.segment))},[Le,Mt]);r.useEffect(function(){if(Wn){var e=requestAnimationFrame(function(){return On(!0)}),n=window.setTimeout(function(){On(!1)},3500),t=window.setTimeout(function(){Kn(null)},4e3);return function(){cancelAnimationFrame(e),window.clearTimeout(n),window.clearTimeout(t)}}},[Wn]),r.useEffect(function(){var e;if(Qe)if(Qe.reviewId){var n=cn.find(function(e){return e.id===Qe.reviewId&&(!Qe.type||e.kind===Qe.type)});n&&jt(n)}else if(Qe.classificationId){var t=cn.find(function(e){return"page"===e.kind&&e.metadata.classification_id===Qe.classificationId&&(!Qe.type||e.kind===Qe.type)});t&&jt(t)}else if(Qe.pageNumber&&Qe.type){var i=Number(Qe.pageNumber);if(Number.isInteger(i)&&!(i<1)){var r=null===(e=Qe.pageType)||void 0===e?void 0:e.trim().toLowerCase(),o=cn.find(function(e){var n="page"===e.kind?e.pageNumber:e.segment.start_page,t="page"!==e.kind||!r||e.metadata.page_type===r;return n===i&&e.kind===Qe.type&&t});o&&jt(o)}}},[Qe,jt,cn]);var It=r.useCallback(function(){Vn.current=null,En(!1),_n(null),kn(null),null==Le||Le(null,null)},[Le]),Bt=r.useCallback(function(e){var n;On(!1),Kn(null);var t=null!==(n=cn.find(function(n){return!nt.has(n.id)&&"boundary"===n.kind&&n.segment.start_page===e.startPage&&n.segment.end_page===e.endPage}))&&void 0!==n?n:cn.find(function(n){return!nt.has(n.id)&&n.segment.start_page<=e.startPage&&n.segment.end_page>=e.startPage});t?jt(t):(It(),Dn.current+=1,jn({pageNumber:e.startPage,requestId:Dn.current}))},[It,nt,cn,jt]),Nt=r.useCallback(function(e){var n;if(we){var t=cn.findIndex(function(n){return n.id===e}),i=new Set(cn.map(function(e){return e.id})),r=null!==(n=cn.find(function(n,r){return r>t&&n.id!==e&&i.has(n.id)}))&&void 0!==n?n:cn.find(function(n){return n.id!==e});r?requestAnimationFrame(function(){return jt(r)}):It()}else It()},[we,It,cn,jt,cn]),Lt=r.useCallback(function(e,n,i){return t.__awaiter(ee,void 0,void 0,function(){var r,o,a,u,s,d,g,v,m;return t.__generator(this,function(t){switch(t.label){case 0:if(We)return[2];if("boundary"===e.kind&&!Me)return[2];if("label"===e.kind&&!je)return[2];if("page"===e.kind&&!Ie)return[2];r=S(e),a=i,u=(o=n)===l.BoundaryReviewActionEnum.SET_RANGE?function(){var n=a.startPage,t=a.endPage;if(null==n||null==t)return null;var i=n<e.segment.start_page||t>e.segment.end_page,r=n>e.segment.start_page||t<e.segment.end_page;return i&&!r?n<e.segment.start_page?l.BoundaryReviewActionEnum.MERGE_PREV:l.BoundaryReviewActionEnum.MERGE_NEXT:r?l.BoundaryReviewActionEnum.SPLIT_HERE:null}():o,s="boundary"===e.kind&&null!=Me&&we&&(u===l.BoundaryReviewActionEnum.SPLIT_HERE||u===l.BoundaryReviewActionEnum.MERGE_NEXT||u===l.BoundaryReviewActionEnum.MERGE_PREV||u===l.BoundaryReviewActionEnum.MERGE_PREVIOUS),d=s?ie.findIndex(function(n){return c.getSegmentReviewKey(n)===c.getSegmentReviewKey(e.segment)}):-1,s&&d>=0&&u&&(Zn.current={action:u,originalSegmentIndex:d,segmentSignature:JSON.stringify(ie.map(function(e,n){var t;return{key:c.getSegmentReviewKey(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}})),ready:!1}),Tn(e.id),t.label=1;case 1:return t.trys.push([1,8,9,10]),"boundary"!==e.kind?[3,3]:[4,null==Me?void 0:Me(n,i,r)];case 2:return t.sent(),[3,7];case 3:return"label"!==e.kind?[3,5]:[4,null==je?void 0:je(n,i,r)];case 4:return t.sent(),[3,7];case 5:return"page"!==e.kind?[3,7]:[4,null==Ie?void 0:Ie(n,i,r)];case 6:t.sent(),t.label=7;case 7:return Nn(function(n){var t=new Set(n);return t.add(e.id),t}),g="boundary"===e.kind&&(u===l.BoundaryReviewActionEnum.MERGE_NEXT||u===l.BoundaryReviewActionEnum.MERGE_PREV||u===l.BoundaryReviewActionEnum.MERGE_PREVIOUS),("boundary"===e.kind&&u===l.BoundaryReviewActionEnum.SPLIT_HERE||g)&&u&&an(function(n){var t=new Map(n);return t.set(c.getSegmentReviewKey(e.segment),u),t}),Zn.current?(Zn.current.ready=!0,g&&(v=cn.find(function(n){return"label"===n.kind&&c.getSegmentReviewKey(n.segment)===c.getSegmentReviewKey(e.segment)}))&&requestAnimationFrame(function(){return jt(v)})):Nt(e.id),[3,10];case 8:return m=t.sent(),s&&(Zn.current=null),null==Te||Te(m,r),[3,10];case 9:return Tn(null),[7];case 10:return[2]}})})},[we,We,Te,Me,je,Ie,Be,cn,ie,jt,Nt]);r.useEffect(function(){var e=Zn.current;if(null==e?void 0:e.ready){var n=JSON.stringify(ie.map(function(e,n){var t;return{key:c.getSegmentReviewKey(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}}));if(n!==e.segmentSignature){var t=e.action===l.BoundaryReviewActionEnum.SPLIT_HERE?e.originalSegmentIndex+1:e.action===l.BoundaryReviewActionEnum.MERGE_PREV||e.action===l.BoundaryReviewActionEnum.MERGE_PREVIOUS?Math.max(0,e.originalSegmentIndex-1):e.originalSegmentIndex,i=new Map(ie.map(function(e,n){return[c.getSegmentReviewKey(e,n),n]})),r=cn.find(function(e){var n,r=i.get(c.getSegmentReviewKey(e.segment));return null!=r&&r>=t&&!w.isReviewStepResolved(e.review_step,e.segment)&&(!Bn.has(e.id)||!w.isReviewStepResolutionCurrent(e.review_step,e.segment))&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if(!r)return Zn.current=null,void It();requestAnimationFrame(function(){Zn.current=null,jt(r)})}}},[It,Bn,cn,ie,jt]),r.useEffect(function(){Zn.current||wn&&!cn.some(function(e){return e.id===wn})&&It()},[wn,It,cn]),r.useEffect(function(){if(fe&&!Zn.current){var e=cn.find(function(e){return e.pageNumber===pn});e&&e.id!==wn&&jt(e)}},[wn,fe,pn,jt,cn]),r.useEffect(function(){Zn.current||wn&&!cn.some(function(e){var n;return e.id===wn&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)})&&It()},[wn,It,cn]);var Ft=r.useMemo(function(){var e=cn.filter(function(e){var n;return!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if("all"===ce)return e;var n=["low","medium","high"].filter(function(e){return e!==de}),i=t.__spreadArray([de],n,!0),r=new Map(i.map(function(e,n){return[e,n]}));return e.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var t,o,a,l,u=null===(t=e.item.review_step.confidence)||void 0===t?void 0:t.trim().toLowerCase(),s=null===(o=n.item.review_step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==u?i.length:null!==(a=r.get(u))&&void 0!==a?a:i.length)-(null==s?i.length:null!==(l=r.get(s))&&void 0!==l?l:i.length)||e.index-n.index}).map(function(e){return e.item})},[ce,de,cn]),Tt=Ft.findIndex(function(e){return e.id===bn}),qt=r.useState(null),Wt=qt[0],Kt=qt[1],zt=r.useRef(!1),Gt=r.useCallback(function(e){var n=Ft[e];n&&jt(n)},[Ft,jt]);r.useEffect(function(){bn&&!Ft.some(function(e){return e.id===bn})&&Sn(null)},[Ft,bn]),r.useEffect(function(){zt.current=!1,Kt(Tt>=0?String(Tt+1):null)},[Tt,Ft.length]),r.useEffect(function(){if(zt.current&&null!=Wt){var e=window.setTimeout(function(){var e=Number(Wt.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<Ft.length&&(zt.current=!1,Gt(n))},300);return function(){return window.clearTimeout(e)}}},[Gt,Wt,Ft.length]);var Ot=r.useMemo(function(){var e=new Map;cn.forEach(function(n){var t,i=null!==(t=e.get(c.getSegmentReviewKey(n.segment)))&&void 0!==t?t:[];i.push(n),e.set(c.getSegmentReviewKey(n.segment),i)});var n=new Map;return e.forEach(function(e,t){var i,r=null!==(i=ln.get(t))&&void 0!==i?i:1;e.sort(function(e,n){return e.reviewStepIndex-n.reviewStepIndex}).forEach(function(e,t){n.set(e.id,"".concat(r).concat(function(e){for(var n=e+1,t="";n>0;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t}(t)))})}),n},[cn,ln]),Dt=r.useMemo(function(){var e=new Map;cn.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},[cn]),Vt=r.useCallback(function(e){return{startPage:Math.max(0,e.startPage-ye),endPage:Math.min(e.numPages-1,e.endPage+ye)}},[ye]),Zt=r.useCallback(function(){var e,n=Un.current,t=Xn.current;if(n&&t){var i=n.getBoundingClientRect(),r=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==r?void 0:r.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();if(cn.forEach(function(e){var n,r=Hn.current.get(e.id);if(r){var a=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(a){var l=a.getBoundingClientRect(),u=null!==(n=Dt.get(e.id))&&void 0!==n?n:0,s=l.top+Se+40*u,d=s+(r.offsetHeight||32),g=s>=o.top&&d<=o.bottom;r.style.top="".concat(s-i.top,"px"),r.style.visibility=g?"visible":"hidden"}else r.style.visibility="hidden"}}),wn&&null==Vn.current){var a=Hn.current.get(wn);a&&"hidden"!==a.style.visibility&&kn(function(e){return e===a?e:a})}}},[wn,Se,Dt,cn]),Ht=r.useCallback(function(e){var n=Vn.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Vn.current=null,Zt(),requestAnimationFrame(function(){if(null==Vn.current){var e=Hn.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&kn(e)}}))},[Zt]);return r.useEffect(function(){var e=Xn.current;if(e&&ue){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,Zt()}))};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()}}},[ue,Zt]),i.jsxs("div",t.__assign({ref:Un,className:Ue,style:t.__assign(t.__assign({},Xe),{display:"block",position:"relative",width:"100%",height:"100%",minWidth:0,overflowX:"auto",overflowY:"hidden"})},{children:[i.jsxs("div",t.__assign({className:"segment-review-wrapper__container",style:{display:"flex",alignItems:"stretch",gap:0,width:"100%",minWidth:700,height:"100%"}},{children:[i.jsx("div",t.__assign({ref:Xn,style:t.__assign(t.__assign({},Ye),{flex:"1 1 auto",width:ue?"auto":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:i.jsx(a.default,t.__assign({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},oe,{defaultScale:void 0===ae?null!==(Y=null==oe?void 0:oe.defaultScale)&&void 0!==Y?Y:o.SpecialZoomLevel.PageFit:b[ae],disablePdfAnnotations:ze,disablePdfTextLayer:Oe,pdfUrl:ne,pdfName:te,segments:vn,navigationRequest:Mn,onNavigationSettled:Ht,setRenderRange:Vt,onCurrentPageChange:function(e){fn(e),null==Vn.current&&tt&&tt.pageNumber!==e&&It(),null==Fe||Fe(e)}}))})),ue&&i.jsxs("aside",t.__assign({"aria-label":"Page review badges",ref:gn,style:t.__assign(t.__assign({},Je),{position:"relative",width:et,maxWidth:y,flex:"0 1 ".concat(et),minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[me&&Ft.length>0&&i.jsxs("nav",t.__assign({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:Re||"auto",left:Ce||"auto",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:[i.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=Wt?Wt:"-","aria-label":"Review badge number",onChange:function(e){zt.current=!0,Kt(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.jsxs("span",t.__assign({"aria-label":"".concat(Ft.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",Ft.length]})),["previous","next"].map(function(e){var n="previous"===e,r=Tt+(n?-1:1),o=r<0||r>=Ft.length;return i.jsx("button",t.__assign({type:"button","aria-label":"".concat(n?"Previous":"Next"," review badge"),disabled:o,onClick:function(){return Gt(r)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:o?"#C7D2FE":"#4F46E5",cursor:o?"default":"pointer"}},{children:i.jsx("svg",t.__assign({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:i.jsx("path",{d:n?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e)})]})),cn.map(function(e){var n,r,o=wn===e.id,a=null!==(n=Ot.get(e.id))&&void 0!==n?n:"1A",l=e.review_step.score,u=e.review_step.confidence,s=w.formatScore(l,u),d="boundary"===e.kind?w.getBoundaryReviewActionBadgeLabel(e.review_step,e.segment,on.get(c.getSegmentReviewKey(e.segment))):"label"===e.kind?w.getTitleReviewActionBadgeLabel(e.review_step,e.segment,on.get(c.getSegmentReviewKey(e.segment))):null,g=null!=d?d:"N/A"===s?s:"".concat(s,"%"),p=!0===(null===(r=e.segment.confidence)||void 0===r?void 0:r.awaiting_llm),f=w.getConfidenceColors(l,u,p),h=nt.has(e.id),_=p;return i.jsx(m.Tooltip,t.__assign({title:p?"data is being processed":"",arrow:!0},{children:i.jsx("span",t.__assign({ref:function(n){n?Hn.current.set(e.id,n):Hn.current.delete(e.id)},style:{position:"absolute",top:0,left:10,visibility:"hidden",display:"inline-flex",cursor:_?"not-allowed":"pointer"}},{children:i.jsx("button",t.__assign({disabled:_,type:"button","aria-pressed":o,"aria-label":p?"".concat(e.review_step.type," · Page ").concat(e.pageNumber," · Data is being processed"):"".concat(e.review_step.type," · Page ").concat(e.pageNumber),onClick:function(){return jt(e)},style:{cursor:"inherit",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:d?h&&!p?115:90:h&&!p?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(h&&!p?"#E2E8F0":f.border),borderRadius:16,backgroundColor:h&&!p?"#F8FAFC":f.background,color:h&&!p?"#475569":f.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:h&&!p?i.jsxs(m.Typography,t.__assign({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},{children:[i.jsx("span",t.__assign({style:{fontSize:11,fontWeight:500}},{children:a})),i.jsxs("span",t.__assign({style:{display:"flex",alignItems:"center"}},{children:[i.jsx("svg",t.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i.jsx("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),i.jsx("span",t.__assign({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:g}))]})),i.jsxs("span",t.__assign({style:{fontSize:11,fontWeight:500,display:"flex",alignItems:"center"}},{children:[i.jsx("svg",t.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i.jsx("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),i.jsx("span",t.__assign({style:{display:"flex",marginLeft:"7px",alignItems:"center"}},{children:i.jsx(v.CircleCheck,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]})):i.jsxs(m.Typography,t.__assign({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},{children:[i.jsx("span",t.__assign({style:{fontSize:11,fontWeight:500}},{children:a})),i.jsxs("span",t.__assign({style:{display:"flex",alignItems:"center"}},{children:[i.jsx("svg",t.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i.jsx("path",{d:"M0.399902 0V14",stroke:f.divider,strokeWidth:"0.8"})})),i.jsx("span",t.__assign({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:g}))]}))]}))}))}))}),e.id)})]}))]})),tt&&Pn&&i.jsxs(u.default,t.__assign({anchorElement:Pn,placement:"bottom-start",offset:{top:8},width:Math.min(Jn,y),maxWidth:y,heightBuffer:null!=Ae?Ae:25},{children:[Rn&&i.jsx(s.default,{width:"100%",maxWidth:"100%",score:tt.review_step.score,reasons:dt,reason:tt.review_step.reason,gap:tt.review_step.gap,onBack:function(){return En(!1)},onClose:It}),i.jsx("div",t.__assign({style:{display:Rn?"none":"block"}},{children:nt.has(tt.id)?i.jsx(p.default,{width:"100%",maxWidth:"100%",headerName:"page"===tt.kind?"Page format approved":"Split"===ct?"Split approved":"Merged"===ct?"Merge approved":"User approved",headerIcon:"page"===tt.kind?i.jsx(v.Check,{size:18,strokeWidth:2}):"Merged"===ct?i.jsx(v.GitMerge,{size:18,strokeWidth:2}):"Split"===ct?i.jsx(_.default,{width:18,height:18}):i.jsx(v.CircleCheck,{size:18,strokeWidth:2}),title:vt,pageNo:"Page ".concat(tt.segment.start_page,"-").concat(tt.segment.end_page),summary:Pt?i.jsx(f.default,{icon:i.jsx(v.CircleCheck,{size:14,strokeWidth:2}),title:vt,pageRange:"Page ".concat(tt.segment.start_page,"-").concat(tt.segment.end_page),description:null!=Ct?Ct:null,revertData:Pt,confirmDisabled:null==Ne||!At,showDocumentHeader:!1,onRevert:function(){if("page"===tt.kind){if(!Be||!kt){var e=new Error("SegmentReviewPdfWrapper requires onPageTypeRevert and a classification id to revert a page-type decision.");return null==Te||Te(e,S(tt)),Promise.reject(e)}return Be({classification_id:kt,human_verdict:"No"},S(tt))}if(!Ne)throw new Error("SegmentReviewPdfWrapper requires onRevert to handle a revert confirmation.");if(!xt)throw new Error("There is no valid revert operation for this review.");var n=St?"boundary":"label"===tt.kind?"label":"boundary"===tt.kind?"boundary":null,t=ft(xt.type);if(n&&t!==n)throw new Error("Cannot use ".concat(null!=t?t:"unknown"," revert metadata for this review. Expected ").concat(n,"."));return Ne(xt,S(tt))},onRevertError:function(e){null==Te||Te(e,S(tt))},onRevertComplete:function(e){var n,t,i,r,o,a;Nn(function(){return new Set}),"page"!==tt.kind&&an(function(){return new Map}),tt.id;var l=null!==(n=Pt.previousSegments[0])&&void 0!==n?n:Pt.currentSegment,u=null==Pn?void 0:Pn.getBoundingClientRect(),s=null===(t=Xn.current)||void 0===t?void 0:t.getBoundingClientRect(),d=Math.min(y,Math.max(220,Jn)),g=null!==(i=null==u?void 0:u.left)&&void 0!==i?i:(null!==(r=null==s?void 0:s.right)&&void 0!==r?r:window.innerWidth-d-8)+8,c=Math.max(8,Math.min(g,window.innerWidth-d-8)),v=null==(null==u?void 0:u.bottom)?Math.max(8,null!==(o=null==s?void 0:s.top)&&void 0!==o?o:8):u.bottom+8;Nn(function(){return new Set}),"page"!==tt.kind&&(Zn.current=null),On(!1),Kn({title:"Split"===ct?"Split reverted":"Merged"===ct?"Merge reverted":"Approval reverted",description:(null===(a=null==e?void 0:e.message)||void 0===a?void 0:a.trim())||("Split"===ct?"Pages ".concat(tt.segment.start_page,"-").concat(tt.segment.end_page," are now part of “Advice of Award” again. Review the boundary and title to confirm the document."):"Merged"===ct?"The documents have been separated again. Review their boundaries and titles to confirm them.":"“".concat(vt,"” is pending review again. Review the boundary and title to confirm the document.")),segment:l,position:{top:v,left:c,width:d}}),It()}},tt.id):void 0,cognitiveScore:tt.review_step.score,styles:{root:{borderColor:"#16A34A"},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:"#16A34A"}}},onCognitiveClick:gt?function(){En(!0),null==He||He(S(tt))}:void 0,onClose:It}):"boundary"===tt.kind?i.jsx(l.default,{width:"100%",maxWidth:"100%",title:tt.segment.label||tt.segment.title,pageNo:"Page ".concat(tt.pageNumber),content:null!==(J=tt.review_step.question)&&void 0!==J?J:null,revertSummary:Et,cognitiveScore:tt.review_step.score,metadata:tt.metadata,reviewAction:null!==(Q=tt.segment.review_action)&&void 0!==Q?Q:void 0,previousSegmentTitle:lt,nextSegmentTitle:ut,manualPrompt:null!=ke?ke:"Set a custom boundary",defaultStartPage:tt.segment.start_page,defaultEndPage:tt.segment.end_page,styles:{root:{borderColor:st.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:st.text}}},confirmDisabled:We||!Me||Fn===tt.id,onConfirm:function(e,n,t){t&&l.isBoundaryReviewAction(n.id)&&Lt(tt,n.id,t)},onAdjustManually:function(){return null==Ze?void 0:Ze(S(tt))},onCognitiveClick:gt?function(){En(!0),null==He||He(S(tt))}:void 0,onClose:It},tt.id):"label"===tt.kind?i.jsx(d.default,{width:"100%",maxWidth:"100%",title:tt.metadata.current_label||tt.segment.label||tt.segment.title,pageNo:"Pages ".concat(tt.segment.start_page,"-").concat(tt.segment.end_page),content:null!==($=tt.review_step.question)&&void 0!==$?$:null,revertSummary:Et,cognitiveScore:tt.review_step.score,metadata:tt.metadata,styles:{root:{borderColor:st.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:st.text}}},confirmDisabled:We||!je||Fn===tt.id,confirmationBlocked:it,confirmationWarning:it?"Please confirm the boundary before confirming the title.":void 0,onActionConfirm:function(e,n){Lt(tt,e,n)},onAdjustManually:function(){return null==Ze?void 0:Ze(S(tt))},onCognitiveClick:gt?function(){En(!0),null==He||He(S(tt))}:void 0,onClose:It},tt.id):i.jsx(g.default,{width:"100%",maxWidth:"100%",title:tt.segment.label||tt.segment.title,pageNo:"Page ".concat(tt.pageNumber),content:tt.review_step.reason,cognitiveScore:tt.review_step.score,pageType:tt.metadata.page_type,metadata:tt.metadata,styles:{root:{borderColor:st.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:st.text}}},confirmDisabled:We||!Ie||Fn===tt.id,onActionConfirm:function(e,n){Lt(tt,e,n)},onCognitiveClick:gt?function(){En(!0),null==He||He(S(tt))}:void 0,onClose:It},tt.id)}))]})),Wn&&i.jsx(m.Portal,{children:i.jsx(m.Box,t.__assign({"aria-live":"polite",sx:{position:"fixed",top:Wn.position.top,left:Wn.position.left,zIndex:1600,width:Wn.position.width,maxWidth:"calc(100vw - 16px)",opacity:Gn?1:0,transform:Gn?"translateY(0)":"translateY(-6px)",transition:"opacity 500ms ease, transform 500ms ease",filter:"drop-shadow(0 12px 24px rgba(15, 23, 42, 0.18))",pointerEvents:Gn?"auto":"none"}},{children:i.jsx(h.default,{title:Wn.title,description:Wn.description,onReview:function(){return Bt(Wn.segment)}})}))})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n,t=require("tslib"),i=require("react/jsx-runtime"),r=require("react"),o=require("@react-pdf-viewer/core"),a=require("../PdfViewer/PdfViewer.js"),l=require("./BoundaryCard.js"),u=require("./CardWrapper.js"),s=require("./CognitiveIntegrity.js"),d=require("./LabelCheck.js"),g=require("./PageCheck.js"),c=require("./reviewStepAdapters.js"),v=require("lucide-react"),m=require("@mui/material"),p=require("./ReviewedCard.js"),f=require("./RevertCard.js"),h=require("./RevertSuccessCard.js"),w=require("./helper.js"),_=require("./ChartBreakoutCircle.js"),y=260;exports.SegmentPdfSpecialZoomLevel=void 0,(n=exports.SegmentPdfSpecialZoomLevel||(exports.SegmentPdfSpecialZoomLevel={})).ActualSize="ActualSize",n.PageFit="PageFit",n.PageWidth="PageWidth";var b=((e={})[exports.SegmentPdfSpecialZoomLevel.ActualSize]=o.SpecialZoomLevel.ActualSize,e[exports.SegmentPdfSpecialZoomLevel.PageFit]=o.SpecialZoomLevel.PageFit,e[exports.SegmentPdfSpecialZoomLevel.PageWidth]=o.SpecialZoomLevel.PageWidth,e),S=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}};exports.default=function(e){var n,x,R,E,C,P,k,A,M,j,I,B,N,L,F,T,q,W,K,z,G,O,D,V,Z,H,U,X,Y,J,Q,$=this,ee=e.pdfUrl,ne=e.pdfName,te=e.segments,ie=e.styles,re=e.pdfViewerProps,oe=e.specialZoomLevel,ae=e.showBadges,le=void 0===ae||ae,ue=e.sortByConfidence,se=void 0===ue?"low":ue,de=e.filterByConfidence,ge=void 0===de?"all":de,ce=e.showBadgeNavigation,ve=void 0===ce||ce,me=e.autoSelectReviewOnPageChange,pe=void 0!==me&&me,fe=e.autoAdvanceAfterConfirm,he=void 0===fe||fe,we=e.badgePreloadPages,_e=void 0===we?8:we,ye=e.badgeOffsetTop,be=void 0===ye?20:ye,Se=e.badgeOffsetRight,xe=void 0===Se?68:Se,Re=e.badgeOffsetLeft,Ee=void 0===Re?0:Re,Ce=e.initialReviewId,Pe=e.manualPrompt,ke=e.heightBuffer,Ae=e.onBoundaryAction,Me=e.onLabelAction,je=e.onPageAction,Ie=e.onPageTypeRevert,Be=e.onRevert,Ne=e.onActiveReviewChange,Le=e.onCurrentPageChange,Fe=e.onActionError,Te=e.disableAllActions,qe=void 0!==Te&&Te,We=e.disablePdfAnnotations,Ke=void 0!==We&&We,ze=e.disablePdfTextLayer,Ge=void 0===ze||ze,Oe=e.disableTitleCheckUntilBoundaryCheckCompleted,De=void 0!==Oe&&Oe,Ve=e.onAdjustManually,Ze=e.onCognitiveClick,He=e.className,Ue=e.style,Xe=e.viewerStyle,Ye=e.railStyle,Je=e.redirectionData,Qe=r.useMemo(function(){return c.extractSegmentReviewData(te)},[te]),$e=Qe.boundaryReviews,en=Qe.labelReviews,nn=Qe.pageReviews,tn=r.useState(function(){return new Map}),rn=tn[0],on=tn[1],an=r.useMemo(function(){var e=new Map,n=1;return te.forEach(function(t,i){var r=c.getSegmentReviewKey(t,i);e.has(r)||(e.set(r,n),n+=1)}),e},[te]),ln=r.useMemo(function(){return new Set(en.map(function(e){return c.getSegmentReviewKey(e.segment)}))},[en]),un=r.useMemo(function(){return w.getPendingMergeImpactedSegmentKeys(te)},[te]);r.useEffect(function(){on(function(e){var n=!1,t=new Map(e);return e.forEach(function(e,i){var r=te.find(function(e){return c.getSegmentReviewKey(e)===i});r&&!w.hasPolledStructuralAction(r,e)||(t.delete(i),n=!0)}),n?t:e})},[te]);var sn=r.useMemo(function(){return w.getOptimisticMergeImpactedSegmentKeys(te,rn)},[rn,te]),dn=r.useRef(null),gn=r.useMemo(function(){return t.__spreadArray(t.__spreadArray(t.__spreadArray([],$e.filter(function(e){return!un.has(c.getSegmentReviewKey(e.segment))&&!sn.has(c.getSegmentReviewKey(e.segment))&&!w.shouldHideStructuralBoundaryReview(e.review_step,e.segment,ln.has(c.getSegmentReviewKey(e.segment)),rn.get(c.getSegmentReviewKey(e.segment)))}).map(function(e){var n;return t.__assign(t.__assign({},e),{kind:"boundary",pageNumber:null!==(n=e.metadata.focus_page)&&void 0!==n?n:e.segment.start_page})}),!0),en.filter(function(e){return!un.has(c.getSegmentReviewKey(e.segment))&&!sn.has(c.getSegmentReviewKey(e.segment))}).map(function(e){return t.__assign(t.__assign({},e),{kind:"label",pageNumber:e.segment.start_page})}),!0),nn.filter(function(e){return!un.has(c.getSegmentReviewKey(e.segment))&&!sn.has(c.getSegmentReviewKey(e.segment))}).map(function(e){var n;return t.__assign(t.__assign({},e),{kind:"page",pageNumber:null!==(n=e.metadata.page_num)&&void 0!==n?n:e.segment.start_page})}),!0).sort(function(e,n){var t,i,r=null!==(t=an.get(c.getSegmentReviewKey(e.segment)))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(i=an.get(c.getSegmentReviewKey(n.segment)))&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||r-o||e.reviewStepIndex-n.reviewStepIndex||e.id.localeCompare(n.id)})},[$e,en,nn,sn,rn,un,an,ln]),cn=r.useMemo(function(){return te.map(function(e){var n,i;return t.__assign(t.__assign({},e),{title:(null===(n=e.label)||void 0===n?void 0:n.trim())||e.title,page_count:null!==(i=e.page_count)&&void 0!==i?i:e.end_page-e.start_page+1})})},[te]),vn=r.useState(1),mn=vn[0],pn=vn[1],fn=r.useState(null!=Ce?Ce:null),hn=fn[0],wn=fn[1],_n=r.useState(null!=Ce?Ce:null),yn=_n[0],bn=_n[1],Sn=r.useState(!1),xn=Sn[0],Rn=Sn[1],En=r.useState(null),Cn=En[0],Pn=En[1],kn=r.useState(null),An=kn[0],Mn=kn[1],jn=r.useState(function(){return new Set}),In=jn[0],Bn=jn[1],Nn=r.useState(null),Ln=Nn[0],Fn=Nn[1],Tn=r.useState(null),qn=Tn[0],Wn=Tn[1],Kn=r.useState(!1),zn=Kn[0],Gn=Kn[1],On=r.useRef(0),Dn=r.useRef(null),Vn=r.useRef(null),Zn=r.useRef(new Map),Hn=r.useRef(null),Un=r.useRef(null),Xn=r.useState(y),Yn=Xn[0],Jn=Xn[1],Qn=null!==(x=null===(n=null==ie?void 0:ie.aside)||void 0===n?void 0:n.width)&&void 0!==x?x:"40%",$n="min(".concat("number"==typeof Qn?"".concat(Qn,"px"):Qn,", ").concat(y,"px, 100%)");r.useEffect(function(){Bn(function(e){if(0===e.size)return e;var n=new Set(e),t=!1;return gn.forEach(function(e){var i;null!=(null===(i=e.review_step.review)||void 0===i?void 0:i.action)&&n.has(e.id)&&(n.delete(e.id),t=!0)}),t?n:e})},[gn]),r.useEffect(function(){var e=dn.current;if(e&&le){var n=function(){var n=e.getBoundingClientRect().width;n>0&&Jn(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()}}},[le]);var et=r.useMemo(function(){var e=new Set;return gn.forEach(function(n){var t;null!=(null===(t=n.review_step.review)||void 0===t?void 0:t.action)&&e.add(n.id)}),e},[gn]),nt=r.useMemo(function(){var e;return null!==(e=gn.find(function(e){return e.id===hn}))&&void 0!==e?e:null},[hn,gn]),tt=r.useMemo(function(){return!(!De||"label"!==(null==nt?void 0:nt.kind))&&$e.some(function(e){if(c.getSegmentReviewKey(e.segment)!==c.getSegmentReviewKey(nt.segment)||et.has(e.id))return!1;var n=w.getResolvedScore(e.review_step.score,e.review_step.confidence);return null==n||n<85})},[nt,$e,De,et]),it=null==nt?-1:te.findIndex(function(e){return c.getSegmentReviewKey(e)===c.getSegmentReviewKey(nt.segment)}),rt=it>0?te[it-1]:void 0,ot=it>=0?te[it+1]:void 0,at=(null===(R=null==rt?void 0:rt.label)||void 0===R?void 0:R.trim())||(null==rt?void 0:rt.title),lt=(null===(E=null==ot?void 0:ot.label)||void 0===E?void 0:E.trim())||(null==ot?void 0:ot.title),ut=w.getConfidenceColors(null==nt?void 0:nt.review_step.score,null==nt?void 0:nt.review_step.confidence,null===(C=null==nt?void 0:nt.segment.confidence)||void 0===C?void 0:C.awaiting_llm),st=(null===(P=null==nt?void 0:nt.review_step.reasons)||void 0===P?void 0:P.length)?nt.review_step.reasons:null!==(A=null===(k=null==nt?void 0:nt.segment.confidence)||void 0===k?void 0:k.reasons)&&void 0!==A?A:[],dt=Boolean(st.some(function(e){return e.text.trim()&&["evidence","gap"].includes(e.type.trim().toLowerCase())})||(null===(M=null==nt?void 0:nt.review_step.reason)||void 0===M?void 0:M.trim())||(null===(j=null==nt?void 0:nt.review_step.gap)||void 0===j?void 0:j.trim())),gt=null==nt?null:"boundary"===nt.kind?w.getBoundaryReviewActionBadgeLabel(nt.review_step,nt.segment,rn.get(null!==(I=nt.segment.stable_key)&&void 0!==I?I:"")):w.getTitleReviewActionBadgeLabel(nt.review_step,nt.segment,rn.get(null!==(B=nt.segment.stable_key)&&void 0!==B?B:"")),ct=null==nt?"":(null===(N=nt.segment.label)||void 0===N?void 0:N.trim())||nt.segment.title,vt=null==nt?void 0:nt.review_step.revert,mt=null==nt?void 0:nt.segment.revert,pt=function(e){return null==e?void 0:e.trim().toLowerCase()},ft=null==nt||null===(F=t.__spreadArray([],null!==(L=nt.segment.review_steps)&&void 0!==L?L:[],!0).reverse().find(function(e){var n,t,i=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===i||"page boundary review"===i)&&"boundary"===pt(null===(t=e.revert)||void 0===t?void 0:t.type)}))||void 0===F?void 0:F.revert,ht=null!==(T=null!=vt?vt:null==nt?void 0:nt.segment.revert)&&void 0!==T?T:ft,wt=null==ht?void 0:ht.decision.trim().toUpperCase(),_t=null!=gt?gt:(null==wt?void 0:wt.includes("SPLIT"))?"Split":(null==wt?void 0:wt.includes("MERGE"))?"Merged":null,yt="label"===(null==nt?void 0:nt.kind)&&"SET_RANGE"===(null===(q=null==ft?void 0:ft.decision)||void 0===q?void 0:q.trim().toUpperCase())&&ft.current_segment_ids.length!==ft.previous_state.length,bt="Merged"===gt||"Split"===gt||yt,St=null==nt?void 0:bt?"boundary"===pt(null==ft?void 0:ft.type)?ft:"boundary"===pt(null==mt?void 0:mt.type)?mt:"boundary"===pt(null==vt?void 0:vt.type)?vt:void 0:"label"===nt.kind?"label"===pt(null==vt?void 0:vt.type)?vt:void 0:"boundary"===nt.kind?"boundary"===pt(null==vt?void 0:vt.type)?vt:"boundary"===pt(null==ft?void 0:ft.type)?ft:"boundary"===pt(null==mt?void 0:mt.type)?mt:void 0:void 0,xt=bt&&(null==St?void 0:St.operation_id)?te.flatMap(function(e){var n;return null!==(n=e.review_steps)&&void 0!==n?n:[]}).find(function(e){var n,t,i,r,o,a,l,u=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===u||"page boundary review"===u)&&((null!==(o=null!==(i=null===(t=e.human_resolution)||void 0===t?void 0:t.operation_id)&&void 0!==i?i:null===(r=e.revert)||void 0===r?void 0:r.operation_id)&&void 0!==o?o:e.operation_id)===St.operation_id&&Boolean(null===(l=null===(a=e.human_resolution)||void 0===a?void 0:a.change_summary)||void 0===l?void 0:l.trim()))}):void 0,Rt=(null===(W=null==St?void 0:St.summary)||void 0===W?void 0:W.trim())||null,Et=bt?(null===(z=null===(K=null==xt?void 0:xt.human_resolution)||void 0===K?void 0:K.change_summary)||void 0===z?void 0:z.trim())||(null===(G=null==St?void 0:St.summary)||void 0===G?void 0:G.trim())||"":(null===(V=null===(D=null===(O=null==nt?void 0:nt.review_step)||void 0===O?void 0:O.human_resolution)||void 0===D?void 0:D.change_summary)||void 0===V?void 0:V.trim())||(null===(H=null===(Z=null==nt?void 0:nt.review_step)||void 0===Z?void 0:Z.summary)||void 0===H?void 0:H.trim())||"",Ct=null==nt?null:St?{currentSegment:{title:ct,startPage:nt.segment.start_page,endPage:nt.segment.end_page},previousSegments:St.previous_state.map(function(e){var n,t;return{title:(null===(n=e.label)||void 0===n?void 0:n.trim())||(null===(t=e.title)||void 0===t?void 0:t.trim())||"Untitled document",startPage:e.start_page,endPage:e.end_page}})}:"Split"===_t?{currentSegment:{title:ct,startPage:nt.segment.start_page,endPage:nt.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:ct,startPage:nt.segment.start_page,endPage:nt.segment.end_page}]}:"Merged"===_t?{currentSegment:{title:ct,startPage:nt.segment.start_page,endPage:nt.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:"Request for proposal (RFP)",startPage:26,endPage:76}]}:{currentSegment:{title:ct,startPage:nt.segment.start_page,endPage:nt.segment.end_page},previousSegments:[]},Pt="page"===(null==nt?void 0:nt.kind)&&null!==(U=nt.metadata.classification_id)&&void 0!==U?U:null,kt="page"===(null==nt?void 0:nt.kind)?Boolean(Ie&&Pt):Boolean((null==St?void 0:St.operation_id)&&(null==St?void 0:St.type)&&!1!==(null==St?void 0:St.revertable));Boolean(Ct&&kt&&("page"!==(null==nt?void 0:nt.kind)||Pt));var At=r.useCallback(function(e,n){On.current+=1,Dn.current={requestId:On.current,pageNumber:e,reviewId:n},Mn({pageNumber:e,requestId:On.current})},[]),Mt=r.useCallback(function(e){var n;!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)&&(Wn(null),wn(e.id),bn(e.id),Rn(!1),Pn(null),At(e.pageNumber,e.id),null==Ne||Ne(e.id,e.segment))},[Ne,At]);r.useEffect(function(){if(qn){var e=requestAnimationFrame(function(){return Gn(!0)}),n=window.setTimeout(function(){Gn(!1)},3500),t=window.setTimeout(function(){Wn(null)},4e3);return function(){cancelAnimationFrame(e),window.clearTimeout(n),window.clearTimeout(t)}}},[qn]),r.useEffect(function(){var e;if(Je)if(Je.reviewId){var n=gn.find(function(e){return e.id===Je.reviewId&&(!Je.type||e.kind===Je.type)});n&&Mt(n)}else if(Je.classificationId){var t=gn.find(function(e){return"page"===e.kind&&e.metadata.classification_id===Je.classificationId&&(!Je.type||e.kind===Je.type)});t&&Mt(t)}else if(Je.pageNumber&&Je.type){var i=Number(Je.pageNumber);if(Number.isInteger(i)&&!(i<1)){var r=null===(e=Je.pageType)||void 0===e?void 0:e.trim().toLowerCase(),o=gn.find(function(e){var n="page"===e.kind?e.pageNumber:e.segment.start_page,t="page"!==e.kind||!r||e.metadata.page_type===r;return n===i&&e.kind===Je.type&&t});o&&Mt(o)}}},[Je,Mt,gn]);var jt=r.useCallback(function(){Dn.current=null,Rn(!1),wn(null),Pn(null),null==Ne||Ne(null,null)},[Ne]),It=r.useCallback(function(e){var n;Gn(!1),Wn(null);var t=null!==(n=gn.find(function(n){return!et.has(n.id)&&"boundary"===n.kind&&n.segment.start_page===e.startPage&&n.segment.end_page===e.endPage}))&&void 0!==n?n:gn.find(function(n){return!et.has(n.id)&&n.segment.start_page<=e.startPage&&n.segment.end_page>=e.startPage});t?Mt(t):(jt(),On.current+=1,Mn({pageNumber:e.startPage,requestId:On.current}))},[jt,et,gn,Mt]),Bt=r.useCallback(function(e){var n;if(he){var t=gn.findIndex(function(n){return n.id===e}),i=new Set(gn.map(function(e){return e.id})),r=null!==(n=gn.find(function(n,r){return r>t&&n.id!==e&&i.has(n.id)}))&&void 0!==n?n:gn.find(function(n){return n.id!==e});r?requestAnimationFrame(function(){return Mt(r)}):jt()}else jt()},[he,jt,gn,Mt,gn]),Nt=r.useCallback(function(e,n,i){return t.__awaiter($,void 0,void 0,function(){var r,o,a,u,s,d,g,v,m;return t.__generator(this,function(t){switch(t.label){case 0:if(qe)return[2];if("boundary"===e.kind&&!Ae)return[2];if("label"===e.kind&&!Me)return[2];if("page"===e.kind&&!je)return[2];r=S(e),a=i,u=(o=n)===l.BoundaryReviewActionEnum.SET_RANGE?function(){var n=a.startPage,t=a.endPage;if(null==n||null==t)return null;var i=n<e.segment.start_page||t>e.segment.end_page,r=n>e.segment.start_page||t<e.segment.end_page;return i&&!r?n<e.segment.start_page?l.BoundaryReviewActionEnum.MERGE_PREV:l.BoundaryReviewActionEnum.MERGE_NEXT:r?l.BoundaryReviewActionEnum.SPLIT_HERE:null}():o,s="boundary"===e.kind&&null!=Ae&&he&&(u===l.BoundaryReviewActionEnum.SPLIT_HERE||u===l.BoundaryReviewActionEnum.MERGE_NEXT||u===l.BoundaryReviewActionEnum.MERGE_PREV||u===l.BoundaryReviewActionEnum.MERGE_PREVIOUS),d=s?te.findIndex(function(n){return c.getSegmentReviewKey(n)===c.getSegmentReviewKey(e.segment)}):-1,s&&d>=0&&u&&(Vn.current={action:u,originalSegmentIndex:d,segmentSignature:JSON.stringify(te.map(function(e,n){var t;return{key:c.getSegmentReviewKey(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}})),ready:!1}),Fn(e.id),t.label=1;case 1:return t.trys.push([1,8,9,10]),"boundary"!==e.kind?[3,3]:[4,null==Ae?void 0:Ae(n,i,r)];case 2:return t.sent(),[3,7];case 3:return"label"!==e.kind?[3,5]:[4,null==Me?void 0:Me(n,i,r)];case 4:return t.sent(),[3,7];case 5:return"page"!==e.kind?[3,7]:[4,null==je?void 0:je(n,i,r)];case 6:t.sent(),t.label=7;case 7:return Bn(function(n){var t=new Set(n);return t.add(e.id),t}),g="boundary"===e.kind&&(u===l.BoundaryReviewActionEnum.MERGE_NEXT||u===l.BoundaryReviewActionEnum.MERGE_PREV||u===l.BoundaryReviewActionEnum.MERGE_PREVIOUS),("boundary"===e.kind&&u===l.BoundaryReviewActionEnum.SPLIT_HERE||g)&&u&&on(function(n){var t=new Map(n);return t.set(c.getSegmentReviewKey(e.segment),u),t}),Vn.current?(Vn.current.ready=!0,g&&(v=gn.find(function(n){return"label"===n.kind&&c.getSegmentReviewKey(n.segment)===c.getSegmentReviewKey(e.segment)}))&&requestAnimationFrame(function(){return Mt(v)})):Bt(e.id),[3,10];case 8:return m=t.sent(),s&&(Vn.current=null),null==Fe||Fe(m,r),[3,10];case 9:return Fn(null),[7];case 10:return[2]}})})},[he,qe,Fe,Ae,Me,je,Ie,gn,te,Mt,Bt]);r.useEffect(function(){var e=Vn.current;if(null==e?void 0:e.ready){var n=JSON.stringify(te.map(function(e,n){var t;return{key:c.getSegmentReviewKey(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}}));if(n!==e.segmentSignature){var t=e.action===l.BoundaryReviewActionEnum.SPLIT_HERE?e.originalSegmentIndex+1:e.action===l.BoundaryReviewActionEnum.MERGE_PREV||e.action===l.BoundaryReviewActionEnum.MERGE_PREVIOUS?Math.max(0,e.originalSegmentIndex-1):e.originalSegmentIndex,i=new Map(te.map(function(e,n){return[c.getSegmentReviewKey(e,n),n]})),r=gn.find(function(e){var n,r=i.get(c.getSegmentReviewKey(e.segment));return null!=r&&r>=t&&!w.isReviewStepResolved(e.review_step,e.segment)&&(!In.has(e.id)||!w.isReviewStepResolutionCurrent(e.review_step,e.segment))&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if(!r)return Vn.current=null,void jt();requestAnimationFrame(function(){Vn.current=null,Mt(r)})}}},[jt,In,gn,te,Mt]),r.useEffect(function(){Vn.current||hn&&!gn.some(function(e){return e.id===hn})&&jt()},[hn,jt,gn]),r.useEffect(function(){if(pe&&!Vn.current){var e=gn.find(function(e){return e.pageNumber===mn});e&&e.id!==hn&&Mt(e)}},[hn,pe,mn,Mt,gn]),r.useEffect(function(){Vn.current||hn&&!gn.some(function(e){var n;return e.id===hn&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)})&&jt()},[hn,jt,gn]);var Lt=r.useMemo(function(){var e=gn.filter(function(e){var n;return!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if("all"===ge)return e;var n=["low","medium","high"].filter(function(e){return e!==se}),i=t.__spreadArray([se],n,!0),r=new Map(i.map(function(e,n){return[e,n]}));return e.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var t,o,a,l,u=null===(t=e.item.review_step.confidence)||void 0===t?void 0:t.trim().toLowerCase(),s=null===(o=n.item.review_step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==u?i.length:null!==(a=r.get(u))&&void 0!==a?a:i.length)-(null==s?i.length:null!==(l=r.get(s))&&void 0!==l?l:i.length)||e.index-n.index}).map(function(e){return e.item})},[ge,se,gn]),Ft=Lt.findIndex(function(e){return e.id===yn}),Tt=r.useState(null),qt=Tt[0],Wt=Tt[1],Kt=r.useRef(!1),zt=r.useCallback(function(e){var n=Lt[e];n&&Mt(n)},[Lt,Mt]);r.useEffect(function(){yn&&!Lt.some(function(e){return e.id===yn})&&bn(null)},[Lt,yn]),r.useEffect(function(){Kt.current=!1,Wt(Ft>=0?String(Ft+1):null)},[Ft,Lt.length]),r.useEffect(function(){if(Kt.current&&null!=qt){var e=window.setTimeout(function(){var e=Number(qt.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<Lt.length&&(Kt.current=!1,zt(n))},300);return function(){return window.clearTimeout(e)}}},[zt,qt,Lt.length]);var Gt=r.useMemo(function(){var e=new Map;gn.forEach(function(n){var t,i=null!==(t=e.get(c.getSegmentReviewKey(n.segment)))&&void 0!==t?t:[];i.push(n),e.set(c.getSegmentReviewKey(n.segment),i)});var n=new Map;return e.forEach(function(e,t){var i,r=null!==(i=an.get(t))&&void 0!==i?i:1;e.sort(function(e,n){return e.reviewStepIndex-n.reviewStepIndex}).forEach(function(e,t){n.set(e.id,"".concat(r).concat(function(e){for(var n=e+1,t="";n>0;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t}(t)))})}),n},[gn,an]),Ot=r.useMemo(function(){var e=new Map;gn.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},[gn]),Dt=r.useCallback(function(e){return{startPage:Math.max(0,e.startPage-_e),endPage:Math.min(e.numPages-1,e.endPage+_e)}},[_e]),Vt=r.useCallback(function(){var e,n=Hn.current,t=Un.current;if(n&&t){var i=n.getBoundingClientRect(),r=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==r?void 0:r.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();if(gn.forEach(function(e){var n,r=Zn.current.get(e.id);if(r){var a=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(a){var l=a.getBoundingClientRect(),u=null!==(n=Ot.get(e.id))&&void 0!==n?n:0,s=l.top+be+40*u,d=s+(r.offsetHeight||32),g=s>=o.top&&d<=o.bottom;r.style.top="".concat(s-i.top,"px"),r.style.visibility=g?"visible":"hidden"}else r.style.visibility="hidden"}}),hn&&null==Dn.current){var a=Zn.current.get(hn);a&&"hidden"!==a.style.visibility&&Pn(function(e){return e===a?e:a})}}},[hn,be,Ot,gn]),Zt=r.useCallback(function(e){var n=Dn.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(Dn.current=null,Vt(),requestAnimationFrame(function(){if(null==Dn.current){var e=Zn.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&Pn(e)}}))},[Vt]);return r.useEffect(function(){var e=Un.current;if(e&&le){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,Vt()}))};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()}}},[le,Vt]),i.jsxs("div",t.__assign({ref:Hn,className:He,style:t.__assign(t.__assign({},Ue),{display:"block",position:"relative",width:"100%",height:"100%",minWidth:0,overflowX:"auto",overflowY:"hidden"})},{children:[i.jsxs("div",t.__assign({className:"segment-review-wrapper__container",style:{display:"flex",alignItems:"stretch",gap:0,width:"100%",minWidth:700,height:"100%"}},{children:[i.jsx("div",t.__assign({ref:Un,style:t.__assign(t.__assign({},Xe),{flex:"1 1 auto",width:le?"auto":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:i.jsx(a.default,t.__assign({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},re,{defaultScale:void 0===oe?null!==(X=null==re?void 0:re.defaultScale)&&void 0!==X?X:o.SpecialZoomLevel.PageFit:b[oe],disablePdfAnnotations:Ke,disablePdfTextLayer:Ge,pdfUrl:ee,pdfName:ne,segments:cn,navigationRequest:An,onNavigationSettled:Zt,setRenderRange:Dt,onCurrentPageChange:function(e){pn(e),null==Dn.current&&nt&&nt.pageNumber!==e&&jt(),null==Le||Le(e)}}))})),le&&i.jsxs("aside",t.__assign({"aria-label":"Page review badges",ref:dn,style:t.__assign(t.__assign({},Ye),{position:"relative",width:$n,maxWidth:y,flex:"0 1 ".concat($n),minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[ve&&Lt.length>0&&i.jsxs("nav",t.__assign({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:xe||"auto",left:Ee||"auto",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:[i.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",value:null!=qt?qt:"-","aria-label":"Review badge number",onChange:function(e){Kt.current=!0,Wt(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.jsxs("span",t.__assign({"aria-label":"".concat(Lt.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",Lt.length]})),["previous","next"].map(function(e){var n="previous"===e,r=Ft+(n?-1:1),o=r<0||r>=Lt.length;return i.jsx("button",t.__assign({type:"button","aria-label":"".concat(n?"Previous":"Next"," review badge"),disabled:o,onClick:function(){return zt(r)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:o?"#C7D2FE":"#4F46E5",cursor:o?"default":"pointer"}},{children:i.jsx("svg",t.__assign({width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},{children:i.jsx("path",{d:n?"M1 7L6 2L11 7":"M1 1L6 6L11 1",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e)})]})),gn.map(function(e){var n,r,o=hn===e.id,a=null!==(n=Gt.get(e.id))&&void 0!==n?n:"1A",l=e.review_step.score,u=e.review_step.confidence,s=w.formatScore(l,u),d="boundary"===e.kind?w.getBoundaryReviewActionBadgeLabel(e.review_step,e.segment,rn.get(c.getSegmentReviewKey(e.segment))):"label"===e.kind?w.getTitleReviewActionBadgeLabel(e.review_step,e.segment,rn.get(c.getSegmentReviewKey(e.segment))):null,g=null!=d?d:"N/A"===s?s:"".concat(s,"%"),p=!0===(null===(r=e.segment.confidence)||void 0===r?void 0:r.awaiting_llm),f=w.getConfidenceColors(l,u,p),h=et.has(e.id),_=p;return i.jsx(m.Tooltip,t.__assign({title:p?"data is being processed":"",arrow:!0},{children:i.jsx("span",t.__assign({ref:function(n){n?Zn.current.set(e.id,n):Zn.current.delete(e.id)},style:{position:"absolute",top:0,left:10,visibility:"hidden",display:"inline-flex",cursor:_?"not-allowed":"pointer"}},{children:i.jsx("button",t.__assign({disabled:_,type:"button","aria-pressed":o,"aria-label":p?"".concat(e.review_step.type," · Page ").concat(e.pageNumber," · Data is being processed"):"".concat(e.review_step.type," · Page ").concat(e.pageNumber),onClick:function(){return Mt(e)},style:{cursor:"inherit",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:d?h&&!p?115:90:h&&!p?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(h&&!p?"#E2E8F0":f.border),borderRadius:16,backgroundColor:h&&!p?"#F8FAFC":f.background,color:h&&!p?"#475569":f.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:h&&!p?i.jsxs(m.Typography,t.__assign({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},{children:[i.jsx("span",t.__assign({style:{fontSize:11,fontWeight:500}},{children:a})),i.jsxs("span",t.__assign({style:{display:"flex",alignItems:"center"}},{children:[i.jsx("svg",t.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i.jsx("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),i.jsx("span",t.__assign({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:g}))]})),i.jsxs("span",t.__assign({style:{fontSize:11,fontWeight:500,display:"flex",alignItems:"center"}},{children:[i.jsx("svg",t.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i.jsx("path",{d:"M0.399902 0V14",stroke:"#CBD5E1",strokeWidth:"0.8"})})),i.jsx("span",t.__assign({style:{display:"flex",marginLeft:"7px",alignItems:"center"}},{children:i.jsx(v.CircleCheck,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]})):i.jsxs(m.Typography,t.__assign({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},{children:[i.jsx("span",t.__assign({style:{fontSize:11,fontWeight:500}},{children:a})),i.jsxs("span",t.__assign({style:{display:"flex",alignItems:"center"}},{children:[i.jsx("svg",t.__assign({width:"2",height:"14",viewBox:"0 0 1 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i.jsx("path",{d:"M0.399902 0V14",stroke:f.divider,strokeWidth:"0.8"})})),i.jsx("span",t.__assign({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:g}))]}))]}))}))}))}),e.id)})]}))]})),nt&&Cn&&i.jsxs(u.default,t.__assign({anchorElement:Cn,placement:"bottom-start",offset:{top:8},width:Math.min(Yn,y),maxWidth:y,heightBuffer:null!=ke?ke:25},{children:[xn&&i.jsx(s.default,{width:"100%",maxWidth:"100%",score:nt.review_step.score,reasons:st,reason:nt.review_step.reason,gap:nt.review_step.gap,onBack:function(){return Rn(!1)},onClose:jt}),i.jsx("div",t.__assign({style:{display:xn?"none":"block"}},{children:et.has(nt.id)?i.jsx(p.default,{width:"100%",maxWidth:"100%",headerName:"page"===nt.kind?"Page format approved":"Split"===gt?"Split approved":"Merged"===gt?"Merge approved":"User approved",headerIcon:"page"===nt.kind?i.jsx(v.Check,{size:18,strokeWidth:2}):"Merged"===gt?i.jsx(v.GitMerge,{size:18,strokeWidth:2}):"Split"===gt?i.jsx(_.default,{width:18,height:18}):i.jsx(v.CircleCheck,{size:18,strokeWidth:2}),title:ct,pageNo:"Page ".concat(nt.segment.start_page,"-").concat(nt.segment.end_page),summary:Ct?i.jsx(f.default,{icon:i.jsx(v.CircleCheck,{size:14,strokeWidth:2}),title:ct,pageRange:"Page ".concat(nt.segment.start_page,"-").concat(nt.segment.end_page),description:null!=Et?Et:null,revertData:Ct,confirmDisabled:null==Be||!kt,showDocumentHeader:!1,onRevert:function(){if("page"===nt.kind){if(!Ie||!Pt){var e=new Error("SegmentReviewPdfWrapper requires onPageTypeRevert and a classification id to revert a page-type decision.");return null==Fe||Fe(e,S(nt)),Promise.reject(e)}return Ie({classification_id:Pt,human_verdict:"No"},S(nt))}if(!Be)throw new Error("SegmentReviewPdfWrapper requires onRevert to handle a revert confirmation.");if(!St)throw new Error("There is no valid revert operation for this review.");var n=bt?"boundary":"label"===nt.kind?"label":"boundary"===nt.kind?"boundary":null,t=pt(St.type);if(n&&t!==n)throw new Error("Cannot use ".concat(null!=t?t:"unknown"," revert metadata for this review. Expected ").concat(n,"."));return Be(St,S(nt))},onRevertError:function(e){null==Fe||Fe(e,S(nt))},onRevertComplete:function(e){var n,t,i,r,o,a;Bn(function(){return new Set}),"page"!==nt.kind&&on(function(){return new Map}),nt.id;var l=null!==(n=Ct.previousSegments[0])&&void 0!==n?n:Ct.currentSegment,u=null==Cn?void 0:Cn.getBoundingClientRect(),s=null===(t=Un.current)||void 0===t?void 0:t.getBoundingClientRect(),d=Math.min(y,Math.max(220,Yn)),g=null!==(i=null==u?void 0:u.left)&&void 0!==i?i:(null!==(r=null==s?void 0:s.right)&&void 0!==r?r:window.innerWidth-d-8)+8,c=Math.max(8,Math.min(g,window.innerWidth-d-8)),v=null==(null==u?void 0:u.bottom)?Math.max(8,null!==(o=null==s?void 0:s.top)&&void 0!==o?o:8):u.bottom+8;Bn(function(){return new Set}),"page"!==nt.kind&&(Vn.current=null),Gn(!1),Wn({title:"Split"===gt?"Split reverted":"Merged"===gt?"Merge reverted":"Approval reverted",description:(null===(a=null==e?void 0:e.message)||void 0===a?void 0:a.trim())||("Split"===gt?"Pages ".concat(nt.segment.start_page,"-").concat(nt.segment.end_page," are now part of “Advice of Award” again. Review the boundary and title to confirm the document."):"Merged"===gt?"The documents have been separated again. Review their boundaries and titles to confirm them.":"“".concat(ct,"” is pending review again. Review the boundary and title to confirm the document.")),segment:l,position:{top:v,left:c,width:d}}),jt()}},nt.id):void 0,cognitiveScore:nt.review_step.score,styles:{root:{borderColor:"#16A34A"},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:"#16A34A"}}},onCognitiveClick:dt?function(){Rn(!0),null==Ze||Ze(S(nt))}:void 0,onClose:jt}):"boundary"===nt.kind?i.jsx(l.default,{width:"100%",maxWidth:"100%",title:nt.segment.label||nt.segment.title,pageNo:"Page ".concat(nt.pageNumber),content:null!==(Y=nt.review_step.question)&&void 0!==Y?Y:null,revertSummary:Rt,cognitiveScore:nt.review_step.score,metadata:nt.metadata,reviewAction:null!==(J=nt.segment.review_action)&&void 0!==J?J:void 0,previousSegmentTitle:at,nextSegmentTitle:lt,manualPrompt:null!=Pe?Pe:"Set a custom boundary",defaultStartPage:nt.segment.start_page,defaultEndPage:nt.segment.end_page,styles:{root:{borderColor:ut.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:ut.text}}},confirmDisabled:qe||!Ae||Ln===nt.id,onConfirm:function(e,n,t){t&&l.isBoundaryReviewAction(n.id)&&Nt(nt,n.id,t)},onAdjustManually:function(){return null==Ve?void 0:Ve(S(nt))},onCognitiveClick:dt?function(){Rn(!0),null==Ze||Ze(S(nt))}:void 0,onClose:jt},nt.id):"label"===nt.kind?i.jsx(d.default,{width:"100%",maxWidth:"100%",title:nt.metadata.current_label||nt.segment.label||nt.segment.title,pageNo:"Pages ".concat(nt.segment.start_page,"-").concat(nt.segment.end_page),content:null!==(Q=nt.review_step.question)&&void 0!==Q?Q:null,revertSummary:Rt,cognitiveScore:nt.review_step.score,metadata:nt.metadata,styles:{root:{borderColor:ut.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:ut.text}}},confirmDisabled:qe||!Me||Ln===nt.id,confirmationBlocked:tt,confirmationWarning:tt?"Please confirm the boundary before confirming the title.":void 0,onActionConfirm:function(e,n){Nt(nt,e,n)},onAdjustManually:function(){return null==Ve?void 0:Ve(S(nt))},onCognitiveClick:dt?function(){Rn(!0),null==Ze||Ze(S(nt))}:void 0,onClose:jt},nt.id):i.jsx(g.default,{width:"100%",maxWidth:"100%",title:nt.segment.label||nt.segment.title,pageNo:"Page ".concat(nt.pageNumber),content:nt.review_step.reason,cognitiveScore:nt.review_step.score,pageType:nt.metadata.page_type,metadata:nt.metadata,styles:{root:{borderColor:ut.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:ut.text}}},confirmDisabled:qe||!je||Ln===nt.id,onActionConfirm:function(e,n){Nt(nt,e,n)},onCognitiveClick:dt?function(){Rn(!0),null==Ze||Ze(S(nt))}:void 0,onClose:jt},nt.id)}))]})),qn&&i.jsx(m.Portal,{children:i.jsx(m.Box,t.__assign({"aria-live":"polite",sx:{position:"fixed",top:qn.position.top,left:qn.position.left,zIndex:1600,width:qn.position.width,maxWidth:"calc(100vw - 16px)",opacity:zn?1:0,transform:zn?"translateY(0)":"translateY(-6px)",transition:"opacity 500ms ease, transform 500ms ease",filter:"drop-shadow(0 12px 24px rgba(15, 23, 42, 0.18))",pointerEvents:zn?"auto":"none"}},{children:i.jsx(h.default,{title:qn.title,description:qn.description,onReview:function(){return It(qn.segment)}})}))})]}))};
2
2
  //# sourceMappingURL=SegmentReviewPdfWrapper.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./BoundaryCard.js"),n=require("./LabelCheck.js"),i=require("./PageCheck.js"),a=function(e){return"object"==typeof e&&null!==e?e:{}},t=function(e){return"string"==typeof e?e:null},o=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},r=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},l=function(e){var n="string"==typeof e?e.trim().toLowerCase():"";return"table"===n||"drawing"===n?n:null},u=function(e,n){return void 0===n&&(n=0),e.stable_key||e.segment_id||"".concat(e.start_page,"-").concat(e.end_page,"-").concat(n)},c=function(e){var i=a(e);return{current_label:t(i.current_label),custom_label:t(i.custom_label),group_id:t(i.group_id),user_actions:r(i.user_actions).filter(n.isLabelReviewAction)}},s=function(e){var n=a(e);return{page_type:l(n.page_type),page_num:o(n.page_num),classification_id:t(n.classification_id),user_actions:r(n.user_actions).filter(i.isPageCheckAction)}};exports.extractSegmentReviewData=function(n){var t=[],d=[],v=[];return n.forEach(function(n,p){var _,f,g=u(n,p),m=null!==(_=n.review_steps)&&void 0!==_?_:[];m.forEach(function(i,l){var u,p,_=(u=i.type,"page_boundary"===(p=u.trim().toLowerCase())||"page boundary review"===p?"boundary":"label"===p||"label review"===p?"label":"page"===p?"page":null);if("boundary"===_){var f=function(n){var i=a(n);return{focus_page:o(i.focus_page),boundary_margin:o(i.boundary_margin),user_actions:r(i.user_actions).filter(e.isBoundaryReviewAction)}}(i.metadata);t.push({id:"".concat(g,":boundary:").concat(l),reviewStepIndex:l,segment:n,review_step:i,metadata:f})}"label"===_&&d.push({id:"".concat(g,":label:").concat(l),reviewStepIndex:l,segment:n,review_step:i,metadata:c(i.metadata)}),"page"===_&&v.push({id:"".concat(g,":page:").concat(l),reviewStepIndex:l,segment:n,review_step:i,metadata:s(i.metadata)})});var y=0;null===(f=n.page_classifications)||void 0===f||f.forEach(function(e,a){var t,o,r=null!==(t=e.page_num)&&void 0!==t?t:null,u=null!==(o=e.questions)&&void 0!==o?o:[];(u.length>0?u:e.severity?[e]:[]).forEach(function(t,o){var u,c,d,p;if(l(t.page_type)){var _=function(e,n,a,t){var o,r,u,c,s,d,v,p,_,f,g,m,y,b,h,w=l(e.page_type),C=null===(r=null===(o=e.human_action)||void 0===o?void 0:o.verdict)||void 0===r?void 0:r.trim().toUpperCase(),x=C&&i.isPageCheckAction(C)?C:null;return{type:"page",confirmed:a,title:"Page Type Check",summary:(null==t?void 0:t.trim())||void 0,format:"pdf",confidence:null!==(c=null===(u=e.machine_classification)||void 0===u?void 0:u.confidence)&&void 0!==c?c:null,decided_by:null!==(d=null===(s=e.machine_classification)||void 0===s?void 0:s.decisioning_method)&&void 0!==d?d:null,human_action_enum:null,reason:w?"We're not fully confident about the type of this page. Is this page a ".concat(w,"?"):null,reasons:null!==(v=e.reasons)&&void 0!==v?v:[],score:null!==(f=null!==(p=e.score)&&void 0!==p?p:null===(_=e.machine_classification)||void 0===_?void 0:_.score)&&void 0!==f?f:null,review:null==x?null:{action:x,reviewed_by:null!==(m=null===(g=e.human_action)||void 0===g?void 0:g.reviewed_by)&&void 0!==m?m:"",reviewed_at:null!==(b=null===(y=e.human_action)||void 0===y?void 0:y.reviewed_at)&&void 0!==b?b:""},metadata:{page_type:w,page_num:n,classification_id:null!==(h=e.id)&&void 0!==h?h:null,user_actions:["YES","NO"]}}}(t,r,null!==(c=null!==(u=t.confirmed)&&void 0!==u?u:e.confirmed)&&void 0!==c?c:null,null!==(d=e.summary)&&void 0!==d?d:null);v.push({id:"".concat(g,":page-classification:").concat(null!==(p=t.id)&&void 0!==p?p:"".concat(a,"-").concat(o)),reviewStepIndex:m.length+y,segment:n,review_step:_,metadata:s(_.metadata)}),y+=1}})})}),{boundaryReviews:t,labelReviews:d,pageReviews:v}},exports.getSegmentReviewKey=u;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./BoundaryCard.js"),n=require("./LabelCheck.js"),a=require("./PageCheck.js"),i=function(e){return"object"==typeof e&&null!==e?e:{}},t=function(e){return"string"==typeof e?e:null},o=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},r=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},l=function(e){var n="string"==typeof e?e.trim().toLowerCase():"";return"table"===n||"drawing"===n?n:null},u=function(e,n){return void 0===n&&(n=0),e.stable_key||e.segment_id||"".concat(e.start_page,"-").concat(e.end_page,"-").concat(n)},c=function(e){var a=i(e);return{current_label:t(a.current_label),custom_label:t(a.custom_label),group_id:t(a.group_id),user_actions:r(a.user_actions).filter(n.isLabelReviewAction)}},s=function(e){var n=i(e);return{page_type:l(n.page_type),page_num:o(n.page_num),classification_id:t(n.classification_id),user_actions:r(n.user_actions).filter(a.isPageCheckAction)}};exports.extractSegmentReviewData=function(n){var t=[],d=[],v=[];return n.forEach(function(n,p){var _,f,g=u(n,p),m=null!==(_=n.review_steps)&&void 0!==_?_:[];m.forEach(function(a,l){var u,p,_=(u=a.type,"page_boundary"===(p=u.trim().toLowerCase())||"page boundary review"===p?"boundary":"label"===p||"label review"===p?"label":"page"===p?"page":null);if("boundary"===_){var f=function(n){var a=i(n);return{focus_page:o(a.focus_page),boundary_margin:o(a.boundary_margin),user_actions:r(a.user_actions).filter(e.isBoundaryReviewAction)}}(a.metadata);t.push({id:"".concat(g,":boundary:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:f})}"label"===_&&d.push({id:"".concat(g,":label:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:c(a.metadata)}),"page"===_&&v.push({id:"".concat(g,":page:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:s(a.metadata)})});var y=0;null===(f=n.page_classifications)||void 0===f||f.forEach(function(e,i){var t,o,r=null!==(t=e.page_num)&&void 0!==t?t:null,u=null!==(o=e.questions)&&void 0!==o?o:[];(u.length>0?u:e.severity?[e]:[]).forEach(function(t,o){var u,c,d,p;if(l(t.page_type)){var _=function(e,n,i,t){var o,r,u,c,s,d,v,p,_,f,g,m,y,b,w,h=l(e.page_type),C=null===(r=null===(o=e.human_action)||void 0===o?void 0:o.verdict)||void 0===r?void 0:r.trim().toUpperCase(),x=C&&a.isPageCheckAction(C)?C:null,S="drawing"===h?"an engineering drawing":h?"a ".concat(h):null;return{type:"page",confirmed:i,title:"Page Type Check",summary:(null==t?void 0:t.trim())||(x&&null!=n&&S?"Page ".concat(n," was confirmed as ").concat("YES"===x?S:"not ".concat(S),"."):void 0),format:"pdf",confidence:null!==(c=null===(u=e.machine_classification)||void 0===u?void 0:u.confidence)&&void 0!==c?c:null,decided_by:null!==(d=null===(s=e.machine_classification)||void 0===s?void 0:s.decisioning_method)&&void 0!==d?d:null,human_action_enum:null,reason:h?"We're not fully confident about the type of this page. Is this page a ".concat(h,"?"):null,reasons:null!==(v=e.reasons)&&void 0!==v?v:[],score:null!==(f=null!==(p=e.score)&&void 0!==p?p:null===(_=e.machine_classification)||void 0===_?void 0:_.score)&&void 0!==f?f:null,review:null==x?null:{action:x,reviewed_by:null!==(m=null===(g=e.human_action)||void 0===g?void 0:g.reviewed_by)&&void 0!==m?m:"",reviewed_at:null!==(b=null===(y=e.human_action)||void 0===y?void 0:y.reviewed_at)&&void 0!==b?b:""},metadata:{page_type:h,page_num:n,classification_id:null!==(w=e.id)&&void 0!==w?w:null,user_actions:["YES","NO"]}}}(t,r,null!==(c=null!==(u=t.confirmed)&&void 0!==u?u:e.confirmed)&&void 0!==c?c:null,null!==(d=e.summary)&&void 0!==d?d:null);v.push({id:"".concat(g,":page-classification:").concat(null!==(p=t.id)&&void 0!==p?p:"".concat(i,"-").concat(o)),reviewStepIndex:m.length+y,segment:n,review_step:_,metadata:s(_.metadata)}),y+=1}})})}),{boundaryReviews:t,labelReviews:d,pageReviews:v}},exports.getSegmentReviewKey=u;
2
2
  //# sourceMappingURL=reviewStepAdapters.js.map
@@ -1,2 +1,2 @@
1
- import{__spreadArray as e,__assign as n,__awaiter as t,__generator as i}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as a,useState as l,useEffect as d,useRef as u,useCallback as s}from"react";import{SpecialZoomLevel as c}from"@react-pdf-viewer/core";import v from"../PdfViewer/PdfViewer.js";import g,{BoundaryReviewActionEnum as p,isBoundaryReviewAction as m}from"./BoundaryCard.js";import f from"./CardWrapper.js";import h from"./CognitiveIntegrity.js";import w from"./LabelCheck.js";import b from"./PageCheck.js";import{extractSegmentReviewData as y,getSegmentReviewKey as _}from"./reviewStepAdapters.js";import{CircleCheck as x,Check as S,GitMerge as P}from"lucide-react";import{Tooltip as E,Typography as C,Portal as k,Box as R}from"@mui/material";import M from"./ReviewedCard.js";import I from"./RevertCard.js";import A from"./RevertSuccessCard.js";import{getPendingMergeImpactedSegmentKeys as N,hasPolledStructuralAction as F,getOptimisticMergeImpactedSegmentKeys as B,shouldHideStructuralBoundaryReview as T,getResolvedScore as W,getConfidenceColors as L,getBoundaryReviewActionBadgeLabel as z,getTitleReviewActionBadgeLabel as j,isReviewStepResolved as q,isReviewStepResolutionCurrent as G,formatScore as O}from"./helper.js";import D from"./ChartBreakoutCircle.js";var V,U,H=260;!function(e){e.ActualSize="ActualSize",e.PageFit="PageFit",e.PageWidth="PageWidth"}(U||(U={}));var X=((V={})[U.ActualSize]=c.ActualSize,V[U.PageFit]=c.PageFit,V[U.PageWidth]=c.PageWidth,V),Y=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}};function J(V){var U,J,Z,K,Q,$,ee,ne,te,ie,re,oe,ae,le,de,ue,se,ce,ve,ge,pe,me,fe,he,we,be,ye,_e,xe,Se,Pe,Ee,Ce=this,ke=V.pdfUrl,Re=V.pdfName,Me=V.segments,Ie=V.styles,Ae=V.pdfViewerProps,Ne=V.specialZoomLevel,Fe=V.showBadges,Be=void 0===Fe||Fe,Te=V.sortByConfidence,We=void 0===Te?"low":Te,Le=V.filterByConfidence,ze=void 0===Le?"all":Le,je=V.showBadgeNavigation,qe=void 0===je||je,Ge=V.autoSelectReviewOnPageChange,Oe=void 0!==Ge&&Ge,De=V.autoAdvanceAfterConfirm,Ve=void 0===De||De,Ue=V.badgePreloadPages,He=void 0===Ue?8:Ue,Xe=V.badgeOffsetTop,Ye=void 0===Xe?20:Xe,Je=V.badgeOffsetRight,Ze=void 0===Je?68:Je,Ke=V.badgeOffsetLeft,Qe=void 0===Ke?0:Ke,$e=V.initialReviewId,en=V.manualPrompt,nn=V.heightBuffer,tn=V.onBoundaryAction,rn=V.onLabelAction,on=V.onPageAction,an=V.onPageTypeRevert,ln=V.onRevert,dn=V.onActiveReviewChange,un=V.onCurrentPageChange,sn=V.onActionError,cn=V.disableAllActions,vn=void 0!==cn&&cn,gn=V.disablePdfAnnotations,pn=void 0!==gn&&gn,mn=V.disablePdfTextLayer,fn=void 0===mn||mn,hn=V.disableTitleCheckUntilBoundaryCheckCompleted,wn=void 0!==hn&&hn,bn=V.onAdjustManually,yn=V.onCognitiveClick,_n=V.className,xn=V.style,Sn=V.viewerStyle,Pn=V.railStyle,En=V.redirectionData,Cn=a(function(){return y(Me)},[Me]),kn=Cn.boundaryReviews,Rn=Cn.labelReviews,Mn=Cn.pageReviews,In=l(function(){return new Map}),An=In[0],Nn=In[1],Fn=a(function(){var e=new Map,n=1;return Me.forEach(function(t,i){var r=_(t,i);e.has(r)||(e.set(r,n),n+=1)}),e},[Me]),Bn=a(function(){return new Set(Rn.map(function(e){return _(e.segment)}))},[Rn]),Tn=a(function(){return N(Me)},[Me]);d(function(){Nn(function(e){var n=!1,t=new Map(e);return e.forEach(function(e,i){var r=Me.find(function(e){return _(e)===i});r&&!F(r,e)||(t.delete(i),n=!0)}),n?t:e})},[Me]);var Wn=a(function(){return B(Me,An)},[An,Me]),Ln=u(null),zn=a(function(){return e(e(e([],kn.filter(function(e){return!Tn.has(_(e.segment))&&!Wn.has(_(e.segment))&&!T(e.review_step,e.segment,Bn.has(_(e.segment)),An.get(_(e.segment)))}).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),Rn.filter(function(e){return!Tn.has(_(e.segment))&&!Wn.has(_(e.segment))}).map(function(e){return n(n({},e),{kind:"label",pageNumber:e.segment.start_page})}),!0),Mn.filter(function(e){return!Tn.has(_(e.segment))&&!Wn.has(_(e.segment))}).map(function(e){var t;return n(n({},e),{kind:"page",pageNumber:null!==(t=e.metadata.page_num)&&void 0!==t?t:e.segment.start_page})}),!0).sort(function(e,n){var t,i,r=null!==(t=Fn.get(_(e.segment)))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(i=Fn.get(_(n.segment)))&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||r-o||e.reviewStepIndex-n.reviewStepIndex||e.id.localeCompare(n.id)})},[kn,Rn,Mn,Wn,An,Tn,Fn,Bn]),jn=a(function(){return Me.map(function(e){var t,i;return n(n({},e),{title:(null===(t=e.label)||void 0===t?void 0:t.trim())||e.title,page_count:null!==(i=e.page_count)&&void 0!==i?i:e.end_page-e.start_page+1})})},[Me]),qn=l(1),Gn=qn[0],On=qn[1],Dn=l(null!=$e?$e:null),Vn=Dn[0],Un=Dn[1],Hn=l(null!=$e?$e:null),Xn=Hn[0],Yn=Hn[1],Jn=l(!1),Zn=Jn[0],Kn=Jn[1],Qn=l(null),$n=Qn[0],et=Qn[1],nt=l(null),tt=nt[0],it=nt[1],rt=l(function(){return new Set}),ot=rt[0],at=rt[1],lt=l(null),dt=lt[0],ut=lt[1],st=l(null),ct=st[0],vt=st[1],gt=l(!1),pt=gt[0],mt=gt[1],ft=u(0),ht=u(null),wt=u(null),bt=u(new Map),yt=u(null),_t=u(null),xt=l(H),St=xt[0],Pt=xt[1],Et=null!==(J=null===(U=null==Ie?void 0:Ie.aside)||void 0===U?void 0:U.width)&&void 0!==J?J:"40%",Ct="min(".concat("number"==typeof Et?"".concat(Et,"px"):Et,", ").concat(H,"px, 100%)");d(function(){at(function(e){if(0===e.size)return e;var n=new Set(e),t=!1;return zn.forEach(function(e){var i;null!=(null===(i=e.review_step.review)||void 0===i?void 0:i.action)&&n.has(e.id)&&(n.delete(e.id),t=!0)}),t?n:e})},[zn]),d(function(){var e=Ln.current;if(e&&Be){var n=function(){var n=e.getBoundingClientRect().width;n>0&&Pt(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()}}},[Be]);var kt=a(function(){var e=new Set;return zn.forEach(function(n){var t;null!=(null===(t=n.review_step.review)||void 0===t?void 0:t.action)&&e.add(n.id)}),e},[zn]),Rt=a(function(){var e;return null!==(e=zn.find(function(e){return e.id===Vn}))&&void 0!==e?e:null},[Vn,zn]),Mt=a(function(){return!(!wn||"label"!==(null==Rt?void 0:Rt.kind))&&kn.some(function(e){if(_(e.segment)!==_(Rt.segment)||kt.has(e.id))return!1;var n=W(e.review_step.score,e.review_step.confidence);return null==n||n<85})},[Rt,kn,wn,kt]),It=null==Rt?-1:Me.findIndex(function(e){return _(e)===_(Rt.segment)}),At=It>0?Me[It-1]:void 0,Nt=It>=0?Me[It+1]:void 0,Ft=(null===(Z=null==At?void 0:At.label)||void 0===Z?void 0:Z.trim())||(null==At?void 0:At.title),Bt=(null===(K=null==Nt?void 0:Nt.label)||void 0===K?void 0:K.trim())||(null==Nt?void 0:Nt.title),Tt=L(null==Rt?void 0:Rt.review_step.score,null==Rt?void 0:Rt.review_step.confidence,null===(Q=null==Rt?void 0:Rt.segment.confidence)||void 0===Q?void 0:Q.awaiting_llm),Wt=(null===($=null==Rt?void 0:Rt.review_step.reasons)||void 0===$?void 0:$.length)?Rt.review_step.reasons:null!==(ne=null===(ee=null==Rt?void 0:Rt.segment.confidence)||void 0===ee?void 0:ee.reasons)&&void 0!==ne?ne:[],Lt=Boolean(Wt.some(function(e){return e.text.trim()&&["evidence","gap"].includes(e.type.trim().toLowerCase())})||(null===(te=null==Rt?void 0:Rt.review_step.reason)||void 0===te?void 0:te.trim())||(null===(ie=null==Rt?void 0:Rt.review_step.gap)||void 0===ie?void 0:ie.trim())),zt=null==Rt?null:"boundary"===Rt.kind?z(Rt.review_step,Rt.segment,An.get(null!==(re=Rt.segment.stable_key)&&void 0!==re?re:"")):j(Rt.review_step,Rt.segment,An.get(null!==(oe=Rt.segment.stable_key)&&void 0!==oe?oe:"")),jt=null==Rt?"":(null===(ae=Rt.segment.label)||void 0===ae?void 0:ae.trim())||Rt.segment.title,qt=null==Rt?void 0:Rt.review_step.revert,Gt=null==Rt?void 0:Rt.segment.revert,Ot=function(e){return null==e?void 0:e.trim().toLowerCase()},Dt=null==Rt||null===(de=e([],null!==(le=Rt.segment.review_steps)&&void 0!==le?le:[],!0).reverse().find(function(e){var n,t,i=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===i||"page boundary review"===i)&&"boundary"===Ot(null===(t=e.revert)||void 0===t?void 0:t.type)}))||void 0===de?void 0:de.revert,Vt=null!==(ue=null!=qt?qt:null==Rt?void 0:Rt.segment.revert)&&void 0!==ue?ue:Dt,Ut=null==Vt?void 0:Vt.decision.trim().toUpperCase(),Ht=null!=zt?zt:(null==Ut?void 0:Ut.includes("SPLIT"))?"Split":(null==Ut?void 0:Ut.includes("MERGE"))?"Merged":null,Xt="label"===(null==Rt?void 0:Rt.kind)&&"SET_RANGE"===(null===(se=null==Dt?void 0:Dt.decision)||void 0===se?void 0:se.trim().toUpperCase())&&Dt.current_segment_ids.length!==Dt.previous_state.length,Yt="Merged"===zt||"Split"===zt||Xt,Jt=null==Rt?void 0:Yt?"boundary"===Ot(null==Dt?void 0:Dt.type)?Dt:"boundary"===Ot(null==Gt?void 0:Gt.type)?Gt:"boundary"===Ot(null==qt?void 0:qt.type)?qt:void 0:"label"===Rt.kind?"label"===Ot(null==qt?void 0:qt.type)?qt:void 0:"boundary"===Rt.kind?"boundary"===Ot(null==qt?void 0:qt.type)?qt:"boundary"===Ot(null==Dt?void 0:Dt.type)?Dt:"boundary"===Ot(null==Gt?void 0:Gt.type)?Gt:void 0:void 0,Zt=Yt&&(null==Jt?void 0:Jt.operation_id)?Me.flatMap(function(e){var n;return null!==(n=e.review_steps)&&void 0!==n?n:[]}).find(function(e){var n,t,i,r,o,a,l,d=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===d||"page boundary review"===d)&&((null!==(o=null!==(i=null===(t=e.human_resolution)||void 0===t?void 0:t.operation_id)&&void 0!==i?i:null===(r=e.revert)||void 0===r?void 0:r.operation_id)&&void 0!==o?o:e.operation_id)===Jt.operation_id&&Boolean(null===(l=null===(a=e.human_resolution)||void 0===a?void 0:a.change_summary)||void 0===l?void 0:l.trim()))}):void 0,Kt=(null===(ce=null==Jt?void 0:Jt.summary)||void 0===ce?void 0:ce.trim())||null,Qt="page"===(null==Rt?void 0:Rt.kind)?(null===(ve=Rt.review_step.summary)||void 0===ve?void 0:ve.trim())||"":Yt?(null===(pe=null===(ge=null==Zt?void 0:Zt.human_resolution)||void 0===ge?void 0:ge.change_summary)||void 0===pe?void 0:pe.trim())||(null===(me=null==Jt?void 0:Jt.summary)||void 0===me?void 0:me.trim())||"":(null===(we=null===(he=null===(fe=null==Rt?void 0:Rt.review_step)||void 0===fe?void 0:fe.human_resolution)||void 0===he?void 0:he.change_summary)||void 0===we?void 0:we.trim())||(null===(ye=null===(be=null==Rt?void 0:Rt.review_step)||void 0===be?void 0:be.summary)||void 0===ye?void 0:ye.trim())||"",$t=null==Rt?null:Jt?{currentSegment:{title:jt,startPage:Rt.segment.start_page,endPage:Rt.segment.end_page},previousSegments:Jt.previous_state.map(function(e){var n,t;return{title:(null===(n=e.label)||void 0===n?void 0:n.trim())||(null===(t=e.title)||void 0===t?void 0:t.trim())||"Untitled document",startPage:e.start_page,endPage:e.end_page}})}:"Split"===Ht?{currentSegment:{title:jt,startPage:Rt.segment.start_page,endPage:Rt.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:jt,startPage:Rt.segment.start_page,endPage:Rt.segment.end_page}]}:"Merged"===Ht?{currentSegment:{title:jt,startPage:Rt.segment.start_page,endPage:Rt.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:"Request for proposal (RFP)",startPage:26,endPage:76}]}:{currentSegment:{title:jt,startPage:Rt.segment.start_page,endPage:Rt.segment.end_page},previousSegments:[]},ei="page"===(null==Rt?void 0:Rt.kind)&&null!==(_e=Rt.metadata.classification_id)&&void 0!==_e?_e:null,ni="page"===(null==Rt?void 0:Rt.kind)?Boolean(an&&ei):Boolean((null==Jt?void 0:Jt.operation_id)&&(null==Jt?void 0:Jt.type)&&!1!==(null==Jt?void 0:Jt.revertable));Boolean($t&&ni&&("page"!==(null==Rt?void 0:Rt.kind)||ei));var ti=s(function(e,n){ft.current+=1,ht.current={requestId:ft.current,pageNumber:e,reviewId:n},it({pageNumber:e,requestId:ft.current})},[]),ii=s(function(e){var n;!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)&&(vt(null),Un(e.id),Yn(e.id),Kn(!1),et(null),ti(e.pageNumber,e.id),null==dn||dn(e.id,e.segment))},[dn,ti]);d(function(){if(ct){var e=requestAnimationFrame(function(){return mt(!0)}),n=window.setTimeout(function(){mt(!1)},3500),t=window.setTimeout(function(){vt(null)},4e3);return function(){cancelAnimationFrame(e),window.clearTimeout(n),window.clearTimeout(t)}}},[ct]),d(function(){var e;if(En)if(En.reviewId){var n=zn.find(function(e){return e.id===En.reviewId&&(!En.type||e.kind===En.type)});n&&ii(n)}else if(En.classificationId){var t=zn.find(function(e){return"page"===e.kind&&e.metadata.classification_id===En.classificationId&&(!En.type||e.kind===En.type)});t&&ii(t)}else if(En.pageNumber&&En.type){var i=Number(En.pageNumber);if(Number.isInteger(i)&&!(i<1)){var r=null===(e=En.pageType)||void 0===e?void 0:e.trim().toLowerCase(),o=zn.find(function(e){var n="page"===e.kind?e.pageNumber:e.segment.start_page,t="page"!==e.kind||!r||e.metadata.page_type===r;return n===i&&e.kind===En.type&&t});o&&ii(o)}}},[En,ii,zn]);var ri=s(function(){ht.current=null,Kn(!1),Un(null),et(null),null==dn||dn(null,null)},[dn]),oi=s(function(e){var n;mt(!1),vt(null);var t=null!==(n=zn.find(function(n){return!kt.has(n.id)&&"boundary"===n.kind&&n.segment.start_page===e.startPage&&n.segment.end_page===e.endPage}))&&void 0!==n?n:zn.find(function(n){return!kt.has(n.id)&&n.segment.start_page<=e.startPage&&n.segment.end_page>=e.startPage});t?ii(t):(ri(),ft.current+=1,it({pageNumber:e.startPage,requestId:ft.current}))},[ri,kt,zn,ii]),ai=s(function(e){var n;if(Ve){var t=zn.findIndex(function(n){return n.id===e}),i=new Set(zn.map(function(e){return e.id})),r=null!==(n=zn.find(function(n,r){return r>t&&n.id!==e&&i.has(n.id)}))&&void 0!==n?n:zn.find(function(n){return n.id!==e});r?requestAnimationFrame(function(){return ii(r)}):ri()}else ri()},[Ve,ri,zn,ii,zn]),li=s(function(e,n,r){return t(Ce,void 0,void 0,function(){var t,o,a,l,d,u,s,c,v;return i(this,function(i){switch(i.label){case 0:if(vn)return[2];if("boundary"===e.kind&&!tn)return[2];if("label"===e.kind&&!rn)return[2];if("page"===e.kind&&!on)return[2];t=Y(e),a=r,l=(o=n)===p.SET_RANGE?function(){var n=a.startPage,t=a.endPage;if(null==n||null==t)return null;var i=n<e.segment.start_page||t>e.segment.end_page,r=n>e.segment.start_page||t<e.segment.end_page;return i&&!r?n<e.segment.start_page?p.MERGE_PREV:p.MERGE_NEXT:r?p.SPLIT_HERE:null}():o,d="boundary"===e.kind&&null!=tn&&Ve&&(l===p.SPLIT_HERE||l===p.MERGE_NEXT||l===p.MERGE_PREV||l===p.MERGE_PREVIOUS),u=d?Me.findIndex(function(n){return _(n)===_(e.segment)}):-1,d&&u>=0&&l&&(wt.current={action:l,originalSegmentIndex:u,segmentSignature:JSON.stringify(Me.map(function(e,n){var t;return{key:_(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}})),ready:!1}),ut(e.id),i.label=1;case 1:return i.trys.push([1,8,9,10]),"boundary"!==e.kind?[3,3]:[4,null==tn?void 0:tn(n,r,t)];case 2:return i.sent(),[3,7];case 3:return"label"!==e.kind?[3,5]:[4,null==rn?void 0:rn(n,r,t)];case 4:return i.sent(),[3,7];case 5:return"page"!==e.kind?[3,7]:[4,null==on?void 0:on(n,r,t)];case 6:i.sent(),i.label=7;case 7:return at(function(n){var t=new Set(n);return t.add(e.id),t}),s="boundary"===e.kind&&(l===p.MERGE_NEXT||l===p.MERGE_PREV||l===p.MERGE_PREVIOUS),("boundary"===e.kind&&l===p.SPLIT_HERE||s)&&l&&Nn(function(n){var t=new Map(n);return t.set(_(e.segment),l),t}),wt.current?(wt.current.ready=!0,s&&(c=zn.find(function(n){return"label"===n.kind&&_(n.segment)===_(e.segment)}))&&requestAnimationFrame(function(){return ii(c)})):ai(e.id),[3,10];case 8:return v=i.sent(),d&&(wt.current=null),null==sn||sn(v,t),[3,10];case 9:return ut(null),[7];case 10:return[2]}})})},[Ve,vn,sn,tn,rn,on,an,zn,Me,ii,ai]);d(function(){var e=wt.current;if(null==e?void 0:e.ready){var n=JSON.stringify(Me.map(function(e,n){var t;return{key:_(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}}));if(n!==e.segmentSignature){var t=e.action===p.SPLIT_HERE?e.originalSegmentIndex+1:e.action===p.MERGE_PREV||e.action===p.MERGE_PREVIOUS?Math.max(0,e.originalSegmentIndex-1):e.originalSegmentIndex,i=new Map(Me.map(function(e,n){return[_(e,n),n]})),r=zn.find(function(e){var n,r=i.get(_(e.segment));return null!=r&&r>=t&&!q(e.review_step,e.segment)&&(!ot.has(e.id)||!G(e.review_step,e.segment))&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if(!r)return wt.current=null,void ri();requestAnimationFrame(function(){wt.current=null,ii(r)})}}},[ri,ot,zn,Me,ii]),d(function(){wt.current||Vn&&!zn.some(function(e){return e.id===Vn})&&ri()},[Vn,ri,zn]),d(function(){if(Oe&&!wt.current){var e=zn.find(function(e){return e.pageNumber===Gn});e&&e.id!==Vn&&ii(e)}},[Vn,Oe,Gn,ii,zn]),d(function(){wt.current||Vn&&!zn.some(function(e){var n;return e.id===Vn&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)})&&ri()},[Vn,ri,zn]);var di=a(function(){var n=zn.filter(function(e){var n;return!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if("all"===ze)return n;var t=["low","medium","high"].filter(function(e){return e!==We}),i=e([We],t,!0),r=new Map(i.map(function(e,n){return[e,n]}));return n.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var t,o,a,l,d=null===(t=e.item.review_step.confidence)||void 0===t?void 0:t.trim().toLowerCase(),u=null===(o=n.item.review_step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==d?i.length:null!==(a=r.get(d))&&void 0!==a?a:i.length)-(null==u?i.length:null!==(l=r.get(u))&&void 0!==l?l:i.length)||e.index-n.index}).map(function(e){return e.item})},[ze,We,zn]),ui=di.findIndex(function(e){return e.id===Xn}),si=l(null),ci=si[0],vi=si[1],gi=u(!1),pi=s(function(e){var n=di[e];n&&ii(n)},[di,ii]);d(function(){Xn&&!di.some(function(e){return e.id===Xn})&&Yn(null)},[di,Xn]),d(function(){gi.current=!1,vi(ui>=0?String(ui+1):null)},[ui,di.length]),d(function(){if(gi.current&&null!=ci){var e=window.setTimeout(function(){var e=Number(ci.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<di.length&&(gi.current=!1,pi(n))},300);return function(){return window.clearTimeout(e)}}},[pi,ci,di.length]);var mi=a(function(){var e=new Map;zn.forEach(function(n){var t,i=null!==(t=e.get(_(n.segment)))&&void 0!==t?t:[];i.push(n),e.set(_(n.segment),i)});var n=new Map;return e.forEach(function(e,t){var i,r=null!==(i=Fn.get(t))&&void 0!==i?i:1;e.sort(function(e,n){return e.reviewStepIndex-n.reviewStepIndex}).forEach(function(e,t){n.set(e.id,"".concat(r).concat(function(e){for(var n=e+1,t="";n>0;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t}(t)))})}),n},[zn,Fn]),fi=a(function(){var e=new Map;zn.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},[zn]),hi=s(function(e){return{startPage:Math.max(0,e.startPage-He),endPage:Math.min(e.numPages-1,e.endPage+He)}},[He]),wi=s(function(){var e,n=yt.current,t=_t.current;if(n&&t){var i=n.getBoundingClientRect(),r=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==r?void 0:r.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();if(zn.forEach(function(e){var n,r=bt.current.get(e.id);if(r){var a=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(a){var l=a.getBoundingClientRect(),d=null!==(n=fi.get(e.id))&&void 0!==n?n:0,u=l.top+Ye+40*d,s=u+(r.offsetHeight||32),c=u>=o.top&&s<=o.bottom;r.style.top="".concat(u-i.top,"px"),r.style.visibility=c?"visible":"hidden"}else r.style.visibility="hidden"}}),Vn&&null==ht.current){var a=bt.current.get(Vn);a&&"hidden"!==a.style.visibility&&et(function(e){return e===a?e:a})}}},[Vn,Ye,fi,zn]),bi=s(function(e){var n=ht.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(ht.current=null,wi(),requestAnimationFrame(function(){if(null==ht.current){var e=bt.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&et(e)}}))},[wi]);return d(function(){var e=_t.current;if(e&&Be){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,wi()}))};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()}}},[Be,wi]),r("div",n({ref:yt,className:_n,style:n(n({},xn),{display:"block",position:"relative",width:"100%",height:"100%",minWidth:0,overflowX:"auto",overflowY:"hidden"})},{children:[r("div",n({className:"segment-review-wrapper__container",style:{display:"flex",alignItems:"stretch",gap:0,width:"100%",minWidth:700,height:"100%"}},{children:[o("div",n({ref:_t,style:n(n({},Sn),{flex:"1 1 auto",width:Be?"auto":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:o(v,n({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},Ae,{defaultScale:void 0===Ne?null!==(xe=null==Ae?void 0:Ae.defaultScale)&&void 0!==xe?xe:c.PageFit:X[Ne],disablePdfAnnotations:pn,disablePdfTextLayer:fn,pdfUrl:ke,pdfName:Re,segments:jn,navigationRequest:tt,onNavigationSettled:bi,setRenderRange:hi,onCurrentPageChange:function(e){On(e),null==ht.current&&Rt&&Rt.pageNumber!==e&&ri(),null==un||un(e)}}))})),Be&&r("aside",n({"aria-label":"Page review badges",ref:Ln,style:n(n({},Pn),{position:"relative",width:Ct,maxWidth:H,flex:"0 1 ".concat(Ct),minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[qe&&di.length>0&&r("nav",n({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:Ze||"auto",left:Qe||"auto",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!=ci?ci:"-","aria-label":"Review badge number",onChange:function(e){gi.current=!0,vi(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"}}),r("span",n({"aria-label":"".concat(di.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",di.length]})),["previous","next"].map(function(e){var t="previous"===e,i=ui+(t?-1:1),r=i<0||i>=di.length;return o("button",n({type:"button","aria-label":"".concat(t?"Previous":"Next"," review badge"),disabled:r,onClick:function(){return pi(i)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:r?"#C7D2FE":"#4F46E5",cursor:r?"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)})]})),zn.map(function(e){var t,i,a=Vn===e.id,l=null!==(t=mi.get(e.id))&&void 0!==t?t:"1A",d=e.review_step.score,u=e.review_step.confidence,s=O(d,u),c="boundary"===e.kind?z(e.review_step,e.segment,An.get(_(e.segment))):"label"===e.kind?j(e.review_step,e.segment,An.get(_(e.segment))):null,v=null!=c?c:"N/A"===s?s:"".concat(s,"%"),g=!0===(null===(i=e.segment.confidence)||void 0===i?void 0:i.awaiting_llm),p=L(d,u,g),m=kt.has(e.id);return o(E,n({title:g?"data is being processed":"",arrow:!0},{children:o("span",n({ref:function(n){n?bt.current.set(e.id,n):bt.current.delete(e.id)},style:{position:"absolute",top:0,left:10,visibility:"hidden",display:"inline-flex",cursor:g?"not-allowed":"pointer"}},{children:o("button",n({disabled:g,type:"button","aria-pressed":a,"aria-label":g?"".concat(e.review_step.type," · Page ").concat(e.pageNumber," · Data is being processed"):"".concat(e.review_step.type," · Page ").concat(e.pageNumber),onClick:function(){return ii(e)},style:{cursor:"inherit",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:c?m&&!g?115:90:m&&!g?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(m&&!g?"#E2E8F0":p.border),borderRadius:16,backgroundColor:m&&!g?"#F8FAFC":p.background,color:m&&!g?"#475569":p.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:r(C,n({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},m&&!g?{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:l})),r("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:v}))]})),r("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(x,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]}:{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:l})),r("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:p.divider,strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:v}))]}))]}))}))}))}),e.id)})]}))]})),Rt&&$n&&r(f,n({anchorElement:$n,placement:"bottom-start",offset:{top:8},width:Math.min(St,H),maxWidth:H,heightBuffer:null!=nn?nn:25},{children:[Zn&&o(h,{width:"100%",maxWidth:"100%",score:Rt.review_step.score,reasons:Wt,reason:Rt.review_step.reason,gap:Rt.review_step.gap,onBack:function(){return Kn(!1)},onClose:ri}),o("div",n({style:{display:Zn?"none":"block"}},{children:kt.has(Rt.id)?o(M,{width:"100%",maxWidth:"100%",headerName:"page"===Rt.kind?"Page format approved":"Split"===zt?"Split approved":"Merged"===zt?"Merge approved":"User approved",headerIcon:"page"===Rt.kind?o(S,{size:18,strokeWidth:2}):"Merged"===zt?o(P,{size:18,strokeWidth:2}):"Split"===zt?o(D,{width:18,height:18}):o(x,{size:18,strokeWidth:2}),title:jt,pageNo:"Page ".concat(Rt.segment.start_page,"-").concat(Rt.segment.end_page),summary:$t?o(I,{icon:o(x,{size:14,strokeWidth:2}),title:jt,pageRange:"Page ".concat(Rt.segment.start_page,"-").concat(Rt.segment.end_page),description:null!=Qt?Qt:null,revertData:$t,confirmDisabled:null==ln||!ni,showDocumentHeader:!1,onRevert:function(){if("page"===Rt.kind){if(!an||!ei){var e=new Error("SegmentReviewPdfWrapper requires onPageTypeRevert and a classification id to revert a page-type decision.");return null==sn||sn(e,Y(Rt)),Promise.reject(e)}return an({classification_id:ei,human_verdict:"No"},Y(Rt))}if(!ln)throw new Error("SegmentReviewPdfWrapper requires onRevert to handle a revert confirmation.");if(!Jt)throw new Error("There is no valid revert operation for this review.");var n=Yt?"boundary":"label"===Rt.kind?"label":"boundary"===Rt.kind?"boundary":null,t=Ot(Jt.type);if(n&&t!==n)throw new Error("Cannot use ".concat(null!=t?t:"unknown"," revert metadata for this review. Expected ").concat(n,"."));return ln(Jt,Y(Rt))},onRevertError:function(e){null==sn||sn(e,Y(Rt))},onRevertComplete:function(e){var n,t,i,r,o,a;at(function(){return new Set}),"page"!==Rt.kind&&Nn(function(){return new Map}),Rt.id;var l=null!==(n=$t.previousSegments[0])&&void 0!==n?n:$t.currentSegment,d=null==$n?void 0:$n.getBoundingClientRect(),u=null===(t=_t.current)||void 0===t?void 0:t.getBoundingClientRect(),s=Math.min(H,Math.max(220,St)),c=null!==(i=null==d?void 0:d.left)&&void 0!==i?i:(null!==(r=null==u?void 0:u.right)&&void 0!==r?r:window.innerWidth-s-8)+8,v=Math.max(8,Math.min(c,window.innerWidth-s-8)),g=null==(null==d?void 0:d.bottom)?Math.max(8,null!==(o=null==u?void 0:u.top)&&void 0!==o?o:8):d.bottom+8;at(function(){return new Set}),"page"!==Rt.kind&&(wt.current=null),mt(!1),vt({title:"Split"===zt?"Split reverted":"Merged"===zt?"Merge reverted":"Approval reverted",description:(null===(a=null==e?void 0:e.message)||void 0===a?void 0:a.trim())||("Split"===zt?"Pages ".concat(Rt.segment.start_page,"-").concat(Rt.segment.end_page," are now part of “Advice of Award” again. Review the boundary and title to confirm the document."):"Merged"===zt?"The documents have been separated again. Review their boundaries and titles to confirm them.":"“".concat(jt,"” is pending review again. Review the boundary and title to confirm the document.")),segment:l,position:{top:g,left:v,width:s}}),ri()}},Rt.id):void 0,cognitiveScore:Rt.review_step.score,styles:{root:{borderColor:"#16A34A"},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:"#16A34A"}}},onCognitiveClick:Lt?function(){Kn(!0),null==yn||yn(Y(Rt))}:void 0,onClose:ri}):"boundary"===Rt.kind?o(g,{width:"100%",maxWidth:"100%",title:Rt.segment.label||Rt.segment.title,pageNo:"Page ".concat(Rt.pageNumber),content:null!==(Se=Rt.review_step.question)&&void 0!==Se?Se:null,revertSummary:Kt,cognitiveScore:Rt.review_step.score,metadata:Rt.metadata,reviewAction:null!==(Pe=Rt.segment.review_action)&&void 0!==Pe?Pe:void 0,previousSegmentTitle:Ft,nextSegmentTitle:Bt,manualPrompt:null!=en?en:"Set a custom boundary",defaultStartPage:Rt.segment.start_page,defaultEndPage:Rt.segment.end_page,styles:{root:{borderColor:Tt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Tt.text}}},confirmDisabled:vn||!tn||dt===Rt.id,onConfirm:function(e,n,t){t&&m(n.id)&&li(Rt,n.id,t)},onAdjustManually:function(){return null==bn?void 0:bn(Y(Rt))},onCognitiveClick:Lt?function(){Kn(!0),null==yn||yn(Y(Rt))}:void 0,onClose:ri},Rt.id):"label"===Rt.kind?o(w,{width:"100%",maxWidth:"100%",title:Rt.metadata.current_label||Rt.segment.label||Rt.segment.title,pageNo:"Pages ".concat(Rt.segment.start_page,"-").concat(Rt.segment.end_page),content:null!==(Ee=Rt.review_step.question)&&void 0!==Ee?Ee:null,revertSummary:Kt,cognitiveScore:Rt.review_step.score,metadata:Rt.metadata,styles:{root:{borderColor:Tt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Tt.text}}},confirmDisabled:vn||!rn||dt===Rt.id,confirmationBlocked:Mt,confirmationWarning:Mt?"Please confirm the boundary before confirming the title.":void 0,onActionConfirm:function(e,n){li(Rt,e,n)},onAdjustManually:function(){return null==bn?void 0:bn(Y(Rt))},onCognitiveClick:Lt?function(){Kn(!0),null==yn||yn(Y(Rt))}:void 0,onClose:ri},Rt.id):o(b,{width:"100%",maxWidth:"100%",title:Rt.segment.label||Rt.segment.title,pageNo:"Page ".concat(Rt.pageNumber),content:Rt.review_step.reason,cognitiveScore:Rt.review_step.score,pageType:Rt.metadata.page_type,metadata:Rt.metadata,styles:{root:{borderColor:Tt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Tt.text}}},confirmDisabled:vn||!on||dt===Rt.id,onActionConfirm:function(e,n){li(Rt,e,n)},onCognitiveClick:Lt?function(){Kn(!0),null==yn||yn(Y(Rt))}:void 0,onClose:ri},Rt.id)}))]})),ct&&o(k,{children:o(R,n({"aria-live":"polite",sx:{position:"fixed",top:ct.position.top,left:ct.position.left,zIndex:1600,width:ct.position.width,maxWidth:"calc(100vw - 16px)",opacity:pt?1:0,transform:pt?"translateY(0)":"translateY(-6px)",transition:"opacity 500ms ease, transform 500ms ease",filter:"drop-shadow(0 12px 24px rgba(15, 23, 42, 0.18))",pointerEvents:pt?"auto":"none"}},{children:o(A,{title:ct.title,description:ct.description,onReview:function(){return oi(ct.segment)}})}))})]}))}export{U as SegmentPdfSpecialZoomLevel,J as default};
1
+ import{__spreadArray as e,__assign as n,__awaiter as t,__generator as i}from"tslib";import{jsxs as r,jsx as o}from"react/jsx-runtime";import{useMemo as a,useState as l,useEffect as d,useRef as u,useCallback as s}from"react";import{SpecialZoomLevel as c}from"@react-pdf-viewer/core";import v from"../PdfViewer/PdfViewer.js";import g,{BoundaryReviewActionEnum as p,isBoundaryReviewAction as m}from"./BoundaryCard.js";import f from"./CardWrapper.js";import h from"./CognitiveIntegrity.js";import w from"./LabelCheck.js";import b from"./PageCheck.js";import{extractSegmentReviewData as y,getSegmentReviewKey as _}from"./reviewStepAdapters.js";import{CircleCheck as x,Check as S,GitMerge as P}from"lucide-react";import{Tooltip as E,Typography as C,Portal as k,Box as R}from"@mui/material";import M from"./ReviewedCard.js";import I from"./RevertCard.js";import A from"./RevertSuccessCard.js";import{getPendingMergeImpactedSegmentKeys as N,hasPolledStructuralAction as F,getOptimisticMergeImpactedSegmentKeys as B,shouldHideStructuralBoundaryReview as T,getResolvedScore as W,getConfidenceColors as L,getBoundaryReviewActionBadgeLabel as z,getTitleReviewActionBadgeLabel as j,isReviewStepResolved as q,isReviewStepResolutionCurrent as G,formatScore as O}from"./helper.js";import D from"./ChartBreakoutCircle.js";var V,U,H=260;!function(e){e.ActualSize="ActualSize",e.PageFit="PageFit",e.PageWidth="PageWidth"}(U||(U={}));var X=((V={})[U.ActualSize]=c.ActualSize,V[U.PageFit]=c.PageFit,V[U.PageWidth]=c.PageWidth,V),Y=function(e){return{reviewId:e.id,segment:e.segment,pageNumber:e.pageNumber}};function J(V){var U,J,Z,K,Q,$,ee,ne,te,ie,re,oe,ae,le,de,ue,se,ce,ve,ge,pe,me,fe,he,we,be,ye,_e,xe,Se,Pe,Ee=this,Ce=V.pdfUrl,ke=V.pdfName,Re=V.segments,Me=V.styles,Ie=V.pdfViewerProps,Ae=V.specialZoomLevel,Ne=V.showBadges,Fe=void 0===Ne||Ne,Be=V.sortByConfidence,Te=void 0===Be?"low":Be,We=V.filterByConfidence,Le=void 0===We?"all":We,ze=V.showBadgeNavigation,je=void 0===ze||ze,qe=V.autoSelectReviewOnPageChange,Ge=void 0!==qe&&qe,Oe=V.autoAdvanceAfterConfirm,De=void 0===Oe||Oe,Ve=V.badgePreloadPages,Ue=void 0===Ve?8:Ve,He=V.badgeOffsetTop,Xe=void 0===He?20:He,Ye=V.badgeOffsetRight,Je=void 0===Ye?68:Ye,Ze=V.badgeOffsetLeft,Ke=void 0===Ze?0:Ze,Qe=V.initialReviewId,$e=V.manualPrompt,en=V.heightBuffer,nn=V.onBoundaryAction,tn=V.onLabelAction,rn=V.onPageAction,on=V.onPageTypeRevert,an=V.onRevert,ln=V.onActiveReviewChange,dn=V.onCurrentPageChange,un=V.onActionError,sn=V.disableAllActions,cn=void 0!==sn&&sn,vn=V.disablePdfAnnotations,gn=void 0!==vn&&vn,pn=V.disablePdfTextLayer,mn=void 0===pn||pn,fn=V.disableTitleCheckUntilBoundaryCheckCompleted,hn=void 0!==fn&&fn,wn=V.onAdjustManually,bn=V.onCognitiveClick,yn=V.className,_n=V.style,xn=V.viewerStyle,Sn=V.railStyle,Pn=V.redirectionData,En=a(function(){return y(Re)},[Re]),Cn=En.boundaryReviews,kn=En.labelReviews,Rn=En.pageReviews,Mn=l(function(){return new Map}),In=Mn[0],An=Mn[1],Nn=a(function(){var e=new Map,n=1;return Re.forEach(function(t,i){var r=_(t,i);e.has(r)||(e.set(r,n),n+=1)}),e},[Re]),Fn=a(function(){return new Set(kn.map(function(e){return _(e.segment)}))},[kn]),Bn=a(function(){return N(Re)},[Re]);d(function(){An(function(e){var n=!1,t=new Map(e);return e.forEach(function(e,i){var r=Re.find(function(e){return _(e)===i});r&&!F(r,e)||(t.delete(i),n=!0)}),n?t:e})},[Re]);var Tn=a(function(){return B(Re,In)},[In,Re]),Wn=u(null),Ln=a(function(){return e(e(e([],Cn.filter(function(e){return!Bn.has(_(e.segment))&&!Tn.has(_(e.segment))&&!T(e.review_step,e.segment,Fn.has(_(e.segment)),In.get(_(e.segment)))}).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),kn.filter(function(e){return!Bn.has(_(e.segment))&&!Tn.has(_(e.segment))}).map(function(e){return n(n({},e),{kind:"label",pageNumber:e.segment.start_page})}),!0),Rn.filter(function(e){return!Bn.has(_(e.segment))&&!Tn.has(_(e.segment))}).map(function(e){var t;return n(n({},e),{kind:"page",pageNumber:null!==(t=e.metadata.page_num)&&void 0!==t?t:e.segment.start_page})}),!0).sort(function(e,n){var t,i,r=null!==(t=Nn.get(_(e.segment)))&&void 0!==t?t:Number.MAX_SAFE_INTEGER,o=null!==(i=Nn.get(_(n.segment)))&&void 0!==i?i:Number.MAX_SAFE_INTEGER;return e.pageNumber-n.pageNumber||r-o||e.reviewStepIndex-n.reviewStepIndex||e.id.localeCompare(n.id)})},[Cn,kn,Rn,Tn,In,Bn,Nn,Fn]),zn=a(function(){return Re.map(function(e){var t,i;return n(n({},e),{title:(null===(t=e.label)||void 0===t?void 0:t.trim())||e.title,page_count:null!==(i=e.page_count)&&void 0!==i?i:e.end_page-e.start_page+1})})},[Re]),jn=l(1),qn=jn[0],Gn=jn[1],On=l(null!=Qe?Qe:null),Dn=On[0],Vn=On[1],Un=l(null!=Qe?Qe:null),Hn=Un[0],Xn=Un[1],Yn=l(!1),Jn=Yn[0],Zn=Yn[1],Kn=l(null),Qn=Kn[0],$n=Kn[1],et=l(null),nt=et[0],tt=et[1],it=l(function(){return new Set}),rt=it[0],ot=it[1],at=l(null),lt=at[0],dt=at[1],ut=l(null),st=ut[0],ct=ut[1],vt=l(!1),gt=vt[0],pt=vt[1],mt=u(0),ft=u(null),ht=u(null),wt=u(new Map),bt=u(null),yt=u(null),_t=l(H),xt=_t[0],St=_t[1],Pt=null!==(J=null===(U=null==Me?void 0:Me.aside)||void 0===U?void 0:U.width)&&void 0!==J?J:"40%",Et="min(".concat("number"==typeof Pt?"".concat(Pt,"px"):Pt,", ").concat(H,"px, 100%)");d(function(){ot(function(e){if(0===e.size)return e;var n=new Set(e),t=!1;return Ln.forEach(function(e){var i;null!=(null===(i=e.review_step.review)||void 0===i?void 0:i.action)&&n.has(e.id)&&(n.delete(e.id),t=!0)}),t?n:e})},[Ln]),d(function(){var e=Wn.current;if(e&&Fe){var n=function(){var n=e.getBoundingClientRect().width;n>0&&St(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()}}},[Fe]);var Ct=a(function(){var e=new Set;return Ln.forEach(function(n){var t;null!=(null===(t=n.review_step.review)||void 0===t?void 0:t.action)&&e.add(n.id)}),e},[Ln]),kt=a(function(){var e;return null!==(e=Ln.find(function(e){return e.id===Dn}))&&void 0!==e?e:null},[Dn,Ln]),Rt=a(function(){return!(!hn||"label"!==(null==kt?void 0:kt.kind))&&Cn.some(function(e){if(_(e.segment)!==_(kt.segment)||Ct.has(e.id))return!1;var n=W(e.review_step.score,e.review_step.confidence);return null==n||n<85})},[kt,Cn,hn,Ct]),Mt=null==kt?-1:Re.findIndex(function(e){return _(e)===_(kt.segment)}),It=Mt>0?Re[Mt-1]:void 0,At=Mt>=0?Re[Mt+1]:void 0,Nt=(null===(Z=null==It?void 0:It.label)||void 0===Z?void 0:Z.trim())||(null==It?void 0:It.title),Ft=(null===(K=null==At?void 0:At.label)||void 0===K?void 0:K.trim())||(null==At?void 0:At.title),Bt=L(null==kt?void 0:kt.review_step.score,null==kt?void 0:kt.review_step.confidence,null===(Q=null==kt?void 0:kt.segment.confidence)||void 0===Q?void 0:Q.awaiting_llm),Tt=(null===($=null==kt?void 0:kt.review_step.reasons)||void 0===$?void 0:$.length)?kt.review_step.reasons:null!==(ne=null===(ee=null==kt?void 0:kt.segment.confidence)||void 0===ee?void 0:ee.reasons)&&void 0!==ne?ne:[],Wt=Boolean(Tt.some(function(e){return e.text.trim()&&["evidence","gap"].includes(e.type.trim().toLowerCase())})||(null===(te=null==kt?void 0:kt.review_step.reason)||void 0===te?void 0:te.trim())||(null===(ie=null==kt?void 0:kt.review_step.gap)||void 0===ie?void 0:ie.trim())),Lt=null==kt?null:"boundary"===kt.kind?z(kt.review_step,kt.segment,In.get(null!==(re=kt.segment.stable_key)&&void 0!==re?re:"")):j(kt.review_step,kt.segment,In.get(null!==(oe=kt.segment.stable_key)&&void 0!==oe?oe:"")),zt=null==kt?"":(null===(ae=kt.segment.label)||void 0===ae?void 0:ae.trim())||kt.segment.title,jt=null==kt?void 0:kt.review_step.revert,qt=null==kt?void 0:kt.segment.revert,Gt=function(e){return null==e?void 0:e.trim().toLowerCase()},Ot=null==kt||null===(de=e([],null!==(le=kt.segment.review_steps)&&void 0!==le?le:[],!0).reverse().find(function(e){var n,t,i=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===i||"page boundary review"===i)&&"boundary"===Gt(null===(t=e.revert)||void 0===t?void 0:t.type)}))||void 0===de?void 0:de.revert,Dt=null!==(ue=null!=jt?jt:null==kt?void 0:kt.segment.revert)&&void 0!==ue?ue:Ot,Vt=null==Dt?void 0:Dt.decision.trim().toUpperCase(),Ut=null!=Lt?Lt:(null==Vt?void 0:Vt.includes("SPLIT"))?"Split":(null==Vt?void 0:Vt.includes("MERGE"))?"Merged":null,Ht="label"===(null==kt?void 0:kt.kind)&&"SET_RANGE"===(null===(se=null==Ot?void 0:Ot.decision)||void 0===se?void 0:se.trim().toUpperCase())&&Ot.current_segment_ids.length!==Ot.previous_state.length,Xt="Merged"===Lt||"Split"===Lt||Ht,Yt=null==kt?void 0:Xt?"boundary"===Gt(null==Ot?void 0:Ot.type)?Ot:"boundary"===Gt(null==qt?void 0:qt.type)?qt:"boundary"===Gt(null==jt?void 0:jt.type)?jt:void 0:"label"===kt.kind?"label"===Gt(null==jt?void 0:jt.type)?jt:void 0:"boundary"===kt.kind?"boundary"===Gt(null==jt?void 0:jt.type)?jt:"boundary"===Gt(null==Ot?void 0:Ot.type)?Ot:"boundary"===Gt(null==qt?void 0:qt.type)?qt:void 0:void 0,Jt=Xt&&(null==Yt?void 0:Yt.operation_id)?Re.flatMap(function(e){var n;return null!==(n=e.review_steps)&&void 0!==n?n:[]}).find(function(e){var n,t,i,r,o,a,l,d=null===(n=e.type)||void 0===n?void 0:n.trim().toLowerCase();return("page_boundary"===d||"page boundary review"===d)&&((null!==(o=null!==(i=null===(t=e.human_resolution)||void 0===t?void 0:t.operation_id)&&void 0!==i?i:null===(r=e.revert)||void 0===r?void 0:r.operation_id)&&void 0!==o?o:e.operation_id)===Yt.operation_id&&Boolean(null===(l=null===(a=e.human_resolution)||void 0===a?void 0:a.change_summary)||void 0===l?void 0:l.trim()))}):void 0,Zt=(null===(ce=null==Yt?void 0:Yt.summary)||void 0===ce?void 0:ce.trim())||null,Kt=Xt?(null===(ge=null===(ve=null==Jt?void 0:Jt.human_resolution)||void 0===ve?void 0:ve.change_summary)||void 0===ge?void 0:ge.trim())||(null===(pe=null==Yt?void 0:Yt.summary)||void 0===pe?void 0:pe.trim())||"":(null===(he=null===(fe=null===(me=null==kt?void 0:kt.review_step)||void 0===me?void 0:me.human_resolution)||void 0===fe?void 0:fe.change_summary)||void 0===he?void 0:he.trim())||(null===(be=null===(we=null==kt?void 0:kt.review_step)||void 0===we?void 0:we.summary)||void 0===be?void 0:be.trim())||"",Qt=null==kt?null:Yt?{currentSegment:{title:zt,startPage:kt.segment.start_page,endPage:kt.segment.end_page},previousSegments:Yt.previous_state.map(function(e){var n,t;return{title:(null===(n=e.label)||void 0===n?void 0:n.trim())||(null===(t=e.title)||void 0===t?void 0:t.trim())||"Untitled document",startPage:e.start_page,endPage:e.end_page}})}:"Split"===Ut?{currentSegment:{title:zt,startPage:kt.segment.start_page,endPage:kt.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:zt,startPage:kt.segment.start_page,endPage:kt.segment.end_page}]}:"Merged"===Ut?{currentSegment:{title:zt,startPage:kt.segment.start_page,endPage:kt.segment.end_page},previousSegments:[{title:"Advice of Award",startPage:1,endPage:25},{title:"Request for proposal (RFP)",startPage:26,endPage:76}]}:{currentSegment:{title:zt,startPage:kt.segment.start_page,endPage:kt.segment.end_page},previousSegments:[]},$t="page"===(null==kt?void 0:kt.kind)&&null!==(ye=kt.metadata.classification_id)&&void 0!==ye?ye:null,ei="page"===(null==kt?void 0:kt.kind)?Boolean(on&&$t):Boolean((null==Yt?void 0:Yt.operation_id)&&(null==Yt?void 0:Yt.type)&&!1!==(null==Yt?void 0:Yt.revertable));Boolean(Qt&&ei&&("page"!==(null==kt?void 0:kt.kind)||$t));var ni=s(function(e,n){mt.current+=1,ft.current={requestId:mt.current,pageNumber:e,reviewId:n},tt({pageNumber:e,requestId:mt.current})},[]),ti=s(function(e){var n;!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)&&(ct(null),Vn(e.id),Xn(e.id),Zn(!1),$n(null),ni(e.pageNumber,e.id),null==ln||ln(e.id,e.segment))},[ln,ni]);d(function(){if(st){var e=requestAnimationFrame(function(){return pt(!0)}),n=window.setTimeout(function(){pt(!1)},3500),t=window.setTimeout(function(){ct(null)},4e3);return function(){cancelAnimationFrame(e),window.clearTimeout(n),window.clearTimeout(t)}}},[st]),d(function(){var e;if(Pn)if(Pn.reviewId){var n=Ln.find(function(e){return e.id===Pn.reviewId&&(!Pn.type||e.kind===Pn.type)});n&&ti(n)}else if(Pn.classificationId){var t=Ln.find(function(e){return"page"===e.kind&&e.metadata.classification_id===Pn.classificationId&&(!Pn.type||e.kind===Pn.type)});t&&ti(t)}else if(Pn.pageNumber&&Pn.type){var i=Number(Pn.pageNumber);if(Number.isInteger(i)&&!(i<1)){var r=null===(e=Pn.pageType)||void 0===e?void 0:e.trim().toLowerCase(),o=Ln.find(function(e){var n="page"===e.kind?e.pageNumber:e.segment.start_page,t="page"!==e.kind||!r||e.metadata.page_type===r;return n===i&&e.kind===Pn.type&&t});o&&ti(o)}}},[Pn,ti,Ln]);var ii=s(function(){ft.current=null,Zn(!1),Vn(null),$n(null),null==ln||ln(null,null)},[ln]),ri=s(function(e){var n;pt(!1),ct(null);var t=null!==(n=Ln.find(function(n){return!Ct.has(n.id)&&"boundary"===n.kind&&n.segment.start_page===e.startPage&&n.segment.end_page===e.endPage}))&&void 0!==n?n:Ln.find(function(n){return!Ct.has(n.id)&&n.segment.start_page<=e.startPage&&n.segment.end_page>=e.startPage});t?ti(t):(ii(),mt.current+=1,tt({pageNumber:e.startPage,requestId:mt.current}))},[ii,Ct,Ln,ti]),oi=s(function(e){var n;if(De){var t=Ln.findIndex(function(n){return n.id===e}),i=new Set(Ln.map(function(e){return e.id})),r=null!==(n=Ln.find(function(n,r){return r>t&&n.id!==e&&i.has(n.id)}))&&void 0!==n?n:Ln.find(function(n){return n.id!==e});r?requestAnimationFrame(function(){return ti(r)}):ii()}else ii()},[De,ii,Ln,ti,Ln]),ai=s(function(e,n,r){return t(Ee,void 0,void 0,function(){var t,o,a,l,d,u,s,c,v;return i(this,function(i){switch(i.label){case 0:if(cn)return[2];if("boundary"===e.kind&&!nn)return[2];if("label"===e.kind&&!tn)return[2];if("page"===e.kind&&!rn)return[2];t=Y(e),a=r,l=(o=n)===p.SET_RANGE?function(){var n=a.startPage,t=a.endPage;if(null==n||null==t)return null;var i=n<e.segment.start_page||t>e.segment.end_page,r=n>e.segment.start_page||t<e.segment.end_page;return i&&!r?n<e.segment.start_page?p.MERGE_PREV:p.MERGE_NEXT:r?p.SPLIT_HERE:null}():o,d="boundary"===e.kind&&null!=nn&&De&&(l===p.SPLIT_HERE||l===p.MERGE_NEXT||l===p.MERGE_PREV||l===p.MERGE_PREVIOUS),u=d?Re.findIndex(function(n){return _(n)===_(e.segment)}):-1,d&&u>=0&&l&&(ht.current={action:l,originalSegmentIndex:u,segmentSignature:JSON.stringify(Re.map(function(e,n){var t;return{key:_(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}})),ready:!1}),dt(e.id),i.label=1;case 1:return i.trys.push([1,8,9,10]),"boundary"!==e.kind?[3,3]:[4,null==nn?void 0:nn(n,r,t)];case 2:return i.sent(),[3,7];case 3:return"label"!==e.kind?[3,5]:[4,null==tn?void 0:tn(n,r,t)];case 4:return i.sent(),[3,7];case 5:return"page"!==e.kind?[3,7]:[4,null==rn?void 0:rn(n,r,t)];case 6:i.sent(),i.label=7;case 7:return ot(function(n){var t=new Set(n);return t.add(e.id),t}),s="boundary"===e.kind&&(l===p.MERGE_NEXT||l===p.MERGE_PREV||l===p.MERGE_PREVIOUS),("boundary"===e.kind&&l===p.SPLIT_HERE||s)&&l&&An(function(n){var t=new Map(n);return t.set(_(e.segment),l),t}),ht.current?(ht.current.ready=!0,s&&(c=Ln.find(function(n){return"label"===n.kind&&_(n.segment)===_(e.segment)}))&&requestAnimationFrame(function(){return ti(c)})):oi(e.id),[3,10];case 8:return v=i.sent(),d&&(ht.current=null),null==un||un(v,t),[3,10];case 9:return dt(null),[7];case 10:return[2]}})})},[De,cn,un,nn,tn,rn,on,Ln,Re,ti,oi]);d(function(){var e=ht.current;if(null==e?void 0:e.ready){var n=JSON.stringify(Re.map(function(e,n){var t;return{key:_(e,n),startPage:e.start_page,endPage:e.end_page,version:null!==(t=e.version)&&void 0!==t?t:null}}));if(n!==e.segmentSignature){var t=e.action===p.SPLIT_HERE?e.originalSegmentIndex+1:e.action===p.MERGE_PREV||e.action===p.MERGE_PREVIOUS?Math.max(0,e.originalSegmentIndex-1):e.originalSegmentIndex,i=new Map(Re.map(function(e,n){return[_(e,n),n]})),r=Ln.find(function(e){var n,r=i.get(_(e.segment));return null!=r&&r>=t&&!q(e.review_step,e.segment)&&(!rt.has(e.id)||!G(e.review_step,e.segment))&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if(!r)return ht.current=null,void ii();requestAnimationFrame(function(){ht.current=null,ti(r)})}}},[ii,rt,Ln,Re,ti]),d(function(){ht.current||Dn&&!Ln.some(function(e){return e.id===Dn})&&ii()},[Dn,ii,Ln]),d(function(){if(Ge&&!ht.current){var e=Ln.find(function(e){return e.pageNumber===qn});e&&e.id!==Dn&&ti(e)}},[Dn,Ge,qn,ti,Ln]),d(function(){ht.current||Dn&&!Ln.some(function(e){var n;return e.id===Dn&&!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)})&&ii()},[Dn,ii,Ln]);var li=a(function(){var n=Ln.filter(function(e){var n;return!0!==(null===(n=e.segment.confidence)||void 0===n?void 0:n.awaiting_llm)});if("all"===Le)return n;var t=["low","medium","high"].filter(function(e){return e!==Te}),i=e([Te],t,!0),r=new Map(i.map(function(e,n){return[e,n]}));return n.map(function(e,n){return{item:e,index:n}}).sort(function(e,n){var t,o,a,l,d=null===(t=e.item.review_step.confidence)||void 0===t?void 0:t.trim().toLowerCase(),u=null===(o=n.item.review_step.confidence)||void 0===o?void 0:o.trim().toLowerCase();return(null==d?i.length:null!==(a=r.get(d))&&void 0!==a?a:i.length)-(null==u?i.length:null!==(l=r.get(u))&&void 0!==l?l:i.length)||e.index-n.index}).map(function(e){return e.item})},[Le,Te,Ln]),di=li.findIndex(function(e){return e.id===Hn}),ui=l(null),si=ui[0],ci=ui[1],vi=u(!1),gi=s(function(e){var n=li[e];n&&ti(n)},[li,ti]);d(function(){Hn&&!li.some(function(e){return e.id===Hn})&&Xn(null)},[li,Hn]),d(function(){vi.current=!1,ci(di>=0?String(di+1):null)},[di,li.length]),d(function(){if(vi.current&&null!=si){var e=window.setTimeout(function(){var e=Number(si.trim()),n=e-1;Number.isInteger(e)&&n>=0&&n<li.length&&(vi.current=!1,gi(n))},300);return function(){return window.clearTimeout(e)}}},[gi,si,li.length]);var pi=a(function(){var e=new Map;Ln.forEach(function(n){var t,i=null!==(t=e.get(_(n.segment)))&&void 0!==t?t:[];i.push(n),e.set(_(n.segment),i)});var n=new Map;return e.forEach(function(e,t){var i,r=null!==(i=Nn.get(t))&&void 0!==i?i:1;e.sort(function(e,n){return e.reviewStepIndex-n.reviewStepIndex}).forEach(function(e,t){n.set(e.id,"".concat(r).concat(function(e){for(var n=e+1,t="";n>0;)n-=1,t=String.fromCharCode(65+n%26)+t,n=Math.floor(n/26);return t}(t)))})}),n},[Ln,Nn]),mi=a(function(){var e=new Map;Ln.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},[Ln]),fi=s(function(e){return{startPage:Math.max(0,e.startPage-Ue),endPage:Math.min(e.numPages-1,e.endPage+Ue)}},[Ue]),hi=s(function(){var e,n=bt.current,t=yt.current;if(n&&t){var i=n.getBoundingClientRect(),r=t.querySelector(".rpv-core__inner-pages"),o=null!==(e=null==r?void 0:r.getBoundingClientRect())&&void 0!==e?e:t.getBoundingClientRect();if(Ln.forEach(function(e){var n,r=wt.current.get(e.id);if(r){var a=t.querySelector('[data-testid="core__page-layer-'.concat(e.pageNumber-1,'"]'));if(a){var l=a.getBoundingClientRect(),d=null!==(n=mi.get(e.id))&&void 0!==n?n:0,u=l.top+Xe+40*d,s=u+(r.offsetHeight||32),c=u>=o.top&&s<=o.bottom;r.style.top="".concat(u-i.top,"px"),r.style.visibility=c?"visible":"hidden"}else r.style.visibility="hidden"}}),Dn&&null==ft.current){var a=wt.current.get(Dn);a&&"hidden"!==a.style.visibility&&$n(function(e){return e===a?e:a})}}},[Dn,Xe,mi,Ln]),wi=s(function(e){var n=ft.current;n&&n.requestId===e.requestId&&n.pageNumber===e.pageNumber&&(ft.current=null,hi(),requestAnimationFrame(function(){if(null==ft.current){var e=wt.current.get(n.reviewId);e&&"hidden"!==e.style.visibility&&$n(e)}}))},[hi]);return d(function(){var e=yt.current;if(e&&Fe){var n=null,t=function(){null==n&&(n=requestAnimationFrame(function(){n=null,hi()}))};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()}}},[Fe,hi]),r("div",n({ref:bt,className:yn,style:n(n({},_n),{display:"block",position:"relative",width:"100%",height:"100%",minWidth:0,overflowX:"auto",overflowY:"hidden"})},{children:[r("div",n({className:"segment-review-wrapper__container",style:{display:"flex",alignItems:"stretch",gap:0,width:"100%",minWidth:700,height:"100%"}},{children:[o("div",n({ref:yt,style:n(n({},xn),{flex:"1 1 auto",width:Fe?"auto":"100%",minWidth:0,height:"100%",boxSizing:"border-box"})},{children:o(v,n({highlightText:[],highlightPages:{},highlightCordinatePages:[],useCoordinates:!1},Ie,{defaultScale:void 0===Ae?null!==(_e=null==Ie?void 0:Ie.defaultScale)&&void 0!==_e?_e:c.PageFit:X[Ae],disablePdfAnnotations:gn,disablePdfTextLayer:mn,pdfUrl:Ce,pdfName:ke,segments:zn,navigationRequest:nt,onNavigationSettled:wi,setRenderRange:fi,onCurrentPageChange:function(e){Gn(e),null==ft.current&&kt&&kt.pageNumber!==e&&ii(),null==dn||dn(e)}}))})),Fe&&r("aside",n({"aria-label":"Page review badges",ref:Wn,style:n(n({},Sn),{position:"relative",width:Et,maxWidth:H,flex:"0 1 ".concat(Et),minHeight:0,overflow:"hidden",boxSizing:"border-box"})},{children:[je&&li.length>0&&r("nav",n({"aria-label":"Review badge navigation",style:{position:"absolute",top:8,right:Je||"auto",left:Ke||"auto",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!=si?si:"-","aria-label":"Review badge number",onChange:function(e){vi.current=!0,ci(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"}}),r("span",n({"aria-label":"".concat(li.length," reviews"),style:{flex:1,color:"#4F46E5",fontSize:14,whiteSpace:"nowrap",textAlign:"center"}},{children:["of ",li.length]})),["previous","next"].map(function(e){var t="previous"===e,i=di+(t?-1:1),r=i<0||i>=li.length;return o("button",n({type:"button","aria-label":"".concat(t?"Previous":"Next"," review badge"),disabled:r,onClick:function(){return gi(i)},style:{display:"grid",placeItems:"center",width:17,height:28,padding:0,border:0,background:"transparent",color:r?"#C7D2FE":"#4F46E5",cursor:r?"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)})]})),Ln.map(function(e){var t,i,a=Dn===e.id,l=null!==(t=pi.get(e.id))&&void 0!==t?t:"1A",d=e.review_step.score,u=e.review_step.confidence,s=O(d,u),c="boundary"===e.kind?z(e.review_step,e.segment,In.get(_(e.segment))):"label"===e.kind?j(e.review_step,e.segment,In.get(_(e.segment))):null,v=null!=c?c:"N/A"===s?s:"".concat(s,"%"),g=!0===(null===(i=e.segment.confidence)||void 0===i?void 0:i.awaiting_llm),p=L(d,u,g),m=Ct.has(e.id);return o(E,n({title:g?"data is being processed":"",arrow:!0},{children:o("span",n({ref:function(n){n?wt.current.set(e.id,n):wt.current.delete(e.id)},style:{position:"absolute",top:0,left:10,visibility:"hidden",display:"inline-flex",cursor:g?"not-allowed":"pointer"}},{children:o("button",n({disabled:g,type:"button","aria-pressed":a,"aria-label":g?"".concat(e.review_step.type," · Page ").concat(e.pageNumber," · Data is being processed"):"".concat(e.review_step.type," · Page ").concat(e.pageNumber),onClick:function(){return ti(e)},style:{cursor:"inherit",display:"flex",alignItems:"center",justifyContent:"space-around",gap:4,width:c?m&&!g?115:90:m&&!g?105:80,minHeight:25,padding:"2px 5px",border:"1px solid ".concat(m&&!g?"#E2E8F0":p.border),borderRadius:16,backgroundColor:m&&!g?"#F8FAFC":p.background,color:m&&!g?"#475569":p.text,font:"inherit",alignContent:"center",boxShadow:"0 1px 2px rgba(16, 24, 40, 0.08)"}},{children:r(C,n({fontFamily:"Inter",sx:{display:"flex",gap:1,alignItems:"center",flexDirection:"row"}},m&&!g?{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:l})),r("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:v}))]})),r("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(x,{height:14,width:14,strokeWidth:2,color:"#16A34A"})}))]}))]}:{children:[o("span",n({style:{fontSize:11,fontWeight:500}},{children:l})),r("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:p.divider,strokeWidth:"0.8"})})),o("span",n({style:{fontSize:11,fontWeight:500,marginLeft:"7px",display:"flex",alignItems:"center"}},{children:v}))]}))]}))}))}))}),e.id)})]}))]})),kt&&Qn&&r(f,n({anchorElement:Qn,placement:"bottom-start",offset:{top:8},width:Math.min(xt,H),maxWidth:H,heightBuffer:null!=en?en:25},{children:[Jn&&o(h,{width:"100%",maxWidth:"100%",score:kt.review_step.score,reasons:Tt,reason:kt.review_step.reason,gap:kt.review_step.gap,onBack:function(){return Zn(!1)},onClose:ii}),o("div",n({style:{display:Jn?"none":"block"}},{children:Ct.has(kt.id)?o(M,{width:"100%",maxWidth:"100%",headerName:"page"===kt.kind?"Page format approved":"Split"===Lt?"Split approved":"Merged"===Lt?"Merge approved":"User approved",headerIcon:"page"===kt.kind?o(S,{size:18,strokeWidth:2}):"Merged"===Lt?o(P,{size:18,strokeWidth:2}):"Split"===Lt?o(D,{width:18,height:18}):o(x,{size:18,strokeWidth:2}),title:zt,pageNo:"Page ".concat(kt.segment.start_page,"-").concat(kt.segment.end_page),summary:Qt?o(I,{icon:o(x,{size:14,strokeWidth:2}),title:zt,pageRange:"Page ".concat(kt.segment.start_page,"-").concat(kt.segment.end_page),description:null!=Kt?Kt:null,revertData:Qt,confirmDisabled:null==an||!ei,showDocumentHeader:!1,onRevert:function(){if("page"===kt.kind){if(!on||!$t){var e=new Error("SegmentReviewPdfWrapper requires onPageTypeRevert and a classification id to revert a page-type decision.");return null==un||un(e,Y(kt)),Promise.reject(e)}return on({classification_id:$t,human_verdict:"No"},Y(kt))}if(!an)throw new Error("SegmentReviewPdfWrapper requires onRevert to handle a revert confirmation.");if(!Yt)throw new Error("There is no valid revert operation for this review.");var n=Xt?"boundary":"label"===kt.kind?"label":"boundary"===kt.kind?"boundary":null,t=Gt(Yt.type);if(n&&t!==n)throw new Error("Cannot use ".concat(null!=t?t:"unknown"," revert metadata for this review. Expected ").concat(n,"."));return an(Yt,Y(kt))},onRevertError:function(e){null==un||un(e,Y(kt))},onRevertComplete:function(e){var n,t,i,r,o,a;ot(function(){return new Set}),"page"!==kt.kind&&An(function(){return new Map}),kt.id;var l=null!==(n=Qt.previousSegments[0])&&void 0!==n?n:Qt.currentSegment,d=null==Qn?void 0:Qn.getBoundingClientRect(),u=null===(t=yt.current)||void 0===t?void 0:t.getBoundingClientRect(),s=Math.min(H,Math.max(220,xt)),c=null!==(i=null==d?void 0:d.left)&&void 0!==i?i:(null!==(r=null==u?void 0:u.right)&&void 0!==r?r:window.innerWidth-s-8)+8,v=Math.max(8,Math.min(c,window.innerWidth-s-8)),g=null==(null==d?void 0:d.bottom)?Math.max(8,null!==(o=null==u?void 0:u.top)&&void 0!==o?o:8):d.bottom+8;ot(function(){return new Set}),"page"!==kt.kind&&(ht.current=null),pt(!1),ct({title:"Split"===Lt?"Split reverted":"Merged"===Lt?"Merge reverted":"Approval reverted",description:(null===(a=null==e?void 0:e.message)||void 0===a?void 0:a.trim())||("Split"===Lt?"Pages ".concat(kt.segment.start_page,"-").concat(kt.segment.end_page," are now part of “Advice of Award” again. Review the boundary and title to confirm the document."):"Merged"===Lt?"The documents have been separated again. Review their boundaries and titles to confirm them.":"“".concat(zt,"” is pending review again. Review the boundary and title to confirm the document.")),segment:l,position:{top:g,left:v,width:s}}),ii()}},kt.id):void 0,cognitiveScore:kt.review_step.score,styles:{root:{borderColor:"#16A34A"},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:"#16A34A"}}},onCognitiveClick:Wt?function(){Zn(!0),null==bn||bn(Y(kt))}:void 0,onClose:ii}):"boundary"===kt.kind?o(g,{width:"100%",maxWidth:"100%",title:kt.segment.label||kt.segment.title,pageNo:"Page ".concat(kt.pageNumber),content:null!==(xe=kt.review_step.question)&&void 0!==xe?xe:null,revertSummary:Zt,cognitiveScore:kt.review_step.score,metadata:kt.metadata,reviewAction:null!==(Se=kt.segment.review_action)&&void 0!==Se?Se:void 0,previousSegmentTitle:Nt,nextSegmentTitle:Ft,manualPrompt:null!=$e?$e:"Set a custom boundary",defaultStartPage:kt.segment.start_page,defaultEndPage:kt.segment.end_page,styles:{root:{borderColor:Bt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Bt.text}}},confirmDisabled:cn||!nn||lt===kt.id,onConfirm:function(e,n,t){t&&m(n.id)&&ai(kt,n.id,t)},onAdjustManually:function(){return null==wn?void 0:wn(Y(kt))},onCognitiveClick:Wt?function(){Zn(!0),null==bn||bn(Y(kt))}:void 0,onClose:ii},kt.id):"label"===kt.kind?o(w,{width:"100%",maxWidth:"100%",title:kt.metadata.current_label||kt.segment.label||kt.segment.title,pageNo:"Pages ".concat(kt.segment.start_page,"-").concat(kt.segment.end_page),content:null!==(Pe=kt.review_step.question)&&void 0!==Pe?Pe:null,revertSummary:Zt,cognitiveScore:kt.review_step.score,metadata:kt.metadata,styles:{root:{borderColor:Bt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Bt.text}}},confirmDisabled:cn||!tn||lt===kt.id,confirmationBlocked:Rt,confirmationWarning:Rt?"Please confirm the boundary before confirming the title.":void 0,onActionConfirm:function(e,n){ai(kt,e,n)},onAdjustManually:function(){return null==wn?void 0:wn(Y(kt))},onCognitiveClick:Wt?function(){Zn(!0),null==bn||bn(Y(kt))}:void 0,onClose:ii},kt.id):o(b,{width:"100%",maxWidth:"100%",title:kt.segment.label||kt.segment.title,pageNo:"Page ".concat(kt.pageNumber),content:kt.review_step.reason,cognitiveScore:kt.review_step.score,pageType:kt.metadata.page_type,metadata:kt.metadata,styles:{root:{borderColor:Bt.cardBorder},header:{"& > .MuiSvgIcon-root, & .MuiTypography-root":{color:Bt.text}}},confirmDisabled:cn||!rn||lt===kt.id,onActionConfirm:function(e,n){ai(kt,e,n)},onCognitiveClick:Wt?function(){Zn(!0),null==bn||bn(Y(kt))}:void 0,onClose:ii},kt.id)}))]})),st&&o(k,{children:o(R,n({"aria-live":"polite",sx:{position:"fixed",top:st.position.top,left:st.position.left,zIndex:1600,width:st.position.width,maxWidth:"calc(100vw - 16px)",opacity:gt?1:0,transform:gt?"translateY(0)":"translateY(-6px)",transition:"opacity 500ms ease, transform 500ms ease",filter:"drop-shadow(0 12px 24px rgba(15, 23, 42, 0.18))",pointerEvents:gt?"auto":"none"}},{children:o(A,{title:st.title,description:st.description,onReview:function(){return ri(st.segment)}})}))})]}))}export{U as SegmentPdfSpecialZoomLevel,J as default};
2
2
  //# sourceMappingURL=SegmentReviewPdfWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{isBoundaryReviewAction as e}from"./BoundaryCard.js";import{isLabelReviewAction as n}from"./LabelCheck.js";import{isPageCheckAction as a}from"./PageCheck.js";var i=function(e){return"object"==typeof e&&null!==e?e:{}},t=function(e){return"string"==typeof e?e:null},o=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},r=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},l=function(e){var n="string"==typeof e?e.trim().toLowerCase():"";return"table"===n||"drawing"===n?n:null},u=function(e,n){return void 0===n&&(n=0),e.stable_key||e.segment_id||"".concat(e.start_page,"-").concat(e.end_page,"-").concat(n)},c=function(e){var a=i(e);return{current_label:t(a.current_label),custom_label:t(a.custom_label),group_id:t(a.group_id),user_actions:r(a.user_actions).filter(n)}},d=function(e){var n=i(e);return{page_type:l(n.page_type),page_num:o(n.page_num),classification_id:t(n.classification_id),user_actions:r(n.user_actions).filter(a)}},s=function(n){var t=[],s=[],v=[];return n.forEach(function(n,p){var f,_,m=u(n,p),g=null!==(f=n.review_steps)&&void 0!==f?f:[];g.forEach(function(a,l){var u,p,f=(u=a.type,"page_boundary"===(p=u.trim().toLowerCase())||"page boundary review"===p?"boundary":"label"===p||"label review"===p?"label":"page"===p?"page":null);if("boundary"===f){var _=function(n){var a=i(n);return{focus_page:o(a.focus_page),boundary_margin:o(a.boundary_margin),user_actions:r(a.user_actions).filter(e)}}(a.metadata);t.push({id:"".concat(m,":boundary:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:_})}"label"===f&&s.push({id:"".concat(m,":label:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:c(a.metadata)}),"page"===f&&v.push({id:"".concat(m,":page:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:d(a.metadata)})});var y=0;null===(_=n.page_classifications)||void 0===_||_.forEach(function(e,i){var t,o,r=null!==(t=e.page_num)&&void 0!==t?t:null,u=null!==(o=e.questions)&&void 0!==o?o:[];(u.length>0?u:e.severity?[e]:[]).forEach(function(t,o){var u,c,s,p;if(l(t.page_type)){var f=function(e,n,i,t){var o,r,u,c,d,s,v,p,f,_,m,g,y,b,h,w=l(e.page_type),C=null===(r=null===(o=e.human_action)||void 0===o?void 0:o.verdict)||void 0===r?void 0:r.trim().toUpperCase(),x=C&&a(C)?C:null;return{type:"page",confirmed:i,title:"Page Type Check",summary:(null==t?void 0:t.trim())||void 0,format:"pdf",confidence:null!==(c=null===(u=e.machine_classification)||void 0===u?void 0:u.confidence)&&void 0!==c?c:null,decided_by:null!==(s=null===(d=e.machine_classification)||void 0===d?void 0:d.decisioning_method)&&void 0!==s?s:null,human_action_enum:null,reason:w?"We're not fully confident about the type of this page. Is this page a ".concat(w,"?"):null,reasons:null!==(v=e.reasons)&&void 0!==v?v:[],score:null!==(_=null!==(p=e.score)&&void 0!==p?p:null===(f=e.machine_classification)||void 0===f?void 0:f.score)&&void 0!==_?_:null,review:null==x?null:{action:x,reviewed_by:null!==(g=null===(m=e.human_action)||void 0===m?void 0:m.reviewed_by)&&void 0!==g?g:"",reviewed_at:null!==(b=null===(y=e.human_action)||void 0===y?void 0:y.reviewed_at)&&void 0!==b?b:""},metadata:{page_type:w,page_num:n,classification_id:null!==(h=e.id)&&void 0!==h?h:null,user_actions:["YES","NO"]}}}(t,r,null!==(c=null!==(u=t.confirmed)&&void 0!==u?u:e.confirmed)&&void 0!==c?c:null,null!==(s=e.summary)&&void 0!==s?s:null);v.push({id:"".concat(m,":page-classification:").concat(null!==(p=t.id)&&void 0!==p?p:"".concat(i,"-").concat(o)),reviewStepIndex:g.length+y,segment:n,review_step:f,metadata:d(f.metadata)}),y+=1}})})}),{boundaryReviews:t,labelReviews:s,pageReviews:v}};export{s as extractSegmentReviewData,u as getSegmentReviewKey};
1
+ import{isBoundaryReviewAction as e}from"./BoundaryCard.js";import{isLabelReviewAction as n}from"./LabelCheck.js";import{isPageCheckAction as a}from"./PageCheck.js";var i=function(e){return"object"==typeof e&&null!==e?e:{}},t=function(e){return"string"==typeof e?e:null},o=function(e){return"number"==typeof e&&Number.isFinite(e)?e:null},r=function(e){return Array.isArray(e)?e.filter(function(e){return"string"==typeof e}):[]},l=function(e){var n="string"==typeof e?e.trim().toLowerCase():"";return"table"===n||"drawing"===n?n:null},u=function(e,n){return void 0===n&&(n=0),e.stable_key||e.segment_id||"".concat(e.start_page,"-").concat(e.end_page,"-").concat(n)},c=function(e){var a=i(e);return{current_label:t(a.current_label),custom_label:t(a.custom_label),group_id:t(a.group_id),user_actions:r(a.user_actions).filter(n)}},d=function(e){var n=i(e);return{page_type:l(n.page_type),page_num:o(n.page_num),classification_id:t(n.classification_id),user_actions:r(n.user_actions).filter(a)}},s=function(n){var t=[],s=[],v=[];return n.forEach(function(n,p){var f,_,m=u(n,p),g=null!==(f=n.review_steps)&&void 0!==f?f:[];g.forEach(function(a,l){var u,p,f=(u=a.type,"page_boundary"===(p=u.trim().toLowerCase())||"page boundary review"===p?"boundary":"label"===p||"label review"===p?"label":"page"===p?"page":null);if("boundary"===f){var _=function(n){var a=i(n);return{focus_page:o(a.focus_page),boundary_margin:o(a.boundary_margin),user_actions:r(a.user_actions).filter(e)}}(a.metadata);t.push({id:"".concat(m,":boundary:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:_})}"label"===f&&s.push({id:"".concat(m,":label:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:c(a.metadata)}),"page"===f&&v.push({id:"".concat(m,":page:").concat(l),reviewStepIndex:l,segment:n,review_step:a,metadata:d(a.metadata)})});var y=0;null===(_=n.page_classifications)||void 0===_||_.forEach(function(e,i){var t,o,r=null!==(t=e.page_num)&&void 0!==t?t:null,u=null!==(o=e.questions)&&void 0!==o?o:[];(u.length>0?u:e.severity?[e]:[]).forEach(function(t,o){var u,c,s,p;if(l(t.page_type)){var f=function(e,n,i,t){var o,r,u,c,d,s,v,p,f,_,m,g,y,b,w,h=l(e.page_type),C=null===(r=null===(o=e.human_action)||void 0===o?void 0:o.verdict)||void 0===r?void 0:r.trim().toUpperCase(),E=C&&a(C)?C:null,S="drawing"===h?"an engineering drawing":h?"a ".concat(h):null;return{type:"page",confirmed:i,title:"Page Type Check",summary:(null==t?void 0:t.trim())||(E&&null!=n&&S?"Page ".concat(n," was confirmed as ").concat("YES"===E?S:"not ".concat(S),"."):void 0),format:"pdf",confidence:null!==(c=null===(u=e.machine_classification)||void 0===u?void 0:u.confidence)&&void 0!==c?c:null,decided_by:null!==(s=null===(d=e.machine_classification)||void 0===d?void 0:d.decisioning_method)&&void 0!==s?s:null,human_action_enum:null,reason:h?"We're not fully confident about the type of this page. Is this page a ".concat(h,"?"):null,reasons:null!==(v=e.reasons)&&void 0!==v?v:[],score:null!==(_=null!==(p=e.score)&&void 0!==p?p:null===(f=e.machine_classification)||void 0===f?void 0:f.score)&&void 0!==_?_:null,review:null==E?null:{action:E,reviewed_by:null!==(g=null===(m=e.human_action)||void 0===m?void 0:m.reviewed_by)&&void 0!==g?g:"",reviewed_at:null!==(b=null===(y=e.human_action)||void 0===y?void 0:y.reviewed_at)&&void 0!==b?b:""},metadata:{page_type:h,page_num:n,classification_id:null!==(w=e.id)&&void 0!==w?w:null,user_actions:["YES","NO"]}}}(t,r,null!==(c=null!==(u=t.confirmed)&&void 0!==u?u:e.confirmed)&&void 0!==c?c:null,null!==(s=e.summary)&&void 0!==s?s:null);v.push({id:"".concat(m,":page-classification:").concat(null!==(p=t.id)&&void 0!==p?p:"".concat(i,"-").concat(o)),reviewStepIndex:g.length+y,segment:n,review_step:f,metadata:d(f.metadata)}),y+=1}})})}),{boundaryReviews:t,labelReviews:s,pageReviews:v}};export{s as extractSegmentReviewData,u as getSegmentReviewKey};
2
2
  //# sourceMappingURL=reviewStepAdapters.js.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,EAGhB,KAAK,cAAc,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAqB,EAGnB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAClC,MAAM,gBAAgB,CAAC;AAGxB,OAAmB,EACjB,K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AAE,OAAO,CAAC;IAC9B,4CAA4C,CAAC,EAAE,OAAO,CAAC;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAsBD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAAC,EAC9C,MAAM,EACN,OAAO,EACP,QAAQ,EACR,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,UAAiB,EACjB,gBAAwB,EACxB,kBAA0B,EAC1B,mBAA0B,EAC1B,4BAAoC,EACpC,uBAA8B,EAC9B,iBAAqB,EACrB,cAAmB,EACnB,gBAAqB,EACrB,eAAmB,EACnB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,iBAAyB,EACzB,qBAA6B,EAC7B,mBAA0B,EAC1B,4CAAoD,EACpD,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,WAAW,EACX,SAAS,EACT,eAAe,GAChB,EAAE,4BAA4B,2CA0vD9B"}
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,EAGnB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EAClC,MAAM,gBAAgB,CAAC;AAGxB,OAAmB,EACjB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAC;AACtB,OAAkB,EAChB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAML,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,C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cAAc,EACd,gBAAgB,EAChB,UAAiB,EACjB,gBAAwB,EACxB,kBAA0B,EAC1B,mBAA0B,EAC1B,4BAAoC,EACpC,uBAA8B,EAC9B,iBAAqB,EACrB,cAAmB,EACnB,gBAAqB,EACrB,eAAmB,EACnB,eAAe,EACf,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,iBAAyB,EACzB,qBAA6B,EAC7B,mBAA0B,EAC1B,4CAAoD,EACpD,gBAAgB,EAChB,gBAAgB,EAChB,SAAS,EACT,KAAK,EACL,WAAW,EACX,SAAS,EACT,eAAe,GAChB,EAAE,4BAA4B,2CAkvD9B"}
@@ -2,10 +2,12 @@ import type { SegmentReviewSource } from './reviewStepAdapters';
2
2
  export interface SegmentReviewRedirectionTestProps {
3
3
  pdfUrl: string;
4
4
  segments: readonly SegmentReviewSource[];
5
+ pageCheckPdfUrl?: string;
6
+ pageCheckSegments?: readonly SegmentReviewSource[];
5
7
  }
6
8
  /**
7
9
  * Isolated development example for exercising prop-driven badge redirection.
8
10
  * This file is intentionally not exported from the package entry point.
9
11
  */
10
- export default function SegmentReviewRedirectionTest({ pdfUrl, segments, }: SegmentReviewRedirectionTestProps): import("react/jsx-runtime").JSX.Element;
12
+ export default function SegmentReviewRedirectionTest({ pdfUrl, segments, pageCheckPdfUrl, pageCheckSegments, }: SegmentReviewRedirectionTestProps): import("react/jsx-runtime").JSX.Element;
11
13
  //# sourceMappingURL=SegmentReviewRedirectionTest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentReviewRedirectionTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;CAC1C;AAsGD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,MAAM,EACN,QAAQ,GACT,EAAE,iCAAiC,2CAyPnC"}
1
+ {"version":3,"file":"SegmentReviewRedirectionTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/SegmentReviewComponents/SegmentReviewRedirectionTest.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACzC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACpD;AAwGD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAAC,EACnD,MAAM,EACN,QAAQ,EACR,eAAoB,EACpB,iBAAsB,GACvB,EAAE,iCAAiC,2CAmRnC"}
@@ -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;AAE3E,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,oBAAoB,GAAG,iBAAiB,GAAG,eAAe,CAAC;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM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AE,MAAM,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC;IAClB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AA4BD,eAAO,MAAM,mBAAmB,YAAa,mBAAmB,2BAGV,CAAC;AA2FvD,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB;;;;CA+EpC,CAAC"}
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;AAE3E,OAAO,KAAK,EACV,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,aAAa,CAAC;AAGrB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,oBAAoB,GAAG,iBAAiB,GAAG,eAAe,CAAC;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM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,CAAC;IAC3D,gBAAgB,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACzD,YAAY,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACxC;AAED,MAAM,WAAW,uBAAuB,CAAC,QAAQ,SAAS,mBAAmB;IAC3E,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC;IAClB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,gBAAgB,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;CACrD;AAED,MAAM,WAAW,oBAAoB,CAAC,QAAQ,SAAS,mBAAmB;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC;IAClB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,mBAAmB,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB,CAAC,QAAQ,SAAS,mBAAmB;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,QAAQ,CAAC;IAClB,WAAW,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AA4BD,eAAO,MAAM,mBAAmB,YAAa,mBAAmB,2BAGV,CAAC;AAqGvD,0FAA0F;AAC1F,eAAO,MAAM,wBAAwB;;;;CA+EpC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viswa-test/test-citation",
3
- "version": "0.0.362",
3
+ "version": "0.0.363",
4
4
  "author": "Viswa Koduru",
5
5
  "description": "",
6
6
  "license": "MIT",