diff --git a/web/dist/apps/labelstudio/82.js b/web/dist/apps/labelstudio/82.js index 3d756cd4da85..ca22601315ba 100644 --- a/web/dist/apps/labelstudio/82.js +++ b/web/dist/apps/labelstudio/82.js @@ -1,2 +1,2 @@ -(self.webpackChunklabelstudio=self.webpackChunklabelstudio||[]).push([[82],{47895:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,l:()=>r});const r={fillcolor:"#666",opacity:.2,strokecolor:"#666",strokewidth:1},o={FILL_COLOR:"",STROKE_COLOR:"",STROKE_WIDTH:1,LABEL_BACKGROUND:"#36B37E",EMPTY_LABEL:"blank",RELATION_BACKGROUND:"#fff",SHOW_LABEL_FILL:"white",SHOW_LABEL_BACKGROUND:"black",HIGHLIGHTED_STROKE_COLOR:"red",HIGHLIGHTED_STROKE_WIDTH:2,HIGHLIGHTED_CSS_BORDER:"1px dashed #00aeff",SUGGESTION_STROKE_WIDTH:4,DEFAULT_CURSOR:"default",CHOOSE_CURSOR:"pointer",POINTER_CURSOR:"pointer",MOVE_CURSOR:"hand",LINKING_MODE_CURSOR:"crosshair",BRIGHTNESS_VALUE:100,BRIGHTNESS_MAX:400,CONTRAST_VALUE:100,CONTRAST_MAX:400}},30997:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={onDeleteAnnotation:function(){},onEntityCreate:function(){},onEntityDelete:function(){},onGroundTruth:function(){},onLabelStudioLoad:function(){},onSkipTask:function(){},onUnskipTask:function(){},onSubmitAnnotation:function(){},onSubmitDraft:function(e){},onTaskLoad:function(){},onUpdateAnnotation:function(){},onSelectAnnotation:function(e,t){},onAcceptAnnotation:function(e,t){},onRejectAnnotation:function(e,t){},onStorageInitialized:function(e){},onNextTask:function(e){},onPrevTask:function(e){}}},81117:()=>{0},2517:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LabelStudio:()=>RH,default:()=>EH});var r={};n.r(r),n.d(r,{drawMask:()=>vt});var o={};n.r(o),n.d(o,{canvasToBinaryMatrix:()=>xt,createDragBoundFunc:()=>jt,fixRectToFit:()=>St,getActualZoomingPosition:()=>Ot,getBoundingBoxAfterChanges:()=>Ct,getBoundingBoxAfterTransform:()=>wt,getTransformedImageData:()=>kt,reverseCoordinates:()=>bt});var i={};n.r(i),n.d(i,{currentISODate:()=>At,msToHMS:()=>Rt,prettyDate:()=>Et,toISODateString:()=>_t});var a={};n.r(a),n.d(a,{applySpanStyles:()=>Wt,captureSelection:()=>Dt,charsToCodePoints:()=>Xt,codePointsToChars:()=>Yt,findNodesBetween:()=>$t,findOnPosition:()=>Jt,findRange:()=>Zt,findRangeNative:()=>Gt,fixCodePointsInRange:()=>qt,highlightRange:()=>Bt,highlightRangePart:()=>Ht,isSelectionContainsSpan:()=>tn,isTextNode:()=>Tt,rangeToGlobalOffset:()=>Qt,removeRange:()=>Ut,wrapWithSpan:()=>Ft});var s={};n.r(s),n.d(s,{AudioVolumeControl:()=>pC,FramesControl:()=>Wa});var l={};n.r(l),n.d(l,{Brightness:()=>pR,Brush:()=>BO,Contrast:()=>yR,Ellipse:()=>nR,Erase:()=>$O,KeyPoint:()=>ZO,MagicWand:()=>wR,Polygon:()=>YO,Rect:()=>QO,Rect3Point:()=>eR,Rotate:()=>hR,Selection:()=>SR,Zoom:()=>cR});var c={};n.r(c),n.d(c,{VideoSettings:()=>EN});var d={};n.r(d),n.d(d,{Boolean:()=>az,Common:()=>sz,Image:()=>fz,Number:()=>mz,String:()=>fz});n(81117);var u=n(57896),h=n(77099),g=n(43144),m=n(83126),p=n(14041),f=n(56036),v=n(69447),y=n(56351);const b=new class{constructor(){this.tags=[],this.models={},this.views={},this.regions=[],this.objects=[],this.areas=new Map,this.views_models={},this.tools={},this.perRegionViews={}}addTag(e,t,n){this.tags.push(e),this.models[e]=t,this.views[e]=n,this.views_models[t.name]=n}addRegionType(e,t,n){this.regions.push(e),n&&(e.detectByValue=n);const r=this.areas.get(t);r?r.push(e):this.areas.set(t,[e])}regionTypes(){return this.regions}addObjectType(e){this.objects.push(e)}objectTypes(){return this.objects}modelsArr(){return Object.values(this.models)}getViewByModel(e){const t=this.views_models[e];if(!t)throw new Error(`No view for model: ${e}`);return t}getViewByTag(e){return this.views[e]}getAvailableAreas(e,t){const n=this.areas.get(e);if(!n)return[];if(t)for(const e of n)if(e.detectByValue&&e.detectByValue(t))return[e];return n.filter((e=>!e.detectByValue))}getTool(e){const t=this.tools[e];if(!t){const t=Object.keys(this.tools);throw new Error(`No model registered for tool: ${e}\nAvailable models:\n\t${t.join("\n\t")}`)}return t}getModelByTag(e){const t=this.models[e];if(!t){const t=Object.keys(this.models);throw new Error(`No model registered for tag: ${e}\nAvailable models:\n\t${t.join("\n\t")}`)}return t}addPerRegionView(e,t,n){const r=this.perRegionViews[e]||{};r[t]=n,this.perRegionViews[e]=r}getPerRegionView(e,t){var n;return null==(n=this.perRegionViews[e])?void 0:n[t]}};b.getTool=b.getTool.bind(b),b.getModelByTag=b.getModelByTag.bind(b);const x=b;var w=n(48862),C=n(5157),S=n.n(C);const j=(e,t)=>{var n;const r=/\$[\w[\].{}]+/gi;return e?(null==(n=e.match(r))?void 0:n[0])===e?null!=(o=S()(t,e.slice(1)))?o:"":e.replace(r,(e=>{var n;return S()(t,null!=(n=e.slice(1))?n:"")})):"";var o},k=e=>{var t;const[,n,r]=null!=(t=e.match(/^(\w+)(.)?/))?t:[],o={};if(r){e.split(r).slice(1).forEach((e=>{const[t,n]=e.split("=",2);o[t]=null==n||n}))}return{type:n,sep:r,options:o}};var O=n(84826),R=n(74331);const E=(e=10)=>(0,R.Ak)(e);var _=n(31085);const A="skip",T="stop";const P=(e,t,n)=>{!function e(r){if(void 0===r.attributes)return;const o=Array.from(r.attributes).map((e=>e.name));for(const e of o){var i;const o=r.getAttribute(e);r.setAttribute(e,null!=(i=null==o||null==o.replace?void 0:o.replace(n,`${t}`))?i:"")}r.childNodes.forEach((t=>e(t)))}(e)};function I(e,t,n){var r,o;const i=function(e,t){const n={};if(!e)return n;for(const r of e.attributes){const{name:e,value:o}=r;if("value"!==e&&["true","false"].includes(o))n[e.toLowerCase()]="true"===o;else if(t){let r=o;for(const[e,n]of Object.entries(t))r=r.replace(e,n);n[e.toLowerCase()]=r}else n[e.toLowerCase()]=o}return n}(e,n),a=e.tagName.toLowerCase(),s=null!=(r=i.indexflag)?r:"{{idx}}",l=(0,O.VS)(O.cE)&&null!=(o=e.getAttribute("name"))?o:E(),c=Object.assign({},i,{id:l,tagName:e.tagName,type:a});if("repeater"===a){const r=j(i.on,t)||[],o=[];for(let i=0;i{const n=e.cloneNode(!0);return P(n,i,s),I(n,t,r)}))};o.push(a)}c.tagName="View","pagination"===i.mode?c.type="pagedview":c.type="view",c.children=o}else if(!e.childNodes.length||e.children.length&&"hypertext"!==a)e.children.length&&(c.children=[...e.children].map((e=>I(e,t))));else{var d;c.value=(null==(d=e.innerHTML)?void 0:d.trim())||c.value||""}return c}function L(e,t,n=!0){let r=e;if((0,O.VS)(O.cE)){var o;if(!t)return null;r=t.ids.get(K(null!=(o=e.id)?o:e.name))}var i;if(!r)return console.error(`Can't find element ${null!=(i=e.id)?i:e.name} in annotation ${null==t?void 0:t.id}`),null;const a=(0,h.Pw)(r),s=a.identifierAttribute,l=a.name,c=x.getViewByModel(l);if(!c)throw new Error(`No view for model: ${l}`);const d=s&&r[s]||E();return(0,_.jsx)(c,{item:r},n?d:void 0)}function M(e,t){const n=e=>{const r=t(e);if(r!==A){if(r===T)return T;if(e.children)for(const t of e.children){if(n(t)===T)return T}}};n(e)}const K=e=>e.replace(/@.*/,"");const D={renderItem:L,renderChildren:function(e,t){return e&&e.children&&e.children.length?e.children.map((e=>L(e,t))):null},treeToModel:function(e,t){var n,r,o;const i=(new DOMParser).parseFromString(e,"application/xml"),a=null==i||null==(n=i.children)?void 0:n[0],s=function(e){var t;let n=null==e||null==(t=e.children)?void 0:t[0];for(let e=0;e<3;e++){var r,o;if("parsererror"===(null==(r=n)?void 0:r.tagName))return n.textContent;n=null==(o=n)||null==(o=o.children)?void 0:o[0]}}(i);if(s)throw new Error(s);return I(a,null!=(r=null==(o=t.task)?void 0:o.dataObj)?r:{})},findParentOfType:function(e,t){for(const n of t)try{const t=(0,h.k2)(e,n);if(t)return t}catch(e){console.error(e)}return null},filterChildrenOfType:function(e,t){const n=[],r=Array.isArray(t)?t:[t];return M(e,(e=>{for(const t of r)(0,h.Pw)(e).name===t&&n.push(e)})),n},cssConverter:function(e){if(!e)return null;const t={},n=e.split(";");let r,o,i,a;for(o=0;oe[1].toUpperCase()))]=a}return t},traverseTree:M,extractNames:function(e){const t=[],n=new Map,r=new Map,o=x.objectTypes().map((e=>e.name.replace("Model","").toLowerCase()));return M(e,(e=>{e.name&&(n.set(K(e.name),e),o.includes(e.type)&&t.push(K(e.name)))})),M(e,(e=>{if(e.name&&!o.includes(e.type)&&!e.toname&&1===t.length&&(e.toname=t[0]),e&&e.toname){const t=r.get(e.toname);t?t.push(n.get(K(e.name))):r.set(e.toname,[n.get(K(e.name))])}})),{names:n,toNames:r}},cleanUpId:K},N=()=>{const e=(0,p.useRef)(!0);return(0,p.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e};var V=n(47895);const z=h.gK.model("CommentMode",{}).volatile((()=>({comment:null}))).views((e=>({get annotation(){return(0,h.PA)(e,2)},get regionStore(){return e.annotation.regionStore}}))).actions((e=>({start(t){e.comment=t},stop(){e.comment=null,e.regionStore.unhighlightAll()},addLinkedRegion(t){e.comment.setRegionLink(t),e.stop()},addLinkedResult(t){e.comment.setResultLink(t),e.stop()}}))),B={key:"link_to_comment",model:z},H={key:"create_relation",model:h.gK.model("RelationsMode",{}).volatile((()=>({region:null}))).views((e=>({get annotation(){return(0,h.PA)(e,2)},get regionStore(){return e.annotation.regionStore},get relationStore(){return e.annotation.relationStore}}))).actions((e=>({start(t){e.region=t},stop(){e.region=null,e.regionStore.unhighlightAll()},addLinkedRegion(t){e.relationStore.addRelation(e.region,t),e.stop()}})))},F=H.key,W=B.key,$=h.gK.union(B.model,H.model),U=h.gK.model("LinkingModes",{linkingModes:h.gK.optional(h.gK.map($),(()=>({[H.key]:H.model.create({}),[B.key]:B.model.create({})})))}).volatile((e=>({linkingMode:!1}))).views((e=>({get currentLinkingMode(){return e.linkingMode&&e.linkingModes.has(e.linkingMode)?e.linkingModes.get(e.linkingMode):null},get isLinkingMode(){return!!e.linkingMode},get relationMode(){return console.warn("`relationMode` is deprecated. Use `isLinkingMode` instead."),e.isLinkingMode}}))).actions((e=>({startLinkingMode(t,n){e.isLinkingMode&&e.stopLinkingMode(),e.linkingMode=t,e.currentLinkingMode?(e.currentLinkingMode.start(n),document.body.style.cursor=V.A.CHOOSE_CURSOR):e.linkingMode=!1},stopLinkingMode(){document.body.style.cursor=V.A.DEFAULT_CURSOR,e.currentLinkingMode&&e.currentLinkingMode.stop(),e.linkingMode=!1},addLinkedRegion(t){e.currentLinkingMode&&(null==e.currentLinkingMode.addLinkedRegion||e.currentLinkingMode.addLinkedRegion(t))},addLinkedResult(t){e.currentLinkingMode&&(null==e.currentLinkingMode.addLinkedResult||e.currentLinkingMode.addLinkedResult(t))},startRelationMode(t){console.warn("`startRelationMode` is deprecated. Use `startLinkingMode(CREATE_RELATION_MODE, obj)` instead."),e.startLinkingMode(H.key,t)},stopRelationMode(){console.warn("`stopRelationMode` is deprecated. Use `stopLinkingMode` instead."),e.stopLinkingMode()}})));var Z;const G=null!=(Z=window.ResizeObserver)?Z:class{observe(){}unobserve(){}disconnect(){}};function Y(e,t,n=!1){let r;return function(...o){const i=n&&!r;clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t),i&&e.apply(this,o)}}class X{static normalizeAngle(e){return(e+360)%360*(Math.PI/180)}static getPointsBBox(e){const t=[null,null,null,null];return e.forEach(((e,n)=>{const r=2*Math.round(n/2)-n;0===r?((null===t[0]||t[0]>=e)&&(t[0]=e),(null===t[2]||t[2]<=e)&&(t[2]=e)):1===r&&((null===t[1]||t[1]>=e)&&(t[1]=e),(null===t[3]||t[3]<=e)&&(t[3]=e))})),t}static distance(e,t){const[n,r]=e,[o,i]=t;return Math.sqrt((o-n)**2+(i-r)**2)}static toRectCoordinates(e){const{x:t,y:n,width:r,height:o}=e,[i,a]=[t+r,n],[s,l]=[t+r,n+o],[c,d]=[t,n+o];return{x1:t,x2:i,x3:s,x4:c,y1:n,y2:a,y3:l,y4:d}}static convertToRectBBox(e){return{x:e.x1,y:e.y1,width:e.x2-e.x1,height:e.y3-e.y1}}static closestRects(e,t){return e.reduce(((e,n)=>{const r=X.toRectCoordinates(n);return t.forEach((t=>{const n=X.toRectCoordinates(t),o=[X.distance([r.x1,r.y1],[n.x1,r.y1]),X.distance([r.x2,r.y2],[n.x2,r.y2]),X.distance([r.x3,r.y3],[n.x3,r.y3]),X.distance([r.x4,r.y4],[n.x4,n.y4])].reduce(((e,t)=>e+t))/4;e.push({distance:o,bbox:[X.convertToRectBBox(r),X.convertToRectBBox(n)]})})),e}),[]).sort(((e,t)=>e.distance-t.distance))[0].bbox}static scaleBBox(e,t=1){return Object.assign({},e,{x:e.x*t,y:e.y*t,width:e.width*t,height:e.height*t})}static modifyBBoxCoords(e,t=e=>e){const n=t([e.x,e.y]),r=t([e.width+e.x,e.height+e.y]);return Object.assign({},e,{x:Math.min(n[0],r[0]),y:Math.min(n[1],r[1]),width:Math.abs(r[0]-n[0]),height:Math.abs(r[1]-n[1])})}static padding(e,t=0){const n=e.width<1?0:t,r=e.height<1?0:t;return Object.assign({},e,{x:e.x-n,y:e.y-r,width:e.width+2*n,height:e.height+2*r})}static getEllipseBBox(e,t,n,r,o){const i=X.normalizeAngle(o),a=2*Math.max(n,r),s=2*Math.min(n,r),[l,c]=(()=>{const t=Math.atan(-s/2*Math.tan(i)/(a/2));return[t,t+Math.PI].map((t=>e+a/2*Math.cos(t)*Math.cos(i)-s/2*Math.sin(t)*Math.sin(i))).sort(((e,t)=>t-e))})(),[d,u]=(()=>{const e=Math.atan(s/2*1/Math.tan(i)/(a/2));return[e,e+Math.PI].map((e=>t+s/2*Math.sin(e)*Math.cos(i)+a/2*Math.cos(e)*Math.sin(i))).sort(((e,t)=>t-e))})();return{x:c,y:u,width:l-c,height:d-u}}static getRectBBox(e,t,n,r,o){const i=X.normalizeAngle(o),a=(n,r)=>[(n-e)*Math.cos(i)-(r-t)*Math.sin(i)+e,(n-e)*Math.sin(i)+(r-t)*Math.cos(i)+t],[s,l,c,d]=X.getPointsBBox([e,t,...a(e+n,t),...a(e+n,t+r),...a(e,t+r)]);return{x:s,y:l,width:c-s,height:d-l}}static getPolygonBBox(e){const t=e.reduce(((e,t)=>[...e,t.x,t.y]),[]),[n,r,o,i]=X.getPointsBBox(t);return{x:n,y:r,width:o-n,height:i-r}}static getBrushBBox(e){const[t,n,r,o]=X.getPointsBBox(e);return{x:t,y:n,width:r-t,height:o-n}}static getImageDataBBox(e,t,n){if(e.length!==t*n*4)return null;const r={x:t,y:n},o={x:0,y:0};for(let i=0;in&&(r.x=n),r.y>i&&(r.y=i),o.x(t&&t.x&&t.y&&(e.push(t.x),e.push(t.y),e.push(t.x+t.width),e.push(t.y+t.height)),e)),[]));return{x:t,y:n,width:r-t,height:o-n}}static clampBBox(e,t,n){const r=[(0,w.clamp)(e.x,t.x,n.x),(0,w.clamp)(e.y,t.y,n.y)],o=[(0,w.clamp)(e.width+e.x,t.x,n.x),(0,w.clamp)(e.height+e.y,t.y,n.y)];return{x:r[0],y:r[1],width:o[0]-r[0],height:o[1]-r[1]}}static getDOMBBox(e,t=!1){if(!e)return null;const n=e.getClientRects();if(0===n.length)return null;const r=e=>({x:e.x,y:e.y,width:e.width,height:e.height});return t?r(n[0]):Array.from(e.getClientRects()).map(r)}}const q={x:0,y:0,width:0,height:0};class J{static bbox(e){const t=Q(e);return(0,w.wrapArray)(t).map((e=>Object.assign(Object.assign({},q),e)))}constructor(e){this.options={},Object.assign(this.options,e)}get _source(){return this.options.source}get x(){return this.options.getX(this._source)}get y(){return this.options.getY(this._source)}get width(){return this.options.getWidth(this._source)}get height(){return this.options.getHeight(this._source)}}const Q=e=>{var t;if(!!e.from_name)return X.getDOMBBox(null==(t=e.from_name.elementRef)?void 0:t.current);switch(e.type){case"textrange":case"richtextregion":case"textarearegion":case"audioregion":case"paragraphs":case"timeseriesregion":{var n;const t=X.getDOMBBox(e.getRegionElement()),r=null==(n=e.parent)||null==(n=n.visibleNodeRef)?void 0:n.current;if("IFRAME"===(null==r?void 0:r.tagName)){const e=X.getDOMBBox(r,!0);return(null==t?void 0:t.map((t=>Object.assign({},t,{x:t.x+e.x,y:t.y+e.y}))))||null}return t}case"rectangleregion":case"ellipseregion":case"polygonregion":case"keypointregion":case"brushregion":{const t=e.bboxCoordsCanvas;return t?((e,t)=>{var n;if(null==(n=e.parent)||!n.stageRef)return null;const r=X.getDOMBBox(e.parent.stageRef.content,!0),o=X.clampBBox(X.modifyBBoxCoords(t,e.parent.zoomOriginalCoords),{x:0,y:0},{x:e.parent.canvasSize.width,y:e.parent.canvasSize.height});return Object.assign({},o,{x:r.x+o.x,y:r.y+o.y})})(e,{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}):q}default:return console.warn(`Unknown region type: ${e.type}`),Object.assign({},q)}};class ee{constructor(e){this.params={},this._onUpdated=null,this.onChanged=()=>{var e;null==(e=this.onUpdated)||e.call(this)},Object.assign(this.params,e),this.params.watcher&&(this._watcher=new this.params.watcher(this.params.root,this.params.element,this.onChanged))}boundingBox(){return J.bbox(this.params.element)}onUpdate(e){this.onUpdated=e}destroy(){this.onUpdated=null}}class te{constructor(e,t,n){this.onUpdate=()=>{this.callback()},this.root=e,this.element=t.getRegionElement(),this.callback=n,this.handleUpdate()}handleResize(){window.addEventListener("resize",this.onUpdate)}handleUpdate(){this.observer=new MutationObserver(this.onUpdate),this.observer.observe(this.element,{attributes:!0})}destroy(){window.removeEventListener("resize",this.onUpdate),this.observer.disconnect()}}const ne=e=>class{constructor(e,t,n){this.onUpdate=Y((()=>{this.callback()}),10),this.root=e,this.element=t,this.callback=n,this.handleUpdate()}handleUpdate(){this.disposers=this._watchProperties(this.element,e,[])}destroy(){this.disposers.forEach((e=>e()))}_watchProperties(e,t,n){return t.reduce(((r,o)=>("string"!=typeof o?Object.keys(o).forEach((t=>{this._watchProperties(e[t],o[t],n)})):Array.isArray(e)?e.forEach((e=>this._watchProperties(e,t,n))):r.push((0,u.lB)(e,o,this.onUpdate,!0)),r)),n)}},re={parent:["zoomScale","zoomingPositionX","zoomingPositionY","rotation","currentImage",...(0,O.VS)(O.v1)?["containerWidth","containerHeight","canvasSize"]:[]]},oe=e=>{switch(e.type){case"richtextregion":case"audioregion":case"paragraphs":return te;case"rectangleregion":return ne(["x","y","width","height","hidden",re]);case"ellipseregion":return ne(["x","y","radiusX","radiusY","rotation","hidden",re]);case"polygonregion":return ne(["hidden",{points:["x","y"]},re]);case"keypointregion":return ne(["x","y","hidden",re]);case"brushregion":return ne(["needsUpdate","hidden","touchesLength",re]);case"timeseriesregion":return ne(["start","end",{parent:["zoomedRange"]}]);default:return null}},ie=(e,t)=>new ee({root:t,element:e,watcher:oe(e)}),ae=(e,t)=>{var n;const{x:r,y:o}=null!=(n=X.getDOMBBox(t,!0))?n:{x:0,y:0};return e.boundingBox().map((e=>{const t=X.padding(e,3);return Object.assign({},t,{x:t.x-r,y:t.y-o})}))},se=({x1:e,y1:t,w1:n,x2:r,y2:o,w2:i,limit:a})=>{const s=e+.5*n,l=r+.5*i,c=Math.min(t,o)-a;return{x1:s,x2:l,y1:t,y2:o,l1:Math.min(c,t-a),l2:Math.min(c,o-a),toEnd:s{let c,d,u,h,g,m,p="left";if(Math.min(e,o)-l<0&&(p="right"),"left"===p){c=e,u=t+.5*r,d=o,h=i+.5*s;const n=Math.min(c,d)-l;g=Math.min(n,c-l),m=Math.min(n,d-l)}else{c=e+n,u=t+.5*r,d=o+a,h=i+.5*s;const p=Math.max(c,d)+l;g=Math.max(p,c+l),m=Math.max(p,d+l)}return{x1:c,x2:d,y1:u,y2:h,l1:g,l2:m,toEnd:u{var n;return{id:e.id,label:(0,w.wrapArray)(null!=(n=e.labels)?n:[]).join(", "),color:"#fa541c",direction:e.direction,start:ie(e.startNode,t),end:ie(e.endNode,t),onChange(e){const t=Y(e,50);this.start.onUpdate(t),this.end.onUpdate(t)},destroy(){this.start.destroy(),this.end.destroy()}}},ue=({start:e,end:t,root:n})=>{const[r,o]=X.closestRects(ae(e,n),ae(t,n));return{start:r,end:o}},he=(e,t)=>{const{x:n,y:r,width:o,height:i}=e,{x:a,y:s,width:l,height:c}=t,d=(({x1:e,y1:t,w1:n,x2:r,y2:o,w2:i})=>t!==o&&(e<=r&&r<=e+n||e<=r+i&&r+i<=e+n))({x1:n,y1:r,w1:o,x2:a,y2:s,w2:l}),u=(({x1:e,y1:t,x2:n,y2:r,l1:o,l2:i,toEnd:a,renderingSide:s},l)=>{const c="vertical"===l;let d,u,h,g,m,p,f,v,y,b,x,w,C;return c?(d=e,u=t,h=e,g=o+5,m=n+5*(a?-1:1),p=i,f=n,v=r,y=a?1:0,b=a?"5 -5":"-5 -5",x=a?"5 5":"-5 5",w=Math.min(e,n)+Math.abs(n-e)/2,C=o):c||"right"!==s?c||"left"!==s||(d=e,u=t,h=o+5,g=t,m=i,p=r+5*(a?-1:1),f=n,v=r,y=a?0:1,b=a?"-5 5":"-5 -5",x=a?"5 5":"5 -5",w=o,C=Math.min(t,r)+Math.abs(r-t)/2):(d=e,u=t,h=o-5,g=t,m=i,p=r+5*(a?-1:1),f=n,v=r,y=a?1:0,b=a?"5 5":"5 -5",x=a?"-5 5":"-5 -5",w=o,C=Math.min(t,r)+Math.abs(r-t)/2),[[`M ${d} ${u}`,`${h} ${g}`,`a 5 5 0 0 ${y} ${b}`,`L ${m} ${p}`,`a 5 5 0 0 ${y} ${x}`,`L ${f} ${v}`].join(" "),[w,C]]})((d?le:se)({x1:n,y1:r,w1:o,h1:i,x2:a,y2:s,w2:l,h2:c,limit:15}),d?"horizontal":"vertical");return u},ge=ae,me={container:"container--gJBc5",commentItem:"commentItem--aJS6d",commentIconBackground:"commentIconBackground--EofOZ",commentIconLines:"commentIconLines--uQaUg",_highlighting:"_highlighting--qltMP",_highlighted:"_highlighted--Ksg1R"},pe=()=>(0,_.jsxs)("g",{className:me.commentIcon,children:[(0,_.jsx)("path",{className:me.commentIconBackground,d:"M0 12C0 5.3726 5.3726 0 12 0C18.6274 0 24 5.3726 24 12C24 18.6274 18.6274 24 12 24H0V12Z"}),(0,_.jsx)("path",{className:me.commentIconLines,d:"M18 8V9.3333H6V8H18ZM6 16H12V14.6667H6V16ZM6 12.6667H18V11.3333H6V12.6667Z"})]}),fe=(0,y.PA)((({comment:e,rootRef:t})=>{var n;const r=t.current,o=null==(n=e.regionRef)?void 0:n.overlayNode,i=(null==o?void 0:o.area)&&!o.area.selected&&!o.area.classification,a=!o||o.hidden||i,[s,l]=(0,p.useState)({}),c=(0,p.useCallback)((()=>{e.setHighlighted(!0)}),[e]),d=(0,p.useCallback)((()=>{e.setHighlighted(!1)}),[e]),u=(0,p.useMemo)((()=>o&&r?ce(o,r):null),[o,r]),{shapeBBox:h,positionStyle:g}=(0,p.useMemo)((()=>{const e=u&&r?ge(u,r)[0]:{x:0,y:0,width:0,height:0};return{shapeBBox:e,positionStyle:{transform:`translate(${e.x+e.width-3-4}px, ${e.y-24+3+4}px)`}}}),[u,r,s]);if((0,p.useEffect)((()=>(null==u||u.onUpdate((()=>{l({})})),()=>{null==u||u.destroy()})),[u]),!r||!o||a)return null;if(h.width<1||h.height<1)return null;const m=[me.commentItem];return e.isHighlighted&&m.push(me._highlighted),(0,_.jsx)("g",{className:m.join(" "),style:g,onMouseEnter:c,onMouseLeave:d,onClick:e.scrollIntoView,children:(0,_.jsx)(pe,{})})})),ve=e=>{const{isClassificationTag:t}=e.from_name,n=e.area.classification,r=e.area.selected;return t&&(n||r)},ye=(0,y.PA)((({result:e,rootRef:t})=>{const n=t.current,r=e.area,o=!r||r.hidden,[i,a]=(0,p.useState)({}),[s,l]=(0,p.useState)(!1),c=(0,p.useMemo)((()=>e&&n?ce(e,n):null),[e,n]),d=(0,p.useMemo)((()=>c&&n?ge(c,n)[0]:{x:0,y:0,width:0,height:0}),[c,n,i]);if((0,p.useEffect)((()=>(null==c||c.onUpdate((()=>{a({})})),()=>{null==c||c.destroy()})),[c]),!n||!r||o)return null;if(d.width<1||d.height<1)return null;const u={pointerEvents:"all",stroke:"var(--grape_600)",strokeDasharray:s?void 0:"4 2",cursor:"crosshair"};return(0,_.jsx)("rect",Object.assign({},d,{rx:3,ry:3,style:u,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),stroke:"red",strokeWidth:1,fill:"none",onClick:()=>{e.annotation.addLinkedResult(e),e.annotation.stopLinkingMode()}}))})),be=(0,y.PA)((({annotation:e,commentStore:t})=>{var n;const{overlayComments:r}=t||{},o=(0,p.useRef)(),[i,a]=(0,p.useState)(E()),s=N();(0,p.useEffect)((()=>{(async()=>{await t.listComments({mounted:s,suppressClearComments:t.isRelevantList})})()}),[null==(n=t.annotation)?void 0:n.id]);const l=(0,p.useMemo)((()=>{let e;return new G((t=>{cancelAnimationFrame(e),e=requestAnimationFrame((()=>{a(E())}))}))}),[]);(0,p.useEffect)((()=>()=>{null==l||l.disconnect()}),[]);const c=(0,p.useCallback)((e=>{const t=e||void 0;e?(null==l||l.observe(e),null==l||l.observe(document.body)):o.current&&(null==l||l.unobserve(o.current),null==l||l.unobserve(document.body)),o.current=t}),[]);if(!r)return null;const d=[me.container];return null!=t&&t.isHighlighting&&d.push(me._highlighting),(0,_.jsx)("svg",{className:d.join(" "),ref:c,xmlns:"http://www.w3.org/2000/svg",children:(0,_.jsxs)("g",{children:[e.linkingMode===W&&e.results.filter(ve).map((e=>(0,_.jsx)(ye,{result:e,rootRef:o},e.id))),r.map((e=>{const{id:t}=e;return(0,_.jsx)(fe,{comment:e,rootRef:o},t)}))]},i)})})),xe=(0,p.memo)((0,y.PA)((({tags:e,children:t})=>Array.from(e.values()).every((e=>{var t;return!!(0,h._n)(e)&&(null==(t=null==e?void 0:e.isReady)||t)}),!0)?(0,_.jsx)(_.Fragment,{children:t}):null))),we=(0,y.PA)((e=>{const{annotation:t}=e;return(0,_.jsx)(xe,{tags:t.names,children:(0,_.jsx)(be,Object.assign({},e))})}));var Ce=n(39067);const Se="error--SXGAh";var je=n(84411);const ke=({error:e})=>{if("string"==typeof e)return(0,_.jsx)("div",{className:Se,dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(e)}});const t=e instanceof Error?e.message:e;return(0,_.jsx)("div",{className:Se,children:t})},Oe=(0,y.WQ)("store")((0,y.PA)((({store:e,errors:t})=>(0,_.jsx)("div",{className:"lsf-errors",children:t.map(((t,n)=>(0,_.jsx)(ke,{error:(0,h._$)(e).messages[t.error](t)},`error-${n}`)))}))));Oe.propTypes={errors:Ce.PropTypes.array.isRequired};const Re={range:(e=0,t=1)=>h.gK.custom({name:`Range(${e}..${t})`,fromSnapshot:e=>Number.parseFloat(e),toSnapshot:e=>e.toString(),isTargetType(n){const r=Number.parseFloat(n);return e<=r&&r<=t},getValidationMessage(n){return this.isTargetType(n)?"":`Value ${n} is outside of range ${e}..${t}.`}}),color:h.gK.custom({name:"CSSColor",fromSnapshot:e=>String(e),toSnapshot:e=>e.toString(),isTargetType(e){const t=(new Option).style;return t.color=e,""!==t.color},getValidationMessage(e){return this.isTargetType(e)?"":`Value ${e} doesn't appear to be a valid HEX color.`}})};function Ee(e){return t=>h.gK.maybeNull(h.gK.array(e(t)))}function _e(e,t){return n=>h.gK.union({dispatcher:r=>{if(n.find((e=>r.type===e)))return e(r.type);throw Error(t+r.type)}})}const Ae=_e(x.getModelByTag,"Not expecting tag: ");const Te={unionArray:function(e){const t=h.gK.maybeNull(h.gK.array(Ae(e)));return t.value=e,t},allModelsTypes:function(){const e=[{dispatcher:e=>{if(!e)return h.gK.literal(void 0);if(x.tags.includes(e.type))return x.getModelByTag(e.type);throw Error(`Not expecting tag: ${e.type}`)}},x.modelsArr()],t=[].concat.apply([],e);return h.gK.union.apply(null,t)},unionTag:function(e){return h.gK.maybeNull(h.gK.enumeration("unionTag",e))},tagsTypes:function(e){const t=h.gK.frozen(e.map((e=>e.toLowerCase())));return t.describe=()=>`(${e.join("|")})`,t.value=e,t},isType:function(e,t){const n=(0,h.Pw)(e);for(const e of t)if(n===e)return!0;return!1},getParentOfTypeString:function(e,t){let n=(0,h.PA)(e);for(Array.isArray(t)||(t=[t]);n;){const e=(0,h.Pw)(n).name;if(t.find((t=>t===e)))return n;n=(0,h.jX)(n)?null:(0,h.PA)(n)}return null},getParentTagOfTypeString:function(e,t){let n=(0,h.PA)(e);for(Array.isArray(t)||(t=[t]);n;){const e=n.type;if(t.find((t=>t===e)))return n;n=(0,h.jX)(n)?null:(0,h.PA)(n)}return null},tagsArray:Ee(Ae),toolsArray:Ee(_e(x.getTool,"Not expecting tool: "))},Pe=h.gK.model("AnnotationMixin",{}).views((e=>({get annotation(){var t;if((0,O.VS)(O.F5)&&!window.STORE_INIT_OK&&console.error("LSF: annotation accessed before store is initialized",e),!(0,h._n)(e))return null;if((0,O.VS)(O.cE)){var n;const t=(0,h.Zn)(e);return t===e?e.control?e.control.annotation:e.obj?e.obj.annotation:null:null!=(n=t.annotationStore)&&n.selectedHistory?t.annotationStore.selectedHistory:Te.getParentOfTypeString(e,"Annotation")}const r=e.annotationStore;return null!=(t=null==r?void 0:r.selectedHistory)?t:null==r?void 0:r.selected},get annotationStore(){const t=(0,h.Zn)(e);return t===e?e.control?(0,h.Zn)(e.control).annotationStore:e.obj?(0,h.Zn)(e.obj).annotationStore:null:t.annotationStore}}))),Ie=h.gK.model({}).volatile((()=>({_isReady:!0}))).views((e=>({get isReady(){return e._isReady}}))).actions((e=>({setReady(t){e._isReady=t}}))),Le=Ie,Me=Ie.views((e=>({get isReady(){var t;return e._isReady&&!(null!=(t=e.regs)&&t.filter((e=>!e.isReady)).length)}})));var Ke=n(41880),De=n.n(Ke);const Ne={csv(e,t={}){var n;const r=!t.headless,{data:o,meta:{fields:i}}=De().parse(e,{delimiter:t.separator,header:r}),{column:a=(r?i[0]:0)}=t,s=o[0];let l=s[a];var c;void 0===l&&(l=s[null!=(c=i[a])?c:i[0]]);return String(null!=(n=l)?n:"")}},Ve=h.gK.model({resolver:h.gK.maybeNull(h.gK.string)}).actions((e=>({updateLocalValue(t){e._value=t},updateValue(t){var n,r;e._value=j(e.value,null!=(n=null==t||null==(r=t.task)?void 0:r.dataObj)?n:{})},resolveValue:(0,h.L3)((function*(t){if(!e.resolver)return t;const{type:n,options:r}=k(e.resolver);if(!Object.prototype.hasOwnProperty.call(Ne,n))return console.error(`Resolver "${null!=n?n:e.resolver}" looks unfamiliar`),t;const o=yield fetch(t),i=yield o.text();return Ne[n](i,r)}))}))),ze=Ve;class Be{constructor(){this.syncTargets=new Map,this.locked=null,this.audioTags=0}register(e){this.syncTargets.set(e.name,e),"audio"===e.type&&(this.audioTags+=1)}unregister(e){this.syncTargets.delete(e.name),"audio"===e.type&&(this.audioTags-=1)}sync(e,t,n){if(this.locked&&this.locked!==n||console.log("SYNC",{event:t,locked:this.locked,data:e,origin:n}),this.locked&&this.locked!==n)return!1;this.locked||setTimeout((()=>this.locked=null),100),this.locked=n;for(const r of this.syncTargets.values())n!==r.name&&r.syncReceive(e,t);return!0}}const He={managers:new Map,get(e,t){let n=this.managers.get(e);return!n&&t&&(n=this.managers.get(t)),n||(n=new Be,this.managers.set(e,n)),n}},Fe=h.gK.model("SyncableMixin",{name:h.gK.string,type:h.gK.string,sync:h.gK.optional(h.gK.string,"")}).volatile((()=>({syncHandlers:new Map,syncManager:null}))).actions((()=>({syncMuted(e){}}))).actions((e=>({afterCreate(){e.sync&&(e.syncManager=He.get(e.sync,e.name),e.syncManager.register(e),e.registerSyncHandlers())},registerSyncHandlers(){},syncSend(t,n){if(!e.sync)return;e.syncManager.sync(t,n,e.name)&&"play"===n&&e.syncMuted("audio"!==e.type&&e.syncManager.audioTags>0)},syncReceive(t,n){const r=e.syncHandlers.get(n);"play"===n&&e.syncMuted("audio"!==e.type),r&&r(t,n)},destroy(){e.syncManager.unregister(e)}}))),We=h.gK.model({meta:h.gK.frozen({}),normInput:h.gK.maybeNull(h.gK.string)}).preProcessSnapshot((e=>{var t,n;return e.meta?Object.assign({},e,{normInput:null!=(t=null==(n=e.meta)||null==(n=n.text)?void 0:n[0])?t:null}):e})).actions((e=>({setMetaValue(t,n){e.meta=Object.assign({},e.meta,{[t]:n})},setMetaText(t){if(t)e.meta=Object.assign({},e.meta,{text:[t]});else{const t=Object.assign({},e.meta);delete t.text,e.meta=t}},setNormInput(t){e.normInput=t}}))).actions((e=>({deleteMetaText(){e.setMetaText("")}}))),$e=h.gK.model("ReadOnlyControlMixin",{}).views((e=>({isReadOnly(){var t,n;return(null==(t=e.result)?void 0:t.isReadOnly())||(null==(n=e.annotation)?void 0:n.isReadOnly())}}))),Ue=h.gK.model("ReadOnlyRegionMixin",{readonly:h.gK.optional(h.gK.boolean,!1)}).views((e=>({isReadOnly(){var t;return!!(0,h._n)(e)&&(e.locked||e.readonly||e.annotation.isReadOnly()||e.parent&&((null==e.parent.isReadOnly?void 0:e.parent.isReadOnly())||(null==(t=e.parent.result)||null==t.isReadOnly?void 0:t.isReadOnly())))}})));var Ze=n(50494),Ge=n(18094);const Ye=100,Xe=100,qe="edge",Je="center",Qe=(0,y.PA)((0,p.forwardRef)((({imageEntity:e,imageTransform:t,updateImageSize:n,usedValue:r,size:o,overlay:i},a)=>{const s=(0,p.useMemo)((()=>({width:1===o.width?"100%":o.width,height:1===o.height?"auto":o.height})),[o]),l=(0,p.useCallback)((t=>{n(t),e.setImageLoaded(!0)}),[n,e]);return(0,_.jsxs)(Ze.eB,{name:"image",style:s,children:[i,(0,_.jsx)(et,{downloading:e.downloading,progress:e.progress,error:e.error,src:e.src,usedValue:r}),e.downloaded?(0,_.jsx)(nt,{alt:"image",ref:a,src:e.currentSrc,onLoad:l,isLoaded:e.imageLoaded,imageTransform:t}):null]})}))),et=(0,y.PA)((({downloading:e,progress:t,error:n,src:r,usedValue:o})=>e?(0,_.jsxs)(Ze.eB,{name:"image-progress",children:[(0,_.jsx)(Ze.Sl,{name:"message",children:"Downloading image"}),(0,_.jsx)(Ze.Sl,{tag:"progress",name:"bar",value:t,min:"0",max:1,step:1e-4})]}):n?(0,_.jsx)(rt,{src:r,value:o}):null)),tt={};(0,O.VS)(O.xS)&&(tt.crossOrigin="anonymous");const nt=(0,y.PA)((0,p.forwardRef)((({src:e,onLoad:t,imageTransform:n,isLoaded:r},o)=>{const i=(0,p.useMemo)((()=>{const e=null!=n?n:{};return Object.assign({},e,{visibility:r?"visible":"hidden"})}),[n,r]);return(0,_.jsx)("img",Object.assign({},tt,{ref:o,alt:"image",src:e,onLoad:t,style:i}))}))),rt=({src:e,value:t})=>{const n=(0,p.useMemo)((()=>Ge.A.ERR_LOADING_HTTP({url:e,error:"",attr:t})),[e]);return(0,_.jsx)(ke,{error:n})},ot=h.gK.model({pid:h.gK.optional(h.gK.string,E),score:h.gK.maybeNull(h.gK.number),filtered:h.gK.optional(h.gK.boolean,!1),parentID:h.gK.optional(h.gK.string,""),fromSuggestion:!1,dynamic:!1,origin:h.gK.optional(h.gK.enumeration(["prediction","prediction-changed","manual"]),"manual"),item_index:h.gK.maybeNull(h.gK.number)}).volatile((()=>({_highlighted:!1,hidden:!1,locked:!1,isDrawing:!1,perRegionFocusRequest:null,shapeRef:null,drawingTimeout:null}))).views((e=>({get perRegionStates(){const t=e.states;return t&&t.filter((e=>!0===e.perregion))},get store(){return(0,h.Zn)(e)},get parent(){return(0,h.PA)(e)},get editable(){throw new Error("Not implemented")},get isCompleted(){return!e.isDrawing},get highlighted(){return e._highlighted},get inSelection(){var t;return null==(t=e.annotation)?void 0:t.regionStore.isSelected(e)},get isReady(){return!0},get currentImageEntity(){var t;return e.parent.findImageEntity(null!=(t=e.item_index)?t:0)},getConnectedDynamicRegions(t){var n;const{regions:r=[]}=(null==(n=(0,h.Zn)(e).annotationStore)?void 0:n.selected)||{},{type:o,labelName:i}=e;return r.filter((n=>{var r,a;if(t&&n===e)return!1;return(!e.supportSuggestions||e.dynamic)&&n.type===o&&n.labelName===i&&(null==(r=n.results)||null==(r=r[0])?void 0:r.to_name)===(null==(a=e.results)||null==(a=a[0])?void 0:a.to_name)}))},get isRealRegion(){var t;return null==(t=e.annotation)||null==(t=t.areas)?void 0:t.has(e.id)},get shouldNotifyDrawingFinished(){if(!e.isRealRegion)return!1;if(e.annotation.isSuggestionsAccepting)return!1;const t=!e.supportSuggestions||e.dynamic&&!e.fromSuggestion;return e.results.some((e=>e.from_name.smartEnabled))&&t}}))).actions((e=>({setParentID(t){e.parentID=t},setDrawing(t){e.isDrawing=t},setShapeRef(t){t&&(e.shapeRef=t)},setItemIndex(t){if(!(0,w.isDefined)(t))throw new Error("Index must be provided for",e);e.item_index=t},beforeDestroy(){if(e.isRealRegion)return e.beforeDestroyArea()},beforeDestroyArea(){e.notifyDrawingFinished({destroy:!0})},setLocked(t){e.locked=t instanceof Function?t(e.locked):t},makeDynamic(){e.dynamic=!0},convertXToPerc:t=>t*Ye/e.currentImageEntity.stageWidth,convertYToPerc:t=>t*Xe/e.currentImageEntity.stageHeight,convertHDimensionToPerc:t=>t*(e.scaleX||1)*Ye/e.currentImageEntity.stageWidth,convertVDimensionToPerc:t=>t*(e.scaleY||1)*Xe/e.currentImageEntity.stageHeight,updateAppearenceFromState(){},serialize(){console.error("Region class needs to implement serialize")},selectRegion(){},unselectRegion(e=!1){console.log("UNSELECT REGION","you should not be here")},afterUnselectRegion(){},onClickRegion(t){const n=e.annotation;(e.isReadOnly()||!e.isDrawing&&!n.isDrawing)&&(!e.isReadOnly()&&n.isLinkingMode?(n.addLinkedRegion(e),n.stopLinkingMode(),n.regionStore.unselectAll()):e._selectArea((null==t?void 0:t.ctrlKey)||(null==t?void 0:t.metaKey)))},_selectArea(t=!1){this.cancelPerRegionFocus();const n=e.annotation;if(t)n.toggleRegionSelection(e);else{!e.selected?n.selectArea(e):n.unselectAll()}},requestPerRegionFocus(){e.perRegionFocusRequest=Date.now()},cancelPerRegionFocus(){e.perRegionFocusRequest=null},setHighlight(t){e._highlighted=t},toggleHighlight(){e.setHighlight(!e._highlighted)},toggleFiltered(t){e.filtered=!e.filtered,e.toggleHidden(t,!0),t&&t.stopPropagation()},toggleHidden(t,n=!1){n||(e.filtered=!1),e.hidden=!e.hidden,t&&t.stopPropagation()},notifyDrawingFinished({destroy:t=!1}={}){if("prediction"===e.origin&&(e.origin="prediction-changed"),e.shouldNotifyDrawingFinished&&(clearTimeout(e.drawingTimeout),!1===e.isDrawing)){const n=(0,h.Pw)(e).name.match(/brush/i)?1200:0,r=(0,h._$)(e);e.drawingTimeout=setTimeout((()=>{const n=e.getConnectedDynamicRegions(t);r.events.invoke("regionFinishedDrawing",e,n)}),n)}}}))),it=h.gK.compose(ot,Ue,Pe),at=h.gK.model("Result",{id:h.gK.optional(h.gK.identifier,E),score:h.gK.maybeNull(h.gK.number),readonly:h.gK.optional(h.gK.boolean,!1),from_name:h.gK.late((()=>h.gK.reference(h.gK.union(...x.modelsArr())))),to_name:h.gK.late((()=>h.gK.reference(h.gK.union(...x.objectTypes())))),type:h.gK.enumeration(["labels","hypertextlabels","paragraphlabels","rectangle","keypoint","polygon","brush","ellipse","magicwand","rectanglelabels","keypointlabels","polygonlabels","brushlabels","ellipselabels","timeserieslabels","timelinelabels","choices","datetime","number","taxonomy","textarea","rating","pairwise","videorectangle","ranker"]),value:h.gK.model({ranker:h.gK.union(h.gK.array(h.gK.string),h.gK.frozen(),h.gK.null),datetime:h.gK.maybe(h.gK.string),number:h.gK.maybe(h.gK.number),rating:h.gK.maybe(h.gK.number),item_index:h.gK.maybeNull(h.gK.number),text:h.gK.maybe(h.gK.union(h.gK.string,h.gK.array(h.gK.string))),choices:h.gK.maybe(h.gK.array(h.gK.union(h.gK.string,h.gK.array(h.gK.string)))),selected:h.gK.maybe(h.gK.enumeration(["left","right"])),labels:h.gK.maybe(h.gK.array(h.gK.string)),htmllabels:h.gK.maybe(h.gK.array(h.gK.string)),hypertextlabels:h.gK.maybe(h.gK.array(h.gK.string)),paragraphlabels:h.gK.maybe(h.gK.array(h.gK.string)),rectanglelabels:h.gK.maybe(h.gK.array(h.gK.string)),keypointlabels:h.gK.maybe(h.gK.array(h.gK.string)),polygonlabels:h.gK.maybe(h.gK.array(h.gK.string)),ellipselabels:h.gK.maybe(h.gK.array(h.gK.string)),brushlabels:h.gK.maybe(h.gK.array(h.gK.string)),timeserieslabels:h.gK.maybe(h.gK.array(h.gK.string)),timelinelabels:h.gK.maybe(h.gK.array(h.gK.string)),taxonomy:h.gK.frozen(),sequence:h.gK.frozen()}),meta:h.gK.frozen()}).views((e=>({get perRegionStates(){const t=e.states;return t&&t.filter((e=>!0===e.perregion))},get store(){return(0,h.Zn)(e)},get area(){return(0,h.PA)(e,2)},get mainValue(){return e.value[e.from_name.valueType]},mergeMainValue(t){var n,r,o;t=null!=(n=t)&&n.toJSON?t.toJSON():t;const i=null!=(r=e.mainValue)&&null!=r.toJSON&&r.toJSON()?null==(o=e.mainValue)||null==o.toJSON?void 0:o.toJSON():e.mainValue;return typeof t!=typeof i?null:e.type.endsWith("labels")?t.filter((e=>i.includes(e))):t===i?t:null},get hasValue(){const t=e.mainValue;return!!(0,w.isDefined)(t)&&(!Array.isArray(t)||t.length>0)},get editable(){throw new Error("Not implemented")},isReadOnly:()=>e.readonly||e.area.isReadOnly(),isSelfReadOnly:()=>e.readonly,getSelectedString(t=" "){var n;return(null==(n=e.mainValue)?void 0:n.join(t))||""},get selectedLabels(){var t,n,r;return 0===(null==(t=e.mainValue)?void 0:t.length)&&e.from_name.allowempty?e.from_name.findLabel(null):null!=(n=null==(r=e.mainValue)?void 0:r.map((t=>e.from_name.findLabel(t))).filter(Boolean))?n:[]},get canBeSubmitted(){const t=e.from_name;if(t.perregion){const n=t.whenlabelvalue;if(n&&!e.area.hasLabel(n))return!1}const n=e=>e.map((e=>Array.isArray(e)?e.at(-1):e)),r=()=>{var r,o;const i=t.whentagname,a=null!=(r=null==(o=t.whenchoicevalue)?void 0:o.split(","))?r:null,s=e.annotation.results.filter((t=>["choices","taxonomy"].includes(t.type)&&t!==e));if(i){const t=s.find((t=>t.from_name.name===i&&(!t.from_name.perregion||t.area===e.area)));if(!t)return!1;if(a&&!a.some((e=>n(t.mainValue).some((n=>t.from_name.selectedChoicesMatch(e,n))))))return!1}else{if(!s.length)return!1;if(a&&!s.some((e=>a.some((t=>n(e.mainValue).some((n=>e.from_name.selectedChoicesMatch(t,n))))))))return!1}return!0};return"choice-selected"===t.visiblewhen?r():"choice-unselected"!==t.visiblewhen||!r()},get tag(){const t=e.mainValue;return t&&t.length&&e.from_name.findLabel?e.from_name.findLabel(t[0]):null},get style(){var t;if(!e.tag)return null;const n=e.tag.background||(null==(t=e.tag.parent)?void 0:t.fillcolor);if(!n)return null;const r=e.tag.background||e.tag.parent.strokecolor,{strokewidth:o,fillopacity:i,opacity:a}=e.tag.parent;return{strokecolor:r,strokewidth:o,fillcolor:n,fillopacity:i,opacity:a}},get emptyStyle(){const t=e.from_name.emptyLabel;if(!t)return null;const n=t.background||t.parent.fillcolor;if(!n)return null;const r=t.background||t.parent.strokecolor,{strokewidth:o,fillopacity:i,opacity:a}=t.parent;return{strokecolor:r,strokewidth:o,fillcolor:n,fillopacity:i,opacity:a}},get controlStyle(){if(!e.from_name)return null;const{fillcolor:t,strokecolor:n,strokewidth:r,fillopacity:o,opacity:i}=e.from_name;return{strokecolor:n,strokewidth:r,fillcolor:t,fillopacity:o,opacity:i}}}))).volatile((()=>({pid:"",selected:!1}))).actions((e=>({setValue(t){e.value[e.from_name.valueType]=t},afterCreate(){e.pid=e.id},afterAttach(){},setParentID(t){e.parentID=t},setMetaValue(t,n){e.meta=Object.assign({},e.meta,{[t]:n})},updateAppearenceFromState(){},serialize(t){var n;const r=(0,h.dV)(e),{type:o,score:i,value:a,meta:s}=r,{valueType:l}=e.from_name,c=e.area?e.area.serialize(t):{},d=null==(n=e.area)?void 0:n.cleanId,u=D.cleanUpId(r.from_name),g=D.cleanUpId(r.to_name);if(!c)return null;if(!e.canBeSubmitted)return null;if((0,w.isDefined)(c.value)||(c.value={}),e.to_name.mergeLabelsAndResults){var m;if("labels"===o)return null;o.endsWith("labels")||null==(m=e.area)||null==(m=m.labels)||!m.length||e.from_name.perregion||(c.value.labels=e.area.labels)}const p=e.from_name.metaValue;p&&(c.meta=Object.assign({},c.meta,p));const f=e.area.meta;return f&&Object.keys(f).length&&(c.meta=Object.assign({},c.meta,f)),s&&(c.meta=Object.assign({},c.meta,s)),e.area.parentID&&(c.parentID=e.area.parentID.replace(/#.*/,"")),Object.assign(c,{id:d,from_name:u,to_name:g,type:o,origin:e.area.origin}),(0,w.isDefined)(a[l])&&Object.assign(c.value,{[l]:a[l]}),"number"==typeof i&&(c.score=i),e.isSelfReadOnly()&&(c.readonly=!0),(0,O.VS)(O.gF)&&(0,w.isDefined)(e.area.item_index)&&(c.item_index=e.area.item_index),c},deleteRegion(){e.annotation.isReadOnly()||(e.unselectRegion(),e.annotation.relationStore.deleteNodeRelation(e),"polygonregion"===e.type&&e.destroyRegion(),e.annotation.regionStore.deleteRegion(e),e.annotation.deleteRegion(e))},setHighlight(t){e._highlighted=t},toggleHighlight(){e.setHighlight(!e._highlighted)},toggleHidden(){e.hidden=!e.hidden}}))),st=h.gK.compose("Result",at,Pe),lt={TAG:"tag",REGION_LIST:"region-list"},ct=h.gK.model({perregion:h.gK.optional(h.gK.boolean,!1),whenlabelvalue:h.gK.maybeNull(h.gK.string),displaymode:h.gK.optional(h.gK.enumeration(Object.values(lt)),lt.TAG)}).extend((e=>{if(!0!==e.isClassificationTag)throw new Error("The PerRegionMixin mixin should be used only for classification control-tags");return{}})).volatile((()=>({focusable:!1}))).views((e=>({get perRegionArea(){return e.perregion?e.annotation.highlightedNode:null},get _perRegionResult(){const t=e.perRegionArea;return t?e.annotation.results.find((n=>n.from_name===e&&n.area===t)):null},perRegionVisible(){if(!e.perregion)return!0;const t=e.perRegionArea;return!!t&&(t.parent.name===e.toname&&(null===e.whenlabelvalue||void 0===e.whenlabelvalue||t.hasLabel(e.whenlabelvalue)))}}))).actions((e=>({_validatePerRegion(){const t=e.toNameTag;for(const r of t.allRegs){var n;const t=null==(n=r.results.find((t=>t.from_name===e)))?void 0:n.mainValue;if(!e.validateValue(t))return e.annotation.selectArea(r),!1}return!0},createPerRegionResult(){var t;null==(t=e.perRegionArea)||t.setValue(e)}})));let dt=1;const ut=h.gK.model({id:h.gK.optional(h.gK.identifier,E),ouid:h.gK.optional(h.gK.number,(()=>dt++)),results:h.gK.array(st),parentID:h.gK.maybeNull(h.gK.string)}).views((e=>({get cleanId(){return e.id.replace(/#.*/,"")},get labelings(){return e.results.filter((e=>e.from_name.isLabeling))},get labeling(){if((0,h._n)(e))return e.results.find((e=>e.from_name.isLabeling&&e.hasValue))},get emptyLabel(){var t;return null==(t=e.results.find((e=>{var t;return null==(t=e.from_name)?void 0:t.emptyLabel})))||null==(t=t.from_name)?void 0:t.emptyLabel},get texting(){return(0,h._n)(e)&&e.results.find((e=>"textarea"===e.type&&e.hasValue))},get tag(){var t;return null==(t=e.labeling)?void 0:t.from_name},hasLabel(t){var n;const r=null==(n=e.labeling)?void 0:n.mainValue;return!(!r||!t)&&(!!r.includes(t)||!!t.includes(",")&&t.split(",").some((e=>r.includes(e))))},get perRegionTags(){var t;return(null==(t=e.annotation.toNames.get(e.object.name))?void 0:t.filter((e=>e.perregion)))||[]},get labelingTags(){var t;return(0,O.VS)(O.um)&&(null==(t=e.annotation.toNames.get(e.object.name))?void 0:t.filter((e=>e.classification&&e.isLabeling)))||[]},get perRegionDescControls(){return e.perRegionTags.filter((e=>e.displaymode===lt.REGION_LIST))},get perRegionFocusTarget(){return e.perRegionTags.find((e=>!1!==e.isVisible&&e.focusable))},get labelName(){var t,n;if((0,h._n)(e))return(null==(t=e.labeling)||null==(t=t.mainValue)?void 0:t[0])||(null==(n=e.emptyLabel)?void 0:n._value)},get labels(){var t,n;return Array.from(null!=(t=null==(n=e.labeling)?void 0:n.mainValue)?t:[])},getLabelText(t){var n;const r=e.region_index,o=e.labeling,i=null==(n=e.texting)||null==(n=n.mainValue)||null==(n=n[0])?void 0:n.replace(/\n\r|\n/," "),a=null==o?void 0:o.getSelectedString(t),s=[];return r&&s.push(String(r)),a&&s.push(a),i&&s.push(i),s.join(": ")},get parent(){if((0,h._n)(e))return e.object},get style(){if(!(0,h._n)(e))return;const t=e.results.find((e=>e.style));if(t&&t.style)return t.style;const n=e.results.find((e=>e.emptyStyle));if(n&&n.emptyStyle)return n.emptyStyle;const r=e.results.find((t=>e.type.startsWith(t.type)));return r&&r.controlStyle},get selected(){var t;return(null==(t=e.annotation)?void 0:t.highlightedNode)===e},getOneColor:()=>(e.style||V.l).fillcolor,get highlighted(){var t;return null!=(t=e.parent)&&null!=(t=t.selectionArea)&&t.isActive?e.isInSelectionArea:e._highlighted},get isInSelectionArea(){var t;return!((0,O.VS)(O.q$)&&e.hidden||null==(t=e.parent)||null==(t=t.selectionArea)||!t.isActive)&&e.parent.selectionArea.intersectsBbox(e.bboxCoords)},get supportSuggestions(){return e.object.supportSuggestions}}))).volatile((()=>({region_index:null}))).actions((e=>({setRegionIndex(t){e.region_index!==t&&(e.region_index=t,null==e.updateAppearenceFromState||e.updateAppearenceFromState())},beforeDestroy(){e.results.forEach((e=>(0,h.zr)(e)))},setSelected(t){e.selected=t},deleteRegion(){e.annotation.isReadOnly()||e.isReadOnly()||(e.selected&&e.annotation.unselectAll(!0),e.destroyRegion&&e.destroyRegion(),e.annotation.deleteRegion(e))},addResult(t){e.results.push(t)},applyAdditionalDataFromResult(e){},removeResult(t){const n=e.results.indexOf(t);n<0||(e.results.splice(n,1),(0,h.zr)(t),e.results.length||e.annotation.deleteArea(e))},setValue(t){const n=e.results.find((e=>e.from_name===t)),r=t.selectedValues();n?t.holdsState?n.setValue(r):e.removeResult(n):e.results.push({area:e,from_name:t,to_name:e.object,type:t.resultType,value:{[t.valueType]:r}}),e.updateAppearenceFromState&&e.updateAppearenceFromState()}}))),ht=h.gK.compose("AreaMixin",ut,Ue);var gt=n(72902),mt=n(75696),pt=n.n(mt);const ft=(()=>{const e={};return e.floodFill=(e,t,n,r,o)=>{let i,a,s,l,c,d,u,h,g,m;const p=e.data,f=e.width,v=e.height,y=e.bytes;let b=-1,x=f+1,w=-1,C=v+1,S=n*f+t;const j=new Uint8Array(f*v),k=new Uint8Array(o||f*v);if(1===k[S])return null;S*=y;const O=[p[S],p[S+1],p[S+2],p[S+3]],R=[{y:n,left:t-1,right:t+1,dir:1}];do{for(l=R.shift(),m=!1,a=l.left+1;ar||i<-r||(i=p[S+1]-O[1],i>r||i<-r||(i=p[S+2]-O[2],i>r||i<-r))))){for(m=!0,j[u+a]=1,k[u+a]=1,d=a-1;!(!(d>-1&&(h=u+d,S=h*y,1!==k[h]))||(i=p[S]-O[0],i>r||i<-r)||(i=p[S+1]-O[1],i>r||i<-r)||(i=p[S+2]-O[2],i>r||i<-r));)j[h]=1,k[h]=1,d--;for(c=a+1;!(!(cr||i<-r)||(i=p[S+1]-O[1],i>r||i<-r)||(i=p[S+2]-O[2],i>r||i<-r));)j[g]=1,k[g]=1,c++;db&&(b=c-1),s=l.y-l.dir,s>=0&&s=0&&sw&&(w=l.y))}while(R.length>0);return{data:j,width:e.width,height:e.height,bounds:{minX:x,minY:C,maxX:b,maxY:w}}},e.gaussBlur=(e,t)=>{let n,r,o,i,a,s,l,c;const d=2*t+1,u=t*t,h=new Float32Array(d);let g=0;const m=e.width,p=e.height,f=e.data,v=e.bounds.minX,y=e.bounds.maxX,b=e.bounds.minY,x=e.bounds.maxY;for(n=0;n0?t-i:0,c=C-i0?t-a:0,c=S-a.5?1:0}return{data:w,width:m,height:p,bounds:{minX:v,minY:b,maxX:y,maxY:x}}},e.gaussBlurOnlyBorder=(e,t,n)=>{const r=function(e,t,n){let r,o,i,a,s,l,c;const d=e.width,u=e.height,h=e.data,g=new Uint8Array(h),m=e.bounds.minX,p=e.bounds.maxX,f=e.bounds.minY,v=e.bounds.maxY;let y=d*u;const b=new Uint8Array(y),x=[],w=Math.max(m,1),C=Math.min(p,d-2),S=Math.max(f,1),j=Math.min(v,u-2);if(n&&n.length>0)for(s=0;s0?t-r:0,R=E-r0?t-a:0,R=_-a0?t-d:0,m=E-d.5)R[l]=1,dS&&(S=d),uk&&(k=u);else{for(g=t-u>0?t-u:0,m=_-u.5?(R[l]=1,dS&&(S=d),uk&&(k=u)):R[l]=0}}return{data:R,width:b,height:x,bounds:{minX:C,minY:j,maxX:S,maxY:k}}},e.createBorderMask=e=>{let t,n,r,o,i;const a=e.width,s=e.height,l=e.data,c=e.bounds.minX,d=e.bounds.maxX,u=e.bounds.minY,h=e.bounds.maxY,g=d-c+1,m=h-u+1,p=new Uint8Array(g*m),f=Math.max(c,1),v=Math.min(d,a-2),y=Math.max(u,1),b=Math.min(h,s-2);for(n=y;n{let t,n,r,o,i;const a=e.width,s=e.height,l=e.data,c=[],d=a-1,u=s-1;for(n=1;n{const t=function(e){let t,n;const r=e.width,o=e.data,i=e.bounds.minX,a=e.bounds.maxX,s=e.bounds.minY,l=e.bounds.maxY,c=a-i+3,d=l-s+3,u=new Uint8Array(c*d);for(n=s;n{const r=e.length,o=[];let i,a,s,l,c,d,u,h,g,m,p,f,v,y,b,x,w,C,S,j,k;for(a=0;a=Math.sqrt(b*b+x*x)?b:b>=Math.sqrt(y*y+x*x)?y:Math.abs((C*S.x-w*S.y+j.x*k.y-k.x*j.y)/x),v>p&&(f=i,p=v);p>t&&(h.push(f),g.push({first:m.first,last:f}),g.push({first:f,last:m.last}))}}while(g.length>0);for(u=[],d=h.length,h.sort(((e,t)=>e-t)),s=0;si&&(n=Math.abs(r-i),r=i,i=r+n),o>a&&(n=Math.abs(o-a),o=a,a=o+n),{x1:r,y1:o,x2:i,y2:a}}function xt(e,t){const n=e.stageRef.getLayers().filter((e=>e.attrs.id===t.id))[0].canvas.context,r=n.getImageData(0,0,n.canvas.width,n.canvas.height),o=[];for(let t=0;t0||n>0||i>0||a>0?o.push(1):o.push(0)}return o}function wt(e,t){let n,r,o,i;return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}].forEach((e=>{const a=t.point(e);void 0===n&&(n=o=a.x,r=i=a.y),n=Math.min(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.x),i=Math.max(i,a.y)})),{x:n,y:r,width:o-n,height:i-r}}function Ct(e,t,n=0){const r=new yt.A.Transform;return r.translate(t.x,t.y),r.rotate(n),wt(e,r)}function St(e,t,n){let{x:r,y:o,width:i,height:a}=e;return r<0?(i+=r,r=0):r+i>t&&(i=t-r),o<0?(a+=o,o=0):o+a>n&&(a=n-o),Object.assign({},e,{x:r,y:o,width:i,height:a})}function jt(e,t={x:0,y:0}){const{parent:n}=e;return r=>n.fixForZoomWrapper(r,(r=>{let{x:o,y:i}=r;(0,O.VS)(O.MV)&&(o=n.canvasToInternalX(o),i=n.canvasToInternalY(i)),o-=t.x,i-=t.y;const a=e.selected||!e.inSelection,{top:s,left:l,right:c,bottom:d}=e.bboxCoords,{top:u,left:h,right:g,bottom:m}=(null==n?void 0:n.selectedRegionsBBox)||{},p=a?{x:o,y:i,width:c-l,height:d-s}:{x:h-l+o,y:u-s+i,width:g-h,height:m-u},f=(0,O.VS)(O.MV)?St(p,100,100):St(p,n.stageWidth,n.stageHeight);return f.width!==p.width&&(o+=(f.width-p.width)*(f.x!==p.x?-1:1)),f.height!==p.height&&(i+=(f.height-p.height)*(f.y!==p.y?-1:1)),o+=t.x,i+=t.y,(0,O.VS)(O.MV)?{x:n.internalToCanvasX(o),y:n.internalToCanvasY(i)}:{x:o,y:i}}))}function kt(e,t,n,r,o,i,a,s,l,c,d){let u,h;d?(u=Math.min(i,r),h=Math.min(a,o)):(u=i,h=a);const g=document.createElement("canvas");g.width=u,g.height=h;const m=g.getContext("2d"),[p,f]=Ot(t,n,r,o,l,c);let v,y;d?(v=t,y=n):(v=Math.ceil(i/r*t),y=Math.ceil(a/o*n));const b=p,x=f,w=v,C=y,S=u,j=h;let k;m.drawImage(e,b,x,w,C,0,0,S,j);try{k=m.getImageData(0,0,g.width,g.height)}catch(e){const t="Please configure CORS cross-domain headers correctly for getting image labeling data";throw alert(t),console.error(t),t}return[k,g]}function Ot(e,t,n,r,o,i){const a=Math.abs(o)/n,s=Math.abs(i)/r;return[Math.floor(a*e),Math.floor(s*t)]}function Rt(e){let t=e/1e3;const n=Number.parseInt(t/3600);t%=3600;const r=Number.parseInt(t/60);return t=Math.floor(t),`${n}:${r}:${t}`}function Et(e){if(!("string"==typeof e||e instanceof Date||(t=e,/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/.test(t))))return;var t;const n=new Date(e),r=((new Date).getTime()-n.getTime())/1e3,o=Math.floor(r/86400);return isNaN(o)||o<0?void 0:0===o&&((r<60?"just now":r<120&&"1 minute ago")||r<3600&&`${Math.floor(r/60)} minutes ago`||r<7200&&"1 hour ago"||r<86400&&`${Math.floor(r/3600)} hours ago`)||1===o&&"Yesterday"||o<7&&`${o} days ago`||o<31&&`${Math.ceil(o/7)} weeks ago`||`${o} days ago`}function _t(e){const t=6e4*(e=e||new Date).getTimezoneOffset();return new Date(e.getTime()-t).toISOString().slice(0,-1)}function At(){return _t()}const Tt=e=>e&&e.nodeType===Node.TEXT_NODE,Pt=e=>e&&/[\w']/i.test(e),It=e=>e&&/[\s\t]/i.test(e),Lt=e=>{const t=e.getRangeAt(0),{startOffset:n,startContainer:r,endOffset:o,endContainer:i}=t;return{selection:e,range:t,startOffset:n,startContainer:r,endOffset:o,endContainer:i,firstSymbol:r.textContent[n],prevSymbol:r.textContent[n-1],lastSymbol:i.textContent[o-1],nextSymbol:i.textContent[o]}},Mt=e=>{(e=>{const t=e.getRangeAt(0);e.removeAllRanges(),e.collapse(t.startContainer,t.startOffset);let n=e.getRangeAt(0);do{e.collapse(n.endContainer,n.endOffset),e.modify("extend","forward","character"),n=e.getRangeAt(0)}while(!Tt(n.startContainer)||It(n.startContainer.textContent[n.startOffset]));t.setStart(n.startContainer,n.startOffset),e.removeAllRanges(),e.addRange(t)})(e),(e=>{const t=e.getRangeAt(0);e.removeAllRanges(),e.collapse(t.endContainer,t.endOffset);let n=e.getRangeAt(0);do{e.collapse(n.startContainer,n.startOffset),e.modify("extend","backward","character"),n=e.getRangeAt(0)}while(!Tt(n.startContainer)||It(n.startContainer.textContent[n.startOffset]));t.setEnd(n.endContainer,n.endOffset),e.removeAllRanges(),e.addRange(t)})(e)},Kt=(e,t)=>{const n="symbol"!==t,{startOffset:r,startContainer:o,endOffset:i,endContainer:a,firstSymbol:s,prevSymbol:l,lastSymbol:c,nextSymbol:d}=Lt(e);if(n)t.endsWith("boundary")?((e,t)=>{const{range:n,startOffset:r,startContainer:o,endOffset:i,endContainer:a}=Lt(e),s={};let l;e.collapse(o,r),e.modify("move","forward","character"),e.modify("move","backward",t),1===e.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START,n)&&(e.collapse(o,r),e.modify("move","backward",t)),l=e.getRangeAt(0),Object.assign(s,{startContainer:l.startContainer,startOffset:l.startOffset}),e.collapse(a,i),e.modify("move","backward","character"),e.modify("move","forward",t),-1===e.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START,n)&&(e.collapse(a,i),e.modify("move","forward",t)),l=e.getRangeAt(0),Object.assign(s,{endContainer:l.endContainer,endOffset:l.endOffset}),e.removeAllRanges();const c=new Range;c.setStart(s.startContainer,s.startOffset),c.setEnd(s.endContainer,s.endOffset),e.addRange(c)})(e,t):((e,t)=>{const{range:n,startOffset:r,startContainer:o,endOffset:i,endContainer:a}=Lt(e),s={};let l;for(e.collapse(a,i);1===e.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START,n);)e.modify("move","backward",t);for(;e.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START,n)<1;)l=e.getRangeAt(0),Object.assign(s,{startContainer:l.startContainer,startOffset:l.startOffset}),e.modify("move","forward",t);for(e.collapse(o,r);-1===e.getRangeAt(0).compareBoundaryPoints(Range.END_TO_END,n);)e.modify("move","forward",t);for(;e.getRangeAt(0).compareBoundaryPoints(Range.END_TO_END,n)>-1;)l=e.getRangeAt(0),Object.assign(s,{endContainer:l.endContainer,endOffset:l.endOffset}),e.modify("move","backward",t);e.removeAllRanges();const c=new Range;c.setStart(s.startContainer,s.startOffset),c.setEnd(s.endContainer,s.endOffset),e.addRange(c),Mt(e)})(e,t);else{if(!Pt(s)||Pt(l)){e.getRangeAt(0).setEnd(o,r),e.modify("move","backward",t)}if(!Pt(c)||Pt(d)){e.getRangeAt(0).setEnd(a,i),e.modify("extend","forward",t)}}},Dt=(e,{granularity:t,beforeCleanup:n,window:r}={granularity:"symbol"})=>{const o=r.getSelection();if(o.isCollapsed)return;if("symbol"!==t&&Mt(o),o.isCollapsed)return;Nt(o,t);const i=o.toString().replace(/[\n\r]/g,"\\n");for(let t=0;t{if(e.modify&&t&&"symbol"!==t)try{switch(t){case"word":Kt(e,"word");break;case"sentence":Kt(e,"sentenceboundary");break;case"paragraph":Kt(e,"paragraphboundary")}}catch(e){console.warn("Probably, you're using browser that doesn't support granularity.")}},Vt=(e,t,n,r="forward")=>{const o=t===e?t.childNodes[n]:t;if(Tt(o)&&!r.endsWith("next"))return o;const i=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ALL);let a,s=i.nextNode();for(;s&&s!==o;)Tt(s)&&(a=s),s=i.nextNode();if(s&&r.startsWith("backward"))return a;for("forward-next"===r&&(s=i.nextNode());s;){if(Tt(s))return s;s=i.nextNode()}},zt=e=>{const{endOffset:t,commonAncestorContainer:n}=e;let{startOffset:r,startContainer:o,endContainer:i}=e;if(!Tt(o)){if(o=Vt(n,o,r,"forward"),!o)return null;e.setStart(o,0),r=0}const a=e=>/^\s*$/.test(e.wholeText);if(o.wholeText.length===r||a(o)){do{if(o=Vt(n,o,r,"forward-next"),!o)return null}while(a(o));e.setStart(o,0),r=0}if(!Tt(i)){if(i=Vt(n,i,t,"backward"),!i)return null;for(;/^\s*$/.test(i.wholeText);)if(i=Vt(n,i,t,"backward-next"),!i)return null;e.setEnd(i,i.length)}return e},Bt=(e,{index:t,label:n,classNames:r})=>{const{startContainer:o,endContainer:i,commonAncestorContainer:a}=e,{startOffset:s,endOffset:l}=e,c=[],d=(...e)=>Ht(...e,r);if(o===i)c.push(d(o,s,l));else{$t(o,i,a).forEach((e=>{let t=s,n=l;e!==o&&(t=0),e!==i&&(n=e.length),c.push(d(e,t,n))}))}const u=c[c.length-1];return u&&(u.setAttribute("data-label",null!=n?n:""),u.setAttribute("data-index",t?String(t):"")),c},Ht=(e,t,n,r)=>{let o;const i=e.textContent,a=e.parentNode;if(0!==t||e.length!==n||!a.classList.contains(r[0])||(0,O.VS)(O.Er)&&a.innerText!==i){const s=i.substring(t,n),l=e.ownerDocument.createTextNode(s),c=e.cloneNode(),d=e.cloneNode();c.textContent=i.substring(0,t),d.textContent=i.substring(n,i.length);const u=e.ownerDocument.createDocumentFragment();o=Ft(l,r),c.length&&u.appendChild(c),u.appendChild(o),d.length&&u.appendChild(d),a.replaceChild(u,e)}else{const t=e.ownerDocument.createElement("span"),n=a.parentNode;n.replaceChild(t,a),o=Ft(a,r),n.replaceChild(o,t)}return o},Ft=(e,t,n)=>{const r=e.ownerDocument.createElement("span");return r.appendChild(e),Wt(r,{classNames:t,label:n}),r},Wt=(e,{classNames:t,index:n,label:r})=>{t&&(e.className="",e.classList.add(...t)),null!=r&&r.length?e.setAttribute("data-label",r):e.removeAttribute("data-label"),e.setAttribute("data-index",n?String(n):"")},$t=(e,t,n)=>{const r=n.ownerDocument.createTreeWalker(n,NodeFilter.SHOW_ALL);let o=!1;const i=[];let{currentNode:a}=r;for(;a&&(a===e&&(o=!0),o&&a.nodeType===Node.TEXT_NODE&&i.push(a),!o||a!==t);)a=r.nextNode();return i},Ut=e=>{e&&e.forEach((e=>{const t=e.ownerDocument.createDocumentFragment(),n=e.parentNode;Array.from(e.childNodes).forEach((e=>{e.remove(),t.appendChild(e)})),n.replaceChild(t,e),Array.from(n.childNodes).forEach((e=>{const t=e.previousSibling;Tt(t)&&Tt(e)&&(t.data+=e.data,e.remove())}))}))},Zt=(e,t,n)=>({startContainer:Yt(Jt(n,e,"right")),endContainer:Yt(Jt(n,t,"left"))}),Gt=(e,t,n)=>{var r;const{startContainer:o,endContainer:i}=Zt(e,t,n),a=(null!=(r=n.contentDocument)?r:n.ownerDocument).createRange();if(o&&i)return a.setStart(o.node,o.position),a.setEnd(i.node,i.position),a},Yt=({node:e,position:t}={})=>{if(!e)return;return{node:e,position:[...e.textContent].slice(0,t).join("").length}},Xt=({node:e,position:t})=>{const n=e.textContent.substr(0,t);return{node:e,position:[...n].length}},qt=e=>{const t=Xt({node:e.startContainer,position:e.startOffset}),n=Xt({node:e.endContainer,position:e.endOffset});return e.setStart(e.startContainer,t.position),e.setEnd(e.endContainer,n.position),e},Jt=(e,t,n="left")=>{var r;const o=(null!=(r=e.contentDocument)?r:e.ownerDocument).createTreeWalker(e,NodeFilter.SHOW_ALL);let i=0,a=o.nextNode(),s=o.nextNode(),l=!1;for(;a;){const e=a.nodeType===Node.TEXT_NODE,r="BR"===a.nodeName;if(r&&i++,e&&l)return{node:a,position:0};if(e){const e=[...a.textContent].length;if(e+i>=t||!s){if("right"!==n||e+i!==t||!s)return{node:a,position:r?0:(0,w.clamp)(t-i,0,e)};l=!0}i+=e}a=s,s=o.nextNode()}},Qt=(e,t)=>[en(e.startContainer,e.startOffset,t),en(e.endContainer,e.endOffset,t)],en=(e,t,n)=>{var r;const o=(null!=(r=n.contentDocument)?r:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ALL);let i=0,a=!1,s=o.nextNode();for(;s;){a=a||e===s;const n=e===s||s.contains(e),r=s.nodeType===Node.TEXT_NODE,l="BR"===s.nodeName;if(a&&!1===n)break;if(r||l){let e=(0,w.isDefined)(s.length)?[...s.textContent].length:1;n&&(e=Math.min(t,e)),i+=e}s=o.nextNode()}return i},tn=e=>{const t=window.getSelection(),n=document.createRange(),r=e.childNodes[0];n.setStart(r,0),n.setEnd(r,r.length);for(let e=t.rangeCount;e--;){const r=t.getRangeAt(e);if(r.compareBoundaryPoints(Range.START_TO_START,n)<1&&r.compareBoundaryPoints(Range.END_TO_END,n)>-1)return!0}return!1};function nn(e){return e?Object.entries(e).reduce(((e,[t,n])=>(e[`--${t}`]=n,e)),{}):null}const rn={Image:o,HTML:je,Checkers:w,Colors:gt,UDate:i,guidGenerator:E,debounce:Y,styleToProp:function(e){return e?e.split(";").filter((e=>e.split(":")[0]&&e.split(":")[1])).map((e=>[e.split(":")[0].trim().replace(/-./g,(e=>e.substr(1).toUpperCase())),e.split(":").slice(1).join(":").trim()])).reduce(((e,t)=>Object.assign({},e,{[t[0]]:t[1]})),{}):null},Magicwand:r,Selection:a},on=h.gK.model("AudioUltraRegionModel",{type:"audioregion",object:h.gK.late((()=>h.gK.reference(mj))),start:h.gK.number,end:h.gK.number,channel:h.gK.optional(h.gK.number,0),selectedregionbg:h.gK.optional(h.gK.string,"rgba(0, 0, 0, 0.5)")}).volatile((()=>({hideable:!0}))).views((e=>({wsRegionOptions(){var t;return{id:e.id,start:e.start,end:e.end,color:e.getColor(),visible:!e.hidden,updateable:!e.readonly,deletable:!e.readonly,channel:null!=(t=e.channel)?t:0}}}))).actions((e=>{const t={setProperty:e.setProperty,setLocked:e.setLocked};return{serialize(){var t;return{original_length:null==(t=e.object._ws)?void 0:t.duration,value:{start:e.start,end:e.end,channel:e.channel}}},getColor:(t=1)=>rn.Colors.convertToRGBA(e.getOneColor(),t),updateColor(t=1){var n;const r=e.getColor(t);null==(n=e._ws_region)||n.updateColor(r)},updatePosition(t,n){var r;null==(r=e._ws_region)||r.updatePosition(null!=t?t:e.start,null!=n?n:e.end)},selectRegion(){e._ws_region&&(e._ws_region.handleSelected(!0),e._ws_region.bringToFront(),e._ws_region.scrollToRegion())},deleteRegion(){e.annotation.deleteRegion(e)},afterUnselectRegion(){e._ws_region&&e._ws_region.handleSelected(!1)},setHighlight(t){e._highlighted=t,e._ws_region&&e._ws_region.handleHighlighted(t)},beforeDestroy(){e._ws_region&&e._ws_region.remove()},setLocked(n){t.setLocked(n),e._ws_region&&e._ws_region.setLocked(e.locked)},onMouseOver(){e.annotation.isLinkingMode&&(e.setHighlight(!0),e._ws_region.switchCursor(V.A.LINKING_MODE_CURSOR))},onMouseLeave(){e.annotation.isLinkingMode&&(e.setHighlight(!1),e._ws_region.switchCursor(V.A.MOVE_CURSOR))},onUpdateEnd(){e.start=e._ws_region.start,e.end=e._ws_region.end,e.notifyDrawingFinished()},toggleHidden(t){null==t||t.stopPropagation(),e.hidden=!e.hidden,e._ws_region&&e._ws_region.setVisibility(!e.hidden)},setProperty(n,r){t.setProperty(n,r),["start","end"].includes(n)&&e.updatePosition()}}})),an=h.gK.model("AudioRegionModel",{type:"audioregion",object:h.gK.late((()=>h.gK.reference(mj))),start:h.gK.number,end:h.gK.number,channel:h.gK.optional(h.gK.number,0),selectedregionbg:h.gK.optional(h.gK.string,"rgba(0, 0, 0, 0.5)")}).volatile((()=>({hideable:!0}))).views((e=>({getRegionElement:()=>e.wsRegionElement(e._ws_region),wsRegionElement(e){if(!e)return null;const t=e.id;return document.querySelector(`[data-id="${t}"]`)},get wsRegionOptions(){const t={id:e.id,start:e.start,end:e.end,channel:e.channel,color:"orange"};return e.readonly&&(t.drag=!1,t.resize=!1),t}}))).actions((e=>({serialize(){var t;return{original_length:null==(t=e.object._ws)?void 0:t.getDuration(),value:{start:e.start,end:e.end,channel:e.channel}}},updateColor(t=1){const n=rn.Colors.convertToRGBA(e.getOneColor(),t);try{var r;null==(r=e._ws_region)||r.update({color:n})}catch(e){}},updateAppearenceFromState(){var t;null!=(t=e._ws_region)&&t.update&&(e._ws_region.start=e.start,e._ws_region.end=e.end,e.applyCSSClass(e._ws_region))},applyCSSClass(t){e.updateColor(.3);const n=(0,h.Zn)(e).settings,r=e.wsRegionElement(t);if(!r)return;const o=r.className.split(" ");for(const e in o)o[e].indexOf("htx-label")>=0&&o.splice(e,1);const i=[...new Set([...o,"htx-highlight","htx-highlight-last"])];if(e.parent.showlabels||n.showLabels){var a;const t=rn.HTML.labelWithCSS(r,{labels:null==(a=e.labeling)?void 0:a.mainValue,score:e.score});i.push(t)}else i.push("htx-no-label");r.className=i.filter(Boolean).join(" ")},selectRegion(){e.updateColor(.8);const t=e.wsRegionElement(e._ws_region);if(t){const e=window.document.scrollingElement,n=e.scrollTop,r=e.scrollLeft;t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView(),window.document.scrollingElement.scrollTo(r,n)}},afterUnselectRegion(){e.updateColor(.3)},setHighlight(t){e._highlighted=t,e._ws_region&&(t?(e.updateColor(.8),e._ws_region.element.style.border=V.A.HIGHLIGHTED_CSS_BORDER):(e.updateColor(.3),e._ws_region.element.style.border="none"))},beforeDestroy(){e._ws_region&&e._ws_region.remove()},setLocked(t){e.locked=t instanceof Function?t(e.locked):t,e._ws_region&&(e._ws_region.drag=!e.locked,e._ws_region.resize=!e.locked)},onClick(t,n){e.annotation.isLinkingMode||e._ws_region.update({color:rn.Colors.rgbaChangeAlpha(e.selectedregionbg,.8)}),e.onClickRegion(n)},onMouseOver(){e.annotation.isLinkingMode&&(e.setHighlight(!0),e._ws_region.element.style.cursor=V.A.LINKING_MODE_CURSOR)},onMouseLeave(){e.annotation.isLinkingMode&&(e.setHighlight(!1),e._ws_region.element.style.cursor=V.A.MOVE_CURSOR)},onUpdateEnd(){var t;e.start=e._ws_region.start,e.end=e._ws_region.end,e.channel=null!=(t=e._ws_region.channelIdx)?t:0,e.updateColor(e.selected?.8:.3),e.notifyDrawingFinished()},toggleHidden(t){e.hidden=!e.hidden,e._ws_region.element.style.display=e.hidden?"none":"block",null==t||t.stopPropagation()}}))),sn=h.gK.model("EditableRegion").volatile((()=>({editorEnabled:!0,editableFields:[]}))).views((e=>({getProperty:t=>e[t],isPropertyEditable:t=>e.editableFields.some((e=>e.property===t)),get hasEditableFields(){return e.editableFields.length>0}}))).actions((e=>({setProperty(t,n){if(!e.isPropertyEditable(t))throw new Error(`Property ${t} of model ${e.type} is not editable`);e[t]=n}}))),ln=h.gK.model("EditableAudioModel",{}).volatile((()=>({editableFields:[{property:"start",label:"Start"},{property:"end",label:"End"}]}))),cn=h.gK.compose("AudioRegionModel",it,ht,We,sn,ln,an),dn=h.gK.compose("AudioRegionModel",it,ht,We,sn,ln,on);let un=cn;(0,O.VS)(O.vS)&&(un=dn),x.addRegionType(un,"audioplus"),x.addRegionType(un,"audio");var hn=n(8392),gn=n.n(hn),mn=n(26324);const pn=(e,t,n)=>{const r={type:"",title:""};switch(e){case"error":r.type=mn.A.error,r.title="Error";break;case"warning":r.type=mn.A.warning,r.title="Warning";break;case"success":r.type=mn.A.success,r.title="Success";break;default:r.type=mn.A.info,r.title="Info"}return r.type({title:n||r.title,content:t})},fn={error:(e,t)=>pn("error",e,t),warning:(e,t)=>pn("warning",e,t),success:(e,t)=>pn("success",e,t),info:(e,t)=>pn("info",e,t)},vn=h.gK.model("BaseTag"),yn=h.gK.model(Object.assign({},(0,O.VS)(O.cE)?{id:h.gK.identifier,name:h.gK.string}:{name:h.gK.identifier},{_needsUpdate:h.gK.optional(h.gK.number,0)})).volatile((()=>({isObjectTag:!0,supportSuggestions:!1}))).views((e=>({get allRegs(){var t;return(null==(t=e.annotation)?void 0:t.regionStore.regions.filter((t=>t.object===e)))||[]},get regs(){return e.allRegs},findRegion(t){let n=null;return e._regionsCache&&e._regionsCache.length&&(n=e._regionsCache.find((({region:e})=>gn()(e,t)))),n||e.regions.find((e=>gn()(e,t)))},get isReady(){return!0}}))).actions((e=>{const t={};return{addProp:function(n,r){t[n]=r,e._needsUpdate=e._needsUpdate+1},getProps:function(){return t},getAvailableStates:function(){const t=(e,t)=>t.checkMaxUsages?e.concat(t.checkMaxUsages()):e,n=e.states()||[];let r;(0,O.VS)(O.Zr)?(r=n.reduce(t,[]).filter((e=>e.selected)),r.forEach((e=>e.setSelected(!1)))):r=n.reduce(t,[]);const o=e.activeStates()||[];if(0===o.length){if(r.length){const e=r[0];fn.warning(`You can't use ${e.value} more than ${e.maxUsages} time(s)`)}e.annotation.unselectAll()}return o}}})),bn=h.gK.compose(yn,vn,Pe),xn={min:1,max:1500,step:10,default:1},wn={min:.5,max:2,step:.01,default:1},Cn={min:0,max:1,step:.01,default:1},Sn=h.gK.model({value:h.gK.maybeNull(h.gK.string),muted:h.gK.optional(h.gK.boolean,!1),zoom:h.gK.optional(h.gK.boolean,!0),defaultzoom:h.gK.optional(h.gK.string,xn.default.toString()),volume:h.gK.optional(h.gK.boolean,!0),defaultvolume:h.gK.optional(h.gK.string,Cn.default.toString()),speed:h.gK.optional(h.gK.boolean,!0),defaultspeed:h.gK.optional(h.gK.string,wn.default.toString()),hotkey:h.gK.maybeNull(h.gK.string),showlabels:h.gK.optional(h.gK.boolean,!1),showscores:h.gK.optional(h.gK.boolean,!1),height:h.gK.optional(h.gK.string,"88"),cursorwidth:h.gK.optional(h.gK.string,"2"),cursorcolor:h.gK.optional(Re.color,"#333"),defaultscale:h.gK.optional(h.gK.string,"1"),autocenter:h.gK.optional(h.gK.boolean,!0),scrollparent:h.gK.optional(h.gK.boolean,!0)}),jn=h.gK.compose("AudioModel",Sn,Fe,ze,bn,Pe,Le,h.gK.model("AudioModel",{type:"audio",_value:h.gK.optional(h.gK.string,""),playing:h.gK.optional(h.gK.boolean,!1),regions:h.gK.array(un)}).volatile((()=>({errors:[]}))).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,h.Zn)(e)},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,h.Pw)(e).name&&e.isSelected))}}))).actions((e=>({triggerSync(t,n){var r;e._ws&&e.syncSend(Object.assign({playing:e._ws.isPlaying(),time:e._ws.getCurrentTime(),speed:null!=(r=e._ws.rate)?r:1},n),t)},triggerSyncPlay(){e.triggerSync("play")},triggerSyncPause(){e.triggerSync("pause")},handleSyncPlay(t){var n;e._ws&&(e.handleSyncSeek(t),e._ws.isPlaying()||null==(n=e._ws)||n.play())},handleSyncPause(t){var n;e._ws&&(e.handleSyncSeek(t),e._ws.isPlaying()&&(null==(n=e._ws)||n.pause()))},handleSyncSpeed(){},handleSyncSeek({time:t}){try{e._ws&&t!==e._ws.getCurrentTime()&&e._ws.setCurrentTime(t)}catch(e){console.log(e)}},registerSyncHandlers(){e.syncHandlers.set("play",e.handleSyncPlay),e.syncHandlers.set("pause",e.handleSyncPause),e.syncHandlers.set("seek",e.handleSyncSeek),e.syncHandlers.set("speed",e.handleSyncSpeed)}}))).actions((e=>({needsUpdate(){e.handleNewRegions()},onReady(){e.setReady(!0)},handleNewRegions(){var t;null!=(t=e._ws)&&t.isReady&&e.regs.map((t=>{t._ws_region||e.createWsRegion(t)}))},onHotKey:t=>(t&&t.preventDefault(),e._ws.playPause(),!1),setRangeValue(t){e.rangeValue=t},setPlaybackRate(t){e.playBackRate=t},createRegion(t,n){let r=e.selectedregionbg;const o=n.find((e=>"labels"===e.type));o&&(r=rn.Colors.convertToRGBA(o.getSelectedColor(),.3));const i=un.create({id:t.id?t.id:E(),pid:t.pid?t.pid:E(),parentID:null===t.parent_id?"":t.parent_id,start:t.start,end:t.end,score:t.score,readonly:t.readonly,regionbg:e.regionbg,selectedregionbg:r,normalization:t.normalization,states:n});return i._ws_region=t,e.regions.push(i),e.annotation.addRegion(i),i},selectRange(t,n){const r=e.regs.filter((e=>e.start>=n.start&&e.end<=n.end));n.remove&&n.remove(),r.length&&e.annotation.selectAreas(r)},addRegion(t){const n=e.annotation.areas.get(t.id);if(n)return n.applyCSSClass(t),n._ws_region=t,n;if(0===e.getAvailableStates().length)return void t.on("update-end",(n=>e.selectRange(n,t)));const r=e.activeStates()[0],o={[r.valueType]:r.selectedValues()},i=e.annotation.createResult(t,o,r,e);return i._ws_region=t,i.updateAppearenceFromState(),i},handlePlay(){e._ws&&(e.playing=!e.playing,e._ws.isPlaying()?e.triggerSync("play"):e.triggerSync("pause"))},handleSeek(){e.triggerSync("seek")},handleSpeed(t){e.triggerSync("speed",{speed:t})},createWsRegion(t){const n=t.wsRegionOptions;t.annotation.isReadOnly()&&(n.drag=!1,n.resize=!1);const r=e._ws.addRegion(t.wsRegionOptions);t._ws_region=r,t.updateAppearenceFromState()},onLoad(t){e._ws=t;const n=e.annotation.history;e.regs.forEach((t=>{e.createWsRegion(t)})),setTimeout((()=>n.setSkipNextUndoState(!1)),0)},onError(t){e.errors=[t]},wsCreated(t){e._ws=t},beforeDestroy(){try{(0,w.isDefined)(e._ws)&&(e._ws.destroy(),e._ws=null)}catch(t){e._ws=null,console.warn("Already destroyed")}}})))),kn=h.gK.model({name:h.gK.identifier,value:h.gK.maybeNull(h.gK.string),muted:h.gK.optional(h.gK.boolean,!1),zoom:h.gK.optional(h.gK.boolean,!0),defaultzoom:h.gK.optional(h.gK.string,1..toString()),volume:h.gK.optional(h.gK.boolean,!0),defaultvolume:h.gK.optional(h.gK.string,1..toString()),speed:h.gK.optional(h.gK.boolean,!0),defaultspeed:h.gK.optional(h.gK.string,1..toString()),hotkey:h.gK.maybeNull(h.gK.string),showlabels:h.gK.optional(h.gK.boolean,!1),showscores:h.gK.optional(h.gK.boolean,!1),height:h.gK.optional(h.gK.string,"96"),waveheight:h.gK.optional(h.gK.string,"32"),cursorwidth:h.gK.optional(h.gK.string,"2"),cursorcolor:h.gK.optional(Re.color,"#333"),defaultscale:h.gK.optional(h.gK.string,"1"),autocenter:h.gK.optional(h.gK.boolean,!0),scrollparent:h.gK.optional(h.gK.boolean,!0),splitchannels:h.gK.optional(h.gK.boolean,!1),decoder:h.gK.optional(h.gK.enumeration(["ffmpeg","webaudio"]),"webaudio"),player:h.gK.optional(h.gK.enumeration(["html5","webaudio"]),"html5")}),On=h.gK.compose("AudioModel",kn,Fe,ze,bn,Pe,Le,h.gK.model("AudioModel",{type:"audio",_value:h.gK.optional(h.gK.string,""),regions:h.gK.array(un)}).volatile((()=>({errors:[]}))).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,h.Zn)(e)},states(){var t;return(null==(t=e.annotation)?void 0:t.toNames.get(e.name))||[]},activeStates(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,h.Pw)(e).name&&e.isSelected))},get activeState(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,h.Pw)(e).name&&e.isSelected))[0]},get activeLabel(){var t;const n=e.activeState;return null==n||null==(t=n.selectedValues())?void 0:t[0]}}))).actions((e=>({triggerSync(t,n){e._ws&&e.syncSend(Object.assign({playing:e._ws.playing,time:e._ws.currentTime,speed:e._ws.rate},n),t)},triggerSyncSpeed(t){e.triggerSync("speed",{speed:t})},triggerSyncPlay(){e.handleSyncPlay(),e.triggerSync("play",{playing:!0})},triggerSyncPause(){e.handleSyncPause(),e.triggerSync("pause",{playing:!1})},triggerSyncSeek(t){e.triggerSync("seek",{time:t})},registerSyncHandlers(){["play","pause","seek"].forEach((t=>{e.syncHandlers.set(t,e.handleSync)})),e.syncHandlers.set("speed",e.handleSyncSpeed)},handleSync(t){var n,r,o;null!=(n=e._ws)&&n.loaded&&(e.handleSyncSeek(t),t.playing?e._ws.playing||null==(r=e._ws)||r.play():e._ws.playing&&(null==(o=e._ws)||o.pause()))},handleSyncPlay(){var t,n;null!=(t=e._ws)&&t.playing||null==(n=e._ws)||n.play()},handleSyncPause(){var t,n;null!=(t=e._ws)&&t.playing&&(null==(n=e._ws)||n.pause())},handleSyncSeek({time:t}){var n;if(null!=(n=e._ws)&&n.loaded&&(0,w.isDefined)(t))try{e._ws.setCurrentTime(t,!0),e._ws.syncCursor()}catch(e){console.log(e)}},handleSyncSpeed({speed:t}){e._ws&&(e._ws.rate=t)},syncMuted(t){e._ws&&(e._ws.muted=t)}}))).actions((e=>{let t,n=null;return{afterCreate(){t=(0,u.lB)(e,"activeLabel",(()=>{var t;const n=null==(t=e._ws)||null==(t=t.regions)?void 0:t.selected;if(!n||0===n.length)return;const r=e.activeState,o=null==r?void 0:r.selectedColor,i=null==r?void 0:r.selectedValues();n.forEach((t=>{t.update({color:o,labels:null!=i?i:[]});const n=t.isRegion?e.updateRegion(t):e.addRegion(t);e.annotation.selectArea(n)})),n.length&&e.requestWSUpdate()}),!1)},needsUpdate(){e.handleNewRegions(),e.requestWSUpdate()},requestWSUpdate(){e._ws&&(n&&clearTimeout(n),n=setTimeout((()=>{e._ws.regions.redraw()}),33))},onReady(){e.setReady(!0)},onRateChange(t){e.triggerSyncSpeed(t)},loadSyncedParagraphs(){if(!e.syncManager)return;Array.from(e.syncManager.syncTargets,(([,e])=>e)).filter((e=>"paragraphs"===e.type&&e.contextscroll)).forEach((t=>{const n=Object.values(t.regionsStartEnd).map((({start:e,end:t})=>({start:e,end:t,showInTimeline:!0,external:!0,locked:!0})));e._ws.addRegions(n)}))},handleNewRegions(){e._ws&&e.regs.map((t=>{t._ws_region?e.updateWsRegion(t):e.createWsRegion(t)}))},findRegionByWsRegion:t=>e.regs.find((e=>{var n;return(null==(n=e._ws_region)?void 0:n.id)===(null==t?void 0:t.id)})),getRegionColor(){const t=e.activeState;return t?t.selectedColor:null},onHotKey:t=>(t&&t.preventDefault(),e._ws.togglePlay(),!1),setRangeValue(t){e.rangeValue=t},setPlaybackRate(t){e.playBackRate=t},createRegion(t,n){let r=e.selectedregionbg;const o=n.find((e=>"labels"===e.type));o&&(r=rn.Colors.convertToRGBA(o.getSelectedColor(),.3));const i=un.create({id:t.id?t.id:E(),pid:t.pid?t.pid:E(),parentID:null===t.parent_id?"":t.parent_id,start:t.start,end:t.end,score:t.score,readonly:t.readonly,regionbg:e.regionbg,selectedregionbg:r,normalization:t.normalization,states:n});return i._ws_region=t,e.regions.push(i),e.annotation.addRegion(i),i},addRegion(t){const n=e.annotation.areas.get(t.id);if(n)return n._ws_region=t,n.updateColor(),n;if(0===e.getAvailableStates().length)return void(t.isRegion&&t.convertToSegment().handleSelected());const r=e.activeState,o={[r.valueType]:r.selectedValues()},i=e.annotation.createResult(t,o,r,e),a=t.convertToRegion(o.labels);return i._ws_region=a,i.updateColor(),i},updateRegion(t){const n=e.findRegionByWsRegion(t);if(n)return n.onUpdateEnd(),n},createWsRegion(t){var n;if(!e._ws)return;const r=t.wsRegionOptions();r.labels=null!=(n=t.labels)&&n.length?t.labels:void 0;const o=e._ws.addRegion(r,!1);t._ws_region=o},updateWsRegion(t){var n;if(!e._ws)return;const r=t.wsRegionOptions();r.labels=null!=(n=t.labels)&&n.length?t.labels:void 0,e._ws.updateRegion(r,!1)},clearRegionMappings(){e.regs.forEach((e=>{e._ws_region=null}))},onLoad(t){e.clearRegionMappings(),e._ws=t,e.onReady(),e.needsUpdate(),(0,O.VS)(O.LG)&&e.loadSyncedParagraphs()},onSeek(t){e.triggerSyncSeek(t)},onPlaying(t){t?e.triggerSyncPlay():e.triggerSyncPause()},onError(t){let n;n="HTTPError"===t.name?"ERR_LOADING_HTTP":"ERR_LOADING_AUDIO";const r=(0,h._$)(e.store).messages[n]({attr:e.value,url:e._value,error:t.message});e.errors=[r]},beforeDestroy(){try{n&&clearTimeout(n),t&&t(),(0,w.isDefined)(e._ws)&&(e._ws.destroy(),e._ws=null)}catch(t){e._ws=null,console.warn("Already destroyed")}}}}))),Rn=({item:e,style:t,className:n,children:r})=>{const o=e.getProps&&e.getProps(),i=(0,Ze.cn)("object").toClassName();return(0,_.jsx)("div",Object.assign({className:[i,n].join(" "),"data-needs-update":e._needsUpdate,style:t},o,{children:r}))},En=(0,y.PA)(Rn),_n=(0,y.PA)(Rn);var An=n(92006),Tn=n.n(An),Pn=n(53871),In=n.n(Pn),Ln=n(1474),Mn=n(17022),Kn=n(64381),Dn=n.n(Kn),Nn=n(38573),Vn=n.n(Nn),zn=n(57290),Bn=n.n(zn);const Hn="wave--XFK_Q",Fn="link--MtZ3P";var Wn=n(82149),$n=n(61747),Un=n(35455),Zn=n(34595),Gn=n(27078),Yn=n(73033),Xn=n(37442),qn=n.n(Xn);const Jn=(e,{init:t,transition:n,onStart:r,beforeTransition:o,afterTransition:i}={})=>new Promise((async a=>{null==t||t(e);const s=()=>{null==r||r(e)},l=async()=>{await(null==i?void 0:i(e)),e.removeEventListener("transitionstart",s),e.removeEventListener("transitionend",l),a(!0)};e.addEventListener("transitionstart",s),e.addEventListener("transitionend",l),await(null==o?void 0:o(e)),setTimeout((()=>null==n?void 0:n(e)),0)})),Qn=e=>{const t=e.getBoundingClientRect(),n=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||n.scrollTop,i=window.pageXOffset||r.scrollLeft||n.scrollLeft,a=r.clientTop||n.clientTop||0,s=r.clientLeft||n.clientLeft||0,l=t.top+o-a,c=t.left+i-s,d=e.getBoundingClientRect();return{width:d.width,height:d.height,top:Math.round(l),left:Math.round(c)}},er=(e,t,n,r=0)=>{let o=0,i=0;const a=((e,t)=>{const n=Qn(e),r=Qn(t);return{source:n,target:r,get top(){return n.top-r.height},get bottom(){return n.top+n.height},get horizontalCenter(){return n.left+n.width/2-r.width/2},get horizontalLeft(){return n.left},get horizontalRight(){return n.left+n.width-r.width}}})(e,t),s=n.split("-");switch(n){case"top-center":i=a.top-r,o=a.horizontalCenter;break;case"top-left":i=a.top-r,o=a.horizontalLeft;break;case"top-right":i=a.top-r,o=a.horizontalRight;break;case"bottom-center":i=a.bottom+r,o=a.horizontalCenter;break;case"bottom-left":i=a.bottom+r,o=a.horizontalLeft;break;case"bottom-right":i=a.bottom+r,o=a.horizontalRight}return iwindow.scrollX+window.innerHeight&&(i=a.top-r,s[0]="top"),o<0?(o=a.horizontalLeft,s[1]="left"):o+a.target.width>window.innerWidth&&(o=a.horizontalRight,s[1]="right"),{top:i,left:o,pos:a,align:s.join("-")}},tr=e=>{"webkitRequestFullscreen"in e?e.webkitRequestFullscreen():e.requestFullscreen()},nr=()=>{"webkitCancelFullScreen"in document?document.webkitCancelFullScreen():document.exitFullscreen()},rr=()=>{var e;return null!=(e=document.webkitCurrentFullScreenElement)?e:document.fullscreenElement},or=(e={},t)=>{const n=(0,p.useRef)(e);return(0,p.useEffect)((()=>{n.current=e}),[e,...null!=t?t:[]]),(0,p.useEffect)((()=>{const e=()=>{rr()?null==n.current.onEnterFullscreen||n.current.onEnterFullscreen():null==n.current.onExitFullscreen||n.current.onExitFullscreen()},t="onwebkitfullscreenchange"in document?"webkitfullscreenchange":"fullscreenchange";return document.addEventListener(t,e),()=>{document.removeEventListener(t,e)}}),[]),{getElement:rr,enter:tr,exit:nr,setHandlers(e={}){n.current=e}}},ir=(0,p.forwardRef)((({title:e,children:t,defaultVisible:n,mouseEnterDelay:r=0,enabled:o=!0,theme:i="dark",style:a,triggerElementGetter:s=e=>e},l)=>{if(!t||Array.isArray(t))throw new Error("Tooltip does accept a single child only");const c=!!l&&Object.hasOwnProperty.call(l,"current"),d=l instanceof Function,u=c?l:(0,p.useRef)(),h=d?e=>{l(e),u.current=e}:u,m=(0,p.useRef)(),[f,v]=(0,p.useState)({}),[y,b]=(0,p.useState)(n?"visible":null),[x,w]=(0,p.useState)(!1),[C,S]=(0,p.useState)("top-center"),j=(0,p.useRef)(),k=(0,p.useCallback)((()=>{const{left:e,top:t,align:n}=er(s(u.current),m.current,C,10);v({left:e,top:t}),S(n)}),[u.current,m.current]),O=(0,p.useCallback)(((e,t)=>{if(m.current){if(t)return void w(!1);Jn(m.current,{beforeTransition(){b(e?"before-appear":"before-disappear")},transition(){e&&k(),b(e?"appear":"disappear")},afterTransition(){b(e?"visible":null),!1===e&&w(!1)}})}}),[k,m]),R=(0,p.useMemo)((()=>{switch(y){case"before-appear":return"before-appear";case"appear":return"appear before-appear";case"before-disappear":return"before-disappear";case"disappear":return"disappear before-disappear";case"visible":return"visible";default:return y?"visible":null}}),[y]),E=(0,p.useMemo)((()=>x?(0,_.jsx)(Ze.eB,{ref:m,name:"tooltip",mod:{align:C,theme:i},mix:R,style:Object.assign({},f,null!=a?a:{}),children:(0,_.jsx)(Ze.Sl,{name:"body",children:e})}):null),[x,f,e,R,m]),A=p.Children.only(t),T=(0,p.cloneElement)(A,Object.assign({},A.props,{ref:h}));return(0,p.useEffect)((()=>{x&&O(!0)}),[x]),(0,p.useEffect)((()=>{const e=s(u.current),t=()=>{!1!==o&&(j.current=window.setTimeout((()=>{j.current=void 0,w(!0)}),r))},n=()=>{!1!==o&&(j.current&&(j.current=window.clearTimeout(j.current)),O(!1))};return e&&(e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),window.addEventListener("scroll",n)),()=>{e&&(e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",n),window.removeEventListener("scroll",n))}}),[o,r]),or({onEnterFullscreen:()=>O(!1,!0),onExitFullscreen:()=>O(!1,!0)},[]),(0,_.jsxs)(_.Fragment,{children:[T,(0,g.createPortal)(E,document.body)]})}));ir.displayName="Tooltip";const ar=e=>(0,_.jsx)(Ze.eB,{name:"hint",tag:"sup",className:e.className,"data-copy":e.copy,style:e.style,children:e.children}),sr=JSON.parse('{"audio:back":{"key":"ctrl+b","mac":"command+b","description":"Back for one second"},"audio:playpause":{},"ts:grow-left":{"key":"left","description":"Increase region to the left"},"ts:grow-right":{"key":"right","description":"Increase region to the right"},"ts:shrink-left":{"key":"alt+left","description":"Decrease region on the left"},"ts:shrink-right":{"key":"alt+right","description":"Decrease region on the right"},"ts:grow-left-largre":{"key":"shift+left"},"ts:grow-right-largre":{"key":"shift+right"},"ts:shrink-left-largre":{"key":"shift+alt+left"},"ts:shrink-right-largre":{"key":"shift+alt+right"},"annotation:submit":{"key":"ctrl+enter","mac":"command+enter","description":"Submit annotation"},"annotation:skip":{"key":"ctrl+space","mac":"alt+enter","description":"Skip task"},"annotation:undo":{"key":"ctrl+z","mac":"command+z","description":"Undo"},"annotation:redo":{"key":"ctrl+shift+z","mac":"command+shift+z","description":"Redo"},"polygon:undo":{"key":"ctrl+z","mac":"command+z","description":"Undo"},"polygon:redo":{"key":"ctrl+shift+z","mac":"command+shift+z","description":"Redo"},"region:delete-all":{"key":"ctrl+backspace","mac":"command+backspace","description":"Delete all regions"},"region:focus":{"key":"enter","description":"Focus first focusable region"},"region:relation":{"key":"alt+r","description":"Create relation between regions"},"region:visibility":{"key":"alt+h","description":"Toggle selected region visibility"},"region:visibility-all":{"key":"ctrl+h","mac":"ctrl+h","description":"Toggle all regions visibility"},"region:lock":{"key":"alt+l","description":"Lock selected region"},"region:meta":{"key":"alt+m","description":"Edit selected region meta"},"region:unselect":{"key":"u","description":"Unselect region"},"region:exit":{"key":"escape","description":"Exit relation mode, unselect region"},"region:delete":{"key":"backspace","description":"Delete selected region"},"region:cycle":{"key":"alt+.","description":"Cycle through regions"},"region:duplicate":{"key":"ctrl+d","mac":"command+d","description":"Duplicate selected region"},"segment:delete":{"key":"delete","description":"Delete selected region"},"media:playpause":{"key":"alt+space","description":"Play/pause"},"media:step-backward":{"key":"alt+left","description":"Go one step back"},"media:step-forward":{"key":"alt+right","description":"Go one step forward"},"video:keyframe-backward":{"key":"ctrl+alt+left","description":"Go to previous keyframe"},"video:keyframe-forward":{"key":"ctrl+alt+right","description":"Go to next keyframe"},"video:backward":{"key":"alt+left","description":"Go back"},"video:rewind":{"key":"shift+ctrl+alt+left","description":"Go to first frame"},"video:forward":{"key":"shift+alt+right","description":"Go forward"},"video:fastforward":{"key":"shift+ctrl+alt+right","description":"Go to last frame"},"video:hop-backward":{"key":"shift+alt+left","description":"Hop Backward"},"video:hop-forward":{"key":"shift+alt+right","description":"Hop Forward"},"repeater:next-page":{"key":"alt+right","description":"Next Page"},"repeater:previous-page":{"key":"alt+left","description":"Previous Page"},"image:prev":{"key":"ctrl+left","mac":"command+left","description":"Previous Image"},"image:next":{"key":"ctrl+right","mac":"command+right","description":"Next Image"}}'),lr=["store","name","children"];if(!(0,O.VS)(O.xB)){const e=sr["image:prev"],t=sr["image:next"];e&&(e.key=e.mac="ctrl+a"),t&&(t.key=t.mac="ctrl+d")}const cr=["key","mac","description","modifier","modifierDescription"],dr=e=>{Object.entries(e).forEach((([e,t])=>{Object.keys(t).forEach((t=>{if(!cr.includes(t))throw new Error(`Unknown keymap property ${t} for key ${e}`)}))}))};dr(sr);const ur="__main__",hr="__input__",gr={},mr={},pr=[],fr={[ur]:{},[hr]:{}};qn().filter=e=>{var t;if("__none__"===qn().getScope())return!1;const n=null==(t=e.target||e.srcElement)?void 0:t.tagName;return e.keyCode>=96&&e.keyCode<=105&&(e=>{const t=e.keyCode-48;document.dispatchEvent(new KeyboardEvent("keydown",{keyCode:t}))})(e),n&&qn().setScope(/^(INPUT|TEXTAREA|SELECT)$/.test(n)?hr:ur),!0};const vr={plus:"=",minus:"-",",":"¼"},yr=(e="global",t="Hotkeys")=>{var n;let r={};mr[e]=null!=(n=mr[e])?n:{description:t,get keys(){return r},get descriptions(){const e=Object.keys(this.keys).reduce(((e,t)=>(gr[t]&&e.push([t,gr[t]]),e)),[]);return Object.fromEntries(e)}};const o=(t,n)=>{const r=fr[t];r&&r[n]&&(r[n]=r[n].filter((t=>t.namespace!==e)))},i=(e,t)=>{const n=fr[e];n&&n[t]&&n[t].forEach((n=>{qn()(t,e,n.func)}))},a=e=>[...e.replace(/\s/,"").matchAll(/((?:\w+\+)*(?:[^,]+|,)),?/g)].map((e=>e[1])),s=()=>{for(const e of[ur,hr])for(const t of Object.keys(r)){const n=a(t);for(const t of n)(0,O.VS)(O.M3)?(o(e,t),qn().unbind(t,e),i(e,t)):qn().unbind(t,e),delete gr[t]}r={}};return pr.push(s),{applyAliases:e=>a(e).map((e=>e.split("+").map((e=>{var t;return null!=(t=vr[e.trim()])?t:e})).join("+"))).join(","),addKey(t,n,o,i=ur){if(!(0,w.isDefined)(t))return;r[t]&&console.warn(`Key already added: ${t}. It's possibly a bug.`);const a=this.applyAliases(t.toLowerCase());r[a]=n,o&&(gr[a]=o),i.split(",").map((e=>e.trim())).filter(Boolean).forEach((t=>{const r=(...e)=>{const t=e[0];t.stopPropagation(),t.preventDefault(),n(...e)};(0,O.VS)(O.M3)&&((t,n,r)=>{(0,w.isDefined)(fr[t])||(fr[t]={});const o=fr[t];(0,w.isDefined)(o[n])||(o[n]=[]),o[n].push({namespace:e,func:r})})(t,a,r),qn()(a,t,r)}))},overwriteKey(e,t,n,r=ur){(0,w.isDefined)(e)&&(this.hasKey(e)&&this.removeKey(e,r),this.addKey(e,t,n,r))},removeKey(e,t=ur){if(!(0,w.isDefined)(e))return;const n=e.toLowerCase();this.hasKey(n)&&(t.split(",").map((e=>e.trim())).filter(Boolean).forEach((t=>{(0,O.VS)(O.M3)?(o(t,e),qn().unbind(n,t),i(t,e)):qn().unbind(n,t)})),delete r[n],delete gr[n])},addNamed(e,t,n){const r=yr.keymap[e];if(!(0,w.isDefined)(r))throw new Error(`Unknown named hotkey ${r}`);{var o;const e=(0,w.isMacOS)()&&null!=(o=r.mac)?o:r.key;this.addKey(e,t,r.description,n),r.modifier&&this.addKey(`${r.modifier}+${e}`,t,r.modifierDescription,n)}},removeNamed(e,t){const n=yr.keymap[e];if(!(0,w.isDefined)(n))throw new Error(`Unknown named hotkey ${n}`);{var r;const e=(0,w.isMacOS)()&&null!=(r=n.mac)?r:n.key;this.removeKey(e,t),n.modifier&&this.removeKey(`${n.modifier}+${e}`)}},overwriteNamed(e,t,n){const r=yr.keymap[e];if(!(0,w.isDefined)(r))throw new Error(`Unknown named hotkey ${e}`);{var o;const e=(0,w.isMacOS)()&&null!=(o=r.mac)?o:r.key;this.overwriteKey(e,t,r.description,n),r.modifier&&this.overwriteKey(`${r.modifier}+${e}`,t,r.modifierDescription,n)}},hasKey(e){if(!(0,w.isDefined)(e))return;const t=e.toLowerCase();return(0,w.isDefined)(r[t])},getKeys:()=>Object.keys(r),getNamespace:()=>mr[e],addDescription(e,t){r[e]||(gr[e]=t)},removeDescription(e){r||gr[e]},unbindAll(){s()},makeComb(){const e="1234567890qwetasdfgzxcvbyiopjklnm".split("");for(let t=0;t<=e.length;t++){let n;if(n=e[t],!{}.hasOwnProperty.call(r,n))return n}return null}}};yr.DEFAULT_SCOPE=ur,yr.INPUT_SCOPE=hr,yr.keymap=Object.assign({},sr),yr.setKeymap=e=>{dr(e),Object.assign(yr.keymap,e)},yr.keysDescipritions=()=>gr,yr.namespaces=()=>mr,yr.unbindAll=()=>{pr.forEach((e=>e()))},yr.setScope=e=>{qn().setScope(e)},yr.Tooltip=(0,y.WQ)("store")((0,y.PA)((e=>{let{store:t,name:n,children:r}=e,o=(0,Yn.A)(e,lr);const i=yr.keymap[n],a=t.settings.enableTooltips&&t.settings.enableHotkeys;if((0,w.isDefined)(i)){var s,l;const e=(0,w.isMacOS)()&&null!=(s=i.mac)?s:i.key,t=null!=(l=o.title)?l:i.description,n=[];return a&&e.split(",").forEach((e=>{const t=e.split("+").map((e=>(0,p.createElement)(Ze.Sl,{tag:"kbd",name:"key"},e)));n.push((0,p.createElement)(Ze.eB,{name:"key-group",tag:"span",style:{marginLeft:5}},...t))})),(0,p.createElement)(ir,Object.assign({},o,{theme:"light",title:(0,p.createElement)(p.Fragment,{},t,...n)}),r)}return r}))),yr.Hint=(0,y.WQ)("store")((0,y.PA)((({store:e,name:t})=>{const n=yr.keymap[t],r=e.settings.enableTooltips&&e.settings.enableHotkeys;if((0,w.isDefined)(n)&&r){var o;const e=(0,w.isMacOS)()&&null!=(o=n.mac)?o:n.key;return(0,p.createElement)(ar,{},[e])}return null})));function br(e,t){e=Number(e);const n=Math.floor(e/60);e%=60;let r=Math.round(e).toString();return t>=250?r=e.toFixed(2):t>=25&&(r=e.toFixed(1)),n>0?(e<10&&(r=`0${r}`),`${n}:${r}`):r}function xr(e){let t=1;return t=e>=2500?.01:e>=1e3?.025:e>=250?.1:e>=100?.25:e>=25?1:5*e>=25?5:15*e>=25?15:60*Math.ceil(.5/e),t}function wr(e){let t=1;return t=e>=2500?10:e>=1e3?4:e>=250?10:e>=100?4:e>=25?1:5*e>=25?5:15*e>=25?15:60*Math.ceil(.5/e),t}function Cr(e){return Math.floor(10/xr(e))}class Sr extends p.Component{constructor(e){super(e),this.onChangeZoom=e=>{this.setState(Object.assign({},this.state,{zoom:e})),this.wavesurfer.zoom(e)},this.onChangeZoomY=e=>{this.setState(Object.assign({},this.state,{zoomY:e}),this.updateZoomY)},this.updateZoomY=In()((()=>{this.wavesurfer.params.barHeight=this.state.zoomY,this.wavesurfer.drawBuffer()}),100),this.onChangeVolume=e=>{this.setState(Object.assign({},this.state,{volume:e})),this.wavesurfer.setVolume(e)},this.onChangeSpeed=e=>{this.setState(Object.assign({},this.state,{speed:e})),this.wavesurfer.setPlaybackRate(e)},this.onZoomPlus=(e,t=10)=>{let n=this.state.zoom;return n+=t,n>700&&(n=700),this.onChangeZoom(n),e&&e.preventDefault(),!1},this.onZoomMinus=(e,t=10)=>{let n=this.state.zoom;return n-=t,n<0&&(n=0),this.onChangeZoom(n),e.preventDefault(),!1},this.onZoomYPlus=(e,t=1)=>{let n=this.state.zoomY;return n+=t,n>50&&(n=50),this.onChangeZoomY(n),e.preventDefault(),!1},this.onZoomYMinus=(e,t=1)=>{let n=this.state.zoomY;return n-=t,n<1&&(n=1),this.onChangeZoomY(n),e&&e.preventDefault(),!1},this.onWheel=e=>{if(e&&!e.shiftKey)return;e&&e.shiftKey&&e.preventDefault();const t=e.deltaY>0?5:-5;this.onZoomPlus(e,t)},this.onBack=()=>{let e=this.wavesurfer.getCurrentTime();return!!e&&(e--,this.wavesurfer.setCurrentTime(e>0?e:0),!1)},this.setWaveformRef=e=>{this.$waveform=e},this.hotkeys=yr("Audio","Audio Segmentation"),this.state={src:this.props.src,pos:0,colors:{waveColor:"#97A0AF",progressColor:"#52c41a"},zoom:0,zoomY:1,speed:1,volume:e.muted?0:1}}componentDidMount(){const e=this.props.messages||Ge.A;let t={container:this.$waveform,waveColor:this.state.colors.waveColor,height:this.props.height,backend:"MediaElement",progressColor:this.state.colors.progressColor,splitChannels:!0,cursorWidth:this.props.cursorWidth,cursorColor:this.props.cursorColor,barHeight:1};this.props.regions&&(t=Object.assign({},t,{plugins:[Dn().create({dragSelection:{slop:5}}),Vn().create({container:"#timeline",formatTimeCallback:br,timeInterval:xr,primaryLabelInterval:wr,secondaryLabelInterval:Cr,primaryColor:"blue",secondaryColor:"blue",primaryFontColor:"#000",secondaryFontColor:"#000"}),Tn().create({wrapper:this.$waveform,showTime:!0,opacity:1})]})),this.wavesurfer=Bn().create(Object.assign({},t)),this.props.defaultVolume&&this.wavesurfer.setVolume(this.props.defaultVolume),this.props.muted&&this.wavesurfer.setVolume(0),this.props.defaultSpeed&&this.wavesurfer.setPlaybackRate(this.props.defaultSpeed),this.props.defaultZoom&&this.wavesurfer.zoom(this.props.defaultZoom),this.wavesurfer.on("error",(t=>{const n=String(t.message||t||""),r=this.props.src;let o=e.ERR_LOADING_AUDIO({attr:this.props.dataField,error:n,url:r});if(null!=n&&n.includes("HTTP")||null!=n&&n.includes("fetch"))this.wavesurfer.hadNetworkError=!0,o=e.ERR_LOADING_HTTP({attr:this.props.dataField,error:n,url:r});else if("string"==typeof t&&t.includes("media element")){if(this.wavesurfer.hadNetworkError)return;o="Error while processing audio. Check media format and availability."}this.props.onError&&this.props.onError(o)})),this.wavesurfer.load(this.props.src),this.wavesurfer.setPlaybackRate(this.state.speed);const n=this;this.props.regions&&(this.wavesurfer.on("region-mouseenter",(e=>{var t;null==(t=e._region)||t.onMouseOver()})),this.wavesurfer.on("region-mouseleave",(e=>{var t;null==(t=e._region)||t.onMouseLeave()})),this.wavesurfer.on("region-created",(e=>{n.props.item.annotation.history.setSkipNextUndoState();const t=n.props.addRegion(e);t&&(e._region=t,e.color=t.selectedregionbg,-1===e.channelIdx&&(e.channelIdx=t.channel),e.on("click",(e=>t.onClick(n.wavesurfer,e))),e.on("update-end",(()=>t.onUpdateEnd(n.wavesurfer))),e.on("dblclick",(()=>{window.setTimeout((()=>{e.play()}),0)})),e.on("out",(()=>{})))})));const r=document.querySelector("#slider");r&&(r.oninput=function(){n.wavesurfer.zoom(Number(this.value))}),this.wavesurfer.on("ready",(()=>{n.props.onCreate(this.wavesurfer),this.wavesurfer.container.onwheel=In()(this.onWheel,100)})),this.wavesurfer.on("waveform-ready",(()=>{var e,t;null==(e=(t=this.props).onReady)||e.call(t,this.wavesurfer)})),this.wavesurfer.on("pause",n.props.handlePlay),this.wavesurfer.on("play",n.props.handlePlay),this.wavesurfer.on("seek",n.props.handleSeek),this.props.regions&&this.props.onLoad(this.wavesurfer),this.hotkeys.addNamed("audio:back",this.onBack,`${yr.DEFAULT_SCOPE},${yr.INPUT_SCOPE}`)}componentWillUnmount(){this.hotkeys.unbindAll(),this.wavesurfer.unAll()}render(){return(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{id:"wave",ref:this.setWaveformRef,className:Hn}),(0,_.jsx)("div",{id:"timeline"}),this.props.zoom&&(0,_.jsxs)(Wn.A,{gutter:16,style:{marginTop:"1em"},children:[(0,_.jsx)($n.A,{flex:8,style:{textAlign:"right",marginTop:"6px"},children:(0,_.jsxs)("div",{style:{display:"flex"},children:[(0,_.jsx)("div",{style:{marginTop:"6px",marginRight:"5px"},children:(0,_.jsx)(ir,{placement:"topLeft",title:"Horizontal zoom out",children:(0,_.jsx)(Ln.A,{onClick:this.onZoomMinus,className:Fn})})}),(0,_.jsx)("div",{style:{width:"100%"},children:(0,_.jsx)(Un.A,{min:0,step:10,max:500,value:"number"==typeof this.state.zoom?this.state.zoom:0,onChange:e=>{this.onChangeZoom(e)}})}),(0,_.jsx)("div",{style:{marginTop:"6px",marginLeft:"5px"},children:(0,_.jsx)(ir,{placement:"topLeft",title:"Horizontal zoom in",children:(0,_.jsx)(Mn.A,{onClick:this.onZoomPlus,className:Fn})})})]})}),(0,_.jsx)($n.A,{flex:4,style:{textAlign:"right",marginTop:"6px"},children:(0,_.jsxs)("div",{style:{display:"flex"},children:[(0,_.jsx)("div",{style:{marginTop:"6px",marginRight:"5px"},children:(0,_.jsx)(ir,{placement:"topLeft",title:"Vertical zoom out",children:(0,_.jsx)(Ln.A,{onClick:this.onZoomYMinus,className:Fn})})}),(0,_.jsx)("div",{style:{width:"100%"},children:(0,_.jsx)(Un.A,{min:1,step:.1,max:50,value:"number"==typeof this.state.zoomY?this.state.zoomY:1,onChange:e=>{this.onChangeZoomY(e)}})}),(0,_.jsx)("div",{style:{marginTop:"6px",marginLeft:"5px"},children:(0,_.jsx)(ir,{placement:"topLeft",title:"Vertical zoom in",children:(0,_.jsx)(Mn.A,{onClick:this.onZoomYPlus,className:Fn})})})]})}),(0,_.jsx)($n.A,{flex:3,children:this.props.volume&&(0,_.jsxs)("div",{style:{display:"flex",marginTop:"6.5px"},children:[(0,_.jsx)("div",{style:{width:"100%"},children:(0,_.jsx)(Un.A,{min:0,max:1,step:.1,value:"number"==typeof this.state.volume?this.state.volume:1,onChange:e=>{this.onChangeVolume(e)}})}),(0,_.jsx)("div",{style:{marginLeft:"10px",marginTop:"5px"},children:(0,_.jsx)(Gn.A,{})})]})}),(0,_.jsx)($n.A,{flex:1,style:{marginTop:"6px"},children:this.props.speed&&(0,_.jsx)(Zn.A,{placeholder:"Speed",style:{width:"100%"},defaultValue:this.state.speed,onChange:this.onChangeSpeed,children:["0.5","0.75","1.0","1.25","1.5","2.0"].map((e=>(0,_.jsxs)(Zn.A.Option,{value:+e,children:["Speed ",e]},e)))})})]})]})}}var jr=n(76363),kr=n(52345),Or=n(53567);const Rr=(0,y.PA)((({item:e,store:t})=>(0,_.jsx)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"1em"},children:(0,_.jsxs)(jr.A,{type:"primary",onClick:()=>{e._ws.playPause()},children:[e.playing&&(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(kr.A,{})," ",(0,_.jsx)("span",{children:"Pause"}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)(ar,{children:["[",e.hotkey,"]"]})]}),!e.playing&&(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(Or.A,{})," ",(0,_.jsx)("span",{children:"Play"}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)(ar,{children:["[",e.hotkey,"]"]})]})]})}))),Er=(0,y.WQ)("store")((0,y.PA)((({store:e,item:t})=>{var n;if(!t._value)return null;const r=(0,h._$)(e).messages;return(0,_.jsx)(_n,{item:t,children:(0,_.jsxs)(p.Fragment,{children:[null==(n=t.errors)?void 0:n.map(((e,t)=>(0,_.jsx)(ke,{error:e},`err-${t}`))),(0,_.jsx)(Sr,{dataField:t.value,src:t._value,muted:t.muted,item:t,selectRegion:t.selectRegion,handlePlay:t.handlePlay,handleSeek:t.handleSeek,onCreate:t.wsCreated,addRegion:t.addRegion,onLoad:t.onLoad,onReady:t.onReady,onError:t.onError,speed:t.speed,zoom:t.zoom,defaultVolume:Number(t.defaultvolume),defaultSpeed:Number(t.defaultspeed),defaultZoom:Number(t.defaultzoom),volume:t.volume,regions:!0,height:t.height,cursorColor:t.cursorcolor,cursorWidth:t.cursorwidth,messages:r}),(0,_.jsx)(Rr,{item:t,store:e}),(0,_.jsx)("div",{style:{marginBottom:"4px"}})]})})}))),_r=e=>{const t=(0,p.useRef)(e);return(0,p.useEffect)((()=>{Object.assign(t.current,e)}),[e]),t.current},Ar=(0,p.createContext)({position:0,length:0,regions:[],step:10,playing:!1,settings:{},visibleWidth:0,seekOffset:0,data:void 0}),Tr=Ar.Provider;var Pr,Ir=["title","titleId"];function Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Kr=function(e,t){var n=e.title,r=e.titleId,o=Mr(e,Ir);return p.createElement("svg",Lr({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Pr||(Pr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.7071 6.29289C15.0976 6.68342 15.0976 7.31658 14.7071 7.70711L10.4142 12L14.7071 16.2929C15.0976 16.6834 15.0976 17.3166 14.7071 17.7071C14.3166 18.0976 13.6834 18.0976 13.2929 17.7071L8.29289 12.7071C7.90237 12.3166 7.90237 11.6834 8.29289 11.2929L13.2929 6.29289C13.6834 5.90237 14.3166 5.90237 14.7071 6.29289Z",fill:"black"})))},Dr=(0,p.forwardRef)(Kr);n.p;var Nr,Vr=["title","titleId"];function zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hr=function(e,t){var n=e.title,r=e.titleId,o=Br(e,Vr);return p.createElement("svg",zr({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Nr||(Nr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 6.29289C9.68342 5.90237 10.3166 5.90237 10.7071 6.29289L15.7071 11.2929C16.0976 11.6834 16.0976 12.3166 15.7071 12.7071L10.7071 17.7071C10.3166 18.0976 9.68342 18.0976 9.29289 17.7071C8.90237 17.3166 8.90237 16.6834 9.29289 16.2929L13.5858 12L9.29289 7.70711C8.90237 7.31658 8.90237 6.68342 9.29289 6.29289Z",fill:"black"})))},Fr=(0,p.forwardRef)(Hr);n.p;var Wr,$r,Ur=["title","titleId"];function Zr(){return Zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Yr=function(e,t){var n=e.title,r=e.titleId,o=Gr(e,Ur);return p.createElement("svg",Zr({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Wr||(Wr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2929 6.29289C12.6834 5.90237 13.3166 5.90237 13.7071 6.29289L18.7071 11.2929C19.0976 11.6834 19.0976 12.3166 18.7071 12.7071L13.7071 17.7071C13.3166 18.0976 12.6834 18.0976 12.2929 17.7071C11.9024 17.3166 11.9024 16.6834 12.2929 16.2929L16.5858 12L12.2929 7.70711C11.9024 7.31658 11.9024 6.68342 12.2929 6.29289Z",fill:"black"})),$r||($r=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L12.7071 11.2929C13.0976 11.6834 13.0976 12.3166 12.7071 12.7071L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L10.5858 12L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289Z",fill:"black"})))},Xr=(0,p.forwardRef)(Yr);n.p;var qr,Jr,Qr=["title","titleId"];function eo(){return eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var no=function(e,t){var n=e.title,r=e.titleId,o=to(e,Qr);return p.createElement("svg",eo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,qr||(qr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L13.4142 12L17.7071 16.2929C18.0976 16.6834 18.0976 17.3166 17.7071 17.7071C17.3166 18.0976 16.6834 18.0976 16.2929 17.7071L11.2929 12.7071C10.9024 12.3166 10.9024 11.6834 11.2929 11.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",fill:"black"})),Jr||(Jr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7071 6.29289C12.0976 6.68342 12.0976 7.31658 11.7071 7.70711L7.41421 12L11.7071 16.2929C12.0976 16.6834 12.0976 17.3166 11.7071 17.7071C11.3166 18.0976 10.6834 18.0976 10.2929 17.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929L10.2929 6.29289C10.6834 5.90237 11.3166 5.90237 11.7071 6.29289Z",fill:"black"})))},ro=(0,p.forwardRef)(no);n.p;var oo,io,ao=["title","titleId"];function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var co=function(e,t){var n=e.title,r=e.titleId,o=lo(e,ao);return p.createElement("svg",so({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,oo||(oo=p.createElement("rect",{x:15,y:5,width:2,height:14,rx:1,fill:"black"})),io||(io=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L12.7071 11.2929C13.0976 11.6834 13.0976 12.3166 12.7071 12.7071L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L10.5858 12L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289Z",fill:"black"})))},uo=(0,p.forwardRef)(co);n.p;n.p;var ho,go,mo,po,fo=["title","titleId"];function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var bo=function(e,t){var n=e.title,r=e.titleId,o=yo(e,fo);return p.createElement("svg",vo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ho||(ho=p.createElement("path",{d:"M6 11.9998C6 11.4475 6.44772 10.9998 7 10.9998H23C23.5523 10.9998 24 11.4475 24 11.9998C24 12.552 23.5523 12.9998 23 12.9998H7C6.44772 12.9998 6 12.552 6 11.9998Z",fill:"black",fillOpacity:.3})),go||(go=p.createElement("path",{d:"M14 12C14 11.4477 14.4477 11 15 11H23C23.5523 11 24 11.4477 24 12C24 12.5523 23.5523 13 23 13H15C14.4477 13 14 12.5523 14 12Z",fill:"black"})),mo||(mo=p.createElement("path",{d:"M18 8C18 7.44772 18.4477 7 19 7C19.5523 7 20 7.44772 20 8V16C20 16.5523 19.5523 17 19 17C18.4477 17 18 16.5523 18 16V8Z",fill:"black"})),po||(po=p.createElement("path",{d:"M2.82843 14.8284C1.49509 13.4951 0.828427 12.8284 0.828427 12C0.828427 11.1716 1.49509 10.5049 2.82843 9.17157L3.17157 8.82843C4.50491 7.49509 5.17157 6.82843 6 6.82843C6.82843 6.82843 7.49509 7.49509 8.82843 8.82843L9.17157 9.17157C10.5049 10.5049 11.1716 11.1716 11.1716 12C11.1716 12.8284 10.5049 13.4951 9.17157 14.8284L8.82843 15.1716C7.49509 16.5049 6.82843 17.1716 6 17.1716C5.17157 17.1716 4.50491 16.5049 3.17157 15.1716L2.82843 14.8284Z",fill:"black"})))},xo=(0,p.forwardRef)(bo);n.p;var wo,Co,So,jo=["title","titleId"];function ko(){return ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ro=function(e,t){var n=e.title,r=e.titleId,o=Oo(e,jo);return p.createElement("svg",ko({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,wo||(wo=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7348 12.9998H23C23.5523 12.9998 24 12.552 24 11.9998C24 11.4475 23.5523 10.9998 23 10.9998H18.7348L19.7348 12.9998ZM14.2627 10.9998H7C6.44772 10.9998 6 11.4475 6 11.9998C6 12.552 6.44772 12.9998 7 12.9998H15.2627L14.2627 10.9998Z",fill:"black"})),Co||(Co=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.553 5.10558C14.047 4.85859 14.6477 5.05881 14.8946 5.55279L20.8946 17.5528C21.1416 18.0468 20.9414 18.6474 20.4474 18.8944C19.9535 19.1414 19.3528 18.9412 19.1058 18.4472L13.1058 6.44722C12.8588 5.95324 13.059 5.35257 13.553 5.10558Z",fill:"#DD0000"})),So||(So=p.createElement("path",{d:"M2.82843 14.8284C1.49509 13.4951 0.828427 12.8284 0.828427 12C0.828427 11.1716 1.49509 10.5049 2.82843 9.17157L3.17157 8.82843C4.50491 7.49509 5.17157 6.82843 6 6.82843C6.82843 6.82843 7.49509 7.49509 8.82843 8.82843L9.17157 9.17157C10.5049 10.5049 11.1716 11.1716 11.1716 12C11.1716 12.8284 10.5049 13.4951 9.17157 14.8284L8.82843 15.1716C7.49509 16.5049 6.82843 17.1716 6 17.1716C5.17157 17.1716 4.50491 16.5049 3.17157 15.1716L2.82843 14.8284Z",fill:"black"})))},Eo=(0,p.forwardRef)(Ro);n.p;var _o,Ao=["title","titleId"];function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Io=function(e,t){var n=e.title,r=e.titleId,o=Po(e,Ao);return p.createElement("svg",To({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,_o||(_o=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.74268 16.2426C3.74268 14.2426 2.74268 13.2426 2.74268 12C2.74268 10.7574 3.74268 9.75736 5.74268 7.75736L7.75739 5.74265C9.75739 3.74265 10.7574 2.74265 12 2.74265C13.2427 2.74265 14.2427 3.74265 16.2427 5.74265L18.2574 7.75736C20.2574 9.75736 21.2574 10.7574 21.2574 12C21.2574 13.2426 20.2574 14.2426 18.2574 16.2426L16.2427 18.2574C14.2427 20.2574 13.2427 21.2574 12 21.2574C10.7574 21.2574 9.75739 20.2574 7.75739 18.2574L5.74268 16.2426ZM12 17C11.4477 17 11 16.5523 11 16V13H8C7.44771 13 7 12.5523 7 12C7 11.4477 7.44771 11 8 11H11V8C11 7.44772 11.4477 7 12 7C12.5523 7 13 7.44772 13 8V11H16C16.5523 11 17 11.4477 17 12C17 12.5523 16.5523 13 16 13H13V16C13 16.5523 12.5523 17 12 17Z",fill:"black"})))},Lo=(0,p.forwardRef)(Io);n.p;var Mo,Ko=["title","titleId"];function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vo=function(e,t){var n=e.title,r=e.titleId,o=No(e,Ko);return p.createElement("svg",Do({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Mo||(Mo=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.74268 12C2.74268 13.2426 3.74268 14.2426 5.74268 16.2426L7.75739 18.2574C9.75739 20.2574 10.7574 21.2574 12 21.2574C13.2427 21.2574 14.2427 20.2574 16.2427 18.2574L18.2574 16.2426C20.2574 14.2426 21.2574 13.2426 21.2574 12C21.2574 10.7574 20.2574 9.75736 18.2574 7.75736L16.2427 5.74265C14.2427 3.74265 13.2427 2.74265 12 2.74265C10.7574 2.74265 9.75739 3.74265 7.75739 5.74265L5.74268 7.75736C3.74268 9.75736 2.74268 10.7574 2.74268 12ZM8 11C7.44771 11 7 11.4477 7 12C7 12.5523 7.44771 13 8 13H16C16.5523 13 17 12.5523 17 12C17 11.4477 16.5523 11 16 11H8Z",fill:"#DD0000"})))},zo=(0,p.forwardRef)(Vo);n.p;n.p;var Bo,Ho=["title","titleId"];function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $o=function(e,t){var n=e.title,r=e.titleId,o=Wo(e,Ho);return p.createElement("svg",Fo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Bo||(Bo=p.createElement("path",{d:"M6 8.12954C6 5.84608 6 4.70434 6.74273 4.26996C7.48546 3.83557 8.48057 4.39532 10.4708 5.51482L17.3516 9.38527C19.4108 10.5436 20.4404 11.1227 20.4404 12C20.4404 12.8773 19.4108 13.4564 17.3516 14.6147L10.4708 18.4852C8.48057 19.6047 7.48546 20.1644 6.74273 19.73C6 19.2957 6 18.1539 6 15.8705V8.12954Z",fill:"black"})))},Uo=(0,p.forwardRef)($o);n.p;var Zo,Go,Yo=["title","titleId"];function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jo=function(e,t){var n=e.title,r=e.titleId,o=qo(e,Yo);return p.createElement("svg",Xo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Zo||(Zo=p.createElement("rect",{x:14,y:4,width:5,height:16,rx:1.5,fill:"black"})),Go||(Go=p.createElement("rect",{x:5,y:4,width:5,height:16,rx:1.5,fill:"black"})))},Qo=(0,p.forwardRef)(Jo);n.p;var ei,ti,ni=["title","titleId"];function ri(){return ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ii=function(e,t){var n=e.title,r=e.titleId,o=oi(e,ni);return p.createElement("svg",ri({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ei||(ei=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L13.4142 12L17.7071 16.2929C18.0976 16.6834 18.0976 17.3166 17.7071 17.7071C17.3166 18.0976 16.6834 18.0976 16.2929 17.7071L11.2929 12.7071C10.9024 12.3166 10.9024 11.6834 11.2929 11.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",fill:"black"})),ti||(ti=p.createElement("rect",{x:7,y:5,width:2,height:14,rx:1,fill:"black"})))},ai=(0,p.forwardRef)(ii);n.p;n.p;var si,li,ci,di,ui=["title","titleId"];function hi(){return hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mi=function(e,t){var n=e.title,r=e.titleId,o=gi(e,ui);return p.createElement("svg",hi({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,si||(si=p.createElement("path",{d:"M9 5C9 4.44772 8.55228 4 8 4H6C5.05719 4 4.58579 4 4.29289 4.29289C4 4.58579 4 5.05719 4 6V8C4 8.55228 4.44772 9 5 9C5.55228 9 6 8.55228 6 8V6H8C8.55228 6 9 5.55228 9 5Z",fill:"black"})),li||(li=p.createElement("path",{d:"M16 6C15.4477 6 15 5.55228 15 5C15 4.44772 15.4477 4 16 4H18C18.9428 4 19.4142 4 19.7071 4.29289C20 4.58579 20 5.05719 20 6V8C20 8.55228 19.5523 9 19 9C18.4477 9 18 8.55228 18 8V6H16Z",fill:"black"})),ci||(ci=p.createElement("path",{d:"M15 19C15 18.4477 15.4477 18 16 18H18V16C18 15.4477 18.4477 15 19 15C19.5523 15 20 15.4477 20 16V18C20 18.9428 20 19.4142 19.7071 19.7071C19.4142 20 18.9428 20 18 20H16C15.4477 20 15 19.5523 15 19Z",fill:"black"})),di||(di=p.createElement("path",{d:"M5 15C5.55228 15 6 15.4477 6 16V18H8C8.55228 18 9 18.4477 9 19C9 19.5523 8.55228 20 8 20H6C5.05719 20 4.58579 20 4.29289 19.7071C4 19.4142 4 18.9428 4 18V16C4 15.4477 4.44772 15 5 15Z",fill:"black"})))},pi=(0,p.forwardRef)(mi);n.p;var fi,vi,yi,bi,xi=["title","titleId"];function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Si=function(e,t){var n=e.title,r=e.titleId,o=Ci(e,xi);return p.createElement("svg",wi({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fi||(fi=p.createElement("path",{d:"M20 16C20 15.4477 19.5523 15 19 15H17C16.0572 15 15.5858 15 15.2929 15.2929C15 15.5858 15 16.0572 15 17V19C15 19.5523 15.4477 20 16 20C16.5523 20 17 19.5523 17 19V17H19C19.5523 17 20 16.5523 20 16Z",fill:"black"})),vi||(vi=p.createElement("path",{d:"M5 17C4.44772 17 4 16.5523 4 16C4 15.4477 4.44772 15 5 15H7C7.94281 15 8.41421 15 8.70711 15.2929C9 15.5858 9 16.0572 9 17V19C9 19.5523 8.55228 20 8 20C7.44772 20 7 19.5523 7 19V17H5Z",fill:"black"})),yi||(yi=p.createElement("path",{d:"M4 8C4 7.44772 4.44772 7 5 7H7V5C7 4.44772 7.44772 4 8 4C8.55228 4 9 4.44772 9 5V7C9 7.94281 9 8.41421 8.70711 8.70711C8.41421 9 7.94281 9 7 9H5C4.44772 9 4 8.55228 4 8Z",fill:"black"})),bi||(bi=p.createElement("path",{d:"M16 4C16.5523 4 17 4.44772 17 5V7H19C19.5523 7 20 7.44772 20 8C20 8.55228 19.5523 9 19 9H17C16.0572 9 15.5858 9 15.2929 8.70711C15 8.41421 15 7.94281 15 7V5C15 4.44772 15.4477 4 16 4Z",fill:"black"})))},ji=(0,p.forwardRef)(Si);n.p;var ki,Oi=["title","titleId"];function Ri(){return Ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _i=function(e,t){var n=e.title,r=e.titleId,o=Ei(e,Oi);return p.createElement("svg",Ri({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ki||(ki=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.89441 8.94725C6.52587 5.68422 11.4741 5.68428 13.1055 8.94726C13.3525 9.44124 13.9532 9.64147 14.4472 9.39448C14.9412 9.14749 15.1414 8.54681 14.8944 8.05284C12.5259 3.31582 5.47408 3.31562 3.10554 8.05285C2.85856 8.54683 3.05879 9.1475 3.55277 9.39448C4.04675 9.64147 4.64743 9.44123 4.89441 8.94725ZM8.99998 8C7.61926 8 6.49997 9.11929 6.49997 10.5C6.49997 11.8807 7.61926 13 8.99998 13C10.3807 13 11.5 11.8807 11.5 10.5C11.5 9.11929 10.3807 8 8.99998 8Z",fill:"currentColor"})))},Ai=(0,p.forwardRef)(_i);n.p;var Ti,Pi=["title","titleId"];function Ii(){return Ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mi=function(e,t){var n=e.title,r=e.titleId,o=Li(e,Pi);return p.createElement("svg",Ii({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ti||(Ti=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.89445 6.55277C6.52591 9.81581 11.4741 9.81575 13.1056 6.55276C13.3526 6.05878 13.9532 5.85856 14.4472 6.10555C14.9412 6.35254 15.1414 6.95321 14.8944 7.44719C14.6733 7.88947 14.4113 8.29047 14.1162 8.65016L14.9106 9.34931C15.3252 9.71417 15.3656 10.346 15.0007 10.7607C14.6359 11.1753 14.004 11.2156 13.5894 10.8507L12.6023 9.98207C12.4772 10.0606 12.3497 10.1346 12.22 10.204L12.6444 11.0528C12.8914 11.5468 12.6912 12.1475 12.1972 12.3945C11.7032 12.6414 11.1026 12.4412 10.8556 11.9472L10.3193 10.8747C10.2125 10.8952 10.1052 10.9132 9.99751 10.9287C9.99917 10.9523 10 10.9761 10 11V12C10 12.5523 9.5523 13 9.00001 13C8.44773 13 8.00001 12.5523 8.00001 12V11C8.00001 10.9761 8.00086 10.9523 8.00252 10.9287C7.89486 10.9133 7.78755 10.8952 7.68071 10.8747L7.14444 11.9472C6.89745 12.4412 6.29678 12.6414 5.8028 12.3945C5.30882 12.1475 5.1086 11.5468 5.35559 11.0528L5.77996 10.2041C5.65033 10.1346 5.52283 10.0606 5.39773 9.9821L4.41064 10.8507C3.99603 11.2156 3.36415 11.1753 2.9993 10.7607C2.63444 10.346 2.67478 9.71417 3.08938 9.34931L3.88386 8.65018C3.58869 8.29047 3.32672 7.88947 3.10558 7.44718C2.8586 6.95319 3.05883 6.35252 3.55281 6.10554C4.04679 5.85856 4.64746 6.05879 4.89445 6.55277Z",fill:"currentColor"})))},Ki=(0,p.forwardRef)(Mi);n.p;n.p;var Di,Ni,Vi,zi=["title","titleId"];function Bi(){return Bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fi=function(e,t){var n=e.title,r=e.titleId,o=Hi(e,zi);return p.createElement("svg",Bi({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Di||(Di=p.createElement("rect",{x:2,y:5,width:20,height:14,rx:1.5,fill:"white",stroke:"black",strokeWidth:2})),Ni||(Ni=p.createElement("path",{d:"M1 11H23V18H1V11Z",fill:"black",fillOpacity:.15})),Vi||(Vi=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7071 10.2928C16.0976 10.6834 16.0976 11.3165 15.7071 11.707L12.7072 14.7069C12.3166 15.0975 11.6835 15.0975 11.293 14.7069L8.29296 11.7071C7.90243 11.3165 7.90242 10.6834 8.29294 10.2928C8.68345 9.90232 9.31662 9.9023 9.70715 10.2928L12 12.5856L14.2928 10.2928C14.6834 9.90231 15.3165 9.90231 15.7071 10.2928Z",fill:"black"})))},Wi=(0,p.forwardRef)(Fi);n.p;var $i,Ui,Zi,Gi=["title","titleId"];function Yi(){return Yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qi=function(e,t){var n=e.title,r=e.titleId,o=Xi(e,Gi);return p.createElement("svg",Yi({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,$i||($i=p.createElement("rect",{x:2,y:5,width:20,height:14,rx:1.5,fill:"white",stroke:"black",strokeWidth:2})),Ui||(Ui=p.createElement("path",{d:"M1 11H23V18H1V11Z",fill:"black",fillOpacity:.15})),Zi||(Zi=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 8.99988C12.2652 8.99988 12.5196 9.10525 12.7071 9.2928L15.707 12.2929C16.0975 12.6835 16.0975 13.3166 15.707 13.7071C15.3164 14.0976 14.6833 14.0976 14.2927 13.7071L12 11.4141L9.70712 13.7071C9.3166 14.0976 8.68343 14.0976 8.2929 13.7071C7.90237 13.3166 7.90236 12.6834 8.29288 12.2929L11.2929 9.29278C11.4804 9.10524 11.7348 8.99987 12 8.99988Z",fill:"black"})))},Ji=(0,p.forwardRef)(qi);n.p;var Qi,ea,ta=["title","titleId"];function na(){return na=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var oa=function(e,t){var n=e.title,r=e.titleId,o=ra(e,ta);return p.createElement("svg",na({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Qi||(Qi=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7071 6.29289C20.0976 6.68342 20.0976 7.31658 19.7071 7.70711L15.4142 12L19.7071 16.2929C20.0976 16.6834 20.0976 17.3166 19.7071 17.7071C19.3166 18.0976 18.6834 18.0976 18.2929 17.7071L13.2929 12.7071C12.9024 12.3166 12.9024 11.6834 13.2929 11.2929L18.2929 6.29289C18.6834 5.90237 19.3166 5.90237 19.7071 6.29289Z",fill:"black"})),ea||(ea=p.createElement("path",{d:"M5 14C4.11744 13.1174 3.67615 12.6762 3.62737 12.1346C3.6193 12.045 3.6193 11.955 3.62737 11.8654C3.67615 11.3238 4.11744 10.8826 5 10C5.88256 9.11744 6.32385 8.67615 6.86543 8.62737C6.95496 8.6193 7.04504 8.6193 7.13457 8.62737C7.67615 8.67615 8.11744 9.11744 9 10C9.88256 10.8826 10.3238 11.3238 10.3726 11.8654C10.3807 11.955 10.3807 12.045 10.3726 12.1346C10.3238 12.6762 9.88256 13.1174 9 14C8.11744 14.8826 7.67615 15.3238 7.13457 15.3726C7.04504 15.3807 6.95496 15.3807 6.86543 15.3726C6.32385 15.3238 5.88256 14.8826 5 14Z",fill:"black"})))},ia=(0,p.forwardRef)(oa);n.p;var aa,sa,la=["title","titleId"];function ca(){return ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ua=function(e,t){var n=e.title,r=e.titleId,o=da(e,la);return p.createElement("svg",ca({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,aa||(aa=p.createElement("path",{d:"M15 14C14.1174 13.1174 13.6762 12.6762 13.6274 12.1346C13.6193 12.045 13.6193 11.955 13.6274 11.8654C13.6762 11.3238 14.1174 10.8826 15 10C15.8826 9.11744 16.3238 8.67615 16.8654 8.62737C16.955 8.6193 17.045 8.6193 17.1346 8.62737C17.6762 8.67615 18.1174 9.11744 19 10C19.8826 10.8826 20.3238 11.3238 20.3726 11.8654C20.3807 11.955 20.3807 12.045 20.3726 12.1346C20.3238 12.6762 19.8826 13.1174 19 14C18.1174 14.8826 17.6762 15.3238 17.1346 15.3726C17.045 15.3807 16.955 15.3807 16.8654 15.3726C16.3238 15.3238 15.8826 14.8826 15 14Z",fill:"black"})),sa||(sa=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.29289 6.29289C4.68342 5.90237 5.31658 5.90237 5.70711 6.29289L10.7071 11.2929C11.0976 11.6834 11.0976 12.3166 10.7071 12.7071L5.70711 17.7071C5.31658 18.0976 4.68342 18.0976 4.29289 17.7071C3.90237 17.3166 3.90237 16.6834 4.29289 16.2929L8.58579 12L4.29289 7.70711C3.90237 7.31658 3.90237 6.68342 4.29289 6.29289Z",fill:"black"})))},ha=(0,p.forwardRef)(ua);n.p;var ga,ma=["title","titleId"];function pa(){return pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var va=function(e,t){var n=e.title,r=e.titleId,o=fa(e,ma);return p.createElement("svg",pa({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ga||(ga=p.createElement("path",{d:"M11.76 7.62664C11.7867 7.42664 11.8 7.21998 11.8 6.99998C11.8 6.78664 11.7867 6.57331 11.7533 6.37331L13.1067 5.31998C13.2267 5.22664 13.26 5.04664 13.1867 4.91331L11.9067 2.69998C11.8267 2.55331 11.66 2.50664 11.5133 2.55331L9.91999 3.19331C9.58666 2.93998 9.23333 2.72664 8.83999 2.56664L8.59999 0.873309C8.57333 0.713309 8.43999 0.599976 8.27999 0.599976H5.71999C5.55999 0.599976 5.43332 0.713309 5.40666 0.873309L5.16666 2.56664C4.77333 2.72664 4.41333 2.94664 4.08666 3.19331L2.49332 2.55331C2.34666 2.49998 2.17999 2.55331 2.09999 2.69998L0.826658 4.91331C0.746658 5.05331 0.773325 5.22664 0.906658 5.31998L2.25999 6.37331C2.22666 6.57331 2.19999 6.79331 2.19999 6.99998C2.19999 7.20664 2.21333 7.42664 2.24666 7.62664L0.893325 8.67998C0.773325 8.77331 0.739992 8.95331 0.813325 9.08664L2.09333 11.3C2.17333 11.4466 2.33999 11.4933 2.48666 11.4466L4.07999 10.8066C4.41333 11.06 4.76666 11.2733 5.15999 11.4333L5.39999 13.1266C5.43333 13.2866 5.55999 13.4 5.71999 13.4H8.27999C8.43999 13.4 8.57333 13.2866 8.59333 13.1266L8.83333 11.4333C9.22666 11.2733 9.58666 11.06 9.91333 10.8066L11.5067 11.4466C11.6533 11.5 11.82 11.4466 11.9 11.3L13.18 9.08664C13.26 8.93998 13.2267 8.77331 13.1 8.67998L11.76 7.62664ZM6.99999 9.39998C5.67999 9.39998 4.59999 8.31998 4.59999 6.99998C4.59999 5.67998 5.67999 4.59998 6.99999 4.59998C8.31999 4.59998 9.39999 5.67998 9.39999 6.99998C9.39999 8.31998 8.31999 9.39998 6.99999 9.39998Z",fill:"currentColor",fillOpacity:.8})))},ya=(0,p.forwardRef)(va);n.p;var ba,xa=["title","titleId"];function wa(){return wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sa=function(e,t){var n=e.title,r=e.titleId,o=Ca(e,xa);return p.createElement("svg",wa({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ba||(ba=p.createElement("path",{d:"M0 3.99999V7.99999H2.66667L6 11.3333V0.666654L2.66667 3.99999H0ZM9 5.99999C9 4.81999 8.32 3.80665 7.33333 3.31332V8.67999C8.32 8.19332 9 7.17999 9 5.99999ZM7.33333 0.15332V1.52665C9.26 2.09999 10.6667 3.88665 10.6667 5.99999C10.6667 8.11332 9.26 9.89999 7.33333 10.4733V11.8467C10.0067 11.24 12 8.85332 12 5.99999C12 3.14665 10.0067 0.759987 7.33333 0.15332Z",fill:"currentColor",fillOpacity:.8})))},ja=(0,p.forwardRef)(Sa);n.p;var ka,Oa=["title","titleId"];function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _a=function(e,t){var n=e.title,r=e.titleId,o=Ea(e,Oa);return p.createElement("svg",Ra({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ka||(ka=p.createElement("path",{d:"M9 6C9 4.82 8.32 3.80667 7.33333 3.31333V4.78667L8.96667 6.42C8.98667 6.28667 9 6.14667 9 6ZM10.6667 6C10.6667 6.62667 10.5333 7.21333 10.3067 7.76L11.3133 8.76667C11.7533 7.94 12 7 12 6C12 3.14667 10.0067 0.76 7.33333 0.153333V1.52667C9.26 2.1 10.6667 3.88667 10.6667 6ZM0.846667 0L0 0.846667L3.15333 4H0V8H2.66667L6 11.3333V6.84667L8.83333 9.68C8.38667 10.0267 7.88667 10.3 7.33333 10.4667V11.84C8.25333 11.6333 9.08667 11.2067 9.79333 10.6333L11.1533 12L12 11.1533L0.846667 0ZM6 0.666667L4.60667 2.06L6 3.45333V0.666667Z",fill:"currentColor",fillOpacity:.8})))},Aa=(0,p.forwardRef)(_a);n.p;var Ta,Pa=["title","titleId"];function Ia(){return Ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ma=function(e,t){var n=e.title,r=e.titleId,o=La(e,Pa);return p.createElement("svg",Ia({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ta||(Ta=p.createElement("path",{d:"M6.33325 3.66671H7.66659V5.00004H6.33325V3.66671ZM6.33325 6.33337H7.66659V10.3334H6.33325V6.33337ZM6.99992 0.333374C3.31992 0.333374 0.333252 3.32004 0.333252 7.00004C0.333252 10.68 3.31992 13.6667 6.99992 13.6667C10.6799 13.6667 13.6666 10.68 13.6666 7.00004C13.6666 3.32004 10.6799 0.333374 6.99992 0.333374ZM6.99992 12.3334C4.05992 12.3334 1.66659 9.94004 1.66659 7.00004C1.66659 4.06004 4.05992 1.66671 6.99992 1.66671C9.93992 1.66671 12.3333 4.06004 12.3333 7.00004C12.3333 9.94004 9.93992 12.3334 6.99992 12.3334Z",fill:"currentColor",fillOpacity:.8})))},Ka=(0,p.forwardRef)(Ma);n.p;const Da=yr(),Na=(e,t)=>{const n=(0,p.useRef)(null),r=(0,p.useRef)(t),o=(0,p.useRef)(((e,t)=>{null==r.current||r.current(e,t)}));(0,p.useEffect)((()=>{var t;e!==n.current&&(e?(((e,t)=>{yr.keymap[e]?Da.overwriteNamed(e,t):Da.overwriteKey(e,t)})(e,o.current),n.current=e):n.current&&!e&&(t=n.current,yr.keymap[t]?Da.removeNamed(t):Da.removeKey(t),n.current=null))}),[e]),(0,p.useEffect)((()=>{r.current=t}),[t])},Va=["children","type","extra","className","size","waiting","icon","tag","look","primary","danger","hotkey","tooltip","tooltipTheme","nopadding"],za=(0,p.forwardRef)(((e,t)=>{let{children:n,type:r,extra:o,className:i,size:a,waiting:s,icon:l,tag:c,look:d,primary:u,danger:h,hotkey:g,tooltip:m,tooltipTheme:f="light",nopadding:v}=e,y=(0,Yn.A)(e,Va);const b=null!=c?c:y.href?"a":"button",x={size:a,waiting:s,type:r,danger:h,nopadding:v,look:null!=d?d:[],withIcon:!!l,withExtra:!!o};u&&(x.look="primary");const C=(0,p.useMemo)((()=>{if(!l)return null;if((0,w.isDefined)(l.props.size))return l;switch(a){case"small":return(0,p.cloneElement)(l,Object.assign({},l.props,{size:12,width:12,height:12}));case"compact":return(0,p.cloneElement)(l,Object.assign({},l.props,{size:14,width:14,height:14}));default:return l}}),[l,a]);Na(g,y.onClick);const S=(0,_.jsx)(Ze.eB,Object.assign({name:"button",mod:x,mix:i,ref:t,tag:b,type:r},y,{children:(0,_.jsxs)(_.Fragment,{children:[C&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"icon",children:C}),C&&n?(0,_.jsx)("span",{children:n}):n,void 0!==o?(0,_.jsx)(Ze.Sl,{name:"extra",children:o}):null]})}));return g&&(0,w.isDefined)(yr.keymap[g])?(0,_.jsx)(yr.Tooltip,{name:g,title:m,children:S}):m?(0,_.jsx)(ir,{title:m,theme:f,ref:t,children:S}):S}));za.displayName="Button";za.Group=({className:e,children:t,collapsed:n})=>(0,_.jsx)(Ze.eB,{name:"button-group",mod:{collapsed:n},mix:e,children:t});const Ba=["direction","size","className","style","children","spread","stretch","align","collapsed","truncated"],{Block:Ha}=(0,Ze.JE)(),Fa=e=>{let{direction:t="horizontal",size:n,className:r,style:o,children:i,spread:a,stretch:s,align:l,collapsed:c,truncated:d}=e,u=(0,Yn.A)(e,Ba);return(0,_.jsx)(Ha,Object.assign({name:"space",mod:{direction:t,size:n,spread:a,stretch:s,align:l,collapsed:c,truncated:d},mix:r,style:o},u,{children:i}))},Wa=({position:e=0,length:t=0,onPositionChange:n})=>{const[r,o]=(0,p.useState)(!1),i=(0,p.useMemo)((()=>t-1),[t]);return(0,_.jsx)(Ze.eB,{name:"frames-control",onClick:()=>o(!0),children:r?(0,_.jsx)(Ua,{length:i,position:e,onChange:e=>{null==n||n((0,w.clamp)(e,0,t))},onFinishEditing:()=>{o(!1)}}):(0,_.jsxs)(_.Fragment,{children:[(0,w.clamp)(Math.round(e+1),1,i+1)," ",(0,_.jsxs)("span",{children:["of ",i+1]})]})})},$a=["ArrowUp","ArrowDown","Backspace","Delete","Enter",/[0-9]/],Ua=({length:e,position:t,onChange:n,onFinishEditing:r})=>{const o=(0,p.useRef)(),i=t=>{null==n||n((0,w.clamp)(t,1,e))};return(0,_.jsx)("input",{type:"text",ref:o,defaultValue:t+1,autoFocus:!0,onFocus:()=>{var e;return null==(e=o.current)?void 0:e.select()},onKeyDown:t=>{const n=$a.find((e=>e instanceof RegExp?e.test(t.key):e===t.key));n||t.metaKey||t.preventDefault();const a=Number.parseInt(o.current.value),s=t.shiftKey?10:1;"Enter"===t.key?(null==i||i(a),null==r||r()):"Escape"===t.key?null==r||r():"ArrowUp"===n?(o.current.value=(0,w.clamp)(a+s,1,e).toString(),t.preventDefault()):"ArrowDown"===n&&(o.current.value=(0,w.clamp)(a-s,1,e).toString(),t.preventDefault())},onBlur:()=>null==r?void 0:r()})};var Za,Ga,Ya=["title","titleId"];function Xa(){return Xa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ja=function(e,t){var n=e.title,r=e.titleId,o=qa(e,Ya);return p.createElement("svg",Xa({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Za||(Za=p.createElement("path",{d:"M15 24H19C21.7614 24 24 21.7614 24 19V19C24 16.2386 21.7614 14 19 14H13",stroke:"currentColor",strokeWidth:2})),Ga||(Ga=p.createElement("path",{d:"M16 10L12 14L16 18",stroke:"currentColor",strokeWidth:2})))},Qa=(0,p.forwardRef)(Ja);n.p;var es,ts,ns=["title","titleId"];function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var is=function(e,t){var n=e.title,r=e.titleId,o=os(e,ns);return p.createElement("svg",rs({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,es||(es=p.createElement("path",{d:"M21 24H17C14.2386 24 12 21.7614 12 19V19C12 16.2386 14.2386 14 17 14H23",stroke:"currentColor",strokeWidth:2})),ts||(ts=p.createElement("path",{d:"M20 10L24 14L20 18",stroke:"currentColor",strokeWidth:2})))},as=(0,p.forwardRef)(is);n.p;var ss,ls=["title","titleId"];function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var us=function(e,t){var n=e.title,r=e.titleId,o=ds(e,ls);return p.createElement("svg",cs({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ss||(ss=p.createElement("path",{opacity:.9,d:"M12.4644 12.4645C12.333 12.5959 12.2673 12.6616 12.2235 12.7271C12.0437 12.9962 12.0437 13.347 12.2235 13.616C12.2673 13.6816 12.333 13.7473 12.4644 13.8787L16.5857 18L12.4644 22.1213C12.3329 22.2528 12.2672 22.3185 12.2234 22.384C12.0437 22.653 12.0437 23.0039 12.2234 23.2729C12.2672 23.3384 12.3329 23.4041 12.4644 23.5356C12.5958 23.667 12.6615 23.7327 12.727 23.7765C12.996 23.9562 13.3469 23.9562 13.6159 23.7765C13.6814 23.7327 13.7471 23.667 13.8786 23.5356L17.9999 19.4142L22.1213 23.5355C22.2527 23.667 22.3184 23.7327 22.3839 23.7765C22.6529 23.9562 23.0038 23.9562 23.2728 23.7765C23.3383 23.7327 23.404 23.667 23.5355 23.5355C23.6669 23.4041 23.7326 23.3384 23.7764 23.2729C23.9561 23.0039 23.9561 22.653 23.7764 22.384C23.7326 22.3185 23.6669 22.2528 23.5355 22.1213L19.4141 18L23.5354 13.8787C23.6669 13.7473 23.7326 13.6816 23.7763 13.6161C23.9561 13.347 23.9561 12.9962 23.7763 12.7271C23.7326 12.6616 23.6669 12.5959 23.5354 12.4645C23.404 12.3331 23.3383 12.2674 23.2728 12.2236C23.0037 12.0438 22.6529 12.0438 22.3839 12.2236C22.3184 12.2674 22.2526 12.3331 22.1212 12.4645L17.9999 16.5858L13.8786 12.4645C13.7472 12.3331 13.6815 12.2673 13.616 12.2236C13.3469 12.0438 12.9961 12.0438 12.727 12.2236C12.6615 12.2673 12.5958 12.3331 12.4644 12.4645Z",fill:"currentColor"})))},hs=(0,p.forwardRef)(us);n.p;var gs,ms,ps=["title","titleId"];function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ys=function(e,t){var n=e.title,r=e.titleId,o=vs(e,ps);return p.createElement("svg",fs({width:14,height:16,viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,gs||(gs=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.99995 -2.91129e-06L6.90627 -6.32312e-05C6.46527 -0.000491789 6.08025 -0.000865988 5.72266 0.0873838C4.97062 0.272981 4.31952 0.74227 3.90563 1.39703C3.70883 1.70836 3.58743 2.07374 3.44838 2.49225L3.27919 3H0V5H14V3H10.7207L10.5515 2.49224C10.4125 2.07374 10.2911 1.70835 10.0943 1.39703C9.68039 0.74227 9.02928 0.272981 8.27724 0.0873838C7.91965 -0.000865988 7.53463 -0.000491789 7.09363 -6.32312e-05L6.99995 -2.91129e-06ZM8.61205 3C8.48477 2.62409 8.44589 2.53239 8.40372 2.46567C8.26575 2.24742 8.04872 2.09099 7.79804 2.02913C7.7086 2.00705 7.58828 2 6.99995 2C6.41162 2 6.29131 2.00705 6.20187 2.02913C5.95119 2.09099 5.73415 2.24742 5.59619 2.46567C5.55402 2.53239 5.51514 2.62409 5.38786 3H8.61205Z",fill:"currentColor"})),ms||(ms=p.createElement("path",{d:"M2.99314 6.38315L3.57753 11.3505C3.67952 12.2174 3.7468 12.7729 3.84826 13.18C3.94285 13.5595 4.03799 13.6797 4.11397 13.7473C4.18995 13.8148 4.32041 13.8953 4.70839 13.9449C5.12455 13.9981 5.68415 14 6.55698 14H7.44299C8.31582 14 8.87543 13.9981 9.29158 13.9449C9.67956 13.8953 9.81002 13.8148 9.886 13.7473C9.96198 13.6797 10.0571 13.5595 10.1517 13.18C10.2532 12.7729 10.3205 12.2174 10.4224 11.3505L11.0068 6.38315L12.9931 6.61683L12.4016 11.6448C12.3089 12.4335 12.2284 13.1178 12.0924 13.6637C11.946 14.2511 11.7074 14.8039 11.215 15.2418C10.7226 15.6797 10.1457 15.852 9.54519 15.9287C8.98711 16.0001 8.29817 16 7.50402 16H6.49595C5.7018 16 5.01286 16.0001 4.45478 15.9287C3.85429 15.852 3.27736 15.6797 2.78494 15.2418C2.29252 14.8039 2.05402 14.2511 1.90762 13.6637C1.77156 13.1178 1.6911 12.4335 1.59836 11.6448L1.00684 6.61683L2.99314 6.38315Z",fill:"currentColor"})))},bs=(0,p.forwardRef)(ys);n.p;var xs,ws=["title","titleId"];function Cs(){return Cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var js=function(e,t){var n=e.title,r=e.titleId,o=Ss(e,ws);return p.createElement("svg",Cs({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,xs||(xs=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0V6H14V8H8V14H6V8H0V6H6V0H8Z",fill:"currentColor"})))},ks=(0,p.forwardRef)(js);n.p;var Os,Rs,Es=["title","titleId"];function _s(){return _s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ts=function(e,t){var n=e.title,r=e.titleId,o=As(e,Es);return p.createElement("svg",_s({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Os||(Os=p.createElement("path",{d:"M11.3471 8.26019C11.4701 7.64517 11.5316 7.33766 11.6015 7.24589C11.8016 6.98314 12.197 6.98314 12.3971 7.24589C12.467 7.33766 12.5285 7.64517 12.6515 8.26019C12.7345 8.6753 12.776 8.88285 12.8503 9.06287C13.0534 9.55465 13.444 9.94526 13.9358 10.1483C14.1158 10.2226 14.3233 10.2641 14.7384 10.3471C15.3535 10.4701 15.661 10.5316 15.7527 10.6015C16.0155 10.8016 16.0155 11.197 15.7527 11.3971C15.661 11.467 15.3535 11.5285 14.7384 11.6515C14.3233 11.7345 14.1158 11.776 13.9358 11.8503C13.444 12.0534 13.0534 12.444 12.8503 12.9358C12.776 13.1158 12.7345 13.3233 12.6515 13.7384C12.5285 14.3535 12.467 14.661 12.3971 14.7527C12.197 15.0155 11.8016 15.0155 11.6015 14.7527C11.5316 14.661 11.4701 14.3535 11.3471 13.7384C11.2641 13.3233 11.2226 13.1158 11.1483 12.9358C10.9453 12.444 10.5546 12.0534 10.0629 11.8503C9.88285 11.776 9.6753 11.7345 9.26019 11.6515C8.64517 11.5285 8.33766 11.467 8.24589 11.3971C7.98314 11.197 7.98314 10.8016 8.24589 10.6015C8.33766 10.5316 8.64517 10.4701 9.26019 10.3471C9.6753 10.2641 9.88285 10.2226 10.0629 10.1483C10.5546 9.94526 10.9453 9.55465 11.1483 9.06287C11.2226 8.88285 11.2641 8.6753 11.3471 8.26019Z",fill:"currentColor"})),Rs||(Rs=p.createElement("path",{d:"M5.34714 4.26019C5.47015 3.64517 5.53165 3.33766 5.60154 3.24589C5.80164 2.98314 6.197 2.98314 6.3971 3.24589C6.46699 3.33766 6.52849 3.64517 6.65149 4.26019C6.73451 4.6753 6.77603 4.88285 6.85035 5.06287C7.05338 5.55465 7.44399 5.94526 7.93576 6.14829C8.11578 6.22261 8.32334 6.26412 8.73845 6.34714C9.35347 6.47015 9.66098 6.53165 9.75275 6.60154C10.0155 6.80164 10.0155 7.197 9.75275 7.3971C9.66098 7.46699 9.35347 7.52849 8.73845 7.65149C8.32334 7.73451 8.11578 7.77603 7.93576 7.85035C7.44399 8.05338 7.05338 8.44399 6.85035 8.93576C6.77603 9.11578 6.73451 9.32334 6.65149 9.73845C6.52849 10.3535 6.46699 10.661 6.3971 10.7527C6.197 11.0155 5.80164 11.0155 5.60154 10.7527C5.53165 10.661 5.47015 10.3535 5.34714 9.73845C5.26412 9.32334 5.22261 9.11578 5.14829 8.93576C4.94526 8.44399 4.55465 8.05338 4.06287 7.85035C3.88285 7.77603 3.6753 7.73451 3.26019 7.65149C2.64517 7.52849 2.33766 7.46699 2.24589 7.3971C1.98314 7.197 1.98314 6.80164 2.24589 6.60154C2.33766 6.53165 2.64517 6.47015 3.26019 6.34714C3.6753 6.26412 3.88285 6.22261 4.06287 6.14829C4.55465 5.94526 4.94526 5.55465 5.14829 5.06287C5.22261 4.88285 5.26412 4.6753 5.34714 4.26019Z",fill:"currentColor"})))},Ps=(0,p.forwardRef)(Ts);n.p;var Is,Ls=["title","titleId"];function Ms(){return Ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ds=function(e,t){var n=e.title,r=e.titleId,o=Ks(e,Ls);return p.createElement("svg",Ms({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Is||(Is=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.2 4.5H14.8C15.46 4.5 16 5.04 16 5.7V15.2929C16 15.7383 15.4614 15.9614 15.1464 15.6464L13.8929 14.3929C13.7054 14.2054 13.451 14.1 13.1858 14.1H5.2C4.54 14.1 4 13.56 4 12.9V5.7C4 5.04 4.54 4.5 5.2 4.5ZM13.1381 8.13807C13.3984 7.87772 13.3984 7.45561 13.1381 7.19526C12.8777 6.93491 12.4556 6.93491 12.1953 7.19526L9.66667 9.72386L8.13807 8.19526C7.87772 7.93491 7.45561 7.93491 7.19526 8.19526C6.93491 8.45561 6.93491 8.87772 7.19526 9.13807L9.19526 11.1381C9.45561 11.3984 9.87772 11.3984 10.1381 11.1381L13.1381 8.13807Z",fill:"#5CDBD3"})))},Ns=(0,p.forwardRef)(Ds);n.p;var Vs,zs=["title","titleId"];function Bs(){return Bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fs=function(e,t){var n=e.title,r=e.titleId,o=Hs(e,zs);return p.createElement("svg",Bs({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Vs||(Vs=p.createElement("path",{d:"M14.8 4.5H5.2C4.54 4.5 4 5.04 4 5.7V12.9C4 13.56 4.54 14.1 5.2 14.1H13.1858C13.451 14.1 13.7054 14.2054 13.8929 14.3929L15.1464 15.6464C15.4614 15.9614 16 15.7383 16 15.2929V5.7C16 5.04 15.46 4.5 14.8 4.5Z",fill:"#FF85C0"})))},Ws=(0,p.forwardRef)(Fs);n.p;var $s,Us,Zs=["title","titleId"];function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xs=function(e,t){var n=e.title,r=e.titleId,o=Ys(e,Zs);return p.createElement("svg",Gs({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,$s||($s=p.createElement("rect",{width:20,height:20,rx:4,fill:"#5CDBD3",fillOpacity:.18})),Us||(Us=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.2 5H14.8C15.46 5 16 5.52595 16 6.16877V15.512C16 15.9459 15.4614 16.1632 15.1464 15.8564L13.8929 14.6355C13.7054 14.4528 13.451 14.3502 13.1858 14.3502H5.2C4.54 14.3502 4 13.8242 4 13.1814V6.16877C4 5.52595 4.54 5 5.2 5ZM13.1381 8.5434C13.3984 8.28982 13.3984 7.8787 13.1381 7.62512C12.8777 7.37155 12.4556 7.37155 12.1953 7.62512L9.66667 10.0879L8.13807 8.5991C7.87772 8.34553 7.45561 8.34553 7.19526 8.5991C6.93491 8.85268 6.93491 9.2638 7.19526 9.51738L9.19526 11.4653C9.45561 11.7189 9.87772 11.7189 10.1381 11.4653L13.1381 8.5434Z",fill:"#5CDBD3"})))},qs=(0,p.forwardRef)(Xs);n.p;var Js,Qs,el=["title","titleId"];function tl(){return tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var rl=function(e,t){var n=e.title,r=e.titleId,o=nl(e,el);return p.createElement("svg",tl({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Js||(Js=p.createElement("rect",{width:20,height:20,rx:4,fill:"#FF85C0",fillOpacity:.18})),Qs||(Qs=p.createElement("path",{d:"M14.8 4H5.2C4.54 4 4 4.54 4 5.2V12.4C4 13.06 4.54 13.6 5.2 13.6H13.1858C13.451 13.6 13.7054 13.7054 13.8929 13.8929L15.1464 15.1464C15.4614 15.4614 16 15.2383 16 14.7929V5.2C16 4.54 15.46 4 14.8 4Z",fill:"#FF85C0"})))},ol=(0,p.forwardRef)(rl);n.p;n.p;n.p;n.p;var il,al,sl,ll,cl=["title","titleId"];function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hl=function(e,t){var n=e.title,r=e.titleId,o=ul(e,cl);return p.createElement("svg",dl({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,il||(il=p.createElement("path",{d:"M13 21H25V23H13V21Z",fill:"currentColor"})),al||(al=p.createElement("path",{d:"M11 13H23V15H11V13Z",fill:"currentColor"})),sl||(sl=p.createElement("rect",{x:10.5,y:19.5,width:5,height:5,rx:2.5,fill:"currentColor"})),ll||(ll=p.createElement("rect",{x:20.5,y:11.5,width:5,height:5,rx:2.5,fill:"currentColor"})))},gl=(0,p.forwardRef)(hl);n.p;var ml,pl=["title","titleId"];function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var yl=function(e,t){var n=e.title,r=e.titleId,o=vl(e,pl);return p.createElement("svg",fl({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ml||(ml=p.createElement("path",{d:"M0 14V16H6V14H0ZM0 2V4H10V2H0ZM10 18V16H18V14H10V12H8V18H10ZM4 6V8H0V10H4V12H6V6H4ZM18 10V8H8V10H18ZM12 6H14V4H18V2H14V0H12V6Z",fill:"currentColor"})))},bl=(0,p.forwardRef)(yl);n.p;var xl,wl=["title","titleId"];function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var jl=function(e,t){var n=e.title,r=e.titleId,o=Sl(e,wl);return p.createElement("svg",Cl({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,xl||(xl=p.createElement("path",{d:"M16.1024 11.7014C16.8868 9.34449 17.279 8.16602 18.0001 8.16602C18.7212 8.16602 19.1134 9.34449 19.8978 11.7014L20.3775 13.143C20.5973 13.8034 20.7072 14.1337 20.9691 14.3226C21.2311 14.5115 21.5791 14.5115 22.2752 14.5115H23.7239C26.3032 14.5115 27.5929 14.5115 27.8148 15.2078C28.0367 15.9042 26.9848 16.6504 24.8811 18.1427L23.792 18.9153C23.2098 19.3283 22.9187 19.5348 22.816 19.8484C22.7134 20.1621 22.8261 20.5007 23.0515 21.178L23.4868 22.4861C24.2826 24.8776 24.6806 26.0733 24.098 26.5048C23.5155 26.9363 22.4877 26.2072 20.432 24.7489L19.1573 23.8447C18.5983 23.4482 18.3188 23.2499 18.0001 23.2499C17.6814 23.2499 17.4019 23.4482 16.8429 23.8447L15.5682 24.7489C13.5125 26.2072 12.4847 26.9363 11.9022 26.5048C11.3196 26.0733 11.7176 24.8776 12.5134 22.4861L12.9487 21.178C13.1741 20.5007 13.2868 20.1621 13.1842 19.8484C13.0815 19.5348 12.7904 19.3283 12.2082 18.9153L11.1191 18.1427C9.01536 16.6504 7.96348 15.9042 8.18539 15.2078C8.40731 14.5115 9.69696 14.5115 12.2763 14.5115H13.725C14.4211 14.5115 14.7691 14.5115 15.0311 14.3226C15.293 14.1337 15.4029 13.8034 15.6227 13.143L16.1024 11.7014Z",fill:"currentColor"})))},kl=(0,p.forwardRef)(jl);n.p;var Ol,Rl=["title","titleId"];function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Al=function(e,t){var n=e.title,r=e.titleId,o=_l(e,Rl);return p.createElement("svg",El({width:32,height:32,viewBox:"-6 -6 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ol||(Ol=p.createElement("path",{d:"M20 7.74L12.81 7.12L10 0.5L7.19 7.13L0 7.74L5.46 12.47L3.82 19.5L10 15.77L16.18 19.5L14.55 12.47L20 7.74ZM10 13.9L6.24 16.17L7.24 11.89L3.92 9.01L8.3 8.63L10 4.6L11.71 8.64L16.09 9.02L12.77 11.9L13.77 16.18L10 13.9Z",fill:"currentColor"})))},Tl=(0,p.forwardRef)(Al);n.p;var Pl,Il,Ll,Ml=["title","titleId"];function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Nl=function(e,t){var n=e.title,r=e.titleId,o=Dl(e,Ml);return p.createElement("svg",Kl({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Pl||(Pl=p.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Il||(Il=p.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:3,y:3,width:14,height:14},p.createElement("rect",{x:3.5,y:3.5,width:13,height:13,rx:6.5,fill:"#fff"}))),Ll||(Ll=p.createElement("g",{mask:"url(#mask0)"},p.createElement("rect",{x:3.5,y:3.5,width:13,height:13,rx:6.5,fill:"currentColor",fillOpacity:.3}),p.createElement("rect",{x:4.5,y:4.5,width:11,height:11,rx:5.5,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2}),p.createElement("path",{d:"M5 5L15 15",stroke:"currentColor",strokeWidth:2}))))},Vl=(0,p.forwardRef)(Nl);n.p;var zl,Bl=["title","titleId"];function Hl(){return Hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wl=function(e,t){var n=e.title,r=e.titleId,o=Fl(e,Bl);return p.createElement("svg",Hl({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,zl||(zl=p.createElement("g",{opacity:.25},p.createElement("circle",{cx:12,cy:13,r:3,stroke:"black",strokeWidth:2}),p.createElement("path",{d:"M4 12C4 12 7 7 12 7C17 7 20 12 20 12",stroke:"black",strokeWidth:2,strokeLinecap:"square"}))))},$l=(0,p.forwardRef)(Wl);n.p;var Ul,Zl,Gl,Yl,Xl,ql,Jl=["title","titleId"];function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var tc=function(e,t){var n=e.title,r=e.titleId,o=ec(e,Jl);return p.createElement("svg",Ql({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ul||(Ul=p.createElement("path",{d:"M20.5 12.5L18 10",stroke:"black",strokeWidth:2})),Zl||(Zl=p.createElement("path",{d:"M17 15L15.5 12",stroke:"black",strokeWidth:2})),Gl||(Gl=p.createElement("path",{d:"M12 16V13",stroke:"black",strokeWidth:2})),Yl||(Yl=p.createElement("path",{d:"M7 15L8.5 12",stroke:"black",strokeWidth:2})),Xl||(Xl=p.createElement("path",{d:"M3.5 12.5L6 10",stroke:"black",strokeWidth:2})),ql||(ql=p.createElement("path",{d:"M4 8C4 8 7 13 12 13C17 13 20 8 20 8",stroke:"black",strokeWidth:2,strokeLinecap:"square"})))},nc=(0,p.forwardRef)(tc);n.p;var rc,oc=["title","titleId"];function ic(){return ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sc=function(e,t){var n=e.title,r=e.titleId,o=ac(e,oc);return p.createElement("svg",ic({width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,rc||(rc=p.createElement("path",{d:"M7 15L12 10L17 15",strokeWidth:2})))},lc=(0,p.forwardRef)(sc);n.p;var cc,dc,uc=["title","titleId"];function hc(){return hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mc=function(e,t){var n=e.title,r=e.titleId,o=gc(e,uc);return p.createElement("svg",hc({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,cc||(cc=p.createElement("path",{d:"M8 14L12 18L16 14",stroke:"black",strokeWidth:2})),dc||(dc=p.createElement("path",{d:"M8 10L12 6L16 10",stroke:"black",strokeWidth:2})))},pc=(0,p.forwardRef)(mc);n.p;var fc,vc=["title","titleId"];function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xc=function(e,t){var n=e.title,r=e.titleId,o=bc(e,vc);return p.createElement("svg",yc({width:8,height:12,viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fc||(fc=p.createElement("path",{d:"M3.99994 1.88667L6.11328 4L7.05328 3.06L3.99994 0L0.939941 3.06L1.88661 4L3.99994 1.88667ZM3.99994 10.1133L1.88661 8L0.946608 8.94L3.99994 12L7.05994 8.94L6.11328 8L3.99994 10.1133Z",fill:"currentColor"})))},wc=(0,p.forwardRef)(xc);n.p;n.p;var Cc,Sc,jc=["title","titleId"];function kc(){return kc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Rc=function(e,t){var n=e.title,r=e.titleId,o=Oc(e,jc);return p.createElement("svg",kc({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Cc||(Cc=p.createElement("path",{d:"M8 18L12 14L16 18",stroke:"black",strokeWidth:2})),Sc||(Sc=p.createElement("path",{d:"M8 6L12 10L16 6",stroke:"black",strokeWidth:2})))},Ec=(0,p.forwardRef)(Rc);n.p;var _c,Ac=["title","titleId"];function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ic=function(e,t){var n=e.title,r=e.titleId,o=Pc(e,Ac);return p.createElement("svg",Tc({width:8,height:12,viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,_c||(_c=p.createElement("path",{d:"M0.939941 10.3927L1.88661 11.3327L3.99994 9.21935L6.11328 11.3327L7.05327 10.3927L3.99994 7.33268L0.939941 10.3927ZM7.05994 1.60602L6.11328 0.666016L3.99994 2.77935L1.88661 0.666016L0.939941 1.60602L3.99994 4.66602L7.05994 1.60602Z",fill:"currentColor"})))},Lc=(0,p.forwardRef)(Ic);n.p;var Mc,Kc,Dc=["title","titleId"];function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zc=function(e,t){var n=e.title,r=e.titleId,o=Vc(e,Dc);return p.createElement("svg",Nc({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Mc||(Mc=p.createElement("rect",{x:6,y:6,width:12,height:12,rx:2,stroke:"currentColor",strokeWidth:2})),Kc||(Kc=p.createElement("rect",{x:9,y:8,width:6,height:2,rx:1,fill:"currentColor"})))},Bc=(0,p.forwardRef)(zc);n.p;var Hc,Fc=["title","titleId"];function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Uc=function(e,t){var n=e.title,r=e.titleId,o=$c(e,Fc);return p.createElement("svg",Wc({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Hc||(Hc=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.24505 5.99985L12.2451 10.9998L17.2451 5.99985L18.6593 7.41406L13.6593 12.4141L18.6593 17.4141L17.2451 18.8283L12.2451 13.8283L7.24505 18.8283L5.83084 17.4141L10.8308 12.4141L5.83084 7.41406L7.24505 5.99985Z",fill:"currentColor"})))},Zc=(0,p.forwardRef)(Uc);n.p;var Gc,Yc,Xc=["title","titleId"];function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Qc=function(e,t){var n=e.title,r=e.titleId,o=Jc(e,Xc);return p.createElement("svg",qc({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Gc||(Gc=p.createElement("g",{opacity:.4},p.createElement("rect",{width:28,height:28,rx:14,fill:"white"}),p.createElement("rect",{x:.5,y:.5,width:27,height:27,rx:13.5,stroke:"currentColor",strokeOpacity:.5,strokeDasharray:"2 2"}))),Yc||(Yc=p.createElement("g",{opacity:.6},p.createElement("path",{d:"M13 6H15V22H13V6Z",fill:"currentColor"}),p.createElement("path",{d:"M6 13H22V15H6V13Z",fill:"currentColor"}))))},ed=(0,p.forwardRef)(Qc);n.p;var td,nd,rd,od,id,ad=["title","titleId"];function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cd=function(e,t){var n=e.title,r=e.titleId,o=ld(e,ad);return p.createElement("svg",sd({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,td||(td=p.createElement("path",{d:"M8 16L6.71884 15.1459C6.58185 15.0546 6.40867 15.0365 6.2558 15.0977L4 16C4 17.1824 4.34954 18.0153 4.63531 18.4987C4.83778 18.8411 5.2235 19 5.62132 19H8.125C8.72563 19 8.98051 18.2354 8.5 17.875C8.18524 17.6389 8 17.2684 8 16.875V16Z",fill:"currentColor"})),nd||(nd=p.createElement("path",{d:"M18 16L15.7442 15.0977C15.5913 15.0365 15.4182 15.0546 15.2812 15.1459L14 16C14 17.1824 14.3495 18.0153 14.6353 18.4987C14.8378 18.8411 15.2235 19 15.6213 19H18.125C18.7256 19 18.9805 18.2354 18.5 17.875C18.1852 17.6389 18 17.2684 18 16.875V16Z",fill:"currentColor"})),rd||(rd=p.createElement("path",{d:"M3.25 12.5C2.88257 14.0747 1.45441 15.0432 0.180299 15.6081C-0.0431404 15.7072 0.048034 16.3 0.292449 16.3H4L3.25 12.5Z",fill:"currentColor"})),od||(od=p.createElement("path",{d:"M18 14C18 14 18 7 10.5 7C3 7 3 14 3 14V16C3 16 5.5 17 10.5 17C15.5 17 18 16 18 16V14Z",fill:"currentColor"})),id||(id=p.createElement("path",{d:"M20.6908 7.79364C19.4723 7.54994 18.287 8.34017 18.0433 9.55868C17.9823 9.8636 17.6667 10.3007 16.9045 10.7581C16.5042 10.9982 16.0732 11.2002 15.6266 11.3378L17.6315 15.397L19.2197 14.6168C20.3324 13.9492 22.0169 12.6363 22.4559 10.4412C22.6996 9.2227 21.9093 8.03734 20.6908 7.79364Z",fill:"currentColor"})))},dd=(0,p.forwardRef)(cd);n.p;var ud,hd,gd,md,pd,fd=["title","titleId"];function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var bd=function(e,t){var n=e.title,r=e.titleId,o=yd(e,fd);return p.createElement("svg",vd({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ud||(ud=p.createElement("path",{d:"M17 20H13V18H15C16.1046 18 17 18.8954 17 20Z",fill:"currentColor"})),hd||(hd=p.createElement("circle",{cx:6.5,cy:18,r:2,fill:"currentColor"})),gd||(gd=p.createElement("path",{d:"M6.08663 15.8898C5.45448 13.0452 6.9145 10.1491 9.57738 8.96561L14 7L16 8C16.4846 9.33277 16.727 9.99915 16.848 10.6566C17.175 12.433 16.8912 14.2678 16.0428 15.8624C15.7288 16.4526 15.2964 17.0147 14.4318 18.1387L13 20H11.2104C8.75033 20 6.6203 18.2913 6.08663 15.8898Z",fill:"currentColor"})),md||(md=p.createElement("path",{d:"M20 6.5C21.5 8 17.6569 10 16 10C14.3432 10 13 8.65685 13 7C13 5.34315 7.34317 4 15 4C17.4 4 18.5 5 20 6.5Z",fill:"currentColor"})),pd||(pd=p.createElement("path",{d:"M8.38013 2.5L16.2189 4.09782L15.6198 7.03737L10.7205 6.03874C9.09703 5.70782 8.04921 4.12347 8.38013 2.5Z",fill:"currentColor"})))},xd=(0,p.forwardRef)(bd);n.p;var wd,Cd=["title","titleId"];function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kd=function(e,t){var n=e.title,r=e.titleId,o=jd(e,Cd);return p.createElement("svg",Sd({viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,wd||(wd=p.createElement("path",{d:"M14.5 0H2.5C1.4 0 0.5 0.9 0.5 2V16H2.5V2H14.5V0ZM17.5 4H6.5C5.4 4 4.5 4.9 4.5 6V20C4.5 21.1 5.4 22 6.5 22H17.5C18.6 22 19.5 21.1 19.5 20V6C19.5 4.9 18.6 4 17.5 4ZM17.5 20H6.5V6H17.5V20Z",fill:"currentcolor"})))},Od=(0,p.forwardRef)(kd);n.p;var Rd,Ed=["title","titleId"];function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Td=function(e,t){var n=e.title,r=e.titleId,o=Ad(e,Ed);return p.createElement("svg",_d({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Rd||(Rd=p.createElement("path",{d:"M3.99996 6.6665C3.26663 6.6665 2.66663 7.2665 2.66663 7.99984C2.66663 8.73317 3.26663 9.33317 3.99996 9.33317C4.73329 9.33317 5.33329 8.73317 5.33329 7.99984C5.33329 7.2665 4.73329 6.6665 3.99996 6.6665ZM12 6.6665C11.2666 6.6665 10.6666 7.2665 10.6666 7.99984C10.6666 8.73317 11.2666 9.33317 12 9.33317C12.7333 9.33317 13.3333 8.73317 13.3333 7.99984C13.3333 7.2665 12.7333 6.6665 12 6.6665ZM7.99996 6.6665C7.26663 6.6665 6.66663 7.2665 6.66663 7.99984C6.66663 8.73317 7.26663 9.33317 7.99996 9.33317C8.73329 9.33317 9.33329 8.73317 9.33329 7.99984C9.33329 7.2665 8.73329 6.6665 7.99996 6.6665Z",fill:"currentcolor"})))},Pd=(0,p.forwardRef)(Td);n.p;var Id,Ld=["title","titleId"];function Md(){return Md=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Dd=function(e,t){var n=e.title,r=e.titleId,o=Kd(e,Ld);return p.createElement("svg",Md({viewBox:"0 0 20 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Id||(Id=p.createElement("path",{d:"M0.833313 16.5H19.1666L9.99998 0.666672L0.833313 16.5ZM3.72498 14.8333L9.99998 3.99167L16.275 14.8333H3.72498V14.8333ZM9.16665 12.3333H10.8333V14H9.16665V12.3333ZM9.16665 7.33334H10.8333V10.6667H9.16665V7.33334Z"})))},Nd=(0,p.forwardRef)(Dd);n.p;var Vd,zd=["title","titleId"];function Bd(){return Bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fd=function(e,t){var n=e.title,r=e.titleId,o=Hd(e,zd);return p.createElement("svg",Bd({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Vd||(Vd=p.createElement("path",{d:"M8 10.1295C8 7.84608 8 6.70434 8.74273 6.26996C9.48546 5.83557 10.4806 6.39532 12.4708 7.51482L19.3516 11.3853C21.4108 12.5436 22.4404 13.1227 22.4404 14C22.4404 14.8773 21.4108 15.4564 19.3516 16.6147L12.4708 20.4852C10.4806 21.6047 9.48546 22.1644 8.74273 21.73C8 21.2957 8 20.1539 8 17.8705V10.1295Z",fill:"#898098"})))},Wd=(0,p.forwardRef)(Fd);n.p;var $d,Ud,Zd=["title","titleId"];function Gd(){return Gd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xd=function(e,t){var n=e.title,r=e.titleId,o=Yd(e,Zd);return p.createElement("svg",Gd({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,$d||($d=p.createElement("path",{d:"M14 6.5C14 5.56538 14 5.09808 14.201 4.75C14.3326 4.52197 14.522 4.33261 14.75 4.20096C15.0981 4 15.5654 4 16.5 4C17.4346 4 17.9019 4 18.25 4.20096C18.478 4.33261 18.6674 4.52197 18.799 4.75C19 5.09808 19 5.56538 19 6.5V17.5C19 18.4346 19 18.9019 18.799 19.25C18.6674 19.478 18.478 19.6674 18.25 19.799C17.9019 20 17.4346 20 16.5 20C15.5654 20 15.0981 20 14.75 19.799C14.522 19.6674 14.3326 19.478 14.201 19.25C14 18.9019 14 18.4346 14 17.5V6.5Z",fill:"#413C4A"})),Ud||(Ud=p.createElement("path",{d:"M5 6.5C5 5.56538 5 5.09808 5.20096 4.75C5.33261 4.52197 5.52197 4.33261 5.75 4.20096C6.09808 4 6.56538 4 7.5 4C8.43462 4 8.90192 4 9.25 4.20096C9.47803 4.33261 9.66739 4.52197 9.79904 4.75C10 5.09808 10 5.56538 10 6.5V17.5C10 18.4346 10 18.9019 9.79904 19.25C9.66739 19.478 9.47803 19.6674 9.25 19.799C8.90192 20 8.43462 20 7.5 20C6.56538 20 6.09808 20 5.75 19.799C5.52197 19.6674 5.33261 19.478 5.20096 19.25C5 18.9019 5 18.4346 5 17.5V6.5Z",fill:"#413C4A"})))},qd=(0,p.forwardRef)(Xd);n.p;var Jd,Qd=["title","titleId"];function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nu=function(e,t){var n=e.title,r=e.titleId,o=tu(e,Qd);return p.createElement("svg",eu({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Jd||(Jd=p.createElement("path",{d:"M9.16663 14.9993H10.8333V13.3327H9.16663V14.9993ZM9.99996 1.66602C8.90561 1.66602 7.82198 1.88156 6.81093 2.30035C5.79988 2.71914 4.88122 3.33297 4.1074 4.10679C2.5446 5.6696 1.66663 7.78921 1.66663 9.99935C1.66663 12.2095 2.5446 14.3291 4.1074 15.8919C4.88122 16.6657 5.79988 17.2796 6.81093 17.6983C7.82198 18.1171 8.90561 18.3327 9.99996 18.3327C12.2101 18.3327 14.3297 17.4547 15.8925 15.8919C17.4553 14.3291 18.3333 12.2095 18.3333 9.99935C18.3333 8.905 18.1177 7.82137 17.699 6.81032C17.2802 5.79927 16.6663 4.88061 15.8925 4.10679C15.1187 3.33297 14.2 2.71914 13.189 2.30035C12.1779 1.88156 11.0943 1.66602 9.99996 1.66602M9.99996 16.666C6.32496 16.666 3.33329 13.6743 3.33329 9.99935C3.33329 6.32435 6.32496 3.33268 9.99996 3.33268C13.675 3.33268 16.6666 6.32435 16.6666 9.99935C16.6666 13.6743 13.675 16.666 9.99996 16.666ZM9.99996 4.99935C9.1159 4.99935 8.26806 5.35054 7.64294 5.97566C7.01782 6.60078 6.66663 7.44863 6.66663 8.33268H8.33329C8.33329 7.89066 8.50889 7.46673 8.82145 7.15417C9.13401 6.84161 9.55793 6.66602 9.99996 6.66602C10.442 6.66602 10.8659 6.84161 11.1785 7.15417C11.491 7.46673 11.6666 7.89066 11.6666 8.33268C11.6666 9.99935 9.16663 9.79102 9.16663 12.4993H10.8333C10.8333 10.6243 13.3333 10.416 13.3333 8.33268C13.3333 7.44863 12.9821 6.60078 12.357 5.97566C11.7319 5.35054 10.884 4.99935 9.99996 4.99935Z",fill:"#BEB9C5"})))},ru=(0,p.forwardRef)(nu);n.p;var ou,iu=["title","titleId"];function au(){return au=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lu=function(e,t){var n=e.title,r=e.titleId,o=su(e,iu);return p.createElement("svg",au({viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ou||(ou=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.3839 1.11612C15.872 1.60427 15.872 2.39573 15.3839 2.88388L7.38388 10.8839C6.89573 11.372 6.10427 11.372 5.61612 10.8839L1.11612 6.38388C0.627961 5.89573 0.627961 5.10427 1.11612 4.61612C1.60427 4.12796 2.39573 4.12796 2.88388 4.61612L6.5 8.23223L13.6161 1.11612C14.1043 0.627961 14.8957 0.627961 15.3839 1.11612Z",fill:"currentColor",fillOpacity:.6})))},cu=(0,p.forwardRef)(lu);n.p;n.p;var du,uu=["title","titleId"];function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mu=function(e,t){var n=e.title,r=e.titleId,o=gu(e,uu);return p.createElement("svg",hu({viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,du||(du=p.createElement("path",{d:"M11.1162 12.8839C11.6044 13.372 12.3958 13.372 12.884 12.8839C13.3721 12.3957 13.3721 11.6043 12.884 11.1161L8.76785 7.00002L12.8839 2.88389C13.3721 2.39574 13.3721 1.60428 12.8839 1.11613C12.3958 0.627973 11.6043 0.627977 11.1162 1.11613L7.00007 5.23226L2.88388 1.11611C2.39572 0.627959 1.60427 0.627963 1.11611 1.11612C0.627959 1.60428 0.627963 2.39573 1.11612 2.88389L5.23231 7.00004L1.11625 11.1161C0.628101 11.6043 0.628105 12.3957 1.11626 12.8839C1.60442 13.3721 2.39588 13.3721 2.88403 12.8839L7.00009 8.7678L11.1162 12.8839Z",fill:"currentColor",fillOpacity:.6})))},pu=(0,p.forwardRef)(mu);n.p;n.p;n.p;n.p;n.p;var fu,vu,yu=["title","titleId"];function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wu=function(e,t){var n=e.title,r=e.titleId,o=xu(e,yu);return p.createElement("svg",bu({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fu||(fu=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.07782 9.4751C3 9.8192 3 10.2766 3 11.0292V12.9708C3 13.9301 3 14.4098 3.16115 14.7865C3.3635 15.2596 3.74039 15.6365 4.21347 15.8388C4.59023 16 5.0699 16 6.02924 16C6.35575 16 6.51901 16 6.67691 16.0254C6.87544 16.0574 7.06801 16.1191 7.24814 16.2085C7.3914 16.2796 7.52425 16.3745 7.78994 16.5642L10.8375 18.7411C12.2226 19.7304 12.9152 20.2251 13.4576 19.946C13.9993 19.6672 14 18.8181 14 17.1206L3.07782 9.4751ZM4.54786 8.06282L14 14.6793V6.88638C14 5.18423 14 4.33316 13.4576 4.05402C12.9152 3.77488 12.2226 4.26956 10.8375 5.25891L7.78994 7.43575L7.78993 7.43576C7.52425 7.62554 7.3914 7.72043 7.24814 7.79152C7.06801 7.88091 6.87544 7.94263 6.67691 7.97458C6.51901 8 6.35575 8 6.02924 8C5.32843 8 4.88359 8 4.54786 8.06282Z",fill:"currentColor"})),vu||(vu=p.createElement("path",{d:"M2 5.5L17 16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})))},Cu=(0,p.forwardRef)(wu);n.p;var Su,ju,ku=["title","titleId"];function Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Eu=function(e,t){var n=e.title,r=e.titleId,o=Ru(e,ku);return p.createElement("svg",Ou({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Su||(Su=p.createElement("path",{d:"M17 7C17 7 19.5 8.5 19.5 12C19.5 15.5 17 17 17 17",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),ju||(ju=p.createElement("path",{d:"M3 11.0292C3 10.0699 3 9.59023 3.16115 9.21347C3.3635 8.74039 3.74039 8.3635 4.21347 8.16115C4.59023 8 5.0699 8 6.02924 8C6.35575 8 6.51901 8 6.67691 7.97458C6.87544 7.94263 7.06801 7.88091 7.24814 7.79152C7.3914 7.72043 7.52425 7.62554 7.78994 7.43575L10.8375 5.25891C12.2226 4.26956 12.9152 3.77488 13.4576 4.05402C14 4.33316 14 5.18423 14 6.88638V17.1136C14 18.8158 14 19.6668 13.4576 19.946C12.9152 20.2251 12.2226 19.7304 10.8375 18.7411L7.78994 16.5642C7.52425 16.3745 7.3914 16.2796 7.24814 16.2085C7.06801 16.1191 6.87544 16.0574 6.67691 16.0254C6.51901 16 6.35575 16 6.02924 16C5.0699 16 4.59023 16 4.21347 15.8389C3.74039 15.6365 3.3635 15.2596 3.16115 14.7865C3 14.4098 3 13.9301 3 12.9708V11.0292Z",fill:"currentColor"})))},_u=(0,p.forwardRef)(Eu);n.p;var Au,Tu,Pu,Iu=["title","titleId"];function Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ku=function(e,t){var n=e.title,r=e.titleId,o=Mu(e,Iu);return p.createElement("svg",Lu({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Au||(Au=p.createElement("path",{d:"M18 6C18 6 21 8 21 12C21 16 18 18 18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Tu||(Tu=p.createElement("path",{d:"M16 8C16 8 18 9.5 18 12C18 14.5 16 16 16 16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Pu||(Pu=p.createElement("path",{d:"M3 11.0292C3 10.0699 3 9.59023 3.16115 9.21347C3.3635 8.74039 3.74039 8.3635 4.21347 8.16115C4.59023 8 5.0699 8 6.02924 8C6.35575 8 6.51901 8 6.67691 7.97458C6.87544 7.94263 7.06801 7.88091 7.24814 7.79152C7.3914 7.72043 7.52425 7.62554 7.78994 7.43575L10.8375 5.25891C12.2226 4.26956 12.9152 3.77488 13.4576 4.05402C14 4.33316 14 5.18423 14 6.88638V17.1136C14 18.8158 14 19.6668 13.4576 19.946C12.9152 20.2251 12.2226 19.7304 10.8375 18.7411L7.78994 16.5642C7.52425 16.3745 7.3914 16.2796 7.24814 16.2085C7.06801 16.1191 6.87544 16.0574 6.67691 16.0254C6.51901 16 6.35575 16 6.02924 16C5.0699 16 4.59023 16 4.21347 15.8389C3.74039 15.6365 3.3635 15.2596 3.16115 14.7865C3 14.4098 3 13.9301 3 12.9708V11.0292Z",fill:"currentColor"})))},Du=(0,p.forwardRef)(Ku);n.p;var Nu,Vu,zu=["title","titleId"];function Bu(){return Bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fu=function(e,t){var n=e.title,r=e.titleId,o=Hu(e,zu);return p.createElement("svg",Bu({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Nu||(Nu=p.createElement("defs",null,p.createElement("linearGradient",{id:"paint0_linear",x1:10.4999,y1:10,x2:28.9999,y2:27,gradientUnits:"userSpaceOnUse"},p.createElement("stop",{stopOpacity:.8,stopColor:"var(--text-color-hover)"}),p.createElement("stop",{offset:1,stopOpacity:.4,stopColor:"var(--text-color-hover)"})))),Vu||(Vu=p.createElement("g",{opacity:.5},p.createElement("path",{d:"M22.9999 5.5C17.4999 -0.5 5.99989 15.5 3.99989 17.5C1.9999 19.5 4.9999 22.5 6.9999 20.5C8.99989 18.5 17.9444 6.97226 19.9999 8C22.9999 9.5 7.99989 20.5 12.9999 25C17.9999 29.5 24.2259 17.3173 25.9999 18.5C27.7739 19.6827 20.4999 24 23.9999 26.5C26.8821 28.5587 29.4999 24 28.9999 23.5C28.4999 23 26.2499 26.25 25.2499 25.25C23.7499 23.75 31.4999 19.5 27.4999 16.5C23.4999 13.5 16.9999 25 14.9999 23C12.9999 21 27.778 10.7125 22.9999 5.5Z",fill:"url(#paint0_linear)"}))))},Wu=(0,p.forwardRef)(Fu);n.p;var $u,Uu,Zu,Gu=["title","titleId"];function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qu=function(e,t){var n=e.title,r=e.titleId,o=Xu(e,Gu);return p.createElement("svg",Yu({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,$u||($u=p.createElement("path",{d:"M15.9999 23C13.9999 21 28.778 10.7125 23.9999 5.5C19.8625 0.986458 12.3298 8.92251 7.99995 13.9831L7.5 17.5291L11.0001 17.075C14.4595 13.0395 19.5186 7.25934 20.9999 8C23.9999 9.5 8.99995 20.5 13.9999 25C18.9999 29.5 25.2259 17.3173 26.9999 18.5C28.774 19.6827 21.4999 24 24.9999 26.5C27.8821 28.5587 30.5 24 29.9999 23.5C29.4999 23 27.2499 26.25 26.2499 25.25C24.7499 23.75 32.5 19.5 28.4999 16.5C24.4999 13.5 17.9999 25 15.9999 23Z",fill:"url(#paint0_linear)"})),Uu||(Uu=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M7.32234 14.0646C7.45988 13.2393 7.52865 12.8267 7.6142 12.7231C7.81418 12.4809 8.18533 12.4809 8.38532 12.7231C8.47086 12.8267 8.53963 13.2393 8.67718 14.0646C8.76116 14.5685 8.80316 14.8205 8.89311 15.0351C9.0959 15.5191 9.48076 15.9039 9.9647 16.1067C10.1793 16.1967 10.4313 16.2387 10.9352 16.3226C11.7605 16.4602 12.1731 16.529 12.2767 16.6145C12.5189 16.8145 12.5189 17.1856 12.2767 17.3856C12.1731 17.4712 11.7605 17.5399 10.9352 17.6775C10.4313 17.7615 10.1793 17.8035 9.9647 17.8934C9.48076 18.0962 9.0959 18.4811 8.89311 18.965C8.80316 19.1796 8.76116 19.4316 8.67718 19.9355C8.53963 20.7608 8.47086 21.1734 8.38532 21.277C8.18533 21.5192 7.81418 21.5192 7.6142 21.277C7.52865 21.1734 7.45988 20.7608 7.32234 19.9355C7.23835 19.4316 7.19635 19.1796 7.10641 18.965C6.90361 18.4811 6.51875 18.0962 6.03481 17.8934C5.82018 17.8035 5.56821 17.7615 5.06427 17.6775C4.23903 17.5399 3.8264 17.4712 3.72279 17.3856C3.48059 17.1856 3.48059 16.8145 3.72279 16.6145C3.8264 16.529 4.23903 16.4602 5.06427 16.3226C5.56821 16.2387 5.82018 16.1967 6.03481 16.1067C6.51875 15.9039 6.90361 15.5191 7.10641 15.0351C7.19635 14.8205 7.23835 14.5685 7.32234 14.0646Z",fill:"#5531FF"}))),Zu||(Zu=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:.541016,y:10.5414,width:14.9172,height:14.9172,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("linearGradient",{id:"paint0_linear",x1:11.4999,y1:10,x2:29.9999,y2:27,gradientUnits:"userSpaceOnUse"},p.createElement("stop",{stopColor:"#7F64FF",stopOpacity:.8}),p.createElement("stop",{offset:1,stopColor:"#7F64FF",stopOpacity:.4})))))},Ju=(0,p.forwardRef)(qu);n.p;var Qu,eh,th,nh=["title","titleId"];function rh(){return rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ih=function(e,t){var n=e.title,r=e.titleId,o=oh(e,nh);return p.createElement("svg",rh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Qu||(Qu=p.createElement("rect",{opacity:.4,x:5,y:5,width:22,height:22,rx:11,fill:"currentColor"})),eh||(eh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("rect",{x:13.5,y:13.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),th||(th=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:10.5,y:11.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},ah=(0,p.forwardRef)(ih);n.p;var sh,lh,ch,dh=["title","titleId"];function uh(){return uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gh=function(e,t){var n=e.title,r=e.titleId,o=hh(e,dh);return p.createElement("svg",uh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,sh||(sh=p.createElement("rect",{opacity:.6,x:5,y:5,width:22,height:22,rx:11,fill:"#7F64FF"})),lh||(lh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M15.3223 13.0646C15.4599 12.2393 15.5286 11.8267 15.6142 11.7231C15.8142 11.4809 16.1853 11.4809 16.3853 11.7231C16.4709 11.8267 16.5396 12.2393 16.6772 13.0646C16.7612 13.5685 16.8032 13.8205 16.8931 14.0351C17.0959 14.5191 17.4808 14.9039 17.9647 15.1067C18.1793 15.1967 18.4313 15.2387 18.9352 15.3226C19.7605 15.4602 20.1731 15.529 20.2767 15.6145C20.5189 15.8145 20.5189 16.1856 20.2767 16.3856C20.1731 16.4712 19.7605 16.5399 18.9352 16.6775C18.4313 16.7615 18.1793 16.8035 17.9647 16.8934C17.4808 17.0962 17.0959 17.4811 16.8931 17.965C16.8032 18.1796 16.7612 18.4316 16.6772 18.9355C16.5396 19.7608 16.4709 20.1734 16.3853 20.277C16.1853 20.5192 15.8142 20.5192 15.6142 20.277C15.5286 20.1734 15.4599 19.7608 15.3223 18.9355C15.2383 18.4316 15.1964 18.1796 15.1064 17.965C14.9036 17.4811 14.5188 17.0962 14.0348 16.8934C13.8202 16.8035 13.5682 16.7615 13.0643 16.6775C12.239 16.5399 11.8264 16.4712 11.7228 16.3856C11.4806 16.1856 11.4806 15.8145 11.7228 15.6145C11.8264 15.529 12.239 15.4602 13.0643 15.3226C13.5682 15.2387 13.8202 15.1967 14.0348 15.1067C14.5188 14.9039 14.9036 14.5191 15.1064 14.0351C15.1964 13.8205 15.2383 13.5685 15.3223 13.0646Z",fill:"#5531FF"}))),ch||(ch=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:8.54102,y:9.54144,width:14.9172,height:14.9172,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},mh=(0,p.forwardRef)(gh);n.p;var ph,fh,vh,yh=["title","titleId"];function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wh=function(e,t){var n=e.title,r=e.titleId,o=xh(e,yh);return p.createElement("svg",bh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ph||(ph=p.createElement("path",{opacity:.4,fillRule:"evenodd",clipRule:"evenodd",d:"M21 3.5C17.9624 3.5 15.5 5.96243 15.5 9C15.5 12.0376 17.9624 14.5 21 14.5C24.0376 14.5 26.5 12.0376 26.5 9C26.5 5.96243 24.0376 3.5 21 3.5ZM3.5 16C3.5 12.9624 5.96243 10.5 9 10.5C12.0376 10.5 14.5 12.9624 14.5 16C14.5 19.0376 12.0376 21.5 9 21.5C5.96243 21.5 3.5 19.0376 3.5 16ZM15.5 23C15.5 19.9624 17.9624 17.5 21 17.5C24.0376 17.5 26.5 19.9624 26.5 23C26.5 26.0376 24.0376 28.5 21 28.5C17.9624 28.5 15.5 26.0376 15.5 23Z",fill:"currentColor"})),fh||(fh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 6.5C19.6193 6.5 18.5 7.61929 18.5 9C18.5 10.3807 19.6193 11.5 21 11.5C22.3807 11.5 23.5 10.3807 23.5 9C23.5 7.61929 22.3807 6.5 21 6.5ZM6.5 16C6.5 14.6193 7.61929 13.5 9 13.5C10.3807 13.5 11.5 14.6193 11.5 16C11.5 17.3807 10.3807 18.5 9 18.5C7.61929 18.5 6.5 17.3807 6.5 16ZM18.5 23C18.5 21.6193 19.6193 20.5 21 20.5C22.3807 20.5 23.5 21.6193 23.5 23C23.5 24.3807 22.3807 25.5 21 25.5C19.6193 25.5 18.5 24.3807 18.5 23Z",fill:"currentColor"}))),vh||(vh=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:3.5,y:4.5,width:23,height:25,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Ch=(0,p.forwardRef)(wh);n.p;var Sh,jh,kh,Oh,Rh,Eh=["title","titleId"];function _h(){return _h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Th=function(e,t){var n=e.title,r=e.titleId,o=Ah(e,Eh);return p.createElement("svg",_h({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Sh||(Sh=p.createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M21 3.5C17.9624 3.5 15.5 5.96243 15.5 9C15.5 12.0376 17.9624 14.5 21 14.5C24.0376 14.5 26.5 12.0376 26.5 9C26.5 5.96243 24.0376 3.5 21 3.5ZM3.5 16C3.5 12.9624 5.96243 10.5 9 10.5C12.0376 10.5 14.5 12.9624 14.5 16C14.5 19.0376 12.0376 21.5 9 21.5C5.96243 21.5 3.5 19.0376 3.5 16ZM15.5 23C15.5 19.9624 17.9624 17.5 21 17.5C24.0376 17.5 26.5 19.9624 26.5 23C26.5 26.0376 24.0376 28.5 21 28.5C17.9624 28.5 15.5 26.0376 15.5 23Z",fill:"#7F64FF"})),jh||(jh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M20.2756 20.6208C20.3042 20.4777 20.3185 20.4062 20.3257 20.3807C20.5165 19.6989 21.483 19.6989 21.6739 20.3807C21.681 20.4062 21.6953 20.4777 21.7239 20.6208C21.7377 20.6898 21.7446 20.7243 21.752 20.7558C21.9252 21.4964 22.5034 22.0747 23.244 22.2478C23.2755 22.2552 23.31 22.2621 23.3791 22.2759C23.5221 22.3045 23.5936 22.3188 23.6191 22.326C24.3009 22.5168 24.3009 23.4833 23.6191 23.6742C23.5936 23.6813 23.5221 23.6956 23.3791 23.7242C23.31 23.738 23.2755 23.7449 23.244 23.7523C22.5034 23.9255 21.9252 24.5037 21.752 25.2443C21.7446 25.2758 21.7377 25.3103 21.7239 25.3794C21.6953 25.5224 21.681 25.594 21.6739 25.6194C21.483 26.3012 20.5165 26.3012 20.3257 25.6194C20.3185 25.594 20.3042 25.5224 20.2756 25.3794C20.2618 25.3103 20.2549 25.2758 20.2475 25.2443C20.0744 24.5037 19.4961 23.9255 18.7555 23.7523C18.724 23.7449 18.6895 23.738 18.6204 23.7242C18.4774 23.6956 18.4059 23.6813 18.3804 23.6742C17.6986 23.4833 17.6986 22.5168 18.3804 22.326C18.4059 22.3188 18.4774 22.3045 18.6204 22.2759C18.6895 22.2621 18.724 22.2552 18.7555 22.2478C19.4961 22.0747 20.0744 21.4964 20.2475 20.7558C20.2549 20.7243 20.2618 20.6898 20.2756 20.6208Z",fill:"#5531FF"}))),kh||(kh=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("path",{d:"M20.2756 6.62075C20.3042 6.4777 20.3185 6.40617 20.3257 6.38071C20.5165 5.69893 21.483 5.69893 21.6739 6.38071C21.681 6.40617 21.6953 6.4777 21.7239 6.62075C21.7377 6.6898 21.7446 6.72432 21.752 6.75579C21.9252 7.49639 22.5034 8.07466 23.244 8.24785C23.2755 8.25521 23.31 8.26211 23.3791 8.27592C23.5221 8.30453 23.5936 8.31884 23.6191 8.32596C24.3009 8.51678 24.3009 9.48335 23.6191 9.67416C23.5936 9.68128 23.5221 9.69559 23.3791 9.7242C23.31 9.73801 23.2755 9.74491 23.244 9.75227C22.5034 9.92546 21.9252 10.5037 21.752 11.2443C21.7446 11.2758 21.7377 11.3103 21.7239 11.3794C21.6953 11.5224 21.681 11.594 21.6739 11.6194C21.483 12.3012 20.5165 12.3012 20.3257 11.6194C20.3185 11.594 20.3042 11.5224 20.2756 11.3794C20.2618 11.3103 20.2549 11.2758 20.2475 11.2443C20.0744 10.5037 19.4961 9.92546 18.7555 9.75227C18.724 9.74491 18.6895 9.73801 18.6204 9.7242C18.4774 9.69559 18.4059 9.68128 18.3804 9.67416C17.6986 9.48335 17.6986 8.51678 18.3804 8.32596C18.4059 8.31884 18.4774 8.30453 18.6204 8.27592C18.6895 8.26211 18.724 8.25521 18.7555 8.24785C19.4961 8.07466 20.0744 7.49639 20.2475 6.75579C20.2549 6.72432 20.2618 6.6898 20.2756 6.62075Z",fill:"#5531FF"}))),Oh||(Oh=p.createElement("g",{filter:"url(#filter2_d)"},p.createElement("path",{d:"M8.27562 13.6208C8.30423 13.4777 8.31853 13.4062 8.32566 13.3807C8.51647 12.6989 9.48304 12.6989 9.67385 13.3807C9.68098 13.4062 9.69528 13.4777 9.72389 13.6208C9.7377 13.6898 9.74461 13.7243 9.75197 13.7558C9.92515 14.4964 10.5034 15.0747 11.244 15.2478C11.2755 15.2552 11.31 15.2621 11.3791 15.2759C11.5221 15.3045 11.5936 15.3188 11.6191 15.326C12.3009 15.5168 12.3009 16.4833 11.6191 16.6742C11.5936 16.6813 11.5221 16.6956 11.3791 16.7242C11.31 16.738 11.2755 16.7449 11.244 16.7523C10.5034 16.9255 9.92515 17.5037 9.75197 18.2443C9.74461 18.2758 9.7377 18.3103 9.72389 18.3794C9.69528 18.5224 9.68098 18.594 9.67385 18.6194C9.48304 19.3012 8.51647 19.3012 8.32566 18.6194C8.31853 18.594 8.30423 18.5224 8.27562 18.3794C8.26181 18.3103 8.2549 18.2758 8.24754 18.2443C8.07436 17.5037 7.49609 16.9255 6.75549 16.7523C6.72401 16.7449 6.68949 16.738 6.62045 16.7242C6.47739 16.6956 6.40587 16.6813 6.38041 16.6742C5.69862 16.4833 5.69862 15.5168 6.38041 15.326C6.40587 15.3188 6.47739 15.3045 6.62045 15.2759C6.68949 15.2621 6.72401 15.2552 6.75549 15.2478C7.49609 15.0747 8.07436 14.4964 8.24754 13.7558C8.2549 13.7243 8.26181 13.6898 8.27562 13.6208Z",fill:"#5531FF"}))),Rh||(Rh=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:14.8691,y:17.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:14.8691,y:3.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter2_d",x:2.86914,y:10.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Ph=(0,p.forwardRef)(Th);n.p;var Ih,Lh,Mh,Kh,Dh,Nh=["title","titleId"];function Vh(){return Vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bh=function(e,t){var n=e.title,r=e.titleId,o=zh(e,Nh);return p.createElement("svg",Vh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ih||(Ih=p.createElement("path",{opacity:.4,fillRule:"evenodd",clipRule:"evenodd",d:"M7 8C7 7.44772 7.44772 7 8 7H24C24.5523 7 25 7.44772 25 8C25 8.47669 24.6665 8.87548 24.22 8.97572C24.2831 9.22777 24.2486 9.50407 24.1017 9.74285L19.9523 16.4855C21.2075 17.5853 22 19.2001 22 21C22 24.3137 19.3137 27 16 27C12.6863 27 10 24.3137 10 21C10 17.6863 12.6863 15 16 15C16.7956 15 17.555 15.1548 18.2498 15.4361L22.2104 9H8C7.44772 9 7 8.55228 7 8Z",fill:"currentColor"})),Lh||(Lh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("rect",{x:21.5,y:5.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),Mh||(Mh=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("rect",{x:5.5,y:5.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),Kh||(Kh=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1464 17.6464C15 17.7929 15 18.0286 15 18.5V20H13.5C13.0286 20 12.7929 20 12.6464 20.1464C12.5 20.2929 12.5 20.5286 12.5 21C12.5 21.4714 12.5 21.7071 12.6464 21.8536C12.7929 22 13.0286 22 13.5 22H15V23.5C15 23.9714 15 24.2071 15.1464 24.3536C15.2929 24.5 15.5286 24.5 16 24.5C16.4714 24.5 16.7071 24.5 16.8536 24.3536C17 24.2071 17 23.9714 17 23.5V22H18.5C18.9714 22 19.2071 22 19.3536 21.8536C19.5 21.7071 19.5 21.4714 19.5 21C19.5 20.5286 19.5 20.2929 19.3536 20.1464C19.2071 20 18.9714 20 18.5 20H17V18.5C17 18.0286 17 17.7929 16.8536 17.6464C16.7071 17.5 16.4714 17.5 16 17.5C15.5286 17.5 15.2929 17.5 15.1464 17.6464Z",fill:"white"})),Dh||(Dh=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:18.5,y:3.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:2.5,y:3.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Hh=(0,p.forwardRef)(Bh);n.p;var Fh,Wh,$h,Uh,Zh,Gh=["title","titleId"];function Yh(){return Yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qh=function(e,t){var n=e.title,r=e.titleId,o=Xh(e,Gh);return p.createElement("svg",Yh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Fh||(Fh=p.createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M7 8C7 7.44772 7.44772 7 8 7H24C24.5523 7 25 7.44772 25 8C25 8.47669 24.6665 8.87548 24.22 8.97572C24.2831 9.22777 24.2486 9.50407 24.1017 9.74285L19.9523 16.4855C21.2075 17.5853 22 19.2001 22 21C22 24.3137 19.3137 27 16 27C12.6863 27 10 24.3137 10 21C10 17.6863 12.6863 15 16 15C16.7956 15 17.555 15.1548 18.2498 15.4361L22.2104 9H8C7.44772 9 7 8.55228 7 8Z",fill:"#7F64FF"})),Wh||(Wh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M23.2756 5.62075C23.3042 5.4777 23.3185 5.40617 23.3257 5.38071C23.5165 4.69893 24.483 4.69893 24.6739 5.38071C24.681 5.40617 24.6953 5.4777 24.7239 5.62075C24.7377 5.6898 24.7446 5.72432 24.752 5.75579C24.9252 6.49639 25.5034 7.07466 26.244 7.24785C26.2755 7.25521 26.31 7.26211 26.3791 7.27592C26.5221 7.30453 26.5936 7.31884 26.6191 7.32596C27.3009 7.51678 27.3009 8.48335 26.6191 8.67416C26.5936 8.68128 26.5221 8.69559 26.3791 8.7242C26.31 8.73801 26.2755 8.74491 26.244 8.75227C25.5034 8.92546 24.9252 9.50373 24.752 10.2443C24.7446 10.2758 24.7377 10.3103 24.7239 10.3794C24.6953 10.5224 24.681 10.594 24.6739 10.6194C24.483 11.3012 23.5165 11.3012 23.3257 10.6194C23.3185 10.594 23.3042 10.5224 23.2756 10.3794C23.2618 10.3103 23.2549 10.2758 23.2475 10.2443C23.0744 9.50373 22.4961 8.92546 21.7555 8.75227C21.724 8.74491 21.6895 8.73801 21.6204 8.7242C21.4774 8.69559 21.4059 8.68128 21.3804 8.67416C20.6986 8.48335 20.6986 7.51678 21.3804 7.32596C21.4059 7.31884 21.4774 7.30453 21.6204 7.27592C21.6895 7.26211 21.724 7.25521 21.7555 7.24785C22.4961 7.07466 23.0744 6.49639 23.2475 5.75579C23.2549 5.72432 23.2618 5.6898 23.2756 5.62075Z",fill:"#5531FF"}))),$h||($h=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("path",{d:"M7.27562 5.62075C7.30423 5.4777 7.31853 5.40617 7.32566 5.38071C7.51647 4.69893 8.48304 4.69893 8.67385 5.38071C8.68098 5.40617 8.69528 5.4777 8.72389 5.62075C8.7377 5.6898 8.74461 5.72432 8.75197 5.75579C8.92515 6.49639 9.50342 7.07466 10.244 7.24785C10.2755 7.25521 10.31 7.26211 10.3791 7.27592C10.5221 7.30453 10.5936 7.31884 10.6191 7.32596C11.3009 7.51678 11.3009 8.48335 10.6191 8.67416C10.5936 8.68128 10.5221 8.69559 10.3791 8.7242C10.31 8.73801 10.2755 8.74491 10.244 8.75227C9.50342 8.92546 8.92515 9.50373 8.75197 10.2443C8.74461 10.2758 8.7377 10.3103 8.72389 10.3794C8.69528 10.5224 8.68098 10.594 8.67385 10.6194C8.48304 11.3012 7.51647 11.3012 7.32566 10.6194C7.31853 10.594 7.30423 10.5224 7.27562 10.3794C7.26181 10.3103 7.2549 10.2758 7.24754 10.2443C7.07436 9.50373 6.49609 8.92546 5.75549 8.75227C5.72401 8.74491 5.68949 8.73801 5.62045 8.7242C5.47739 8.69559 5.40587 8.68128 5.38041 8.67416C4.69862 8.48335 4.69862 7.51678 5.38041 7.32596C5.40587 7.31884 5.47739 7.30453 5.62045 7.27592C5.68949 7.26211 5.72401 7.25521 5.75549 7.24785C6.49609 7.07466 7.07436 6.49639 7.24754 5.75579C7.2549 5.72432 7.26181 5.6898 7.27562 5.62075Z",fill:"#5531FF"}))),Uh||(Uh=p.createElement("path",{d:"M15.3476 18.2609C15.4706 17.6459 15.5321 17.3384 15.602 17.2466C15.8021 16.9839 16.1974 16.9839 16.3975 17.2466C16.4674 17.3384 16.5289 17.6459 16.6519 18.2609C16.735 18.676 16.7765 18.8836 16.8508 19.0636C17.0538 19.5554 17.4444 19.946 17.9362 20.149C18.1162 20.2234 18.3238 20.2649 18.7389 20.3479C19.3539 20.4709 19.6614 20.5324 19.7532 20.6023C20.0159 20.8024 20.0159 21.1977 19.7532 21.3978C19.6614 21.4677 19.3539 21.5292 18.7389 21.6522C18.3238 21.7353 18.1162 21.7768 17.9362 21.8511C17.4444 22.0541 17.0538 22.4447 16.8508 22.9365C16.7765 23.1165 16.735 23.3241 16.6519 23.7392C16.5289 24.3542 16.4674 24.6617 16.3975 24.7535C16.1974 25.0162 15.8021 25.0162 15.602 24.7535C15.5321 24.6617 15.4706 24.3542 15.3476 23.7392C15.2646 23.3241 15.223 23.1165 15.1487 22.9365C14.9457 22.4447 14.5551 22.0541 14.0633 21.8511C13.8833 21.7768 13.6757 21.7353 13.2606 21.6522C12.6456 21.5292 12.3381 21.4677 12.2463 21.3978C11.9836 21.1977 11.9836 20.8024 12.2463 20.6023C12.3381 20.5324 12.6456 20.4709 13.2606 20.3479C13.6757 20.2649 13.8833 20.2234 14.0633 20.149C14.5551 19.946 14.9457 19.5554 15.1487 19.0636C15.223 18.8836 15.2646 18.676 15.3476 18.2609Z",fill:"white"})),Zh||(Zh=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:17.8691,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:1.86914,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Jh=(0,p.forwardRef)(qh);n.p;var Qh,eg,tg,ng,rg=["title","titleId"];function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ag=function(e,t){var n=e.title,r=e.titleId,o=ig(e,rg);return p.createElement("svg",og({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Qh||(Qh=p.createElement("path",{opacity:.4,d:"M5 7H21C23.8284 7 25.2426 7 26.1213 7.87868C27 8.75736 27 10.1716 27 13V25H11C8.17157 25 6.75736 25 5.87868 24.1213C5 23.2426 5 21.8284 5 19V7Z",fill:"currentColor"})),eg||(eg=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("rect",{x:23,y:21,width:5,height:5,rx:2.5,fill:"currentColor"}))),tg||(tg=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("rect",{x:4,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),ng||(ng=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:20,y:19,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:1,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},sg=(0,p.forwardRef)(ag);n.p;var lg,cg,dg,ug,hg=["title","titleId"];function gg(){return gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pg=function(e,t){var n=e.title,r=e.titleId,o=mg(e,hg);return p.createElement("svg",gg({viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,lg||(lg=p.createElement("path",{opacity:.6,d:"M6 7H22C24.8284 7 26.2426 7 27.1213 7.87868C28 8.75736 28 10.1716 28 13V25H12C9.17157 25 7.75736 25 6.87868 24.1213C6 23.2426 6 21.8284 6 19V7Z",fill:"#7F64FF"})),cg||(cg=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M26.2756 21.6208C26.3042 21.4777 26.3185 21.4062 26.3257 21.3807C26.5165 20.6989 27.483 20.6989 27.6739 21.3807C27.681 21.4062 27.6953 21.4777 27.7239 21.6208C27.7377 21.6898 27.7446 21.7243 27.752 21.7558C27.9252 22.4964 28.5034 23.0747 29.244 23.2478C29.2755 23.2552 29.31 23.2621 29.3791 23.2759C29.5221 23.3045 29.5936 23.3188 29.6191 23.326C30.3009 23.5168 30.3009 24.4833 29.6191 24.6742C29.5936 24.6813 29.5221 24.6956 29.3791 24.7242C29.31 24.738 29.2755 24.7449 29.244 24.7523C28.5034 24.9255 27.9252 25.5037 27.752 26.2443C27.7446 26.2758 27.7377 26.3103 27.7239 26.3794C27.6953 26.5224 27.681 26.594 27.6739 26.6194C27.483 27.3012 26.5165 27.3012 26.3257 26.6194C26.3185 26.594 26.3042 26.5224 26.2756 26.3794C26.2618 26.3103 26.2549 26.2758 26.2475 26.2443C26.0744 25.5037 25.4961 24.9255 24.7555 24.7523C24.724 24.7449 24.6895 24.738 24.6204 24.7242C24.4774 24.6956 24.4059 24.6813 24.3804 24.6742C23.6986 24.4833 23.6986 23.5168 24.3804 23.326C24.4059 23.3188 24.4774 23.3045 24.6204 23.2759C24.6895 23.2621 24.724 23.2552 24.7555 23.2478C25.4961 23.0747 26.0744 22.4964 26.2475 21.7558C26.2549 21.7243 26.2618 21.6898 26.2756 21.6208Z",fill:"#5531FF"}))),dg||(dg=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("path",{d:"M6.27562 5.62075C6.30423 5.4777 6.31853 5.40617 6.32566 5.38071C6.51647 4.69893 7.48304 4.69893 7.67385 5.38071C7.68098 5.40617 7.69528 5.4777 7.72389 5.62075C7.7377 5.6898 7.74461 5.72432 7.75197 5.75579C7.92515 6.49639 8.50342 7.07466 9.24402 7.24785C9.2755 7.25521 9.31002 7.26211 9.37907 7.27592C9.52212 7.30453 9.59365 7.31884 9.6191 7.32596C10.3009 7.51678 10.3009 8.48335 9.6191 8.67416C9.59365 8.68128 9.52212 8.69559 9.37907 8.7242C9.31002 8.73801 9.2755 8.74491 9.24402 8.75227C8.50342 8.92546 7.92515 9.50373 7.75197 10.2443C7.74461 10.2758 7.7377 10.3103 7.72389 10.3794C7.69528 10.5224 7.68098 10.594 7.67385 10.6194C7.48304 11.3012 6.51647 11.3012 6.32566 10.6194C6.31853 10.594 6.30423 10.5224 6.27562 10.3794C6.26181 10.3103 6.2549 10.2758 6.24754 10.2443C6.07436 9.50373 5.49609 8.92546 4.75549 8.75227C4.72401 8.74491 4.68949 8.73801 4.62045 8.7242C4.47739 8.69559 4.40587 8.68128 4.38041 8.67416C3.69862 8.48335 3.69862 7.51678 4.38041 7.32596C4.40587 7.31884 4.47739 7.30453 4.62045 7.27592C4.68949 7.26211 4.72401 7.25521 4.75549 7.24785C5.49609 7.07466 6.07436 6.49639 6.24754 5.75579C6.2549 5.72432 6.26181 5.6898 6.27562 5.62075Z",fill:"#5531FF"}))),ug||(ug=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:20.8691,y:18.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},fg=(0,p.forwardRef)(pg);n.p;var vg,yg,bg,xg,wg,Cg=["title","titleId"];function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kg=function(e,t){var n=e.title,r=e.titleId,o=jg(e,Cg);return p.createElement("svg",Sg({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,vg||(vg=p.createElement("path",{opacity:.4,d:"M5 7H21C23.8284 7 25.2426 7 26.1213 7.87868C27 8.75736 27 10.1716 27 13V25H11C8.17157 25 6.75736 25 5.87868 24.1213C5 23.2426 5 21.8284 5 19V7Z",fill:"currentColor"})),yg||(yg=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("rect",{x:23,y:21,width:5,height:5,rx:2.5,fill:"currentColor"}))),bg||(bg=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("rect",{x:4,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),xg||(xg=p.createElement("g",{filter:"url(#filter2_d)"},p.createElement("rect",{x:23,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),wg||(wg=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:20,y:19,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:1,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter2_d",x:20,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Og=(0,p.forwardRef)(kg);n.p;var Rg,Eg,_g,Ag,Tg,Pg=["title","titleId"];function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mg=function(e,t){var n=e.title,r=e.titleId,o=Lg(e,Pg);return p.createElement("svg",Ig({viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Rg||(Rg=p.createElement("path",{opacity:.6,d:"M6 7H22C24.8284 7 26.2426 7 27.1213 7.87868C28 8.75736 28 10.1716 28 13V25H12C9.17157 25 7.75736 25 6.87868 24.1213C6 23.2426 6 21.8284 6 19V7Z",fill:"#7F64FF"})),Eg||(Eg=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M26.2756 21.6208C26.3042 21.4777 26.3185 21.4062 26.3257 21.3807C26.5165 20.6989 27.483 20.6989 27.6739 21.3807C27.681 21.4062 27.6953 21.4777 27.7239 21.6208C27.7377 21.6898 27.7446 21.7243 27.752 21.7558C27.9252 22.4964 28.5034 23.0747 29.244 23.2478C29.2755 23.2552 29.31 23.2621 29.3791 23.2759C29.5221 23.3045 29.5936 23.3188 29.6191 23.326C30.3009 23.5168 30.3009 24.4833 29.6191 24.6742C29.5936 24.6813 29.5221 24.6956 29.3791 24.7242C29.31 24.738 29.2755 24.7449 29.244 24.7523C28.5034 24.9255 27.9252 25.5037 27.752 26.2443C27.7446 26.2758 27.7377 26.3103 27.7239 26.3794C27.6953 26.5224 27.681 26.594 27.6739 26.6194C27.483 27.3012 26.5165 27.3012 26.3257 26.6194C26.3185 26.594 26.3042 26.5224 26.2756 26.3794C26.2618 26.3103 26.2549 26.2758 26.2475 26.2443C26.0744 25.5037 25.4961 24.9255 24.7555 24.7523C24.724 24.7449 24.6895 24.738 24.6204 24.7242C24.4774 24.6956 24.4059 24.6813 24.3804 24.6742C23.6986 24.4833 23.6986 23.5168 24.3804 23.326C24.4059 23.3188 24.4774 23.3045 24.6204 23.2759C24.6895 23.2621 24.724 23.2552 24.7555 23.2478C25.4961 23.0747 26.0744 22.4964 26.2475 21.7558C26.2549 21.7243 26.2618 21.6898 26.2756 21.6208Z",fill:"#5531FF"}))),_g||(_g=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("path",{d:"M6.27562 5.62075C6.30423 5.4777 6.31853 5.40617 6.32566 5.38071C6.51647 4.69893 7.48304 4.69893 7.67385 5.38071C7.68098 5.40617 7.69528 5.4777 7.72389 5.62075C7.7377 5.6898 7.74461 5.72432 7.75197 5.75579C7.92515 6.49639 8.50342 7.07466 9.24402 7.24785C9.2755 7.25521 9.31002 7.26211 9.37907 7.27592C9.52212 7.30453 9.59365 7.31884 9.6191 7.32596C10.3009 7.51678 10.3009 8.48335 9.6191 8.67416C9.59365 8.68128 9.52212 8.69559 9.37907 8.7242C9.31002 8.73801 9.2755 8.74491 9.24402 8.75227C8.50342 8.92546 7.92515 9.50373 7.75197 10.2443C7.74461 10.2758 7.7377 10.3103 7.72389 10.3794C7.69528 10.5224 7.68098 10.594 7.67385 10.6194C7.48304 11.3012 6.51647 11.3012 6.32566 10.6194C6.31853 10.594 6.30423 10.5224 6.27562 10.3794C6.26181 10.3103 6.2549 10.2758 6.24754 10.2443C6.07436 9.50373 5.49609 8.92546 4.75549 8.75227C4.72401 8.74491 4.68949 8.73801 4.62045 8.7242C4.47739 8.69559 4.40587 8.68128 4.38041 8.67416C3.69862 8.48335 3.69862 7.51678 4.38041 7.32596C4.40587 7.31884 4.47739 7.30453 4.62045 7.27592C4.68949 7.26211 4.72401 7.25521 4.75549 7.24785C5.49609 7.07466 6.07436 6.49639 6.24754 5.75579C6.2549 5.72432 6.26181 5.6898 6.27562 5.62075Z",fill:"#5531FF"}))),Ag||(Ag=p.createElement("g",{filter:"url(#filter2_d)"},p.createElement("path",{transform:"translate(20)",d:"M6.27562 5.62075C6.30423 5.4777 6.31853 5.40617 6.32566 5.38071C6.51647 4.69893 7.48304 4.69893 7.67385 5.38071C7.68098 5.40617 7.69528 5.4777 7.72389 5.62075C7.7377 5.6898 7.74461 5.72432 7.75197 5.75579C7.92515 6.49639 8.50342 7.07466 9.24402 7.24785C9.2755 7.25521 9.31002 7.26211 9.37907 7.27592C9.52212 7.30453 9.59365 7.31884 9.6191 7.32596C10.3009 7.51678 10.3009 8.48335 9.6191 8.67416C9.59365 8.68128 9.52212 8.69559 9.37907 8.7242C9.31002 8.73801 9.2755 8.74491 9.24402 8.75227C8.50342 8.92546 7.92515 9.50373 7.75197 10.2443C7.74461 10.2758 7.7377 10.3103 7.72389 10.3794C7.69528 10.5224 7.68098 10.594 7.67385 10.6194C7.48304 11.3012 6.51647 11.3012 6.32566 10.6194C6.31853 10.594 6.30423 10.5224 6.27562 10.3794C6.26181 10.3103 6.2549 10.2758 6.24754 10.2443C6.07436 9.50373 5.49609 8.92546 4.75549 8.75227C4.72401 8.74491 4.68949 8.73801 4.62045 8.7242C4.47739 8.69559 4.40587 8.68128 4.38041 8.67416C3.69862 8.48335 3.69862 7.51678 4.38041 7.32596C4.40587 7.31884 4.47739 7.30453 4.62045 7.27592C4.68949 7.26211 4.72401 7.25521 4.75549 7.24785C5.49609 7.07466 6.07436 6.49639 6.24754 5.75579C6.2549 5.72432 6.26181 5.6898 6.27562 5.62075Z",fill:"#5531FF"}))),Tg||(Tg=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:20.8691,y:18.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter2_d",x:20.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Kg=(0,p.forwardRef)(Mg);n.p;var Dg,Ng,Vg=["title","titleId"];function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hg=function(e,t){var n=e.title,r=e.titleId,o=Bg(e,Vg);return p.createElement("svg",zg({viewBox:"0 0 489.059 489.059",fill:"none",width:"32px",height:"32px",style:{padding:6},xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Dg||(Dg=p.createElement("defs",null,p.createElement("linearGradient",{id:"paint0_linear",x1:10.4999,y1:10,x2:28.9999,y2:27,gradientUnits:"userSpaceOnUse"},p.createElement("stop",{stopOpacity:.8,stopColor:"var(--text-color-hover)"}),p.createElement("stop",{offset:1,stopOpacity:.4,stopColor:"var(--text-color-hover)"})))),Ng||(Ng=p.createElement("g",{opacity:.5},p.createElement("path",{d:"M481.211,443.368L224.809,186.946l55.817-17.364c3.88-1.196,6.736-4.509,7.38-8.528c0.642-4.018-1.058-8.051-4.383-10.385 l-56.798-40.165c-9.814-6.913-15.56-18.2-15.417-30.172l0.916-69.519c0.051-4.06-2.23-7.796-5.837-9.647 c-3.608-1.844-7.976-1.483-11.225,0.962l-55.73,41.584c-9.588,7.163-22.117,9.136-33.439,5.294L40.246,26.678 c-3.848-1.315-8.118-0.322-11.007,2.55c-2.868,2.872-3.847,7.138-2.563,10.987l22.376,65.862c3.8,11.343,1.828,23.837-5.325,33.438 L2.131,195.245c-2.418,3.272-2.819,7.628-0.977,11.236c1.859,3.633,5.599,5.887,9.688,5.84l69.502-0.898 c11.971-0.153,23.244,5.582,30.174,15.366l40.149,56.807c2.373,3.32,6.401,5.021,10.412,4.387c4.025-0.632,7.314-3.497,8.518-7.378 l17.375-55.805l256.389,256.422c5.243,5.221,12.094,7.836,18.908,7.836c6.885,0,13.73-2.615,18.943-7.836 C491.671,470.772,491.671,453.826,481.211,443.368z",fill:"url(#paint0_linear)"}))))},Fg=(0,p.forwardRef)(Hg);n.p;var Wg,$g,Ug,Zg=["title","titleId"];function Gg(){return Gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xg=function(e,t){var n=e.title,r=e.titleId,o=Yg(e,Zg);return p.createElement("svg",Gg({viewBox:"0 0 33 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Wg||(Wg=p.createElement("rect",{x:20.1183,y:3.64455,width:13.354,height:23.2808,rx:2,transform:"rotate(45 20.1183 3.64455)",fill:"url(#paint0_linear)"})),$g||($g=p.createElement("rect",{x:11.0722,y:12.6907,width:13.354,height:1.94005,transform:"rotate(45 11.0722 12.6907)",fill:"white"})),Ug||(Ug=p.createElement("defs",null,p.createElement("linearGradient",{id:"paint0_linear",x1:26.7953,y1:3.64455,x2:26.7953,y2:26.9253,gradientUnits:"userSpaceOnUse"},p.createElement("stop",{stopColor:"#617ADA"}),p.createElement("stop",{offset:.572917,stopColor:"#617ADA"}),p.createElement("stop",{offset:.625,stopColor:"#FF2A2A"}),p.createElement("stop",{offset:1,stopColor:"#FF2A2A"})))))},qg=(0,p.forwardRef)(Xg);n.p;var Jg,Qg=["title","titleId"];function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nm=function(e,t){var n=e.title,r=e.titleId,o=tm(e,Qg);return p.createElement("svg",em({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Jg||(Jg=p.createElement("g",{opacity:.4},p.createElement("path",{d:"M10 14H13V14.5C13 14.7761 13.2239 15 13.5 15C13.7761 15 14 14.7761 14 14.5V14H17V14.5C17 14.7761 17.2239 15 17.5 15C17.7761 15 18 14.7761 18 14.5V14H20C20.5523 14 21 14.4477 21 15V15.5C21 15.7761 21.2239 16 21.5 16C21.7761 16 22 15.7761 22 15.5V15C22 14.4477 22.4477 14 23 14H25C25 22 23 27 17 27C16.0712 27 15.6067 27 15.2168 26.9487C12.5244 26.5942 10.4058 24.4756 10.0513 21.7832C10 21.3933 10 20.9288 10 20V14Z",fill:"currentColor"}),p.createElement("path",{d:"M22 10C22 9.17157 22.6716 8.5 23.5 8.5C24.3284 8.5 25 9.17157 25 10V15.5C25 16.3284 24.3284 17 23.5 17C22.6716 17 22 16.3284 22 15.5V10Z",fill:"currentColor"}),p.createElement("path",{d:"M18 7C18 6.17157 18.6716 5.5 19.5 5.5C20.3284 5.5 21 6.17157 21 7V15.5C21 16.3284 20.3284 17 19.5 17C18.6716 17 18 16.3284 18 15.5V7Z",fill:"currentColor"}),p.createElement("path",{d:"M14 6.5C14 5.67157 14.6716 5 15.5 5C16.3284 5 17 5.67157 17 6.5V15.5C17 16.3284 16.3284 17 15.5 17C14.6716 17 14 16.3284 14 15.5V6.5Z",fill:"currentColor"}),p.createElement("path",{d:"M10 8.5C10 7.67157 10.6716 7 11.5 7C12.3284 7 13 7.67157 13 8.5V15.5C13 16.3284 12.3284 17 11.5 17C10.6716 17 10 16.3284 10 15.5V8.5Z",fill:"currentColor"}),p.createElement("path",{d:"M7.0002 15.0001C9.50018 17.5 10.5002 25 15.4289 25.4",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round"}))))},rm=(0,p.forwardRef)(nm);n.p;var om,im=["title","titleId"];function am(){return am=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lm=function(e,t){var n=e.title,r=e.titleId,o=sm(e,im);return p.createElement("svg",am({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,om||(om=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 6C15 5.44772 15.4477 5 16 5C16.5523 5 17 5.44772 17 6V9.07089C17.5568 9.15054 18.0926 9.29573 18.5991 9.49838L20.134 6.83972C20.4102 6.36143 21.0218 6.19755 21.5001 6.47369C21.9784 6.74984 22.1422 7.36143 21.8661 7.83972L20.3303 10.4998C20.7648 10.8423 21.1577 11.2353 21.5003 11.6698L24.1603 10.134C24.6386 9.85783 25.2502 10.0217 25.5264 10.5C25.8025 10.9783 25.6386 11.5899 25.1603 11.866L22.5016 13.401C22.7043 13.9075 22.8495 14.4432 22.9291 15H26C26.5523 15 27 15.4477 27 16C27 16.5523 26.5523 17 26 17H22.9291C22.8495 17.5568 22.7043 18.0926 22.5016 18.5991L25.1602 20.134C25.6385 20.4101 25.8023 21.0217 25.5262 21.5C25.25 21.9783 24.6385 22.1422 24.1602 21.866L21.5002 20.3303C21.1577 20.7648 20.7648 21.1577 20.3303 21.5002L21.8661 24.1602C22.1422 24.6385 21.9784 25.2501 21.5001 25.5263C21.0218 25.8024 20.4102 25.6385 20.134 25.1602L18.5991 22.5016C18.0926 22.7043 17.5569 22.8495 17 22.9291V26C17 26.5523 16.5523 27 16 27C15.4477 27 15 26.5523 15 26V22.9291C14.4432 22.8495 13.9075 22.7043 13.401 22.5016L11.8661 25.1602C11.5899 25.6385 10.9784 25.8024 10.5001 25.5263C10.0218 25.2501 9.85789 24.6385 10.134 24.1602L11.6698 21.5003C11.2353 21.1577 10.8423 20.7648 10.4998 20.3303L7.83983 21.866C7.36154 22.1422 6.74995 21.9783 6.47381 21.5C6.19767 21.0217 6.36154 20.4101 6.83983 20.134L9.49839 18.5991C9.29573 18.0926 9.15054 17.5568 9.07089 17H6C5.44772 17 5 16.5523 5 16C5 15.4477 5.44772 15 6 15H9.07089C9.15054 14.4432 9.29571 13.9075 9.49835 13.401L6.83966 11.866C6.36137 11.5899 6.19749 10.9783 6.47363 10.5C6.74977 10.0217 7.36137 9.85783 7.83966 10.134L10.4997 11.6698C10.8423 11.2352 11.2352 10.8423 11.6698 10.4997L10.134 7.83972C9.85789 7.36143 10.0218 6.74984 10.5001 6.47369C10.9784 6.19755 11.5899 6.36143 11.8661 6.83972L13.401 9.49835C13.9075 9.29571 14.4432 9.15053 15 9.07089V6ZM16 11C18.7614 11 21 13.2386 21 16C21 18.7614 18.7614 21 16 21C13.2386 21 11 18.7614 11 16C11 13.2386 13.2386 11 16 11Z",fill:"currentColor",fillOpacity:.4})))},cm=(0,p.forwardRef)(lm);n.p;var dm,um=["title","titleId"];function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mm=function(e,t){var n=e.title,r=e.titleId,o=gm(e,um);return p.createElement("svg",hm({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,dm||(dm=p.createElement("g",{opacity:.4},p.createElement("mask",{id:"path-1-inside-1",fill:"white"},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 6C10.4772 6 6 10.4772 6 16C6 21.5228 10.4772 26 16 26C21.5228 26 26 21.5228 26 16C26 10.4772 21.5228 6 16 6ZM16 8C11.5817 8 8 11.5817 8 16C8 20.4183 11.5817 24 16 24V8Z"})),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 6C10.4772 6 6 10.4772 6 16C6 21.5228 10.4772 26 16 26C21.5228 26 26 21.5228 26 16C26 10.4772 21.5228 6 16 6ZM16 8C11.5817 8 8 11.5817 8 16C8 20.4183 11.5817 24 16 24V8Z",fill:"currentColor"}),p.createElement("path",{d:"M16 8V6H18V8H16ZM16 24H18V26H16V24ZM4 16C4 9.37258 9.37258 4 16 4V8C11.5817 8 8 11.5817 8 16H4ZM16 28C9.37258 28 4 22.6274 4 16H8C8 20.4183 11.5817 24 16 24V28ZM28 16C28 22.6274 22.6274 28 16 28V24C20.4183 24 24 20.4183 24 16H28ZM16 4C22.6274 4 28 9.37258 28 16H24C24 11.5817 20.4183 8 16 8V4ZM6 16C6 10.4772 10.4772 6 16 6V10C12.6863 10 10 12.6863 10 16H6ZM16 26C10.4772 26 6 21.5228 6 16H10C10 19.3137 12.6863 22 16 22V26ZM18 8V24H14V8H18Z",fill:"currentColor",mask:"url(#path-1-inside-1)"}))))},pm=(0,p.forwardRef)(mm);n.p;var fm,vm,ym,bm=["title","titleId"];function xm(){return xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Cm=function(e,t){var n=e.title,r=e.titleId,o=wm(e,bm);return p.createElement("svg",xm({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fm||(fm=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 13C21 15.4553 19.7359 17.6154 17.823 18.8648L18.9285 21.6286C19.1336 22.1414 18.8842 22.7234 18.3714 22.9285C17.8586 23.1336 17.2766 22.8842 17.0715 22.3714L16.0063 19.7083C15.3707 19.8981 14.6973 20 14 20C10.134 20 7 16.866 7 13C7 9.13401 10.134 6 14 6C17.866 6 21 9.13401 21 13ZM14 18C16.7614 18 19 15.7614 19 13C19 10.2386 16.7614 8 14 8C11.2386 8 9 10.2386 9 13C9 15.7614 11.2386 18 14 18Z",fill:"currentColor"})),vm||(vm=p.createElement("rect",{x:11,y:12,width:6,height:2,rx:.5,fill:"currentColor"})),ym||(ym=p.createElement("rect",{x:13,y:10,width:2,height:6,rx:.5,fill:"currentColor"})))},Sm=(0,p.forwardRef)(Cm);n.p;var jm,km,Om=["title","titleId"];function Rm(){return Rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _m=function(e,t){var n=e.title,r=e.titleId,o=Em(e,Om);return p.createElement("svg",Rm({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,jm||(jm=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 13C21 15.4553 19.7359 17.6154 17.823 18.8648L18.9285 21.6286C19.1336 22.1414 18.8842 22.7234 18.3714 22.9285C17.8586 23.1336 17.2766 22.8842 17.0715 22.3714L16.0063 19.7083C15.3707 19.8981 14.6973 20 14 20C10.134 20 7 16.866 7 13C7 9.13401 10.134 6 14 6C17.866 6 21 9.13401 21 13ZM14 18C16.7614 18 19 15.7614 19 13C19 10.2386 16.7614 8 14 8C11.2386 8 9 10.2386 9 13C9 15.7614 11.2386 18 14 18Z",fill:"currentColor"})),km||(km=p.createElement("rect",{x:11,y:12,width:6,height:2,rx:.5,fill:"currentColor"})))},Am=(0,p.forwardRef)(_m);n.p;var Tm,Pm,Im,Lm,Mm,Km=["title","titleId"];function Dm(){return Dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vm=function(e,t){var n=e.title,r=e.titleId,o=Nm(e,Km);return p.createElement("svg",Dm({width:32,height:32,viewBox:"-4 -4 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Tm||(Tm=p.createElement("path",{d:"M10.6242 8.5C10.3726 8.5 10.2328 8.20902 10.3899 8.01259L11.7657 6.29283C11.8858 6.1427 12.1142 6.1427 12.2343 6.29283L13.6101 8.01259C13.7672 8.20902 13.6274 8.5 13.3758 8.5H10.6242Z",fill:"currentColor"})),Pm||(Pm=p.createElement("path",{d:"M19.7072 11.7657C19.8573 11.8858 19.8573 12.1142 19.7072 12.2343L17.9874 13.6101C17.791 13.7672 17.5 13.6274 17.5 13.3758V10.6242C17.5 10.3726 17.791 10.2328 17.9874 10.3899L19.7072 11.7657Z",fill:"currentColor"})),Im||(Im=p.createElement("path",{d:"M4.29283 12.2343C4.1427 12.1142 4.1427 11.8858 4.29283 11.7657L6.01259 10.3899C6.20902 10.2328 6.5 10.3726 6.5 10.6242V13.3758C6.5 13.6274 6.20902 13.7672 6.01259 13.6101L4.29283 12.2343Z",fill:"currentColor"})),Lm||(Lm=p.createElement("path",{d:"M12.2343 17.7072C12.1142 17.8573 11.8858 17.8573 11.7657 17.7072L10.3899 15.9874C10.2328 15.791 10.3726 15.5 10.6242 15.5H13.3758C13.6274 15.5 13.7672 15.791 13.6101 15.9874L12.2343 17.7072Z",fill:"currentColor"})),Mm||(Mm=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3H21C22.1 3 23 3.9 23 5V19C23 20.1 22.1 21 21 21H3C1.9 21 1 20.1 1 19V5C1 3.9 1.9 3 3 3ZM21 5H3V19H21V5Z",fill:"currentColor",fillOpacity:.4})))},zm=(0,p.forwardRef)(Vm);n.p;var Bm,Hm,Fm,Wm=["title","titleId"];function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Zm=function(e,t){var n=e.title,r=e.titleId,o=Um(e,Wm);return p.createElement("svg",$m({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Bm||(Bm=p.createElement("path",{opacity:.4,d:"M12.5 9.5L19.4 24",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round"})),Hm||(Hm=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M11 8.16549V21.0032C11 21.7436 11.9996 21.9771 12.3276 21.3133L14.8549 16.1985C15.0578 15.7878 15.5138 15.5675 15.9617 15.6638L21.7844 16.916C22.4955 17.0689 22.9392 16.1704 22.3855 15.6988L12.6485 7.40425C11.9992 6.85116 11 7.31258 11 8.16549Z",fill:"currentColor"}))),Fm||(Fm=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:8,y:5.16357,width:17.6347,height:20.5406,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Gm=(0,p.forwardRef)(Zm);n.p;var Ym,Xm,qm=["title","titleId"];function Jm(){return Jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ep=function(e,t){var n=e.title,r=e.titleId,o=Qm(e,qm);return p.createElement("svg",Jm({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ym||(Ym=p.createElement("g",{clipPath:"url(#clip0)"},p.createElement("rect",{opacity:.4,x:10.686,y:8.79004,width:17,height:15,rx:3,transform:"rotate(5 10.686 8.79004)",fill:"currentColor"}),p.createElement("path",{opacity:.4,d:"M6.00007 14C5.00007 9 9.00007 4 15.0001 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M6.26297 12H5.73703C4.09201 12 3.2695 12 2.98684 12.5281C2.70419 13.0563 3.16044 13.7407 4.07293 15.1094L4.3359 15.5038C5.08851 16.6328 5.46482 17.1972 6 17.1972C6.53518 17.1972 6.91149 16.6328 7.6641 15.5038L7.92707 15.1094C8.83956 13.7407 9.29581 13.0563 9.01316 12.5281C8.7305 12 7.90799 12 6.26297 12Z",fill:"currentColor"})))),Xm||(Xm=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:-.0964355,y:10,width:12.1927,height:11.1972,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("clipPath",{id:"clip0"},p.createElement("rect",{width:32,height:32,fill:"white"})))))},tp=(0,p.forwardRef)(ep);n.p;var np,rp,op=["title","titleId"];function ip(){return ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sp=function(e,t){var n=e.title,r=e.titleId,o=ap(e,op);return p.createElement("svg",ip({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,np||(np=p.createElement("g",{clipPath:"url(#clip0)"},p.createElement("rect",{opacity:.4,width:17,height:15,rx:3,transform:"matrix(-0.996195 0.0871557 0.0871557 0.996195 21.314 8.79004)",fill:"currentColor"}),p.createElement("path",{opacity:.4,d:"M25.9999 14C26.9999 9 22.9999 4 16.9999 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M25.737 12H26.263C27.908 12 28.7305 12 29.0132 12.5281C29.2958 13.0563 28.8396 13.7407 27.9271 15.1094L27.6641 15.5038C26.9115 16.6328 26.5352 17.1972 26 17.1972C25.4648 17.1972 25.0885 16.6328 24.3359 15.5038L24.0729 15.1094C23.1604 13.7407 22.7042 13.0563 22.9868 12.5281C23.2695 12 24.092 12 25.737 12Z",fill:"currentColor"})))),rp||(rp=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:19.9036,y:10,width:12.1927,height:11.1972,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("clipPath",{id:"clip0"},p.createElement("rect",{width:32,height:32,fill:"white",transform:"matrix(-1 0 0 1 32 0)"})))))},lp=(0,p.forwardRef)(sp);n.p;var cp,dp=["title","titleId"];function up(){return up=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gp=function(e,t){var n=e.title,r=e.titleId,o=hp(e,dp);return p.createElement("svg",up({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,cp||(cp=p.createElement("path",{d:"M9 5H11V7H9V5ZM9 9H11V15H9V9ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18Z",fill:"#413C4A"})))},mp=(0,p.forwardRef)(gp);n.p;var pp,fp=["title","titleId"];function vp(){return vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var bp=function(e,t){var n=e.title,r=e.titleId,o=yp(e,fp);return p.createElement("svg",vp({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,pp||(pp=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2322 1.82833C19.1582 0.654906 16.7019 0 14 0C11.2981 0 8.84185 0.654906 6.76777 1.82833C4.6937 3.00176 3.00176 4.6937 1.82833 6.76777C0.654906 8.84185 0 11.2981 0 14C0 16.7019 0.654906 19.1582 1.82833 21.2322C3.00176 23.3063 4.6937 24.9982 6.76777 26.1717C8.84185 27.3451 11.2981 28 14 28C16.7019 28 19.1582 27.3451 21.2322 26.1717C23.3063 24.9982 24.9982 23.3063 26.1717 21.2322C27.3451 19.1582 28 16.7019 28 14C28 11.2981 27.3451 8.84185 26.1717 6.76777C24.9982 4.6937 23.3063 3.00176 21.2322 1.82833ZM15.4582 11.5025C15.481 10.9558 15.0528 10.5 14.501 10.5H11.0015C10.7296 10.5 10.5 10.7239 10.5 11V11.1502C10.5 11.3438 10.6374 11.5661 10.8069 11.6476L12.1287 12.283C12.373 12.4005 12.5904 12.7218 12.6031 12.9954L12.9582 21.4975C12.981 22.0442 13.4477 22.5 14 22.5L14.1176 22.4933C14.62 22.4353 15.0203 22.0116 15.0418 21.4975L15.4582 11.5025ZM15.5 7C15.5 6.17157 14.8284 5.5 14 5.5C13.1716 5.5 12.5 6.17157 12.5 7C12.5 7.82843 13.1716 8.5 14 8.5C14.8284 8.5 15.5 7.82843 15.5 7Z",fill:"currentColor"})))},xp=(0,p.forwardRef)(bp);n.p;var wp,Cp,Sp=["title","titleId"];function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Op=function(e,t){var n=e.title,r=e.titleId,o=kp(e,Sp);return p.createElement("svg",jp({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,wp||(wp=p.createElement("rect",{x:14,y:14,width:12,height:12,rx:2,fill:"white",stroke:"currentColor",strokeWidth:2})),Cp||(Cp=p.createElement("rect",{x:10,y:10,width:12,height:12,rx:2,fill:"white",stroke:"currentColor",strokeWidth:2})))},Rp=(0,p.forwardRef)(Op);n.p;var Ep,_p=["title","titleId"];function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Pp=function(e,t){var n=e.title,r=e.titleId,o=Tp(e,_p);return p.createElement("svg",Ap({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ep||(Ep=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 5H15C16.2351 5 16.9601 5.00425 17.4767 5.07369C17.6839 5.10156 17.7946 5.13283 17.8474 5.15255C17.8672 5.20541 17.8984 5.31609 17.9263 5.52332C17.9958 6.03986 18 6.76495 18 8V16C18 17.2351 17.9958 17.9601 17.9263 18.4767C17.8984 18.6839 17.8672 18.7946 17.8474 18.8474C17.7946 18.8672 17.6839 18.8984 17.4767 18.9263C16.9601 18.9958 16.2351 19 15 19H9C7.76495 19 7.03986 18.9958 6.52332 18.9263C6.31609 18.8984 6.20542 18.8672 6.15256 18.8474C6.13284 18.7946 6.10156 18.6839 6.07369 18.4767C6.00425 17.9601 6 17.2351 6 16V8C6 6.76495 6.00425 6.03986 6.07369 5.52332C6.10156 5.31608 6.13283 5.20541 6.15256 5.15256C6.20541 5.13283 6.31608 5.10156 6.52332 5.07369C7.03986 5.00425 7.76495 5 9 5ZM17.8886 5.17233C17.8878 5.17265 17.8814 5.16973 17.872 5.16266C17.8847 5.16848 17.8894 5.17202 17.8886 5.17233ZM17.8373 5.12796C17.8303 5.11857 17.8274 5.11225 17.8277 5.11144C17.828 5.11062 17.8315 5.11532 17.8373 5.12796ZM17.8277 18.8886C17.8274 18.8878 17.8303 18.8814 17.8373 18.872C17.8315 18.8847 17.828 18.8894 17.8277 18.8886ZM17.872 18.8373C17.8814 18.8303 17.8878 18.8273 17.8886 18.8277C17.8894 18.828 17.8847 18.8315 17.872 18.8373ZM6.11144 18.8277C6.11225 18.8274 6.11857 18.8303 6.12796 18.8373C6.11532 18.8315 6.11062 18.828 6.11144 18.8277ZM6.16266 18.872C6.16973 18.8814 6.17265 18.8878 6.17233 18.8886C6.17202 18.8894 6.16848 18.8847 6.16266 18.872ZM6.17233 5.11144C6.17265 5.11225 6.16973 5.11857 6.16266 5.12796C6.16848 5.11532 6.17202 5.11062 6.17233 5.11144ZM6.12796 5.16266C6.11857 5.16973 6.11225 5.17265 6.11144 5.17233C6.11062 5.17202 6.11532 5.16848 6.12796 5.16266ZM4 8C4 5.64298 4 4.46447 4.73223 3.73223C5.46447 3 6.64298 3 9 3H15C17.357 3 18.5355 3 19.2678 3.73223C20 4.46447 20 5.64298 20 8V16C20 18.357 20 19.5355 19.2678 20.2678C18.5355 21 17.357 21 15 21H9C6.64298 21 5.46447 21 4.73223 20.2678C4 19.5355 4 18.357 4 16V8ZM8.01537 15.6439C8 15.7212 8 15.8141 8 16C8 16.1859 8 16.2788 8.01537 16.3561C8.0785 16.6734 8.32658 16.9215 8.64393 16.9846C8.72121 17 8.81414 17 9 17H15C15.1859 17 15.2788 17 15.3561 16.9846C15.6734 16.9215 15.9215 16.6734 15.9846 16.3561C16 16.2788 16 16.1859 16 16C16 15.8141 16 15.7212 15.9846 15.6439C15.9215 15.3266 15.6734 15.0785 15.3561 15.0154C15.2788 15 15.1859 15 15 15H9C8.81414 15 8.72121 15 8.64393 15.0154C8.32658 15.0785 8.0785 15.3266 8.01537 15.6439ZM8 12C8 11.8141 8 11.7212 8.01537 11.6439C8.0785 11.3266 8.32658 11.0785 8.64393 11.0154C8.72121 11 8.81414 11 9 11H15C15.1859 11 15.2788 11 15.3561 11.0154C15.6734 11.0785 15.9215 11.3266 15.9846 11.6439C16 11.7212 16 11.8141 16 12C16 12.1859 16 12.2788 15.9846 12.3561C15.9215 12.6734 15.6734 12.9215 15.3561 12.9846C15.2788 13 15.1859 13 15 13H9C8.81414 13 8.72121 13 8.64393 12.9846C8.32658 12.9215 8.0785 12.6734 8.01537 12.3561C8 12.2788 8 12.1859 8 12ZM8.01537 7.64393C8 7.72121 8 7.81414 8 8C8 8.18586 8 8.27879 8.01537 8.35607C8.0785 8.67342 8.32658 8.9215 8.64393 8.98463C8.72121 9 8.81414 9 9 9H15C15.1859 9 15.2788 9 15.3561 8.98463C15.6734 8.9215 15.9215 8.67342 15.9846 8.35607C16 8.27879 16 8.18586 16 8C16 7.81414 16 7.72121 15.9846 7.64393C15.9215 7.32658 15.6734 7.0785 15.3561 7.01537C15.2788 7 15.1859 7 15 7H9C8.81414 7 8.72121 7 8.64393 7.01537C8.32658 7.0785 8.0785 7.32658 8.01537 7.64393Z",fill:"currentColor"})))},Ip=(0,p.forwardRef)(Pp);n.p;var Lp,Mp,Kp,Dp,Np=["title","titleId"];function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bp=function(e,t){var n=e.title,r=e.titleId,o=zp(e,Np);return p.createElement("svg",Vp({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Lp||(Lp=p.createElement("rect",{x:9,y:9,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Mp||(Mp=p.createElement("rect",{x:9,y:18.3334,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Kp||(Kp=p.createElement("rect",{x:18.333,y:9,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Dp||(Dp=p.createElement("rect",{x:18.333,y:18.3334,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})))},Hp=(0,p.forwardRef)(Bp);n.p;var Fp,Wp=["title","titleId"];function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Zp=function(e,t){var n=e.title,r=e.titleId,o=Up(e,Wp);return p.createElement("svg",$p({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Fp||(Fp=p.createElement("path",{d:"M8.93032 5.06881C10.564 6.70421 10.5416 9.32618 8.94016 10.9365C8.93716 10.9398 8.9336 10.9433 8.93032 10.9466L7.09282 12.7841C5.47216 14.4048 2.83543 14.4046 1.21501 12.7841C-0.405654 11.1637 -0.405654 8.5267 1.21501 6.90631L2.22963 5.89169C2.49869 5.62263 2.96206 5.80146 2.97595 6.1817C2.99367 6.66629 3.08056 7.15314 3.24091 7.62329C3.29521 7.78249 3.25641 7.95858 3.13747 8.07753L2.77962 8.43537C2.01328 9.20171 1.98925 10.4495 2.74804 11.2233C3.51432 12.0048 4.77383 12.0094 5.54599 11.2373L7.38349 9.40006C8.15433 8.62921 8.15111 7.38327 7.38349 6.61565C7.28229 6.51464 7.18035 6.43616 7.10072 6.38134C7.04439 6.34266 6.99788 6.29135 6.9649 6.2315C6.93192 6.17165 6.91338 6.10493 6.91077 6.03664C6.89994 5.7477 7.00231 5.44996 7.23063 5.22163L7.80633 4.64591C7.95729 4.49495 8.19412 4.47641 8.36917 4.59858C8.56965 4.73857 8.75742 4.89592 8.93032 5.06881V5.06881ZM12.784 1.21493C11.1636 -0.405518 8.52686 -0.405736 6.9062 1.21493L5.0687 3.05243C5.06542 3.05571 5.06186 3.05926 5.05886 3.06254C3.45744 4.67287 3.43499 7.29484 5.0687 8.93024C5.24159 9.10313 5.42935 9.26047 5.62982 9.40044C5.80488 9.52261 6.04173 9.50405 6.19267 9.35311L6.76836 8.77739C6.99668 8.54907 7.09906 8.25132 7.08823 7.96238C7.08561 7.8941 7.06707 7.82737 7.03409 7.76752C7.00111 7.70768 6.9546 7.65637 6.89827 7.61769C6.81865 7.56286 6.71671 7.48438 6.61551 7.38338C5.84789 6.61576 5.84466 5.36981 6.61551 4.59896L8.45301 2.76174C9.22517 1.98958 10.4846 1.99422 11.251 2.77568C12.0097 3.54951 11.9857 4.79731 11.2194 5.56365L10.8615 5.9215C10.7426 6.04044 10.7038 6.21654 10.7581 6.37573C10.9184 6.84588 11.0053 7.33274 11.023 7.81732C11.037 8.19756 11.5003 8.37639 11.7694 8.10733L12.784 7.09271C14.4047 5.47235 14.4047 2.83532 12.784 1.21493V1.21493Z",fill:"currentColor"})))},Gp=(0,p.forwardRef)(Zp);n.p;var Yp,Xp=["title","titleId"];function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Qp=function(e,t){var n=e.title,r=e.titleId,o=Jp(e,Xp);return p.createElement("svg",qp({width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Yp||(Yp=p.createElement("path",{d:"M11.375 5.6875H7.4375V1.75C7.4375 1.26684 7.04566 0.875 6.5625 0.875H5.6875C5.20434 0.875 4.8125 1.26684 4.8125 1.75V5.6875H0.875C0.391836 5.6875 0 6.07934 0 6.5625V7.4375C0 7.92066 0.391836 8.3125 0.875 8.3125H4.8125V12.25C4.8125 12.7332 5.20434 13.125 5.6875 13.125H6.5625C7.04566 13.125 7.4375 12.7332 7.4375 12.25V8.3125H11.375C11.8582 8.3125 12.25 7.92066 12.25 7.4375V6.5625C12.25 6.07934 11.8582 5.6875 11.375 5.6875Z",fill:"currentColor"})))},ef=(0,p.forwardRef)(Qp);n.p;var tf,nf=["title","titleId"];function rf(){return rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var af=function(e,t){var n=e.title,r=e.titleId,o=of(e,nf);return p.createElement("svg",rf({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,tf||(tf=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9063 4.00006L12 4.00012L12.0936 4.00006C12.5346 3.99963 12.9197 3.99926 13.2772 4.08751C14.0293 4.2731 14.6804 4.74239 15.0943 5.39715C15.2911 5.70848 15.4125 6.07386 15.5515 6.49236L15.5811 6.58126L15.7207 7.00012H19V9.00012H5V7.00012H8.27919L8.41881 6.58126L8.44838 6.49237C8.58743 6.07386 8.70883 5.70848 8.90563 5.39715C9.31952 4.74239 9.97062 4.2731 10.7227 4.08751C11.0803 3.99926 11.4653 3.99963 11.9063 4.00006ZM13.4037 6.4658C13.4459 6.53251 13.4848 6.62421 13.612 7.00012H10.3879C10.5151 6.62421 10.554 6.53251 10.5962 6.4658C10.7342 6.24754 10.9512 6.09111 11.2019 6.02925C11.2913 6.00718 11.4116 6.00012 12 6.00012C12.5883 6.00012 12.7086 6.00718 12.798 6.02925C13.0487 6.09111 13.2658 6.24754 13.4037 6.4658ZM8.57753 15.3506L7.99314 10.3833L6.00684 10.617L6.59123 15.5843L6.59836 15.6449C6.6911 16.4336 6.77156 17.1179 6.90762 17.6638C7.05402 18.2512 7.29252 18.8041 7.78494 19.2419C8.27736 19.6798 8.85429 19.8521 9.45478 19.9289C10.0129 20.0002 10.7018 20.0002 11.4959 20.0001H12.504C13.2982 20.0002 13.9871 20.0002 14.5452 19.9289C15.1457 19.8521 15.7226 19.6798 16.215 19.2419C16.7074 18.8041 16.946 18.2512 17.0924 17.6638C17.2284 17.1179 17.3089 16.4337 17.4016 15.6449V15.6449L17.9931 10.617L16.0068 10.3833L15.4224 15.3506C15.3205 16.2175 15.2532 16.773 15.1517 17.1801C15.0571 17.5597 14.962 17.6798 14.886 17.7474C14.81 17.815 14.6796 17.8954 14.2916 17.945C13.8754 17.9982 13.3158 18.0001 12.443 18.0001H11.557C10.6842 18.0001 10.1245 17.9982 9.70839 17.945C9.32041 17.8954 9.18995 17.815 9.11397 17.7474C9.03799 17.6798 8.94285 17.5597 8.84826 17.1801C8.7468 16.773 8.67952 16.2175 8.57753 15.3506Z",fill:"currentColor"})))},sf=(0,p.forwardRef)(af);n.p;var lf,cf=["title","titleId"];function df(){return df=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hf=function(e,t){var n=e.title,r=e.titleId,o=uf(e,cf);return p.createElement("svg",df({viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,lf||(lf=p.createElement("path",{d:"M11 6V16H3V6H11ZM9.5 0H4.5L3.5 1H0V3H14V1H10.5L9.5 0ZM13 4H1V16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4Z",fill:"currentcolor"})))},gf=(0,p.forwardRef)(hf);n.p;var mf,pf,ff,vf=["title","titleId"];function yf(){return yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xf=function(e,t){var n=e.title,r=e.titleId,o=bf(e,vf);return p.createElement("svg",yf({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,mf||(mf=p.createElement("circle",{cx:9,cy:9,r:1.5,fill:"currentColor"})),pf||(pf=p.createElement("circle",{cx:3.75,cy:9,r:1.5,fill:"currentColor"})),ff||(ff=p.createElement("circle",{cx:14.25,cy:9,r:1.5,fill:"currentColor"})))},wf=(0,p.forwardRef)(xf);n.p;n.p;var Cf,Sf,jf,kf=["title","titleId"];function Of(){return Of=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ef=function(e,t){var n=e.title,r=e.titleId,o=Rf(e,kf);return p.createElement("svg",Of({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Cf||(Cf=p.createElement("path",{d:"M7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9H17C17.5523 9 18 8.55228 18 8C18 7.44772 17.5523 7 17 7H7Z",fill:"currentColor"})),Sf||(Sf=p.createElement("path",{d:"M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z",fill:"currentColor"})),jf||(jf=p.createElement("path",{d:"M6 16C6 15.4477 6.44772 15 7 15H17C17.5523 15 18 15.4477 18 16C18 16.5523 17.5523 17 17 17H7C6.44772 17 6 16.5523 6 16Z",fill:"currentColor"})))},_f=(0,p.forwardRef)(Ef);n.p;var Af,Tf,Pf=["title","titleId"];function If(){return If=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mf=function(e,t){var n=e.title,r=e.titleId,o=Lf(e,Pf);return p.createElement("svg",If({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Af||(Af=p.createElement("path",{d:"M10 8C9.44772 8 9 8.44772 9 9C9 9.55228 9.44772 10 10 10H14C14.5523 10 15 9.55228 15 9C15 8.44772 14.5523 8 14 8H10Z",fill:"black"})),Tf||(Tf=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 11C5 8.17157 5 6.75736 5.87868 5.87868C6.75736 5 8.17157 5 11 5H13C15.8284 5 17.2426 5 18.1213 5.87868C19 6.75736 19 8.17157 19 11V13C19 15.8284 19 17.2426 18.1213 18.1213C17.2426 19 15.8284 19 13 19H11C8.17157 19 6.75736 19 5.87868 18.1213C5 17.2426 5 15.8284 5 13V11ZM11 7H13C14.4708 7 15.3726 7.00425 16.0253 7.092C16.599 7.16913 16.6948 7.27883 16.7062 7.29185L16.7071 7.29289L16.7082 7.29383C16.7212 7.3052 16.8309 7.40098 16.908 7.97468C16.9958 8.62738 17 9.52925 17 11V13C17 14.4708 16.9958 15.3726 16.908 16.0253C16.8309 16.599 16.7212 16.6948 16.7082 16.7062L16.7071 16.7071L16.7062 16.7082C16.6948 16.7212 16.599 16.8309 16.0253 16.908C15.3726 16.9958 14.4708 17 13 17H11C9.52925 17 8.62738 16.9958 7.97468 16.908C7.40098 16.8309 7.3052 16.7212 7.29383 16.7082L7.29289 16.7071L7.29185 16.7062C7.27884 16.6948 7.16913 16.599 7.092 16.0253C7.00425 15.3726 7 14.4708 7 13V11C7 9.52925 7.00425 8.62738 7.092 7.97468C7.16913 7.40099 7.27883 7.3052 7.29185 7.29383L7.29289 7.29289L7.29383 7.29185C7.3052 7.27883 7.40099 7.16913 7.97468 7.092C8.62738 7.00425 9.52925 7 11 7Z",fill:"currentColor"})))},Kf=(0,p.forwardRef)(Mf);n.p;var Df,Nf=["title","titleId"];function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bf=function(e,t){var n=e.title,r=e.titleId,o=zf(e,Nf);return p.createElement("svg",Vf({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Df||(Df=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 10C10 9.52038 10.0005 9.21074 10.0167 8.97376C10.0323 8.74576 10.0589 8.65893 10.0761 8.61732C10.1776 8.37229 10.3723 8.17762 10.6173 8.07612C10.6589 8.05889 10.7458 8.03227 10.9738 8.01671C11.2107 8.00054 11.5204 8 12 8C12.4796 8 12.7893 8.00054 13.0262 8.01671C13.2542 8.03227 13.3411 8.05889 13.3827 8.07612C13.6277 8.17762 13.8224 8.37229 13.9239 8.61732C13.9411 8.65893 13.9677 8.74576 13.9833 8.97376C13.9995 9.21074 14 9.52038 14 10H10ZM9 12C8.99934 12 8.99869 12 8.99803 12C8.63798 12 8.35669 12.0001 8.11551 12.0062C8.07804 12.0072 8.04273 12.0082 8.00942 12.0094C8.00824 12.0427 8.00717 12.078 8.00623 12.1155C8.00013 12.3571 8 12.639 8 13C8 14.4708 8.00425 15.3726 8.092 16.0253C8.16913 16.599 8.27884 16.6948 8.29185 16.7062L8.29289 16.7071L8.29383 16.7082C8.3052 16.7212 8.40098 16.8309 8.97468 16.908C9.62738 16.9958 10.5292 17 12 17C13.4708 17 14.3726 16.9958 15.0253 16.908C15.599 16.8309 15.6948 16.7212 15.7062 16.7082L15.7071 16.7071L15.7082 16.7062C15.7212 16.6948 15.8309 16.599 15.908 16.0253C15.9958 15.3726 16 14.4708 16 13C16 12.639 15.9999 12.3571 15.9938 12.1155C15.9928 12.078 15.9918 12.0427 15.9906 12.0094C15.9573 12.0082 15.922 12.0072 15.8845 12.0062C15.6429 12.0001 15.361 12 15 12M14.998 12H9.00198C9.00132 12 9.00066 12 9 12M16 10.0087V9.96801C16 9.52936 16 9.15088 15.9787 8.83762C15.9561 8.50779 15.9066 8.17788 15.7716 7.85195C15.4672 7.11687 14.8831 6.53285 14.1481 6.22836C13.8221 6.09336 13.4922 6.04386 13.1624 6.02135C12.8491 5.99998 12.4707 5.99999 12.0321 6H12.032H11.968H11.9679C11.5293 5.99999 11.1509 5.99998 10.8376 6.02135C10.5078 6.04386 10.1779 6.09336 9.85195 6.22836C9.11687 6.53285 8.53284 7.11687 8.22836 7.85195C8.09336 8.17788 8.04385 8.50779 8.02135 8.83762C7.99998 9.15087 7.99999 9.52936 8 9.968V9.96802L8 10V10.0087C7.22328 10.0321 6.75999 10.1187 6.43934 10.4393C6 10.8787 6 11.5858 6 13C6 15.8284 6 17.2426 6.87868 18.1213C7.75736 19 9.17157 19 12 19C14.8284 19 16.2426 19 17.1213 18.1213C18 17.2426 18 15.8284 18 13C18 11.5858 18 10.8787 17.5607 10.4393C17.24 10.1187 16.7767 10.0321 16 10.0087ZM10.5 14.5C10.5 13.6716 11.1716 13 12 13C12.8284 13 13.5 13.6716 13.5 14.5C13.5 15.3284 12.8284 16 12 16C11.1716 16 10.5 15.3284 10.5 14.5Z",fill:"currentColor"})))},Hf=(0,p.forwardRef)(Bf);n.p;var Ff,Wf=["title","titleId"];function $f(){return $f=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Zf=function(e,t){var n=e.title,r=e.titleId,o=Uf(e,Wf);return p.createElement("svg",$f({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ff||(Ff=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0014 7.85874C10.0032 7.93562 10.0073 8.11163 10.0167 7.97376C10.0323 7.74576 10.0589 7.65893 10.0761 7.61732C10.1776 7.37229 10.3723 7.17762 10.6173 7.07612C10.6589 7.05889 10.7458 7.03227 10.9738 7.01671C11.2107 7.00054 11.5204 7 12 7C12.4796 7 12.7893 7.00054 13.0262 7.01671C13.2542 7.03227 13.3411 7.05889 13.3827 7.07612C13.6277 7.17762 13.8224 7.37229 13.9239 7.61732C13.9411 7.65893 13.9677 7.74576 13.9833 7.97376C13.9995 8.21074 14 8.52038 14 9V10H9C7.58579 10 6.87868 10 6.43934 10.4393C6 10.8787 6 11.5858 6 13C6 15.8284 6 17.2426 6.87868 18.1213C7.75736 19 9.17157 19 12 19C14.8284 19 16.2426 19 17.1213 18.1213C18 17.2426 18 15.8284 18 13C18 11.5858 18 10.8787 17.5607 10.4393C17.24 10.1187 16.7767 10.0321 16 10.0087L16 8.96801C16 8.52936 16 8.15088 15.9787 7.83762C15.9561 7.50779 15.9066 7.17788 15.7716 6.85195C15.4672 6.11687 14.8831 5.53285 14.1481 5.22836C13.8221 5.09336 13.4922 5.04386 13.1624 5.02135C12.8491 4.99998 12.4707 4.99999 12.0321 5H12.032H11.968H11.9679C11.5293 4.99999 11.1509 4.99998 10.8376 5.02135C10.5078 5.04386 10.1779 5.09336 9.85195 5.22836C9.11687 5.53285 8.53284 6.11687 8.22836 6.85195C8.09336 7.17788 8.04385 7.50779 8.02135 7.83762C8.00599 8.06275 8.00167 7.80509 8.00047 7.80511C7.99999 7.80511 8 7.84461 8 7.96802L8 8C8 8.55229 8.44772 9 9 9C9.55229 9 10 8.55229 10 8C10 7.79942 10.0001 7.80347 10.0014 7.85874ZM14.998 12C14.9987 12 14.9993 12 15 12C15.361 12 15.6429 12.0001 15.8845 12.0062C15.922 12.0072 15.9573 12.0082 15.9906 12.0094C15.9918 12.0427 15.9928 12.078 15.9938 12.1155C15.9999 12.3571 16 12.639 16 13C16 14.4708 15.9958 15.3726 15.908 16.0253C15.8309 16.599 15.7212 16.6948 15.7082 16.7062L15.7071 16.7071L15.7062 16.7082C15.6948 16.7212 15.599 16.8309 15.0253 16.908C14.3726 16.9958 13.4708 17 12 17C10.5292 17 9.62738 16.9958 8.97468 16.908C8.40098 16.8309 8.3052 16.7212 8.29383 16.7082L8.29289 16.7071L8.29185 16.7062C8.27884 16.6948 8.16913 16.599 8.092 16.0253C8.00425 15.3726 8 14.4708 8 13C8 12.639 8.00013 12.3571 8.00623 12.1155C8.00717 12.078 8.00824 12.0427 8.00942 12.0094C8.04273 12.0082 8.07804 12.0072 8.11551 12.0062C8.35713 12.0001 8.63901 12 9 12H14.998ZM10.5 14.5C10.5 13.6716 11.1716 13 12 13C12.8284 13 13.5 13.6716 13.5 14.5C13.5 15.3284 12.8284 16 12 16C11.1716 16 10.5 15.3284 10.5 14.5Z",fill:"currentColor"})))},Gf=(0,p.forwardRef)(Zf);n.p;var Yf,Xf=["title","titleId"];function qf(){return qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Qf=function(e,t){var n=e.title,r=e.titleId,o=Jf(e,Xf);return p.createElement("svg",qf({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Yf||(Yf=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.24256 7.02988C7.90178 6.94468 7.54129 7.04453 7.29291 7.29291C7.04453 7.54129 6.94468 7.90178 7.02988 8.24256L9.02988 16.2426C9.11726 16.5921 9.38589 16.8676 9.73309 16.9637C10.0803 17.0599 10.4524 16.9619 10.7071 16.7071L13.0001 14.4142L16.293 17.7071C16.6835 18.0976 17.3166 18.0976 17.7072 17.7071C18.0977 17.3166 18.0977 16.6834 17.7072 16.2929L14.4143 13L16.7071 10.7071C16.9619 10.4524 17.0599 10.0803 16.9637 9.73309C16.8676 9.38589 16.5921 9.11726 16.2426 9.02988L8.24256 7.02988ZM10.5418 14.044L9.37439 9.37439L14.044 10.5418L10.5418 14.044Z",fill:"currentColor"})))},ev=(0,p.forwardRef)(Qf);n.p;var tv,nv,rv,ov=["title","titleId"];function iv(){return iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sv=function(e,t){var n=e.title,r=e.titleId,o=av(e,ov);return p.createElement("svg",iv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,tv||(tv=p.createElement("path",{d:"M7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9H17C17.5523 9 18 8.55228 18 8C18 7.44772 17.5523 7 17 7H7Z",fill:"currentColor"})),nv||(nv=p.createElement("path",{d:"M9 12C9 11.4477 9.44772 11 10 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H10C9.44772 13 9 12.5523 9 12Z",fill:"currentColor"})),rv||(rv=p.createElement("path",{d:"M9 16C9 15.4477 9.44772 15 10 15H17C17.5523 15 18 15.4477 18 16C18 16.5523 17.5523 17 17 17H10C9.44772 17 9 16.5523 9 16Z",fill:"currentColor"})))},lv=(0,p.forwardRef)(sv);n.p;var cv,dv=["title","titleId"];function uv(){return uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gv=function(e,t){var n=e.title,r=e.titleId,o=hv(e,dv);return p.createElement("svg",uv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,cv||(cv=p.createElement("path",{d:"M16.8321 9.55463C17.1384 9.0951 17.0142 8.47423 16.5547 8.16788C16.0952 7.86153 15.4743 7.98572 15.168 8.44525L15.0119 8.67931C14.0996 8.24381 13.0783 8 12 8C8.13401 8 5 11.134 5 15C5 15.3385 5.02411 15.672 5.07084 15.9987C5.14904 16.5455 5.65564 16.9253 6.20236 16.8471C6.74908 16.7689 7.12889 16.2623 7.05069 15.7155C7.01733 15.4824 7 15.2435 7 15C7 12.2386 9.23858 10 12 10C12.6673 10 13.3041 10.1307 13.8862 10.368L11.168 14.4454C10.8616 14.9049 10.9858 15.5258 11.4453 15.8321C11.9049 16.1385 12.5257 16.0143 12.8321 15.5548L15.5495 11.4785C16.4461 12.3822 17 13.6264 17 15C17 15.2435 16.9827 15.4824 16.9493 15.7155C16.8711 16.2623 17.2509 16.7689 17.7976 16.8471C18.3444 16.9253 18.851 16.5455 18.9292 15.9987C18.9759 15.672 19 15.3385 19 15C19 12.9309 18.1023 11.0715 16.6751 9.79002L16.8321 9.55463Z",fill:"currentColor"})))},mv=(0,p.forwardRef)(gv);n.p;var pv,fv,vv=["title","titleId"];function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xv=function(e,t){var n=e.title,r=e.titleId,o=bv(e,vv);return p.createElement("svg",yv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,pv||(pv=p.createElement("path",{d:"M14.5 8C13.6715 8 13 8.67157 13 9.5C13 10.3284 13.6715 11 14.5 11C15.3284 11 16 10.3284 16 9.5C16 8.67157 15.3284 8 14.5 8Z",fill:"currentColor"})),fv||(fv=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6212 18.2072L17.2426 14.5859C17.2814 14.547 17.3216 14.5072 17.3628 14.4663C17.8123 14.0208 18.3841 13.454 18.6955 12.7024C19.0068 11.9508 19.0033 11.1456 19.0005 10.5128C19.0002 10.4548 19 10.3982 19 10.3432V8.00007L19 7.95314C19.0004 7.76632 19.0009 7.46081 18.9638 7.18495C18.9157 6.82701 18.7745 6.23907 18.2677 5.73231C17.761 5.22555 17.173 5.08434 16.8151 5.03622C16.5392 4.99913 16.2337 4.99968 16.0469 5.00002L16 5.00008H13.6568C13.6019 5.00008 13.5454 4.99983 13.4874 4.99957C12.8545 4.99678 12.0493 4.99322 11.2976 5.30455C10.546 5.61589 9.97923 6.1877 9.53372 6.63716C9.49291 6.67833 9.453 6.7186 9.41417 6.75742L5.79282 10.3788L5.7596 10.4119C5.62726 10.5438 5.41083 10.7594 5.24199 10.9807C5.02292 11.2678 4.70703 11.7834 4.70703 12.5001C4.70703 13.2167 5.02292 13.7323 5.24199 14.0195C5.41082 14.2407 5.62725 14.4564 5.75959 14.5882L5.79282 14.6214L9.37861 18.2072L9.41175 18.2404C9.54361 18.3727 9.75925 18.5892 9.98054 18.758C10.2677 18.9771 10.7833 19.293 11.4999 19.293C12.2166 19.293 12.7322 18.9771 13.0193 18.758C13.2406 18.5892 13.4562 18.3728 13.5881 18.2404L13.6212 18.2072ZM10.8284 8.17164C11.4064 7.59358 11.6955 7.30455 12.063 7.15231C12.4306 7.00008 12.8393 7.00007 13.6568 7.00007H16C16.4714 7.00007 16.7071 7.00008 16.8535 7.14652C17 7.29297 17 7.52867 17 8.00007V10.3432C17 11.1607 17 11.5695 16.8477 11.937C16.6955 12.3046 16.4064 12.5936 15.8284 13.1716L12.207 16.793C11.8737 17.1263 11.707 17.293 11.4999 17.293C11.2928 17.293 11.1262 17.1263 10.7928 16.793L7.20703 13.2072C6.8737 12.8738 6.70703 12.7072 6.70703 12.5001C6.70703 12.293 6.8737 12.1263 7.20703 11.793L10.8284 8.17164Z",fill:"currentColor"})))},wv=(0,p.forwardRef)(xv);n.p;var Cv,Sv,jv=["title","titleId"];function kv(){return kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Rv=function(e,t){var n=e.title,r=e.titleId,o=Ov(e,jv);return p.createElement("svg",kv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Cv||(Cv=p.createElement("path",{d:"M16 11L12 7L8 11",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})),Sv||(Sv=p.createElement("path",{d:"M12 17L12 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})))},Ev=(0,p.forwardRef)(Rv);n.p;var _v,Av=["title","titleId"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Iv=function(e,t){var n=e.title,r=e.titleId,o=Pv(e,Av);return p.createElement("svg",Tv({width:14,height:12,viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,_v||(_v=p.createElement("path",{d:"M11.6666 2.66667H13.6666L11 0L8.33331 2.66667H10.3333V12H11.6666M0.333313 9.33333H6.99998V10.6667H0.333313M2.99998 1.33333V2.66667H0.333313V1.33333M0.333313 5.33333H4.99998V6.66667H0.333313V5.33333Z",fill:"currentColor",fillOpacity:.9})))},Lv=(0,p.forwardRef)(Iv);n.p;var Mv,Kv,Dv=["title","titleId"];function Nv(){return Nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zv=function(e,t){var n=e.title,r=e.titleId,o=Vv(e,Dv);return p.createElement("svg",Nv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Mv||(Mv=p.createElement("path",{d:"M8 13L12 17L16 13",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})),Kv||(Kv=p.createElement("path",{d:"M12 7V16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})))},Bv=(0,p.forwardRef)(zv);n.p;var Hv,Fv=["title","titleId"];function Wv(){return Wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Uv=function(e,t){var n=e.title,r=e.titleId,o=$v(e,Fv);return p.createElement("svg",Wv({width:14,height:12,viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Hv||(Hv=p.createElement("path",{d:"M11.6667 9.33333H13.6667L11 12L8.33337 9.33333H10.3334V0H11.6667M0.333374 9.33333H7.00004V10.6667H0.333374M3.00004 1.33333V2.66667H0.333374V1.33333M0.333374 5.33333H5.00004V6.66667H0.333374V5.33333Z",fill:"#898098"})))},Zv=(0,p.forwardRef)(Uv);n.p;var Gv,Yv,Xv,qv=["title","titleId"];function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ey=function(e,t){var n=e.title,r=e.titleId,o=Qv(e,qv);return p.createElement("svg",Jv({width:24,height:24,viewBox:"0 -7 12 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Gv||(Gv=p.createElement("path",{d:"M1 0C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2H11C11.5523 2 12 1.55228 12 1C12 0.447715 11.5523 0 11 0H1Z",fill:"currentColor",fillOpacity:.8})),Yv||(Yv=p.createElement("path",{d:"M2 5C2 4.44772 2.44772 4 3 4H9C9.55229 4 10 4.44772 10 5C10 5.55228 9.55228 6 9 6H3C2.44772 6 2 5.55228 2 5Z",fill:"currentColor",fillOpacity:.8})),Xv||(Xv=p.createElement("path",{d:"M4 9C4 8.44771 4.44772 8 5 8H7C7.55229 8 8 8.44771 8 9C8 9.55229 7.55228 10 7 10H5C4.44772 10 4 9.55229 4 9Z",fill:"currentColor",fillOpacity:.8})))},ty=(0,p.forwardRef)(ey);n.p;var ny,ry=["title","titleId"];function oy(){return oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ay=function(e,t){var n=e.title,r=e.titleId,o=iy(e,ry);return p.createElement("svg",oy({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ny||(ny=p.createElement("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z",fill:"#CF1322"})))},sy=(0,p.forwardRef)(ay);n.p;n.p;var ly,cy=["title","titleId"];function dy(){return dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hy=function(e,t){var n=e.title,r=e.titleId,o=uy(e,cy);return p.createElement("svg",dy({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ly||(ly=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.6483 3.86413C18.2729 3.23952 19.3217 3.48703 19.8345 3.99974C20.3472 4.51246 20.5947 5.56125 19.9701 6.18586L18.9589 7.1971L16.6371 4.87535L17.6483 3.86413ZM15.7848 5.7277L18.1065 8.04945L9.45883 16.6971L7.13708 14.3754L15.7848 5.7277ZM6.28474 15.2277L5.86442 15.648C5.86442 15.648 4.03775 18.771 4.55046 19.2837C5.06318 19.7964 8.18619 17.9698 8.18619 17.9698L8.60649 17.5495L6.28474 15.2277Z",fill:"currentColor"})))},gy=(0,p.forwardRef)(hy);n.p;var my,py=["title","titleId"];function fy(){return fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var yy=function(e,t){var n=e.title,r=e.titleId,o=vy(e,py);return p.createElement("svg",fy({width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,my||(my=p.createElement("path",{d:"M9.41666 12.5522C8.08332 11.7824 7.41666 11.3975 7.41666 10.8202C7.41666 10.2428 8.08332 9.85792 9.41666 9.08812L11.6667 7.78909C13 7.01929 13.6667 6.63439 14.1667 6.92306C14.6667 7.21174 14.6667 7.98154 14.6667 9.52114V12.1192C14.6667 13.6588 14.6667 14.4286 14.1667 14.7173C13.6667 15.006 13 14.6211 11.6667 13.8513L9.41666 12.5522Z",fill:"currentColor"})))},by=(0,p.forwardRef)(yy);n.p;var xy,wy=["title","titleId"];function Cy(){return Cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var jy=function(e,t){var n=e.title,r=e.titleId,o=Sy(e,wy);return p.createElement("svg",Cy({width:8,height:10,viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,xy||(xy=p.createElement("path",{d:"M2.71359 6.696C1.49573 5.93483 0.886796 5.55425 0.886796 5C0.886796 4.44575 1.49573 4.06517 2.71359 3.304L4.94 1.9125C6.29303 1.06686 6.96954 0.644039 7.48477 0.929605C8 1.21517 8 2.01295 8 3.6085V6.3915C8 7.98705 8 8.78483 7.48477 9.07039C6.96954 9.35596 6.29303 8.93314 4.94 8.0875L2.71359 6.696Z",fill:"currentColor"})))},ky=(0,p.forwardRef)(jy);n.p;var Oy,Ry=["title","titleId"];function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ay=function(e,t){var n=e.title,r=e.titleId,o=_y(e,Ry);return p.createElement("svg",Ey({width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Oy||(Oy=p.createElement("path",{d:"M13.5 12.732C14.8333 11.9622 15.5 11.5773 15.5 10.9999C15.5 10.4226 14.8333 10.0377 13.5 9.26787L11.25 7.96883C9.91667 7.19903 9.25 6.81413 8.75 7.10281C8.25 7.39148 8.25 8.16128 8.25 9.70088V12.299C8.25 13.8386 8.25 14.6084 8.75 14.897C9.25 15.1857 9.91667 14.8008 11.25 14.031L13.5 12.732Z",fill:"currentColor"})))},Ty=(0,p.forwardRef)(Ay);n.p;var Py,Iy=["title","titleId"];function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ky=function(e,t){var n=e.title,r=e.titleId,o=My(e,Iy);return p.createElement("svg",Ly({width:8,height:10,viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Py||(Py=p.createElement("path",{d:"M5.28641 6.696C6.50427 5.93483 7.1132 5.55425 7.1132 5C7.1132 4.44575 6.50427 4.06517 5.28641 3.304L3.06 1.9125C1.70697 1.06686 1.03046 0.644039 0.515232 0.929605C0 1.21517 0 2.01295 0 3.6085V6.3915C0 7.98705 0 8.78483 0.515232 9.07039C1.03046 9.35596 1.70697 8.93314 3.06 8.0875L5.28641 6.696Z",fill:"currentColor"})))},Dy=(0,p.forwardRef)(Ky);n.p;var Ny,Vy,zy,By=["title","titleId"];function Hy(){return Hy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wy=function(e,t){var n=e.title,r=e.titleId,o=Fy(e,By);return p.createElement("svg",Hy({width:24,height:50,viewBox:"0 0 24 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ny||(Ny=p.createElement("path",{d:"M11 36C11 37.6569 12.3431 39 14 39H21C21.5523 39 22 38.5523 22 38V38C22 37.4477 21.5523 37 21 37H14C13.4477 37 13 36.5523 13 36V14C13 13.4477 13.4477 13 14 13H21C21.5523 13 22 12.5523 22 12V12C22 11.4477 21.5523 11 21 11H14C12.3431 11 11 12.3431 11 14V36Z",fill:"currentColor"})),Vy||(Vy=p.createElement("circle",{r:2.69819,transform:"matrix(1 0 0 -1 21.3018 12)",fill:"currentColor"})),zy||(zy=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4095 36.5858L19.874 33.0503C19.4834 32.6597 18.8503 32.6597 18.4598 33.0503V33.0503C18.0692 33.4408 18.0692 34.0739 18.4597 34.4645L20.5811 36.5858C21.3621 37.3668 21.3621 38.6332 20.5811 39.4142L18.4598 41.5355C18.0692 41.9261 18.0692 42.5592 18.4598 42.9497V42.9497C18.8503 43.3403 19.4834 43.3403 19.874 42.9497L23.4095 39.4142V39.4142C24.1905 38.6332 24.1905 37.3668 23.4095 36.5858V36.5858Z",fill:"currentColor"})))},$y=(0,p.forwardRef)(Wy);n.p;var Uy,Zy,Gy,Yy=["title","titleId"];function Xy(){return Xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jy=function(e,t){var n=e.title,r=e.titleId,o=qy(e,Yy);return p.createElement("svg",Xy({width:24,height:50,viewBox:"0 0 24 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Uy||(Uy=p.createElement("path",{d:"M11 14C11 12.3431 12.3431 11 14 11H21C21.5523 11 22 11.4477 22 12V12C22 12.5523 21.5523 13 21 13H14C13.4477 13 13 13.4477 13 14V36C13 36.5523 13.4477 37 14 37H21C21.5523 37 22 37.4477 22 38V38C22 38.5523 21.5523 39 21 39H14C12.3431 39 11 37.6569 11 36V14Z",fill:"currentColor"})),Zy||(Zy=p.createElement("circle",{cx:21.3018,cy:38,r:2.69819,fill:"currentColor"})),Gy||(Gy=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4095 13.4142L19.874 16.9497C19.4834 17.3403 18.8503 17.3403 18.4597 16.9497V16.9497C18.0692 16.5592 18.0692 15.9261 18.4597 15.5355L20.5811 13.4142C21.3621 12.6332 21.3621 11.3668 20.5811 10.5858L18.4597 8.46447C18.0692 8.07394 18.0692 7.44078 18.4597 7.05025V7.05025C18.8503 6.65973 19.4834 6.65973 19.874 7.05025L23.4095 10.5858V10.5858C24.1905 11.3668 24.1905 12.6332 23.4095 13.4142V13.4142Z",fill:"currentColor"})))},Qy=(0,p.forwardRef)(Jy);n.p;var eb,tb,nb,rb=["title","titleId"];function ob(){return ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ab=function(e,t){var n=e.title,r=e.titleId,o=ib(e,rb);return p.createElement("svg",ob({width:24,height:50,viewBox:"0 0 24 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,eb||(eb=p.createElement("path",{d:"M11 14C11 12.3431 12.3431 11 14 11H21C21.5523 11 22 11.4477 22 12V12C22 12.5523 21.5523 13 21 13H14C13.4477 13 13 13.4477 13 14V36C13 36.5523 13.4477 37 14 37H21C21.5523 37 22 37.4477 22 38V38C22 38.5523 21.5523 39 21 39H14C12.3431 39 11 37.6569 11 36V14Z",fill:"currentColor"})),tb||(tb=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4095 13.4142L19.874 16.9497C19.4834 17.3403 18.8503 17.3403 18.4597 16.9497V16.9497C18.0692 16.5592 18.0692 15.9261 18.4597 15.5355L20.5811 13.4142C21.3621 12.6332 21.3621 11.3668 20.5811 10.5858L18.4597 8.46447C18.0692 8.07394 18.0692 7.44078 18.4597 7.05025V7.05025C18.8503 6.65973 19.4834 6.65973 19.874 7.05025L23.4095 10.5858V10.5858C24.1905 11.3668 24.1905 12.6332 23.4095 13.4142V13.4142Z",fill:"currentColor"})),nb||(nb=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4095 39.4142L19.874 42.9497C19.4834 43.3403 18.8503 43.3403 18.4597 42.9497V42.9497C18.0692 42.5592 18.0692 41.9261 18.4597 41.5355L20.5811 39.4142C21.3621 38.6332 21.3621 37.3668 20.5811 36.5858L18.4597 34.4645C18.0692 34.0739 18.0692 33.4408 18.4597 33.0503V33.0503C18.8503 32.6597 19.4834 32.6597 19.874 33.0503L23.4095 36.5858V36.5858C24.1905 37.3668 24.1905 38.6332 23.4095 39.4142V39.4142Z",fill:"currentColor"})))},sb=(0,p.forwardRef)(ab);n.p;var lb,cb,db,ub=["title","titleId"];function hb(){return hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mb=function(e,t){var n=e.title,r=e.titleId,o=gb(e,ub);return p.createElement("svg",hb({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,lb||(lb=p.createElement("path",{d:"M2 2H3V10H2V2Z",fill:"currentColor"})),cb||(cb=p.createElement("path",{d:"M2 9H10V10H2V9Z",fill:"currentColor"})),db||(db=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.97254 10C6.99068 9.83583 7 9.669 7 9.5C7 7.01472 4.98528 5 2.5 5C2.331 5 2.16417 5.00932 2 5.02746V6.03544C2.1633 6.01209 2.33024 6 2.5 6C4.433 6 6 7.567 6 9.5C6 9.66976 5.98791 9.8367 5.96456 10H6.97254Z",fill:"currentColor"})))},pb=(0,p.forwardRef)(mb);n.p;var fb,vb,yb,bb=["title","titleId"];function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Cb=function(e,t){var n=e.title,r=e.titleId,o=wb(e,bb);return p.createElement("svg",xb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fb||(fb=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.3})),vb||(vb=p.createElement("path",{d:"M6.5 13C6.5 15.4853 8.51472 17 11 17H11.838C14.1635 17 15.3262 17 16.1769 16.2492C17.0275 15.4983 17.1555 14.4755 17.4114 12.43C17.4664 11.991 17.5 11.5853 17.5 11.25C17.5 9.42157 16.8284 9 15 9H11C8.51472 9 6.5 10.5147 6.5 13Z",fill:"currentColor"})),yb||(yb=p.createElement("path",{d:"M9.2 10.4L8.8344 9.46922C8.38712 9.64491 8.12806 10.1139 8.21746 10.586C8.30686 11.0582 8.71946 11.4 9.2 11.4V10.4ZM13.5 5.99999H14.5C14.5 5.51523 14.1523 5.10029 13.675 5.01543C13.1978 4.93058 12.7284 5.20026 12.5613 5.65531L13.5 5.99999ZM12.5 5.99999C12.5 6.60852 12.3312 7.49061 11.8427 8.18979C11.3927 8.83396 10.624 9.39999 9.2 9.39999V11.4C11.276 11.4 12.6573 10.516 13.4823 9.3352C14.2688 8.20938 14.5 6.89147 14.5 5.99999H12.5ZM13.5 5.99999C12.5613 5.65531 12.5614 5.65498 12.5615 5.65466C12.5616 5.65457 12.5617 5.65427 12.5617 5.65408C12.5619 5.65372 12.562 5.65341 12.5621 5.65314C12.5623 5.6526 12.5624 5.65225 12.5625 5.65209C12.5626 5.65175 12.5624 5.65216 12.562 5.65328C12.5612 5.65552 12.5592 5.66062 12.5561 5.66844C12.5499 5.68408 12.5393 5.71052 12.5239 5.74654C12.4932 5.81868 12.4439 5.92873 12.3747 6.06714C12.2359 6.34487 12.0196 6.73141 11.7155 7.15263C11.1032 8.00079 10.1681 8.94536 8.8344 9.46922L9.5656 11.3308C11.3687 10.6225 12.5836 9.36707 13.3371 8.32326C13.7159 7.7985 13.9864 7.31606 14.1637 6.96131C14.2526 6.78348 14.3187 6.63642 14.3639 6.5305C14.3865 6.4775 14.4038 6.43467 14.4162 6.4033C14.4224 6.38762 14.4274 6.37478 14.4311 6.36496C14.433 6.36005 14.4345 6.35589 14.4358 6.3525C14.4364 6.35081 14.437 6.34931 14.4375 6.348C14.4377 6.34735 14.438 6.34675 14.4382 6.34619C14.4383 6.34592 14.4384 6.34554 14.4385 6.3454C14.4386 6.34503 14.4387 6.34468 13.5 5.99999Z",fill:"currentColor"})))},Sb=(0,p.forwardRef)(Cb);n.p;var jb,kb,Ob,Rb=["title","titleId"];function Eb(){return Eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ab=function(e,t){var n=e.title,r=e.titleId,o=_b(e,Rb);return p.createElement("svg",Eb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,jb||(jb=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),kb||(kb=p.createElement("path",{d:"M17.5 11C17.5 8.51472 15.4853 7 13 7H12.162C9.8365 7 8.67375 7 7.82311 7.75085C6.97246 8.5017 6.84449 9.52445 6.58856 11.57C6.53363 12.009 6.5 12.4147 6.5 12.75C6.5 14.5784 7.17157 15 9 15H13C15.4853 15 17.5 13.4853 17.5 11Z",fill:"currentColor"})),Ob||(Ob=p.createElement("path",{d:"M14.8 13.6L15.1656 14.5307C15.6129 14.3551 15.8719 13.8861 15.7825 13.4139C15.6931 12.9418 15.2805 12.6 14.8 12.6V13.6ZM10.5 18H9.5C9.5 18.4847 9.84768 18.8997 10.325 18.9845C10.8022 19.0694 11.2716 18.7997 11.4387 18.3447L10.5 18ZM11.5 18C11.5 17.3915 11.6688 16.5094 12.1573 15.8102C12.6073 15.166 13.376 14.6 14.8 14.6V12.6C12.724 12.6 11.3427 13.4839 10.5177 14.6648C9.73121 15.7906 9.5 17.1085 9.5 18H11.5ZM10.5 18C11.4387 18.3447 11.4386 18.345 11.4385 18.3453C11.4384 18.3454 11.4383 18.3457 11.4383 18.3459C11.4381 18.3462 11.438 18.3466 11.4379 18.3468C11.4377 18.3474 11.4376 18.3477 11.4375 18.3479C11.4374 18.3482 11.4376 18.3478 11.438 18.3467C11.4388 18.3445 11.4408 18.3393 11.4439 18.3315C11.4501 18.3159 11.4607 18.2895 11.4761 18.2534C11.5068 18.1813 11.5561 18.0712 11.6253 17.9328C11.7641 17.6551 11.9804 17.2686 12.2845 16.8473C12.8968 15.9992 13.8319 15.0546 15.1656 14.5307L14.4344 12.6692C12.6313 13.3775 11.4164 14.6329 10.6629 15.6767C10.2841 16.2015 10.0136 16.6839 9.83627 17.0387C9.74739 17.2165 9.68126 17.3635 9.63613 17.4695C9.61355 17.5225 9.59617 17.5653 9.58378 17.5967C9.57758 17.6124 9.57263 17.6252 9.56889 17.635C9.56702 17.6399 9.56545 17.6441 9.56418 17.6475C9.56355 17.6492 9.56299 17.6507 9.56251 17.652C9.56227 17.6526 9.56204 17.6532 9.56184 17.6538C9.56174 17.6541 9.5616 17.6544 9.56155 17.6546C9.56141 17.6549 9.56128 17.6553 10.5 18Z",fill:"currentColor"})))},Tb=(0,p.forwardRef)(Ab);n.p;var Pb,Ib,Lb,Mb,Kb,Db,Nb,Vb=["title","titleId"];function zb(){return zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hb=function(e,t){var n=e.title,r=e.titleId,o=Bb(e,Vb);return p.createElement("svg",zb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Pb||(Pb=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Ib||(Ib=p.createElement("rect",{x:7,y:7,width:10,height:10,fill:"currentColor",fillOpacity:.3})),Lb||(Lb=p.createElement("rect",{x:8,y:8,width:8,height:8,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2})),Mb||(Mb=p.createElement("rect",{x:14,y:14,width:4,height:4,rx:2,fill:"currentColor"})),Kb||(Kb=p.createElement("rect",{x:6,y:14,width:4,height:4,rx:2,fill:"currentColor"})),Db||(Db=p.createElement("rect",{x:14,y:6,width:4,height:4,rx:2,fill:"currentColor"})),Nb||(Nb=p.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})))},Fb=(0,p.forwardRef)(Hb);n.p;var Wb,$b,Ub,Zb,Gb,Yb=["title","titleId"];function Xb(){return Xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jb=function(e,t){var n=e.title,r=e.titleId,o=qb(e,Yb);return p.createElement("svg",Xb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Wb||(Wb=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),$b||($b=p.createElement("path",{d:"M7 7H17V9L16 14L15 9H9V15L14 16L9 17H7V7Z",fill:"currentColor",fillOpacity:.3})),Ub||(Ub=p.createElement("rect",{x:6.5,y:14.5,width:3,height:3,rx:1.5,fill:"currentColor"})),Zb||(Zb=p.createElement("rect",{x:14.5,y:6.5,width:3,height:3,rx:1.5,fill:"currentColor"})),Gb||(Gb=p.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})))},Qb=(0,p.forwardRef)(Jb);n.p;var ex,tx,nx,rx,ox,ix=["title","titleId"];function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lx=function(e,t){var n=e.title,r=e.titleId,o=sx(e,ix);return p.createElement("svg",ax({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ex||(ex=p.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),tx||(tx=p.createElement("path",{d:"M5 5H15V7L14 12L13 7H7V13L12 14L7 15H5V5Z",fill:"currentColor",fillOpacity:.3})),nx||(nx=p.createElement("path",{d:"M4.5 14C4.5 13.1716 5.17157 12.5 6 12.5C6.82843 12.5 7.5 13.1716 7.5 14C7.5 14.8284 6.82843 15.5 6 15.5C5.17157 15.5 4.5 14.8284 4.5 14Z",fill:"currentColor"})),rx||(rx=p.createElement("path",{d:"M12.5 6C12.5 5.17157 13.1716 4.5 14 4.5C14.8284 4.5 15.5 5.17157 15.5 6C15.5 6.82843 14.8284 7.5 14 7.5C13.1716 7.5 12.5 6.82843 12.5 6Z",fill:"currentColor"})),ox||(ox=p.createElement("path",{d:"M4 6C4 4.89543 4.89543 4 6 4C7.10457 4 8 4.89543 8 6C8 7.10457 7.10457 8 6 8C4.89543 8 4 7.10457 4 6Z",fill:"currentColor"})))},cx=(0,p.forwardRef)(lx);n.p;var dx,ux,hx,gx=["title","titleId"];function mx(){return mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fx=function(e,t){var n=e.title,r=e.titleId,o=px(e,gx);return p.createElement("svg",mx({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,dx||(dx=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),ux||(ux=p.createElement("path",{d:"M14.3478 11.2609C14.4708 10.6459 14.5323 10.3383 14.6022 10.2466C14.8023 9.98382 15.1977 9.98382 15.3978 10.2466C15.4677 10.3383 15.5292 10.6459 15.6522 11.2609V11.2609C15.7352 11.676 15.7767 11.8835 15.851 12.0636C16.0541 12.5553 16.4447 12.9459 16.9364 13.149C17.1165 13.2233 17.324 13.2648 17.7391 13.3478V13.3478C18.3541 13.4708 18.6617 13.5323 18.7534 13.6022C19.0162 13.8023 19.0162 14.1977 18.7534 14.3978C18.6617 14.4677 18.3541 14.5292 17.7391 14.6522V14.6522C17.324 14.7352 17.1165 14.7767 16.9364 14.851C16.4447 15.0541 16.0541 15.4447 15.851 15.9364C15.7767 16.1165 15.7352 16.324 15.6522 16.7391V16.7391C15.5292 17.3541 15.4677 17.6617 15.3978 17.7534C15.1977 18.0162 14.8023 18.0162 14.6022 17.7534C14.5323 17.6617 14.4708 17.3541 14.3478 16.7391V16.7391C14.2648 16.324 14.2233 16.1165 14.149 15.9364C13.9459 15.4447 13.5553 15.0541 13.0636 14.851C12.8835 14.7767 12.676 14.7352 12.2609 14.6522V14.6522C11.6459 14.5292 11.3383 14.4677 11.2466 14.3978C10.9838 14.1977 10.9838 13.8023 11.2466 13.6022C11.3383 13.5323 11.6459 13.4708 12.2609 13.3478V13.3478C12.676 13.2648 12.8835 13.2233 13.0636 13.149C13.5553 12.9459 13.9459 12.5553 14.149 12.0636C14.2233 11.8835 14.2648 11.676 14.3478 11.2609V11.2609Z",fill:"currentColor"})),hx||(hx=p.createElement("path",{d:"M8.34783 7.26087C8.47083 6.64585 8.53233 6.33834 8.60222 6.24657C8.80232 5.98382 9.19768 5.98382 9.39778 6.24657C9.46767 6.33834 9.52917 6.64585 9.65217 7.26087V7.26087C9.7352 7.67598 9.77671 7.88354 9.85103 8.06355C10.0541 8.55533 10.4447 8.94594 10.9364 9.14897C11.1165 9.22329 11.324 9.2648 11.7391 9.34783V9.34783C12.3541 9.47083 12.6617 9.53233 12.7534 9.60222C13.0162 9.80232 13.0162 10.1977 12.7534 10.3978C12.6617 10.4677 12.3541 10.5292 11.7391 10.6522V10.6522C11.324 10.7352 11.1165 10.7767 10.9364 10.851C10.4447 11.0541 10.0541 11.4447 9.85103 11.9364C9.77671 12.1165 9.7352 12.324 9.65217 12.7391V12.7391C9.52917 13.3541 9.46767 13.6617 9.39778 13.7534C9.19768 14.0162 8.80232 14.0162 8.60222 13.7534C8.53233 13.6617 8.47083 13.3541 8.34783 12.7391V12.7391C8.2648 12.324 8.22329 12.1165 8.14897 11.9364C7.94594 11.4447 7.55533 11.0541 7.06355 10.851C6.88354 10.7767 6.67598 10.7352 6.26087 10.6522V10.6522C5.64585 10.5292 5.33834 10.4677 5.24657 10.3978C4.98382 10.1977 4.98382 9.80232 5.24657 9.60222C5.33834 9.53233 5.64585 9.47083 6.26087 9.34783V9.34783C6.67598 9.2648 6.88354 9.22329 7.06355 9.14897C7.55533 8.94594 7.94594 8.55533 8.14897 8.06355C8.22329 7.88354 8.2648 7.67598 8.34783 7.26087V7.26087Z",fill:"currentColor"})))},vx=(0,p.forwardRef)(fx);n.p;var yx,bx,xx,wx=["title","titleId"];function Cx(){return Cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var jx=function(e,t){var n=e.title,r=e.titleId,o=Sx(e,wx);return p.createElement("svg",Cx({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,yx||(yx=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),p.createElement("mask",{id:"mask0_1972_16465",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:5,y:5,width:14,height:14},bx||(bx=p.createElement("rect",{x:5,y:5,width:14,height:14,rx:7,fill:"currentColor"}))),xx||(xx=p.createElement("g",{mask:"url(#mask0_1972_16465)"},p.createElement("rect",{x:5,y:5,width:14,height:14,rx:7,fill:"currentColor",fillOpacity:.3}),p.createElement("rect",{x:6,y:6,width:12,height:12,rx:6,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2}),p.createElement("path",{d:"M7 7L17 17",stroke:"currentColor",strokeWidth:2}))))},kx=(0,p.forwardRef)(jx);n.p;var Ox,Rx,Ex,_x=["title","titleId"];function Ax(){return Ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Px=function(e,t){var n=e.title,r=e.titleId,o=Tx(e,_x);return p.createElement("svg",Ax({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ox||(Ox=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Rx||(Rx=p.createElement("rect",{x:5,y:16,width:14,height:3,rx:1.5,fill:"currentColor"})),Ex||(Ex=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9913 5C11.0792 5 10.3398 5.73939 10.3398 6.65147V9.9544C10.3398 10.0341 10.3455 10.1125 10.3564 10.1892L10.1927 10.0288C9.60953 9.45727 8.67632 9.45727 8.09313 10.0288C7.49305 10.6169 7.49304 11.5831 8.09313 12.1712L10.6002 14.6281C11.3778 15.3902 12.6222 15.3902 13.3999 14.6281L15.907 12.1712C16.5071 11.5831 16.5071 10.6169 15.907 10.0288C15.3238 9.45727 14.3906 9.45727 13.8074 10.0288L13.6232 10.2093C13.6361 10.1262 13.6428 10.0411 13.6428 9.9544V6.65147C13.6428 5.73939 12.9034 5 11.9913 5Z",fill:"currentColor"})))},Ix=(0,p.forwardRef)(Px);n.p;var Lx,Mx,Kx,Dx=["title","titleId"];function Nx(){return Nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zx=function(e,t){var n=e.title,r=e.titleId,o=Vx(e,Dx);return p.createElement("svg",Nx({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Lx||(Lx=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Mx||(Mx=p.createElement("rect",{x:7.75732,y:6.34314,width:14,height:2,rx:1,transform:"rotate(45 7.75732 6.34314)",fill:"#DD0000"})),Kx||(Kx=p.createElement("rect",{width:14,height:2,rx:1,transform:"matrix(-0.707107 0.707107 0.707107 0.707107 16.2427 6.34314)",fill:"#DD0000"})))},Bx=(0,p.forwardRef)(zx);n.p;var Hx,Fx,Wx,$x,Ux=["title","titleId"];function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Yx=function(e,t){var n=e.title,r=e.titleId,o=Gx(e,Ux);return p.createElement("svg",Zx({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Hx||(Hx=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Fx||(Fx=p.createElement("rect",{x:5,y:10.2441,width:12.3358,height:3.52451,rx:1.76226,fill:"currentColor"})),Wx||(Wx=p.createElement("rect",{x:19.8248,y:11.8992,width:8.35319,height:3.95735,rx:1.97868,transform:"rotate(135 19.8248 11.8992)",fill:"currentColor"})),$x||($x=p.createElement("rect",{x:19.8248,y:11.8992,width:4.1766,height:7.9147,rx:2,transform:"rotate(135 19.8248 11.8992)",fill:"currentColor"})))},Xx=(0,p.forwardRef)(Yx);n.p;var qx,Jx,Qx=["title","titleId"];function ew(){return ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nw=function(e,t){var n=e.title,r=e.titleId,o=tw(e,Qx);return p.createElement("svg",ew({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,qx||(qx=p.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.3})),Jx||(Jx=p.createElement("path",{d:"M9.38887 4.44399C9.58125 3.852 10.4188 3.852 10.6111 4.44399L11.5871 7.44738C11.6731 7.71212 11.9199 7.89136 12.1982 7.89137L15.3562 7.89149C15.9787 7.89152 16.2375 8.68804 15.7339 9.05393L13.1791 10.9102C12.9539 11.0739 12.8597 11.3639 12.9457 11.6286L13.9214 14.6321C14.1138 15.2241 13.4362 15.7164 12.9326 15.3505L10.3777 13.4944C10.1525 13.3308 9.84753 13.3308 9.62232 13.4944L7.06738 15.3505C6.56378 15.7164 5.88623 15.2241 6.07855 14.6321L7.05431 11.6286C7.14032 11.3639 7.04609 11.0739 6.82089 10.9102L4.2661 9.05393C3.76253 8.68803 4.02133 7.89152 4.64379 7.89149L7.80178 7.89137C8.08015 7.89136 8.32686 7.71212 8.41289 7.44738L9.38887 4.44399Z",fill:"currentColor"})))},rw=(0,p.forwardRef)(nw);n.p;var ow,iw,aw,sw,lw=["title","titleId"];function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var uw=function(e,t){var n=e.title,r=e.titleId,o=dw(e,lw);return p.createElement("svg",cw({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ow||(ow=p.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),iw||(iw=p.createElement("path",{d:"M3.5 10C3.5 6.41015 6.41015 3.5 10 3.5V3.5C13.5899 3.5 16.5 6.41015 16.5 10V10C16.5 13.5899 13.5899 16.5 10 16.5V16.5C6.41015 16.5 3.5 13.5899 3.5 10V10Z",fill:"currentColor",fillOpacity:.3})),aw||(aw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 10C5.5 12.4853 7.51472 14.5 10 14.5C12.4853 14.5 14.5 12.4853 14.5 10C14.5 7.51472 12.4853 5.5 10 5.5C7.51472 5.5 5.5 7.51472 5.5 10ZM10 3.5C6.41015 3.5 3.5 6.41015 3.5 10C3.5 13.5899 6.41015 16.5 10 16.5C13.5899 16.5 16.5 13.5899 16.5 10C16.5 6.41015 13.5899 3.5 10 3.5Z",fill:"currentColor",fillOpacity:.3})),sw||(sw=p.createElement("path",{d:"M12.3957 13.8101L13.8346 15.249C14.3756 14.8532 14.853 14.3757 15.2489 13.8348L13.8099 12.3959L7.60422 6.19017L6.16527 4.75122C5.62436 5.14708 5.14691 5.62452 4.75107 6.16545L6.19002 7.6044L12.3957 13.8101Z",fill:"currentColor"})))},hw=(0,p.forwardRef)(uw);n.p;var gw,mw=["title","titleId"];function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var vw=function(e,t){var n=e.title,r=e.titleId,o=fw(e,mw);return p.createElement("svg",pw({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,gw||(gw=p.createElement("path",{d:"M7.41 18.59L8.83 20L12 16.83L15.17 20L16.58 18.59L12 14L7.41 18.59ZM16.59 5.41L15.17 4L12 7.17L8.83 4L7.41 5.41L12 10L16.59 5.41Z",fill:"currentColor"})))},yw=(0,p.forwardRef)(vw);n.p;var bw,xw=["title","titleId"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sw=function(e,t){var n=e.title,r=e.titleId,o=Cw(e,xw);return p.createElement("svg",ww({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,bw||(bw=p.createElement("path",{d:"M12 5.83L15.17 9L16.58 7.59L12 3L7.41 7.59L8.83 9L12 5.83ZM12 18.17L8.83 15L7.42 16.41L12 21L16.59 16.41L15.17 15L12 18.17Z",fill:"currentColor"})))},jw=(0,p.forwardRef)(Sw);n.p;var kw,Ow=["title","titleId"];function Rw(){return Rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _w=function(e,t){var n=e.title,r=e.titleId,o=Ew(e,Ow);return p.createElement("svg",Rw({width:8,height:12,viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,kw||(kw=p.createElement("path",{d:"M3.33341 9.99935C3.33341 10.7327 2.73341 11.3327 2.00008 11.3327C1.26675 11.3327 0.666748 10.7327 0.666748 9.99935C0.666748 9.26602 1.26675 8.66602 2.00008 8.66602C2.73341 8.66602 3.33341 9.26602 3.33341 9.99935ZM2.00008 4.66602C1.26675 4.66602 0.666748 5.26602 0.666748 5.99935C0.666748 6.73268 1.26675 7.33268 2.00008 7.33268C2.73341 7.33268 3.33341 6.73268 3.33341 5.99935C3.33341 5.26602 2.73341 4.66602 2.00008 4.66602ZM2.00008 0.666016C1.26675 0.666016 0.666748 1.26602 0.666748 1.99935C0.666748 2.73268 1.26675 3.33268 2.00008 3.33268C2.73341 3.33268 3.33341 2.73268 3.33341 1.99935C3.33341 1.26602 2.73341 0.666016 2.00008 0.666016ZM6.00008 3.33268C6.73341 3.33268 7.33341 2.73268 7.33341 1.99935C7.33341 1.26602 6.73341 0.666016 6.00008 0.666016C5.26675 0.666016 4.66675 1.26602 4.66675 1.99935C4.66675 2.73268 5.26675 3.33268 6.00008 3.33268ZM6.00008 4.66602C5.26675 4.66602 4.66675 5.26602 4.66675 5.99935C4.66675 6.73268 5.26675 7.33268 6.00008 7.33268C6.73341 7.33268 7.33341 6.73268 7.33341 5.99935C7.33341 5.26602 6.73341 4.66602 6.00008 4.66602ZM6.00008 8.66602C5.26675 8.66602 4.66675 9.26602 4.66675 9.99935C4.66675 10.7327 5.26675 11.3327 6.00008 11.3327C6.73341 11.3327 7.33341 10.7327 7.33341 9.99935C7.33341 9.26602 6.73341 8.66602 6.00008 8.66602Z",fill:"currentColor"})))},Aw=(0,p.forwardRef)(_w);n.p;var Tw,Pw=["title","titleId"];function Iw(){return Iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mw=function(e,t){var n=e.title,r=e.titleId,o=Lw(e,Pw);return p.createElement("svg",Iw({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Tw||(Tw=p.createElement("path",{d:"M9.5 5H11.5V7H9.5V5ZM9.5 9H11.5V15H9.5V9ZM10.5 0C4.98 0 0.5 4.48 0.5 10C0.5 15.52 4.98 20 10.5 20C16.02 20 20.5 15.52 20.5 10C20.5 4.48 16.02 0 10.5 0ZM10.5 18C6.09 18 2.5 14.41 2.5 10C2.5 5.59 6.09 2 10.5 2C14.91 2 18.5 5.59 18.5 10C18.5 14.41 14.91 18 10.5 18Z",fill:"#898098"})))},Kw=(0,p.forwardRef)(Mw);n.p;var Dw,Nw=["title","titleId"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bw=function(e,t){var n=e.title,r=e.titleId,o=zw(e,Nw);return p.createElement("svg",Vw({width:12,height:9,viewBox:"0 0 12 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Dw||(Dw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.89429 4.70846C3.52617 1.25342 8.47383 1.25342 10.1047 4.70846C10.1634 4.83291 10.2447 4.9439 10.3439 5.03509C10.4431 5.12629 10.5583 5.19589 10.6829 5.23994C10.8075 5.28399 10.9391 5.30162 11.0701 5.29182C11.2012 5.28202 11.3291 5.24499 11.4466 5.18283C11.5641 5.12067 11.669 5.03461 11.7551 4.92956C11.8412 4.82451 11.9069 4.70253 11.9485 4.57058C11.9901 4.43863 12.0068 4.2993 11.9975 4.16053C11.9883 4.02177 11.9533 3.8863 11.8946 3.76185C9.52476 -1.25395 2.47525 -1.25395 0.105411 3.76185C-0.013133 4.01319 -0.0325336 4.3041 0.0514769 4.57058C0.135487 4.83707 0.316027 5.0573 0.553379 5.18283C0.790732 5.30836 1.06545 5.3289 1.31711 5.23994C1.56877 5.15098 1.77574 4.9598 1.89429 4.70846ZM6 3.70573C5.33701 3.70573 4.70116 3.98462 4.23236 4.48106C3.76355 4.97749 3.50017 5.6508 3.50017 6.35286C3.50017 7.05493 3.76355 7.72824 4.23236 8.22467C4.70116 8.72111 5.33701 9 6 9C6.663 9 7.29884 8.72111 7.76764 8.22467C8.23645 7.72824 8.49983 7.05493 8.49983 6.35286C8.49983 5.6508 8.23645 4.97749 7.76764 4.48106C7.29884 3.98462 6.663 3.70573 6 3.70573Z",fill:"currentColor"})))},Hw=(0,p.forwardRef)(Bw);n.p;var Fw,Ww,$w,Uw,Zw,Gw,Yw=["title","titleId"];function Xw(){return Xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jw=function(e,t){var n=e.title,r=e.titleId,o=qw(e,Yw);return p.createElement("svg",Xw({width:16,height:9,viewBox:"0 0 18 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Fw||(Fw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.72529 0.0387335C2.25633 -0.112991 2.80981 0.194501 2.96154 0.725536C4.68524 6.7585 13.3148 6.7585 15.0385 0.725536C15.1902 0.194501 15.7437 -0.112991 16.2747 0.0387335C16.8058 0.190458 17.1133 0.743944 16.9615 1.27498C14.6852 9.24202 3.31479 9.24202 1.03849 1.27498C0.886765 0.743944 1.19426 0.190458 1.72529 0.0387335Z",fill:"currentColor"})),Ww||(Ww=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.2493 3.33963C13.8844 3.75424 13.9248 4.38612 14.3394 4.75097L15.5894 5.85097C16.004 6.21583 16.6359 6.17549 17.0007 5.76089C17.3656 5.34628 17.3252 4.7144 16.9106 4.34954L15.6606 3.24954C15.246 2.88469 14.6142 2.92502 14.2493 3.33963Z",fill:"currentColor"})),$w||($w=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4972 8.19473C13.0032 8.44172 12.4026 8.2415 12.1556 7.74752L11.4056 6.24752C11.1586 5.75354 11.3588 5.15287 11.8528 4.90588C12.3468 4.65889 12.9474 4.85911 13.1944 5.35309L13.9444 6.85309C14.1914 7.34707 13.9912 7.94774 13.4972 8.19473Z",fill:"currentColor"})),Uw||(Uw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00001 6.00026C9.5523 6.00026 10 6.44797 10 7.00026V8.20026C10 8.75254 9.5523 9.20026 9.00001 9.20026C8.44773 9.20026 8.00001 8.75254 8.00001 8.20026V7.00026C8.00001 6.44797 8.44773 6.00026 9.00001 6.00026Z",fill:"currentColor"})),Zw||(Zw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.14724 4.90588C6.64122 5.15287 6.84144 5.75354 6.59445 6.24752L5.84445 7.74752C5.59746 8.2415 4.99679 8.44172 4.50281 8.19473C4.00883 7.94774 3.80861 7.34707 4.0556 6.85309L4.8056 5.35309C5.05259 4.85911 5.65326 4.65889 6.14724 4.90588Z",fill:"currentColor"})),Gw||(Gw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.75073 3.33963C4.11558 3.75424 4.07525 4.38612 3.66064 4.75097L2.41064 5.85097C1.99603 6.21583 1.36415 6.17549 0.999299 5.76089C0.634444 5.34628 0.674777 4.7144 1.08938 4.34954L2.33938 3.24954C2.75399 2.88469 3.38587 2.92502 3.75073 3.33963Z",fill:"currentColor"})))},Qw=(0,p.forwardRef)(Jw);n.p;var eC,tC,nC,rC,oC,iC,aC=["title","titleId"];function sC(){return sC=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cC=function(e,t){var n=e.title,r=e.titleId,o=lC(e,aC);return p.createElement("svg",sC({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,eC||(eC=p.createElement("path",{d:"M4 2C2.9 2 2 2.89 2 4V7H4V4H7V2H4Z",fill:"currentColor"})),tC||(tC=p.createElement("path",{d:"M22 7V4C22 2.89 21.1 2 20 2H17V4H20V7H22Z",fill:"currentColor"})),nC||(nC=p.createElement("path",{d:"M2 17V20C2 21.11 2.9 22 4 22H7V20H4V17H2Z",fill:"currentColor"})),rC||(rC=p.createElement("path",{d:"M14 2H10V4H14V2Z",fill:"currentColor"})),oC||(oC=p.createElement("path",{d:"M4 10H2V14H4V10Z",fill:"currentColor"})),iC||(iC=p.createElement("path",{d:"M10 16.5C10 12.9101 12.9101 10 16.5 10C20.0899 10 23 12.9101 23 16.5C23 20.0899 20.0899 23 16.5 23H10V16.5Z",fill:"currentColor"})))},dC=(0,p.forwardRef)(cC);n.p;const uC=(e,t=!1)=>t?[...e].reverse():e,hC=({value:e,defaultValue:t,multi:n=!1,reverse:r=!1,continuous:o=!1,min:i=0,max:a=100,step:s=1,size:l=120,align:c="horizontal",resetValue:d,minIcon:u,maxIcon:h,onChange:g,onMinIconClick:m,onMaxIconClick:f})=>{var v;const y=null!=(v=null!=e?e:t)?v:n?[0,100]:0,[b,x]=((e,t)=>{const n=(0,p.useMemo)((()=>{var n;return null!=(n=null!=e?e:t)?n:""}),[e,t]),[r,o]=(0,p.useState)(n);return(0,p.useEffect)((()=>{o(n)}),[n]),[r,e=>o(e)]})(y,null!=t?t:y);let C=b;const S=n&&Array.isArray(b),j=e=>(0,w.clamp)(Math.round(e/s)*s,i,a),k=(e,t=!0,r=!1)=>{const i=n&&Array.isArray(e)?e.map(j):j(e);(C!==i||r)&&(x(i),(t||o||r)&&(null==g||g(e)),C=i)},O=(0,p.useCallback)((e=>(e-i)/(a-i)*100),[i,a]),R=(0,p.useCallback)((e=>{const t=a-i;return(0,w.clamp)(t*(e/l)+i,i,a)}),[i,a,l]),E=(0,p.useCallback)((()=>{if(!n)return f?f(b):void k(b+s)}),[s,n,b]),A=(0,p.useCallback)((()=>{if(!n)return m?m(b):void k(b-s)}),[s,n,b]),T=(0,p.useCallback)((e=>{const t=e.currentTarget.getBoundingClientRect(),o="horizontal"===c,s=o?t.width:t.height,l=o?t.left:t.top,d=o?e.clientX:e.clientY,u=(0,w.clamp)(d-l,0,s)/s;let h=(a-i)*u+i;if(r&&(h=a-h),n&&Array.isArray(b)){const e=u>.5?1:0,t=[...b];t[e]=h,k(t,!0,!1)}else k(h,!0,!1)}),[c,i,a,r,b]),P="horizontal"===c?"minWidth":"minHeight";return(0,_.jsxs)(Ze.eB,{name:"range",mod:{align:c},style:{[P]:l},children:[r?h&&(0,_.jsx)(Ze.Sl,{name:"icon",onMouseDown:E,children:h}):u&&(0,_.jsx)(Ze.Sl,{name:"icon",onMouseDown:A,children:u}),(0,_.jsxs)(Ze.Sl,{name:"body",onClick:T,children:[(0,_.jsx)(Ze.Sl,{name:"line"}),(0,_.jsx)(mC,{align:c,reverse:r,value:b,valueConvert:O}),S?uC(b,r).map(((e,t)=>{const n=r?0===t?1:0:t,o=0===n?1:0,s=e=>{const t=[],r=b[o];return t[n]=0===n?(0,w.clamp)(e,i,r):(0,w.clamp)(e,r,a),t[o]=b[o],t};return(0,_.jsx)(gC,{align:c,value:e,bodySize:l,reverse:r,resetValue:d[n],valueConvert:O,offsetConvert:R,onChangePosition:e=>k(s(e),!1),onChange:e=>k(s(e),!0,!0)},`handle-${n}`)})):(0,_.jsx)(gC,{align:c,bodySize:l,reverse:r,value:b,valueConvert:O,offsetConvert:R,resetValue:d,onChangePosition:e=>k(e,!1),onChange:e=>k(e,!0,!0)})]}),r?u&&(0,_.jsx)(Ze.Sl,{name:"icon",onMouseDown:A,children:u}):h&&(0,_.jsx)(Ze.Sl,{name:"icon",onMouseDown:E,children:h})]})},gC=({value:e,valueConvert:t,offsetConvert:n,onChangePosition:r,onChange:o,resetValue:i,align:a,bodySize:s,reverse:l=!1})=>{const c=t(e),d="horizontal"===a?l?"right":"left":l?"bottom":"top",u="horizontal"===a?"pageX":"pageY";return(0,_.jsx)(Ze.Sl,{name:"range-handle",style:{[d]:`${t(e)}%`},onMouseDownCapture:e=>{e.stopPropagation();const t=e[u];let i;const a=e=>{const o=l?t-e[u]:e[u]-t,a=(0,w.clamp)(o+c/100*s,0,s);i=n(a),requestAnimationFrame((()=>{null==r||r(i)}))},d=e=>{e.stopPropagation(),(0,w.isDefined)(i)&&(null==o||o(i)),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)},onDoubleClick:()=>{(0,w.isDefined)(i)&&(null==o||o(i))}})},mC=({value:e,valueConvert:t,align:n,reverse:r})=>{const o={},i=Array.isArray(e);return"horizontal"===n?(i?(o.left=`${t(e[0])}%`,o.right=100-t(e[1])+"%"):(o.left=0,o.right=100-t(e)+"%"),r&&!i&&([o.left,o.right]=[o.right,o.left])):"vertical"===n&&(i?(o.top=`${t(e[0])}%`,o.bottom=100-t(e[1])+"%"):(o.top=0,o.bottom=100-t(e)+"%"),r&&!i&&([o.top,o.bottom]=[o.bottom,o.top])),(0,_.jsx)(Ze.Sl,{name:"indicator",style:o})},pC=({volume:e=.5,onVolumeChange:t})=>{const n=(0,p.useRef)(e),r={color:"#99A0AE"},o=(0,p.useMemo)((()=>e>.5?(0,_.jsx)(Du,{style:r}):e>0?(0,_.jsx)(_u,{style:r}):(0,_.jsx)(Cu,{style:r})),[e]);return(0,_.jsx)(hC,{continuous:!0,min:Cn.min,max:Cn.max,step:Cn.step,value:e,minIcon:o,onChange:e=>null==t?void 0:t(Number(e)),onMinIconClick:()=>{0===e?null==t||t(n.current):(n.current=e,null==t||t(0))}})},fC=({text:e})=>(0,_.jsxs)(Ze.eB,{name:"control-info",children:[(0,_.jsx)(Ka,{}),(0,_.jsx)(Ze.Sl,{name:"tooltip",children:e})]}),vC=({description:e,info:t,max:n,min:r,value:o,step:i=1,onChange:a})=>{const s=(0,p.useRef)(),[l,c]=(0,p.useState)();(0,p.useEffect)((()=>{d()}),[o]);const d=()=>{s.current&&(s.current.style.backgroundSize=100*(o-r)/(n-r)+"% 100%")},u=e=>{c(void 0);if(e.currentTarget.value.match(/^[0-9]*\.$/))return void c(e.currentTarget.value);const t=e.currentTarget.value.match(/^\.[0-9]*$/)?`0${e.currentTarget.value}`:e.currentTarget.value,o=Number.parseFloat(t);isNaN(o)?c(e.currentTarget.value):o>n||on||l{const[o,i]=(0,p.useState)(!1);(0,p.useEffect)((()=>{i(e<=0)}),[e]);const a=e=>{const n=Number.parseInt(e.currentTarget.value);n?n>yC?null==t||t(1):n<0?null==t||t(0):null==t||t(n/yC):null==t||t(0)},s=()=>{i(!o),null==t||t(o?1:0)},l=()=>(0,_.jsx)(Ze.Sl,{name:"mute",children:(0,_.jsx)(Ze.Sl,{name:"mute-button",onClick:s,children:o?"Unmute":"Mute"})});return(0,_.jsxs)(Ze.eB,{name:"audio-control",onClick:e=>e.stopPropagation(),children:[(0,_.jsx)(TC,{look:r?"active":void 0,onClick:n,children:o?(0,_.jsx)(Aa,{}):(0,_.jsx)(ja,{})}),r&&(0,_.jsxs)(Ze.Sl,{name:"modal",children:[(0,_.jsx)(vC,{min:0,max:yC,value:Math.round(e*yC),onChange:a,description:"Volume",info:"Increase or decrease the volume of the audio"}),l()]})]})},xC=({configModal:e,speed:t,amp:n,onSpeedChange:r,onSetModal:o,onAmpChange:i,toggleVisibility:a,layerVisibility:s})=>{const l=null!=t?t:1,[c,d]=(0,p.useState)(!0),[u,h]=(0,p.useState)(!0);(0,p.useEffect)((()=>{if(s){var e,t;const n=!0;d(null!=(e=null==s||null==s.get?void 0:s.get("timeline"))?e:n),h(null!=(t=null==s||null==s.get?void 0:s.get("waveform"))?t:n)}}),[s]);const g=()=>{d(!c),null==a||a("timeline",!c)},m=()=>{h(!u),null==a||a("waveform",!u),null==a||a("regions",!u)},f=e=>{const t=Number.parseFloat(e.currentTarget.value);isNaN(t)||r(t)},v=e=>{const t=Number.parseFloat(e.currentTarget.value);i(t)};return(0,_.jsxs)(Ze.eB,{name:"audio-config",onClick:e=>e.stopPropagation(),children:[(0,_.jsx)(TC,{look:e?"active":void 0,onClick:o,children:(0,_.jsx)(ya,{})}),e&&(0,_.jsxs)(Ze.Sl,{name:"modal",children:[(0,_.jsx)(vC,{min:.5,max:2.5,step:.1,value:l,description:"Playback speed",info:"Increase or decrease the playback speed",onChange:f}),(0,_.jsx)(vC,{min:1,max:150,step:.1,value:n,description:"Audio zoom y-axis",info:"Increase or decrease the appearance of amplitude",onChange:v}),(0,_.jsxs)(Ze.Sl,{name:"buttons",children:[(0,_.jsxs)(Ze.Sl,{name:"menu-button",onClick:g,children:[c?"Hide":"Show"," timeline"]}),(0,_.jsxs)(Ze.Sl,{name:"menu-button",onClick:m,children:[u?"Hide":"Show"," audio wave"]})]})]})]})};class wC{constructor(e,t,n,r="_"){this.input=void 0,this.maskPattern=void 0,this.proxyChar=void 0,this.numValidate=void 0,this.stringValidate=void 0,this.mask=void 0,this.validators=void 0,this.placeholder=void 0,this.regExp=void 0,this.onChange=void 0,this.input=e,this.maskPattern=t,this.proxyChar=r,this.onChange=n,this.numValidate=/^\d$/,this.stringValidate=/^[a-zA-Z]$/,this.mask=t.split("").map((e=>{let t;return"A"===e?t=this.stringValidate:"1"===e&&(t=this.numValidate),{char:e,validator:t}})),this.validators=this.mask.filter((e=>e.validator)),this.placeholder=this.mask.map((e=>e.validator?this.proxyChar:e.char)).join("");const o="\\^$*+?.()|{}[]".split(""),i=this.mask.map((e=>{const{validator:t,char:n}=e;return t?t===this.numValidate?"\\d":"[a-zA-Z]":o.includes(n)?`\\${n}`:n})).join("");this.regExp=i,e.pattern=i,e.placeholder=e.placeholder||this.placeholder,e.addEventListener("keydown",this.__inputKeydownMask.bind(this)),e.addEventListener("paste",this.__inputPaste.bind(this)),e.addEventListener("focus",this.__inputFocus.bind(this)),e.addEventListener("blur",this.__inputBlur.bind(this))}parseRaw(e){const t=(e=e||"").replace(/\W/g,"");if(t.length===this.validators.length){if(!t.split("").map(((e,t)=>!!e.match(this.validators[t].validator))).reduce(((e,t)=>!1!==t&&e)))return!1;let e=-1;return this.mask.map((n=>n.validator?(e+=1,t[e]):n.char)).join("")}}disconnect(){this.input.addEventListener("keydown",this.__inputKeydownMask.bind(this)),this.input.addEventListener("paste",this.__inputPaste.bind(this)),this.input.addEventListener("focus",this.__inputFocus.bind(this)),this.input.addEventListener("blur",this.__inputBlur.bind(this))}get value(){return this.parseRaw(this.input.value)}parsePartial(e=""){const t=(e=e||"").replace(/\W/g,"");let n=-1;return this.mask.map((e=>e.validator?(n+=1,t[n]||this.proxyChar):e.char||this.proxyChar)).join("")||this.placeholder}splice(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}__inputBlur(e){e.target.value===this.placeholder&&this.onChange("")}__inputFocus(e){e.target.value||this.onChange(this.placeholder)}__inputKeydownMask(e){const{selectionStart:t,selectionEnd:n}=e.target,r=e.key;let o=t>this.mask.length-1?this.mask.length-1:t,i=this.mask[o];if(!["Tab","Enter","Escape","ArrowLeft","ArrowRight","Shift"].includes(r)&&!e.metaKey)if(t===n){e.preventDefault();let n=null;if("Backspace"===r?n=1:"Delete"===r&&(n=0),null!==n){const r=this.mask[t-n];if(r){const o=r.validator?this.proxyChar:r.char;this.onChange(this.splice(e.target.value,t-n,o)),e.target.setSelectionRange(t-n,t-n)}return}for(;i&&!i.validator&&r!==i.char;)this.onChange(this.splice(e.target.value,o,i.char)),e.target.setSelectionRange(o+1,o+1),i=this.mask[o+1],o+=1;if(i&&i.validator){if(!!!r.match(i.validator))return e.preventDefault(),!1}this.onChange(this.splice(e.target.value,o,r)),setTimeout((e=>e.setSelectionRange(o+1,o+1)),0,e.target)}else setTimeout((()=>{let o=e.target.value;const i="Backspace"===r||"Delete"===r?this.proxyChar:r,a="Backspace"===r||"Delete"===r?t:t+1;for(let e=t;e{this.onChange(n)}))}}const CC=(0,p.forwardRef)((({text:e,children:t,required:n,placement:r,description:o,size:i,large:a,style:s,simple:l,flat:c},d)=>{const u=l?"div":"label",h={size:i,large:a,flat:c,placement:r,withDescription:!!o,empty:!t};return(0,_.jsxs)(Ze.eB,{ref:d,name:"field-label",mod:h,tag:u,style:s,"data-required":n,children:[(0,_.jsx)(Ze.Sl,{name:"text",children:(0,_.jsxs)(Ze.Sl,{name:"content",children:[e,o&&(0,_.jsx)(Ze.Sl,{name:"description",children:o})]})}),(0,_.jsx)(Ze.Sl,{name:"field",children:t})]})})),SC=CC,jC=["sidepanel","value","readonly","onChange","label"],kC=e=>{let{sidepanel:t=!1,value:n,readonly:r=!1,onChange:o,label:i}=e,a=(0,Yn.A)(e,jC);const s=p.createRef(),[l,c]=(0,p.useState)(n);(0,p.useEffect)((()=>{s.current&&new wC(s.current,"11:11:11:111",(e=>{c(e)}))}),[]),(0,p.useEffect)((()=>{c(d(n||0,!0))}),[n]);const d=(0,p.useCallback)(((e,t=!1)=>{const n=new Date(1e3*e).toISOString();let r=e>3600?n.substr(11,8):`00:${n.substr(14,5)}`;if(t){const e="00"!==n.substr(11,2);r=n.substr(e?11:14,e?12:9).replace(".",":"),r=e?r:`00:${r}`}return r}),[]),u=e=>{const t=e.currentTarget.value.split(":");t[0]=1===t[0].toString().length?`0${t[0].toString()}`:`${t[0]}`,(e=>{const t=e.split(":").reverse();let n=0;if(e.indexOf("_")>=0)return;const r=[e=>e/1e3,e=>e,e=>60*e,e=>60*e*60];t.forEach(((e,t)=>{n+=r[t](Number.parseFloat(e))})),o(n)})(t.join(":")),c(d(n||0,!0))},h=e=>{var t;"Enter"===e.key&&(null==(t=e.currentTarget)||null==t.blur||t.blur())},g=(0,_.jsx)(Ze.eB,Object.assign({name:"time-box",mod:{sidepanel:t}},a,{children:(0,_.jsx)(Ze.Sl,{name:"input-time",maxLength:12,tag:"input",ref:s,type:"text",readOnly:r,value:l,onKeyDown:h,onChange:()=>{},onBlur:u})}));return i?(0,_.jsx)(SC,{size:"small",flat:!0,text:i,children:g}):g},OC=({isSidepanel:e=!1,startTime:t,endTime:n=0,minTime:r,maxTime:o=0,currentTime:i,startTimeReadonly:a=!1,endTimeReadonly:s=!1,onChangeStartTime:l,onChangeEndTime:c,showDuration:d=!1,showLabels:u=!1})=>{const h=i||t;return(0,_.jsxs)(Ze.eB,{name:"timer-duration-control",children:[(0,_.jsx)(kC,{sidepanel:e,readonly:a,value:h,onChange:e=>{e>=r&&e<=o&&e<=n&&(null==l||l(e))},label:u?"Start":void 0,"data-testid":"timebox-current-time"}),(0,_.jsx)(kC,{sidepanel:e,readonly:s,value:n,onChange:e=>{e>=r&&e<=o&&e>=h&&(null==c||c(e))},"data-testid":"timebox-end-time",label:u?"End":void 0}),d&&(0,_.jsx)(kC,{sidepanel:e,readonly:!0,value:n-t,onChange:()=>{},"data-testid":"timebox-duration-time",label:u?"Duration":void 0})]})},RC=["length","position","frameRate","playing","collapsed","duration","extraControls","fullscreen","altHopSize","disableFrames","allowFullscreen","allowViewCollapse","onRewind","onForward","onPlay","onPause","onFullScreenToggle","onStepBackward","onPositionChange","onStepForward","onSpeedChange","onToggleCollapsed","formatPosition","toggleVisibility","layerVisibility","mediaType"],EC=["children"],_C=({time:e,fps:t})=>{const n=Math.round(t).toString(),r=1e3/t,o=1e3*e%1e3;return Math.round(o/r).toString().padStart(n.length,"0")},AC=(0,p.memo)((e=>{let{length:t=1e3,position:n,frameRate:r=1024,playing:o,collapsed:i,duration:a,extraControls:l,fullscreen:c,altHopSize:d,disableFrames:u,allowFullscreen:h,allowViewCollapse:g,onRewind:m,onForward:f,onPlay:v,onPause:y,onFullScreenToggle:b,onStepBackward:x,onPositionChange:C,onStepForward:S,onSpeedChange:j,onToggleCollapsed:k,formatPosition:R,toggleVisibility:E,layerVisibility:A,mediaType:T}=e,P=(0,Yn.A)(e,RC);const{settings:I}=(0,p.useContext)(Ar),[L,M]=(0,p.useState)(!1),[K,D]=(0,p.useState)(!1),[N,V]=(0,p.useState)(!1),[z,B]=[1===n,n===t],H=(0,p.useMemo)((()=>Math.max((t-1)/r,0)),[t,r]),F=(0,p.useMemo)((()=>(n-1)/r),[n,r]),W=MC(P.customControls),$=(e,t)=>n=>{e(n,null!=t?t:void 0)},U=(0,p.useCallback)((()=>{o?null==y||y():null==v||v()}),[o,v,y]),Z=e=>{e.stopPropagation(),K&&D(!1),V(!N)},G=e=>{e.stopPropagation(),N&&V(!1),D(!K)},Y=()=>{D(!1),V(!1)};(0,p.useEffect)((()=>{const e=e=>{if(null==I||!I.stepSize)return;const t="Shift"===e.key;"keydown"===e.type&&t&&!L?M(!0):"keyup"===e.type&&t&&L&&M(!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",e),document.addEventListener("click",Y),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",e),document.removeEventListener("click",Y)}}),[L]);return(0,_.jsxs)(Ze.eB,{name:"timeline-controls",tag:Fa,spread:!0,style:{gridAutoColumns:"auto"},children:[(0,O.VS)(O.vS)&&"audio"===T?(0,_.jsxs)(Ze.Sl,{name:"group",tag:Fa,size:"small",style:{gridAutoColumns:"auto"},children:[(0,_.jsx)(xC,{onSetModal:G,onAmpChange:P.onAmpChange,configModal:K,onSpeedChange:e=>null==j?void 0:j(e),speed:P.speed||0,amp:P.amp||0,toggleVisibility:E,layerVisibility:A}),(0,_.jsx)(bC,{volume:P.volume||0,onVolumeChange:P.onVolumeChange,onSetModal:Z,audioModal:N})]}):(0,_.jsxs)(Ze.Sl,{name:"group",tag:Fa,size:"small",style:{gridAutoColumns:"auto"},children:[P.controls&&Object.entries(P.controls).map((([e,r])=>{if(!1===r)return;const o=s[e];return(0,w.isDefined)(o)&&(0,_.jsx)(o,{length:t,position:n-1,volume:P.volume,onPositionChange:C,onVolumeChange:P.onVolumeChange},e)})),null==W?void 0:W.left]}),(0,_.jsxs)(Ze.Sl,{name:"main-controls",children:[(0,_.jsx)(Ze.Sl,{name:"group",tag:Fa,collapsed:!0,children:l}),(0,_.jsxs)(Ze.Sl,{name:"group",tag:Fa,collapsed:!0,children:[null==W?void 0:W.leftCenter,(0,_.jsx)(LC,{showAlterantive:L&&!u,main:(0,_.jsxs)(_.Fragment,{children:[(null==I?void 0:I.stepSize)&&!u&&(0,_.jsx)(TC,{onClick:$(x,I.stepSize),hotkey:null==I?void 0:I.stepAltBack,disabled:z,children:(0,_.jsx)(ia,{})}),(0,_.jsx)(TC,{onClick:$(x),hotkey:null==I?void 0:I.stepBackHotkey,disabled:z,children:(0,_.jsx)(Dr,{})})]}),alt:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(TC,{onClick:()=>null==m?void 0:m(),disabled:z,hotkey:null==I?void 0:I.skipToBeginning,children:(0,_.jsx)(ai,{})}),(0,_.jsx)(TC,{onClick:()=>null==m?void 0:m(d),disabled:z,hotkey:null==I?void 0:I.hopBackward,children:(0,_.jsx)(ro,{})})]})}),(0,_.jsx)(TC,{"data-testid":"playback-button:"+(o?"pause":"play"),onClick:U,hotkey:null==I?void 0:I.playpauseHotkey,children:o?(0,_.jsx)(Qo,{}):(0,_.jsx)(Uo,{})}),(0,_.jsx)(LC,{showAlterantive:L&&!u,main:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(TC,{onClick:$(S),hotkey:null==I?void 0:I.stepForwardHotkey,disabled:B,children:(0,_.jsx)(Fr,{})}),(null==I?void 0:I.stepSize)&&!u&&(0,_.jsx)(TC,{disabled:B,onClick:$(S,I.stepSize),hotkey:null==I?void 0:I.stepAltForward,children:(0,_.jsx)(ha,{})})]}),alt:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(TC,{onClick:()=>null==f?void 0:f(d),disabled:B,hotkey:null==I?void 0:I.hopForward,children:(0,_.jsx)(Xr,{})}),(0,_.jsx)(TC,{onClick:()=>null==f?void 0:f(),disabled:B,hotkey:null==I?void 0:I.skipToEnd,children:(0,_.jsx)(uo,{})})]})}),null==W?void 0:W.rightCenter]}),(0,_.jsxs)(Ze.Sl,{name:"group",tag:Fa,collapsed:!0,children:[!u&&g&&(0,_.jsx)(TC,{tooltip:"Toggle Timeline",onClick:()=>null==k?void 0:k(!i),children:i?(0,_.jsx)(Ji,{}):(0,_.jsx)(Wi,{})}),h&&(0,_.jsx)(TC,{tooltip:"Fullscreen",onClick:()=>null==b?void 0:b(!1),children:c?(0,_.jsx)(ji,{}):(0,_.jsx)(pi,{})})]})]}),(0,_.jsx)(Ze.Sl,{name:"group",tag:Fa,size:"small",children:(0,O.VS)(O.vS)&&"audio"===T?(0,_.jsxs)(_.Fragment,{children:[null==W?void 0:W.right,(0,_.jsx)(OC,{startTime:0,endTime:a,minTime:0,maxTime:a,endTimeReadonly:!0,currentTime:n,onChangeStartTime:e=>{C(e)}})]}):(0,_.jsxs)(_.Fragment,{children:[null==W?void 0:W.right,(0,_.jsx)(PC,{currentTime:F,duration:H,length:t,position:n,framerate:r,formatPosition:R})]})})]})})),TC=e=>{let{children:t}=e,n=(0,Yn.A)(e,EC);return(0,_.jsx)(za,Object.assign({},n,{type:"text",style:{width:36,height:36,padding:0},children:t}))},PC=({currentTime:e,position:t,duration:n,framerate:r,length:o,formatPosition:i})=>{const a=null!=i?i:_C,s={position:t-1,fps:r,length:o},l=a(Object.assign({time:e},s)),c=a(Object.assign({time:n},s));return(0,_.jsxs)(Ze.Sl,{name:"time",children:[(0,_.jsx)(Ze.Sl,{name:"time-section",children:(0,_.jsx)(IC,{time:e,position:l})}),(0,_.jsx)(Ze.Sl,{name:"time-section",children:(0,_.jsx)(IC,{time:Math.max(n,0),position:c})})]})},IC=({time:e,position:t})=>{const n=new Date(1e3*e).toISOString(),r=e>3600?n.substr(11,8):n.substr(14,5);return(0,_.jsxs)(_.Fragment,{children:[r,t?(0,_.jsx)("span",{children:t}):null]})},LC=e=>e.hidden?null:e.showAlterantive?e.alt:e.main,MC=e=>{if(!e)return null;return null==e?void 0:e.reduce(((e,t)=>{var n;const r=null!=(n=e[t.position])?n:[],o=t.component instanceof Function?t.component():t.component;return r.push(o),e[t.position]=r,e}),{})};var KC=n(45250);const DC=["position","length","seekOffset","seekVisible","onIndicatorMove","onSeek","minimap","step"],NC=e=>{var t;let{position:n,length:r,seekOffset:o,seekVisible:i,onIndicatorMove:a,onSeek:s,minimap:l,step:c}=e;const d=(null!=(t=(0,Yn.A)(e,DC).leftOffset)?t:150)/c,u=(0,p.useRef)(),h=(0,p.useRef)(),g=(0,p.useRef)(),m=i>0,f=(Math.ceil(i)-Math.floor(d)+1.5)/r*100+"%",v=r-(i-d),y=Math.min(o,v)/r*100+"%",b=n/r*100,x=(0,p.useCallback)((e=>{const t=g.current,n=u.current.getBoundingClientRect(),o=t.clientWidth,i=e.pageX,s=i-n.left-o/2,l=n.width,c=l-o,d=(0,KC.clamp)(Math.ceil(r*(s/l)),0,c);null==a||a(d);const h=e=>{const t=(0,KC.clamp)(s+(e.pageX-i),0,c)/l;null==a||a(Math.ceil(r*t))},m=()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",h),document.addEventListener("mouseup",m)}),[r]),w=(0,p.useCallback)((e=>{const t=h.current,n=u.current.getBoundingClientRect(),o=t.clientWidth,i=e.pageX,a=i-n.left-o/2,l=n.width,c=e=>{const n=l-t.clientWidth,o=(0,KC.clamp)(a+(e.pageX-i),0,n)/l,c=Math.ceil(r*o);null==s||s(c)};c(e);const d=e=>{c(e)},g=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",g)}),[r]),C=(0,p.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),e.target===g.current?x(e):w(e)}),[x,w]);return(0,_.jsxs)(Ze.eB,{name:"seeker",ref:u,onMouseDown:C,children:[(0,_.jsx)(Ze.Sl,{name:"track"}),m&&(0,_.jsx)(Ze.Sl,{name:"indicator",ref:g,style:{left:y,width:f}}),(0,_.jsx)(Ze.Sl,{name:"position",ref:h,style:{left:`${b}%`}}),(0,_.jsx)(Ze.Sl,{name:"minimap",children:l})]})},VC=(e,t)=>{if(0===e.length)return[];const n=[],r=e[0].frame-1;for(let o=0,i=e.length;o{const{step:i,seekOffset:a,visibleWidth:s,length:l}=(0,p.useContext)(Ar),{label:c,color:d,visible:u,sequence:h,selected:g,timeline:m}=t,f=(0,p.useMemo)((()=>Math.round(s/2)),[s]),v=(0,p.useMemo)((()=>(0,w.clamp)(a-f,0,l)),[a,f,l]),y=(0,p.useMemo)((()=>(0,w.clamp)(a+s+f,0,l)),[a,s,f,l]),b=h[0],x=b?b.frame-1:0,C=b?x*i:n,S=(0,p.useMemo)((()=>({"--offset":`${n}px`,"--color":d,"--point-color":pt()(d).alpha(1).css(),"--lifespan-color":pt()(d).alpha(u?.4:1).css()})),[n,d,u]),j=(0,p.useMemo)((()=>r?VC(h,i).map((e=>(e.points=e.points.filter((({frame:e})=>e>=v&&e<=y)),e))):[]),[h,x,i,r,v,y]),k=(0,p.useCallback)(((e,n)=>{e.stopPropagation(),null==o||o(e,t.id,n)}),[t.id,o]);return(0,_.jsxs)(Ze.eB,{name:"keypoints",style:S,mod:{selected:g,timeline:m},"data-id":t.id,children:[(0,_.jsxs)(Ze.Sl,{name:"label",onClick:k,children:[(0,_.jsx)(Ze.Sl,{name:"name",children:c}),(0,_.jsx)(Ze.Sl,{name:"data",children:(0,_.jsx)(Ze.Sl,{name:"data-item",mod:{faded:!0},children:e})})]}),(0,_.jsx)(Ze.Sl,{name:"keypoints",onClick:e=>k(e,!0),children:(0,_.jsx)(HC,{lifespans:j,step:i,visible:u,offset:C})})]})},HC=({lifespans:e,step:t,offset:n,visible:r})=>(0,_.jsx)(_.Fragment,{children:e.map(((o,i)=>{const a=i+1===e.length,{points:s}=o,l=(0,Yn.A)(o,zC);return(0,_.jsx)(FC,Object.assign({mainOffset:n,step:t,isLast:a,visible:r,points:s.map((({frame:e})=>e))},l),`${i}-${s.length}-${a}-${r}`)}))}),FC=(0,p.memo)((({mainOffset:e,width:t,start:n,step:r,offset:o,enabled:i,visible:a,isLast:s,points:l})=>{const c=e+o+r/2,d=s&&i?0:"auto",u=s&&i?"auto":t,h=(0,p.useMemo)((()=>({left:c,width:u,right:d})),[c,d,u]);return(0,_.jsx)(Ze.Sl,{name:"lifespan",mod:{hidden:!a},style:h,children:l.map(((e,t)=>{const o=(e-n)*r;return(0,_.jsx)(Ze.Sl,{name:"point",style:{left:o}},t)}))})})),WC=["offset","position","length","step","regions","onScroll","onPositionChange","onResize","onSelectRegion"],$C=(e,t)=>Math.floor(e/t),UC=(e,t)=>$C(e,t)*t,ZC=({regions:e,startOffset:t,scrollTop:n,disabled:r,onSelectRegion:o})=>{const i=(0,p.useMemo)((()=>{const t=(0,KC.clamp)(Math.ceil(n/24)-1,0,e.length),r=(0,KC.clamp)(t+(Math.ceil(6.875)-1),0,e.length);return[(0,KC.clamp)(t-5,0,e.length),(0,KC.clamp)(r+5,0,e.length)]}),[n,e.length]);return(0,_.jsx)(Ze.Sl,{name:"keypoints",style:{height:24*e.length},children:e.map(((e,n)=>e.sequence.length>0||e.timeline?(0,_.jsx)(BC,{idx:e.index,region:e,startOffset:t,onSelectRegion:r?void 0:o,renderable:i[0]<=n&&n<=i[1]},e.id):null))})},GC={View:e=>{var t;let{offset:n=0,position:r=1,length:o=1024,step:i,regions:a,onScroll:s,onPositionChange:l,onResize:c,onSelectRegion:d}=e,u=(0,Yn.A)(e,WC);const h=null!=(t=u.leftOffset)?t:150,g=(0,p.useRef)(),m=(0,p.useRef)(0),f=(0,p.useRef)(r),[v,y]=(0,p.useState)(!0),[b,x]=(0,p.useState)(null),[C,S]=(0,p.useState)(n),j=(0,p.useRef)(C),[k,O]=(0,p.useState)(0),[R,E]=(0,p.useState)(!1);j.current=C;const A=(0,p.useMemo)((()=>o*i),[o,i]),T=(0,p.useMemo)((()=>{var e,t;return $C(UC((null!=(e=null==(t=g.current)?void 0:t.clientWidth)?e:0)-h,i),i)}),[g.current,i,h]),P=_r({onPositionChange:l}),I=(0,p.useMemo)((()=>[`repeating-linear-gradient(90deg, #fff 1px, #fff ${i-1}px, rgba(255,255,255,0) ${i-1}px, rgba(255,255,255,0) ${i+1}px)`,"linear-gradient(0deg, #FAFAFA, rgba(255,255,255,0) 50%)"].join(", ")),[i]),L=(0,p.useCallback)((({left:e,top:t})=>{if(o&&(x(null),(0,w.isDefined)(t)&&k!==t&&O(t),(0,w.isDefined)(e)&&C!==e)){S(e);const t=$C(UC(e,i),i);null==s||s((0,KC.clamp)(t,1,o))}}),[C,k,i,o]),M=(0,p.useCallback)((e=>{const t=$C(UC(e,i),i);null==P.onPositionChange||P.onPositionChange((0,KC.clamp)(t+1,1,o))}),[i,o,r]),K=(0,p.useCallback)((e=>{const t=g.current;if(Math.abs(e.deltaX)>Math.abs(e.deltaY)){const n=t.scrollWidth-t.clientWidth,r=(0,KC.clamp)(C+1.25*e.deltaX,0,n);L({left:r})}else{const n=t.scrollHeight-t.clientHeight,r=(0,KC.clamp)(k+1.25*e.deltaY,0,n);L({top:r})}}),[g,C,k,L]),D=(0,p.useMemo)((()=>UC(C,i)),[C,i,o]),N=(0,p.useMemo)((()=>k),[k]),V=(0,p.useCallback)((e=>{y(!1);const t=e.target,n=t.offsetLeft+D,r=e.pageX,o=g.current.scrollWidth-t.clientWidth;let a=0;const s=e=>{const t=UC(e.pageX-r,i),s=(0,KC.clamp)(n+t,0,o);s!==a&&(a=s,M(s))},l=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l),y(!0)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",l)}),[D,M,i]),z=(0,p.useCallback)((e=>{if(g.current){const t=e.pageX-g.current.getBoundingClientRect().left-h;x(t>0?t:null)}}),[D,i]),B=(0,p.useCallback)((()=>{b&&(M(b+D),x(null))}),[b,D,i,M]),H=(0,p.useMemo)((()=>{const e=(0,KC.clamp)(r,0,o)*i;return UC(e-D,i)+h}),[r,D,i,o]),F=(0,p.useCallback)((e=>{var t;const n=g.current.getBoundingClientRect(),r=n.left,o=n.width-h,a=e.target.closest("[data-id]"),s=e.pageX-r>h&&(!a||"new"===(null==(t=a.dataset)?void 0:t.id));let l;const c=e=>e.pageX-r-h+D,d=c(e),m=$C(d,i)+1;M(d),s&&(l=null==u.onStartDrawing?void 0:u.onStartDrawing(m));const p=e=>{const t=c(e),n=$C(t,i)+1;if(t>=0&&t<=o&&(y(!1),E(!0),M(t)),l){const[e,t]=n>m?[m,n]:[n,m];l.setRanges([e,t])}},f=()=>{y(!0),E(!1),null==u.onFinishDrawing||u.onFinishDrawing(),document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",f)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",f)}),[D,M]);(0,p.useEffect)((()=>{g.current&&(g.current.scrollLeft=D,g.current.scrollTop=N)}),[D,N]),(0,p.useEffect)((()=>{const e=g.current,t=t=>{const n=e.scrollTop,r=e.scrollHeight-e.clientHeight,o=Math.abs(t.deltaX)>Math.abs(t.deltaY),{deltaY:i}=t;!o&&(0===n&&i<0||n===r&&i>0)||t.preventDefault()};return e.addEventListener("wheel",t),()=>e.removeEventListener("wheel",t)}),[]),(0,p.useEffect)((()=>{null==c||c($C(g.current.clientWidth,i))}),[A,i]),(0,p.useEffect)((()=>{const e=g.current;if((0,w.isDefined)(e)){const t=(0,KC.clamp)(n*i,0,e.scrollWidth-e.clientWidth);m.current=UC(t,i),S(t)}}),[n,i]),(0,p.useEffect)((()=>{const e=g.current;if(!(0,w.isDefined)(e)||T<1)return;const t=$C(UC(j.current,i),i)+1,n=t+T-1,o=Math.abs(r-f.current);if(f.current=r,1===o&&(rn)){if(rn){const t=(0,KC.clamp)(n*i,0,e.scrollWidth-e.clientWidth);m.current=UC(t,i),L({left:t})}return}const a=UC(r-1,T),s=(r-1)*i-m.current;(s>(T-1)*i||s<0)&&(L({left:a*i}),m.current=a*i)}),[r,T,i]);const W={"--view-height":u.height?`${u.height}px`:null,"--frame-size":`${i}px`,"--view-size":`${A}px`,"--offset":`${h}px`};return(0,_.jsxs)(Ze.eB,{name:"timeline-frames",style:W,children:[(0,_.jsxs)(Ze.Sl,{name:"controls",children:[(0,_.jsx)(Ze.Sl,{name:"indicator",onMouseDown:V,style:{left:(0,KC.clamp)(H-i,h-i,A)}}),(0,w.isDefined)(b)&&v&&(0,_.jsx)(Ze.Sl,{name:"hover",style:{left:UC(b,i),marginLeft:h},"data-frame":$C(D+b,i)+1})]}),(0,_.jsx)(Ze.Sl,{name:"labels-bg",style:{width:h}}),(0,_.jsx)(Ze.Sl,{name:"scroll",ref:g,onWheel:K,onMouseMove:z,onMouseLeave:()=>x(null),onClickCapture:B,onMouseDown:F,children:(0,_.jsx)(Ze.Sl,{name:"filler",children:(0,_.jsx)(ZC,{regions:a,scrollTop:N,startOffset:h,onSelectRegion:d,disabled:R})})}),(0,_.jsx)(Ze.Sl,{name:"background",style:{backgroundImage:I}})]})},Minimap:()=>{const{regions:e,length:t}=(0,p.useContext)(Ar),n=(0,p.useRef)(),[r,o]=(0,p.useState)(0),i=(0,p.useMemo)((()=>e.map((({id:e,color:t,sequence:n})=>({id:e,color:t,lifespans:VC(n,r)})))),[r,e]);return(0,p.useEffect)((()=>{(0,w.isDefined)(n.current)&&t>0&&o(n.current.clientWidth/t)}),[t]),(0,_.jsx)(Ze.eB,{ref:n,name:"minimap",children:i.slice(0,5).map((({id:e,color:t,lifespans:n})=>(0,_.jsx)(Ze.Sl,{name:"region",style:{"--color":t},children:n.map(((t,o)=>{const i=o+1===n.length,a=t.start*r,s=i&&t.enabled?"100%":t.width;return(0,_.jsx)(Ze.Sl,{name:"connection",style:{left:a,width:s}},`${e}${o}`)}))},e)))})},Controls:({onAction:e})=>{const{position:t,regions:n}=(0,p.useContext)(Ar),r=n.some((({selected:e,timeline:t})=>e&&!t)),o=(0,p.useMemo)((()=>{const e=n.find((e=>e.selected&&!e.timeline));return null==e?void 0:e.sequence.filter((({frame:e})=>e<=t)).slice(-1)[0]}),[n,t]),i=(null==o?void 0:o.frame)!==t,a=!1===(null==o?void 0:o.enabled),s=(0,p.useCallback)((n=>{i?null==e||e(n,"keypoint_add",{frame:t}):null==e||e(n,"keypoint_remove",{frame:o.frame})}),[e,i,t,null==o?void 0:o.frame]),l=(0,p.useCallback)((t=>{a?null==e||e(t,"lifespan_add",{frame:o.frame}):null==e||e(t,"lifespan_remove",{frame:o.frame})}),[e,a,null==o?void 0:o.frame]),c=(0,p.useMemo)((()=>i?(0,_.jsx)(Lo,{}):(0,_.jsx)(zo,{})),[i,o]),d=(0,p.useMemo)((()=>a?(0,_.jsx)(xo,{}):(0,_.jsx)(Eo,{})),[o,a]);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(TC,{onClick:s,disabled:!r,tooltip:"Toggle Keypoint",children:c}),(0,_.jsx)(TC,{onClick:l,disabled:!o,tooltip:"Toggle Interpolation",children:d})]})},settings:{stepSize:(e,t,n,r)=>((e,t,n)=>{const r=t.find((e=>e.selected));let o;return o=r?r.sequence.map((({frame:e})=>e)):Array.from(t.reduce(((e,{sequence:t})=>{const n=t.map((({frame:e})=>e));return new Set([...e,...n])}),new Set)).sort(((e,t)=>e-t)),((e,t,n)=>{var r;const o=e.filter((e=>-1===n?et));return null!=(r=o[-1===n?o.length-1:0])?r:t})(o,e,n)})(t,n,r),fastTravelSize:()=>10,playpauseHotkey:"media:playpause",stepBackHotkey:"media:step-backward",stepForwardHotkey:"media:step-forward",stepAltBack:"video:keyframe-backward",stepAltForward:"video:keyframe-forward",leftOffset:150,skipToBeginning:"video:rewind",skipToEnd:"video:fastforward",hopBackward:"video:hop-backward",hopForward:"video:hop-forward"}},YC=GC;var XC=n(35775),qC=n(41128);const JC=(e,t)=>{const n=t>=250?14:e>=3600?11:14,r=t>=250?23:19;return new Date(1e3*e).toISOString().substring(n,r)},QC=e=>{let t=1;return t=e>=2500?.01:e>=1e3?.025:e>=250?.1:e>=100?.25:e>=25?1:5*e>=25?5:15*e>=25?15:60*Math.ceil(.5/e),t},eS=e=>Math.floor(10/QC(e));var tS=n(25345);const nS=({containter:e,timelineContainer:t,regions:n,speed:r,data:o,params:i,onLoaded:a,onSeek:s,onPlay:l,onPause:c,onPlayFinished:d,onAddRegion:u,onReady:h,onScroll:g,onZoom:m})=>{const f=(0,p.useRef)();return(0,p.useEffect)((()=>{var p,v;const y=e.current,b=Bn().create(Object.assign({autoCenter:!0,scrollParent:!0},i,{barHeight:1,container:y,height:Number(null!=(p=null==e||null==(v=e.current)||null==(v=v.parentElement)?void 0:v.offsetHeight)?p:146),hideScrollbar:!0,maxCanvasWidth:8e3,waveColor:"#D5D5D5",progressColor:"#656F83",cursorWidth:0,backend:"MediaElement",loopSelection:!0,audioRate:r,pixelRatio:1,minPxPerSec:xn.default,plugins:[XC.A.create({slop:5,deferInit:!0,dragSelection:!0}),qC.A.create({deferInit:!0,container:t.current,formatTimeCallback:JC,timeInterval:QC,secondaryLabelInterval:eS,primaryColor:"rgba(0,0,0,0.1)",secondaryColor:"rgba(0,0,0,0.1)",primaryFontColor:"rgba(0,0,0,0.4)",secondaryFontColor:"#000",labelPadding:5,unlabeledNotchColor:"#ccc",notchPercentHeight:50}),tS.A.create({wrapper:t.current,color:"#000",showTime:!0,followCursorY:"true",opacity:"1",padding:"20px"})]}));Object.assign(window,{wsi:b}),b.setCurrentTime=e=>{const t=b.getDuration();isNaN(t)||e===b.getCurrentTime()||(e=(0,w.clamp)(e,0,t),b.seekTo(e/b.getDuration()))};const x=()=>{Object.values(b.regions.list).filter((e=>!(0,w.isDefined)(e._region))).forEach((e=>e.remove()))};b.on("ready",(()=>{a(!1),b.initPlugin("regions"),b.initPlugin("timeline"),n&&(b.on("region-mouseenter",(e=>{var t;null==(t=e._region)||t.onMouseOver()})),b.on("region-mouseleave",(e=>{var t;null==(t=e._region)||t.onMouseLeave()})),b.on("region-created",(e=>{var t;const n=null==(t=o.annotation)?void 0:t.history;null==n||n.setSkipNextUndoState();const r=null==u?void 0:u(e);if(!r)return x(),void e.on("update-end",(()=>{const t=b.addRegion({start:e.start,end:e.end,resize:!1});t.on("click",(()=>t.remove()));const n=()=>{b.setCurrentTime(e.start),t.play()};t.on("out",(()=>{b.setCurrentTime(e.end),n()})),n()}));e._region=r,e.color=r.selectedregionbg,e.on("click",(e=>{r.onClick(b,e)})),e.on("dblclick",(t=>{t.preventDefault(),t.stopPropagation(),setTimeout((()=>{e.playLoop()}),0)})),e.on("update-end",(()=>{r.onUpdateEnd(b)}))}))),null==h||h({duration:b.getDuration(),surfer:b})})),b.setPlaybackRate(r),b.zoom(xn.default),b.on("scroll",(e=>g(e.target.scrollLeft))),b.on("play",(()=>{const e=b.getCurrentTime();s(1e3*e),null==l||l()})),b.on("pause",(()=>null==c?void 0:c())),b.on("finish",(()=>{null==d||d()})),b.on("zoom",(e=>null==m?void 0:m(e))),b.on("seek",(()=>{const e=b.getCurrentTime();s(1e3*e)})),o._value&&b.load(o._value),f.current=b;const C=()=>{x()};return y.addEventListener("click",C),()=>{y.removeEventListener("click",C);try{Object.entries(b.getActivePlugins()).forEach((([e,t])=>{t&&b.destroyPlugin(e)})),b.destroy()}catch(e){console.error("Error:",e)}}}),[]),f},rS={frames:YC,wave:{View:({position:e,length:t,regions:n,volume:r=1,zoom:o=xn.default,speed:i=wn.default,onReady:a,onPositionChange:s,onSeek:l,onAddRegion:c,onZoom:d,onPlay:u,onPause:h,onSpeedChange:g})=>{const{data:m}=(0,p.useContext)(Ar),f=(0,p.useRef)(null),v=(0,p.useRef)(),y=(0,p.useRef)(),b=(0,p.useRef)(),x=(0,p.useRef)(),[C,S]=(0,p.useState)(o),[j,k]=(0,p.useState)(!0),[O,R]=(0,p.useState)(0),[E,A]=(0,p.useState)(0),[T,P]=(0,p.useState)(Number.parseInt(m.defaultscale,10)||1),I=(0,p.useRef)({zoom:C,scroll:O}),L=(0,p.useRef)(!1),M=(0,p.useCallback)((e=>{const t=(0,w.clamp)(e,xn.min,xn.max);I.current.zoom=t,S(t)}),[]),K=(0,p.useCallback)((()=>{L.current||(L.current=!0)}),[]),D=(0,p.useCallback)((()=>{L.current&&(L.current=!1)}),[]),N=(0,p.useRef)((()=>{const e=W.current;e&&(null==F.onPositionChange||F.onPositionChange(1e3*e.getCurrentTime()),e.getCurrentTime()!==e.getDuration()||L||K(),f.current=setTimeout(N.current))})),V=(0,p.useCallback)((()=>{const e=W.current;e&&!f.current&&(L.current&&(D(),e.setCurrentTime(0)),!0===e.isPlaying()&&(null==u||u()),N.current())}),[u,s]),z=(0,p.useCallback)((()=>{const e=W.current;!1===(null==e?void 0:e.isPlaying())&&(null==h||h()),f.current&&(clearTimeout(f.current),f.current=null)}),[h]),B=(0,p.useCallback)((e=>{var t;const n=null==(t=y.current)?void 0:t.querySelector("wave");I.current.scroll=e,n&&(n.scrollLeft=e)}),[]),H=(0,p.useCallback)((()=>{K(),z()}),[z,K]),F=_r({onZoom:d,onSeek:l,onPositionChange:s,onFinish:H,onPlay:V,onPause:z}),W=nS({containter:y,timelineContainer:b,speed:i,regions:n,data:m,params:{autoCenter:m.autocenter,scrollParent:m.scrollparent,autoCenterImmediately:!0},onLoaded:k,onPlay:()=>{D(),F.onPlay()},onPause:()=>F.onPause(),onPlayFinished:()=>F.onFinish(),onAddRegion:c,onReady:a,onScroll:e=>{I.current.scroll=e,R(e)},onSeek:e=>{D(),null==F.onSeek||F.onSeek(e)},onZoom:e=>null==F.onZoom?void 0:F.onZoom(e)}),$=(0,p.useCallback)((e=>{var t,n;const r=y.current.querySelector("wave"),o=r.getBoundingClientRect().left,i=null==(t=W.current)?void 0:t.getDuration(),a=(r.scrollLeft+(e.clientX-o))/r.scrollWidth*(null!=i?i:0);null==(n=W.current)||n.setCurrentTime(a)}),[]);(0,p.useEffect)((()=>{var n;let r=0;const o=null==(n=y.current)||null==n.querySelector?void 0:n.querySelector("wave");if(o&&t>0){const n=e/t;r=o.scrollWidth*n-o.scrollLeft}A(r)}),[e,t,o,C,O,j]),(0,p.useEffect)((()=>{(()=>{const t=W.current,n=null==t?void 0:t.getDuration(),r=null==t?void 0:t.getCurrentTime(),o=(0,w.clamp)(e/1e3,0,null!=n?n:0);t&&(t.isPlaying()||n&&!isNaN(n)&&o!==r&&t.setCurrentTime(o))})()}),[e]),(0,p.useEffect)((()=>{requestAnimationFrame((()=>{var e;const t=W.current;t&&t.params.minPxPerSec!==C&&(null==(e=W.current)||e.zoom(C)),B(I.current.scroll)}))}),[C,O]),(0,p.useEffect)((()=>{var e;null==(e=W.current)||e.setPlaybackRate(i)}),[i]),(0,p.useEffect)((()=>{B(O)}),[O]),(0,p.useEffect)((()=>{var e;null==(e=W.current)||e.setVolume(r)}),[r]),(0,p.useEffect)((()=>{const e=W.current;e&&(e.params.barHeight=T,e.drawBuffer())}),[T]),(0,p.useEffect)((()=>{const e=new G((()=>{const e=W.current;requestAnimationFrame((()=>{e&&e.drawBuffer(),B(I.current.scroll)}))}));return v.current&&e.observe(v.current),()=>{e.disconnect()}}),[]),(0,p.useEffect)((()=>{const e=x.current,t=e.querySelector("wave"),n=(0,w.isMacOS)(),r=e=>{const r=Math.abs(e.deltaY)>Math.abs(e.deltaX),o=Math.abs(e.deltaY){M(Math.round(C+1.2*-e.deltaY))}));(o&&n||r||e.shiftKey)&&e.preventDefault();R((()=>{const r=!n||e.shiftKey?e.deltaY:e.deltaX;return(0,w.clamp)(t.scrollLeft+1.25*r,0,t.scrollWidth)})())};return e.addEventListener("wheel",r),()=>e.removeEventListener("wheel",r)}),[C]);const U=(0,p.useMemo)((()=>{var e;return{left:E,width:Number(null!=(e=m.cursorwidth)?e:2),background:m.cursorcolor}}),[E]);return(0,_.jsxs)(Ze.eB,{name:"wave",ref:v,children:[(0,_.jsx)(Ze.Sl,{name:"controls",children:(0,_.jsxs)(Fa,{spread:!0,style:{gridAutoColumns:"auto"},children:[(0,_.jsx)(hC,{continuous:!0,value:i,resetValue:wn.default,step:wn.step,min:wn.min,max:wn.max,minIcon:(0,_.jsx)(dd,{style:{color:"#99A0AE"}}),maxIcon:(0,_.jsx)(xd,{style:{color:"#99A0AE"}}),onChange:e=>null==g?void 0:g(Number(e))}),(0,_.jsx)(hC,{continuous:!0,value:C,resetValue:xn.default,step:xn.step,min:xn.min,max:xn.max,minIcon:(0,_.jsx)(Am,{}),maxIcon:(0,_.jsx)(Sm,{}),onChange:e=>M(Number(e))})]})}),(0,_.jsxs)(Ze.Sl,{name:"wrapper",children:[(0,_.jsxs)(Ze.Sl,{name:"body",ref:x,onClick:$,children:[(0,_.jsx)(Ze.Sl,{name:"cursor",style:U}),(0,_.jsx)(Ze.Sl,{name:"surfer",ref:y,onClick:e=>e.stopPropagation()}),(0,_.jsx)(Ze.Sl,{name:"timeline",ref:b}),j&&(0,_.jsx)(Ze.Sl,{name:"loader",mod:{animated:!0}})]}),(0,_.jsx)(Ze.Sl,{name:"scale",children:(0,_.jsx)(hC,{min:1,max:50,step:.1,reverse:!0,continuous:!0,value:T,resetValue:1,align:"vertical",onChange:e=>P(Number(e))})})]})]})},settings:{playpauseHotkey:"media:playpause",stepBackHotkey:"media:step-backward",stepForwardHotkey:"media:step-forward"}}},oS=["regions","zoom","mode","length","position","framerate","hopSize","playing","fullscreen","disableView","defaultStepSize","allowSeek","allowFullscreen","allowViewCollapse","controlsOnTop","data","speed","className","formatPosition"],iS=(0,y.PA)((e=>{var t,n;let{regions:r,zoom:o=1,mode:i="frames",length:a=1024,position:s=1,framerate:l=24,hopSize:c=1,playing:d=!1,fullscreen:u=!1,disableView:h=!1,defaultStepSize:g=10,allowSeek:m=!0,allowFullscreen:f=!0,allowViewCollapse:v=!0,controlsOnTop:y=!0,data:b,speed:x,className:C,formatPosition:S}=e,j=(0,Yn.A)(e,oS);const k=rS[i],[O,R]=(0,p.useState)((0,w.clamp)(s,1,Number.POSITIVE_INFINITY)),[E,A]=(0,p.useState)(0),[T,P]=(0,p.useState)(0),[I,L]=((e,t,n={})=>{var r;const o=localStorage.getItem(e),i=o?null!=(r=null==n.fromString?void 0:n.fromString(o))?r:o:t,[a,s]=(0,p.useState)(i);return[a,t=>{var r;const o=null!=(r=null==n||null==n.toString?void 0:n.toString(t))?r:t.toString();localStorage.setItem(e,o),s(t)}]})("video-timeline",!1,{fromString:e=>"true"===e,toString:e=>String(e)}),M=(0,p.useRef)((()=>O)),K=(0,p.useMemo)((()=>g*o),[o,g]),D=_r({onReady:j.onReady,onPlay:j.onPlay,onPause:j.onPause,onSeek:j.onSeek,onPositionChange:j.onPositionChange,onToggleVisibility:j.onToggleVisibility,onAddRegion:j.onAddRegion,onDeleteRegion:j.onDeleteRegion,onSelectRegion:j.onSelectRegion,onStartDrawing:j.onStartDrawing,onFinishDrawing:j.onFinishDrawing,onAction:j.onAction,onFullscreenToggle:j.onFullscreenToggle,onSpeedChange:j.onSpeedChange}),N=e=>{R((t=>{const n=(0,w.clamp)(e,1,a);return n!==t?(null==D.onPositionChange||D.onPositionChange(n),n):t}))},V=(0,p.useMemo)((()=>({position:s,length:a,regions:r,step:K,data:b,playing:d,seekOffset:E,settings:k.settings,visibleWidth:T})),[s,E,T,a,r,K,d,k.settings,b]);(0,p.useEffect)((()=>{const e=M.current();s!==e&&R((0,w.clamp)(s,1,a))}),[s,a]);const z=(0,_.jsxs)(Ze.Sl,{name:"topbar",children:[(0,_.jsx)(AC,{length:a,position:O,frameRate:l,playing:d,volume:j.volume,controls:j.controls,altHopSize:j.altHopSize,customControls:j.customControls,collapsed:I,onPlay:()=>null==D.onPlay?void 0:D.onPlay(),onPause:()=>null==D.onPause?void 0:D.onPause(),fullscreen:u,disableFrames:h,allowFullscreen:f,allowViewCollapse:v,onFullScreenToggle:e=>null==D.onFullscreenToggle?void 0:D.onFullscreenToggle(e),onVolumeChange:j.onVolumeChange,onStepBackward:(e,t)=>{var n;const o=null!=(n=null==t?void 0:t(a,O,r,-1))?n:O-c;N(o)},onStepForward:(e,t)=>{var n;const o=null!=(n=null==t?void 0:t(a,O,r,1))?n:O+c;N(o)},onRewind:e=>N((0,w.isDefined)(e)?O-e:0),onForward:e=>N((0,w.isDefined)(e)?O+e:a),onPositionChange:N,onToggleCollapsed:L,formatPosition:S,extraControls:k.Controls&&!h?(0,_.jsx)(k.Controls,{onAction:(e,t,n)=>{null==D.onAction||D.onAction(e,t,n)}}):null,mediaType:"timeline"}),m&&(0,_.jsx)(NC,{length:a,step:K,leftOffset:null==(t=k.settings)?void 0:t.leftOffset,position:O,seekOffset:E,seekVisible:T,onIndicatorMove:A,onSeek:N,minimap:k.Minimap?(0,_.jsx)(k.Minimap,{}):null})]});r.map((e=>(0,w.fixMobxObserve)(e.sequence)));const B=!I&&!h&&(0,_.jsx)(Ze.Sl,{name:"view",children:(0,_.jsx)(k.View,{step:K,length:a,regions:r,playing:d,zoom:o,speed:x,volume:j.volume,controls:j.controls,height:j.height,position:O,offset:E,leftOffset:null==(n=k.settings)?void 0:n.leftOffset,onReady:e=>null==D.onReady?void 0:D.onReady(e),onScroll:A,onResize:P,onPositionChange:N,onPlay:()=>null==D.onPlay?void 0:D.onPlay(),onPause:()=>null==D.onPause?void 0:D.onPause(),onSeek:e=>null==D.onSeek?void 0:D.onSeek(e),onToggleVisibility:(e,t)=>null==D.onToggleVisibility?void 0:D.onToggleVisibility(e,t),onAddRegion:e=>null==D.onAddRegion?void 0:D.onAddRegion(e),onDeleteRegion:e=>null==D.onDeleteRegion?void 0:D.onDeleteRegion(e),onSelectRegion:(e,t,n)=>null==D.onSelectRegion?void 0:D.onSelectRegion(e,t,n),onStartDrawing:e=>null==D.onStartDrawing?void 0:D.onStartDrawing(e),onFinishDrawing:()=>null==D.onFinishDrawing?void 0:D.onFinishDrawing(),onSpeedChange:e=>null==D.onSpeedChange?void 0:D.onSpeedChange(e),onZoom:j.onZoom})});return(0,_.jsx)(Tr,{value:V,children:(0,_.jsx)(Ze.eB,{name:"timeline",className:C,children:y?(0,_.jsxs)(_.Fragment,{children:[z,B]}):(0,_.jsxs)(_.Fragment,{children:[B,z]})})})})),aS=(e,t)=>{const n=Number(e);return isNaN(e)?t.default:nt.max?t.max:n},sS=(0,y.PA)((({item:e})=>{const[t,n]=(0,p.useState)(!1),[r,o]=(0,p.useState)(1),[i,a]=(0,p.useState)(0),[s,l]=(0,p.useState)(aS(e.defaultzoom,xn)),[c,d]=(0,p.useState)(aS(e.defaultvolume,Cn)),[u,h]=(0,p.useState)(aS(e.defaultspeed,wn)),g=(0,p.useCallback)((t=>{a(1e3*t.duration),e.onLoad(t.surfer),e.onReady()}),[]),m=(0,p.useCallback)((e=>{o(e)}),[]),f=(0,p.useCallback)((t=>{o(t),e.handleSeek()}),[]),v=(0,p.useCallback)((t=>{h(t),e.handleSpeed(t)}),[]),y=(0,p.useCallback)((({time:e,fps:t})=>{const n=Math.floor(t),r=Math.floor(1e3*e%n);return Math.floor(e>=0?r:n).toString().padStart(3,"0")}),[]),b=(0,p.useCallback)((()=>{n((t=>!!e._ws&&(!1===e._ws.isPlaying()&&e._ws.play(),!1===t?(e.triggerSyncPlay(),!0):t)))}),[e,t]),x=(0,p.useCallback)((()=>{n((t=>{if(!e._ws)return!1;var n;!0===e._ws.isPlaying()&&(null==(n=e._ws)||null==n.pause||n.pause());return!0===t?(e.triggerSyncPause(),!1):t}))}),[e,t]);return(0,_.jsx)(En,{item:e,children:(0,_.jsx)(Ze.eB,{mode:"wave",name:"audio",tag:iS,framerate:1e3,hopSize:1e3,playing:t,regions:e.regions,data:e,zoom:s,speed:u,volume:c,controls:{AudioVolumeControl:e.volume,SpeedControl:e.speed,ZoomControl:e.zoom},defaultStepSize:16,length:i,position:r,allowSeek:!1,allowFullscreen:!1,allowViewCollapse:!1,controlsOnTop:!1,onReady:g,onAddRegion:e.addRegion,onSelectRegion:e.selectRegion,onPositionChange:m,onSeek:f,onPlay:b,onPause:x,onZoom:l,onVolumeChange:d,onSpeedChange:v,formatPosition:y})})})),lS=!1,cS="OffscreenCanvas"in globalThis;let dS=function(e){return e[e.timelineHeight=32]="timelineHeight",e.timelinePlacement="top",e}({});const uS=(e="log")=>(...e)=>{lS},hS=(uS("log"),uS("warn")),gS=(uS("error"),uS("info")),mS=(e,t,n)=>Math.max(t,Math.min(n,e)),pS=(e,t=2)=>{const n=10**t;return Math.round(e*n)/n},fS=(e,t,n)=>e>=t&&e<=n,vS=(e,t)=>Array.from({length:t}).map((()=>e)).join(""),yS=e=>{const[t,n]=(e=>{const t=e.length;if(t>0){let n,r,o=0;for(n=r=e[0];on?n=t:te.getBoundingClientRect().left,xS=e=>e.getBoundingClientRect().top,wS=(e,t)=>e.clientX-bS(t),CS=(e,t)=>e.clientY-xS(t),SS=(e,t,n)=>e/t*n,jS=(e,t,n)=>{const{zoomedWidth:r,container:o}=t,i=wS(e,o)+t.getScrollLeftPx();return SS(i,r,n)},kS=(e,t,n)=>((e,t)=>Math.abs(e-t)<1e-6)(e/n,t/n);class OS{constructor(){this.destroyed=!1}get isDestroyed(){return this.destroyed}destroy(){this.destroyed=!0,this.destroy=()=>null}}class RS extends OS{constructor(...e){super(...e),this.subscriptions=new Map}on(e,t){const n=this.getSubscriptions(e);!1===n.has(t)&&n.add(t)}off(e,t){const n=this.getSubscriptions(e);n.has(t)&&n.delete(t)}invoke(e,t){this.getSubscriptions(e).forEach((e=>e(...null!=t?t:[])))}removeAllListeners(){this.subscriptions.forEach((e=>e.clear())),this.subscriptions.clear()}destroy(){this.removeAllListeners(),this.on=()=>null,this.off=()=>null,this.invoke=()=>null,this.removeAllListeners=()=>null,super.destroy()}getSubscriptions(e){var t;const n=null!=(t=this.subscriptions.get(e))?t:new Set;return this.subscriptions.set(e,n),n}}class ES extends RS{constructor(e){super(),this.src=e,this.chunks=void 0,this.cancelled=!1,this.decodeId=0,this._dataLength=0,this._dataSize=0,this._channelCount=1,this._sampleRate=44100,this._duration=0,this.decodingResolve=void 0,this.decodingPromise=void 0,this.buffer=void 0,this.removalId=null}get channelCount(){return this._channelCount}get sampleRate(){return this._sampleRate}get duration(){return this._duration}get dataLength(){var e,t;this.chunks&&!this._dataLength&&(this._dataLength=(null!=(e=null==(t=this.chunks)?void 0:t.reduce(((e,t)=>e+t.reduce(((e,t)=>e+t.length),0)),0))?e:0)/this._channelCount);return this._dataLength}get dataSize(){var e,t;this.chunks&&!this._dataSize&&(this._dataSize=(null!=(e=null==(t=this.chunks)?void 0:t.reduce(((e,t)=>e+t.reduce(((e,t)=>e+t.byteLength),0)),0))?e:0)/this._channelCount);return this._dataSize}get sourceDecoded(){return void 0!==this.chunks}get sourceDecodeCancelled(){return this.cancelled&&0===this.decodeId}cancel(){this.cancelled||gS("decode:cancelled",this.src),this.cancelled=!0,this.decodeId=0,this.dispose()}renew(){this.cancelled=!1}destroy(){super.removeAllListeners(),this.cancel()}cleanupResolvers(){var e;null==(e=this.decodingResolve)||e.call(this),this.decodingResolve=void 0,this.decodingPromise=void 0,gS("decode:cleanup",this.src)}}class _S extends ES{constructor(...e){super(...e),this.arraybuffer=void 0,this.context=void 0}async init(e){this.arraybuffer=e,gS("decode:worker:ready",this.src)}async decode(e){if(this.sourceDecoded)gS("decode:cached",this.src);else{if(this.sourceDecodeCancelled)throw new Error("WebAudioDecoder decode cancelled and contains no data, did you call decoder.renew()?");if(this.decodingPromise)return gS("decode:inprogress",this.src),this.decodingPromise;if(!this.arraybuffer)throw new Error("WebAudioDecoder not initialized, did you call decoder.init()?");gS("decode:start",this.src),this.decodeId=Date.now(),this.decodingPromise=new Promise((e=>this.decodingResolve=e));try{const t=await new Promise(((e,t)=>{if(this.context||(this.context=this.createOfflineAudioContext()),!this.context||!this.arraybuffer)return t(new Error("WebAudioDecoder not initialized, did you call decoder.init()?"));var n,r;"webkitAudioContext"in window?null==(n=this.context)||n.decodeAudioData(this.arraybuffer,(t=>e(t)),(e=>t(e))):null==(r=this.context)||r.decodeAudioData(this.arraybuffer).then(e).catch(t)}));this._channelCount=null!=e&&e.multiChannel?t.numberOfChannels:1,this._sampleRate=t.sampleRate,this._duration=t.duration;const n=Array.from({length:this._channelCount}).map((()=>Array.from({length:1})));return n.forEach(((e,r)=>{n[r]=[t.getChannelData(r)]})),this.chunks=n,gS("decode:complete",this.src),null!=e&&e.captureAudioBuffer&&(this.buffer=t),t}finally{this.dispose()}}}dispose(){delete this.arraybuffer,delete this.context,this.cleanupResolvers()}createOfflineAudioContext(e){return window.WebAudioOfflineAudioContext||(window.WebAudioOfflineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,null!=e?e:this.sampleRate)),window.WebAudioOfflineAudioContext}}var AS=n(55961),TS=n(14280);class PS{constructor(e){this.worker=void 0,this.worker=e}async compute(e){var t;const n=await this.sendMessage(this.worker,{data:e,type:"compute"},!0);return null==n||null==(t=n.data)||null==(t=t.result)?void 0:t.data}async precompute(e){await this.sendMessage(this.worker,{data:e,type:"precompute"})}async store(e){await this.sendMessage(this.worker,{data:e,type:"store"})}async getStorage(){var e;const t=await this.sendMessage(this.worker,{type:"getStorage"},!0);return null==t||null==(e=t.data)?void 0:e.result}destroy(){this.worker.terminate()}sendMessage(e,t,n=!1){return new Promise((r=>{const o=Math.random().toString();if(n){const t=n=>{o===n.data.eventId&&(e.removeEventListener("message",t),r(n))};e.addEventListener("message",t)}e.postMessage(Object.assign({},t,{eventId:o})),n||r(void 0)}))}}PS.Messenger={receive({compute:e,precompute:t}){const n={};self.addEventListener("message",(r=>{if(!r.data)return;const{data:o,type:i,eventId:a}=r.data;switch(i){case"compute":((t,r)=>{e(t,n,(e=>{self.postMessage({result:e,eventId:r})}))})(o,a);break;case"precompute":(e=>{null==t||t(e,n,(e=>{Object.assign(n,e)}))})(o);break;case"store":(e=>{Object.assign(n,e.data.data)})(r);break;case"getStorage":(e=>{self.postMessage({result:n,eventId:e})})(a)}}))}};class IS extends OS{constructor(e){super(),this.channelCount=1,IS.usage++,IS.worker||(IS.worker=new PS(new Worker(new URL(n.p+n.u(559),n.b)))),this.channelCount=e}destroy(){var e;(IS.usage--,0===IS.usage)&&(null==(e=IS.worker)||e.destroy(),IS.worker=void 0);super.destroy()}async split(e){if(!IS.worker)throw new Error("AudioDecoder: worker not initialized");return IS.worker.compute({value:e,channelCount:this.channelCount})}}IS.usage=0,IS.worker=void 0;class LS extends ES{constructor(...e){super(...e),this.worker=void 0}getTotalChunks(){return Math.ceil(this._duration*this._channelCount/1800)}getChunkDuration(){return 1800/this._channelCount}async init(e){this.worker||(this.worker=await(0,AS.vy)(TS.A,e),gS("decode:worker:ready",this.src))}async decode(e){if(this.sourceDecoded)return void gS("decode:cached",this.src);if(this.sourceDecodeCancelled)throw new Error("AudioDecoder: Worker decode cancelled and contains no data, did you call decoder.renew()?");if(this.decodingPromise)return gS("decode:inprogress",this.src),this.decodingPromise;if(!this.worker)throw new Error("AudioDecoder: Worker not initialized, did you call decoder.init()?");let t;gS("decode:start",this.src),this.decodeId=Date.now(),this.decodingPromise=new Promise((e=>this.decodingResolve=e));try{this._channelCount=null!=e&&e.multiChannel?this.worker.channelCount:1,this._sampleRate=this.worker.sampleRate,this._duration=this.worker.duration;let n=0;const r=this.getTotalChunks(),o=this.chunkDecoder(e);t=this._channelCount>1?new IS(this._channelCount):void 0;const i=Array.from({length:this._channelCount}).map((()=>Array.from({length:r})));for(gS("decode:chunk:start",this.src,n,r),this.invoke("progress",[0,r]);n{i[t][n]=e}))}this.invoke("progress",[n+1,r]),gS("decode:chunk:process",this.src,n,r),n++}if(e.done)break}this.chunks=i,gS("decode:complete",this.src)}finally{var n;null==(n=t)||n.destroy(),this.dispose()}}dispose(){this.worker&&(this.worker.dispose(),this.worker=void 0,gS("decode:worker:disposed",this.src)),this.cleanupResolvers()}*chunkDecoder(e){if(!this.worker||this.sourceDecodeCancelled)return null;const t=this.worker.duration;let n=-1;for(;;)yield new Promise(((r,o)=>{var i;if(!this.worker||this.sourceDecodeCancelled)return r(null);const a=mS(t-n,0,this.getChunkDuration()),s=n;n+=a,this.worker.decodeAudioData(s,a,Object.assign({multiChannel:null!=(i=null==e?void 0:e.multiChannel)&&i},e)).then(r).catch(o)}))}}class MS{getDecoder(e,t,n="ffmpeg"){const r=function(e,t,n,r="ffmpeg"){var o;const i=`${t}:${n}:${r}`,a=null!=(o=e.get(i))?o:"ffmpeg"===r?new LS(t):new _S(t);return a.renew(),e.set(i,a),new Proxy(a,{get(t,n){if(n in t){const t=e.get(i);null!=t&&t.removalId&&(clearTimeout(t.removalId),gS("decode:renew",i),t.removalId=null,t.renew(),e.set(i,t));const r=t[n];return"destroy"===n&&"function"==typeof r?(...n)=>(t.removalId=setTimeout((()=>{gS("decodepool:destroy",i),e.delete(i)}),5e3),e.set(i,t),r.bind(t)(...n)):r}}})}(MS.cache,e,t,n);return r}}MS.cache=new Map;const KS=new MS;class DS extends RS{constructor(e){var t,n,r;super(),this.decoder=void 0,this.decoderPromise=void 0,this.mediaPromise=void 0,this.mediaReject=void 0,this.el=void 0,this.buffer=void 0,this.splitChannels=!1,this.decoderType="ffmpeg",this.playerType="html5",this.src=void 0,this.mediaResolve=void 0,this.hasLoadedSource=!1,this.mediaError=()=>{var e,t;(0,O.VS)(O.xS)&&this.hasLoadedSource&&this.el?(this.hasLoadedSource=!1,this.invoke("resetSource")):null==(e=this.mediaReject)||e.call(this,null==(t=this.el)?void 0:t.error)},this.mediaReady=()=>{var e;this.mediaResolve&&(null==(e=this.mediaResolve)||e.call(this),this.mediaResolve=void 0);this.hasLoadedSource=!0,this.invoke("canplay")},this.splitChannels=null!=(t=e.splitChannels)&&t,this.decoderType=null!=(n=e.decoderType)?n:this.decoderType,this.playerType=null!=(r=e.playerType)?r:this.playerType,this.src=e.src,this.createAudioDecoder(),this.createMediaElement()}get channelCount(){var e;return(null==(e=this.decoder)?void 0:e.channelCount)||1}get duration(){var e,t,n,r;return this.el?null!=(e=null==(t=this.el)?void 0:t.duration)?e:0:null!=(n=null==(r=this.decoder)?void 0:r.duration)?n:0}get sampleRate(){var e;return(null==(e=this.decoder)?void 0:e.sampleRate)||44100}get dataLength(){var e;return(null==(e=this.decoder)?void 0:e.dataLength)||0}get dataSize(){var e;return(null==(e=this.decoder)?void 0:e.dataSize)||0}disconnect(){var e;try{this.el&&!this.el.paused&&this.el.pause()}catch(e){}null==(e=this.decoder)||e.cancel()}destroy(){var e,t,n,r;super.destroy(),this.disconnect(),delete this.mediaResolve,delete this.mediaReject,delete this.mediaPromise,delete this.decoderPromise,null==(e=this.decoder)||e.destroy(),delete this.decoder,null==(t=this.el)||t.removeEventListener("error",this.mediaReady),null==(n=this.el)||n.removeEventListener("canplaythrough",this.mediaReady),null==(r=this.el)||r.remove(),delete this.el,delete this.buffer}get chunks(){if(this.decoder)return this.decoder.chunks}async sourceDecoded(){if(!this.decoder)return!1;try{return this.mediaPromise&&await this.mediaPromise,this.decoderPromise&&await this.decoderPromise,"webaudio"===this.playerType&&this.decoder.buffer&&(this.buffer=this.decoder.buffer),this.decoder.sourceDecoded}catch(e){return console.error(e),!1}}async initDecoder(e){if(this.decoder)return!this.decoderPromise&&e&&(this.decoderPromise=this.decoder.init(e)),this.decoderPromise}async decodeAudioData(e={}){if(!this.decoder)return;e.captureAudioBuffer="webaudio"===this.playerType;const t=await this.decoder.decode(e);e.captureAudioBuffer&&t&&(this.buffer=t)}createMediaElement(){this.src&&!this.el&&"html5"===this.playerType&&(this.el=document.createElement("audio"),this.el.preload="auto",this.el.setAttribute("data-testid","waveform-audio"),this.el.style.display="none",(0,O.VS)(O.xS)&&(this.el.crossOrigin="anonymous"),document.body.appendChild(this.el),this.mediaPromise=new Promise(((e,t)=>{this.mediaResolve=e,this.mediaReject=t})),this.el.addEventListener("canplaythrough",this.mediaReady),this.el.addEventListener("error",this.mediaError),this.loadMedia())}loadMedia(){this.src&&this.el&&(this.el.src=this.src)}createAudioDecoder(){this.src&&!this.decoder&&(this.decoder=KS.getDecoder(this.src,this.splitChannels,this.decoderType),this.decoder.on("progress",((e,t)=>{this.invoke("decodingProgress",[e,t])})))}}class NS extends OS{constructor(e,t){super(),this.wf=void 0,this.audio=void 0,this.loaded=!1,this.options=void 0,this.cancel=void 0,this.decoderResolve=void 0,this._duration=0,this.decoderPromise=void 0,this.loadingProgressType=void 0,this.wf=e,this.options=t,this.cancel=()=>{},this.loadingProgressType="determinate"}get duration(){return this._duration}set duration(e){const t=this._duration!==e;this._duration=e,t&&this.wf.invoke("durationChanged",[e])}get sampleRate(){var e;return(null==(e=this.audio)?void 0:e.sampleRate)||0}reset(){this.cancel(),this.loaded=!1,this.loadingProgressType="determinate",this.decoderResolve=void 0,this.decoderPromise=void 0}async decodeAudioData(){return!this.audio||this.isDestroyed?null:await this.audio.decodeAudioData({multiChannel:this.wf.params.splitChannels})}async load(e){if(this.isDestroyed||this.loaded)return null;if(this.decoderPromise=new Promise((e=>{this.decoderResolve=e})),this.createAnalyzer(Object.assign({},e,{src:this.options.src,splitChannels:this.wf.params.splitChannels,decoderType:this.wf.params.decoderType,playerType:this.wf.params.playerType})),!this.audio)throw new Error("MediaLoader: Failed to allocate audio decoder");var t;if(await this.audio.sourceDecoded())return this.duration=this.audio.duration,null==(t=this.decoderResolve)||t.call(this),this.audio;const n=await this.performRequest(this.options.src).catch((e=>(console.error("An audio loading error occurred",e),null)));if(n)try{var r,o;return await this.audio.initDecoder(n),null==(r=this.decoderResolve)||r.call(this),this.audio?(this.duration=this.audio.duration,await this.decodeAudioData(),null!=(o=this.audio)?o:null):null}catch(e){this.wf.setError(`An error occurred while decoding the audio file. Please select another file or try again. ${e.message}`),console.error("An audio decoding error occurred",e)}return null}destroy(){this.isDestroyed||(super.destroy(),this.reset(),this.audio&&(this.audio.destroy(),this.audio=null))}async performRequest(e){var t=this;const n=new XMLHttpRequest;return this.cancel=()=>{null==n||n.abort(),this.cancel=()=>{}},new Promise(((r,o)=>{n.responseType="arraybuffer";const i=()=>{const e=new Error(`HTTP error status: ${n.status}`);e.name="HTTPError",this.wf.setError(`HTTP error status: ${n.status}`,e),o(n)};n.addEventListener("progress",(e=>{e.lengthComputable?(this.loadingProgressType="determinate",this.wf.setLoadingProgress(e.loaded,e.total)):(this.loadingProgressType="indeterminate",this.wf.setLoadingProgress(e.loaded,-1))})),n.addEventListener("load",(async function(){t.wf.setLoadingProgress(void 0,void 0,!0),r(n.response)})),n.addEventListener("error",(()=>{i()})),n.addEventListener("readystatechange",(()=>{4===n.readyState&&200!==n.status&&0!==n.status&&i()}));const a=new URL(e,/^https?/.exec(e)?void 0:window.location.href);["X-Goog-Signature","X-Amz-Signature","sig"].some((e=>a.searchParams.has(e)))||a.searchParams.set("lsref","1"),n.open("GET",a.toString(),!0),n.send()}))}createAnalyzer(e){return this.audio||(this.audio=new DS(e),this.audio.on("decodingProgress",((e,t)=>{this.wf.setDecodingProgress(e,t)}))),this.audio}}class VS extends OS{constructor(e){var t,n;super(),this.audio=void 0,this.wf=void 0,this.timer=void 0,this.loop=null,this.timestamp=0,this.time=0,this.connected=!1,this.bufferPromise=void 0,this.bufferResolve=void 0,this.ended=!1,this._rate=1,this._volume=1,this._savedVolume=1,this.playing=!1,this.hasPlayed=!1,this.handlePlayed=()=>{this.hasPlayed=!0},this.handlePaused=()=>{this.hasPlayed=!1},this.handleEnded=()=>{this.loop||this.updateCurrentTime(!0)},this.handleCanPlay=()=>{var e;null==(e=this.bufferResolve)||e.call(this)},this.watch=()=>{this.playing&&(this.updateCurrentTime(),this.updateLoop(this.time),this.timer=requestAnimationFrame(this.watch))},this.wf=e,this._rate=null!=(t=e.params.rate)?t:this._rate,this.volume=null!=(n=e.params.volume)?n:this._volume,this._savedVolume=this.volume,e.params.muted&&(this.muted=!0)}get currentTime(){return this.time}set currentTime(e){this.ended=!1,this.setCurrentTime(e,!0)}setCurrentTime(e,t=!1){const n=this.time!==e;this.time=e,this.updateCurrentSourceTime(n),t&&n&&this.wf.invoke("seek",[this.time])}canPause(){return this.hasPlayed}get volume(){var e;return null!=(e=this._volume)?e:1}set volume(e){this.volume!==e&&(0===e?this.muted=!0:this.muted?this.muted=!1:this._volume=e,this.adjustVolume(),this.wf.invoke("volumeChanged",[this.volume]))}get muted(){return 0===this._volume}set muted(e){this.muted!==e&&(e?this.mute():this.unmute(),this.wf.invoke("muted",[this.muted]))}mute(){this._savedVolume=this.volume||1,this._volume=0}unmute(){this._volume=this._savedVolume||1}get rate(){return this._rate}set rate(e){const t=this._rate!==e;this._rate=e,t&&this.wf.invoke("rateChanged",[e])}get duration(){var e,t;return null!=(e=null==(t=this.audio)?void 0:t.duration)?e:0}init(e){this.audio=e,this.audio.on("canplay",this.handleCanPlay)}seek(e){const t=mS(e,0,this.duration);this.currentTime=t,this.playing&&this.updatePlayback()}seekSilent(e){const t=mS(e,0,this.duration);this.ended=!1,this.setCurrentTime(t),this.playing&&this.updatePlayback()}play(e,t){if(this.isDestroyed||this.playing||!this.audio)return;this.ended&&(this.currentTime=null!=e?e:0);const{start:n,end:r}=this.playSelection(e,t);this.playRange(n,r)}playEnded(){this.ended=!0,this.pause(),this.wf.invoke("playend")}pause(){!this.isDestroyed&&this.playing&&this.audio&&(this.stopWatch(),this.disconnectSource(),this.playing=!1,this.loop=null,this.wf.invoke("pause"),this.wf.invoke("seek",[this.currentTime]))}stop(){this.isDestroyed||(this.stopWatch(),this.disconnectSource(),this.playing=!1,this.loop=null)}destroy(){this.stop(),this.cleanupSource(),this.bufferPromise=void 0,this.bufferResolve=void 0,super.destroy()}updatePlayback(){const{start:e,end:t}=this.playSelection();this.playSource(e,t)}playRange(e,t){e&&(this.currentTime=e),this.playSource(e,t),this.wf.invoke("play")}playSource(e,t){this.stopWatch(),this.connectSource(),this.audio&&(this.playing=!0,this.loop&&((this.currentTimethis.loop.end)&&(this.currentTime=this.loop.start),t=mS(this.loop.end,0,this.duration),e=mS(this.loop.start,0,t)),this.playAudio(e,t))}playSelection(e,t){const n=this.wf.regions.selected;if(n.length>0){const e=Math.min(...n.map((e=>e.start))),t=Math.max(...n.map((e=>e.end))),r=mS(this.currentTime,e,t);return this.loop={start:e,end:t},{start:r,end:t}}const r=null!=e?e:this.currentTime;return{start:r,end:void 0!==t?t-r:void 0}}connectSource(){this.isDestroyed||!this.audio||this.connected||(this.connected=!0,this.canPause()&&this.audio.disconnect())}disconnectSource(){return!(this.isDestroyed||!this.audio||!this.connected)&&(this.connected=!1,this.canPause()&&this.audio.disconnect(),!0)}cleanupSource(){!this.isDestroyed&&this.audio&&(this.disconnectSource(),this.audio.destroy(),delete this.audio)}updateLoop(e){!this.isDestroyed&&this.loop&&e>=this.loop.end&&(this.currentTime=this.loop.start,this.playing=!1,this.play())}updateCurrentTime(e=!1){var t,n;const r=performance.now(),o=(r-this.timestamp)/1e3*this.rate;this.timestamp=r;const i=null!=(t=null==(n=this.loop)?void 0:n.end)?t:this.duration,a=e?this.duration:mS(this.time+o,0,i);this.time=a,!this.loop&&this.time>=this.duration-o?(this.time=this.duration,this.wf.invoke("playing",[this.duration]),this.playEnded()):this.wf.invoke("playing",[this.time])}stopWatch(){cancelAnimationFrame(this.timer)}}class zS extends VS{constructor(...e){var t;super(...e),t=this,this.handleResetSource=async function(){var e;if(null==(e=t.audio)||!e.el)return;const n=t.playing;t.stop(),t.audio.el.load(),n&&t.play()}}mute(){var e;super.mute(),null!=(e=this.audio)&&e.el&&(this.audio.el.muted=!0)}unmute(){var e;super.unmute(),null!=(e=this.audio)&&e.el&&(this.audio.el.muted=!1)}get rate(){var e;return null!=(e=this.audio)&&e.el&&this.audio.el.playbackRate!==this._rate&&(this.audio.el.playbackRate=this._rate),this._rate}set rate(e){const t=this._rate!==e;var n;(this._rate=e,t)&&(null!=(n=this.audio)&&n.el&&(this.audio.el.playbackRate=e),this.wf.invoke("rateChanged",[e]))}init(e){super.init(e),this.audio&&this.audio.el&&(this.audio.on("resetSource",this.handleResetSource),this.audio.el.addEventListener("play",this.handlePlayed),this.audio.el.addEventListener("pause",this.handlePaused))}destroy(){var e;super.destroy(),null!=(e=this.audio)&&e.el&&(this.audio.el.removeEventListener("play",this.handlePlayed),this.audio.el.removeEventListener("pause",this.handlePaused))}adjustVolume(){var e;null!=(e=this.audio)&&e.el&&(this.audio.el.volume=this.volume)}playAudio(e,t){if(!this.audio||!this.audio.el)return;this.audio.el.currentTime=this.currentTime,this.audio.el.addEventListener("ended",this.handleEnded),this.bufferPromise=new Promise((e=>{this.bufferResolve=e}));const n=this.currentTime;Promise.all([this.audio.el.play(),this.bufferPromise]).then((()=>{var e;this.timestamp=performance.now(),null!=(e=this.audio)&&e.el&&(this.setCurrentTime(n),this.audio.el.currentTime=this.currentTime,this.watch())}))}updateCurrentSourceTime(e){var t;e&&null!=(t=this.audio)&&t.el&&(this.audio.el.currentTime=this.time)}canPause(){var e;return!(null==(e=this.audio)||!e.el||this.audio.el.paused||!this.hasPlayed)}disconnectSource(){var e;return!!super.disconnectSource()&&(null==(e=this.audio)||null==(e=e.el)||e.removeEventListener("ended",this.handleEnded),!0)}}class BS extends VS{constructor(e){super(e),this.audioContext=void 0,this.audioBufferSource=void 0,this.gainNode=void 0,this.audioContext=new AudioContext,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}async init(e){super.init(e),this.audioContext&&"suspended"===this.audioContext.state&&await this.audioContext.resume()}get rate(){var e;return null!=(e=this.audioBufferSource)&&e.playbackRate&&this._rate!==this.audioBufferSource.playbackRate.value&&(this.audioBufferSource.playbackRate.value=this._rate),this._rate}set rate(e){const t=this._rate!==e;var n;(this._rate=e,t)&&(null!=(n=this.audioBufferSource)&&n.playbackRate&&(this.audioBufferSource.playbackRate.value=this._rate),this.wf.invoke("rateChanged",[e]))}adjustVolume(){this.gainNode&&(this.gainNode.gain.value=this.volume)}destroy(){super.destroy(),this.audioContext&&this.audioContext.close().finally((()=>{delete this.audioContext}))}playAudio(e,t){if(this.audioBufferSource){try{e?this.audioBufferSource.start(0,e):this.audioBufferSource.start(0)}catch(e){if("InvalidStateError"!==e.name)throw e}this.timestamp=performance.now(),this.watch()}}connectSource(){var e;!this.isDestroyed&&this.audioContext&&null!=(e=this.audio)&&e.buffer&&this.gainNode&&!this.connected&&(this.connected=!0,this.audioBufferSource=this.audioContext.createBufferSource(),this.audioBufferSource.buffer=this.audio.buffer,this.audioBufferSource.connect(this.gainNode),this.audioBufferSource.onended=this.handleEnded)}disconnectSource(){if(this.isDestroyed||!this.connected||!this.audioBufferSource)return!1;this.connected=!1;try{this.audioBufferSource.stop()}catch(e){if("InvalidStateError"!==e.name)throw e}return this.audioBufferSource.disconnect(),this.audioBufferSource.onended=null,this.audioBufferSource=void 0,!0}playSource(e,t){this.disconnectSource(),super.playSource(e,t)}updateCurrentSourceTime(e){e&&this.audioBufferSource&&(this.disconnectSource(),this.connectSource(),this.audioBufferSource.start(0,this.time))}cleanupSource(){super.cleanupSource(),this.audioBufferSource=void 0}}const HS=e=>Number.parseInt(e.replace(/_/g,""),36),FS="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const n=HS(t.substring(0,3)),r=HS(t.substring(3)).toString(16);let o="";for(let e=0;e<6-r.length;e++)o+="0";return e[n]=`${o}${r}`,e}),{}),WS=new RegExp(`^#${vS("([a-f0-9])",3)}([a-f0-9])?$`,"i"),$S=new RegExp(`^#${vS("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),US=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${vS(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),ZS=/^[a-z]+$/i;class GS{constructor(e){this.base=void 0,this.rgba=void 0,this.base=e,this.rgba=e}update(e){const t=XS(e);return this.rgba=t.rgba,this.base=t.base,this}reset(){return this.rgba=this.base,this}clone(){return new GS(this.rgba)}opaque(e){const t=[this.r,this.g,this.b,mS(pS(this.a+this.a*e,1),0,1)];return this.rgba=t,this}translucent(e){const t=[this.r,this.g,this.b,mS(pS(this.a-this.a*e,1),0,1)];return this.rgba=t,this}darken(e){const t=[mS(Math.round(this.r-this.r*e),0,255),mS(Math.round(this.g-this.g*e),0,255),mS(Math.round(this.b-this.b*e),0,255),this.a];return this.rgba=t,this}lighten(e){const t=[mS(Math.round(this.r+this.r*e),0,255),mS(Math.round(this.g+this.g*e),0,255),mS(Math.round(this.b+this.b*e),0,255),this.a];return this.rgba=t,this}get luminance(){const[e,t,n]=this.rgba.map((e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}));return.2126*e+.7152*t+.0722*n}get r(){return this.rgba[0]}set r(e){this.rgba[0]=e}get g(){return this.rgba[1]}set g(e){this.rgba[1]=e}get b(){return this.rgba[2]}set b(e){this.rgba[2]=e}get a(){return this.rgba[3]}set a(e){this.rgba[3]=e}toArray(){return this.rgba}toString(){return`rgba(${this.rgba.join(", ")})`}}const YS=new GS([0,0,0,0]),XS=e=>{if("string"!=typeof e&&!(e instanceof GS))throw new Error(`Color must be a string or an instanceof RgbaColorArray. Received ${JSON.stringify(e)}`);if(e instanceof GS)return e;if("transparent"===(e=e.toString()).trim().toLowerCase())return YS;let t=e.trim();t=ZS.test(e)?(e=>{const t=e.toLowerCase().trim(),n=FS[(e=>{let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0)%2341})(t)];if(!n)throw new Error(`Unknown color: ${e}`);return`#${n}`})(e):e;const n=WS.exec(t);if(n){const e=Array.from(n).slice(1);return new GS([...e.slice(0,3).map((e=>Number.parseInt(vS(e,2),16))),Number.parseInt(vS(e[3]||"f",2),16)/255])}const r=$S.exec(t);if(r){const e=Array.from(r).slice(1);return new GS([...e.slice(0,3).map((e=>Number.parseInt(e,16))),Number.parseInt(e[3]||"ff",16)/255])}const o=US.exec(t);if(o){const e=Array.from(o).slice(1);return new GS([...e.slice(0,3).map((e=>Number.parseInt(e,10))),Number.parseFloat(e[3]||"1")])}return YS};class qS{constructor(e){var t,n,r,o,i;this.id="tooltip",this.visible=!1,this.color=XS("#fff"),this.fontWeight="500",this.backgroundColor=XS("#000"),this.fontSize=16,this.paddingInline=8,this.paddingBlock=4,this.borderRadius=4,this.id=`tooltip-${(0,R.Ak)()}`,this.color=null!=e&&e.color?XS(e.color):this.color,this.backgroundColor=null!=e&&e.backgroundColor?XS(e.backgroundColor):this.backgroundColor,this.paddingInline=null!=(t=null==e?void 0:e.paddingInline)?t:this.paddingInline,this.paddingBlock=null!=(n=null==e?void 0:e.paddingBlock)?n:this.paddingBlock,this.borderRadius=null!=(r=null==e?void 0:e.borderRadius)?r:this.borderRadius,this.fontSize=null!=(o=null==e?void 0:e.fontSize)?o:this.fontSize,this.fontWeight=null!=(i=null==e?void 0:e.fontWeight)?i:this.fontWeight,this.initialize()}initialize(){if(document.getElementById(this.id))return;const e=document.createElement("span"),t=document.body;e.id=this.id,e.style.display="none",e.style.position="absolute",this.apply(e),null==t||t.appendChild(e)}update(e){var t,n,r,o;const i=document.getElementById(this.id);this.color=null!=e&&e.color?XS(e.color):this.color,this.backgroundColor=null!=e&&e.backgroundColor?XS(e.backgroundColor):this.backgroundColor,this.paddingInline=null!=(t=null==e?void 0:e.paddingInline)?t:this.paddingInline,this.paddingBlock=null!=(n=null==e?void 0:e.paddingBlock)?n:this.paddingBlock,this.borderRadius=null!=(r=null==e?void 0:e.borderRadius)?r:this.borderRadius,this.fontSize=null!=(o=null==e?void 0:e.fontSize)?o:this.fontSize,i&&this.apply(i)}apply(e){e.style.color=this.color.toString(),e.style.backgroundColor=this.backgroundColor.toString(),e.style.paddingInline=`${this.paddingInline}px`,e.style.paddingBlock=`${this.paddingBlock}px`,e.style.borderRadius=`${this.borderRadius}px`,e.style.fontSize=`${this.fontSize}px`,e.style.fontWeight=this.fontWeight,e.style.zIndex="9999",e.style.pointerEvents="none"}show(e,t,n,r=!0){const o=document.getElementById(this.id);this.visible=!0,o&&n&&(o.style.display="block",o.style.left=r?e-o.clientWidth/2+"px":`${e}px`,o.style.top=`${t}px`,o.innerText=n)}hide(){if(!this.visible)return;const e=document.getElementById(this.id);this.visible=!1,e&&(e.style.display="none")}destroy(){var e;null==(e=document.getElementById(this.id))||e.remove()}}let JS=function(e){return e.auto="auto",e.crosshair="crosshair",e.default="default",e.pointer="pointer",e.move="move",e.text="text",e.wait="wait",e.help="help",e.progress="progress",e.notAllowed="not-allowed",e.contextMenu="context-menu",e.cell="cell",e.verticalText="vertical-text",e.alias="alias",e.copy="copy",e.noDrop="no-drop",e.allScroll="all-scroll",e.colResize="col-resize",e.rowResize="row-resize",e.grab="grab",e.grabbing="grabbing",e.nResize="n-resize",e.neResize="ne-resize",e.nwResize="nw-resize",e.nsResize="ns-resize",e.neswResize="nesw-resize",e.nwseResize="nwse-resize",e.sResize="s-resize",e.seResize="se-resize",e.swResize="sw-resize",e.wResize="w-resize",e.ewResize="ew-resize",e.zoomIn="zoom-in",e.zoomOut="zoom-out",e}({});class QS extends RS{constructor(e,t){var n,r,o;super(),this.visualizer=void 0,this.symbol=JS.default,this.focusId="",this.id="cursor",this.color=XS("rgba(65, 60, 74, 0.16)"),this.x=void 0,this.y=void 0,this.offsetX=0,this.offsetY=0,this.width=2,this.handleMouseMove=e=>{const{container:t}=this.visualizer;this.offsetX=bS(t),this.offsetY=xS(t),this.x=wS(e,t),this.y=CS(e,t),this.invoke("mouseMove",[e,this]),this.visualizer.invoke("mouseMove",[e,this])},this.id=`cursor-${(0,R.Ak)()}`,this.visualizer=t,this.color=null!=e&&e.color?XS(e.color):this.color,this.x=null!=(n=e.x)?n:0,this.y=null!=(r=e.y)?r:0,this.width=null!=(o=e.width)?o:this.width,this.initialize()}initialize(){if(document.getElementById(this.id))return;const e=document.createElement("span"),t=document.body;e.id=this.id,e.style.display="none",e.style.position="absolute",this.apply(e),null==t||t.appendChild(e),this.set(this.symbol),document.addEventListener("mousemove",this.handleMouseMove)}apply(e){e.style.backgroundColor=this.color.toString(),e.style.width=`${this.width}px`,e.style.top="0px",e.style.zIndex="9998",e.style.pointerEvents="none"}show(){if(!this.shouldRender)return void this.hide();const e=document.getElementById(this.id);e&&(e.style.height=`${this.visualizer.height}px`,e.style.display="block",e.style.top=`${this.offsetY}px`,e.style.left=this.x+this.offsetX-e.clientWidth/2+"px")}hide(){const e=document.getElementById(this.id);e&&(e.style.display="none")}destroy(){var e;null==(e=document.getElementById(this.id))||e.remove(),document.removeEventListener("mousemove",this.handleMouseMove),super.destroy()}isOver(e,t,n,r){return!(this.x>e+n||this.y>t+r||this.x=o-i&&t-- >0;)s=e.substring(0,t),a=this.measureText(s).width;s+="..."}this.fillText(s,t,n,r)}measureText(e){if(!this.context)return{width:0};const t=this.context.measureText(e),n={};return ej.forEach((e=>{n[e]=t[e]})),n}save(){var e;null==(e=this.context)||e.save()}restore(){var e;null==(e=this.context)||e.restore()}beginPath(){var e;null==(e=this.context)||e.beginPath()}closePath(){var e;null==(e=this.context)||e.closePath()}stroke(){var e;null==(e=this.context)||e.stroke()}fill(){var e;null==(e=this.context)||e.fill()}copyToBuffer(){this.createBufferCanvas(),this._bufferContext.imageSmoothingEnabled=!1,this._bufferContext.clearRect(0,0,this._bufferCanvas.width,this._bufferCanvas.height),this._bufferContext.drawImage(this.canvas,0,0)}restoreFromBuffer(e=0,t=0){this.clear(),this.context.drawImage(this._bufferCanvas,e*this.pixelRatio,t*this.pixelRatio)}shift(e,t){this.copyToBuffer(),this.restoreFromBuffer(e,t)}set strokeStyle(e){this.context&&(this.context.strokeStyle=e)}get strokeStyle(){return this.context?this.context.strokeStyle:""}set fillStyle(e){this.context&&(this.context.fillStyle=e)}get fillStyle(){return this.context?this.context.fillStyle:""}set lineWidth(e){this.context&&(this.context.lineWidth=e*this.pixelRatio)}get lineWidth(){return this.context?this.context.lineWidth/this.pixelRatio:0}set font(e){this.context&&(this.context.font=e)}get font(){return this.context?this.context.font:""}clear(){this.context&&(this.context.globalAlpha=this.compositeAsGroup?mS(1.5*this.opacity,0,1):this.opacity,this.context.globalCompositeOperation=this.compositeOperation,this.context.imageSmoothingEnabled=!1,this.context.clearRect(0,0,this.width,this.height))}remove(){this.canvas instanceof HTMLCanvasElement&&this.canvas.remove()}appendTo(e){this.container=e,!this.offscreen&&this.canvas instanceof HTMLCanvasElement&&e.appendChild(this.canvas)}transferTo(e){try{if(!this.canvas)return;let t,n=1;if(e instanceof tj?(t=e.context,n=e.opacity):t=e.getContext("2d"),!t)return;this.compositeAsGroup&&(t.globalAlpha=this.opacity),this.height>0&&this.width>0&&t.drawImage(this.canvas,0,0,this.width,this.height),this.compositeAsGroup&&(t.globalAlpha=n)}catch(e){console.error(e)}}setSize(e,t){this.width=e,this.height=t}createCanvas(){if(this.group)return this.canvas=this.group.canvas,void(this._context=this.group.context);this.offscreen?this.canvas=this.createOffscreenCanvas():this.canvas=this.createVisibleCanvas(),this.offscreen&&this.canvas instanceof HTMLCanvasElement&&document.body.appendChild(this.canvas)}createVisibleCanvas(){var e,t;const n=document.createElement("canvas"),{pixelRatio:r}=this,o=this.container.clientWidth,i=null!=(e=this.options.height)?e:100;return n.id=`waveform-layer-${null!=(t=this.options.name)?t:"default"}`,n.width=o*r,n.height=this.isVisible?i*r:0,n.style.width=`${o}px`,n.style.height=`${i}px`,n.style.visibility=this.isVisible?"visible":"hidden",this._context=n.getContext("2d"),this._context.globalAlpha=this.compositeAsGroup?mS(1.5*this.opacity,0,1):this.opacity,this._context.globalCompositeOperation=this.compositeOperation,this._context.imageSmoothingEnabled=!1,n}createOffscreenCanvas(){let e;if(cS){var t;const{pixelRatio:n}=this,r=this.container.clientWidth,o=null!=(t=this.options.height)?t:100;e=new OffscreenCanvas(r*n,o*n),this._context=e.getContext("2d");const i=this.compositeAsGroup?mS(1.5*this.opacity,0,1):this.opacity;this._context.globalAlpha=i,this._context.globalCompositeOperation=this.compositeOperation,this._context.imageSmoothingEnabled=!1}else e=this.createVisibleCanvas(),Object.assign(e.style,{right:"100%",bottom:"100%",opacity:0,position:"absolute",visibility:this.isVisible?"visible":"hidden"});return e}createBufferCanvas(){if(this._bufferCanvas)return;let e;if(cS){const{pixelRatio:t}=this,n=this.canvas.width,r=this.canvas.height;e=new OffscreenCanvas(n*t,r*t),this._bufferContext=e.getContext("2d");const o=this.compositeAsGroup?mS(1.5*this.opacity,0,1):this.opacity;this._bufferContext.globalAlpha=o,this._bufferContext.globalCompositeOperation=this.compositeOperation,this._bufferContext.imageSmoothingEnabled=!1}else e=this.createVisibleCanvas(),Object.assign(e.style,{right:"100%",bottom:"100%",opacity:0,position:"absolute",visibility:"hidden"});this._bufferCanvas=e}}class nj extends tj{constructor(e){super(e),this.layers=void 0,this.layers=[]}get isGroup(){return!0}get length(){return this.layers.length}addLayer(e){const t=new tj(Object.assign({group:this},e));return this.layers.push(t),this.sortLayers(),t}removeLayer(e){this.layers=this.layers.filter((t=>t!==e))}remove(){this.layers.forEach((e=>{e.remove()})),this.layers=[],super.remove()}clear(){this.layers.forEach((e=>{e.clear()})),super.clear()}setSize(e,t){this.layers.forEach((n=>{n.setSize(e,t)})),super.setSize(e,t)}sortLayers(){this.layers.sort(((e,t)=>e.index-t.index))}}class rj extends RS{constructor(e,t,n){var r,o,i,a,s,l,c;if(super(),this.id=void 0,this.color=XS("#ccc"),this.fillColor=XS("#eee"),this.visualizer=void 0,this.layer=void 0,this.layerName=void 0,this.wf=void 0,this.capWidth=void 0,this.hoveredStrokeMultiplier=void 0,this._x=void 0,this.capHeight=void 0,this.capPadding=void 0,this.width=void 0,this.isHovered=!1,this.isDragging=!1,this.mouseDown=e=>{if(this.isVisible&&this.isHovered){e.preventDefault(),e.stopPropagation(),this.isDragging=!0,this.wf.cursor.set(JS.grabbing,"playhead");const t=e=>{if(this.isDragging){e.preventDefault(),e.stopPropagation();const t=this.visualizer.container.getBoundingClientRect(),n=e.clientX-t.left,r=mS(n,0,this.visualizer.width);r!==this._x&&(this.setX(r),this.wf.currentTime=jS(e,this.visualizer,this.wf.duration),this.render())}},n=e=>{this.isDragging&&(e.preventDefault(),e.stopPropagation(),this.isDragging=!1,document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n),this.render(),this.wf.cursor.set(JS.default))};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),this.render()}},this.mouseEnter=()=>{this.isVisible&&!this.isDragging&&(this.wf.cursor.hasFocus()||this.wf.cursor.set(JS.grab,"playhead"),this.isHovered=!0,this.render())},this.mouseLeave=()=>{this.isVisible&&!this.isDragging&&(this.isHovered=!1,this.render(),this.wf.cursor.isFocused("playhead")&&this.wf.cursor.set(JS.default))},this.playing=(e,t=!0)=>{this.isDragging||this.updatePositionFromTime(e,!0,t)},this.onZoom=()=>{this.playing(this.time,!1)},this.onScroll=()=>{this.playing(this.time,!1)},this.toggleVisibility=()=>{this.isVisible?this.render():this.layer.clear()},(null!=(r=null==e?void 0:e.x)?r:0)<0)throw new Error("Playhead start must be greater than 0");this.id=(0,R.Ak)(5),this._x=null!=(o=e.x)?o:0,this.color=e.color?e.color:this.color,this.fillColor=e.fillColor?e.fillColor:this.fillColor,this.width=null!=(i=e.width)?i:1,this.visualizer=t,this.layerName="playhead",this.wf=n,this.capWidth=null!=(a=e.capWidth)?a:8,this.capHeight=null!=(s=e.capHeight)?s:5,this.capPadding=null!=(l=e.capPadding)?l:3,this.hoveredStrokeMultiplier=null!=(c=e.hoveredStrokeMultiplier)?c:2,this.initialize()}updatePositionFromTime(e,t=!1,n=!0){const r=(e/this.wf.duration-this.scroll)*this.fullWidth,o=n?mS(r,0,this.fullWidth):r;this.setX(o),this.isVisible&&t&&this.render()}initialize(){this.on("mouseDown",this.mouseDown),this.on("mouseEnter",this.mouseEnter),this.on("mouseLeave",this.mouseLeave),this.wf.on("playing",this.playing),this.wf.on("zoom",this.onZoom),this.wf.on("scroll",this.onScroll)}removeEvents(){this.off("mouseDown",this.mouseDown),this.off("mouseEnter",this.mouseEnter),this.off("mouseLeave",this.mouseLeave),this.wf.off("playing",this.playing),this.wf.off("zoom",this.onZoom),this.wf.off("scroll",this.onScroll),this.layer.off("layerUpdated",this.toggleVisibility)}get scroll(){return this.visualizer.getScrollLeft()}get zoom(){return this.wf.zoom}get isVisible(){var e,t;return null==(e=null==(t=this.layer)?void 0:t.isVisible)||e}get time(){return this.wf.currentTime}get x(){return this._x+this.scroll}get containerWidth(){return this.visualizer.container.clientWidth}get fullWidth(){return this.visualizer.fullWidth}render(){const{color:e,fillColor:t,layer:n,_x:r,isHovered:o,width:i,hoveredStrokeMultiplier:a}=this,{reservedSpace:s}=this.visualizer;null!=n&&n.isVisible&&(n.clear(),n.save(),n.fillStyle=t.toString(),n.strokeStyle=e.toString(),n.lineWidth=o?i*a:i,n.beginPath(),this.moveTo(r,s),n.closePath(),n.stroke(),n.fill(),n.restore())}moveTo(e,t){const{layer:n,capWidth:r,capHeight:o,capPadding:i,visualizer:a}=this,{height:s}=a,l=t-o-i,c=r/2;n.moveTo(e-c,l),n.lineTo(e+c,l),n.lineTo(e+c,l+o-1),n.lineTo(e,l+o),n.lineTo(e,s),n.lineTo(e,l+o),n.lineTo(e-c,l+o-1)}setX(e){this._x=e}setLayer(e){this.layer&&this.layer.off("layerUpdated",this.toggleVisibility),this.layer=e,this.layer.on("layerUpdated",this.toggleVisibility)}toJSON(){return{x:this.x,color:this.color.toString(),layerName:this.layerName,id:this.id}}destroy(){this.isDestroyed||(this.removeEvents(),super.destroy())}}class oj extends HTMLElement{constructor(){super(),this._loaded=void 0,this._total=void 0,this._initializing=!1,this._error="",this._loaded=0,this._total=0,this.attachShadow({mode:"open"}),this.shadowRoot&&(this.shadowRoot.innerHTML='\n \n
\n
\n
\n

Loading file...

\n
\n
\n 0.0 MB(0)%of?? MB\n
\n
\n
\n
\n ')}get error(){return this._error}set error(e){this._error=e}get loaded(){return this._loaded}set loaded(e){this._loaded=e}get total(){return this._total}set total(e){this._total=e}get value(){return Math.round(this.loaded/this.total*100)}convertBytesToMegabytes(e){return(e/1024/1024).toFixed(1)}update(){if(!this.shadowRoot)return;const e=this.shadowRoot.querySelector(".progress-bar"),t=this.shadowRoot.querySelector("#text"),n=this.shadowRoot.querySelector("#loaded"),r=this.shadowRoot.querySelector("#total"),o=this.shadowRoot.querySelector("#percentage");if(!e)return;const i=this.total;requestAnimationFrame((()=>{if(this._error)return t.classList.contains("error")||t.classList.add("error"),void(t.innerText=this._error);if(this._initializing)return n.innerText=`${this.loaded}`,r.innerText=`${this.total} chunks`,void(o.innerText=`(${this.value}%)`);if(i<0)return e.classList.contains("progress-bar-indeterminate")||e.classList.add("progress-bar-indeterminate"),void(this.loaded>0&&(n.innerText=`${this.convertBytesToMegabytes(this.loaded)} MB`));const a=this.value;if(100===a)return this._initializing=!0,this.total>0&&(n.innerText=`${this.convertBytesToMegabytes(this.loaded)} MB`,r.innerText=`${this.convertBytesToMegabytes(this.total)} MB`,o.innerText=`(${a}%)`),t.innerText="Initializing...",void e.classList.add("progress-bar-indeterminate");e.style.setProperty("--ls-loader-position",a-100+"%"),a>0&&(o.innerText=`(${a}%)`),this.loaded>0&&(n.innerText=`${this.convertBytesToMegabytes(this.loaded)} MB`),this.total>0&&(r.innerText=`${this.convertBytesToMegabytes(this.total)} MB`)}))}static get observedAttributes(){return["hidden"]}}customElements.define("loading-progress-bar",oj);class ij extends RS{constructor(e,t){var n,r,o,i,a,s,l,c,d,u,h,g,m,p,f,v;super(),n=this,this.wrapper=void 0,this.layers=new Map,this.observer=void 0,this.currentTime=0,this.audio=void 0,this.zoom=1,this.scrollLeft=0,this.drawing=!1,this.renderId=0,this.amp=1,this.seekLocked=!1,this.wf=void 0,this.waveContainer=void 0,this.playheadPadding=4,this.zoomToCursor=!1,this.autoCenter=!1,this.splitChannels=!1,this.padding={top:0,bottom:0,left:0,right:0},this.gridWidth=1,this.gridColor=XS("rgba(0, 0, 0, 0.1)"),this.backgroundColor=XS("#fff"),this.waveColor=XS("#000"),this.baseWaveHeight=96,this.originalWaveHeight=0,this.waveHeight=32,this.lastRenderedZoom=0,this.lastRenderedWidth=0,this.lastRenderedAmp=0,this.lastRenderedScrollLeftPx=0,this._container=void 0,this._loader=void 0,this.timelineHeight=dS.timelineHeight,this.timelinePlacement="top",this.maxZoom=1500,this.playhead=void 0,this.reservedSpace=0,this.samplesPerPx=0,this.invokeLayersUpdated=((e,t,{leading:n=!1}={})=>{let r;return(...o)=>{r&&clearTimeout(r),n&&e(...o),r=setTimeout((()=>e(...o)),t)}})((async function(){n.invoke("layersUpdated",[n.layers])}),150),this.playHeadMove=(e,t)=>{if(this.wf.loaded&&e.target&&this.container.contains(e.target)){const{x:n,y:r}=t,{playhead:o,playheadPadding:i,height:a}=this,s=this.reservedSpace-o.capHeight-o.capPadding;n>=o.x-i&&n<=o.x+o.width+i&&r>=s&&r<=a?(o.isHovered||o.invoke("mouseEnter",[e]),this.draw(!0)):o.isHovered&&(o.invoke("mouseLeave",[e]),this.draw(!0))}},this.handleSeek=e=>{var t;const n=this.getLayer("main");if(!this.wf.loaded||this.seekLocked||!e.target||null==n||null==(t=n.canvas)||!t.contains(e.target))return;const r=this.wrapper.getBoundingClientRect().left,o=e.clientX-r,i=this.wf.duration,a=this.scrollLeft+o/this.container.clientWidth/this.zoom,s=mS(o,0,this.width);this.playhead.setX(s),this.wf.currentTime=a*i},this.handleMouseDown=e=>{this.wf.loaded&&this.playhead.invoke("mouseDown",[e])},this.handlePlaying=e=>{this.wf.loaded&&(this.currentTime=e/this.wf.duration,this.draw(1===this.zoom))},this.handleScroll=e=>{if(this.wf.loaded)if(this.isZooming(e)){const t=this.zoom-.2*e.deltaY;this.setZoom(t),this.wf.invoke("zoom",[this.zoom])}else if(this.zoom>1){const t=this.scrollWidth,n=t/this.fullWidth*this.zoom,r=(0===Math.abs(e.deltaX)?e.deltaY:e.deltaX)*this.zoom*1.25,o=t*(this.scrollLeft*this.zoom),i=Math.max(0,o+r),a=mS(i/t,0,n)/this.zoom;a!==this.scrollLeft&&(this.wf.invoke("scroll",[a]),this.setScrollLeft(a))}},this.preventScrollX=e=>{const[t,n]=[Math.abs(e.deltaX),Math.abs(e.deltaY)];(t>=n||this.isZooming(e)&&n>=t)&&(e.preventDefault(),e.stopPropagation())},this.handleResize=()=>{this.wf.duration&&requestAnimationFrame((()=>{this.updateSize(),this.wf.renderTimeline(),this.resetWaveformRender(),this.draw(!1,!0)}))},this.wf=t,this.waveContainer=e.container,this.waveColor=e.waveColor?XS(e.waveColor):this.waveColor,this.padding=Object.assign({},this.padding,e.padding),this.playheadPadding=null!=(r=null==(o=e.playhead)?void 0:o.padding)?r:this.playheadPadding,this.zoomToCursor=null!=(i=e.zoomToCursor)?i:this.zoomToCursor,this.autoCenter=null!=(a=e.autoCenter)?a:this.autoCenter,this.splitChannels=null!=(s=e.splitChannels)?s:this.splitChannels,this.baseWaveHeight=null!=(l=e.height)?l:this.baseWaveHeight,this.originalWaveHeight=this.baseWaveHeight,this.timelineHeight=null!=(c=null==(d=e.timeline)?void 0:d.height)?c:this.timelineHeight,this.waveHeight=null!=(u=e.waveHeight)?u:this.waveHeight,this.timelinePlacement=null!=(h=null==e||null==(g=e.timeline)?void 0:g.placement)?h:this.timelinePlacement,this.gridColor=e.gridColor?XS(e.gridColor):this.gridColor,this.gridWidth=null!=(m=e.gridWidth)?m:this.gridWidth,this.backgroundColor=e.backgroundColor?XS(e.backgroundColor):this.backgroundColor,this.zoom=null!=(p=e.zoom)?p:this.zoom,this.amp=null!=(f=e.amp)?f:this.amp,this.playhead=new rj(Object.assign({},e.playhead,{x:0,color:XS("#000"),fillColor:XS("#BAE7FF"),width:null!=(v=e.cursorWidth)?v:1}),this,this.wf),this.initialRender(),this.attachEvents()}init(e){this.init=()=>hS("Visualizer is already initialized"),this.audio=e,this.setLoading(!1),this.setContainerHeight(),this.height===this.originalWaveHeight&&this.handleResize(),this.invoke("initialized",[this])}setLoading(e){e?(this._loader=document.createElement("loading-progress-bar"),this._container.appendChild(this._loader)):this._container.removeChild(this._loader)}setLoadingProgress(e,t,n){this._loader&&(n?this._loader.total=this._loader.loaded:(void 0!==e&&(this._loader.loaded=e),void 0!==t&&(this._loader.total=t)),this._loader.update())}setDecodingProgress(e,t){this._loader&&(void 0!==e&&(this._loader.loaded=e),void 0!==t&&(this._loader.total=t),this._loader.update())}setError(e){this._loader&&(this._loader.error=e,this._loader.update())}setZoom(e){this.zoom=mS(e,1,this.maxZoom),this.zoomToCursor?this.centerToCurrentTime():this.updatePosition(!1),this.getSamplesPerPx(),this.wf.invoke("zoom",[this.zoom]),this.draw()}getZoom(){return this.zoom}setScrollLeft(e,t=!0,n=!1){this.scrollLeft=e,t&&this.draw(!1,n)}getScrollLeft(){return this.scrollLeft}getScrollLeftPx(){return this.scrollLeft*this.fullWidth}lockSeek(){this.seekLocked=!0}unlockSeek(){this.seekLocked=!1}draw(e=!1,t=!1){var n=this;if(!this.isDestroyed){if(this.drawing&&!t)return hS("Concurrent render detected");this.drawing=!0,setTimeout((async function(){e||(n.drawMiddleLine(),n.wf.playing&&n.autoCenter&&n.centerToCurrentTime(),await n.renderAvailableChannels()),n.renderCursor(),n.invoke("draw",[n]),n.transferImage(),n.drawing=!1}))}}destroy(){this.isDestroyed||(this.invoke("destroy",[this]),this.clear(),this.playhead.destroy(),this.audio=null,this.removeEvents(),this.layers.forEach((e=>e.remove())),this.wrapper.remove(),super.destroy())}clear(){var e;null==(e=this.layers.get("main"))||e.clear(),this.transferImage()}getAmp(){return this.amp}setAmp(e){this.amp=mS(e,1,Number.POSITIVE_INFINITY),this.draw()}centerToCurrentTime(){if(1===this.zoom)return void(this.scrollLeft=0);const e=this.width/2/this.zoomedWidth;this.scrollLeft=mS(this.currentTime-e,0,1)}updateCursorToTime(e){this.playhead.updatePositionFromTime(e)}async renderAvailableChannels(){if(!this.audio)return;const e=this.getLayer("waveform");if(!e||!e.isVisible)return void(this.lastRenderedWidth=0);this.renderId=performance.now();const t=this.dataLength,n=this.getScrollLeftPx(),r=mS(n*this.samplesPerPx,0,t),o=mS(r+this.width*this.samplesPerPx,0,t),i=o-r,a=this.zoom,s=this.amp;if(this.width!==this.lastRenderedWidth||a!==this.lastRenderedZoom||s!==this.lastRenderedAmp||i<1e7)for(let t=0;t{if(this.isDestroyed||!this.audio)return o(!1);0===e&&t.clear();const i=this.renderSlice(t,s,n,r,e,0),u=()=>{if(this.renderId!==a)return o(!1);i.next().done?(this.lastRenderedWidth=this.width,this.lastRenderedZoom=c,this.lastRenderedAmp=d,this.lastRenderedScrollLeftPx=l,o(!0)):requestAnimationFrame(u)};u()}))}async renderPartialWave(e,t,n){var r,o;const i=this.renderId;let a=0;const s=null!=(r=null==(o=this.audio)?void 0:o.channelCount)?r:1,l=this.baseWaveHeight/s,c=this.getScrollLeftPx(),d=this.dataLength;let u=this.lastRenderedScrollLeftPx-c;if(u<1&&u>-1||!this.audio)return!1;u=Math.round(u);const h=u*this.samplesPerPx;this.lastRenderedScrollLeftPx=c,e.shift(u,0);for(let r=0;r{let s=t,c=n;u>0?(c=t+h,a=0):(s=n+h,a=mS(this.width+u-2,0,this.width)),c=mS(c+2*this.samplesPerPx,0,d);const g=this.renderSlice(e,l,s,c,r,a),m=()=>{if(this.renderId!==i)return o(!1);g.next().done?o(!0):requestAnimationFrame(m)};m()}))}*renderSlice(e,t,n,r,o,i=0){var a,s,l,c,d;const u=null==(a=this.audio)||null==(a=a.chunks)?void 0:a[o];if(!u)return;const h=u.length,g=null!=(s=null==(l=this.padding)?void 0:l.top)?s:0,m=null!=(c=null==(d=this.padding)?void 0:d.left)?c:0,p=t*o+(dS.timelinePlacement?this.reservedSpace:0),f=p+g+t/2;let v=0;e.save();const y=this.waveColor.toString();e.strokeStyle=y,e.fillStyle=y,e.lineWidth=1,e.beginPath(),e.moveTo(i,f);const b=performance.now();for(let o=0;o0;){const a=r-o,s=n.slice(a,a+this.samplesPerPx);b-performance.now()>10&&(yield),i>=0&&s.length>0&&this.renderChunk(s,e,t,i+m,p),i+=1,o=mS(o-this.samplesPerPx,0,r)}}catch(e){}}e.stroke(),e.restore()}renderChunk(e,t,n,r,o){t.save();yS(e).forEach((e=>{const i=n/2,a=e*this.amp*i;t.lineTo(r+1,o+i+a)})),t.restore()}renderCursor(){this.playhead.render()}drawMiddleLine(){this.useLayer("background",(e=>{if(e.clear(),e.isVisible){e.save(),e.fillStyle=this.backgroundColor.toString(),e.fillRect(0,0,this.width,this.height),e.restore(),e.lineWidth=this.gridWidth,e.strokeStyle=this.gridColor.toString();const t=(this.height+this.reservedSpace)/2;e.beginPath(),e.moveTo(0,t),e.lineTo(this.width,t),e.closePath(),e.stroke(),e.restore()}}))}get pixelRatio(){return window.devicePixelRatio}get width(){return this.container.clientWidth}get height(){var e,t;let n=0;const r=this.getLayer("timeline"),o=this.getLayer("waveform"),i=Math.max(this.originalWaveHeight,this.waveHeight*(this.splitChannels&&null!=(e=null==(t=this.audio)?void 0:t.channelCount)?e:1)+this.timelineHeight)-this.timelineHeight;return this.baseWaveHeight!==i&&(this.baseWaveHeight=i),n+=null!=r&&r.isVisible?this.timelineHeight:0,n+=null!=o&&o.isVisible?i:0,n}get scrollWidth(){return this.zoomedWidth-this.width}get fullWidth(){return this.zoomedWidth}get zoomedWidth(){return this.width*this.zoom}get container(){if(this._container)return this._container;let e=null;if(this.waveContainer instanceof HTMLElement?e=this.waveContainer:"string"==typeof this.waveContainer&&(e=document.querySelector(this.waveContainer)),!e)throw new Error("Container element does not exist.");return e.style.position="relative",this._container=e,e}initialRender(){this.container&&(this.container.style.height=`${this.baseWaveHeight}px`,this.createLayers()),this.drawMiddleLine(),this.transferImage()}createLayers(){var e;const{container:t}=this;this.wrapper=document.createElement("div"),this.wrapper.style.height="100%",this.createLayer({name:"main"}),this.createLayer({name:"background",offscreen:!0,zIndex:0,isVisible:!1}),this.createLayer({name:"waveform",offscreen:!0,zIndex:100}),this.createLayerGroup({name:"regions",offscreen:!0,zIndex:101,compositeOperation:"source-over"});const n=this.createLayer({name:"controls",offscreen:!0,zIndex:1e3});this.playhead.setLayer(n),null==(e=this.layers.get("main"))||e.appendTo(this.wrapper),t.appendChild(this.wrapper)}reserveSpace({height:e}){this.reservedSpace=e}createLayer(e){const{name:t,offscreen:n=!1,zIndex:r=1,opacity:o=1,compositeOperation:i="source-over",isVisible:a}=e;if(!e.groupName&&this.layers.has(t))throw new Error(`Layer ${t} already exists.`);const s={groupName:e.groupName,name:t,container:this.container,height:this.baseWaveHeight,pixelRatio:this.pixelRatio,index:r,offscreen:n,compositeOperation:i,opacity:o,isVisible:a};let l;if(e.groupName){const t=this.layers.get(e.groupName);if(!t||!t.isGroup)throw new Error(`LayerGroup ${e.groupName} does not exist.`);l=t.addLayer(s)}else l=new tj(s),this.layers.set(t,l);return this.invoke("layerAdded",[l]),l.on("layerUpdated",(()=>{const e=this.getLayer("main");this.setContainerHeight(),e&&(e.height=this.height),this.invokeLayersUpdated()})),l}createLayerGroup(e){const{name:t,offscreen:n=!1,zIndex:r=1,opacity:o=1,compositeOperation:i="source-over",compositeAsGroup:a=!0}=e;if(this.layers.has(t))throw new Error(`LayerGroup ${t} already exists.`);const s=new nj({name:t,container:this.container,height:this.baseWaveHeight,pixelRatio:this.pixelRatio,index:r,offscreen:n,compositeOperation:i,compositeAsGroup:a,opacity:o});return this.invoke("layerAdded",[s]),s.on("layerUpdated",(()=>{this.invokeLayersUpdated()})),this.layers.set(t,s),s}removeLayer(e){if(!this.layers.has(e))throw new Error(`Layer ${e} does not exist.`);const t=this.layers.get(e);t&&(this.invoke("layerRemoved",[t]),t.off("layerUpdated",this.invokeLayersUpdated),t.remove()),this.layers.delete(e)}getLayer(e){return this.layers.get(e)}getLayers(){return this.layers}useLayer(e,t){const n=this.layers.get(e);n&&t(n,n.context)}attachEvents(){this.observer=new ResizeObserver(this.handleResize),this.observer.observe(this.wrapper),this.wrapper.addEventListener("wheel",this.preventScrollX),this.wrapper.addEventListener("wheel",this.handleScroll,{passive:!0}),this.wrapper.addEventListener("click",this.handleSeek),this.wrapper.addEventListener("mousedown",this.handleMouseDown),this.on("mouseMove",this.playHeadMove),this.on("layerAdded",this.invokeLayersUpdated),this.on("layerRemoved",this.invokeLayersUpdated),this.wf.on("playing",this.handlePlaying),this.wf.on("seek",this.handlePlaying)}removeEvents(){this.observer.unobserve(this.wrapper),this.observer.disconnect(),this.wrapper.removeEventListener("wheel",this.preventScrollX),this.wrapper.removeEventListener("wheel",this.handleScroll),this.wrapper.removeEventListener("click",this.handleSeek),this.wrapper.removeEventListener("mousedown",this.handleMouseDown),this.off("mouseMove",this.playHeadMove),this.off("layerAdded",this.invokeLayersUpdated),this.off("layerRemoved",this.invokeLayersUpdated),this.wf.off("playing",this.handlePlaying),this.wf.off("seek",this.handlePlaying)}updatePosition(e=!0){if(!this.wf.loaded)return;const t=this.scrollWidth/this.fullWidth*this.zoom;this.setScrollLeft(mS(this.scrollLeft,0,t),e)}get dataLength(){var e,t;return null!=(e=null==(t=this.audio)?void 0:t.dataLength)?e:0}getSamplesPerPx(){const e=this.dataLength/this.fullWidth;return e!==this.samplesPerPx&&(this.samplesPerPx=e),this.samplesPerPx}isZooming(e){return e.ctrlKey||e.metaKey}setContainerHeight(){this.container.style.height=`${this.height}px`}updateSize(){const e=this.wrapper.clientWidth,t=this.height;this.getSamplesPerPx(),this.layers.forEach((n=>n.setSize(e,t)))}resetWaveformRender(){this.lastRenderedAmp=0,this.lastRenderedWidth=0,this.lastRenderedZoom=0,this.lastRenderedScrollLeftPx=0}transferImage(e=["background","waveform","regions","controls"]){const t=this.layers.get("main");if(t.clear(),e){Array.from(this.layers).sort(((e,t)=>e[1].index-t[1].index)).filter((([e,t])=>t.offscreen)).forEach((([e,n])=>{"main"!==e&&n.transferTo(t)}))}}}class aj extends RS{constructor(e,t,n,r){var o,i,a,s,l,c;if(super(),this.id=void 0,this.start=0,this.end=0,this.color=XS("#afafaf"),this.selected=!1,this.highlighted=!1,this.updateable=!0,this.locked=!1,this.deleteable=!0,this.visible=!0,this.showInTimeline=!1,this.external=!1,this.waveform=void 0,this.visualizer=void 0,this.controller=void 0,this.layer=void 0,this.handleWidth=void 0,this.isDragging=void 0,this.draggingStartPosition=void 0,this.isGrabbingEdge=void 0,this.switchCursor=(e,t=!0)=>{this.waveform.cursor.set(e,t&&this.requiresCursorFocus(e)?this.layerName:"")},this.edgeGrabCheck=e=>{const{handleWidth:t,end:n,start:r,visualizer:o}=this,{zoomedWidth:i}=this.visualizer,{duration:a}=this.waveform,s=jS(e,o,a),l=SS(t,i,a);return{isRightEdge:s>n-l,isLeftEdge:s{if(!this.updateable||!this.controller.layerGroup.isVisible)return;const n=this.edgeGrabCheck(t);this.isDragging||(n.isRightEdge||n.isLeftEdge?this.switchCursor(JS.colResize):this.switchCursor(JS.grab))},this.handleMouseUp=e=>{this.updateable&&(this.isDragging&&(this.switchCursor(JS.grab),this.handleUpdateEnd()),this.handleSelected(),this.waveform.invoke("regionSelected",[this,e]),this.isDragging=!1,this.draggingStartPosition=null,this.isGrabbingEdge={isRightEdge:!1,isLeftEdge:!1},document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleMouseUp))},this.handleDrag=e=>{if(this.updateable&&!this.locked&&this.draggingStartPosition){e.preventDefault(),e.stopPropagation(),this.isDragging=!0;const{isRightEdge:t,isLeftEdge:n}=this.isGrabbingEdge,{grabPosition:r,start:o,end:i}=this.draggingStartPosition,a=t||n,{container:s,zoomedWidth:l}=this.visualizer,{duration:c}=this.waveform,d=this.visualizer.getScrollLeft();let u=wS(e,s)+d;u<0&&(u=0);const h=SS(u-r,l,c),g=i-o,m=n?o+h:mS(o+h,0,this.duration-g),p=t?o:m,f=n?i:mS(i+h,m+(a?0:g),this.duration);t||n?this.switchCursor(JS.colResize):this.switchCursor(JS.grabbing),this.updatePosition(mS(p,0,c),mS(f,0,c))}},this.mouseDown=(e,t)=>{if(!this.updateable||!this.controller.layerGroup.isVisible)return;if(this.controller.isOverrideKeyPressed(t)||this.controller.isLocked)return;const{container:n}=this.visualizer,r=this.visualizer.getScrollLeft(),o=wS(t,n)+r,{start:i,end:a}=this;this.bringToFront(),this.draggingStartPosition={grabPosition:o,start:i,end:a},this.isGrabbingEdge=this.edgeGrabCheck(t),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("mousemove",this.handleDrag)},this.handleSelected=e=>{!this.updateable||this.isDragging&&this.selected||(this.waveform.playing&&this.waveform.player.pause(),this.selected=null!=e?e:!this.selected,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this]))},this.handleHighlighted=e=>{this.updateable&&!this.selected&&(this.highlighted=null!=e?e:!this.highlighted,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this]))},e.start<0)throw new Error("Segment start must be greater than 0");if(e.end<0)throw new Error("Segment end must be greater than 0");this.id=null!=(o=e.id)?o:(0,R.Ak)(5),this.start=e.start,this.end=e.end,this.selected=!!e.selected,this.updateable=null!=(i=e.updateable)?i:this.updateable,this.locked=null!=(a=e.locked)?a:this.locked,this.visible=null!=(s=e.visible)?s:this.visible,this.waveform=t,this.visualizer=n,this.controller=r,this.handleWidth=2,this.isDragging=!1,this.draggingStartPosition=null,this.isGrabbingEdge={isRightEdge:!1,isLeftEdge:!1},this.showInTimeline=null!=(l=e.showInTimeline)?l:this.showInTimeline,this.external=null!=(c=e.external)?c:this.external,this.initialize()}get isRegion(){return!1}update(e){(this.updateable||void 0===e.updateable||e.updateable)&&(void 0!==e.updateable&&(this.updateable=e.updateable),void 0!==e.deleteable&&(this.deleteable=e.deleteable),void 0!==e.locked&&(this.locked=e.locked),void 0!==e.start&&(this.start=e.start),void 0!==e.end&&(this.end=e.end),void 0!==e.selected&&(this.selected=e.selected),void 0!==e.visible&&(this.visible=e.visible),void 0!==e.color&&(this.color=XS(e.color)),void 0!==e.showInTimeline&&(this.showInTimeline=e.showInTimeline),void 0!==e.external&&(this.external=e.external))}setVisibility(e){e!==this.visible&&(this.visible=e,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this]))}bringToFront(){this.controller.bringRegionToFront(this.id)}get layerName(){return`region-${this.id}`}get duration(){return this.waveform.duration}get zoom(){return this.waveform.zoom}get xStart(){const{width:e}=this.visualizer,t=this.visualizer.getScrollLeft();return(this.start/this.duration*e-e*t)*this.zoom}get xEnd(){return this.xStart+this.width}get width(){const{start:e,end:t}=this,{width:n}=this.visualizer;return(t-e)/this.waveform.duration*n*this.zoom}get hovered(){return this.controller.isHovered(this)}get timelineHeight(){return this.visualizer.timelineHeight||dS.timelineHeight}get timelinePlacement(){return this.visualizer.timelinePlacement||dS.timelinePlacement}get options(){return{start:this.start,end:this.end,id:this.id,selected:this.selected,updateable:this.updateable,locked:this.locked,deleteable:this.deleteable,visible:this.visible}}get inViewport(){const{xStart:e,xEnd:t}=this,n=this.visualizer.width*this.zoom;return!(e<=0&&t<=0)&&!(e>=n&&t>=n)}requiresCursorFocus(e){return![JS.crosshair].includes(e)}initialize(){this.layer=this.visualizer.createLayer({groupName:"regions",name:this.layerName}),this.on("mouseOver",this.mouseOver),this.on("mouseDown",this.mouseDown)}render(){if(!this.visible||!this.inViewport)return;const{color:e,selected:t,highlighted:n,timelinePlacement:r,timelineHeight:o}=this,{height:i}=this.visualizer,a=e.clone(),s=this.visualizer.getLayer("timeline"),l=r===dS.timelinePlacement,c=null!=s&&s.isVisible&&l?o:0,d=this.controller.layerGroup;(t||n)&&a.darken(.4),d.fillStyle=a.clone().translucent(.77).toString(),d.fillRect(this.xStart,c,this.width,i),d.fillStyle=t?a.toString():a.clone().translucent(.6).toString(),d.fillRect(this.xStart,c,this.handleWidth,i),d.fillRect(this.xEnd-this.handleWidth,c,this.handleWidth,i)}handleUpdateEnd(){this.invoke("updateEnd",[this]),this.waveform.invoke("regionUpdatedEnd",[this])}setColor(e){this.color.update(e)}setLocked(e){this.locked=e,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this])}updateColor(e){this.updateable&&(this.setColor(e),this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this]))}updatePosition(e,t){if(!this.updateable)return;let n=null!=e?e:this.start,r=null!=t?t:this.end;n>r&&([n,r]=[r,n]),this.start=n,this.end=r,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this])}scrollToRegion(){this.waveform.scrollToRegion(this.start)}convertToRegion(e,t=!1){if(this.updateable)return this.controller.convertToRegion(this.id,e,t)}convertToSegment(e=!1){if(this.updateable)return this.controller.convertToSegment(this.id,e)}remove(){this.deleteable&&this.waveform.invoke("regionRemoved",[this])}destroy(e=!0){this.deleteable&&!this.isDestroyed&&(e&&this.remove(),super.destroy())}toJSON(){return{start:this.start,end:this.end}}}class sj extends aj{constructor(e,t,n,r){var o;super(e,t,n,r),this.labels=void 0,this.labels=null!=(o=e.labels)?o:this.labels,this.color=e.color?XS(e.color):this.color}get isRegion(){return!0}get options(){return Object.assign({},super.options,{labels:this.labels,color:this.color.toString()})}renderLabels(){var e;if(null!=(e=this.labels)&&e.length&&this.controller.showLabels&&this.visible){const e=this.controller.layerGroup,t=this.color,n=this.timelinePlacement,r=this.visualizer.getLayer("timeline"),o=this.timelineHeight,i=(null!=r&&r.isVisible&&n?o:0)+4,a=this.labels.map((t=>e.context.measureText(t))),s=a.reduce(((e,t)=>e+t.fontBoundingBoxAscent+t.fontBoundingBoxDescent+2),0),l=this.xStart+this.handleWidth+2,c=a[0].width+10,d=this.xEnd-this.xStart-2*this.handleWidth,u=d{const r=s/a.length*(n+1)-1;e.fitText(t,l+6,i+r,h-this.handleWidth-6)}))}}render(){super.render(),this.renderLabels()}update(e){var t;super.update(e),this.labels=null!=(t=e.labels)?t:this.labels,this.color=e.color?XS(e.color):this.color}toJSON(){return{start:this.start,end:this.end,color:this.color.toString(),labels:this.labels,layerName:this.layerName,id:this.id}}}class lj{constructor(e,t,n){var r,o,i,a,s;this.regions=[],this.waveform=void 0,this.visualizer=void 0,this.initialRegions=void 0,this.locked=!1,this.hoveredRegions=new Set,this.defaultColor=XS("#787878"),this.drawingColor=XS("#787878"),this.labels=void 0,this.createable=!0,this.updateable=!0,this.deleteable=!0,this.drawableTarget=aj,this.showLabels=!1,this.layerGroup=void 0,this.handleDraw=()=>{this.waveform.loaded&&this.renderAll()},this.handleInit=()=>{this.initialRegions.length&&(this.regions=this.initialRegions.map((e=>new sj(e,this.waveform,this.visualizer,this))),this.initialRegions=[]),this.visualizer.on("draw",this.handleDraw)},this.handleRegionUpdated=()=>{this.visualizer.draw(!0)},this.handleRegionRemoved=e=>{this.removeRegion(e.id)},this.handleDrawRegion=e=>{if(this.locked||!this.createable)return;if(this.hoveredRegions.size>0&&!this.isOverrideKeyPressed(e))return;if(!this.layerGroup.isVisible)return;let t,n;this.lock(),this.waveform.invoke("beforeRegionsDraw",[this]);const r=()=>{const{container:r,zoomedWidth:o,fullWidth:i}=this.visualizer,{autoPlayNewSegments:a,duration:s}=this.waveform,l=this.visualizer.getScrollLeftPx();n=mS(wS(e,r)+l,0,i);const c=SS(n,o,s),d=SS(n,o,s);t=this.addRegion({start:c,end:d,color:this.drawingColor.toString(),selected:!1,labels:this.labels}),a&&!t.isRegion&&this.regions.forEach((e=>e.handleSelected(e.id===t.id)))},o=e=>{const{container:o,fullWidth:i}=this.visualizer,a=this.visualizer.getScrollLeftPx(),s=mS(wS(e,o)+a,0,i);if(t||r(),Math.abs(s-n)>5){let e=this.pixelsToTime(n),r=this.pixelsToTime(s);r{const{player:e,autoPlayNewSegments:n}=this.waveform;document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i),t&&t.start===t.end?(t.remove(),this.unlock()):t?(this.waveform.invoke("regionCreated",[t]),n&&!t.isRegion&&(e.playing&&e.pause(),e.play()),setTimeout((()=>this.unlock()),0)):this.unlock(),this.waveform.invoke("afterRegionsDraw",[this])};document.addEventListener("mousemove",o),document.addEventListener("mouseup",i)},this.handleMouseMove=e=>{const t=this.findRegionUnderCursor(e);t?(t.invoke("mouseOver",[t,e]),t.hovered||(this.hoveredRegions.clear(),this.hover(t,e))):this.hoveredRegions.size&&(this.hoveredRegions.forEach((t=>{t.invoke("mouseLeave",[t,e])})),this.hoveredRegions.clear(),this.cursorLockedByPlayhead||this.waveform.cursor.set(JS.crosshair))},this.handleMouseDown=e=>{if(!this.updateable)return;const t=this.findRegionUnderCursor(e);this.layerGroup.isVisible&&null!=t&&t.updateable&&(e.preventDefault(),e.stopPropagation(),t.invoke("mouseDown",[t,e]))},this.handleMouseUp=e=>{if(!this.updateable)return;const t=this.findRegionUnderCursor(e);this.layerGroup.isVisible&&null!=t&&t.updateable&&t.invoke("mouseUp",[t,e])},this.handleClick=e=>{var t;const n=this.visualizer.getLayer("main");if(e.target&&null!=n&&null!=(t=n.canvas)&&t.contains(e.target)){const t=this.findRegionUnderCursor(e);this.layerGroup.isVisible&&t&&t.invoke("click",[t,e])}},this.waveform=t,this.visualizer=n,this.initialRegions=null!=(r=null==e?void 0:e.regions)?r:[],this.defaultColor=null!=e&&e.defaultColor?XS(e.defaultColor):this.defaultColor,this.labels=void 0,this.createable=null!=(o=null==e?void 0:e.createable)?o:this.createable,this.updateable=null!=(i=null==e?void 0:e.updateable)?i:this.updateable,this.deleteable=null!=(a=null==e?void 0:e.deleteable)?a:this.deleteable,this.layerGroup=this.visualizer.getLayer("regions"),this.showLabels=null!=(s=this.waveform.params.showLabels)&&s,this.init()}init(){this.visualizer.on("initialized",this.handleInit),this.waveform.on("regionRemoved",this.handleRegionRemoved),this.waveform.on("regionUpdated",this.handleRegionUpdated),this.visualizer.container.addEventListener("mousedown",this.handleDrawRegion);const{container:e}=this.visualizer;e.addEventListener("mousemove",this.handleMouseMove),e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("mouseup",this.handleMouseUp),e.addEventListener("click",this.handleClick)}renderAll(){this.layerGroup.clear();const e=this.waveform.currentTime;this.regions.forEach((t=>{t.highlighted=t.start<=e&&t.end>=e,t.render()}))}regionDrawableTarget(){this.drawableTarget=sj}segmentDrawableTarget(){this.drawableTarget=aj}resetDrawableTarget(){this.segmentDrawableTarget()}clearSegments(e=!1){this.regions=this.regions.filter((t=>!!(t.isRegion||e&&!t.selected||t.external)||(t.destroy(),!1)))}addRegions(e,t=!0){e.forEach((e=>this.addRegion(e,!1))),t&&this.redraw()}addRegion(e,t=!0){var n;let r;return r=null!=(n=e.labels)&&n.length||this.drawableTarget===sj?new sj(e,this.waveform,this.visualizer,this):new aj(e,this.waveform,this.visualizer,this),this.regions.push(r),t&&this.redraw(),r}findRegion(e){return this.regions.find((t=>t.id===e))}convertToRegion(e,t,n=!0){let r=this.findRegion(e);const o=this.regions.findIndex((t=>t.id===e));return r=new sj(Object.assign({},r.options,{labels:t}),this.waveform,this.visualizer,this),this.regions[o]=r,n&&this.redraw(),r}convertToSegment(e,t=!0){let n=this.findRegion(e);const r=this.regions.findIndex((t=>t.id===e));return n=new aj(n.options,this.waveform,this.visualizer,this),this.regions[r]=n,t&&this.redraw(),n}updateRegion(e,t=!0){if(!this.updateable||!e.id)return;const n=this.findRegion(e.id);return n?(n.update(e),t&&this.redraw(),n):void 0}redraw(){this.visualizer.draw(!0)}removeRegion(e,t=!0){const n=this.findRegion(e);this.deleteable&&null!=n&&n.deleteable&&(n.destroy(!1),this.regions=this.regions.filter((e=>e!==n))),t&&this.redraw()}bringRegionToFront(e){const t=this.regions.findIndex((t=>t.id===e));this.regions.push(...this.regions.splice(t,1))}destroy(){const{container:e}=this.visualizer;this.visualizer.off("initialized",this.handleInit),this.visualizer.off("draw",this.handleDraw),this.waveform.off("regionRemoved",this.handleRegionRemoved),this.waveform.off("regionUpdated",this.handleRegionUpdated),e.removeEventListener("mousemove",this.handleMouseMove),e.removeEventListener("mousedown",this.handleMouseDown),e.removeEventListener("mouseup",this.handleMouseUp),e.removeEventListener("click",this.handleClick),this.regions.forEach((e=>e.destroy())),this.regions=[]}setDrawingColor(e){this.drawingColor=XS(e)}updateLabelVisibility(e){this.showLabels=e,this.redraw()}setLabels(e){e&&(this.labels=e)}resetDrawingColor(){this.drawingColor=this.defaultColor.clone()}resetLabels(){this.labels=void 0}get list(){return Array.from(this.regions)}get selected(){return this.regions.filter((e=>e.selected))}get timelineRegions(){return this.regions.filter((e=>e.showInTimeline))}get visible(){return this.regions.filter((e=>e.visible))}isOverrideKeyPressed(e){return e.shiftKey}get cursorLockedByPlayhead(){return this.waveform.cursor.hasFocus()&&this.waveform.cursor.isFocused("playhead")}findRegionUnderCursor(e){return((e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]})(this.visible,(t=>this.cursorInRegion(e,t)))}cursorInRegion(e,t){const{xStart:n,width:r}=t,{container:o,timelinePlacement:i,timelineHeight:a=0,height:s}=this.visualizer,l=this.visualizer.getLayer("timeline"),c=i===dS.timelinePlacement&&null!=l&&l.isVisible?a:0,d=wS(e,o),u=CS(e,o);if(!fS(d,n,n+r))return!1;return fS(u,c,c+s-a)}lock(){this.locked=!0,this.visualizer.lockSeek()}unlock(){this.locked=!1,this.visualizer.unlockSeek()}get isLocked(){return this.locked}hover(e,t){t&&(this.visualizer.lockSeek(),e.invoke("mouseEnter",[e,t])),this.hoveredRegions.add(e)}unhover(e,t){t&&(this.visualizer.unlockSeek(),e.invoke("mouseLeave",[e,t])),this.hoveredRegions.delete(e)}pixelsToTime(e){const{zoomedWidth:t}=this.visualizer,{duration:n}=this.waveform;return e/t*n}toJSON(){return this.regions.map((e=>e.toJSON()))}isHovered(e){return this.hoveredRegions.has(e)}}class cj{constructor(e,t,n){var r,o,i,a,s,l;this.waveform=void 0,this.visualizer=void 0,this.layer=void 0,this.placement=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.height=dS.timelineHeight,this.initHeight=dS.timelineHeight,this.fontSize=12,this.gridWidth=1,this.fontFamily="Arial",this.fontColor=XS("#413C4A"),this.selectionColor=XS("rgba(65, 60, 74, 0.08)"),this.gridColor=XS("rgba(137,128,152,0.16)"),this.backgroundColor=XS("#fff"),this._labeMaxWidth={true:0,false:0},this.waveform=t,this.visualizer=n,this.placement=(null==e?void 0:e.placement)||dS.timelinePlacement,this.padding=Object.assign({},this.padding,null==e?void 0:e.padding),this.fontSize=null!=(r=null==e?void 0:e.fontSize)?r:this.fontSize,this.fontFamily=null!=(o=null==e?void 0:e.fontFamily)?o:this.fontFamily,this.height=(null!=(i=null==e?void 0:e.height)?i:dS.timelinePlacement)?null!=(a=null==e?void 0:e.height)?a:dS.timelineHeight:this.height,this.initHeight=this.height,this.gridWidth=null!=(s=null==e?void 0:e.gridWidth)?s:this.gridWidth,this.fontColor=null!=e&&e.fontColor?XS(null==e?void 0:e.fontColor):this.fontColor,this.selectionColor=null!=(l=null==e?void 0:e.selectedColor)?l:this.selectionColor,this.gridColor=null!=e&&e.gridColor?XS(null==e?void 0:e.gridColor):this.gridColor,this.backgroundColor=null!=e&&e.backgroundColor?XS(null==e?void 0:e.backgroundColor):this.backgroundColor,this.visualizer.reserveSpace({height:this.height}),this.layer=this.visualizer.createLayer({name:"timeline",offscreen:!0,zIndex:103}),this.visualizer.on("initialized",(()=>{this.visualizer.on("draw",(()=>this.render()))})),this.layer.on("layerUpdated",(()=>{this.height=this.layer.isVisible?this.initHeight:0,this.visualizer.reserveSpace({height:this.height}),this.render()}))}render(){var e;const{width:t}=this.visualizer,n=this.height,r=this.layer,o=this.visualizer.height-n,i=this.gridWidth,a=this.gridColor.toString(),s=this.backgroundColor.toString(),l=this.placement,c="top"===l?0:o,d="top"===l&&(null==(e=this.padding)?void 0:e.left)||0;r.clear(),this.layer.isVisible&&(r.lineWidth=i,r.strokeStyle=a,r.fillStyle=s,r.beginPath(),r.fillRect(0,c,t+d,n),this.renderTimelineRegions(),this.renderSelected(),this.renderIntervals(),r.fillStyle=a,r.fillRect(0,c+n,t+d,i),r.stroke())}renderTimelineRegions(){var e;const t=null==(e=this.waveform)?void 0:e.regions.timelineRegions;if(t.length){const{height:e}=this,{duration:n}=this.waveform,{zoomedWidth:r}=this.visualizer,o=this.visualizer.getScrollLeftPx(),i=this.waveform.currentTime;t.sort(((e,t)=>e.start-t.start)).forEach((t=>{const{end:a,start:s,selected:l,color:c}=t,d=s<=i&&a>=i,u=s*r/n-o,h=(a-s)*r/n,g=this.layer,m=c.clone();d&&m.darken(l?.3:.4),g.fillStyle=m.translucent(.8).toString(),g.fillRect(u,0,h,e)}))}}renderSelected(){var e;const t=null==(e=this.waveform)?void 0:e.regions.selected;if(t.length){const{selectionColor:e,height:n}=this,{duration:r}=this.waveform,{zoomedWidth:o}=this.visualizer,i=this.visualizer.getScrollLeftPx(),a=t.sort(((e,t)=>e.start-t.start))[0].start,s=a*o/r-i,l=(t.sort(((e,t)=>t.end-e.end))[0].end-a)*o/r,c=0,d=this.layer;d.fillStyle=e.toString(),d.fillRect(s,c,l,n)}}renderInterval(e){var t;const{pixelRatio:n,height:r}=this.visualizer,o=this.fontSize,i=this.height,a=r-i,s=this.placement,l=this.layer,c="top"===s?0:a,d="top"===s&&(null==(t=this.padding)?void 0:t.left)||0,u="top"===s?"label"===e.type?.75*i:.875*i:c,h="top"===s?"label"===e.type?.25*i:.125*i:"label"===e.type?i/2:i/3;if(l.moveTo(e.x+d,u),l.lineTo(e.x+d,u+h),"label"===e.type){var g;const t=this.formatTime(1e3*e.time,e.includeMs),r="top"===s?e.x-this.getDownscaledTextWidth(l,t)/2:e.x+((null==(g=this.padding)?void 0:g.left)||6);l.fillStyle=this.fontColor.toString(),l.font=`${o*n}px ${this.fontFamily}`,l.fillText(t,r,"top"===s?c+.75*i/2+o/2-this.gridWidth:c+i-8)}}getDownscaledTextWidth(e,t){const{pixelRatio:n}=this.visualizer;return e.measureText(t).width/n}renderIntervals(){const{width:e}=this.visualizer,t=this.visualizer.getScrollLeftPx(),n=this.mapToTime(e),[r,o]=this.getIntervals(n),i=this.mapToTime(Math.abs(t)),a=Math.floor(i/r)*r,s=a+n,l=n<60,c=10**10;for(let e=a;e6?a=10**r*7.5:i>4?a=10**r*5:i>2?a=10**r*2.5:i>1&&(a=10**r*1.25);const s=e<60,l=Math.ceil((this.getLabelMaxWidth(s)+2*this.getLabelPadding())/this.mapToPx(a))*a,c=Math.floor(Math.log10(l)),d=Math.ceil(l/10**c);let u=pS(10,c);return d>5?u=10**c*7.5:d>3?u=10**c*5:d>2?u=10**c*2.5:d>1&&(u=10**c*1.25),[a,u]}formatTime(e,t=!1){const n=e>3600?11:14,r=t?23:19;return new Date(e).toISOString().substring(n,r)}}class dj extends RS{constructor(e){var t,n;super(),this.src=void 0,this.media=void 0,this.visualizer=void 0,this.timeline=void 0,this.focusTimeout=null,this.tooltip=void 0,this.cursor=void 0,this.player=void 0,this.params=void 0,this.regions=void 0,this.loaded=!1,this.renderedChannels=!1,this.autoPlayNewSegments=!1,this.handleCursorMove=e=>{if(e.target&&this.visualizer.container.contains(e.target)){if(this.loaded&&this.cursor.inView){var t;this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout((()=>{this.cursor.hasFocus()||this.cursor.set(JS.crosshair)}),1);const n=jS(e,this.visualizer,this.duration),r=null==(t=new Date(1e3*n).toISOString().match(/T(.*?)Z/))?void 0:t[1];this.tooltip.show(e.pageX,e.pageY+16,r)}else this.cursor.set(JS.default);this.cursor.show()}else this.cursor.hide(),this.tooltip.hide()},null!=e&&e.timeline||(e.timeline={placement:"top"}),e.decoderType=null!=(t=e.decoderType)?t:"webaudio",e.playerType="ffmpeg"===e.decoderType?"html5":null!=(n=e.playerType)?n:"html5",this.src=e.src,this.params=e,this.init()}init(){var e,t,n,r,o,i,a;this.media=new NS(this,{src:this.src}),this.tooltip=new qS(null==(e=this.params)?void 0:e.tooltip),this.visualizer=new ij(this.params,this),this.cursor=new QS(Object.assign({x:0,y:0,width:null!=(t=null==(n=this.params)?void 0:n.cursorWidth)?t:1},null==(r=this.params)?void 0:r.cursor),this.visualizer),this.timeline=new cj(Object.assign({gridColor:this.params.gridColor,gridWidth:this.params.gridWidth},null==(o=this.params)?void 0:o.timeline),this,this.visualizer),this.regions=new lj(Object.assign({},null==(i=this.params)?void 0:i.regions),this,this.visualizer),this.autoPlayNewSegments=null!=(a=this.params.autoPlayNewSegments)?a:this.autoPlayNewSegments,this.player="html5"===this.params.playerType?new zS(this):new BS(this),this.initEvents(),this.loadingState()}renderTimeline(){this.timeline.render()}loadingState(){this.visualizer.setLoading(!0),this.renderTimeline(),this.visualizer.draw(!0)}async load(){var e,t,n;if(this.isDestroyed)return;const r=this.media.load({muted:null!=(e=this.params.muted)&&e,volume:null!=(t=this.params.volume)?t:1,rate:null!=(n=this.params.rate)?n:1});this.media.decoderPromise&&(await this.media.decoderPromise,this.renderTimeline(),this.visualizer.draw(!0));const o=await r;this.isDestroyed||o&&("webaudio"===this.params.playerType&&(this.media.duration=o.duration,this.renderTimeline(),this.visualizer.draw(!0)),this.player.init(o),this.visualizer.init(o),this.loaded=!0,this.invoke("load"))}syncCursor(){const e=this.currentTime;this.visualizer.updateCursorToTime(e),this.visualizer.draw(!0)}seek(e){this.player.seek(e)}seekForward(e){var t;this.seek(this.currentTime+(null!=(t=null!=e?e:this.params.seekStep)?t:1))}seekBackward(e){var t;this.seek(this.currentTime-(null!=(t=null!=e?e:this.params.seekStep)?t:1))}scrollToRegion(e){if(1===this.zoom)return;const t=this.visualizer.width/2/this.visualizer.zoomedWidth,n=mS(e/this.duration-t,0,1);this.visualizer.setScrollLeft(n,!0,!0),this.invoke("scroll",[n])}play(e,t){this.player.play(e,t)}pause(){this.player.pause()}togglePlay(){this.playing?this.pause():this.play()}setLoadingProgress(e,t,n){this.visualizer.setLoadingProgress(e,t,n)}setDecodingProgress(e,t){this.visualizer.setDecodingProgress(e,t)}setError(e,t){this.invoke("error",[t||new Error(e)]),this.visualizer.setError(e)}stop(){this.player.stop()}destroy(){this.isDestroyed||(this.regions.destroy(),this.media.destroy(),this.player.destroy(),this.visualizer.destroy(),this.cursor.destroy(),this.tooltip.destroy(),super.destroy())}addRegions(e,t=!0){this.regions.addRegions(e,t)}addRegion(e,t=!0){return this.regions.addRegion(e,t)}updateRegion(e,t=!0){return this.regions.updateRegion(e,t)}updateLabelVisibility(e){this.regions.updateLabelVisibility(e)}removeRegion(e,t=!0){this.regions.removeRegion(e,t)}getLayers(){return this.visualizer.getLayers()}getLayer(e){return this.visualizer.getLayer(e)}get playing(){return this.player.playing}get zoom(){return this.visualizer.getZoom()}set zoom(e){this.visualizer.setZoom(e)}get volume(){return this.player.volume}set volume(e){this.player.volume=e}get muted(){return this.player.muted}set muted(e){this.player.muted=e}get scroll(){return this.duration*this.visualizer.getScrollLeft()/this.zoom*1e3}set scroll(e){const t=e/this.duration*this.zoom;this.visualizer.setScrollLeft(t),this.invoke("scroll",[t])}get rate(){return this.player.rate}set rate(e){this.player.rate=e}get currentTime(){return this.player.currentTime}set currentTime(e){this.setCurrentTime(e,!0)}setCurrentTime(e,t=!1){t?this.player.seek(e):this.player.seekSilent(e)}get amp(){return this.visualizer.getAmp()}set amp(e){this.visualizer.setAmp(e)}get duration(){return this.media.duration}get sampleRate(){return this.media.sampleRate}initEvents(){this.cursor.on("mouseMove",this.handleCursorMove),this.visualizer.on("layersUpdated",(()=>this.invoke("layersUpdated",[this.getLayers()])))}}const uj=["waveform"],hj=(0,y.PA)((({item:e})=>{var t;const n=(0,p.useRef)(),r=((e,t)=>{var n,r,o,i;const a=(0,p.useRef)(),{showLabels:s=!0}=t,[l,c]=(0,p.useState)(1),[d,u]=(0,p.useState)(null!=(n=null==t?void 0:t.volume)?n:1),[h,g]=(0,p.useState)(!1),[m,f]=(0,p.useState)(0),[v,y]=(0,p.useState)(0),[b,x]=(0,p.useState)(null!=(r=null==t?void 0:t.amp)?r:1),[w,C]=(0,p.useState)(null!=(o=null==t?void 0:t.rate)?o:1),[S,j]=(0,p.useState)(null!=(i=null==t?void 0:t.muted)&&i),[k,O]=(0,p.useState)([]),[R,E]=(0,p.useState)(new Map);return(0,p.useEffect)((()=>{const n=new dj(Object.assign({},null!=t?t:{},{container:e.current}));return(void 0===(null==t?void 0:t.autoLoad)||null!=t&&t.autoLoad)&&n.load(),n.on("load",(()=>{null==t||null==t.onLoad||t.onLoad(n)})),n.on("play",(()=>{g(!0)})),n.on("pause",(()=>{g(!1)})),n.on("error",(e=>{null==t||null==t.onError||t.onError(e)})),n.on("playing",(e=>{h&&!kS(e,v,m)&&(null==t||null==t.onSeek||t.onSeek(e)),y(e)})),n.on("seek",(e=>{kS(e,v,m)||(null==t||null==t.onSeek||t.onSeek(e),y(e))})),n.on("zoom",c),n.on("muted",j),n.on("durationChanged",f),n.on("volumeChanged",u),n.on("rateChanged",(e=>{null==t||null==t.onRateChange||t.onRateChange(e),C(e)})),n.on("layersUpdated",(e=>{const t=[],n=new Map;for(const r of e.values())t.push(r),n.set(r.name,r.isVisible);O(t),E(n)})),a.current=n,()=>{var e;null==(e=a.current)||e.destroy()}}),[]),(0,p.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.zoom=l)}),[l]),(0,p.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.volume=d)}),[d]),(0,p.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.rate=w)}),[w]),(0,p.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.amp=b)}),[b]),(0,p.useEffect)((()=>{null==t||null==t.onPlaying||t.onPlaying(h)}),[h]),(0,p.useEffect)((()=>{a.current&&(a.current.muted=S)}),[S]),(0,p.useEffect)((()=>{var e;null==(e=a.current)||e.updateLabelVisibility(s)}),[s]),{waveform:a,zoom:l,setZoom:c,volume:d,setVolume:u,playing:h,setPlaying:g,duration:m,currentTime:v,setCurrentTime:y,amp:b,setAmp:x,rate:w,setRate:C,muted:S,setMuted:j,layers:k,layerVisibility:R}})(n,{src:e._value,autoLoad:!1,waveColor:"#BEB9C5",gridColor:"#BEB9C5",gridWidth:1,backgroundColor:"#fafafa",autoCenter:!0,zoomToCursor:!0,height:e.height&&!isNaN(Number(e.height))?Number(e.height):96,waveHeight:e.waveheight&&!isNaN(Number(e.waveheight))?Number(e.waveheight):32,splitChannels:e.splitchannels,decoderType:e.decoder,playerType:e.player,volume:e.defaultvolume?Number(e.defaultvolume):1,amp:e.defaultscale?Number(e.defaultscale):1,zoom:e.defaultzoom?Number(e.defaultzoom):1,showLabels:e.annotationStore.store.settings.showLabels,rate:e.defaultspeed?Number(e.defaultspeed):1,muted:"true"===e.muted,onLoad:e.onLoad,onPlaying:e.onPlaying,onSeek:e.onSeek,onRateChange:e.onRateChange,onError:e.onError,regions:{createable:!e.readonly,updateable:!e.readonly,deleteable:!e.readonly},timeline:{backgroundColor:"#ffffff"},experimental:{backgroundCompute:!0,denoize:!0},autoPlayNewSegments:!0}),{waveform:o}=r,i=(0,Yn.A)(r,uj);return(0,p.useEffect)((()=>{var t,n,r,i,a,s;const l=yr("Audio","Audio Segmentation");null==(t=o.current)||t.load();return null==(n=o.current)||n.on("beforeRegionsDraw",(t=>{var n;const r=e.getRegionColor(),o=null==(n=e.activeState)?void 0:n.selectedValues();r&&o&&(t.regionDrawableTarget(),t.setDrawingColor(r),t.setLabels(o))})),null==(r=o.current)||r.on("afterRegionsDraw",(e=>{e.resetDrawableTarget(),e.resetDrawingColor(),e.resetLabels()})),null==(i=o.current)||i.on("regionSelected",((t,n)=>{const r=n.metaKey||n.ctrlKey;r&&(t.selected||t.isRegion)||e.annotation.regionStore.unselectAll();const o=e.regs.find((e=>e.id===t.id));o&&e.annotation.regionStore.toggleSelection(o,t.selected);const i=e._ws.regions.findRegion(t.id);i&&i.handleSelected(t.selected),r||e._ws.regions.regions.forEach((e=>{e.id!==t.id&&e.handleSelected(!1)}))})),null==(a=o.current)||a.on("regionCreated",(t=>{e.addRegion(t)})),null==(s=o.current)||s.on("regionUpdatedEnd",(t=>{e.updateRegion(t)})),l.addNamed("region:delete",(()=>{var e;null==(e=o.current)||e.regions.clearSegments(!1)})),l.addNamed("segment:delete",(()=>{var e;null==(e=o.current)||e.regions.clearSegments(!1)})),l.addNamed("region:delete-all",(()=>{var e;null==(e=o.current)||e.regions.clearSegments()})),()=>{l.unbindAll()}}),[]),(0,_.jsxs)(Ze.eB,{name:"audio-tag",children:[null==(t=e.errors)?void 0:t.map(((e,t)=>(0,_.jsx)(ke,{error:e},`err-${t}`))),(0,_.jsx)("div",{ref:e=>n.current=e}),(0,_.jsx)(AC,{position:i.currentTime,playing:i.playing,volume:i.volume,speed:i.rate,zoom:i.zoom,duration:i.duration,onPlay:()=>i.setPlaying(!0),onPause:()=>i.setPlaying(!1),allowFullscreen:!1,onVolumeChange:e=>i.setVolume(e),onStepBackward:()=>{var e,t;null==(e=o.current)||e.seekBackward(.1),null==(t=o.current)||t.syncCursor()},onStepForward:()=>{var e,t;null==(e=o.current)||e.seekForward(.1),null==(t=o.current)||t.syncCursor()},onPositionChange:e=>{var t,n;null==(t=o.current)||t.seek(e),null==(n=o.current)||n.syncCursor()},onSpeedChange:e=>i.setRate(e),onZoom:e=>i.setZoom(e),amp:i.amp,onAmpChange:e=>i.setAmp(e),mediaType:"audio",toggleVisibility:(e,t)=>{if(o.current){var n;const r=null==(n=o.current)?void 0:n.getLayer(e);r&&r.setVisibility(t)}},layerVisibility:i.layerVisibility})]})}));let gj=Er,mj=jn;(0,O.VS)(O.sg)&&(gj=sS),(0,O.VS)(O.vS)&&(gj=hj,mj=On),x.addTag("audio",mj,gj),x.addTag("audioplus",mj,gj),x.addObjectType(mj);var pj=n(78401);const fj=(0,y.PA)(class extends p.Component{render(){const{item:e}=this.props,t=(n=Math.ceil(e.stageWidth/e.gridsize),r=Math.ceil(e.stageHeight/e.gridsize),o=e.gridsize,[...Array(n)].map(((e,t)=>[...Array(r)].map(((e,n)=>({col:t,row:n,x:t*o,y:n*o,fill:"#fff"}))))).reduce(((e,t)=>[...e,...t])));var n,r,o;return(0,_.jsx)(pj.Wd,{opacity:.15,name:"ruler",children:Object.values(t).map(((t,n)=>(0,_.jsx)(pj.rw,{x:t.x,y:t.y,width:e.gridsize,height:e.gridsize,stroke:e.gridcolor,strokeWidth:1},n)))})}}),vj=(0,p.createContext)({expanded:!1}),yj=vj.Provider,bj=yr("SegmentationToolbar","Segmentation Tools"),xj={plus:"+",minus:"-"},wj=({active:e=!1,disabled:t=!1,smart:n=!1,extra:r=null,tool:o=null,controlsOnHover:i=!1,extraShortcuts:a={},ariaLabel:s,controls:l,icon:c,label:d,shortcut:u,onClick:h})=>{var g,m;let f=u;const v=null!=(g=null==o?void 0:o.dynamic)&&g,{expanded:y,alignment:b}=(0,p.useContext)(vj),[x,C]=(0,p.useState)(!1),S=(0,p.useMemo)((()=>{if(!(0,w.isDefined)(u))return null;const e=u.split(",").map((e=>e.trim()));return(0,_.jsx)(Ze.Sl,{name:"shortcut",children:e.map(((e,t)=>{const n=e.split("+");return(0,_.jsx)(p.Fragment,{children:n.map((e=>{var t;return(0,_.jsx)(Ze.Sl,{name:"key",tag:"kbd",children:null!=(t=xj[e])?t:e},e)}))},`${n.join("-")}-${t}`)}))})}),[u]);(0,p.useEffect)((()=>{const e=()=>{f&&bj.hasKey(f)&&bj.removeKey(f)};return e(),f=u,u&&!bj.hasKey(u)&&bj.addKey(u,(()=>{var e;null!=o&&o.disabled||null!=o&&null!=(e=o.annotation)&&e.isDrawing||(null!=o&&o.unselectRegionOnToolChange&&o.annotation.unselectAreas(),null==h||h())}),d),()=>{e()}}),[u,null==o?void 0:o.annotation]),(0,p.useEffect)((()=>(e&&Object.entries(a).forEach((([e,[t,n]])=>{bj.hasKey(e)||bj.overwriteKey(e,n,t)})),()=>{Object.keys(a).forEach((e=>{bj.hasKey(e)&&bj.removeKey(e)}))})),[a,e]);const j=(0,p.useMemo)((()=>n&&r?(0,_.jsx)(Ze.Sl,{name:"extra",children:r}):null),[n,r]),k=!1===v&&(null==l?void 0:l.length)&&(e||i&&x),O=null==o||null==(m=o.annotation)?void 0:m.isDrawing,R=t||O;return(0,_.jsxs)(Ze.eB,{name:"tool",tag:"button","aria-label":s,mod:{active:e,disabled:R,alignment:b,expanded:y&&!v,smart:v||n},onClick:e=>{if(!t&&!O){var n;if(e.preventDefault(),null!=o&&o.unselectRegionOnToolChange)null==o||null==(n=o.annotation)||null==n.unselectAreas||n.unselectAreas();null==h||h(e)}},onMouseEnter:()=>{C(!0)},onMouseLeave:()=>{C(!1)},children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:c}),!1===v&&!1===i&&(y?(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(Ze.Sl,{name:"label",children:[j,d,S]})}):((0,w.isDefined)(d)||(0,w.isDefined)(S))&&!k&&(0,_.jsx)(Ze.Sl,{name:"tooltip",mod:{controlled:!(!n||!r)},children:(0,_.jsxs)(Ze.Sl,{name:"tooltip-body",children:[j,d,S]})})),k&&(0,_.jsx)(Ze.Sl,{name:"controls",onClickCapture:e=>e.stopPropagation(),children:(0,_.jsx)(Ze.Sl,{name:"controls-body",children:l})})]})},Cj=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{ariaLabel:(0,m.toKebabCase)((0,h.Pw)(e).name),active:e.selected,icon:e.iconClass,label:e.viewTooltip,shortcut:e.shortcut,extraShortcuts:e.extraShortcuts,tool:e,onClick:()=>{e.manager.selectTool(e,!0)}}))),Sj=h.gK.model("BaseTool",{smart:!1,unselectRegionOnToolChange:!1,removeDuplicatesNamed:h.gK.maybeNull(h.gK.string)}).volatile((()=>({dynamic:!1,index:1,canInteractWithRegions:!0}))).views((e=>({get toolName(){return(0,h.Pw)(e).name},get isSeparated(){return e.control.isSeparated},get viewClass(){return()=>e.shouldRenderView?(0,_.jsx)(Cj,{item:e}):null},get viewTooltip(){return null},get controls(){return null},get shouldRenderView(){return(e.isSeparated||e.smartEnabled)&&e.iconClass},get iconClass(){if(e.iconComponent){const t=e.iconComponent;return(0,_.jsx)(t,{})}return null},get iconComponent(){return null},get smartEnabled(){var t,n;return null!=(t=null==(n=e.control)?void 0:n.smartEnabled)&&t}}))).actions((e=>({afterCreate(){var t;if(e.smart&&null!=(t=e.control)&&t.smart){const t=(0,h._$)(e),n=(0,h.Pw)(e),r=Object.assign({},(0,h.dV)(e),{smart:!1,default:!1}),o=Object.assign({},t),i=n.create(r,o);i.makeDynamic(),(0,h._$)(e).manager.addTool(`${n.name}-smart`,i,e.control.removeDuplicatesNamed)}},makeDynamic(){e.dynamic=!0}}))),jj={X:3,Y:3},kj={width:30,height:30},Oj={radius:30},Rj={length:30},Ej=Sj;const _j=n.p+"rotate.90d3fb3da9d2ac1e3ee9dd0b990c641c.svg";function Aj(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function Tj(e,t){return function(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),o=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign({},e,{rotation:e.rotation+t,x:r,y:o})}(e,t,Aj(e))}class Pj extends yt.A.Transformer{constructor(e){super(e),this.isMouseOver=!1,this.isMouseDown=!1,this.initialRotationDelta=0,this.origin=void 0,this.handleMouseDown=e=>{const t=this.getStage(),n=null==t?void 0:t.getPointerPosition();if(!t||!n)return;const r=this._getNodeRect(),o=Aj(r),i=n.x-o.x,a=n.y-o.y,s=Math.PI/2-Math.atan2(-a,i);t.content.style.cursor=`url(${_j}) 16 16, pointer`,this.isMouseDown=!0,this._movingAnchorName=e.target.name().split(" ")[0],this.initialRotationDelta=s-r.rotation,this.origin=o,window&&(window.addEventListener("mousemove",this.handleMouseMove),window.addEventListener("touchmove",this.handleMouseMove),window.addEventListener("mouseup",this.handleMouseUp,!0),window.addEventListener("touchend",this.handleMouseUp,!0)),this._fire("transformstart",{evt:e,target:this.getNode()}),this._nodes.forEach((t=>{t._fire("transformstart",{evt:e,target:t})}))},this.handleMouseUp=e=>{this.isMouseDown=!1,this.origin=void 0,this.isMouseOver||(this.getStage().content.style.cursor=""),window&&(window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("touchmove",this.handleMouseMove),window.removeEventListener("mouseup",this.handleMouseUp,!0),window.removeEventListener("touchend",this.handleMouseUp,!0));const t=this.getNode();this._fire("transformend",{evt:e,target:t}),t&&this._nodes.forEach((t=>{t._fire("transformend",{evt:e,target:t})})),this._movingAnchorName=""},this.handleMouseMove=e=>{const t=this.getStage();if(!this.isMouseDown||!this.origin||!t)return;t.setPointersPositions(e);const n=t.getPointerPosition(),r=this._getNodeRect();if(!n)return;const o=n.x-this.origin.x,i=n.y-this.origin.y,a=Math.PI/2-Math.atan2(-i,o)-this.initialRotationDelta,s=yt.A.getAngle(this.rotationSnapTolerance()),l=function(e,t,n){let r=t;for(let o=0;o{this.isMouseDown||(this.getStage().content.style.cursor=`url(${_j}) 16 16, pointer`),this.isMouseOver=!0})),n.on("mouseout",(()=>{this.isMouseOver=!1,this.isMouseDown||(this.getStage().content.style.cursor="")})),n.on("dragstart",(e=>{this.findOne(`.${this._movingAnchorName}`).stopDrag(),e.cancelBubble=!0})),n.on("dragend",(e=>{e.cancelBubble=!0}))}}refreshRotationList(){return{"top-left":{x:0,y:0},"top-right":{x:this.getWidth(),y:0},"bottom-left":{x:0,y:this.getHeight()},"bottom-right":{x:this.getWidth(),y:this.getHeight()}}}get _outerBack(){var e;return null==(e=this.getStage())?void 0:e.findOne(this.attrs.backSelector)}setNodes(e=[]){return super.setNodes(e),this._outerBack&&this._proxyDrag(this._outerBack),this}detach(){var e;null==(e=this._outerBack)||e.off(".tr-konva"),super.detach()}update(){this.refreshRotationList();const{x:e,y:t,width:n,height:r}=this._getNodeRect(),o=this.rotation(),i=this._outerBack,a=this.refreshRotationList();for(const e in a){const t=this.findOne(`.rotate-${e}`);t&&t.setAttrs({x:a[e].x,y:a[e].y}).getLayer().batchDraw()}if(super.update(),i){const a=this.getAbsoluteScale(),s=i.getAbsoluteScale(),l={x:a.x/s.x,y:a.y/s.y};i.setAttrs({x:(e-this.getStage().getAttr("x"))*l.x,y:(t-this.getStage().getAttr("y"))*l.y,width:n*l.x,height:r*l.y,rotation:o}).getLayer().batchDraw()}}}yt.A.LSTransformer=Pj;class Ij extends yt.A.Transformer{get _outerBack(){var e;return null==(e=this.getStage())?void 0:e.findOne(this.attrs.backSelector)}setNodes(e=[]){return super.setNodes(e),this._outerBack&&this._proxyDrag(this._outerBack),this}detach(){var e;null==(e=this._outerBack)||e.off(".tr-konva"),super.detach()}update(){const{x:e,y:t,width:n,height:r}=this._getNodeRect(),o=this.rotation(),i=this._outerBack;if(super.update(),i){const a=this.getAbsoluteScale(),s=i.getAbsoluteScale(),l={x:a.x/s.x,y:a.y/s.y};i.setAttrs({x:(e-this.getStage().getAttr("x"))*l.x,y:(t-this.getStage().getAttr("y"))*l.y,width:n*l.x,height:r*l.y,rotation:o}).getLayer().batchDraw()}}}yt.A.LSTransformerOld=Ij;class Lj extends p.Component{constructor(...e){super(...e),this.checkNode=()=>{if(!this.transformer)return;const e=this.transformer.getStage(),{item:{selectedRegions:t}}=this.props;if(null==t||!t.length)return this.transformer.detach(),void this.transformer.getLayer().batchDraw();if(t.find((e=>!e.supportsTransform)))return;const n=[];t.forEach((t=>{const r=e.findOne((e=>e.hasName(t.id)&&e.parent));if(!r)return;if(r.hasName("_transformable")&&n.push(r),!r.find)return;const o=r.find((e=>e.hasName("_transformable")),!0);n.push(...o)}));const r=this.transformer.nodes();(null==n?void 0:n.length)===(null==r?void 0:r.length)&&!n.find(((e,t)=>e!==r[t]))||(n.length?this.transformer.nodes(n):this.transformer.nodes([]),this.transformer.getLayer().batchDraw())},this.constrainSizes=(e,t)=>{const n=void 0!==t.rotation?t.rotation:e.rotation,r=n!==e.rotation,o=this.getStageAbsoluteDimensions();if(t.widthMath.abs(c[e]-l[e])>.001))?e:t}return this.fitBBoxToScaledStage(t,o)},this.dragBoundFunc=e=>{const{item:t}=this.props;return t.fixForZoomWrapper(e,(e=>{if(!this.transformer||!t)return;let{x:n,y:r}=e;const{width:o,height:i}=this.draggingAreaBBox,{stageHeight:a,stageWidth:s}=t;return n<0&&(n=0),r<0&&(r=0),n+o>s&&(n=s-o),r+i>a&&(r=a-i),{x:n,y:r}}))}}componentDidMount(){setTimeout(this.checkNode)}componentDidUpdate(){setTimeout(this.checkNode)}get freezeKey(){return`ImageTransformer_${this.props.item.id}`}freeze(){const{item:e}=this.props,{freezeKey:t}=this;e.annotation.history.freeze(t)}unfreeze(){const{item:e}=this.props,{freezeKey:t}=this;e.annotation.history.unfreeze(t)}fitBBoxToScaledStage(e,t){let{x:n,y:r,width:o,height:i}=e;const[a,s]=[e.x-t.x,e.y-t.y];return a<0?(n=(0,O.VS)(O.pG)?t.x:0,o+=a):a+e.width>t.width&&(o=t.width-a),s<0?(r=(0,O.VS)(O.pG)?t.y:0,i+=s):s+e.height>t.height&&(i=t.height-s),Object.assign({},e,{x:n,y:r,width:o,height:i})}getStageAbsoluteDimensions(){const e=this.transformer.getStage(),{stageWidth:t,stageHeight:n}=this.props.item;let[r,o]=[t*e.scaleX(),n*e.scaleY()];(0,O.VS)(O.pG)&&this.props.item.isSideways&&([r,o]=[o,r]);const[i,a]=[e.x(),e.y()];return{width:r,height:o,x:i,y:a}}renderLSTransformer(){return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)("LSTransformer",{ref:e=>{this.transformer=e,this.transformer&&this.transformer.rotateEnabled(!1)},resizeEnabled:!0,ignoreStroke:!0,keepRatio:!0!==this.props.singleNodeMode,useSingleNodeRotation:this.props.useSingleNodeRotation,rotateEnabled:this.props.rotateEnabled,borderDash:[3,1],boundBoxFunc:this.constrainSizes,anchorSize:8,flipEnabled:!1,zoomedIn:this.props.item.zoomScale>1,onDragStart:e=>{const{item:{selectedRegionsBBox:t}}=this.props;this.freeze(),this.transformer&&e.target===e.currentTarget&&t&&(this.draggingAreaBBox={x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top})},dragBoundFunc:this.dragBoundFunc,onDragEnd:()=>{this.unfreeze(),setTimeout(this.checkNode)},onTransformEnd:()=>{setTimeout(this.checkNode)},backSelector:this.props.draggableBackgroundSelector})})}renderOldLSTransformer(){return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)("LSTransformerOld",{ref:e=>{this.transformer=e},resizeEnabled:!0,ignoreStroke:!0,keepRatio:!0!==this.props.singleNodeMode,useSingleNodeRotation:this.props.useSingleNodeRotation,rotateEnabled:this.props.rotateEnabled,borderDash:[3,1],boundBoxFunc:this.constrainSizes,anchorSize:8,flipEnabled:!1,zoomedIn:this.props.item.zoomScale>1,onDragStart:e=>{const{item:{selectedRegionsBBox:t}}=this.props;this.freeze(),this.transformer&&e.target===e.currentTarget&&t&&(this.draggingAreaBBox={x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top})},dragBoundFunc:this.dragBoundFunc,onDragEnd:()=>{this.unfreeze(),setTimeout(this.checkNode)},onTransformEnd:()=>{setTimeout(this.checkNode)},backSelector:this.props.draggableBackgroundSelector})})}render(){return this.props.supportsTransform?(0,O.VS)(O.id)?this.renderLSTransformer():this.renderOldLSTransformer():null}}const Mj={block:"block--h6e1z",divider:"divider--ucpOT",button:"button--Pugmq",wrapperComponent:"wrapperComponent--lGC5u",wrapper:"wrapper--HIxIc",loading:"loading--NbjdV","image-element":"image-element--YwHyO",image_position:"image_position--Wpu4V",image_position__top:"image_position__top--RQG6L",image_position__middle:"image_position__middle--Emb4G",image_position__center:"image_position__center--sjYuo",image_position__bottom:"image_position__bottom--Yhn9p",image_position__left:"image_position__left--zPURN",image_position__right:"image_position__right--F6wzt",container:"container--_mzc9",frame:"frame--nbBeT",frame_height:"frame_height--CVer_",filler:"filler--R3muM",overlay:"overlay--Ppw7x",withGallery:"withGallery--xrArp",withPagination:"withPagination--AmhTt",gallery:"gallery--IxYdb",active:"active--RZ3Re",pagination:"pagination--_qwcS"},Kj={required:(e,t)=>({modelName:e,field:t,error:"ERR_REQUIRED"}),unknownTag:(e,t,n)=>({modelName:e,field:t,value:n,error:"ERR_UNKNOWN_TAG"}),tagNotFound:(e,t,n)=>({modelName:e,field:t,value:n,error:"ERR_TAG_NOT_FOUND"}),tagUnsupported:(e,t,n,r)=>({modelName:e,field:t,value:n,validType:r,error:"ERR_TAG_UNSUPPORTED"}),parentTagUnexpected:(e,t,n,r)=>({modelName:e,field:t,value:n,validType:r,error:"ERR_PARENT_TAG_UNEXPECTED"}),badAttributeValueType:(e,t,n,r)=>({modelName:e,field:t,value:n,validType:r,error:"ERR_BAD_TYPE"}),internalError:e=>({error:"ERR_INTERNAL",value:String(e).substr(0,1e3),field:String(e.code),modelName:""}),generalError:e=>({error:"ERR_GENERAL",value:String(e).substr(0,1e3),field:String(e.code),modelName:""}),loadingError:(e,t,n,r=Ge.A.ERR_LOADING_HTTP)=>(console.log("ERR",e,e.code),{error:"ERR_GENERAL",value:r({attr:n,error:String(e),url:t}),field:n,modelName:""})},Dj=(e,t=null,n=["view"],r)=>{if(!e.children)return[];const o="pagedview"===e.type?e.children.slice(0,1):e.children;for(const e of o){var i;const o=[...n,...null!=t&&t.type?[null==t?void 0:t.type]:[]],a=Object.assign({},e,{parent:null!=(i=null==t?void 0:t.id)?i:null,parentTypes:o});delete a.children,r.push(a),Array.isArray(e.children)&&Dj(e,e,o,r)}return r},Nj=(e,t)=>{const{name:n}=t.properties;return n&&!n.optionalValues&&void 0===e.name?Kj.required(t.name,"name"):null},Vj=(e,t,n)=>{const{controlledTags:r}=t.properties;if(!e.toname)return null;const o=e.toname.split(",");for(const e of o){const o=n.find((t=>t.name===e));if(void 0===o)return Kj.tagNotFound(t.name,"toname",e);if(r&&r.validate(o.tagName).length)return Kj.tagUnsupported(t.name,"toname",o.tagName,r)}return null},zj=(e,t)=>{var n;const r=null==(n=t.properties.parentTypes)?void 0:n.value;return!r||e.parentTypes.find((e=>r.find((t=>e===t.toLowerCase()))))?null:Kj.parentTagUnexpected(t.name,"parent",e.tagName,t.properties.parentTypes)},Bj=(e,t,n)=>{const r=[],o=Object.keys(t.properties);for(const i of o){if(!{}.hasOwnProperty.call(e,i))continue;if(n.includes(i))continue;const o=e[i],a=t.properties[i.toLowerCase()];0!==a.validate(o,a).length&&r.push(Kj.badAttributeValueType(t.name,i,o,a))}return r},Hj=e=>{const t=[];return e.perregion&&e.peritem&&t.push(Kj.generalError("Attribute perItem is incompatible with attribute perRegion. They define two different modes. However perRegion works fine even with multi-item mode of object tags.")),t};var Fj=n(41984);const Wj=(0,y.WQ)("store")((0,y.PA)((({store:e,tools:t,expanded:n})=>{const[r,o]=(0,p.useState)(null),i=(()=>{const[e,t]=(0,p.useState)({width:window.innerWidth,height:window.innerWidth});return(0,p.useEffect)((()=>{const e=()=>{t({width:window.innerWidth,height:window.innerWidth})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e})(),a=(0,p.useMemo)((()=>{if(!(0,w.isDefined)(r))return"right";const e=r.getBoundingClientRect();return e.left<200?"right":i.width-e.right<200?"left":"right"}),[r,i]),s=t.filter((e=>!e.dynamic)).reduce(((e,t)=>{var n;const r=null!=(n=e[t.group])?n:[];return r.push(t),e[t.group]=r,e}),{}),l=t.filter((e=>e.dynamic));return(0,_.jsx)(yj,{value:{expanded:n,alignment:a},children:(0,_.jsxs)(Ze.eB,{ref:e=>o(e),name:"toolbar",mod:{alignment:a,expanded:n},children:[Object.entries(s).map((([e,t],n)=>{const r=t.filter((e=>e.viewClass));return r.length?(0,_.jsx)(Ze.Sl,{name:"group",children:r.sort(((e,t)=>e.index-t.index)).map(((e,t)=>{const n=e.viewClass;return(0,_.jsx)(n,{},`${e.toolName}-${t}`)}))},`toolset-${e}-${n}`):null})),e.autoAnnotation&&(0,_.jsx)($j,{tools:l})]})})}))),$j=(0,y.PA)((({tools:e})=>{const[t,n]=(0,p.useState)(Math.max(e.findIndex((e=>e.selected)),0)),r=(0,p.useMemo)((()=>e[t]),[t]),o=e.some((e=>e.selected));return e.length>0&&(0,_.jsx)(Ze.Sl,{name:"group",children:(0,_.jsx)(wj,{smart:!0,label:"Auto-Detect",active:o,icon:r.iconClass,shortcut:"M",extra:e.length>1?(0,_.jsx)(Ze.Sl,{name:"smart",children:e.map(((e,t)=>{const r=e.viewClass;return(0,_.jsx)("div",{onClickCapture:r=>{r.preventDefault(),n(t),e.manager.selectTool(e,!0)},children:(0,_.jsx)(r,{})},`${t}`)}))}):null,controls:r.controls,onClick:()=>{let r=t+1;o?r>=e.length&&(r=0):r=0;const i=e[r];n(r),i.manager.selectTool(i,!0)}})})})),Uj=(0,p.createContext)({suggestion:!1}),Zj=Uj.Provider;var Gj=n(21015);const Yj=(0,p.forwardRef)((({size:e="medium",pageSizeOptions:t=[1,25,50,100],currentPage:n,pageSize:r,totalPages:o,outline:i=!0,align:a="right",noPadding:s=!1,pageSizeSelectable:l=!0,hotkey:c,onChange:d},u)=>{const[h,g]=(0,p.useState)(!1);return(0,_.jsxs)(Ze.eB,{name:"pagination",mod:{size:e,outline:i,align:a,noPadding:s},children:[(0,_.jsxs)(Ze.Sl,{name:"navigation",children:[(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Xj,{mod:["arrow-left","arrow-left-double"],onClick:()=>null==d?void 0:d(1),disabled:1===n}),(0,_.jsx)(Ze.Sl,{name:"divider"})]}),(0,_.jsx)(Xj,{mod:["arrow-left"],onClick:()=>null==d?void 0:d(n-1),hotkey:null==c?void 0:c.prev,disabled:1===n}),(0,_.jsx)(Ze.Sl,{name:"input",children:h?(0,_.jsx)("input",{type:"text",autoFocus:!0,defaultValue:n,pattern:"[0-9]",onKeyDown:e=>{const t=Number.parseFloat(e.currentTarget.value);"Escape"===e.code?g(!1):"Enter"===e.code?(t<=o&&t>=1&&(null==d||d(t)),g(!1)):null!==e.code.match(/[0-9]/)||(e=>null!==e.code.match(/arrow/i)||e.shiftKey&&null!==e.code.match(/arrow/i)||e.metaKey||e.ctrlKey||"Backspace"===e.code)(e)||(e.preventDefault(),e.stopPropagation())},onBlur:e=>{const t=Number.parseFloat(e.currentTarget.value);t<=o&&t>=1&&(null==d||d(t)),g(!1)}}):(0,_.jsxs)(Ze.Sl,{name:"page-indicator",onClick:()=>{g(!0)},children:[n," ",(0,_.jsxs)("span",{children:["of ",o]}),(0,_.jsx)("div",{onClick:()=>{}})]})}),(0,_.jsx)(Xj,{mod:["arrow-right"],onClick:()=>null==d?void 0:d(n+1),disabled:n===o,hotkey:null==c?void 0:c.next}),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"divider"}),(0,_.jsx)(Xj,{mod:["arrow-right","arrow-right-double"],onClick:()=>null==d?void 0:d(o),disabled:n===o})]})]}),l&&(0,_.jsx)(Ze.Sl,{name:"page-size",children:(0,_.jsx)("select",{value:r,onChange:e=>{null==d||d(1,e.currentTarget.value)},children:t.map(((e,t)=>(0,_.jsxs)("option",{value:e,children:[e," per page"]},t)))})})]})})),Xj=({mod:e,disabled:t,hotkey:n,onClick:r})=>{const o=Object.fromEntries(e.map((e=>[e,!0]))),i=(0,p.useCallback)((()=>{t||r()}),[t,r]);return o.disabled=!0===t,Na(n,i),n?(0,_.jsx)(yr.Tooltip,{name:n,children:(0,_.jsx)(Ze.Sl,{name:"btn",mod:o,onClick:i})}):(0,_.jsx)(Ze.Sl,{name:"btn",mod:o,onClick:i})},qj=["item"];yt.A.showWarnings=!1;const Jj=yr("Image"),Qj={};(0,O.VS)(O.xS)&&(Qj.crossOrigin="anonymous");const ek=e=>{const t=[],n=[],r=e.length;let o=0;for(;o(0,O.VS)(O.Kg)?(0,Gj.q3)((()=>D.renderItem(e,e.annotation,!0))):(0,Gj.q3)((()=>e.inSelection!==t?null:D.renderItem(e,e.annotation,!1))))),nk=(0,p.memo)((({regions:e,name:t,useLayers:n,showSelected:r=!1})=>{const o=e.map((e=>(0,_.jsx)(tk,{region:e,showSelected:r},`region-${e.id}`)));return!1===n?o:(0,_.jsx)(pj.Wd,{name:t,children:o})})),rk=(0,p.memo)((({regions:e,useLayers:t=!0,chunkSize:n=15,suggestion:r=!1,showSelected:o=!1})=>(0,_.jsx)(Zj,{value:{suggestion:r},children:(n?(0,w.chunks)(e,n):e).map(((e,n)=>(0,_.jsx)(nk,{name:`chunk-${n}`,regions:e,useLayers:t,showSelected:o},`chunk-${n}`)))}))),ok=(0,y.PA)((({item:e})=>{const{drawingRegion:t}=e;if(!t)return null;if(e.multiImage&&e.currentImage!==t.item_index)return null;const n=t&&"brushregion"===t.type?p.Fragment:pj.Wd;return(0,_.jsx)(n,{children:t?(0,_.jsx)(tk,{region:t},"drawing"):t})})),ik="#40A9FF",ak="white",sk=[3,3],lk=(0,y.PA)((({item:e,selectionArea:t})=>{const{selectionBorders:n}=t;(0,O.VS)(O.MV)||(n.left=n.left*e.stageScale,n.right=n.right*e.stageScale,n.top=n.top*e.stageScale,n.bottom=n.bottom*e.stageScale);const r=n?[{x:n.left,y:n.top},{x:n.right,y:n.top},{x:n.left,y:n.bottom},{x:n.right,y:n.bottom}]:[],o=(0,O.VS)(O.MV)?6/e.stageScale:6;return(0,_.jsxs)(_.Fragment,{children:[n&&(0,_.jsx)(pj.rw,{name:"regions_selection",x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top,stroke:ik,strokeWidth:1,strokeScaleEnabled:!1,listening:!1}),r.map(((e,t)=>(0,_.jsx)(pj.rw,{x:e.x-o/2,y:e.y-o/2,width:o,height:o,fill:ik,stroke:ak,strokeWidth:2,strokeScaleEnabled:!1,listening:!1},t)))]})})),ck=(0,y.PA)((({item:e})=>{const{x:t,y:n,width:r,height:o}=e.onCanvasRect,i={x:t,y:n,width:r,height:o,listening:!1,strokeWidth:1};return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(pj.rw,Object.assign({},i,{stroke:ik,dash:sk,strokeScaleEnabled:!1})),(0,_.jsx)(pj.rw,Object.assign({},i,{stroke:ak,dash:sk,dashOffset:sk[0],strokeScaleEnabled:!1}))]})})),dk="transformer_back",uk=(0,y.PA)((({item:e})=>{const{selectedRegionsBBox:t}=e,n=1===e.selectedRegions.length,r=(0,p.useRef)({x:0,y:0});return(0,_.jsx)(pj.Wd,{children:t&&!n&&(0,_.jsx)(pj.rw,{id:dk,fill:"rgba(0,0,0,0)",draggable:!0,onClick:()=>{e.annotation.unselectAreas()},onMouseOver:t=>{e.annotation.isLinkingMode||(t.target.getStage().container().style.cursor=V.A.POINTER_CURSOR)},onMouseOut:e=>{e.target.getStage().container().style.cursor=V.A.DEFAULT_CURSOR},onDragStart:t=>{r.current={x:e.canvasToInternalX(t.target.getAttr("x")),y:e.canvasToInternalY(t.target.getAttr("y"))}},dragBoundFunc:t=>{let{x:n,y:o}=t;const{top:i,left:a,right:s,bottom:l}=e.selectedRegionsBBox,{stageHeight:c,stageWidth:d}=e,u=r.current.x-a,h=r.current.y-i;n-=u,o-=h;const g={x:n,y:o,width:s-a,height:l-i},m=St(g,d,c);return m.width!==g.width&&(n+=(m.width-g.width)*(m.x!==g.x?-1:1)),m.height!==g.height&&(o+=(m.height-g.height)*(m.y!==g.y?-1:1)),n+=u,o+=h,{x:n,y:o}}})})})),hk=(0,y.PA)((({item:e,selectedRegions:t})=>{if(!t)return null;const{brushRegions:n=[],shapeRegions:r=[]}=ek(t);return(0,_.jsxs)(_.Fragment,{children:[(0,O.VS)(O.q$)?null:(0,_.jsx)(uk,{item:e}),n.length>0&&(0,_.jsx)(rk,{name:"brushes",regions:n,useLayers:!1,showSelected:!0,chankSize:0},"brushes"),r.length>0&&(0,_.jsx)(rk,{name:"shapes",regions:r,showSelected:!0,chankSize:0},"shapes")]})})),gk=(0,y.PA)((({item:e,selectionArea:t})=>{var n,r,o,i;const a=(0,O.VS)(O.MV)?1:1/(e.zoomScale||1),[s,l]=(0,p.useState)(!1),[c,d]=(0,p.useState)(!1),u="ZoomPanTool"===(null==(n=e.getToolsManager().findSelectedTool())?void 0:n.fullName),h=e=>l(4===e.buttons),g=e=>d(e.shiftKey);(0,p.useEffect)((()=>(window.addEventListener("keydown",g),window.addEventListener("keyup",g),window.addEventListener("mousedown",h),window.addEventListener("mouseup",h),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",g),window.removeEventListener("mousedown",h),window.removeEventListener("mouseup",h)})),[]);const m=e.zoomScale>1&&(c||u||s);let f=!0,v=!0,y=!0;return null==(r=e.selectedRegions)||r.forEach((e=>{f=f&&!0===e.supportsTransform,v=v&&!0===e.canRotate,y=y&&!0})),f=f&&(e.selectedRegions.length>1||(e.useTransformer||(null==(o=e.selectedShape)?void 0:o.preferTransformer))&&(null==(i=e.selectedShape)?void 0:i.useTransformer)),(0,_.jsxs)(pj.Wd,{scaleX:a,scaleY:a,children:[t.isActive?(0,_.jsx)(ck,{item:t}):!f&&e.selectedRegions.length>1?(0,_.jsx)(lk,{item:e,selectionArea:t}):null,(0,_.jsx)(Lj,{item:e,rotateEnabled:v,supportsTransform:!m&&f,supportsScale:y,selectedShapes:e.selectedRegions,singleNodeMode:1===e.selectedRegions.length,useSingleNodeRotation:1===e.selectedRegions.length&&v,draggableBackgroundSelector:`#${dk}`})]})})),mk=(0,y.PA)((e=>{let{item:t}=e,n=(0,Yn.A)(e,qj);const{selectionArea:r}=t;return(0,_.jsxs)(_.Fragment,{children:[(0,O.VS)(O.Kg)?(0,_.jsx)(pj.Wd,{name:"selection-regions-layer"}):(0,_.jsx)(hk,Object.assign({item:t,selectedRegions:t.selectedRegions},n)),(0,_.jsx)(gk,{item:t,selectionArea:r})]})})),pk=(0,p.memo)((0,p.forwardRef)((({width:e,height:t},n)=>{const[r,o]=(0,p.useState)([50,0,50,t]),[i,a]=(0,p.useState)([0,100,e,100]),[s,l]=(0,p.useState)(100),[c,d]=(0,p.useState)(50),[u,h]=(0,p.useState)(!1),g=[3,3],m=!1;return n&&(n.current={updatePointer(n,r){n!==s&&(l(n),o([n,0,n,t])),r!==c&&(d(r),a([0,r,e,r]))},updateVisibility(e){h(e)}}),(0,_.jsxs)(pj.Wd,{name:"crosshair",listening:!1,opacity:u?.6:0,children:[(0,_.jsxs)(pj.YJ,{children:[(0,_.jsx)(pj.N1,{name:"v-white",points:i,stroke:"#fff",strokeWidth:1,strokeScaleEnabled:m}),(0,_.jsx)(pj.N1,{name:"v-black",points:i,stroke:"#000",strokeWidth:1,dash:g,strokeScaleEnabled:m})]}),(0,_.jsxs)(pj.YJ,{children:[(0,_.jsx)(pj.N1,{name:"h-white",points:r,stroke:"#fff",strokeWidth:1,strokeScaleEnabled:m}),(0,_.jsx)(pj.N1,{name:"h-black",points:r,stroke:"#000",strokeWidth:1,dash:g,strokeScaleEnabled:m})]})]})}))),fk=(0,y.PA)((({item:e})=>(0,O.VS)(O.bP)?(0,_.jsx)("canvas",{className:Mj.overlay,ref:t=>{e.setOverlayRef(t)},style:e.imageTransform}):null)),vk=(0,y.PA)(class extends p.Component{constructor(e){super(e),this.canvasX=void 0,this.canvasY=void 0,this.lastOffsetWidth=-1,this.lastOffsetHeight=-1,this.state={imgStyle:{},pointer:[0,0]},this.imageRef=(0,p.createRef)(),this.crosshairRef=(0,p.createRef)(),this.handleDeferredMouseDown=null,this.deferredClickTimeout=[],this.skipNextMouseDown=!1,this.skipNextClick=!1,this.skipNextMouseUp=!1,this.mouseDownPoint=null,this.handleOnClick=e=>{const{item:t}=this.props;var n;(0,O.VS)(O.x0)&&(null==(n=this.handleDeferredMouseDown)||n.call(this,!0));if(this.skipNextClick)return void(this.skipNextClick=!1);const r=e.evt||e,{offsetX:o,offsetY:i}=r;if(!(0,O.VS)(O.q$)||!(!this.mouseDownPoint||Math.abs(this.mouseDownPoint.x-o)>.01||Math.abs(this.mouseDownPoint.y-i)>.01))return t.event("click",r,o,i);this.mouseDownPoint=null},this.resetDeferredClickTimeout=()=>{this.deferredClickTimeout.length>0&&(this.deferredClickTimeout=this.deferredClickTimeout.filter((e=>(clearTimeout(e),!1))))},this.handleDeferredClick=(e,t,n=!1)=>{this.handleDeferredMouseDown=r=>{r&&n&&t(),e(),this.handleDeferredMouseDown=null},this.resetDeferredClickTimeout(),this.deferredClickTimeout.push(setTimeout((()=>{var e;null==(e=this.handleDeferredMouseDown)||e.call(this,!1)}),this.props.item.annotation.isDrawing?0:100))},this.handleMouseDown=e=>{var t,n;const{item:r}=this.props,o="ZoomPanTool"===(null==(t=r.getToolsManager().findSelectedTool())?void 0:t.fullName),i="MoveTool"===(null==(n=r.getToolsManager().findSelectedTool())?void 0:n.fullName);this.skipNextMouseDown=this.skipNextMouseUp=this.skipNextClick=!1,(0,O.VS)(O.q$)&&(this.mouseDownPoint={x:e.evt.offsetX,y:e.evt.offsetY}),r.updateSkipInteractions(e);const a=e.target.getParent();if(r.annotation.isReadOnly()&&!o)return;if(a&&"Transformer"===a.className)return;const s=()=>{1===e.evt.button&&e.evt.preventDefault();if(r.getSkipInteractions()||e.target===r.stageRef||(0,w.findClosestParent)(e.target,(e=>{if("Group"===e.nodeType){var t,n;if("ruler"===(null==e||null==(t=e.attrs)?void 0:t.name))return!0;if(!((0,O.VS)(O.Kg)&&i||"segmentation"!==(null==e||null==(n=e.attrs)?void 0:n.name)))return!0}return!1}))){window.addEventListener("mousemove",this.handleGlobalMouseMove),window.addEventListener("mouseup",this.handleGlobalMouseUp);const{offsetX:t,offsetY:n}=e.evt,{left:o,top:i}=r.containerRef.getBoundingClientRect();return this.canvasX=o,this.canvasY=i,this.skipNextMouseDown?(this.skipNextMouseDown=!1,!0):(r.event("mousedown",e,t,n),!0)}},l=r.getToolsManager().findSelectedTool(),c=[void 0,"EllipseTool","EllipseTool-dynamic","RectangleTool","RectangleTool-dynamic","PolygonTool","PolygonTool-dynamic","Rectangle3PointTool","Rectangle3PointTool-dynamic"].includes(null==l?void 0:l.fullName);if((0,O.VS)(O.x0)&&c){const t=e.target===r.stageRef,n=r.annotation.selectedRegions.length>0,o=t&&n,i=()=>{r.annotation.unselectAll(),this.skipNextMouseDown=!0,this.skipNextMouseUp=!0,this.skipNextClick=!0};return void this.handleDeferredClick(s,i,o)}const d=s();return d||!0},this.handleGlobalMouseUp=e=>{if(window.removeEventListener("mousemove",this.handleGlobalMouseMove),window.removeEventListener("mouseup",this.handleGlobalMouseUp),e.target&&"CANVAS"===e.target.tagName)return;const{item:t}=this.props,{clientX:n,clientY:r}=e;return t.freezeHistory(),this.triggerMouseUp(e,n-this.canvasX,r-this.canvasY)},this.handleGlobalMouseMove=e=>{if(e.target&&"CANVAS"===e.target.tagName)return;const{item:t}=this.props,{clientX:n,clientY:r}=e;return t.event("mousemove",e,n-this.canvasX,r-this.canvasY)},this.handleMouseUp=e=>{const{item:t}=this.props;return(0,O.VS)(O.x0)&&this.resetDeferredClickTimeout(),t.freezeHistory(),this.triggerMouseUp(e,e.evt.offsetX,e.evt.offsetY)},this.triggerMouseUp=(e,t,n)=>{if(this.skipNextMouseUp)return void(this.skipNextMouseUp=!1);const{item:r}=this.props;return r.event("mouseup",e,t,n)},this.handleMouseMove=e=>{const{item:t}=this.props;t.freezeHistory(),this.updateCrosshair(e);const n=e.evt&&4===e.evt.buttons,r=e.evt&&1===e.evt.buttons,o=r&&e.evt.shiftKey;var i;(0,O.VS)(O.x0)&&r&&(this.resetDeferredClickTimeout(),null==(i=this.handleDeferredMouseDown)||i.call(this,!1));if((n||o)&&t.zoomScale>1){t.setSkipInteractions(!0),e.evt.preventDefault();const n={x:t.zoomingPositionX+e.evt.movementX,y:t.zoomingPositionY+e.evt.movementY};t.setZoomPosition(n.x,n.y)}else t.event("mousemove",e,e.evt.offsetX,e.evt.offsetY)},this.updateCrosshair=e=>{if(this.crosshairRef.current){const{x:t,y:n}=e.currentTarget.getPointerPosition();this.crosshairRef.current.updatePointer(...this.props.item.fixZoomedCoords([t,n]))}},this.handleError=()=>{const{item:e,store:t}=this.props,n=t.annotationStore,r=(0,h._$)(t).messages.ERR_LOADING_HTTP({attr:e.value,error:"",url:e.currentSrc});n.addErrors([Kj.generalError(r)])},this.updateGridSize=e=>{const{item:t}=this.props;t.freezeHistory(),t.setGridSize(e)},this.handleZoom=e=>{if((!e.evt||e.evt.ctrlKey)&&(e.evt&&e.evt.ctrlKey&&e.evt.preventDefault(),e.evt)){const{item:t}=this.props,n=t.stageRef;t.handleZoom(e.evt.deltaY,n.getPointerPosition())}},this.onResize=Y((()=>{requestAnimationFrame((()=>{var e;if(null==this||null==(e=this.props)||null==(e=e.item)||!e.containerRef)return;const{offsetWidth:t,offsetHeight:n}=this.props.item.containerRef;this.props.item.naturalWidth<=1||this.lastOffsetWidth===t&&this.lastOffsetHeight===n||(this.props.item.onResize(t,n,!0),this.lastOffsetWidth=t,this.lastOffsetHeight=n)}))}),16),this.attachObserver=e=>{this.resizeObserver&&this.detachObserver(),e&&(this.resizeObserver=new G(this.onResize),this.resizeObserver.observe(e))},this.detachObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},"boolean"==typeof e.item.smoothing&&e.store.settings.setSmoothing(e.item.smoothing)}renderRulers(){const{item:e}=this.props,t="white";return(0,_.jsxs)(pj.YJ,{name:"ruler",onClick:e=>{e.cancelBubble=!1},children:[(0,_.jsx)(pj.N1,{x:0,y:e.cursorPositionY,points:[0,0,e.stageWidth,0],strokeWidth:1,stroke:t,tension:0,dash:[4,4],closed:!0}),(0,_.jsx)(pj.N1,{x:e.cursorPositionX,y:0,points:[0,0,0,e.stageHeight],strokeWidth:1,stroke:t,tension:0,dash:[1.5],closed:!0})]})}componentDidMount(){const{item:e}=this.props;window.addEventListener("resize",this.onResize),this.attachObserver(e.containerRef),this.updateReadyStatus(),Jj.addDescription("shift","Pan image")}componentWillUnmount(){this.detachObserver(),window.removeEventListener("resize",this.onResize),Jj.removeDescription("shift")}componentDidUpdate(){this.onResize(),this.updateReadyStatus()}updateReadyStatus(){const{item:e}=this.props,{imageRef:t}=this;e&&(0,h._n)(e)&&t.current&&e.isReady!==t.current.complete&&e.setReady(t.current.complete)}renderTools(){const{item:e,store:t}=this.props;if(t.annotationStore.viewingAll)return null;const n=e.getToolsManager().allTools();return(0,_.jsx)(Wj,{tools:n})}render(){const{item:e,store:t}=this.props;if(!(0,h._n)(e))return null;if(!t.task||!e.currentSrc)return null;const n={},r=Mj.container,o=!!e.isMultiItem;!1===(0,h.Zn)(e).settings.fullscreen&&(n.maxWidth=e.maxwidth,n.maxHeight=e.maxheight,n.width=e.width,n.height=e.height),!t.settings.enableSmoothing&&e.zoomScale>1&&(n.imageRendering="pixelated");const i=[Mj.image_position,Mj[`image_position__${"center"===e.verticalalignment?"middle":e.verticalalignment}`],Mj[`image_position__${e.horizontalalignment}`]],a=[Mj.wrapperComponent,e.images.length>1?Mj.withGallery:Mj.wrapper];o&&a.push(Mj.withPagination);const[s,l]=(0,O.VS)(O.F2)?[!0,!1]:[e.hasTools,e.stageWidth<=1],c=e.imageIsLoaded||!(0,O.VS)(O.F2);return(0,_.jsxs)(_n,{item:e,className:a.join(" "),children:[o?(0,_.jsx)("div",{className:Mj.pagination,children:(0,_.jsx)(Yj,{size:"small",outline:!1,align:"left",noPadding:!0,hotkey:{prev:"image:prev",next:"image:next"},currentPage:e.currentImage+1,totalPages:e.parsedValueList.length,onChange:t=>e.setCurrentImage(t-1),pageSizeSelectable:!1})}):null,(0,_.jsxs)("div",{ref:t=>{e.setContainerRef(t),this.attachObserver(t)},className:r,style:n,children:[(0,_.jsx)("div",{ref:e=>{this.filler=e},className:Mj.filler,style:{width:"100%",marginTop:e.fillerHeight}}),(0,O.VS)(O.F2)?(0,_.jsx)(Qe,{ref:t=>{e.setImageRef(t),this.imageRef.current=t},usedValue:e.usedValue,imageEntity:e.currentImageEntity,imageTransform:e.imageTransform,updateImageSize:e.updateImageSize,size:e.canvasSize,overlay:(0,_.jsx)(fk,{item:e})}):(0,_.jsxs)("div",{className:[Mj.frame,...i].join(" "),style:e.canvasSize,children:[(0,_.jsx)("img",{ref:t=>{e.setImageRef(t),this.imageRef.current=t},loading:(0,O.VS)(O.H)&&!e.lazyoff?"lazy":"false",style:e.imageTransform,src:e.currentSrc,onLoad:t=>{e.updateImageSize(t),e.currentImageEntity.setImageLoaded(!0)},onError:this.handleError,crossOrigin:e.imageCrossOrigin,alt:"LS"}),(0,_.jsx)(fk,{item:e})]}),l||!s?(0,_.jsx)("div",{className:Mj.loading,children:(0,_.jsx)(Fj.A,{})}):c?(0,_.jsx)(yk,{item:e,crosshairRef:this.crosshairRef,onClick:this.handleOnClick,imagePositionClassnames:i,state:this.state,onMouseEnter:()=>{this.crosshairRef.current&&this.crosshairRef.current.updateVisibility(!0)},onMouseLeave:t=>{this.crosshairRef.current&&this.crosshairRef.current.updateVisibility(!1);const{width:n,height:r}=e.canvasSize,{offsetX:o,offsetY:i}=t.evt,a=Object.assign({},t);o<=0?t.offsetX=0:o>=n&&(t.offsetX=n),i<=0?t.offsetY=0:i>=r&&(t.offsetY=r),this.handleMouseMove(a)},onDragMove:this.updateCrosshair,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,onWheel:e.zoom?this.handleZoom:()=>{}}):null]}),s&&c&&this.renderTools(),e.images.length>1&&(0,_.jsx)("div",{className:Mj.gallery,children:e.images.map(((t,n)=>(0,p.createElement)("img",Object.assign({},Qj,{alt:"",key:t,src:t,className:n===e.currentImage&&Mj.active,height:"60",onClick:()=>e.setCurrentImage(n)}))))})]})}}),yk=(0,y.PA)((({item:e,imagePositionClassnames:t,state:n,onClick:r,onMouseEnter:o,onMouseLeave:i,onDragMove:a,onMouseDown:s,onMouseMove:l,onMouseUp:c,onWheel:d,crosshairRef:u})=>{const{store:h}=e;let g,m;return(0,O.VS)(O.pG)?(g={width:e.containerWidth,height:e.containerHeight},m={x:e.zoomingPositionX+e.alignmentOffset.x,y:e.zoomingPositionY+e.alignmentOffset.y}):(g=Object.assign({},e.canvasSize),m={x:e.zoomingPositionX,y:e.zoomingPositionY}),(0,_.jsx)(pj.BI,{ref:t=>{e.setStageRef(t)},className:[Mj["image-element"],...t].join(" "),width:g.width,height:g.height,scaleX:e.zoomScale,scaleY:e.zoomScale,x:m.x,y:m.y,offsetX:e.stageTranslate.x,offsetY:e.stageTranslate.y,rotation:e.rotation,onClick:r,onMouseEnter:o,onMouseLeave:i,onDragMove:a,onMouseDown:s,onMouseMove:l,onMouseUp:c,onWheel:d,children:(0,_.jsx)(bk,{item:e,store:h,state:n,crosshairRef:u})})})),bk=(0,y.PA)((({item:e,store:t,state:n,crosshairRef:r})=>{if(!(0,h._n)(e))return null;if(!t.task||!e.currentSrc)return null;const o=e.regs,i=!!e.isMultiItem,a=[Mj.wrapperComponent,e.images.length>1?Mj.withGallery:Mj.wrapper];i&&a.push(Mj.withPagination);const{brushRegions:s,shapeRegions:l}=ek(o),{brushRegions:c,shapeRegions:d}=ek(e.suggestions),u=Object.entries({brush:s,shape:l,suggestedBrush:c,suggestedShape:d});return(0,_.jsxs)(_.Fragment,{children:[0===o.length&&(0,_.jsx)(pj.Wd,{children:(0,_.jsx)(pj.N1,{points:[0,0,0,1],stroke:"rgba(0,0,0,0)"})}),e.grid&&e.sizeUpdated&&(0,_.jsx)(fj,{item:e}),(0,O.VS)(O.q$)?(0,_.jsx)(uk,{item:e}):null,u.map((([e,t])=>{const n=null!==e.match(/brush/i),r=null!==e.match("suggested");return t.length>0?(0,_.jsx)(rk,{name:e,regions:t,useLayers:!1===n,suggestion:r},e):(0,_.jsx)(p.Fragment,{},e)})),(0,_.jsx)(mk,{item:e,isPanning:n.isPanning}),(0,_.jsx)(ok,{item:e}),e.crosshair&&(0,_.jsx)(pk,{ref:r,width:(0,O.VS)(O.pG)?e.containerWidth:e.stageWidth,height:(0,O.VS)(O.pG)?e.containerHeight:e.stageHeight})]})}));var xk=n(78438);const wk=[4,4,0,0],Ck=({x:e,y:t,text:n,score:r,showLabels:o,rotation:i=0,zoomScale:a=1,color:s,maxWidth:l,onClickLabel:c,onMouseEnterLabel:d,onMouseLeaveLabel:u,adjacent:h=!1,isTexting:g=!1})=>{var m;const f=20,v=1/a,[y,b]=(0,p.useState)(),x=r?34:0,w=Math.max(0,l*a-25-x),C=!!w,{suggestion:S}=null!=(m=(0,p.useContext)(Uj))?m:{},j=(0,p.useMemo)((()=>{if(!o||!y||!l)return null;return(n?y.measureSize(n).width:0)>w?w:null}),[y,n,l,v]),k=(0,p.useCallback)(((e,t)=>{const n=h&&C?wk:4,r=l?Math.min(t.width()+25,C?l*a:20):t.width()+25,o=t.height();if(e.beginPath(),n){let t=0,i=0,a=0,s=0;"number"==typeof n?t=i=a=s=Math.min(n,r/2,o/2):(t=Math.min(n[0],r/2,o/2),i=Math.min(n[1],r/2,o/2),s=Math.min(n[2],r/2,o/2),a=Math.min(n[3],r/2,o/2)),e.moveTo(t,0),e.lineTo(r-i,0),e.arc(r-i,i,i,3*Math.PI/2,0,!1),e.lineTo(r,o-s),e.arc(r-s,o-s,s,0,Math.PI/2,!1),e.lineTo(a,o),e.arc(a,o-a,a,Math.PI/2,Math.PI,!1),e.lineTo(0,t),e.arc(t,t,t,Math.PI,3*Math.PI/2,!1)}else e.rect(0,0,r,o);e.closePath(),e.fillStrokeShape(t)}),[h,C,l]);return o?(0,_.jsxs)(pj.YJ,{strokeScaleEnabled:!1,x:e,y:t,rotation:i,children:[!!r&&(0,_.jsxs)(pj.JU,{y:-20*v,scaleX:v,scaleY:v,onClick:()=>!1,children:[(0,_.jsx)(pj.vw,{fill:rn.Colors.getScaleGradient(r),cornerRadius:2}),(0,_.jsx)(pj.EY,{text:r.toFixed(2),fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif",fontSize:13,fill:"white",padding:0,lineHeight:1/13*f})]}),(0,_.jsxs)(pj.JU,{x:20*v+x*v,y:-20*v,scaleX:v,scaleY:v,onClick:c,onMouseEnter:c?d:null,onMouseLeave:c?u:null,listening:!S,children:[(0,_.jsx)(pj.vw,{fill:s,cornerRadius:4,sceneFunc:k,offsetX:20}),(0,_.jsx)(pj.EY,{ref:b,text:n,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif",fontSize:13,lineHeight:1/13*f,height:f,width:j,wrap:"none",ellipsis:"true",fill:V.A.SHOW_LABEL_FILL,padding:0})]}),(0,_.jsx)(pj.wA,{x:2*v+x*v,y:2*v-f*v,scaleX:v,scaleY:v,fill:V.A.SHOW_LABEL_FILL,data:g?"M13,1v2H6C4.11,3,3.17,3,2.59,3.59C2,4.17,2,5.11,2,7v2c0,1.89,0,2.83,0.59,3.41C3.17,13,4.11,13,6,13h7v2h1V1H13z M6,9.5C5.17,9.5,4.5,8.83,4.5,8S5.17,6.5,6,6.5S7.5,7.17,7.5,8S6.83,9.5,6,9.5z M11,9.5c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S11.83,9.5,11,9.5z":"M13.47,2.52c-0.27-0.27-0.71-0.27-1.59-0.27h-0.64c-1.51,0-2.26,0-2.95,0.29C7.61,2.82,7.07,3.35,6,4.43L3.65,6.78c-0.93,0.93-1.4,1.4-1.4,1.97c0,0.58,0.46,1.04,1.39,1.97l1.63,1.63c0.93,0.93,1.39,1.39,1.97,1.39s1.04-0.46,1.97-1.39L11.57,10c1.07-1.07,1.61-1.61,1.89-2.29c0.28-0.68,0.28-1.44,0.28-2.96V4.11C13.74,3.23,13.74,2.8,13.47,2.52z M10.5,6.9c-0.77,0-1.4-0.63-1.4-1.4s0.63-1.39,1.4-1.39s1.39,0.63,1.39,1.4S11.27,6.9,10.5,6.9z"})]}):null},Sk=(0,y.PA)((({item:e,color:t,strokewidth:n})=>{const r=!!e.texting,o=e.getLabelText(","),i=e.parent,a=e.parent.zoomScale||1;return(0,_.jsx)(Ck,{x:i.internalToCanvasX(e.x-e.radiusX)-n/2/a,y:i.internalToCanvasY(e.y-e.radiusY)-n/2/a,isTexting:r,text:o,score:e.score,showLabels:(0,h.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})})),jk=(0,y.PA)((({item:e,color:t,strokewidth:n})=>{const r=!!e.texting,o=e.getLabelText(","),i=e.parent,a=e.parent.zoomScale||1;return(0,_.jsx)(Ck,{x:i.internalToCanvasX(e.x)-n/2/a,y:i.internalToCanvasY(e.y)-n/2/a,isTexting:r,text:o,score:e.score,showLabels:(0,h.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,rotation:e.rotation,color:t,maxWidth:i.internalToCanvasX(e.width)+n,adjacent:!0,onClickLabel:e.onClickLabel})})),kk=(0,y.PA)((({item:e,color:t})=>{var n;const r=!!e.texting,o=e.getLabelText(","),i=e.bboxCoordsCanvas;if(!i)return null;const a=(0,h.Zn)(e).settings;return(0,_.jsxs)(p.Fragment,{children:[a.showLabels&&(0,_.jsx)(pj.rw,{x:i.left,y:i.top,fillEnabled:!1,width:i.right-i.left,height:i.bottom-i.top,stroke:null==(n=e.style)?void 0:n.strokecolor,strokeWidth:1,strokeScaleEnabled:!1,shadowBlur:0}),(0,_.jsx)(Ck,{x:i.left,y:i.top+2/e.parent.zoomScale,isTexting:r,text:o,score:e.score,showLabels:a.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})]})})),Ok=(0,y.PA)((({item:e,color:t})=>{var n;const r=(0,h.Zn)(e).settings;if(!r.showLabels)return null;const o=!!e.texting,i=e.getLabelText(","),a=e.bboxCoordsCanvas;return a?(0,_.jsxs)(pj.YJ,{name:"region-label",children:[(0,_.jsx)(pj.rw,{x:a.left,y:a.top,fillEnabled:!1,width:a.right-a.left,height:a.bottom-a.top,stroke:null==(n=e.style)?void 0:n.strokecolor,strokeWidth:1,strokeScaleEnabled:!1,shadowBlur:0}),(0,_.jsx)(Ck,{x:a.left,y:a.top+2/e.parent.zoomScale,isTexting:o,text:i,score:e.score,showLabels:r.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})]}):null})),Rk=(0,y.PA)((({item:e,color:t})=>{const n=!!e.texting,r=e.getLabelText(",");return(0,_.jsx)(Ck,{x:e.canvasX+(e.canvasWidth+2)/e.parent.zoomScale,y:e.canvasY+(e.canvasWidth+2)/e.parent.zoomScale,isTexting:n,text:r,score:e.score,showLabels:(0,h.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})})),Ek=(0,y.PA)((({reg:e,box:t,color:n,scale:r,strokeWidth:o,adjacent:i=!1})=>{const a=!!e.texting,s=e.getLabelText(",");return(0,_.jsx)(Ck,{x:t.x,y:t.y,rotation:t.rotation,isTexting:a,text:s,score:e.score,showLabels:e.store.settings.showLabels,zoomScale:r,color:n,maxWidth:t.width+o,adjacent:i,onClickLabel:e.onClickRegion})})),_k=h.gK.model({}).views((e=>({get bboxCoords(){return console.warn("KonvaRegionMixin needs to implement bboxCoords getter in regions"),null},get bboxCoordsCanvas(){const t=e.bboxCoords;return(0,O.VS)(O.MV)?e.parent?{left:e.parent.internalToCanvasX(t.left),top:e.parent.internalToCanvasY(t.top),right:e.parent.internalToCanvasX(t.right),bottom:e.parent.internalToCanvasY(t.bottom)}:null:t},get inViewPort(){return!(0,O.VS)(O.pG)||!!e&&!!e.bboxCoordsCanvas&&!!e.object&&e.bboxCoordsCanvas.right>=e.object.viewPortBBoxCoords.left&&e.bboxCoordsCanvas.bottom>=e.object.viewPortBBoxCoords.top&&e.bboxCoordsCanvas.left<=e.object.viewPortBBoxCoords.right&&e.bboxCoordsCanvas.top<=e.object.viewPortBBoxCoords.bottom},get control(){var t;return null==(t=e.results.find((e=>e.from_name.tools)))?void 0:t.from_name},get canRotate(){var t;return(null==(t=e.control)?void 0:t.canrotate)&&e.supportsRotate},get supportsTransform(){return!e.isReadOnly()&&(this._supportsTransform&&!this.hidden)}}))).actions((e=>{let t=null;return{checkSizes(){const{naturalWidth:t,naturalHeight:n,stageWidth:r,stageHeight:o}=e.parent;r>1&&o>1&&(null==e.updateImageSize||e.updateImageSize(r/t,o/n,r,o))},selectRegion(){e.scrollToRegion()},scrollToRegion(){var t;const n=e.object.zoomScale>1,r=null==(t=e.shapeRef)||null==(t=t.parent)||null==(t=t.canvas)?void 0:t._canvas;let o=r;for(;o&&!o.scrollTop&&!o.className.includes("main-content");)o=o.parentElement;if(!o)return;const i=o.getBoundingClientRect(),a=r.getBoundingClientRect(),s=n?{top:0,bottom:a.height}:e.bboxCoordsCanvas,l=s.bottom-s.top,c=s.top-(i.top-a.top),d=r.clientHeight-s.bottom-(a.bottom-i.bottom)-36,u=n&&r.clientHeight>o.clientHeight;if(!(c<0&&d<0))if(c<0&&-c/l>.4){if(n&&(a.bottom-i.top)/o.clientHeight>.4)return;o.scrollBy({top:u?-d:c,left:0,behavior:"smooth"})}else if(d<0&&-d/l>.4){if(n&&(i.bottom-a.top)/o.clientHeight>.4)return;o.scrollBy({top:u?c:-d,left:0,behavior:"smooth"})}},onClickRegion(n){const r=e.annotation,o=(null==n?void 0:n.evt)||n,i=(null==o?void 0:o.ctrlKey)||(null==o?void 0:o.metaKey);if(n&&(n.cancelBubble=!0),(0,O.VS)(O.Kg)){if(2===o.detail)return void e.onDoubleClickRegion()}const a=()=>{e._selectArea(i),t=null};if(!r.isReadOnly()&&r.isLinkingMode)r.addLinkedRegion(e),r.stopLinkingMode(),r.regionStore.unselectAll();else if((0,O.VS)(O.Kg))e._selectArea(i);else{if(!e.perRegionFocusTarget)return void a();t?(clearTimeout(t),e.requestPerRegionFocus(),t=null,r.selectArea(e)):t=setTimeout(a,300)}},onDoubleClickRegion(){e.requestPerRegionFocus(),e.annotation.selectAreas([e])}}}));var Ak=n(87261);const Tk=["item"],Pk=(e,t)=>{const n=(0,y.PA)(e);return(0,y.PA)((e=>{let{item:r}=e,o=(0,Yn.A)(e,Tk);const i=(null==t?void 0:t.renderHidden)||!r.hidden,a=!(0,O.VS)(O.Kg)||(null==t?void 0:t.shouldNotUsePortal),s=a?p.Fragment:Ak.ZL,l=a?{}:{selector:".selection-regions-layer",enabled:r.inSelection},c=!!r.annotation,d=(0,p.useCallback)((e=>{(0,h._n)(r)&&r.setShapeRef(e)}),[r]);return c&&(0,h._n)(r)&&i?(0,_.jsx)(s,Object.assign({},l,{children:(0,_.jsx)(n,Object.assign({item:r},o,{setShapeRef:d}))})):null}))},Ik=(0,y.PA)((({item:e,useLayer:t})=>{const n=(e=>{const{shapeRef:t,bboxCoordsCanvas:n}=e;let r,o,i,a;if((0,w.isDefined)(n))[r,o,i,a]=[n.right-n.left,n.bottom-n.top,n.left,n.top];else{if(!(0,w.isDefined)(t))return null;var s,l;[r,o]=[null!=(s=null==t?void 0:t.width())?s:0,null!=(l=null==t?void 0:t.height())?l:0],[i,a]=[e.x+r/2-32,e.x+r/2-32]}return{x:i+r/2-32,y:a+o+10}})(e),[r,o]=(0,p.useState)(!1),i=1/e.parent.zoomScale;if(n){const a={width:64,height:32},s=t?{x:0,y:0,scaleX:1,scaleY:1}:{x:n.x,y:n.y,scaleX:i,scaleY:i},l=t?{x:n.x,y:n.y,scaleX:i,scaleY:i}:{},c=(0,_.jsxs)(pj.YJ,Object.assign({},a,s,{opacity:e.highlighted||r?1:.5,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,_.jsx)(pj.rw,{x:0,y:0,width:64,height:32,fill:"#000",cornerRadius:16}),(0,_.jsx)(Lk,{onClick:()=>e.annotation.rejectSuggestion(e.id),fill:"#DD0000",iconColor:"#fff",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAxCAYAAACcXioiAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF9SURBVHgB7ZjtTcMwEEAdJigbZANWCEzCJmUENmg3oCxAxQgsUHcCGOE4q4kUQe347PtIJT/phETb83tVfyRxrtFoNBoVdKkXAWDAPw849zj7ruvOToHZuYH3onNxyRb+s3XCsJyLH3iGOGIREfmJgbLoDdKwRyzIB3aUZUsBrBEZ8oEjZeEL5FEdkSkfeKUs3eD4zMXFEQR5j9NTdoflPQhGiMpLR6jIS0WoynNHmMhzRZjK10asQr40AtYkXxixLnmBCK8uzxjhzeQZIry5/ERBhOeSv3M8nHEOhPcftG5PF8FvknL5PUf89nSRCnn7CAZ5uwhGef0IovwJFO7sJOV7EL6zE5WffdY2okbePIJD3iyCU149QkJeLUJSXiUC0k+nq+ULIwbK4pyHu1XyBRFXn07HLqc3Lo3HeeK4JB53PLrLJXmK/to/YwGfLg6b/ERmxJfLBS5Pp09SP5vEubGfkyefOy7b4XyP8yEp/+fcPc7POEeNcxuNW+UXHw/Tr96+EacAAAAASUVORK5CYII="}),(0,_.jsx)(Lk,{x:32,onClick:()=>e.annotation.acceptSuggestion(e.id),fill:"#98C84E",iconColor:"#fff",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAxCAYAAABznEEcAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEhSURBVHgB7ZftDYIwEIavcQHdwA1cgU0cwRFwA0fQSRgFnMARPO9CSdAItLSl1+Se5A1/6MFD6ReAoiiKoijyMVAIiMiXinKiHCgPY8wTSoEFKFf85k2poQQmBMYi1Q4EY3+hK2Xqi/NwQJDKQg+MaUAiHgLMDaThKdBSjiAJFciNCswUvlA625CvZ0hASoF6okjUJT6lwH6hWBQRTDkG6ObKoWiQCKYexNzAsTi/BPiCW81C1LBxfIiXCG45jWLfG63jw5xEMMc6EFsEcy1kMUSw74HasUaalThEBCVtJdaIiBIIEJG5mfMUkSeQQCTvdjqCiIzzQICIrAPNChF5JzLGQ0SmwICDSCdaYGBGRHYP/GJF7pSXTVOUgKIoivKPD0UduGDYAx6AAAAAAElFTkSuQmCC"})]}));return t?(0,_.jsx)(pj.Wd,Object.assign({},a,l,{children:c})):c}return null})),Lk=({x:e=0,fill:t,iconColor:n,onClick:r,icon:o})=>{const[i,a]=(0,p.useState)(new window.Image),s=pt()(null!=n?n:"#fff"),[l,c]=(0,p.useState)(!1);(0,p.useEffect)((()=>{const e=new window.Image;e.onload=()=>{a(e)},e.width=12,e.height=12,e.src=o}),[o]);const d=(0,p.useCallback)((e=>{if(e){const[t,n,r,o]=s.rgba();e.cache(),e.setAttrs({red:t,green:n,blue:r,alpha:o})}}),[]);return(0,_.jsxs)(pj.YJ,{x:e,width:32,height:32,onClick:r,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[(0,_.jsx)(pj.jl,{x:16,y:16,radius:14,opacity:l?1:.2,fill:l?t:"#fff"}),(0,_.jsx)(pj._V,{ref:e=>d(e),x:8,y:8,width:16,height:16,image:i,filters:[yt.A.Filters.RGB]})]})},Mk=(0,y.PA)((({item:e,children:t})=>{var n;const{suggestion:r}=null!=(n=(0,p.useContext)(Uj))?n:{};return(0,_.jsxs)(p.Fragment,{children:[t,r&&(0,_.jsx)(Ik,{item:e,useLayer:"brushregion"===e.type})]})})),Kk={shadowColor:"red",shadowBlur:1,shadowOffsetY:2,shadowOffsetX:2,shadowOpacity:1},Dk=h.gK.model("Points",{id:h.gK.optional(h.gK.identifier,E),type:h.gK.optional(h.gK.enumeration(["add","eraser"]),"add"),points:h.gK.array(h.gK.number),relativePoints:h.gK.array(h.gK.number),strokeWidth:h.gK.optional(h.gK.number,25),relativeStrokeWidth:h.gK.optional(h.gK.number,25),eraserSize:h.gK.optional(h.gK.number,25)}).views((e=>({get store(){return(0,h.Zn)(e)},get parent(){return(0,h.p7)(e,2)?(0,h.PA)(e,2):null},get stage(){var t;return null==(t=e.parent)?void 0:t.parent},get compositeOperation(){return"add"===e.type?"source-over":"destination-out"}}))).actions((e=>({updateImageSize(t,n,r,o){e.points=e.relativePoints.map(((e,t)=>e*(!(t%2)?r:o)/100)),e.strokeWidth=e.relativeStrokeWidth*r/100},setType(t){e.type=t},addPoint(t,n){t/=e.parent.scaleX,n/=e.parent.scaleY,e.points.push(t),e.points.push(n)},setPoints(t){e.points=t.map(((t,n)=>t/(n%2==0?e.parent.scaleX:e.parent.scaleY))),e.relativePoints=t.map(((t,n)=>t/(n%2==0?e.stage.stageWidth:e.stage.stageHeight)*100)),e.relativeStrokeWidth=e.strokeWidth/e.stage.stageWidth*100},rescale(t,n,r){const o=r/t;return e.points.map((e=>e*o))},scaledStrokeWidth:(t,n,r)=>r/t*e.strokeWidth}))),Nk=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"brushregion",object:h.gK.late((()=>h.gK.reference(HR))),coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc"),rle:h.gK.frozen(),maskDataURL:h.gK.frozen(),touches:h.gK.array(Dk),currentTouch:h.gK.maybeNull(h.gK.reference(Dk))}).volatile((()=>({tension:0,opacity:.6,scaleX:1,scaleY:1,mode:"brush",needsUpdate:1,hideable:!0,layerRef:void 0,imageData:null}))).views((e=>({get parent(){return(0,h._n)(e)?e.object:null},get colorParts(){const t=e.style||e.tag||V.l;return(0,gt.colorToRGBAArray)(t.strokecolor)},get strokeColor(){return(0,gt.rgbArrayToHex)(e.colorParts)},get touchesLength(){return e.touches.length},get bboxCoordsCanvas(){if(!e.imageData){const s={x:[],y:[]};for(let l=0;l in(null!=(t=null==(n=e.touches)||null==(n=n[0])?void 0:n.points)?t:[]);l+=2){var t,n,r,o,i,a;const c=(null!=(r=null==(o=e.touches)||null==(o=o[0])?void 0:o.points)?r:[])[l],d=(null!=(i=null==(a=e.touches)||null==(a=a[0])?void 0:a.points)?i:[])[l+1];s.x.push(c),s.y.push(d)}return{left:Math.min(...s.x),top:Math.min(...s.y),right:Math.max(...s.x),bottom:Math.max(...s.y)}}const s=X.getImageDataBBox(e.imageData.data,e.imageData.width,e.imageData.height);if(!s)return null;const{stageScale:l=1,zoomingPositionX:c=0,zoomingPositionY:d=0}=e.parent||{};return s.x=s.x/l-c/l,s.y=s.y/l-d/l,s.width=s.width/l,s.height=s.height/l,{left:s.x,top:s.y,right:s.x+s.width,bottom:s.y+s.height}},get bboxCoords(){const t=e.bboxCoordsCanvas;return t?(0,O.VS)(O.MV)?{left:e.parent.canvasToInternalX(t.left),top:e.parent.canvasToInternalY(t.top),right:e.parent.canvasToInternalX(t.right),bottom:e.parent.canvasToInternalY(t.bottom)}:t:null}}))).actions((e=>{let t,n,r,o=-1,i=-1;return{afterCreate(){e.updateMaskImage()},updateMaskImage(){e.maskDataURL&&(r||(r=new window.Image),r.src=e.maskDataURL)},getMaskImage:()=>r,setLayerRef(t){t&&(t.canvas._canvas.style.opacity=e.opacity,e.layerRef=t)},cacheImageData(){if(e.layerRef){const t=e.layerRef.toCanvas().getContext("2d");e.imageData=t.getImageData(0,0,e.layerRef.canvas.width,e.layerRef.canvas.height)}else e.imageData=null},prepareCoords:([t,n])=>e.parent.zoomOriginalCoords([t,n]),preDraw(r,a){if(!e.layerRef)return;const s=e.layerRef.canvas.context;if(s.save(),(0,O.VS)(O.pG)&&(s.beginPath(),s.rect(e.parent.alignmentOffset.x,e.parent.alignmentOffset.y,e.parent.stageWidth*e.parent.stageScale,e.parent.stageHeight*e.parent.stageScale),s.clip()),s.beginPath(),n.length/2>3)s.moveTo(...e.prepareCoords([o,i]));else if(0===n.length)s.moveTo(...e.prepareCoords([r,a]));else{s.moveTo(...e.prepareCoords([n[0],n[1]]));for(let t=0;t(e.object.annotation.pauseAutosave(),t=Dk.create({id:E(),type:r,strokeWidth:o,opacity:i}),n=[],t),addPoint(t,r){e.preDraw(t,r),n.push(t),n.push(r)},endPath(){const{annotation:r}=e.object;r.startAutosave(),2===n.length&&(n.push(n[0]),n.push(n[1])),e.touches.push(t),e.currentTouch=t,t.setPoints(n),o=i=-1,t=null,n=[],e.notifyDrawingFinished(),r.autosave&&setTimeout((()=>r.autosave()))},endUpdatedMaskDataURL(t){const{annotation:n}=e.object;n.startAutosave(),e.maskDataURL=t,e.updateMaskImage(),e.notifyDrawingFinished(),n.autosave&&setTimeout((()=>n.autosave()))},convertPointsToMask(){},setScale(t,n){e.scaleX=t,e.scaleY=n},updateImageSize(t,n,r,o){e.parent.stageWidth>1&&e.parent.stageHeight>1&&(e.touches.forEach((e=>e.updateImageSize(t,n,r,o))),e.needsUpdate=e.needsUpdate+1)},addState(t){e.states.push(t)},convertToImage(){if(e.touches.length){const t=e.object,n=xk.A.Region2RLE(e,t,{color:e.strokeColor});e.touches=[],e.rle=Array.from(n)}},serialize(t){const n=e.object,r={format:"rle"};if(null!=t&&t.fast)r.rle=e.rle,e.touches.length&&(r.touches=e.touches),e.maskDataURL&&(r.maskDataURL=e.maskDataURL);else{const t=xk.A.Region2RLE(e,n);if(!t||!t.length)return null;r.rle=Array.from(t)}return e.parent.createSerializedResult(e,r)}}})),Vk=h.gK.compose("BrushRegionModel",it,We,ht,_k,Le,Nk),zk=(0,y.PA)((({item:e,setShapeRef:t,pointsList:n})=>{const r=(0,p.useCallback)(((e,{points:t,strokeWidth:n,strokeColor:r,compositeOperation:o})=>{e.save(),e.beginPath(),e.moveTo(t[0],t[1]);for(let n=0;n{n.forEach((n=>{r(t,{points:n.points,strokeWidth:n.strokeWidth,strokeColor:e.strokeColor,compositeOperation:n.compositeOperation})}))}),[n,n.length,e.strokeColor]),i=(0,p.useCallback)(((e,t)=>{n.forEach((n=>{r(e,{points:n.points,strokeWidth:n.strokeWidth,strokeColor:"eraser"===n.type?"#ffffff":t.colorKey,compositeOperation:"source-over"})}))}),[n,n.length]);return(0,_.jsx)(pj.yp,{ref:e=>t(e),sceneFunc:o,hitFunc:i})})),Bk=Pk((({item:e,setShapeRef:t})=>{var n,r,o,i,a,s,l,c,d,u,g,m;const[f,v]=(0,p.useState)(),{suggestion:y}=null!=(n=(0,p.useContext)(Uj))?n:{};(0,p.useEffect)((async()=>{if(!e.rle&&!e.maskDataURL)return;if(!e.parent||e.parent.naturalWidth<=1||e.parent.naturalHeight<=1)return;let t;e.maskDataURL&&(0,O.VS)(O.bP)?t=await xk.A.maskDataURL2Image(e.maskDataURL,{color:e.strokeColor}):e.rle&&(t=xk.A.RLE2Region(e,{color:e.strokeColor})),t&&(t.onload=()=>{v(t),e.setReady(!0)})}),[e.rle,e.maskDataURL,e.maskBoundsMinX,e.maskBoundsMinY,e.maskBoundsMaxX,e.maskBoundsMaxY,e.parent,null==(r=e.parent)?void 0:r.naturalWidth,null==(o=e.parent)?void 0:o.naturalHeight,e.strokeColor,e.opacity]);const b=(0,p.useMemo)((()=>{let t;return(n,r)=>{if(f){if(!t){n.drawImage(f,0,0,e.parent.stageWidth,e.parent.stageHeight),t=(0,O.VS)(O.pG)?n.getImageData(e.parent.alignmentOffset.x,e.parent.alignmentOffset.y,e.parent.stageWidth,e.parent.stageHeight):n.getImageData(0,0,e.parent.stageWidth,e.parent.stageHeight);const o=(0,gt.colorToRGBAArray)(r.colorKey);for(let e=t.data.length/4-1;e>=0;e--)if(t.data[4*e+3]>0)for(let n=0;n<3;n++)t.data[4*e+n]=o[n]}n.putImageData(t,0,0)}}}),[f,null==(i=e.parent)?void 0:i.stageWidth,null==(a=e.parent)?void 0:a.stageHeight]),{store:x}=e,w=(0,p.useRef)(new window.Image),C=(0,p.useRef)(),S=(0,p.useRef)({});S.current.highlighted=e.highlighted,S.current.highlight=S.current.highlighted?Kk:{shadowOpacity:0};const j=(0,p.useMemo)((()=>{let t=!1;return async()=>{var n;const{highlighted:r}=S.current,o=C.current;if((null==(n=e.parent)?void 0:n.drawingRegion)===e||!o||t)return;let i;r&&(i=o.findOne(".highlight"),i.hide()),o.draw();const a=o.canvas.toDataURL();e.cacheImageData(),r&&(i.show(),o.draw()),w.current.src=a,t=!0}}),[e.touches.length,e.strokeColor,null==(s=e.parent)?void 0:s.stageScale,null==(l=x.annotationStore.selected)?void 0:l.id,null==(c=e.parent)?void 0:c.zoomingPositionX,null==(d=e.parent)?void 0:d.zoomingPositionY,null==(u=e.parent)?void 0:u.stageWidth,null==(g=e.parent)?void 0:g.stageHeight,e.maskDataURL,e.rle,f]),k=(0,p.useCallback)((t=>{(0,h._n)(e)&&e.setLayerRef(t)}),[e]);if(!e.parent)return null;const R=null==(m=e.parent)?void 0:m.stageRef,E=(0,O.VS)(O.pG)?{scaleX:1/e.parent.zoomScale,scaleY:1/e.parent.zoomScale,x:-(e.parent.zoomingPositionX+e.parent.alignmentOffset.x)/e.parent.zoomScale,y:-(e.parent.zoomingPositionY+e.parent.alignmentOffset.y)/e.parent.zoomScale,width:e.containerWidth,height:e.containerHeight}:{scaleX:1/e.parent.stageScale,scaleY:1/e.parent.stageScale,x:-e.parent.zoomingPositionX/e.parent.stageScale,y:-e.parent.zoomingPositionY/e.parent.stageScale,width:e.parent.canvasSize.width,height:e.parent.canvasSize.height},A=(0,O.VS)(O.pG)?{x:0,y:0,width:e.parent.stageWidth,height:e.parent.stageHeight}:null;return(0,_.jsxs)(Mk,{item:e,children:[(0,_.jsx)(pj.Wd,{id:e.cleanId,ref:e=>{k(e),C.current=e},onDraw:()=>{setTimeout(j)},clearBeforeDraw:!e.isDrawing,visible:!e.hidden,clip:A,children:(0,_.jsxs)(pj.YJ,{attrMy:e.needsUpdate,name:"segmentation",onMouseDown:e=>{x.annotationStore.selected.isLinkingMode&&(e.cancelBubble=!0)},onMouseOver:()=>{x.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),R.container().style.cursor="crosshair"):e.parent.getToolsManager().findSelectedTool()||(R.container().style.cursor="pointer")},onMouseOut:()=>{var t;x.annotationStore.selected.isLinkingMode&&e.setHighlight(!1),null!=(t=e.parent)&&t.getToolsManager().findSelectedTool()||(R.container().style.cursor="default")},onClick:t=>{if(!e.parent.getSkipInteractions())if(x.annotationStore.selected.isLinkingMode)e.onClickRegion(t);else{if(!(0,O.VS)(O.pG)){const t=e.parent.getToolsManager().findSelectedTool(),n=t&&"MoveTool"===(0,h.Pw)(t).name;if(t&&!n)return}x.annotationStore.selected.isLinkingMode&&(R.container().style.cursor="default"),e.setHighlight(!1),e.onClickRegion(t)}},listening:!y,children:[(0,_.jsx)(pj._V,{image:f,hitFunc:b,width:e.parent.stageWidth,height:e.parent.stageHeight}),(0,_.jsx)(pj.YJ,{children:(0,_.jsx)(zk,{store:x,item:e,pointsList:e.touches,setShapeRef:t})}),(0,_.jsx)(pj._V,Object.assign({name:"highlight",image:w.current,sceneFunc:S.current.highlighted?null:()=>{},hitFunc:()=>{}},S.current.highlight,E,{listening:!1}))]})}),(0,_.jsx)(pj.Wd,{id:`${e.cleanId}_labels`,ref:t=>{t&&(t.canvas._canvas.style.opacity=e.opacity)},children:(0,_.jsx)(pj.YJ,{children:(0,_.jsx)(Ok,{item:e,color:e.strokeColor})})})]})}),{renderHidden:!0,shouldNotUsePortal:!0});x.addTag("brushregion",Vk,Bk),x.addRegionType(Vk,"image",(e=>e.rle||e.touches||e.maskDataURL));const Hk={defaultOpacity:V.l.opacity,defaultFillColor:V.l.fillcolor,defaultStrokeColor:V.l.strokecolor,defaultStrokeColorHighlighted:V.A.HIGHLIGHTED_STROKE_COLOR,defaultStrokeWidth:V.l.strokewidth,defaultStrokeWidthHighlighted:V.A.HIGHLIGHTED_STROKE_WIDTH,defaultSuggestionWidth:V.A.SUGGESTION_STROKE_WIDTH},Fk=(e,t={})=>{var n,r;const{suggestion:o}=null!=(n=(0,p.useContext)(Uj))?n:{},[i,a]=(0,p.useState)(e.highlighted),[s,l]=(0,p.useState)(null!=(r=e.fill)?r:t.useStrokeAsFill||t.includeFill),c=(0,p.useMemo)((()=>(({region:e,highlighted:t=!1,shouldFill:n=!1,useStrokeAsFill:r=!1,sameStrokeWidthForSelected:o=!1,suggestion:i=!1,defaultOpacity:a=V.l.opacity,defaultFillColor:s=V.l.fillcolor,defaultStrokeColor:l=V.l.strokecolor,defaultStrokeColorHighlighted:c=V.A.HIGHLIGHTED_STROKE_COLOR,defaultStrokeWidth:d=V.l.strokewidth,defaultStrokeWidthHighlighted:u=V.A.HIGHLIGHTED_STROKE_WIDTH,defaultSuggestionWidth:h=V.A.SUGGESTION_STROKE_WIDTH})=>{var g,m,p;const f=e.style||e.tag,v=e.inSelection||t,y=null==f?void 0:f.fillopacity,b=(0,w.isDefined)(y)?y:null==f?void 0:f.opacity,x=n?pt()(null!=(g=r?null==f?void 0:f.strokecolor:null==f?void 0:f.fillcolor)?g:s).darken(.3).alpha(+(null!=(m=null!=b?b:a)?m:.5)).css():null;var C;return{strokeColor:v?c:pt()(null!=(p=null==f?void 0:f.strokecolor)?p:l).css(),fillColor:x,strokeWidth:i?h:v&&!o?u:+(null!=(C=null==f?void 0:f.strokewidth)?C:d)}})(Object.assign({},Hk,null!=t?t:{},{highlighted:i,shouldFill:s,region:e,suggestion:o}))),[e,o,t,i,s]);return(0,p.useEffect)((()=>{const t=["highlighted","fill"].map((t=>{try{return(0,u.lB)(e,t,(({newValue:e})=>{switch(t){case"highlighted":return a(e);case"fill":return l(e)}}),!0)}catch(e){return()=>{}}}));return()=>{t.forEach((e=>e()))}}),[e]),c};function Wk(e,t,n={x:e.left,y:e.top},r=1){if(!e)return e;const o=t*Math.PI/180,i=Math.cos(o),a=Math.sin(o),s=[{x:e.left-n.x,y:e.top-n.y},{x:e.right-n.x,y:e.top-n.y},{x:e.left-n.x,y:e.bottom-n.y},{x:e.right-n.x,y:e.bottom-n.y}].map((e=>({x:e.x*i-e.y*a/r,y:e.x*a*r+e.y*i}))),[l,c]=(0,w.minMax)(s.map((e=>e.x))),[d,u]=(0,w.minMax)(s.map((e=>e.y)));return{left:l+n.x,right:c+n.x,top:d+n.y,bottom:u+n.y}}const $k=h.gK.model({coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc")}).volatile((()=>({relativeX:0,relativeY:0,relativeWidth:0,relativeHeight:0,relativeRadiusX:0,relativeRadiusY:0}))).actions((e=>({afterCreate(){switch(e.startX=e.x,e.startY=e.y,e.coordstype){case"perc":e.relativeX=e.x,e.relativeY=e.y,e.relativeRadiusX=e.radiusX,e.relativeRadiusY=e.radiusY,e.relativeWidth=e.width,e.relativeHeight=e.height;break;case"px":{const{stageWidth:t,stageHeight:n}=e.parent;t&&n&&e.setPosition(e.x,e.y,e.radiusX,e.radiusY,e.rotation);break}}e.checkSizes(),e.updateAppearenceFromState()},setPosition(t,n,r,o,i){var a,s,l,c;e.x=t,e.y=n,e.radiusX=r,e.radiusY=o,e.relativeX=t/(null==(a=e.parent)?void 0:a.stageWidth)*Ye,e.relativeY=n/(null==(s=e.parent)?void 0:s.stageHeight)*Xe,e.relativeRadiusX=r/(null==(l=e.parent)?void 0:l.stageWidth)*Ye,e.relativeRadiusY=o/(null==(c=e.parent)?void 0:c.stageHeight)*Xe,e.rotation=(i+360)%360},setPositionInternal:(t,n,r,o,i)=>e.setPosition(t,n,r,o,i),updateImageSize(t,n,r,o){e.sw=r,e.sh=o,"px"===e.coordstype?(e.x=r*e.relativeX/Ye,e.y=o*e.relativeY/Xe,e.radiusX=r*e.relativeRadiusX/Ye,e.radiusY=o*e.relativeRadiusY/Xe):"perc"===e.coordstype&&(e.x=r*e.x/Ye,e.y=o*e.y/Xe,e.radiusX=r*e.radiusX/Ye,e.radiusY=o*e.radiusY/Xe,e.coordstype="px")}}))),Uk=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"ellipseregion",object:h.gK.late((()=>h.gK.reference(HR))),x:h.gK.number,y:h.gK.number,radiusX:h.gK.number,radiusY:h.gK.number,rotation:0}).volatile((()=>({startX:0,startY:0,scaleX:1,scaleY:1,opacity:h.gK.number,fill:!0,fillColor:V.A.FILL_COLOR,fillOpacity:.2,strokeColor:V.A.STROKE_COLOR,strokeWidth:V.A.STROKE_WIDTH,_supportsTransform:!0,hideable:!0,editableFields:[{property:"x",label:"X"},{property:"y",label:"Y"},{property:"radiusX",label:"Rx"},{property:"radiusY",label:"Ry"},{property:"rotation",label:"icon:angle"}]}))).volatile((()=>({useTransformer:!0,preferTransformer:!0,supportsRotate:!0,supportsScale:!0}))).views((e=>({get store(){return(0,h.Zn)(e)},get bboxCoords(){const t={left:e.x-e.radiusX,top:e.y-e.radiusY,right:e.x+e.radiusX,bottom:e.y+e.radiusY};return 0===e.rotation?t:Wk(t,e.rotation,{x:e.x,y:e.y},e.parent.whRatio)},get canvasX(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasRadiusX(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.radiusX):e.radiusX},get canvasRadiusY(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.radiusY):e.radiusY}}))).actions((e=>({afterCreate(){e.startX=e.x,e.startY=e.y},coordsInside(t,n){const r=e.radiusX,o=e.radiusY;let i=t-e.x,a=n-e.y;const s=e.rotation;return i=i*Math.cos(Math.unit(s,"deg"))-a*Math.sin(Math.unit(s,"deg")),a=i*Math.sin(Math.unit(s,"deg"))+a*Math.cos(Math.unit(s,"deg")),Math.abs(i){var n,r;const{store:o}=e,i=Fk(e),a=null==(n=e.parent)?void 0:n.stageRef,{suggestion:s}=null!=(r=(0,p.useContext)(Uj))?r:{};return e.parent&&e.inViewPort?(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(pj.Pp,{x:e.canvasX,y:e.canvasY,ref:e=>t(e),radiusX:e.canvasRadiusX,radiusY:e.canvasRadiusY,fill:i.fillColor,stroke:i.strokeColor,strokeWidth:i.strokeWidth,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,shadowBlur:0,scaleX:e.scaleX,scaleY:e.scaleY,opacity:1,rotation:e.rotation,name:`${e.id} _transformable`,onTransform:({target:e})=>{e.setAttr("skewX",0),e.setAttr("skewY",0)},onTransformEnd:t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y"),n.getAttr("radiusX")*n.getAttr("scaleX"),n.getAttr("radiusY")*n.getAttr("scaleY"),n.getAttr("rotation")),n.setAttr("scaleX",1),n.setAttr("scaleY",1),e.notifyDrawingFinished()},onDragStart:t=>{e.parent.getSkipInteractions()?t.currentTarget.stopDrag(t.evt):e.annotation.history.freeze(e.id)},onDragEnd:t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y"),n.getAttr("radiusX"),n.getAttr("radiusY"),n.getAttr("rotation")),e.setScale(n.getAttr("scaleX"),n.getAttr("scaleY")),e.annotation.history.unfreeze(e.id),e.notifyDrawingFinished()},dragBoundFunc:jt(e,{x:e.x-e.bboxCoords.left,y:e.y-e.bboxCoords.top}),onMouseOver:()=>{o.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),a.container().style.cursor=V.A.LINKING_MODE_CURSOR):a.container().style.cursor=V.A.POINTER_CURSOR},onMouseOut:()=>{a.container().style.cursor=V.A.DEFAULT_CURSOR,o.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(o.annotationStore.selected.isLinkingMode&&(a.container().style.cursor=V.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))},draggable:!e.isReadOnly(),listening:!s}),(0,_.jsx)(Sk,{item:e,color:i.strokeColor,strokewidth:i.strokeWidth})]}):null}));x.addTag("ellipseregion",Zk,Gk),x.addRegionType(Zk,"image");const Yk=h.gK.model({coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc")}).volatile((()=>({relativeX:0,relativeY:0}))).actions((e=>({afterCreate(){if("perc"===e.coordstype)e.relativeX=e.x,e.relativeY=e.y,e.checkSizes();else{const{stageWidth:t,stageHeight:n}=e.parent;t&&n&&(e.relativeX=e.x/t*Ye,e.relativeY=e.y/n*Xe)}},setPosition(t,n){var r;const o=null==(r=e.control)?void 0:r.getSnappedPoint({x:e.parent.canvasToInternalX(t),y:e.parent.canvasToInternalY(n)});e.x=o.x,e.y=o.y,e.relativeX=o.x/e.parent.stageWidth*Ye,e.relativeY=o.y/e.parent.stageHeight*Xe},updateImageSize(t,n,r,o){"px"===e.coordstype&&(e.x=r*e.relativeX/Ye,e.y=o*e.relativeY/Xe),"perc"===e.coordstype&&(e.x=r*e.x/Ye,e.y=o*e.y/Xe,e.width=r*e.width/Ye,e.coordstype="px")}}))),Xk=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"keypointregion",object:h.gK.late((()=>h.gK.reference(HR))),x:h.gK.number,y:h.gK.number,width:h.gK.number,negative:!1}).volatile((()=>({hideable:!0,_supportsTransform:!0,useTransformer:!1,supportsRotate:!1,supportsScale:!1,editableFields:[{property:"x",label:"X"},{property:"y",label:"Y"}]}))).views((e=>({get store(){return(0,h.Zn)(e)},get bboxCoords(){return{left:e.x-e.width,top:e.y-e.width,right:e.x+e.width,bottom:e.y+e.width}},get canvasX(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasWidth(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.width):e.width}}))).actions((e=>({setPosition(t,n){var r;const o=null==(r=e.control)?void 0:r.getSnappedPoint({x:e.parent.canvasToInternalX(t),y:e.parent.canvasToInternalY(n)});e.x=o.x,e.y=o.y},updateImageSize(){},serialize(){const t={x:(0,O.VS)(O.MV)?e.x:e.convertXToPerc(e.x),y:(0,O.VS)(O.MV)?e.y:e.convertYToPerc(e.y),width:(0,O.VS)(O.MV)?e.width:e.convertHDimensionToPerc(e.width)},n=e.parent.createSerializedResult(e,t);return e.dynamic&&(n.is_positive=!e.negative,n.value.labels=e.labels),n}}))),qk=h.gK.compose("KeyPointRegionModel",it,ht,We,_k,sn,Xk,...(0,O.VS)(O.MV)?[]:[Yk]),Jk=Pk((({item:e,setShapeRef:t})=>{var n,r,o,i;const{store:a}=e,{suggestion:s}=null!=(n=(0,p.useContext)(Uj))?n:{},l=Fk(e,{includeFill:!0,defaultFillColor:"#000",defaultStrokeColor:"#fff",defaultOpacity:(null!=(r=e.style)?r:e.tag)?.6:1,sameStrokeWidthForSelected:!0}),c={opacity:1,fill:l.fillColor,stroke:l.strokeColor,strokeWidth:Math.max(1,l.strokeWidth),strokeScaleEnabled:!1,shadowBlur:0},d=null==(o=e.parent)?void 0:o.stageRef;return e.parent&&e.inViewPort?(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(pj.jl,Object.assign({x:e.canvasX,y:e.canvasY,ref:e=>t(e),radius:Math.max(e.canvasWidth,2)/(null==(i=e.parent)?void 0:i.zoomScale),perfectDrawEnabled:!1,name:`${e.id} _transformable`,onDragStart:t=>{e.parent.getSkipInteractions()?t.currentTarget.stopDrag(t.evt):e.annotation.history.freeze(e.id)},onDragEnd:t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y")),n.setAttr("x",e.canvasX),n.setAttr("y",e.canvasY),e.annotation.history.unfreeze(e.id),e.notifyDrawingFinished()},dragBoundFunc:jt(e),transformsEnabled:"position",onTransformEnd:t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y")),n.setAttr("scaleX",1),n.setAttr("scaleY",1)},onMouseOver:()=>{a.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),d.container().style.cursor="crosshair"):d.container().style.cursor="pointer"},onMouseOut:()=>{d.container().style.cursor="default",a.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(a.annotationStore.selected.isLinkingMode&&(d.container().style.cursor=V.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))}},c,{draggable:!e.isReadOnly(),listening:!s})),(0,_.jsx)(Rk,{item:e,color:l.strokeColor})]}):null}));x.addTag("keypointregion",qk,Jk),x.addRegionType(qk,"image",(e=>"x"in e&&"y"in e&&"width"in e&&!("height"in e)));const Qk=h.gK.model().volatile((()=>({relativeX:0,relativeY:0,initX:0,initY:0}))).actions((e=>({afterCreate(){e.initX=e.x,e.initY=e.y,"perc"===e.parent.coordstype?(e.relativeX=e.x,e.relativeY=e.y):(e.relativeX=e.x/e.stage.stageWidth*Ye,e.relativeY=e.y/e.stage.stageHeight*Xe)},movePoint(t,n){e.initX=e.initX+t,e.initY=e.initY+n,e.x=e.x+t,e.y=e.y+n,e.relativeX=e.x/e.stage.stageWidth*Ye,e.relativeY=e.y/e.stage.stageHeight*Xe},_setPos(t,n){e.initX=t,e.initY=n,e.relativeX=t/e.stage.stageWidth*Ye,e.relativeY=n/e.stage.stageHeight*Xe,e.x=t,e.y=n},_movePoint(t,n){var r;const o=null==(r=e.parent.control)?void 0:r.getSnappedPoint({x:e.stage.canvasToInternalX(t),y:e.stage.canvasToInternalY(n)});e._setPos(o.x,o.y)}}))),eO=h.gK.model("PolygonPoint",{id:h.gK.optional(h.gK.identifier,E),x:h.gK.number,y:h.gK.number,index:h.gK.number,style:"circle",size:"small"}).volatile((()=>({selected:!1}))).views((e=>({get parent(){return(0,h.p7)(e,2)?(0,h.PA)(e,2):null},get stage(){var t;return null==(t=e.parent)?void 0:t.parent},get annotation(){return(0,h.Zn)(e).annotationStore.selected},get canvasX(){var t;return(0,O.VS)(O.MV)?null==(t=e.stage)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,O.VS)(O.MV)?null==(t=e.stage)?void 0:t.internalToCanvasY(e.y):e.y}}))).actions((e=>({movePoint(t,n){const r=e.stage.canvasToInternalX(t),o=e.stage.canvasToInternalY(n);e.x=e.x+r,e.y=e.y+o},_setPos(t,n){e.x=t,e.y=n},_movePoint(t,n){var r;const o=null==(r=e.parent.control)?void 0:r.getSnappedPoint({x:e.stage.canvasToInternalX(t),y:e.stage.canvasToInternalY(n)});e._setPos(o.x,o.y)},closeStartPoint(){e.annotation.isReadOnly()||e.parent.closed||e.parent.mouseOverStartPoint&&e.parent.closePoly()},handleMouseOverStartPoint(t){var n;t.cancelBubble=!0;const r=null==(n=e.stage)?void 0:n.stageRef;if(!r)return;if(r.container().style.cursor="crosshair",e.parent.closed||e.parent.points.length<3)return;const o=t.target;"rectangle"===e.style&&(o.setX(o.x()-o.width()/2),o.setY(o.y()-o.height()/2));const i={small:2,medium:3,large:4}[e.size];o.scale({x:i/e.stage.zoomScale,y:i/e.stage.zoomScale}),e.parent.setMouseOverStartPoint(!0)},handleMouseOutStartPoint(t){var n;const r=t.target,o=null==(n=e.stage)?void 0:n.stageRef;o&&(o.container().style.cursor="default","rectangle"===e.style&&(r.setX(r.x()+r.width()/2),r.setY(r.y()+r.height()/2)),r.scale({x:1/e.stage.zoomScale,y:1/e.stage.zoomScale}),e.parent.setMouseOverStartPoint(!1))},getSkipInteractions:()=>e.parent.control.obj.getSkipInteractions()}))),tO=(0,O.VS)(O.MV)?eO:h.gK.compose("PolygonPoint",eO,Qk),nO=(0,y.PA)((({item:e,name:t})=>{if(!e.parent)return;const[n,r]=(0,p.useState)(!0),o=Fk(e.parent),i={small:1,medium:2,large:3},a={small:4,medium:8,large:12}[e.size],s=0===e.index?{hitStrokeWidth:12,fill:o.strokeColor||e.primary,onMouseOver:e.handleMouseOverStartPoint,onMouseOut:e.handleMouseOutStartPoint}:null,l={onDragMove:t=>{if(e.getSkipInteractions())return!1;if(t.target!==t.currentTarget)return;const n=t.target;let{x:r,y:o}=n.attrs;r<0&&(r=0),o<0&&(o=0),r>e.stage.stageWidth&&(r=e.stage.stageWidth),o>e.stage.stageHeight&&(o=e.stage.stageHeight),e._movePoint(r,o),n.setAttr("x",e.canvasX),n.setAttr("y",e.canvasY)},onDragStart:()=>{if(e.getSkipInteractions())return r(!1),!1;e.annotation.history.freeze()},onDragEnd:t=>{r(!0),e.annotation.history.unfreeze(),t.cancelBubble=!0},onMouseOver:t=>{var n;t.cancelBubble=!0;const r=null==(n=e.stage)?void 0:n.stageRef;r&&(r.container().style.cursor="crosshair")},onMouseOut:()=>{var t;const n=null==(t=e.stage)?void 0:t.stageRef;n&&(n.container().style.cursor="default")},onTransformEnd(e){if(e.target!==e.currentTarget)return;const t=e.target;t.setAttr("x",0),t.setAttr("y",0),t.setAttr("scaleX",1),t.setAttr("scaleY",1)}},c=e.selected?"green":"white";return"circle"===e.style?(0,_.jsx)(pj.jl,Object.assign({name:t,x:e.canvasX,y:e.canvasY,radius:a,fill:c,stroke:"black",strokeWidth:i[e.size],dragOnTop:!1,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,scaleX:1/(e.stage.zoomScale||1),scaleY:1/(e.stage.zoomScale||1),onDblClick:()=>{e.parent.deletePoint(e)},onClick:t=>{if((0,O.VS)(O.Cw)&&t.evt.altKey)return e.parent.deletePoint(e);e.parent.isDrawing&&1===e.parent.points.length||(t.evt.preventDefault(),t.cancelBubble=!0,e.parent.mouseOverStartPoint?(e.closeStartPoint(),e.parent.notifyDrawingFinished()):e.parent.setSelectedPoint(e))}},l,s,{draggable:!e.parent.isReadOnly()&&n}),t):(0,_.jsx)(pj.rw,Object.assign({name:t,x:e.x-a/2,y:e.y-a/2,width:a,height:a,fill:c,stroke:"black",strokeWidth:i[e.size],strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,dragOnTop:!1},l,s,{draggable:!e.parent.isReadOnly()}),t)}));var rO=n(67695);const oO=h.gK.model({coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc")}).actions((e=>({updateImageSize(t,n,r,o){"px"===e.coordstype&&e.points.forEach((e=>{const t=r*e.relativeX/Ye,n=o*e.relativeY/Xe;e._setPos(t,n)})),e.annotation.sentUserGenerate||"perc"!==e.coordstype||e.points.forEach((t=>{const n=r*t.x/Ye,i=o*t.y/Xe;e.coordstype="px",t._setPos(n,i)}))}}))),iO=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"polygonregion",object:h.gK.late((()=>h.gK.reference(HR))),points:h.gK.array(h.gK.union(tO,h.gK.array(h.gK.number)),[]),closed:!0}).volatile((()=>({mouseOverStartPoint:!1,selectedPoint:null,hideable:!0,_supportsTransform:!0,useTransformer:!0,preferTransformer:!1,supportsRotate:!1,supportsScale:!0}))).views((e=>({get store(){return(0,h.Zn)(e)},get bboxCoords(){var t;if(null==(t=e.points)||!t.length||!(0,h._n)(e))return{};const n=e.points.reduce(((e,t)=>({left:Math.min(e.left,t.x),top:Math.min(e.top,t.y),right:Math.max(e.right,t.x),bottom:Math.max(e.bottom,t.y)})),{left:e.points[0].x,top:e.points[0].y,right:e.points[0].x,bottom:e.points[0].y});return(0,O.VS)(O.MV)||(0,w.fixMobxObserve)(e.parent.stageWidth,e.parent.stageHeight),n},get flattenedPoints(){return this.points.map((e=>[e.canvasX,e.canvasY])).reduce(((e,t)=>e.concat(t)),[])}}))).actions((e=>({afterCreate(){e.points.length&&(e.points[0].id||(e.points=e.points.map((([t,n],r)=>({id:E(),x:t,y:n,size:e.pointSize,style:e.pointStyle,index:r})))),(0,O.VS)(O.vz)||(e.closed=e.points.length>2),e.checkSizes())},setMouseOverStartPoint(t){e.mouseOverStartPoint=t},setSelectedPoint(t){e.selectedPoint&&(e.selectedPoint.selected=!1),t.selected=!0,e.selectedPoint=t},handleMouseMove({e:t,flattenedPoints:n}){const{offsetX:r,offsetY:o}=t.evt,[i,a]=e.parent.fixZoomedCoords([r,o]),[s,l]=sO({flattenedPoints:n,cursorX:i,cursorY:a});!function({point:e,group:t,layer:n,zoom:r}){const o=lO({layer:n})||function({point:e,group:t,layer:n,zoom:r}){const o=new yt.A.Circle({name:"hoverAnchor",x:e[0],y:e[1],stroke:rO.green.primary,fill:rO.green[0],scaleX:1/(r||1),scaleY:1/(r||1),strokeWidth:2,radius:5});return t.add(o),n.draw(),o}({point:e,group:t,layer:n,zoom:r});o.to({x:e[0],y:e[1],duration:0})}({point:[s,l],group:t.currentTarget,layer:t.currentTarget.getLayer(),zoom:e.parent.zoomScale})},handleMouseLeave({e}){cO({layer:e.currentTarget.getLayer()})},handleLineClick({e:t,flattenedPoints:n,insertIdx:r}){if(!e.closed||!e.selected)return;t.cancelBubble=!0,cO({layer:t.currentTarget.getLayer()});const{offsetX:o,offsetY:i}=t.evt,[a,s]=e.parent.fixZoomedCoords([o,i]),l=sO({flattenedPoints:n,cursorX:a,cursorY:s});e.insertPoint(r,l[0],l[1])},deletePoint(t){const n=e.points.length<=3&&t.parent.closed,r=1===e.points.length,o=e.selectedPoint===t;n||r||(o&&(e.selectedPoint=null),(0,h.zr)(t))},addPoint(t,n){var r;if(e.closed)return;const o=null==(r=e.control)?void 0:r.getSnappedPoint({x:t,y:n});e._addPoint(o.x,o.y)},setPoints(t){e.points.forEach(((e,n)=>{e.x=t[2*n],e.y=t[2*n+1]}))},insertPoint(t,n,r){var o;const i=null==(o=e.control)?void 0:o.getSnappedPoint({x:e.parent.canvasToInternalX(n),y:e.parent.canvasToInternalY(r)}),a=e.points[t-1]&&e.parent.isSamePixel(i,e.points[t-1]),s=e.points[t]&&e.parent.isSamePixel(i,e.points[t]);if(a||s)return;const l={id:E(),x:i.x,y:i.y,size:e.pointSize,style:e.pointStyle,index:e.points.length};return e.points.splice(t,0,l),e.points[t]},_addPoint(t,n){const r=e.points[0];e.parent.isSamePixel(r,{x:t,y:n})?e.closePoly():e.points.push({id:E(),x:t,y:n,size:e.pointSize,style:e.pointStyle,index:e.points.length})},closePoly(){e.closed||e.points.length<3||(e.closed=!0)},canClose(t,n){if(e.points.length<2)return!1;const r=e.points[0],o=t,i=n;return(r.x-o)**2+(r.y-i)**2<50},destroyRegion(){(0,h.Yo)(e.points),(0,h.zr)(e.points)},afterUnselectRegion(){e.selectedPoint&&(e.selectedPoint.selected=!1)},setScale(t,n){e.scaleX=t,e.scaleY=n},updateImageSize(){},serialize(){if(!(0,O.VS)(O.vz)&&e.points.length<3)return null;const t=Object.assign({points:(0,O.VS)(O.MV)?e.points.map((e=>[e.x,e.y])):e.points.map((t=>[e.convertXToPerc(t.x),e.convertYToPerc(t.y)]))},(0,O.VS)(O.vz)?{closed:e.closed}:{});return e.parent.createSerializedResult(e,t)}}))),aO=h.gK.compose("PolygonRegionModel",it,ht,We,_k,iO,...(0,O.VS)(O.MV)?[]:[oO]);function sO({flattenedPoints:e,cursorX:t,cursorY:n}){const[r,o,i,a]=e;return[t-(a-o)*(i*o-r*a+t*(a-o)-n*(i-r))/((a-o)*(a-o)+(i-r)*(i-r)),((i-r)*(i*o-r*a)+(i-r)*(a-o)*t+(a-o)*(a-o)*n)/((a-o)*(a-o)+(i-r)*(i-r))]}function lO({layer:e}){return e.findOne(".hoverAnchor")}function cO({layer:e}){const t=lO({layer:e});t&&(t.destroy(),e.draw())}const dO=(0,p.memo)((0,y.PA)((({item:e,colors:t,dragProps:n,draggable:r})=>{const{flattenedPoints:o}=e,i="poly";return(0,_.jsx)(pj.YJ,{name:i,children:(0,_.jsx)(pj.N1,Object.assign({name:"_transformable",lineJoin:"round",lineCap:"square",stroke:t.strokeColor,strokeWidth:t.strokeWidth,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,points:o,fill:t.fillColor,closed:!0},n,{onTransformEnd:t=>{if(t.target!==t.currentTarget)return;const n=t.target,r=[n.getAttr("x",0),n.getAttr("y",0)],o=[n.getAttr("scaleX",1),n.getAttr("scaleY",1)],i=n.getAttr("points");e.setPoints(i.reduce(((t,n,a)=>{if(a%2==0){var s;const l=null==(s=e.control)?void 0:s.getSnappedPoint({x:e.parent.canvasToInternalX(n*o[0]+r[0]),y:e.parent.canvasToInternalY(i[a+1]*o[1]+r[1])});t.push(l.x,l.y)}return t}),[])),n.setAttr("x",0),n.setAttr("y",0),n.setAttr("scaleX",1),n.setAttr("scaleY",1)},draggable:r}))},i)}))),uO=(0,y.PA)((({name:e,item:t,idx:n,p1:r,p2:o,closed:i,regionStyles:a})=>{const s=n+1,l=[r.canvasX,r.canvasY,o.canvasX,o.canvasY],c=i?{stroke:"transparent",strokeWidth:a.strokeWidth,strokeScaleEnabled:!1}:{stroke:a.strokeColor,strokeWidth:a.strokeWidth,strokeScaleEnabled:!1};return(0,_.jsx)(pj.YJ,{name:e,onClick:e=>t.handleLineClick({e,flattenedPoints:l,insertIdx:s}),onMouseMove:e=>{t.closed&&t.selected&&!t.isReadOnly()&&t.handleMouseMove({e,flattenedPoints:l})},onMouseLeave:e=>t.handleMouseLeave({e}),children:(0,_.jsx)(pj.N1,Object.assign({lineJoin:"round",opacity:1,points:l,hitStrokeWidth:20,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1},c))},e)})),hO=(0,p.memo)((0,y.PA)((({item:e,regionStyles:t})=>{const{points:n,closed:r}=e,o="borders";return!e.closed||!e.parent.useTransformer&&e.selected?(0,_.jsx)(pj.YJ,{name:o,children:n.map(((o,i)=>{const a=i,s=i===n.length-1?0:i+1;return r||0!==s?(0,_.jsx)(uO,{name:`border_${a}_${s}`,item:e,idx:a,p1:n[i],p2:n[s],closed:r,regionStyles:t},`border_${a}_${s}`):null}))},o):null}))),gO=Pk((({item:e,setShapeRef:t})=>{var n,r,o,i;const{store:a}=e,{suggestion:s}=null!=(n=(0,p.useContext)(Uj))?n:{},l=Fk(e,{useStrokeAsFill:!0});const c=(0,p.useMemo)((()=>{let t=!1;return{onDragStart:n=>{n.target===n.currentTarget&&(e.parent.getSkipInteractions()?n.currentTarget.stopDrag(n.evt):(t=!0,e.annotation.setDragMode(!0),e.annotation.history.freeze(e.id)))},dragBoundFunc:jt(e,{x:-e.bboxCoords.left,y:-e.bboxCoords.top}),onDragEnd:n=>{if(!t)return;const r=n.target;if(n.target===n.currentTarget){var o,i,a,s,l;e.annotation.setDragMode(!1);const t=null==(o=e.control)?void 0:o.getSnappedPoint({x:null==(i=e.parent)?void 0:i.canvasToInternalX(r.getAttr("x")),y:null==(a=e.parent)?void 0:a.canvasToInternalY(r.getAttr("y"))});t.x=null==(s=e.parent)?void 0:s.internalToCanvasX(t.x),t.y=null==(l=e.parent)?void 0:l.internalToCanvasY(t.y),e.points.forEach((e=>e.movePoint(t.x,t.y))),e.annotation.history.unfreeze(e.id)}r.setAttr("x",0),r.setAttr("y",0),t=!1}}}),[e.bboxCoords.left,e.bboxCoords.top]);if((0,p.useEffect)((()=>{(0,O.VS)(O.vz)&&!e.closed&&e.control.tools.Polygon.resumeUnfinishedRegion(e)}),[e.closed]),!e.parent)return null;if(!e.inViewPort)return null;const d=null==(r=e.parent)?void 0:r.stageRef;return(0,_.jsxs)(pj.YJ,Object.assign({name:e.id,ref:e=>t(e),onMouseOver:()=>{a.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),d.container().style.cursor=V.A.LINKING_MODE_CURSOR):d.container().style.cursor=V.A.POINTER_CURSOR},onMouseOut:()=>{d.container().style.cursor=V.A.DEFAULT_CURSOR,a.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||e.isDrawing||(t.cancelBubble=!0,e.closed&&(a.annotationStore.selected.isLinkingMode&&(d.container().style.cursor=V.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t)))}},c,{draggable:!(e.isReadOnly()||e.inSelection&&1!==(null==(o=e.parent)||null==(o=o.selectedRegions)?void 0:o.length)),listening:!s,children:[(0,_.jsx)(kk,{item:e,color:l.strokeColor}),e.mouseOverStartPoint,e.points&&e.closed?(0,_.jsx)(dO,{item:e,colors:l,dragProps:c,draggable:!e.isReadOnly()&&e.inSelection&&(null==(i=e.parent)||null==(i=i.selectedRegions)?void 0:i.length)>1}):null,e.points&&!e.isReadOnly()?(0,_.jsx)(hO,{item:e,regionStyles:l}):null,e.points&&!e.isReadOnly()?function(t){const n="anchors";return!e.closed||!e.parent.useTransformer&&e.selected?(0,_.jsx)(pj.YJ,{name:n,children:t.map(((n,r)=>function({points:t,idx:n}){const r=`anchor_${t.length}_${n}`,o=t[n];if(!e.closed||e.closed&&e.selected)return(0,_.jsx)(nO,{item:o,name:r},r)}({points:t,idx:r})))},n):null}(e.points):null]}),e.id?e.id:E(5))}));x.addTag("polygonregion",aO,gO),x.addRegionType(aO,"image",(e=>!!e.points));const mO=h.gK.model({coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc")}).volatile((()=>({relativeX:0,relativeY:0,relativeWidth:0,relativeHeight:0}))).actions((e=>({afterCreate(){switch(e.coordstype){case"perc":e.relativeX=e.x,e.relativeY=e.y,e.relativeWidth=e.width,e.relativeHeight=e.height;break;case"px":{const{stageWidth:t,stageHeight:n}=e.parent;t&&n&&e.setPosition(e.x,e.y,e.width,e.height,e.rotation);break}}e.checkSizes(),e.updateAppearenceFromState()},setPosition(t,n,r,o,i){var a,s,l,c;e.x=t,e.y=n,e.width=r,e.height=o,e.relativeX=t/(null==(a=e.parent)?void 0:a.stageWidth)*Ye,e.relativeY=n/(null==(s=e.parent)?void 0:s.stageHeight)*Xe,e.relativeWidth=r/(null==(l=e.parent)?void 0:l.stageWidth)*Ye,e.relativeHeight=o/(null==(c=e.parent)?void 0:c.stageHeight)*Xe,e.rotation=(i+360)%360},setPositionInternal:(t,n,r,o,i)=>e.setPosition(t,n,r,o,i),updateImageSize(t,n,r,o){"px"===e.coordstype?(e.x=r*e.relativeX/Ye,e.y=o*e.relativeY/Xe,e.width=r*e.relativeWidth/Ye,e.height=o*e.relativeHeight/Xe):"perc"===e.coordstype&&(e.x=r*e.x/Ye,e.y=o*e.y/Xe,e.width=r*e.width/Ye,e.height=o*e.height/Xe,e.coordstype="px")},draw(t,n,r){const o=e.height;if(1===r.length)e.width=e.getDistanceBetweenPoints({x:t,y:n},e),e.rotation=e.rotationAtCreation=Math.atan2(n-e.y,t-e.x)*(180/Math.PI);else if(2===r.length){const{y:o,x:i}=r[0],{y:a,x:s}=r[1];e.isAboveTheLine(r[0],r[1],{x:t,y:n})?(e.x=s,e.y=a,e.rotation=e.rotationAtCreation+180):(e.x=i,e.y=o,e.rotation=e.rotationAtCreation),e.height=e.getHeightOnPerpendicular(r[0],r[1],{x:t,y:n})}e.setPosition(e.x,e.y,e.width,e.height,e.rotation);const i=null==e?void 0:e.bboxCoords;((null==i?void 0:i.left)<0||(null==i?void 0:i.top)<0||(null==i?void 0:i.right)>e.parent.stageWidth||(null==i?void 0:i.bottom)>e.parent.stageHeight)&&(e.height=o)},getHeightOnPerpendicular(e,t,n){const r=t.x-e.x,o=t.y-e.y,i=t.y-n.y,a=i/r*o,s=n.x-t.x-a,l=Math.sqrt(a*a+i*i),c=l+s/l*a;return Math.abs(c)}}))),pO=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"rectangleregion",object:h.gK.late((()=>h.gK.reference(HR))),x:h.gK.number,y:h.gK.number,width:h.gK.number,height:h.gK.number,rotation:0,rotationAtCreation:0}).volatile((()=>({startX:0,startY:0,scaleX:1,scaleY:1,opacity:1,fill:!0,fillColor:"#ff8800",fillOpacity:.2,strokeColor:V.A.STROKE_COLOR,strokeWidth:V.A.STROKE_WIDTH,_supportsTransform:!0,hideable:!0,editableFields:[{property:"x",label:"X"},{property:"y",label:"Y"},{property:"width",label:"W"},{property:"height",label:"H"},{property:"rotation",label:"icon:angle"}]}))).volatile((()=>({useTransformer:!0,preferTransformer:!0,supportsRotate:!0,supportsScale:!0}))).views((e=>({get store(){return(0,h.Zn)(e)},get parent(){return(0,h._n)(e)?e.object:null},get bboxCoords(){const t={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height};return 0!==e.rotation&&e.parent?Wk(t,e.rotation,{x:e.x,y:e.y},e.parent.whRatio):t},get canvasX(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasWidth(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.width):e.width},get canvasHeight(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.height):e.height}}))).actions((e=>({afterCreate(){e.startX=e.x,e.startY=e.y},getDistanceBetweenPoints(e,t){const{x:n,y:r}=e,{x:o,y:i}=t,a=n-o,s=r-i;return Math.sqrt(a**2+s**2)},getHeightOnPerpendicular(e,t,n){const r=t.x-e.x,o=t.y-e.y;return Math.abs(o*n.x-r*n.y+t.x*e.y-t.y*e.x)/Math.sqrt(o*o+r*r)},isAboveTheLine:(e,t,n)=>(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)<0,draw(t,n,r){const o=e.height,i=e.parent.internalToCanvasX(t),a=e.parent.internalToCanvasY(n);if(1===r.length){const t=e.getDistanceBetweenPoints({x:i,y:a},{x:e.canvasX,y:e.canvasY});e.width=e.parent.canvasToInternalX(t),e.rotation=e.rotationAtCreation=Math.atan2(a-e.canvasY,i-e.canvasX)*(180/Math.PI)}else if(2===r.length){const t=r.map((({x:t,y:n})=>({x:e.parent.internalToCanvasX(t),y:e.parent.internalToCanvasY(n)}))),{y:n,x:o}=r[0],{y:s,x:l}=r[1];e.isAboveTheLine(t[0],t[1],{x:i,y:a})?(e.x=l,e.y=s,e.rotation=e.rotationAtCreation+180):(e.x=o,e.y=n,e.rotation=e.rotationAtCreation);const c=e.getHeightOnPerpendicular(t[0],t[1],{x:i,y:a});e.height=e.parent.canvasToInternalY(c)}e.setPositionInternal(e.x,e.y,e.width,e.height,e.rotation);const s=null==e?void 0:e.bboxCoords;((null==s?void 0:s.left)<0||(null==s?void 0:s.top)<0||(null==s?void 0:s.right)>Ye||(null==s?void 0:s.bottom)>Xe)&&(e.height=o)},coordsInside(t,n){const r=e.x,o=e.y,i=e.width*(e.scaleX||1),a=e.height*(e.scaleY||1);return t>r&&to&&n1&&!(0,O.VS)(O.MV)?e.convertXToPerc(e.x):e.x,y:e.parent.stageWidth>1&&!(0,O.VS)(O.MV)?e.convertYToPerc(e.y):e.y,width:e.parent.stageWidth>1&&!(0,O.VS)(O.MV)?e.convertHDimensionToPerc(e.width):e.width,height:e.parent.stageWidth>1&&!(0,O.VS)(O.MV)?e.convertVDimensionToPerc(e.height):e.height,rotation:e.rotation};return e.parent.createSerializedResult(e,t)}}))),fO=h.gK.compose("RectRegionModel",it,We,ht,_k,sn,pO,...(0,O.VS)(O.MV)?[]:[mO]),vO=Pk((({item:e,setShapeRef:t})=>{var n,r,o;const{store:i}=e,{suggestion:a}=null!=(n=(0,p.useContext)(Uj))?n:{},s=Fk(e,{suggestion:a}),l=null==(r=e.parent)?void 0:r.stageRef,c={};return e.parent&&e.inViewPort?(a||e.isReadOnly()||(c.onTransform=({target:e})=>{e.setAttr("skewX",0),e.setAttr("skewY",0)},c.onTransformEnd=t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y"),n.getAttr("width")*n.getAttr("scaleX"),n.getAttr("height")*n.getAttr("scaleY"),n.getAttr("rotation")),n.setAttr("scaleX",1),n.setAttr("scaleY",1),e.notifyDrawingFinished()},c.onDragStart=t=>{e.parent.getSkipInteractions()?t.currentTarget.stopDrag(t.evt):e.annotation.history.freeze(e.id)},c.onDragEnd=t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y"),n.getAttr("width"),n.getAttr("height"),n.getAttr("rotation")),e.setScale(n.getAttr("scaleX"),n.getAttr("scaleY")),e.annotation.history.unfreeze(e.id),e.notifyDrawingFinished()},c.dragBoundFunc=jt(e,{x:e.x-e.bboxCoords.left,y:e.y-e.bboxCoords.top})),(0,_.jsxs)(Mk,{item:e,children:[(0,_.jsx)(pj.rw,Object.assign({x:e.canvasX,y:e.canvasY,ref:e=>t(e),width:e.canvasWidth,height:e.canvasHeight,fill:s.fillColor,stroke:s.strokeColor,strokeWidth:s.strokeWidth,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,shadowBlur:0,dash:a?[10,10]:null,scaleX:e.scaleX,scaleY:e.scaleY,opacity:1,rotation:e.rotation,draggable:!e.isReadOnly(),name:`${e.id} _transformable`},c,{onMouseOver:()=>{i.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),l.container().style.cursor=V.A.LINKING_MODE_CURSOR):l.container().style.cursor=V.A.POINTER_CURSOR},onMouseOut:()=>{l.container().style.cursor=V.A.DEFAULT_CURSOR,i.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(i.annotationStore.selected.isLinkingMode&&(l.container().style.cursor=V.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))},listening:!(a||null!=(o=e.annotation)&&o.isDrawing)})),(0,_.jsx)(jk,{item:e,color:s.strokeColor,strokewidth:s.strokeWidth})]})):null}));function yO(e){const t=(0,h.dV)(e);return(0,h.Pw)(e).create(Object.assign({},t,{id:E()}))}x.addTag("rectangleregion",fO,vO),x.addRegionType(fO,"image");const bO=h.gK.model({selected:h.gK.optional(h.gK.boolean,!1),group:h.gK.optional(h.gK.string,"default"),shortcut:h.gK.optional(h.gK.maybeNull(h.gK.string),null)}).views((e=>({get obj(){var t,n;return null!=(t=null==(n=e.manager)?void 0:n.obj)?t:(0,h._$)(e).object},get manager(){return(0,h._$)(e).manager},get control(){return(0,h._$)(e).control},get viewClass(){return()=>null},get fullName(){return e.toolName+(e.dynamic?"-dynamic":"")},get clonedStates(){const t=[e.control],n=t?t.filter((e=>e.isSelected)):null;return n?n.map((e=>yO(e))):null},get getActiveShape(){const t=e.obj;return t.regs[t.regs.length-1]},get getSelectedShape(){return e.control.annotation.highlightedNode},get extraShortcuts(){return{}},get shouldPreserveSelectedState(){if(!e.obj)return!1;return(0,h.Zn)(e.obj).settings.preserveSelectedTool},get isPreserved(){var t;return window.localStorage.getItem(`selected-tool:${null==(t=e.obj)?void 0:t.name}`)===e.fullName}}))).actions((e=>({setSelected(t){if(e.selected=t,e.afterUpdateSelected(),t&&e.obj){const t=`selected-tool:${e.obj.name}`;e.shouldPreserveSelectedState&&window.localStorage.setItem(t,e.fullName)}},afterUpdateSelected(){},event(t,n,r){const o=`${t}Ev`;void 0!==e[o]&&e[o].call(e,n,r)},shouldSkipInteractions(t){const n=t.evt&&(t.evt.metaKey||t.evt.ctrlKey),r=e.control.annotation.hasSelection;return!!n&&!r}}))),xO=h.gK.compose(bO,Pe),wO=h.gK.model("DrawingTool",{default:!0,mode:h.gK.optional(h.gK.enumeration(["drawing","viewing"]),"viewing"),unselectRegionOnToolChange:!0,isDrawingTool:!0}).volatile((()=>({currentArea:null}))).views((e=>({createRegionOptions:e=>Object.assign({},e,{coordstype:"px"}),get tagTypes(){return console.error("Drawing tool model needs to implement tagTypes getter in views"),{}},isIncorrectControl:()=>e.tagTypes.stateTypes===e.control.type&&!e.control.isSelected,isIncorrectLabel:()=>!e.obj.checkLabels(),get isDrawing(){return"drawing"===e.mode},get getActiveShape(){return e.currentArea},getCurrentArea:()=>e.currentArea,current:()=>e.currentArea,canStart:()=>!e.isDrawing&&!e.annotation.isReadOnly(),get defaultDimensions(){return console.warn("Drawing tool model needs to implement defaultDimentions getter in views"),{}},get MIN_SIZE(){return(0,O.VS)(O.MV)?{X:jj.X/e.obj.stageScale/e.obj.stageWidth*Ye,Y:jj.Y/e.obj.stageScale/e.obj.stageHeight*Xe}:{X:jj.X/e.obj.stageScale,Y:jj.Y/e.obj.stageScale}}}))).actions((e=>{let t={ts:0,x:0,y:0};return{event(n,r,[o,i,a,s]){if(r.button>0||r.shiftKey)return;let l=`${n}Ev`;if(void 0!==e[l]&&e[l].call(e,r,[o,i],[a,s]),"click"===n){const n=r.timeStamp;n-t.ts<300&&e.comparePointsWithThreshold(t,{x:o,y:i})&&(l=`dbl${l}`,void 0!==e[l]&&e[l].call(e,r,[o,i],[a,s])),t={ts:n,x:o,y:i}}},comparePointsWithThreshold(t,n,r={x:e.MIN_SIZE.X,y:e.MIN_SIZE.Y}){if(t&&n)return"number"==typeof r&&(r={x:r,y:r}),Math.abs(t.x-n.x)({createDrawingRegion(t){const n=e.control,r=n.getResultValue();return e.currentArea=e.obj.createDrawingRegion(t,r,n,!1),e.currentArea.setDrawing(!0),e.applyActiveStates(e.currentArea),e.annotation.setIsDrawing(!0),e.currentArea},resumeUnfinishedRegion(t){e.currentArea=t,e.currentArea.setDrawing(!0),e.annotation.regionStore.selection._updateResultsFromRegions([e.currentArea]),e.mode="drawing",e.annotation.setIsDrawing(!0),e.annotation.regionStore.selection.drawingSelect(e.currentArea),null==e.listenForClose||e.listenForClose()},commitDrawingRegion(){const{currentArea:t,control:n,obj:r}=e;if(!t)return;const o=t.toJSON(),i=Object.keys(t.serialize().value).reduce(((e,t)=>(e[t]=o[t],e)),{coordstype:"px",dynamic:e.dynamic}),[a,...s]=t.results,l=e.annotation.createResult(i,a.value.toJSON(),n,r);return s.forEach((e=>l.addResult(e.toJSON()))),t.setDrawing(!1),e.deleteRegion(),l.notifyDrawingFinished(),l},createRegion(t,n=!1){const r=e.control,o=r.getResultValue();return e.currentArea=e.annotation.createResult(t,o,r,e.obj,n),e.applyActiveStates(e.currentArea),e.currentArea},deleteRegion(){e.currentArea=null,e.obj.deleteDrawingRegion()},applyActiveStates(t){e.obj.activeStates().forEach((e=>{t.setValue(e)}))},beforeCommitDrawing:()=>!0,canStartDrawing:()=>!e.isIncorrectControl()&&(!(0,O.VS)(O.Zr)||!e.isIncorrectLabel())&&e.canStart()&&!e.annotation.isDrawing,startDrawing(t,n){e.annotation.history.freeze(),e.mode="drawing",e.currentArea=e.createDrawingRegion(e.createRegionOptions({x:t,y:n}))},finishDrawing(){e.beforeCommitDrawing()?e._finishDrawing():(e.deleteRegion(),e.control.type===e.tagTypes.stateTypes&&e.annotation.unselectAll(!0),e._resetState())},_finishDrawing(){e.commitDrawingRegion(),e._resetState()},_resetState(){e.annotation.setIsDrawing(!1),e.annotation.history.unfreeze(),e.mode="viewing"}}))),CO=wO.named("TwoPointsDrawingTool").views((e=>({get defaultDimensions(){return{width:e.MIN_SIZE.X,height:e.MIN_SIZE.Y}}}))).actions((e=>{const t=1,n=2;let r=0,o=0,i=null,a={x:0,y:0};const s={finishDrawing:e.finishDrawing};return{updateDraw:In()(((t,n)=>{0!==r&&e.draw(t,n)}),48),draw(t,n){const r=e.getCurrentArea();if(!r)return;const o=r.type.includes("ellipse"),i=(0,O.VS)(O.MV)?Ye:e.obj.stageWidth,a=(0,O.VS)(O.MV)?Xe:e.obj.stageHeight;let{x1:s,y1:l,x2:c,y2:d}=o?{x1:r.startX,y1:r.startY,x2:t,y2:n}:rn.Image.reverseCoordinates({x:r.startX,y:r.startY},{x:t,y:n});s=Math.max(0,s),l=Math.max(0,l),c=Math.min(i,c),d=Math.min(a,d);let[u,h]=[c-s,d-l].map(Math.abs);o&&(u=Math.min(u,Math.min(s,i-s)),h=Math.min(h,Math.min(l,a-l))),r.setPositionInternal(s,l,u,h,r.rotation)},finishDrawing(e,t){i=null,s.finishDrawing(e,t),r=0,o=0},mousedownEv(n,[a,s]){e.canStartDrawing()&&(i={x:a,y:s},0===r&&(o=t))},mousemoveEv(a,[s,l]){0!==r||!i||e.comparePointsWithThreshold(i,{x:s,y:l})||(r=o,![t,n].includes(r)||(e.startDrawing(i.x,i.y),e.isDrawing))?e.isDrawing&&[t,n].includes(r)&&e.updateDraw(s,l):r=0},mouseupEv(n,[o,i]){r===t&&(a={x:o,y:i},e.isDrawing&&(e.draw(o,i),e.finishDrawing(o,i)))},clickEv(t,[s,l]){e.canStartDrawing()&&(i&&a&&!e.comparePointsWithThreshold(i,a)||(0===r?o=n:e.isDrawing&&r===n&&(e.draw(s,l),e.finishDrawing(s,l),r=0)))},dblclickEv(t,[n,o]){if(!e.canStartDrawing())return;let i=e.defaultDimensions.width,a=e.defaultDimensions.height;if((0,O.VS)(O.MV)&&(i=e.obj.canvasToInternalX(i),a=e.obj.canvasToInternalY(a)),0===r){if(e.startDrawing(n,o),!e.isDrawing)return;n+=i,o+=a,e.draw(n,o),e.finishDrawing(n,o)}}}})),SO=wO.named("MultipleClicksMixin").views((()=>({canStart(){return!this.current()}}))).actions((e=>{let t={x:0,y:0},n=0,r={x:-1,y:-1},o=0;let i=0;const a={canStartDrawing:e.canStartDrawing};return{canStartDrawing:()=>a.canStartDrawing()&&!e.annotation.regionStore.hasSelection,nextPoint(t,r){const o=e.getCurrentArea(),i=e.obj;o&&i&&i.multiImage&&o.item_index!==i.currentImage||(e.getCurrentArea().addPoint(t,r),n++)},listenForClose(){console.error("MultipleClicksMixin model needs to implement listenForClose method in actions")},closeCurrent(){console.error("MultipleClicksMixin model needs to implement closeCurrent method in actions")},finishDrawing(){e.isDrawing&&(e.annotation.regionStore.selection.drawingUnselect(),n=0,e.closeCurrent(),setTimeout((()=>{e._finishDrawing()})))},cleanupUncloseableShape(){e.deleteRegion(),e.control.type===e.tagTypes.stateTypes&&e.annotation.unselectAll(!0),e._resetState()},mousedownEv(e,[t,n]){r={x:t,y:n},o=1},mouseupEv(t,[n,i]){1===o&&e.comparePointsWithThreshold(r,{x:n,y:i})&&(e._clickEv(t,[n,i]),o=2),r={x:-1,y:-1}},clickEv(t,[n,i]){2!==o&&e._clickEv(t,[n,i]),o=3,r={x:-1,y:-1}},_clickEv(r,[o,a]){if(e.current())1===n&&e.comparePointsWithThreshold(t,{x:o,y:a})&&r.timeStamp-i<350?e.drawDefault():e.comparePointsWithThreshold(t,{x:o,y:a})?n>2&&e.finishDrawing():e.nextPoint(o,a);else{if(!e.canStartDrawing())return;t={x:o,y:a},n=1,i=r.timeStamp,e.startDrawing(o,a),e.listenForClose()}},drawDefault(){const{x:n,y:r}=t;let o=e.defaultDimensions.length,i=e.defaultDimensions.length;(0,O.VS)(O.MV)&&(o=e.obj.canvasToInternalX(o),i=e.obj.canvasToInternalY(i)),e.nextPoint(n+o,r),e.nextPoint(n+o/2,r+Math.sin(Math.PI/3)*i),e.finishDrawing()}}})),jO=wO.named("ThreePointsDrawingTool").views((e=>({canStart(){return!this.current()},get defaultDimensions(){return{width:e.MIN_SIZE.X,height:e.MIN_SIZE.Y}}}))).actions((e=>{let t=[],n=0;let r=0,o=null;const i={finishDrawing:e.finishDrawing};return{canStartDrawing:()=>!e.isIncorrectControl(),updateDraw:(n,o)=>{var i;0===r?null==(i=e.getCurrentArea())||i.draw(n,o,t):4===r&&e.draw(n,o)},nextPoint(n,r){t.push({x:n,y:r}),e.getCurrentArea().draw(n,r,t)},draw(t,n){const r=e.getCurrentArea();if(!r)return;const o=(0,O.VS)(O.MV)?Ye:e.obj.stageWidth,i=(0,O.VS)(O.MV)?Xe:e.obj.stageHeight;let{x1:a,y1:s,x2:l,y2:c}=rn.Image.reverseCoordinates({x:r.startX,y:r.startY},{x:t,y:n});a=Math.max(0,a),s=Math.max(0,s),l=Math.min(o,l),c=Math.min(i,c),r.setPositionInternal(a,s,l-a,c-s,r.rotation)},finishDrawing(n,a){e.isDrawing&&(t=[],o=null,r=0,i.finishDrawing(n,a),setTimeout((()=>{e._finishDrawing()})))},mousemoveEv(t,[i,a]){e.isDrawing&&(1===n&&(r=4),4===r&&o?(e.startDrawing(o.x,o.y),e.updateDraw(i,a)):0===r&&e.updateDraw(i,a))},mousedownEv(t,[r,i]){e.canStartDrawing()&&!e.annotation.isDrawing&&(n=1,o={x:r,y:i},e.mode="drawing")},mouseupEv(t,[o,i]){e.canStartDrawing()&&e.isDrawing&&(4===r&&(e.draw(o,i),e.finishDrawing(o,i)),n=2)},clickEv(t,[o,i]){e.canStartDrawing()&&(0===r&&e._clickEv(t,[o,i]),n=3)},_clickEv(n,[r,o]){t.length>=2?e.finishDrawing(r,o):0===t.length?(t=[{x:r,y:o}],e.startDrawing(r,o)):e.nextPoint(r,o)},dblclickEv(t,[o,i]){if(n=5,!e.canStartDrawing())return;let a=e.defaultDimensions.width,s=e.defaultDimensions.height;if((0,O.VS)(O.MV)&&(a=e.obj.canvasToInternalX(a),s=e.obj.canvasToInternalY(s)),0===r){if(e.startDrawing(o,i),!e.isDrawing)return;o+=a,i+=s,e.draw(o,i),e.finishDrawing(o,i)}}}}));var kO=n(18229),OO=n(51366),RO=n(20963),EO=n(15311);const _O=({name:e,icon:t,altIcon:n=null,getContent:r=()=>null,fullContent:o=()=>null})=>(n instanceof Function&&([r,n]=[n,null]),{name:e,icon:t,altIcon:n,getContent:r,fullContent:o}),AO=["node"],TO={RichTextRegionModel:{name:"HTML",icon:Ip,getContent:e=>(0,_.jsx)("span",{style:{color:"#5a5a5a"},children:e.text}),fullContent:e=>(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{children:e.start}),(0,_.jsx)("div",{children:e.startOffset}),(0,_.jsx)("div",{children:JSON.stringify(e.globalOffsets,null,2)})]})},ParagraphsRegionModel:_O({name:"Paragraphs",icon:Ip,getContent:e=>(0,_.jsx)("span",{style:{color:"#5a5a5a"},children:e.text})}),AudioRegionModel:_O({name:"Audio",icon:kO.A}),TimeSeriesRegionModel:_O({name:"TimeSeries",icon:OO.A}),TextAreaRegionModel:_O({name:"Input",icon:RO.A,getContent:e=>(0,_.jsx)("span",{style:{color:"#5a5a5a"},children:e._value})}),RectRegionModel:_O({name:"Rect",icon:sg,altIcon:fg}),Rect3PointRegionModel:_O({name:"Rect3Point",icon:Og,altIcon:Kg}),VideoRectangleRegionModel:_O({name:"Video Rect",icon:sg,altIcon:fg,getContent:e=>{var t;return(0,_.jsxs)("span",{style:{color:"#5a5a5a"},children:["from ",null==(t=e.sequence[0])?void 0:t.frame," frame"]})}}),PolygonRegionModel:_O({name:"Polygon",icon:Hh,altIcon:Jh}),EllipseRegionModel:_O({name:"Ellipse",icon:ah,altIcon:mh}),KeyPointRegionModel:_O({name:"KeyPoint",icon:Ch,altIcon:Ph}),BrushRegionModel:_O({name:"Brush",icon:Wu,altIcon:Ju}),ChoicesModel:_O({name:"Classification",icon:EO.A}),TextAreaModel:_O({name:"Input",icon:RO.A})},PO=(0,y.PA)((({className:e,node:t})=>{const n=KO(t);n in TO||console.error(`No ${n} in NodeView`);const{getContent:r,fullContent:o}=TO[n],i=t.labelName;return(0,_.jsxs)(Ze.eB,{name:"node",className:[e].filter(Boolean).join(" "),children:[i,(0,_.jsx)("br",{}),r(t),o&&o(t)]})})),IO=(0,y.PA)((({className:e,node:t})=>{var n,r;const o=KO(t);if(!o||!(o in TO))return console.error(`No ${o} in NodeView`),null;const{getContent:i}=TO[o],a=t.labelName;return(0,_.jsxs)(Ze.eB,{name:"node",tag:"span",className:e,children:[a,t.isDrawing&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"incomplete",children:(0,_.jsx)(ir,{title:`Incomplete ${null!=(n=null==(r=t.type)?void 0:r.replace("region",""))?n:"region"}`,children:(0,_.jsx)(Nd,{})})})," ",i(t)]})})),LO=(0,y.PA)((e=>{let{node:t}=e,n=(0,Yn.A)(e,AO);const r=KO(t);if(!(r in TO))return console.error(`No ${r} in NodeView`),null;const{icon:o}=TO[r];return(0,_.jsx)(o,Object.assign({},n))})),MO=(0,y.PA)((({node:e})=>{const{sortedRegions:t}=DO(e),n=t.indexOf(e),r=KO(e);if(!(r in TO))return console.error(`No ${r} in NodeView`),null;const{name:o,icon:i}=TO[r];return(0,_.jsxs)(Ze.eB,{name:"node-minimal",tag:"span",children:[n>=0&&(0,_.jsx)(Ze.Sl,{name:"counter",children:n+1}),(0,_.jsx)(Ze.Sl,{name:"icon",tag:i}),o]})})),KO=e=>e.$treenode?(0,h.Pw)(e).name:null,DO=e=>(0,h.Zn)(e).annotationStore.selected.regionStore,NO=({size:e})=>(0,_.jsx)("span",{style:{display:"block",width:e,height:e,background:"rgba(0, 0, 0, 0.25)",borderRadius:"100%"}}),VO=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{label:"Brush",ariaLabel:"brush-tool",active:e.selected,shortcut:e.shortcut,extraShortcuts:e.extraShortcuts,icon:e.iconClass,tool:e,onClick:()=>{e.selected||e.manager.selectTool(e,!0)},controls:e.controls}))),zO=h.gK.model("BrushTool",{strokeWidth:h.gK.optional(h.gK.number,15),group:"segmentation",shortcut:"B",smart:!0,unselectRegionOnToolChange:!(0,O.VS)(O.bP)}).volatile((()=>({canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,_.jsx)(VO,{item:e})},get iconComponent(){return e.dynamic?TO.BrushRegionModel.altIcon:TO.BrushRegionModel.icon},get tagTypes(){return{stateTypes:"brushlabels",controlTagTypes:["brushlabels","brush"]}},get controls(){return[(0,_.jsx)(hC,{value:e.strokeWidth,min:1,max:50,reverse:!0,align:"vertical",minIcon:(0,_.jsx)(NO,{size:8}),maxIcon:(0,_.jsx)(NO,{size:16}),onChange:t=>{e.setStroke(t)}},"brush-size")]},get extraShortcuts(){return{"[":["Decrease size",()=>{e.setStroke((0,w.clamp)(e.strokeWidth-5,1,50))}],"]":["Increase size",()=>{e.setStroke((0,w.clamp)(e.strokeWidth+5,1,50))}]}}}))).actions((e=>{let t,n;return{commitDrawingRegion(){const{currentArea:t,control:n,obj:r}=e,o=t.toJSON(),i={coordstype:"px",touches:o.touches,dynamic:o.dynamic},a=e.annotation.createResult(i,t.results[0].value.toJSON(),n,r);return t.setDrawing(!1),e.applyActiveStates(a),e.deleteRegion(),a.notifyDrawingFinished(),a},updateCursor(){var t;if(!e.selected||null==(t=e.obj)||!t.stageRef)return;const n=e.strokeWidth,r=e.obj.stageRef,o=["url('",xk.A.brushSizeCircle(n),"')"," ",Math.floor(n/2)+4," ",Math.floor(n/2)+4,", auto"];r.container().style.cursor=o.join("")},setStroke(t){e.strokeWidth=t},afterUpdateSelected(){e.updateCursor()},addPoint(e,n){t.addPoint(Math.floor(e),Math.floor(n))},mouseupEv(r,o,[i,a]){"drawing"===e.mode&&(e.addPoint(i,a),e.mode="viewing",t.setDrawing(!1),t.endPath(),n?setTimeout((()=>{const t=e.commitDrawingRegion();e.obj.annotation.selectArea(t),e.annotation.history.unfreeze(),e.obj.annotation.setIsDrawing(!1)})):(e.annotation.history.unfreeze(),e.obj.annotation.setIsDrawing(!1)))},mousemoveEv(t,n,[r,o]){"drawing"===e.mode&&(0,w.findClosestParent)(t.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement))&&e.addPoint(r,o)},mousedownEv(r,o,[i,a]){if(!(0,w.findClosestParent)(r.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement)))return;const s=e.control,l=e.obj;if(t=e.getSelectedShape,!(l&&t&&l.multiImage&&l.currentImage!==t.item_index))if(t&&"brushregion"===t.type)e.annotation.history.freeze(),e.mode="drawing",t.setDrawing(!0),e.obj.annotation.setIsDrawing(!0),n=!1,t.beginPath({type:"add",strokeWidth:e.strokeWidth||s.strokeWidth}),e.addPoint(i,a);else{if((0,O.VS)(O.Zr)&&!e.canStartDrawing())return;if(e.tagTypes.stateTypes===e.control.type&&!e.control.isSelected)return;e.annotation.history.freeze(),e.mode="drawing",n=!0,e.obj.annotation.setIsDrawing(!0),t=e.createDrawingRegion({touches:[],coordstype:"px"}),t.beginPath({type:"add",strokeWidth:e.strokeWidth||s.strokeWidth}),e.addPoint(i,a)}}}})),BO=h.gK.compose(zO.name,xO,Ej,wO,zO),HO=({size:e})=>(0,_.jsx)("span",{style:{display:"block",width:e,height:e,background:"rgba(0, 0, 0, 0.25)",borderRadius:"100%"}}),FO=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{label:"Eraser",ariaLabel:"eraser",shortcut:"E",active:e.selected,extraShortcuts:e.extraShortcuts,tool:e,disabled:!e.getSelectedShape,onClick:()=>{e.selected||e.manager.selectTool(e,!0)},icon:e.iconClass,controls:e.controls}))),WO=h.gK.model("EraserTool",{strokeWidth:h.gK.optional(h.gK.number,10),group:"segmentation",unselectRegionOnToolChange:!1}).volatile((()=>({index:9999,canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,_.jsx)(FO,{item:e})},get iconComponent(){return qg},get controls(){return[(0,_.jsx)(hC,{value:e.strokeWidth,min:1,max:50,reverse:!0,align:"vertical",minIcon:(0,_.jsx)(HO,{size:8}),maxIcon:(0,_.jsx)(HO,{size:16}),onChange:t=>{e.setStroke(t)}},"eraser-size")]},get extraShortcuts(){return{"[":["Decrease size",()=>{e.setStroke((0,w.clamp)(e.strokeWidth-5,1,50))}],"]":["Increase size",()=>{e.setStroke((0,w.clamp)(e.strokeWidth+5,1,50))}]}}}))).actions((e=>{let t;return{updateCursor(){var t;if(!e.selected||null==(t=e.obj)||!t.stageRef)return;const n=e.obj.stageRef,r=["url('",xk.A.brushSizeCircle(24),"')"," ",Math.floor(12)+4," ",Math.floor(12)+4,", auto"];n.container().style.cursor=r.join("")},afterUpdateSelected(){e.updateCursor()},addPoint(e,n){t.addPoint(Math.floor(e),Math.floor(n))},setStroke(t){e.strokeWidth=t},mouseupEv(){"drawing"===e.mode&&(e.mode="viewing",t.endPath())},mousemoveEv(n,r,[o,i]){var a;"drawing"===e.mode&&(0,w.findClosestParent)(n.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement))&&"brushregion"===(null==(a=t)?void 0:a.type)&&e.addPoint(o,i)},mousedownEv(n,r,[o,i]){(0,w.findClosestParent)(n.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement))&&(t=e.getSelectedShape,t&&t&&"brushregion"===t.type&&(e.mode="drawing",t.beginPath({type:"eraser",opacity:1,strokeWidth:e.strokeWidth}),e.addPoint(o,i)))}}})),$O=h.gK.compose(WO.name,xO,Ej,wO,WO),UO=h.gK.model("KeyPointTool",{default:h.gK.optional(h.gK.boolean,!0),group:"segmentation",shortcut:"K",smart:!0}).views((()=>({get tagTypes(){return{stateTypes:"keypointlabels",controlTagTypes:["keypointlabels","keypoint"]}},get viewTooltip(){return"Key Point"},get iconComponent(){return self.dynamic?TO.KeyPointRegionModel.altIcon:TO.KeyPointRegionModel.icon}}))).actions((e=>({clickEv(t,[n,r]){var o;if((0,O.VS)(O.Zr)&&!e.canStartDrawing())return;const i=e.control;if("keypointlabels"===i.type&&!i.isSelected)return;if(e.annotation.isReadOnly())return;const a=e.createRegion(Object.assign({},null==(o=e.control)?void 0:o.getSnappedPoint({x:n,y:r}),(0,O.VS)(O.MV)?{width:e.obj.canvasToInternalX(Number(i.strokewidth))}:{width:Number(i.strokewidth),coordstype:"px"},{dynamic:e.dynamic,negative:e.dynamic&&t.altKey}));a.setDrawing(!1),a.notifyDrawingFinished()}}))),ZO=h.gK.compose(UO.name,xO,Ej,wO,UO),GO=h.gK.model("PolygonTool",{group:"segmentation",shortcut:"P"}).views((e=>{const t={createRegionOptions:e.createRegionOptions,isIncorrectControl:e.isIncorrectControl,isIncorrectLabel:e.isIncorrectLabel};return{get getActivePolygon(){const t=e.currentArea;return(0,O.VS)(O.vz)&&t&&!(0,h._n)(t)||t&&t.closed||void 0===t||t&&"polygonregion"!==t.type?null:t},get tagTypes(){return{stateTypes:"polygonlabels",controlTagTypes:["polygonlabels","polygon"]}},get viewTooltip(){return"Polygon region"},get iconComponent(){return e.dynamic?TO.PolygonRegionModel.altIcon:TO.PolygonRegionModel.icon},get defaultDimensions(){return Rj},createRegionOptions:({x:e,y:n})=>t.createRegionOptions({points:[[e,n]],width:10,closed:!1}),isIncorrectControl:()=>t.isIncorrectControl()&&null===e.current(),isIncorrectLabel:()=>!e.current()&&t.isIncorrectLabel(),canStart:()=>null===e.current(),current:()=>e.getActivePolygon}})).actions((e=>{const t={startDrawing:e.startDrawing,_finishDrawing:e._finishDrawing,deleteRegion:e.deleteRegion};let n,r;return{handleToolSwitch(t){var n;if(e.stopListening(),null!=(n=e.getCurrentArea())&&n.isDrawing&&"ZoomPanTool"!==t.toolName){var r,o;const t=null==(r=e.getCurrentArea())?void 0:r.toJSON();(null==t||null==(o=t.points)?void 0:o.length)>2?e.finishDrawing():e.cleanupUncloseableShape()}},listenForClose(){r=!1,n=(0,u.lB)(e.getCurrentArea(),"closed",(()=>{var t;null!=(t=e.getCurrentArea())&&t.closed&&!r&&e.finishDrawing()}),!0)},stopListening(){n&&n()},closeCurrent(){e.stopListening(),r||(r=!0,e.getCurrentArea().closePoly())},startDrawing(n,r){var o;const i=null==(o=e.control)?void 0:o.getSnappedPoint({x:n,y:r});(0,O.VS)(O.vz)?(e.mode="drawing",e.currentArea=e.createRegion(e.createRegionOptions({x:i.x,y:i.y}),!0),e.setDrawing(!0),e.applyActiveStates(e.currentArea)):t.startDrawing(i.x,i.y)},_finishDrawing(){if((0,O.VS)(O.vz)){const{currentArea:t,control:n}=e;e.currentArea.notifyDrawingFinished(),e.setDrawing(!1),e.currentArea=null,e.mode="viewing",e.annotation.afterCreateResult(t,n)}else t._finishDrawing()},setDrawing(t){var n;null==(n=e.currentArea)||n.setDrawing(t),e.annotation.setIsDrawing(t)},deleteRegion(){if((0,O.VS)(O.vz)){const{currentArea:t}=e;e.setDrawing(!1),e.currentArea=null,t&&t.deleteRegion()}else t.deleteRegion()}}})),YO=h.gK.compose(GO.name,xO,Ej,SO,GO),XO=h.gK.model("BaseNTool",{group:"segmentation",smart:!0,shortcut:"R"}).views((e=>{const t={createRegionOptions:e.createRegionOptions,isIncorrectControl:e.isIncorrectControl,isIncorrectLabel:e.isIncorrectLabel};return{get getActivePolygon(){const t=e.currentArea;return t&&t.closed||void 0===t||t&&"rectangleregion"!==t.type?null:t},get tagTypes(){return{stateTypes:"rectanglelabels",controlTagTypes:["rectanglelabels","rectangle"]}},get defaultDimensions(){return kj},createRegionOptions:({x:n,y:r})=>t.createRegionOptions({x:n,y:r,height:(0,O.VS)(O.MV)?e.obj.canvasToInternalY(1):1,width:(0,O.VS)(O.MV)?e.obj.canvasToInternalX(1):1}),isIncorrectControl:()=>t.isIncorrectControl()&&null===e.current(),isIncorrectLabel:()=>!e.current()&&t.isIncorrectLabel(),canStart:()=>null===e.current()&&!e.annotation.isReadOnly(),current:()=>e.getActivePolygon}})).actions((e=>({beforeCommitDrawing(){const t=e.getActiveShape;return t.width>e.MIN_SIZE.X&&t.height*e.MIN_SIZE.Y}}))),qO=h.gK.model("RectangleTool",{shortcut:"R"}).views((e=>({get viewTooltip(){return"Rectangle"},get iconComponent(){return e.dynamic?TO.RectRegionModel.altIcon:TO.RectRegionModel.icon}}))),JO=h.gK.model("Rectangle3PointTool",{shortcut:"shift+R"}).views((e=>({get viewTooltip(){return"3 Point Rectangle"},get iconComponent(){return e.dynamic?TO.Rect3PointRegionModel.altIcon:TO.Rect3PointRegionModel.icon}}))),QO=h.gK.compose(qO.name,xO,Ej,CO,XO,qO,Pe),eR=h.gK.compose(JO.name,xO,Ej,jO,XO,JO,Pe),tR=h.gK.model("EllipseTool",{group:"segmentation",shortcut:"O"}).views((e=>{const t={createRegionOptions:e.createRegionOptions};return{get tagTypes(){return{stateTypes:"ellipselabels",controlTagTypes:["ellipselabels","ellipse"]}},get viewTooltip(){return"Ellipse region"},get iconComponent(){return e.dynamic?TO.EllipseRegionModel.altIcon:TO.EllipseRegionModel.icon},get defaultDimensions(){const{radius:e}=Oj;return{width:e,height:e}},createRegionOptions:({x:e,y:n})=>t.createRegionOptions({x:e,y:n,radiusX:1,radiusY:1})}})).actions((e=>({beforeCommitDrawing(){const t=e.getActiveShape;return t.radiusX>e.MIN_SIZE.X&&t.radiusY>e.MIN_SIZE.Y}}))),nR=h.gK.compose(tR.name,xO,Ej,CO,tR),rR=yr("SegmentationToolbar","Segmentation Tools"),oR={plus:"+",minus:"-"},iR=e=>{if(!e)return null;const t=e.split(",").map((e=>e.trim()));return(0,_.jsx)(Ze.Sl,{name:"shortcut",children:t.map(((e,t)=>{const n=e.split("+");return(0,_.jsx)(p.Fragment,{children:n.map((e=>{var t;return(0,_.jsx)(Ze.Sl,{name:"key",tag:"kbd",children:null!=(t=oR[e])?t:e},e)}))},`${n.join("-")}-${t}`)}))})},aR=({items:e,icon:t})=>{const[n,r]=(0,p.useState)(!1);return(0,p.useEffect)((()=>{const t=()=>{e.forEach((e=>{const t=e.shortcut;t&&rR.hasKey(t)&&rR.removeKey(t)}))};return t(),e.forEach((e=>{const t=e.shortcut;t&&!rR.hasKey(t)&&rR.addKey(t,(()=>{null==e||null==e.onClick||e.onClick(),r(!1)}),e.label)})),()=>{t()}}),[e]),(0,p.useEffect)((()=>{const e=()=>{n&&r(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}})),(0,_.jsxs)(Ze.eB,{name:"flyoutmenu",tag:"div",className:""+(n?"hovered":""),onClick:e=>{e.stopPropagation(),r(!n)},children:[(0,_.jsx)(Ze.Sl,{name:"icon",className:""+(n?"isClicked":""),title:"Zoom presets (click to see options)",children:t}),(0,_.jsx)(Ze.eB,{name:"tooltips",tag:"div",children:e.map(((e,t)=>(0,_.jsx)(Ze.Sl,{name:"tooltip",onClick:t=>{t.stopPropagation(),null==e||null==e.onClick||e.onClick(),r(!1)},children:(0,_.jsxs)(Ze.Sl,{name:"tooltip-body",children:[(0,_.jsx)(Ze.Sl,{name:"label",children:e.label}),iR(e.shortcut)]})},t)))})]})},sR=(0,y.PA)((({item:e})=>(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(wj,{active:e.selected,icon:(0,_.jsx)(rm,{}),ariaLabel:"pan",label:"Pan Image",shortcut:"H",onClick:()=>{const t=e.selected;e.manager.selectTool(e,!t)}}),(0,_.jsx)(wj,{icon:(0,_.jsx)(Sm,{}),ariaLabel:"zoom-in",label:"Zoom In",shortcut:"ctrl+plus",onClick:()=>{e.handleZoom(1)}}),(0,_.jsx)(aR,{icon:(0,_.jsx)(zm,{}),items:[{label:"Zoom to fit",shortcut:"shift+1",onClick:()=>{e.sizeToFit()}},{label:"Zoom to actual size",shortcut:"shift+2",onClick:()=>{e.sizeToOriginal()}}]}),(0,_.jsx)(wj,{icon:(0,_.jsx)(Am,{}),ariaLabel:"zoom-out",label:"Zoom Out",shortcut:"ctrl+minus",onClick:()=>{e.handleZoom(-1)}})]}))),lR=h.gK.model("ZoomPanTool",{group:"control"}).volatile((()=>({canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,_.jsx)(sR,{item:e})},get stageContainer(){return e.obj.stageRef.container()}}))).actions((e=>({shouldSkipInteractions:()=>!0,mouseupEv(){e.mode="viewing",e.stageContainer.style.cursor="grab"},updateCursor(){var t;e.selected&&null!=(t=e.obj)&&t.stageRef&&(e.stageContainer.style.cursor="grab")},afterUpdateSelected(){e.updateCursor()},handleDrag(t){const n=e.obj,r=n.zoomingPositionX+t.movementX,o=n.zoomingPositionY+t.movementY;n.setZoomPosition(r,o)},mousemoveEv(t){e.obj.zoomScale<=1||"moving"===e.mode&&(e.handleDrag(t),e.stageContainer.style.cursor="grabbing")},mousedownEv(t){2!==t.button&&(e.mode="moving",e.stageContainer.style.cursor="grabbing")},handleZoom(t){e.obj.handleZoom(t)},sizeToFit(){e.obj.sizeToFit()},sizeToAuto(){e.obj.sizeToAuto()},sizeToOriginal(){e.obj.sizeToOriginal()}}))),cR=h.gK.compose(lR.name,xO,Ej,lR),dR=(0,y.PA)((({item:e})=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(wj,{active:e.selected,icon:(0,_.jsx)(tp,{}),ariaLabel:"rotate-left",label:"Rotate Left",shortcut:"alt+left",onClick:()=>{e.rotate(-90)}}),(0,_.jsx)(wj,{active:e.selected,icon:(0,_.jsx)(lp,{}),ariaLabel:"rotate-right",label:"Rotate Right",shortcut:"alt+right",onClick:()=>{e.rotate(90)}})]}))),uR=h.gK.model("RotateTool",{group:"control"}).views((e=>({get viewClass(){return()=>(0,_.jsx)(dR,{item:e})}}))).actions((e=>({rotate(t){e.obj.rotate(t)}}))),hR=h.gK.compose(uR.name,xO,Ej,uR),gR=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{active:e.selected,ariaLabel:"brightness",label:"Brightness",controlsOnHover:!0,controls:[(0,_.jsx)(hC,{align:"vertical",reverse:!0,continuous:!0,minIcon:(0,_.jsx)(cm,{style:{width:22,height:22,opacity:.2}}),maxIcon:(0,_.jsx)(cm,{style:{width:22,height:22,opacity:.8}}),value:e.brightness,max:V.A.BRIGHTNESS_MAX,onChange:t=>{e.setStroke(t)}},"brightness")],icon:(0,_.jsx)(cm,{})}))),mR=h.gK.model({brightness:h.gK.optional(h.gK.number,V.A.BRIGHTNESS_VALUE)}).views((e=>({get viewClass(){return()=>(0,_.jsx)(gR,{item:e})}}))).actions((e=>({setStroke(t){e.brightness=t,e.obj.setBrightnessGrade(t)}}))),pR=h.gK.compose(mR.name,xO,Ej,mR),fR=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{active:e.selected,ariaLabel:"contrast",label:"Contrast",controlsOnHover:!0,controls:[(0,_.jsx)(hC,{align:"vertical",reverse:!0,continuous:!0,minIcon:(0,_.jsx)(pm,{style:{width:22,height:22,opacity:.2}}),maxIcon:(0,_.jsx)(pm,{style:{width:22,height:22,opacity:.8}}),value:e.contrast,max:V.A.CONTRAST_MAX,onChange:t=>{e.setStroke(t)}},"contrast")],icon:(0,_.jsx)(pm,{})}))),vR=h.gK.model("ContrastTool",{contrast:h.gK.optional(h.gK.number,V.A.CONTRAST_VALUE)}).views((e=>({get viewClass(){return()=>(0,_.jsx)(fR,{item:e})}}))).actions((e=>({setStroke(t){e.contrast=t,e.obj.setContrastGrade(t)}}))),yR=h.gK.compose(vR.name,xO,Ej,vR),bR=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{label:"Magic Wand",ariaLabel:"magicwand",shortcut:"W",active:e.selected,icon:e.iconClass,tool:e,onClick:()=>{e.selected||e.manager.selectTool(e,!0)}}))),xR=h.gK.model("MagicWandTool",{group:"segmentation",shortcut:"W",smart:!0,unselectRegionOnToolChange:!1}).volatile((()=>({canInteractWithRegions:!1,currentThreshold:null,mask:null,anchorScreenX:null,anchorScreenY:null,anchorImgX:null,anchorImgY:null,overlay:null,overlayCtx:null,overlayOrigStyle:null,transformedData:null,transformedCanvas:null,currentRegion:null,isFirstWand:!0,cachedRegionId:null,cachedLabel:null,cachedNaturalCanvas:null,naturalWidth:null,naturalHeight:null,imageDisplayedInBrowserWidth:null,imageDisplayedInBrowserHeight:null,viewportWidth:null,viewportHeight:null,zoomScale:null,zoomingPositionX:null,zoomingPositionY:null,negativezoom:null,rotation:null,timeTravellerListener:null}))).views((e=>({get viewClass(){return()=>(0,_.jsx)(bR,{item:e})},get tagTypes(){return{stateTypes:"brushlabels",controlTagTypes:["brushlabels","magicwand"]}},get iconComponent(){return Fg},get defaultthreshold(){return Number.parseInt(e.control.defaultthreshold,10)},get opacity(){return Number.parseFloat(e.control.opacity)},get fillcolor(){const t=pt()(V.l.fillcolor).hex();let n=t;const r=e.obj.states();if(!r.length)return n;const o=r.find((e=>void 0!==e.selectedColor));return n=o?o.selectedColor:t,pt()(n).hex()},get selectedLabel(){const t=e.obj.states();if(!t.length)return null;return t.find((e=>typeof e.isSelected)).selectedValues()[0]},get blurradius(){return Number.parseInt(e.control.blurradius,10)},get existingRegion(){return e.getSelectedShape&&e.getSelectedShape.type&&e.getSelectedShape.maskDataURL?e.getSelectedShape:null},shouldInvalidateCache:()=>e.existingRegion&&e.existingRegion.id!==e.cachedRegionId}))).actions((e=>({mousedownEv(t){e.timeTravellerListener||(e.timeTravellerListener=e.annotation.history.onUpdate((()=>{e.invalidateCache()}))),e.annotation.history.freeze(),e.mode="drawing",e.currentThreshold=e.defaultthreshold,e.currentRegion=null;const n=e.obj,r=n.imageRef;if(e.naturalWidth=r.naturalWidth,e.naturalHeight=r.naturalHeight,e.imageDisplayedInBrowserWidth=r.width,e.imageDisplayedInBrowserHeight=r.height,e.viewportWidth=Math.round(n.canvasSize.width),e.viewportHeight=Math.round(n.canvasSize.height),e.zoomScale=n.zoomScale,e.zoomingPositionX=n.zoomingPositionX,e.zoomingPositionY=n.zoomingPositionY,e.negativezoom=e.zoomScale<1,e.rotation=n.rotation,e.rotation||n.crosshair){let t;throw e.mode="viewing",e.annotation.history.unfreeze(),t=e.rotation?"The Magic Wand is not supported on rotated images":"The Magic Wand is not supported if the crosshair is turned on",alert(t),t}window.addEventListener("keydown",e.keydownEv,!0),[e.anchorImgX,e.anchorImgY,e.anchorScreenX,e.anchorScreenY]=e.getEventCoords(t),e.initCache(),e.initCanvas(),e.initCurrentRegion()},mousemoveEv(t){if("drawing"!==e.mode)return;const[n,r,o,i]=e.getEventCoords(t);e.threshold(o,i,e.fillcolor,e.opacity)},mouseupEv:(0,h.L3)((function*(){"viewing"!==e.mode&&(e.mode="viewing",window.removeEventListener("keydown",e.keydownEv,!0),yield e.setupFinalMask())})),keydownEv(t){const{key:n}=t;"Escape"===n&&(t.preventDefault(),t.stopPropagation(),e.mode="viewing",window.removeEventListener("keydown",e.keydownEv,!0),e.overlayCtx.clearRect(0,0,e.overlay.width,e.overlay.height))},getEventCoords:e=>[e.offsetX,e.offsetY,e.screenX,e.screenY],initCache(){e.isFirstWand=null===e.existingRegion||e.existingRegion.id!==e.cachedRegionId,e.isFirstWand?(e.cachedNaturalCanvas=document.createElement("canvas"),e.cachedNaturalCanvas.width=e.naturalWidth,e.cachedNaturalCanvas.height=e.naturalHeight,e.cachedLabel=e.selectedLabel):e.shouldInvalidateCache()&&e.invalidateCache()},invalidateCache(){e.cachedNaturalCanvas=document.createElement("canvas"),e.cachedNaturalCanvas.width=e.naturalWidth,e.cachedNaturalCanvas.height=e.naturalHeight,e.isFirstWand=!0,e.cachedRegionId=null,e.cachedLabel=e.selectedLabel},initCanvas(){const t=e.obj,n=t.imageRef;[e.transformedData,e.transformedCanvas]=kt(n,e.naturalWidth,e.naturalHeight,e.imageDisplayedInBrowserWidth,e.imageDisplayedInBrowserHeight,e.viewportWidth,e.viewportHeight,e.zoomScale,e.zoomingPositionX,e.zoomingPositionY,e.negativezoom,e.rotation),e.overlay=t.overlayRef,e.overlayOrigStyle=e.overlay.style,e.overlay.style="",e.overlay.width=e.transformedCanvas.width,e.overlay.height=e.transformedCanvas.height,e.overlayCtx=e.overlay.getContext("2d"),e.mask=vt(e.transformedData,e.overlayCtx,e.transformedCanvas.width,e.transformedCanvas.height,e.anchorImgX,e.anchorImgY,e.currentThreshold,e.fillcolor,e.opacity,e.blurradius,!0)},initCurrentRegion(){if(e.isFirstWand){const t={id:E(),strokewidth:1,object:e.obj,points:[],fillcolor:e.fillcolor,strokecolor:e.fillcolor,opacity:e.opacity};e.currentRegion=e.createDrawingRegion(t)}else e.currentRegion=e.existingRegion},threshold(t,n){if(t!==e.anchorScreenX||n!==e.anchorScreenY){const r=Math.abs(t-e.anchorScreenX),o=Math.abs(n-e.anchorScreenY),i=Math.sqrt(r*r+o*o),a=Math.abs(r),s=Math.abs(o);let l=a>s?r/a:o/s;l=l<0?l/5:l/3;const c=Math.min(Math.max(e.defaultthreshold+Math.floor(l*i),1),255);c!==e.currentThreshold&&(e.currentThreshold=c,e.mask=vt(e.transformedData,e.overlayCtx,e.transformedCanvas.width,e.transformedCanvas.height,e.anchorImgX,e.anchorImgY,e.currentThreshold,e.fillcolor,e.opacity,e.blurradius,!0))}},setupFinalMask:(0,h.L3)((function*(){const t=e.mask;let n,r;e.negativezoom?(n=Math.min(e.viewportWidth,e.imageDisplayedInBrowserWidth),r=Math.min(e.viewportHeight,e.imageDisplayedInBrowserHeight)):(n=e.viewportWidth,r=e.viewportHeight);const o=xk.A.mask2DataURL(t.data,n,r,"#FFFFFF"),i=document.createElement("img");i.src=o,yield i.decode();const a=e.copyTransformedMaskToNaturalSize(i);e.finalMaskToRegion(a)})),copyTransformedMaskToNaturalSize(t){const n=e.cachedNaturalCanvas.getContext("2d"),[r,o]=Ot(e.naturalWidth,e.naturalHeight,e.imageDisplayedInBrowserWidth,e.imageDisplayedInBrowserHeight,e.zoomingPositionX,e.zoomingPositionY),i=Math.ceil(e.transformedCanvas.width/e.imageDisplayedInBrowserWidth*e.naturalWidth),a=Math.ceil(e.transformedCanvas.height/e.imageDisplayedInBrowserHeight*e.naturalHeight),s=e.transformedCanvas.width,l=e.transformedCanvas.height,c=r,d=o,u=i,h=a;n.drawImage(t,0,0,s,l,c,d,u,h);return e.cachedNaturalCanvas.toDataURL()},finalMaskToRegion(t){if(e.isFirstWand){const n=e.commitDrawingRegion(t);e.cachedRegionId=n.id,e.obj.annotation.selectArea(n)}else e.currentRegion.endUpdatedMaskDataURL(t);e.annotation.history.unfreeze(),e.annotation.setIsDrawing(!1),e.overlay.style=e.origStyle,setTimeout((()=>{e.overlayCtx.clearRect(0,0,e.overlay.width,e.overlay.height)}))},commitDrawingRegion(t){const n={maskDataURL:t,coordstype:"px",dynamic:!1},r=e.annotation.createResult(n,e.currentRegion.results[0].value.toJSON(),e.control,e.obj);return e.applyActiveStates(r),e.deleteRegion(),r.notifyDrawingFinished(),r}}))),wR=h.gK.compose(xR.name,xO,Ej,wO,xR),CR=h.gK.model("SelectionTool",{shortcut:"V",group:"control"}).views((()=>({get isSeparated(){return!0},get viewTooltip(){return"Move"},get iconComponent(){return Gm},get useTransformer(){return!0}}))).actions((e=>{let t=!1;return{shouldSkipInteractions:()=>!1,mousedownEv(n,[r,o]){t=!0,e.obj.setSelectionStart({x:r,y:o})},mousemoveEv(n,[r,o]){t&&e.obj.setSelectionEnd({x:r,y:o})},mouseupEv(n,[r,o]){if(!t)return;e.obj.setSelectionEnd({x:r,y:o});const{regionsInSelectionArea:i}=e.obj;e.obj.resetSelection(),n.ctrlKey||n.metaKey?e.annotation.extendSelectionWith(i):e.annotation.selectAreas(i),t=!1},clickEv(n){(0,O.VS)(O.q$)&&(t=!1,e.obj.resetSelection(),n.ctrlKey||n.metaKey||e.annotation.unselectAreas())}}})),SR=h.gK.compose("MoveTool",xO,Ej,Pe,CR),jR=new Map;let kR=null;class OR{static getInstance({name:e}={}){if(!e)return;if(jR.has(e))return jR.get(e);const t=new OR({name:e});return jR.set(e,t),t}static allInstances(){return Array.from(jR.values())}static setRoot(e){kR=e}static removeAllTools(){jR.forEach((e=>e.removeAllTools())),jR.clear()}constructor({name:e}={}){this.name=e,this.tools={},this._default_tool=null,this._prefix=E()}get preservedTool(){return window.localStorage.getItem(`selected-tool:${this.name}`)}get obj(){return kR.annotationStore.names.get(this.name)}addTool(e,t,n=null,r=E()){var o,i;if(t.smart&&null!=(o=t.control)&&o.smartonly)return;const a=null!=(i=t.toolName)?i:e,s=`${null!=r?r:this._prefix}#${a}`;if((0,O.VS)(O.bP)&&n&&e===n){const e=new RegExp(`^.*?#${a}.*$`);if(Object.keys(this.tools).some((t=>e.test(t))))return void console.log(`Ignoring duplicate tool ${a} because it matches removeDuplicatesNamed ${n}`)}this.tools[s]=t,t.default&&!this._default_tool&&(this._default_tool=t),this.preservedTool&&t.shouldPreserveSelectedState?t.fullName===this.preservedTool&&t.setSelected&&(this.unselectAll(),this.selectTool(t,!0)):this._default_tool&&!this.hasSelected&&this.selectTool(this._default_tool,!0)}unselectAll(){var e;Object.values(this.tools).forEach((e=>{void 0!==e.selected&&e.setSelected(!1)}));const t=null==(e=this.obj)?void 0:e.stageRef;t&&(t.container().style.cursor="default")}selectTool(e,t){const n=this.findSelectedTool(),r=null==e?void 0:e.group;if(n&&"segmentation"===r){const t=e.control.type.replace(/labels$/,""),n=e.obj.activeStates().filter((e=>{const n=e.type.replace(/labels$/,"");return"labels"!==e.type&&n!==t}));n.forEach((e=>e.unselectAll()))}if(null==n||null==n.handleToolSwitch||n.handleToolSwitch(e),t)this.unselectAll(),e.setSelected&&e.setSelected(!0);else{const t=this.findDrawingTool();if(t)return this.selectTool(t,!0);e.setSelected&&e.setSelected(!1)}}selectDefault(){const e=this.findSelectedTool();this._default_tool&&!0===(null==e?void 0:e.dynamic)&&(this.unselectAll(),this._default_tool.setSelected(!0))}allTools(){return Object.values(this.tools)}addToolsFromControl(e){if(e.tools){const t=e.tools;Object.keys(t).forEach((n=>{this.addTool(n,t[n],e.removeDuplicatesNamed,e.name||e.id)}))}}findSelectedTool(){return Object.values(this.tools).find((e=>e.selected))}findDrawingTool(){return Object.values(this.tools).find((e=>e.isDrawing))}event(e,t,...n){const r=this.findSelectedTool();r&&r.event(e,t,n)}reload({name:e}={}){jR.delete(this.name),jR.set(e,this),this.removeAllTools(),this.name=e}removeAllTools(){Object.values(this.tools).forEach((e=>(0,h.zr)(e))),this.tools={},this._default_tool=null}get hasSelected(){return Object.values(this.tools).some((e=>e.selected))}}window.ToolManager=OR;const RR=OR,ER=h.gK.union({dispatcher(e){if(!e)return h.gK.null;const t=e.object.name||e.object,n=window.Htx.annotationStore.names.get(t),r=x.getAvailableAreas(n.type,e);return h.gK.union(...r,h.gK.null)}});const _R=new class{constructor(){this.fileCache=new Map,this.errorCache=new Map}download(e,t){var n=this;if(!e)throw new Error("No URL provided for download");return new Promise(((r,o)=>{if(this.fileCache.has(e))return void r(this.fileCache.get(e));if(this.errorCache.has(e))return void o(this.errorCache.get(e));const i=new XMLHttpRequest;i.responseType="blob",i.addEventListener("load",(async function(){if(4===i.readyState&&200===i.status){var t;const a=n.createDataURL(i.response);if(n.fileCache.set(e,a),null!=(t=i.getResponseHeader("content-type"))&&t.match(/image/))try{await n.cacheImage(a)}catch(e){return void o(e)}r(a)}})),i.addEventListener("progress",(e=>{const{total:n,loaded:r}=e;null==t||t(n,r,r/n)})),i.addEventListener("error",(()=>{const t=new Error("Network error");o(t),this.errorCache.set(e,t)})),i.open("GET",e),i.send()}))}isPreloaded(e){return this.fileCache.has(e)}isError(e){return this.errorCache.has(e)}getPreloadedURL(e){return this.fileCache.get(e)}getError(e){return this.errorCache.get(e)}createDataURL(e){return URL.createObjectURL(e)}cacheImage(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>{t()},r.onerror=()=>{n()},r.src=e}))}},AR=h.gK.model({id:h.gK.identifier,src:h.gK.string,index:h.gK.number,rotation:h.gK.optional(h.gK.number,0),naturalWidth:h.gK.optional(h.gK.integer,1),naturalHeight:h.gK.optional(h.gK.integer,1),stageWidth:h.gK.optional(h.gK.number,1),stageHeight:h.gK.optional(h.gK.number,1),zoomScale:h.gK.optional(h.gK.number,1),zoomingPositionX:h.gK.optional(h.gK.number,0),zoomingPositionY:h.gK.optional(h.gK.number,0),brightnessGrade:h.gK.optional(h.gK.number,100),contrastGrade:h.gK.optional(h.gK.number,100)}).volatile((()=>({stageRatio:1,containerWidth:1,containerHeight:1,stageZoom:1,stageZoomX:1,stageZoomY:1,currentZoom:1,downloaded:!1,downloading:!1,error:!1,progress:0,currentSrc:void 0,imageLoaded:!1}))).actions((e=>({preload(){!e.ensurePreloaded()&&e.src&&(e.setDownloading(!0),_R.download(e.src,((t,n,r)=>{e.setProgress(r)})).then((t=>{e.setDownloaded(!0),e.setDownloading(!1),e.setCurrentSrc(t)})).catch((()=>{e.setDownloading(!1),e.setError(!0)})))},ensurePreloaded:()=>_R.isError(e.src)?(e.setDownloading(!1),e.setError(!0),!0):!!_R.isPreloaded(e.src)&&(e.setDownloading(!1),e.setDownloaded(!0),e.setProgress(1),e.setCurrentSrc(_R.getPreloadedURL(e.src)),!0),setImageLoaded(t){e.imageLoaded=t},setProgress(t){e.progress=(0,w.clamp)(t,0,100)},setDownloading(t){e.downloading=t},setDownloaded(t){e.downloaded=t},setCurrentSrc(t){e.currentSrc=t},setError(){e.error=!0}}))).actions((e=>({setRotation(t){e.rotation=t},setNaturalWidth(t){e.naturalWidth=t},setNaturalHeight(t){e.naturalHeight=t},setStageWidth(t){e.stageWidth=t},setStageHeight(t){e.stageHeight=t},setStageRatio(t){e.stageRatio=t},setContainerWidth(t){e.containerWidth=t},setContainerHeight(t){e.containerHeight=t},setStageZoom(t){e.stageZoom=t},setStageZoomX(t){e.stageZoomX=t},setStageZoomY(t){e.stageZoomY=t},setCurrentZoom(t){e.currentZoom=t},setZoomScale(t){e.zoomScale=t},setZoomingPositionX(t){e.zoomingPositionX=t},setZoomingPositionY(t){e.zoomingPositionY=t},setBrightnessGrade(t){e.brightnessGrade=t},setContrastGrade(t){e.contrastGrade=t}}))),TR=h.gK.model({currentImageEntity:h.gK.maybeNull(h.gK.reference(AR)),imageEntities:h.gK.optional(h.gK.array(AR),[])}).actions((e=>({beforeDestroy(){e.currentImageEntity=null}}))).views((e=>({get maxItemIndex(){return e.imageEntities.length-1},get imageIsLoaded(){const t=e.currentImageEntity;return!t.downloading&&!t.error&&t.downloaded&&t.imageLoaded},get rotation(){var t;if((0,h._n)(e))return null==(t=e.currentImageEntity)?void 0:t.rotation},set rotation(t){var n;null==(n=e.currentImageEntity)||n.setRotation(t)},get naturalWidth(){var t;return null==(t=e.currentImageEntity)?void 0:t.naturalWidth},set naturalWidth(t){var n;null==(n=e.currentImageEntity)||n.setNaturalWidth(t)},get naturalHeight(){var t;return null==(t=e.currentImageEntity)?void 0:t.naturalHeight},set naturalHeight(t){var n;null==(n=e.currentImageEntity)||n.setNaturalHeight(t)},get stageWidth(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageWidth},set stageWidth(t){var n;null==(n=e.currentImageEntity)||n.setStageWidth(t)},get stageHeight(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageHeight},set stageHeight(t){var n;null==(n=e.currentImageEntity)||n.setStageHeight(t)},get stageRatio(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageRatio},set stageRatio(t){var n;null==(n=e.currentImageEntity)||n.setStageRatio(t)},get containerWidth(){var t;return null==(t=e.currentImageEntity)?void 0:t.containerWidth},set containerWidth(t){var n;null==(n=e.currentImageEntity)||n.setContainerWidth(t)},get containerHeight(){var t;return null==(t=e.currentImageEntity)?void 0:t.containerHeight},set containerHeight(t){var n;null==(n=e.currentImageEntity)||n.setContainerHeight(t)},get stageZoom(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageZoom},set stageZoom(t){var n;null==(n=e.currentImageEntity)||n.setStageZoom(t)},get stageZoomX(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageZoomX},set stageZoomX(t){var n;null==(n=e.currentImageEntity)||n.setStageZoomX(t)},get stageZoomY(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageZoomY},set stageZoomY(t){var n;null==(n=e.currentImageEntity)||n.setStageZoomY(t)},get currentZoom(){var t;return null==(t=e.currentImageEntity)?void 0:t.currentZoom},set currentZoom(t){var n;null==(n=e.currentImageEntity)||n.setCurrentZoom(t)},get zoomScale(){var t;if((0,h._n)(e))return null==(t=e.currentImageEntity)?void 0:t.zoomScale},set zoomScale(t){var n;null==(n=e.currentImageEntity)||n.setZoomScale(t)},get zoomingPositionX(){var t;if((0,h._n)(e))return null==(t=e.currentImageEntity)?void 0:t.zoomingPositionX},set zoomingPositionX(t){var n;null==(n=e.currentImageEntity)||n.setZoomingPositionX(t)},get zoomingPositionY(){var t;return(0,h._n)(e)?null==(t=e.currentImageEntity)?void 0:t.zoomingPositionY:null},set zoomingPositionY(t){var n;null==(n=e.currentImageEntity)||n.setZoomingPositionY(t)},get brightnessGrade(){var t;return null==(t=e.currentImageEntity)?void 0:t.brightnessGrade},set brightnessGrade(t){var n;null==(n=e.currentImageEntity)||n.setBrightnessGrade(t)},get contrastGrade(){var t;return null==(t=e.currentImageEntity)?void 0:t.contrastGrade},set contrastGrade(t){var n;null==(n=e.currentImageEntity)||n.setContrastGrade(t)},findImageEntity(t){var n;return t=null!=(n=t)?n:0,e.imageEntities.find((e=>e.index===t))}}))),PR=h.gK.model({x:h.gK.number,y:h.gK.number}),IR=h.gK.model({start:h.gK.maybeNull(PR),end:h.gK.maybeNull(PR)}).views((e=>({get obj(){return(0,h.PA)(e)},get annotation(){return e.obj.annotation},get highlightedNodeExists(){return!!e.annotation.highlightedNode},get isActive(){return e.start&&e.end},get x(){return Math.min(e.start.x*e.scale,e.end.x*e.scale)},get y(){return Math.min(e.start.y*e.scale,e.end.y*e.scale)},get width(){return Math.abs(e.end.x*e.scale-e.start.x*e.scale)},get height(){return Math.abs(e.end.y*e.scale-e.start.y*e.scale)},get scale(){return e.obj.zoomScale},get bbox(){const{start:t,end:n}=e;return e.isActive?{left:Math.min(t.x,n.x),top:Math.min(t.y,n.y),right:Math.max(t.x,n.x),bottom:Math.max(t.y,n.y)}:null},get onCanvasBbox(){if(!e.isActive)return null;const{start:t,end:n}=e;return{left:e.obj.internalToCanvasX(Math.min(t.x,n.x)),top:e.obj.internalToCanvasY(Math.min(t.y,n.y)),right:e.obj.internalToCanvasX(Math.max(t.x,n.x)),bottom:e.obj.internalToCanvasY(Math.max(t.y,n.y))}},get onCanvasRect(){if(!(0,O.VS)(O.MV))return e;if(!e.isActive)return null;const t=e.onCanvasBbox;return{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}},includesBbox(t){if(!e.isActive||!t)return!1;const n=e.bbox.left<=t.left,r=e.bbox.top<=t.top,o=e.bbox.right>=t.right,i=e.bbox.bottom>=t.bottom;return n&&r&&o&&i},intersectsBbox(t){if(!e.isActive||!t)return!1;const n=(e.bbox.left+e.bbox.right)/2,r=(e.bbox.top+e.bbox.bottom)/2,o=e.bbox.right-e.bbox.left,i=e.bbox.bottom-e.bbox.top,a=(t.left+t.right)/2,s=(t.top+t.bottom)/2,l=t.right-t.left,c=t.bottom-t.top;return 2*Math.abs(n-a)t.bboxCoords?{left:Math.min(e.left,t.bboxCoords.left),top:Math.min(e.top,t.bboxCoords.top),right:Math.max(e.right,t.bboxCoords.right),bottom:Math.max(e.bottom,t.bboxCoords.bottom)}:e),t);return(0,O.VS)(O.MV)?{left:e.obj.internalToCanvasX(n.left),top:e.obj.internalToCanvasY(n.top),right:e.obj.internalToCanvasX(n.right),bottom:e.obj.internalToCanvasY(n.bottom)}:n}}))).actions((e=>({setStart(t){e.start=t},setEnd(t){e.end=t}}))),LR=h.gK.model({valuelist:h.gK.maybeNull(h.gK.string)}).extend((e=>{if(!0!==e.isObjectTag)throw new Error("The MultiItemObjectBase mixin should be used only for object-tags");return{}})).views((e=>({get isMultiItem(){return(0,w.isDefined)(e.valuelist)},get maxItemIndex(){throw new Error("MultiItemMixin needs to implement maxItemIndex getter in views")},get currentItemIndex(){throw new Error("MultiItemMixin needs to implement currentItemIndex getter in views")},get regs(){return e.isMultiItem?e.allRegs.filter((t=>{var n;return(null!=(n=t.item_index)?n:0)===e.currentItemIndex})):e.allRegs}}))),MR=h.gK.model({value:h.gK.maybeNull(h.gK.string),valuelist:h.gK.maybeNull(h.gK.string),resize:h.gK.maybeNull(h.gK.number),width:h.gK.optional(h.gK.string,"100%"),height:h.gK.maybeNull(h.gK.string),maxwidth:h.gK.optional(h.gK.string,"100%"),maxheight:h.gK.optional(h.gK.string,"calc(100vh - 194px)"),smoothing:h.gK.maybeNull(h.gK.boolean),grid:h.gK.optional(h.gK.boolean,!1),gridsize:h.gK.optional(h.gK.string,"30"),gridcolor:h.gK.optional(Re.color,"#EEEEF4"),zoom:h.gK.optional(h.gK.boolean,!0),negativezoom:h.gK.optional(h.gK.boolean,!1),zoomby:h.gK.optional(h.gK.string,"1.1"),showlabels:h.gK.optional(h.gK.boolean,!1),zoomcontrol:h.gK.optional(h.gK.boolean,!0),brightnesscontrol:h.gK.optional(h.gK.boolean,!1),contrastcontrol:h.gK.optional(h.gK.boolean,!1),rotatecontrol:h.gK.optional(h.gK.boolean,!1),crosshair:h.gK.optional(h.gK.boolean,!1),selectioncontrol:h.gK.optional(h.gK.boolean,!0),lazyoff:h.gK.optional(h.gK.boolean,!1),horizontalalignment:h.gK.optional(h.gK.enumeration(["left","center","right"]),"left"),verticalalignment:h.gK.optional(h.gK.enumeration(["top","center","bottom"]),"top"),defaultzoom:h.gK.optional(h.gK.enumeration(["auto","original","fit"]),"fit"),crossorigin:h.gK.optional(h.gK.enumeration(["none","anonymous","use-credentials"]),"none")}),KR="rectanglelabels",DR="brushlabels",NR="ellipselabels",VR=h.gK.model({type:"image",sizeUpdated:h.gK.optional(h.gK.boolean,!1),cursorPositionX:h.gK.optional(h.gK.number,0),cursorPositionY:h.gK.optional(h.gK.number,0),brushControl:h.gK.optional(h.gK.string,"brush"),brushStrokeWidth:h.gK.optional(h.gK.number,15),mode:h.gK.optional(h.gK.enumeration(["drawing","viewing","brush","eraser"]),"viewing"),regions:h.gK.array(h.gK.union(Vk,fO,Zk,aO,qk),[]),drawingRegion:h.gK.optional(ER,null),selectionArea:h.gK.optional(IR,{start:null,end:null})}).volatile((()=>({currentImage:void 0,supportSuggestions:!0}))).views((e=>({get store(){return(0,h.Zn)(e)},get multiImage(){return!!e.isMultiItem},get currentItemIndex(){return e.currentImage},get parsedValue(){return j(e.value,e.store.task.dataObj)},get parsedValueList(){return j(e.valuelist,e.store.task.dataObj)},get currentSrc(){return e.currentImageEntity.src},get usedValue(){return e.multiImage?e.valuelist:e.value},get images(){const t=e.parsedValue;return t?Array.isArray(t)?t:[t]:[]},get hasStates(){const t=e.states();return t&&t.length>0},get selectedRegions(){return e.regs.filter((e=>e.inSelection))},get selectedRegionsBBox(){let t;return e.selectedRegions.forEach((e=>{const n=e.bboxCoords;n&&(t=t?{left:Math.min(null==n?void 0:n.left,t.left),top:Math.min(null==n?void 0:n.top,t.top),right:Math.max(null==n?void 0:n.right,t.right),bottom:Math.max(null==n?void 0:n.bottom,t.bottom)}:n)})),t},get regionsInSelectionArea(){return e.regs.filter((e=>e.isInSelectionArea))},get selectedShape(){return e.regs.find((e=>e.selected))},get suggestions(){var t;return(null==(t=e.annotation)?void 0:t.regionStore.suggestions.filter((t=>t.object===e)))||[]},get useTransformer(){var t;return!0===(null==(t=e.getToolsManager().findSelectedTool())?void 0:t.useTransformer)},get stageTranslate(){const{stageWidth:t,stageHeight:n}=e;return{0:{x:0,y:0},90:{x:0,y:n},180:{x:t,y:n},270:{x:t,y:0}}[e.rotation]},get stageScale(){return e.zoomScale},get hasTools(){var t;return!(null==(t=e.getToolsManager().allTools())||!t.length)},get imageCrossOrigin(){const t=e.crossorigin.toLowerCase();return!(0,O.VS)(O.xS)||t&&"none"!==t?(0,O.VS)(O.bP)&&t&&"none"!==t?t:null:"anonymous"},get fillerHeight(){const{naturalWidth:t,naturalHeight:n}=e;return e.isSideways?t/n*100+"%":n/t*100+"%"},get zoomedPixelSize(){const{naturalWidth:t,naturalHeight:n}=e;return(0,O.VS)(O.MV)?{x:100/t,y:100/n}:{x:e.stageWidth/t,y:e.stageHeight/n}},isSamePixel({x:t,y:n},{x:r,y:o}){const i=e.zoomedPixelSize.x,a=e.zoomedPixelSize.y;return Math.abs(t-r)e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t&&t.filter((e=>e.isSelected&&e.type.includes("labels")))},controlButton(){const t=e.states();if(!t||0===t.length)return;let n=t[0];return t.forEach((e=>{e.type!==KR&&e.type!==DR&&e.type!==NR||(n=e)})),n},get controlButtonType(){const t=e.controlButton();return(0,h.Pw)(t).name},get isSideways(){return(e.rotation+360)%180==90},get stageComponentSize(){return e.isSideways?{width:e.stageHeight,height:e.stageWidth}:{width:e.stageWidth,height:e.stageHeight}},get canvasSize(){return e.isSideways?{width:(0,O.VS)(O.aT)?e.naturalHeight*e.stageZoomX:Math.round(e.naturalHeight*e.stageZoomX),height:(0,O.VS)(O.aT)?e.naturalWidth*e.stageZoomY:Math.round(e.naturalWidth*e.stageZoomY)}:{width:(0,O.VS)(O.aT)?e.naturalWidth*e.stageZoomX:Math.round(e.naturalWidth*e.stageZoomX),height:(0,O.VS)(O.aT)?e.naturalHeight*e.stageZoomY:Math.round(e.naturalHeight*e.stageZoomY)}},get alignmentOffset(){const t={x:0,y:0};if((0,O.VS)(O.pG)){switch(e.horizontalalignment){case"center":t.x=(e.containerWidth-e.canvasSize.width)/2;break;case"right":t.x=e.containerWidth-e.canvasSize.width}switch(e.verticalalignment){case"center":t.y=(e.containerHeight-e.canvasSize.height)/2;break;case"bottom":t.y=e.containerHeight-e.canvasSize.height}}return t},get zoomBy(){return Number.parseFloat(e.zoomby)},get isDrawing(){return!!e.drawingRegion},get imageTransform(){const t={width:e.stageWidth*e.zoomScale+"px",height:e.stageHeight*e.zoomScale+"px",transformOrigin:"left top",transform:"translate3d(0,0,0)",filter:`brightness(${e.brightnessGrade}%) contrast(${e.contrastGrade}%)`},n=[];if(1!==e.zoomScale){const{zoomingPositionX:t=0,zoomingPositionY:r=0}=e;n.push(`translate3d(${t}px,${r}px, 0)`)}if(e.rotation){const t={90:"0, -100%",180:"-100%, -100%",270:"-100%, 0"};n.push(`rotate(${e.rotation}deg)`),n.push(`translate(${t[e.rotation]||"0, 0"})`)}return(null==n?void 0:n.length)>0&&(t.transform=n.join(" ")),t},get maxScale(){return e.isSideways?Math.min(e.containerWidth/e.naturalHeight,e.containerHeight/e.naturalWidth):Math.min(e.containerWidth/e.naturalWidth,e.containerHeight/e.naturalHeight)},get coverScale(){return e.isSideways?Math.max(e.containerWidth/e.naturalHeight,e.containerHeight/e.naturalWidth):Math.max(e.containerWidth/e.naturalWidth,e.containerHeight/e.naturalHeight)},get viewPortBBoxCoords(){let t=e.canvasSize.width/e.zoomScale,n=e.canvasSize.height/e.zoomScale;const r=-e.zoomingPositionX/e.zoomScale,o=-e.zoomingPositionY/e.zoomScale,i=[r,o,e.stageComponentSize.width-(r+t),e.stageComponentSize.height-(o+n)];if(e.isSideways&&([t,n]=[n,t]),e.rotation){const t=e.rotation/90%4;for(let e=0;e{const t=RR.getInstance({name:e.name}),n={manager:t,control:e,object:e};return{afterAttach:function(){e.selectioncontrol&&t.addTool("MoveTool",SR.create({},n)),e.zoomcontrol&&t.addTool("ZoomPanTool",cR.create({},n)),e.brightnesscontrol&&t.addTool("BrightnessTool",pR.create({},n)),e.contrastcontrol&&t.addTool("ContrastTool",yR.create({},n)),e.rotatecontrol&&t.addTool("RotateTool",hR.create({},n)),function(){if(!e.store.task)return;const t=e.multiImage?e.parsedValueList:e.parsedValue;Array.isArray(t)?t.forEach(((t,n)=>{e.imageEntities.push({id:`${e.name}#${n}`,src:t,index:n})})):e.imageEntities.push({id:`${e.name}#0`,src:t,index:0}),e.setCurrentImage(0)}()},getToolsManager:function(){return t},afterResultCreated:function(t){t&&(t.classification||e.multiImage&&(null==t.setItemIndex||t.setItemIndex(e.currentImage)))}}})).extend((e=>{let t=!1;return{views:{getSkipInteractions(){var n;if((0,O.VS)(O.pG)){if(t)return!0;if(e.annotation.isLinkingMode)return!1;const n=e.getToolsManager().findSelectedTool();return!(null==n?void 0:n.canInteractWithRegions)}const r="ZoomPanTool"===(null==(n=e.getToolsManager().findSelectedTool())?void 0:n.toolName);return t||r}},actions:{setSkipInteractions(e){t=e},updateSkipInteractions(t){const n=e.getToolsManager().findSelectedTool();if(null!=n&&n.shouldSkipInteractions)return e.setSkipInteractions(n.shouldSkipInteractions(t));e.setSkipInteractions(t.evt&&(t.evt.metaKey||t.evt.ctrlKey))}}}})).actions((e=>({freezeHistory(){},afterRegionSelected(t){e.multiImage&&e.setCurrentImage(t.item_index)},createDrawingRegion(t,n,r,o){const i={from_name:e.annotation.names.get(r.name),to_name:e,type:r.resultType,value:n},a=Object.assign({id:E(),object:e},t,{results:[i],dynamic:o,item_index:e.currentImage});return e.drawingRegion=a,e.drawingRegion},deleteDrawingRegion(){const{drawingRegion:t}=e;t&&(e.drawingRegion=null,(0,h.zr)(t))},setSelectionStart(t){e.selectionArea.setStart(t)},setSelectionEnd(t){e.selectionArea.setEnd(t)},resetSelection(){e.selectionArea.setStart(null),e.selectionArea.setEnd(null)},updateBrushControl(t){e.brushControl=t},updateBrushStrokeWidth(t){e.brushStrokeWidth=t},setBrightnessGrade(t){e.brightnessGrade=t},setContrastGrade(t){e.contrastGrade=t},setGridSize(t){e.gridsize=String(t)},setCurrentItem(t=0){e.setCurrentImage(t)},setCurrentImage(t=0){var n;(t=null!=(n=t)?n:0)!==e.currentImage&&(e.currentImage=t,e.currentImageEntity=e.findImageEntity(t),(0,O.VS)(O.F2)&&e.preloadImages())},preloadImages(){if(e.currentImageEntity.setImageLoaded(!1),e.currentImageEntity.preload(),e.multiImage){const[t,n]=[e.currentImage,e.imageEntities.length],r=(0,w.clamp)(t-3,0,t),o=(0,w.clamp)(t+1+3,t,n-1);[...e.imageEntities.slice(r,t),...e.imageEntities.slice(t+1,o)].forEach((e=>{e.preload()}))}},setPointerPosition({x:t,y:n}){e.freezeHistory(),e.cursorPositionX=t,e.cursorPositionY=n},setZoom(t){t=(0,w.clamp)(t,1,Number.POSITIVE_INFINITY),e.currentZoom=t;const n=e.maxScale,r=e.coverScale;if(n>1?tn?(e.stageZoom=n,e.zoomScale=t):(e.stageZoom=t,e.zoomScale=1),e.zoomScale>1){const t=Math.min(n*e.zoomScale,r);e.containerWidth/e.naturalWidth>e.containerHeight/e.naturalHeight?(e.stageZoomX=t,e.stageZoomY=e.stageZoom):(e.stageZoomX=e.stageZoom,e.stageZoomY=t)}else e.stageZoomX=e.stageZoom,e.stageZoomY=e.stageZoom},updateImageAfterZoom(){const{stageWidth:t,stageHeight:n}=e;e._recalculateImageParams(),t===e.stageWidth&&n===e.stageHeight||e._updateRegionsSizes({width:e.stageWidth,height:e.stageHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight})},setZoomPosition(t,n){const[r,o]=(0,O.VS)(O.aT)?[e.canvasSize.width,e.canvasSize.height]:[e.containerWidth,e.containerHeight],[i,a]=[r-e.stageComponentSize.width*e.zoomScale,o-e.stageComponentSize.height*e.zoomScale];e.zoomingPositionX=(0,w.clamp)(t,i,0),e.zoomingPositionY=(0,w.clamp)(n,a,0)},resetZoomPositionToCenter(){const{stageComponentSize:t,zoomScale:n}=e,{width:r,height:o}=t,[i,a]=(0,O.VS)(O.aT)?[e.canvasSize.width,e.canvasSize.height]:[e.containerWidth,e.containerHeight];e.setZoomPosition((i-r*n)/2,(a-o*n)/2)},sizeToFit(){const{maxScale:t}=e;e.defaultzoom="fit",e.setZoom(t),e.updateImageAfterZoom(),e.resetZoomPositionToCenter()},sizeToOriginal(){const{maxScale:t}=e;e.defaultzoom="original",e.setZoom(t>1?1:1/t),e.updateImageAfterZoom(),e.resetZoomPositionToCenter()},sizeToAuto(){e.defaultzoom="auto",e.setZoom(1),e.updateImageAfterZoom(),e.resetZoomPositionToCenter()},handleZoom(t,n={x:e.canvasSize.width/2,y:e.canvasSize.height/2}){if(t){let r=e.currentZoom;if(r=t>0?r*e.zoomBy:r/e.zoomBy,!0!==e.negativezoom&&r<=1)return e.setZoom(1),e.setZoomPosition(0,0),void e.updateImageAfterZoom();if(r<=1)return e.setZoom(r),e.setZoomPosition(0,0),void e.updateImageAfterZoom();let o=e.zoomScale;const i={x:(n.x-e.zoomingPositionX)/o,y:(n.y-e.zoomingPositionY)/o};e.setZoom(r),o=e.zoomScale;const a={x:-(i.x-n.x/o)*o,y:-(i.y-n.y/o)*o};e.setZoomPosition(a.x,a.y),e.updateImageAfterZoom()}},setMode(t){e.mode=t},setImageRef(t){e.imageRef=t},setContainerRef(t){e.containerRef=t},setStageRef(t){e.stageRef=t;const n=e.getToolsManager().findSelectedTool();null==n||null==n.updateCursor||n.updateCursor()},setOverlayRef(t){e.overlayRef=t},setSelected(){},rotate(t=-90){e.rotation=(e.rotation+t+360)%360;let n=1/e.stageRatio;e.isSideways?e.stageRatio=e.naturalWidth/e.naturalHeight:e.stageRatio=1,n*=e.stageRatio,e.setZoom(e.currentZoom),-90===t&&this.setZoomPosition(e.zoomingPositionY*n,e.stageComponentSize.height-e.zoomingPositionX*n-e.stageComponentSize.height*e.zoomScale),90===t&&this.setZoomPosition(e.stageComponentSize.width-e.zoomingPositionY*n-e.stageComponentSize.width*e.zoomScale,e.zoomingPositionX*n),e.updateImageAfterZoom()},_recalculateImageParams(){e.stageWidth=(0,O.VS)(O.aT)?e.naturalWidth*e.stageZoom:Math.round(e.naturalWidth*e.stageZoom),e.stageHeight=(0,O.VS)(O.aT)?e.naturalHeight*e.stageZoom:Math.round(e.naturalHeight*e.stageZoom)},_updateImageSize({width:t,height:n,userResize:r}){if(void 0!==e.naturalWidth){if(t>1&&n>1){const r=e.canvasSize.width,o=e.canvasSize.height,i=e.stageZoom,a=e.zoomScale;e.containerWidth=t,e.containerHeight=n,e.setZoom(e.currentZoom),e._recalculateImageParams();const s=e.stageZoom/i*(e.zoomScale/a);e.setZoomPosition(e.zoomingPositionX*s+(e.canvasSize.width/2-r/2*s),e.zoomingPositionY*s+(e.canvasSize.height/2-o/2*s))}e.sizeUpdated=!0,e._updateRegionsSizes({width:e.stageWidth,height:e.stageHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight,userResize:r})}},_updateRegionsSizes({width:t,height:n,naturalWidth:r,naturalHeight:o,userResize:i}){var a,s;const l=null==(a=e.annotation)||null==(a=a.history)||null==(a=a.history)?void 0:a.length;e.annotation.history.freeze(),e.regions.forEach((e=>{e.updateImageSize(t/r,n/o,t,n,i)})),e.regs.forEach((e=>{e.updateImageSize(t/r,n/o,t,n,i)})),null==(s=e.drawingRegion)||s.updateImageSize(t/r,n/o,t,n,i),setTimeout(e.annotation.history.unfreeze,0),l<=1&&setTimeout((()=>{var t;return null==(t=e.annotation)?void 0:t.reinitHistory(!1)}),0)},updateImageSize(t){var n;const{naturalWidth:r,naturalHeight:o}=null!=(n=e.imageRef)?n:t.target,{offsetWidth:i,offsetHeight:a}=e.containerRef;e.naturalWidth=r,e.naturalHeight=o,e._updateImageSize({width:i,height:a}),e.setReady(!0),"fit"===e.defaultzoom?e.sizeToFit():e.sizeToAuto(),setTimeout((()=>{var t;return null==(t=e.annotation)?void 0:t.reinitHistory(!1)}),0)},checkLabels(){let t;t=(0,O.VS)(O.Zr)?e.activeStates()||[]:(e.states()||[]).filter((e=>e.type.includes("labels")));return 0!==e.getAvailableStates().length||0===t.length},addShape(t){e.regions.push(t),e.annotation.addRegion(t),e.setSelected(t.id),t.selectRegion()},onResize(t,n,r){e._updateImageSize({width:t,height:n,userResize:r})},event(t,n,r,o){const[i,a]=e.fixZoomedCoords([r,o]),s=e.canvasToInternalX(i),l=e.canvasToInternalY(a);e.getToolsManager().event(t,n.evt||n,s,l,i,a)}}))),zR=h.gK.model().actions((e=>({fixZoomedCoords([t,n]){if(!e.stageRef)return[t,n];const r=e.stageRef.getAbsoluteTransform().copy().invert().point({x:t,y:n});return[r.x,r.y]},zoomOriginalCoords([t,n]){const r=e.stageRef.getAbsoluteTransform().point({x:t,y:n});return[r.x,r.y]},fixForZoom(e){return t=>this.fixForZoomWrapper(t,e)},fixForZoomWrapper(t,n){const r=void 0===t.x,[o,i]=e.fixZoomedCoords(r?t:[t.x,t.y]),a=n(r?[o,i]:{x:o,y:i}),s=e.zoomOriginalCoords(r?a:[a.x,a.y]);return r?s:{x:s[0],y:s[1]}}}))).views((e=>({get whRatio(){return(0,O.VS)(O.MV)?e.stageWidth/e.stageHeight:1},canvasToInternalX:t=>t/e.stageWidth*Ye,canvasToInternalY:t=>t/e.stageHeight*Xe,internalToCanvasX:t=>t/Ye*e.stageWidth,internalToCanvasY:t=>t/Xe*e.stageHeight}))),BR=zR.views((()=>({canvasToInternalX:e=>e,canvasToInternalY:e=>e,internalToCanvasX:e=>e,internalToCanvasY:e=>e}))),HR=h.gK.compose("ImageModel",MR,bn,...(0,O.VS)(O.gF)?[LR]:[],Pe,Me,TR,VR,(0,O.VS)(O.MV)?zR:BR),FR=(0,y.WQ)("store")(vk);x.addTag("image",HR,FR),x.addObjectType(HR);var WR=n(7976),$R=n.n(WR);const UR=h.gK.model().views((()=>({}))).actions((e=>({updateSpansColor(t,n){e._spans&&e._spans.forEach((e=>{t&&(e.style.backgroundColor=t),n&&(e.style.backgroundColor=rn.Colors.rgbaChangeAlpha(e.style.backgroundColor,n))}))},updateAppearenceFromState(){const t=e.getLabelColor();e.updateSpansColor(t,e.selected?.8:.3),e.applyCSSClass(e._lastSpan)},createSpans(){const t=e.getLabelColor(),n=(0,je.highlightRange)(e,"htx-highlight",{backgroundColor:t}),r=n[n.length-1];if(r)return e.applyCSSClass(r),e._lastSpan=r,e._spans=n,n},getLabelColor(){let t=e.parent.highlightcolor||(e.style||e.tag||V.l).fillcolor;return t&&(t=rn.Colors.convertToRGBA(t,.3)),t},applyCSSClass(t){if(!t)return;const n=["htx-highlight","htx-highlight-last"],r=(0,h.Zn)(e).settings;if(e.parent.showlabels||r.showLabels){var o;const r=null==(o=e.labeling)?void 0:o.mainValue,i=rn.HTML.labelWithCSS(t,{index:e.region_index,labels:r,score:e.score});n.push(i)}else n.push("htx-no-label");t.className=n.filter(Boolean).join(" ")},addEventsToSpans(t){const n=t=>(t.onmouseover=n=>{e.hidden||(e.annotation.isLinkingMode?(e.toggleHighlight(),t.style.cursor=V.A.LINKING_MODE_CURSOR,n.stopPropagation()):t.style.cursor=V.A.POINTER_CURSOR)},t.onmouseout=()=>{e.hidden||e.setHighlight(!1)},t.onmousedown=function(t){e.hidden||e.parent._currentSpan!==this&&(t.stopPropagation(),e.parent._currentSpan=this)},t.onclick=function(){e.hidden||e.parent._currentSpan===this&&(t.style.cursor=V.A.POINTER_CURSOR,e.onClickRegion())},!1);t&&t.forEach((e=>n(e)))},selectRegion(){e.updateSpansColor(null,.8);const t=e._spans[0];t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView({block:"center",behavior:"smooth"}))},afterUnselectRegion(){e.updateSpansColor(null,.3)},setHighlight(t){if(e._highlighted=t,e._spans){const t=e._spans.length,n=e._spans[0],r=e._spans[t-1],o=e._spans.slice(1,t-1),i=(e,t,{top:n=!0,bottom:r=!0,right:o=!0,left:i=!0}={})=>{o&&(e.style.borderRight=t),i&&(e.style.borderLeft=t),n&&(e.style.borderTop=t),r&&(e.style.borderBottom=t)};if(e.highlighted&&!e.hidden){const e=V.A.HIGHLIGHTED_CSS_BORDER;i(n,e,{right:!1}),i(r,e,{left:!1}),o.length&&o.forEach((t=>i(t,e,{left:!1,right:!1})))}else{const e="0px";i(n,e),i(r,e),o.length&&o.forEach((t=>i(t,e,{left:!1,right:!1})))}}},toggleHidden(t){e.hidden=!e.hidden,e.setHighlight(e.highlighted),e.hidden?(e.updateSpansColor("transparent",0),e._spans&&e._spans.forEach((e=>{e.style.cursor=V.A.DEFAULT_CURSOR}))):e.updateAppearenceFromState(),null==t||t.stopPropagation()},find:t=>e._spans&&e._spans.indexOf(t)>=0?e:void 0}))),ZR=h.gK.model("LabelMixin"),GR=h.gK.model().volatile((()=>({isSeparated:!1}))).views((e=>({get tiedChildren(){return D.filterChildrenOfType(e,e._child)},get selectedLabels(){return e.tiedChildren.filter((e=>!0===e.selected))},getSelectedColor(){const t=e.tiedChildren.find((e=>!0===e.selected));return t&&t.background},get selectedColor(){const t=e.tiedChildren.find((e=>!0===e.selected));return t&&t.background},get isSelected(){return e.selectedLabels.length>0},get holdsState(){return e.selectedLabels.length>0},selectedValues:()=>e.selectedLabels.map((e=>e.alias?e.alias:e.value)).filter((e=>(0,w.isDefined)(e))),getResultValue:()=>({[e.valueType]:e.selectedValues()}),get selectedAliases(){return e.selectedLabels.filter((e=>e.alias)).map((e=>e.alias))},getSelectedString:(t=" ")=>e.selectedValues().join(t),findLabel:t=>e.tiedChildren.find((e=>e.alias===t&&(0,w.isDefined)(t)||e.value===t||!(0,w.isDefined)(e.value)&&!(0,w.isDefined)(t))),get emptyLabel(){return e.allowempty?e.findLabel(null):null}}))).actions((e=>({unselectAll(){e.tiedChildren.forEach((e=>e.setSelected(!1)))},checkMaxUsages(){if((0,O.VS)(O.Zr))return e.tiedChildren.filter((e=>!e.canBeUsed()));const t=e.tiedChildren.filter((e=>!e.canBeUsed()));return t.length&&t.forEach((e=>e.setSelected(!1))),t},selectFirstVisible(){const t=e.tiedChildren.find((e=>e.visible));return t&&t.toggleSelected(),t},updateFromResult(t){e.unselectAll();const n=Array.isArray(t)?t.length?t:[null]:[t];if(n.length)n.map((t=>e.findLabel(t))).forEach((e=>null==e?void 0:e.setSelected(!0)));else if(e.allowempty){var r;null==(r=e.findLabel(null))||r.setSelected(!0)}}}))),YR=GR,XR=h.gK.model({}).views((()=>({get defaultChildType(){console.error("DynamicChildrenMixin needs to implement defaultChildType getter in views")}}))).actions((e=>{const t=(n,r,o)=>{if(n&&n.length)for(const i of n){o.children.push(Object.assign({type:e.defaultChildType},i,{children:[]}));const n=o.children[o.children.length-1];null==n.updateValue||n.updateValue(r),t(i.children,r,n)}},n=(e,t)=>{null==e||e.forEach((e=>{n(e.children,t),null==e.updateValue||e.updateValue(t)}))};return{updateWithDynamicChildren(n,r){var o;const i=(0,h.Zn)(e);e.children=null!=(o=e.children)?o:[],(0,h.Ze)(i),t(n,r,e),(0,h.yQ)(i)},updateValue(t){setTimeout((()=>{e.updateDynamicChildren(t)}))},updateDynamicChildren(t){if(!0!==e.locked){var n;const r=j(e.value,null==(n=t.task)?void 0:n.dataObj);if(!r)return;e.updateWithDynamicChildren(r,t),e.annotation&&(e.annotation.setupHotKeys(),null==e.needsUpdate||e.needsUpdate())}},generateDynamicChildren(t,r){if(e.children){const o=e.children,i=o.length,a=i-t.length,s=o.slice(a,i);n(s,r)}}}})),qR=h.gK.compose(ze,XR),JR=h.gK.model(Object.assign({},(0,O.VS)(O.cE)?{id:h.gK.identifier,name:h.gK.string}:{name:h.gK.identifier},{smart:!0,smartonly:!1,isControlTag:!0})).volatile((()=>({snapMode:qe}))).views((e=>({get resultType(){return e.type},get valueType(){return e.type},get toNameTag(){return e.annotation.names.get(e.toname)},selectedValues(){throw new Error("Control tag needs to implement selectedValues method in views")},get result(){return e.annotation.results.find((t=>t.from_name===e))},getSnappedPoint:t=>"pixel"===e.snap?e.toNameTag.snapPointToPixel(t,e.snapMode):t,get smartEnabled(){var t,n,r;const o=null!=(t=e.smart)&&t;return null!=(n=null==(r=(0,h.Zn)(e))?void 0:r.autoAnnotation)&&n&&o||e.smartonly||!1}}))),QR=h.gK.compose(JR,vn),eE=["className","style","color","empty","hidden","selected","margins","onClick","children","hotkey"],tE=p.forwardRef(((e,t)=>{let{className:n,style:r,color:o,empty:i=!1,hidden:a=!1,selected:s=!1,margins:l=!1,onClick:c,children:d,hotkey:u}=e,h=(0,Yn.A)(e,eE);const g=(0,p.useMemo)((()=>{if(!o)return null;const e=pt()(o).alpha(.15);return Object.assign({},null!=r?r:{},nn({color:o,background:e}))}),[o]);return(0,_.jsxs)(Ze.eB,Object.assign({tag:"span",ref:t,name:"label",mod:{empty:i,hidden:a,selected:s,clickable:!!c,margins:l},mix:n,style:g,onClick:c},h,{children:[(0,_.jsx)(Ze.Sl,{tag:"span",name:"text",children:d}),u?(0,_.jsx)(Ze.Sl,{tag:"span",name:"hotkey",children:u}):null]}))})),nE=h.gK.model("AnnotationMixin",{parentTypes:Te.tagsTypes([])}).views((e=>({get parent(){return Te.getParentTagOfTypeString(e,e.parentTypes)}}))),rE=h.gK.model(Object.assign({value:h.gK.maybeNull(h.gK.string),selected:h.gK.optional(h.gK.boolean,!1),maxusages:h.gK.maybeNull(h.gK.string),alias:h.gK.maybeNull(h.gK.string),hint:h.gK.maybeNull(h.gK.string),hotkey:h.gK.maybeNull(h.gK.string),showalias:h.gK.optional(h.gK.boolean,!1),aliasstyle:h.gK.optional(h.gK.string,"opacity: 0.6"),size:h.gK.optional(h.gK.string,"medium"),background:h.gK.optional(Re.color,V.A.LABEL_BACKGROUND),selectedcolor:h.gK.optional(Re.color,"#ffffff"),granularity:h.gK.maybeNull(h.gK.enumeration(["symbol","word","sentence","paragraph"])),groupcancontain:h.gK.maybeNull(h.gK.string)},(0,O.VS)(O.bT)?{html:h.gK.maybeNull(h.gK.string)}:{})),oE=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"label",visible:h.gK.optional(h.gK.boolean,!0),_value:h.gK.optional(h.gK.string,""),parentTypes:Te.tagsTypes(["Labels","EllipseLabels","RectangleLabels","PolygonLabels","KeyPointLabels","BrushLabels","HyperTextLabels","TimelineLabels","TimeSeriesLabels","ParagraphLabels"])}).volatile((e=>({initiallySelected:e.selected,isEmpty:!1}))).views((e=>({get maxUsages(){var t;return Number(e.maxusages||(null==(t=e.parent)?void 0:t.maxusages))},usedAlready:()=>e.annotation.regionStore.regions.reduce(((t,n)=>t+n.hasLabel(e.value)),0),canBeUsed:(t=1)=>!e.maxUsages||e.usedAlready()+t<=e.maxUsages}))).actions((e=>({setEmpty(){e.isEmpty=!0},toggleSelected(){let t=[];e.annotation.selectedDrawingRegions.length>0?t=e.annotation.selectedDrawingRegions.filter((t=>{var n,r;return(null==(n=t.parent)?void 0:n.name)===(null==(r=e.parent)?void 0:r.toname)})):e.annotation.selectedRegions.length>0&&(t=e.annotation.selectedRegions.filter((t=>{var n,r;return(null==(n=t.parent)?void 0:n.name)===(null==(r=e.parent)?void 0:r.toname)})));const n=t.filter((e=>!e.isReadOnly()));if(e.annotation.isReadOnly())return;if(t.length>0&&0===n.length)return;if(n.length&&!e.selected&&!e.canBeUsed(n.filter((e=>e.results)).length))return void fn.warning(`You can't use ${e.value} more than ${e.maxUsages} time(s)`);const r=e.parent,o=n.filter((t=>!(1===r.selectedLabels.length&&e.selected&&1===t.labelings.length&&(null==r||!r.allowempty||e.isEmpty))&&(!!e.selected||("labels"===r.type||(!!r.type.includes(t.type.replace(/region$/,""))||!!r.type.includes(t.results[0].type))))));if(!(t.length>0&&0===o.length)){if(!r.selectedLabels.length&&!e.selected){var i,a,s;e.annotation.toNames.get(r.toname).filter((e=>e.type&&e.type.endsWith("labels")&&e.name!==r.name));const t=RR.getInstance({name:e.parent.toname}),n=Object.values((null==(i=e.parent)?void 0:i.tools)||{})[0],o=t.findSelectedTool(),l=!(!n||!o)&&(0,h.Pw)(o).name===(0,h.Pw)(n).name,c=!!o&&(null==n||null==(a=n.control)?void 0:a.name)===(null==o||null==(s=o.control)?void 0:s.name);!n||!(o&&(!l||!c))&&o||t.selectTool(n,!0)}if(e.isEmpty){const t=e.selected;r.unselectAll(),e.setSelected(!t)}else r.shouldBeUnselected||e.setSelected(!e.selected),r.shouldBeUnselected&&(e.selected?r.unselectAll():(r.unselectAll(),e.setSelected(!e.selected)));var l;if(r.allowempty&&!e.isEmpty)if(o.length)r.findLabel().setSelected(!(null!=(l=r.selectedValues())&&l.length));else e.selected&&r.findLabel().setSelected(!1);o.forEach((t=>{t&&(t.setValue(e.parent),t.notifyDrawingFinished(),null==t.updateSpans||t.updateSpans())}))}},setVisible(t){e.visible=t},setSelected(t){e.selected=t},onHotKey:()=>e.onLabelInteract(),onClick:()=>(e.onLabelInteract(),!1),onLabelInteract:()=>e.toggleSelected(),_updateBackgroundColor(t){e.background===V.A.LABEL_BACKGROUND&&(e.background=$R().make_color({seed:t})[0])},afterCreate(){e._updateBackgroundColor(e._value||e.value)},updateValue(t){e._value=j(e.value,t.task.dataObj)||V.A.EMPTY_LABEL}}))),iE=h.gK.compose("LabelModel",nE,rE,ze,oE,Pe),aE=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{const n=(t.settings.enableTooltips||t.settings.enableLabelTooltips)&&t.settings.enableHotkeys&&e.hotkey,r=(0,_.jsxs)(tE,{color:e.background,margins:!0,empty:e.isEmpty,hotkey:n,hidden:!e.visible,selected:e.selected,onClick:e.onClick,children:[e.html?(0,_.jsx)("div",{title:e._value,dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(e.html)}}):e._value,!0===e.showalias&&e.alias&&(0,_.jsxs)("span",{style:rn.styleToProp(e.aliasstyle),children:[" ",e.alias]})]});return e.hint?(0,_.jsx)(ir,{title:e.hint,children:r}):r})));x.addTag("label",iE,aE);const sE=h.gK.model({toname:h.gK.maybeNull(h.gK.string),choice:h.gK.optional(h.gK.enumeration(["single","multiple"]),"single"),maxusages:h.gK.maybeNull(h.gK.string),showinline:h.gK.optional(h.gK.boolean,!0),groupdepth:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.2"),fillcolor:h.gK.optional(Re.color,"#f48a42"),strokewidth:h.gK.optional(h.gK.string,"1"),strokecolor:h.gK.optional(Re.color,"#f48a42"),fillopacity:h.gK.maybeNull(Re.range()),allowempty:h.gK.optional(h.gK.boolean,!1),value:h.gK.optional(h.gK.string,"")}),lE=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"labels",children:Te.unionArray(["label","header","view","text","hypertext","richtext"]),visible:h.gK.optional(h.gK.boolean,!0)}),cE=ZR.views((e=>({get shouldBeUnselected(){return"single"===e.choice},get defaultChildType(){return"label"},get isLabeling(){return!0}}))).actions((e=>({afterCreate(){if(e.allowempty){let t=e.findLabel(null);if(!t){const n={value:null,type:"label",background:V.l.fillcolor};e.children?e.children.unshift(n):e.children=(0,h.wg)([n]),t=e.children[0]}t.setEmpty()}}}))),dE=h.gK.compose("LabelsModel",QR,lE,sE,Pe,qR,cE,YR.props({_child:"LabelModel"})),uE=(0,y.PA)((({item:e})=>(0,_.jsx)(Ze.eB,{name:"labels",mod:{hidden:!e.visible,inline:e.showinline},children:D.renderChildren(e,e.annotation)})));x.addTag("labels",dE,uE);const hE=h.gK.model("ParagraphLabelsModel",{pid:h.gK.optional(h.gK.string,E),type:"paragraphlabels",children:Te.unionArray(["label","header","view","hypertext"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get serializableValue(){const t={};return t.paragraphlabels=e.selectedValues(),t}}))),gE=ZR.props({_type:"paragraphlabels"}),mE=h.gK.compose(QR,dE,hE,gE,YR.props({_child:"LabelModel"})),pE=h.gK.compose("ParagraphLabelsModel",mE),fE=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("paragraphlabels",pE,fE);var vE=n(92806),yE=n(47956),bE=n(33250),xE=function(e){return e[e.inertial=0]="inertial",e[e.instant=1]="instant",e}(xE||{});const wE=500,CE=h.gK.model({leadTime:0}).volatile((()=>({leadTimeLogic:xE.inertial,lastRecordedTime:0,debouncedTime:0}))).actions((e=>({_countTimeInertial(){const t=Date.now();e.debouncedTimee.lastRecordedTime&&(e.leadTime+=t-e.lastRecordedTime,e.lastRecordedTime=t),e.debouncedTime=t+wE}}))).actions((e=>({countTime(){e.leadTimeLogic===xE.inertial?e._countTimeInertial():e.leadTimeLogic===xE.instant&&e._countTimeInstant()},resetLeadTimeCounters(){e.lastRecordedTime=0,e.debouncedTime=0}}))),SE=h.gK.model({peritem:h.gK.optional(h.gK.boolean,!1)}).extend((e=>{if(!0!==e.isClassificationTag)throw new Error("The PerItemMixin mixin should be used only for classification control-tags");return{}})).views((e=>({get _perItemResult(){return e.annotation.results.find((t=>t.from_name===e&&t.area.item_index===e.toNameTag.currentItemIndex))}}))).actions((e=>({_validatePerItem(){const t=e.toNameTag;return e.annotation.regions.every((n=>{const r=n.results.find((t=>t.from_name===e));if(null==r||!r.hasValue)return!0;const o=r.mainValue;return!!e.validateValue(o)||(t.setCurrentItem(n.item_index),!1)}))},createPerItemResult(){e.createPerObjectResult({item_index:e.toNameTag.currentItemIndex})}}))),jE=SE,kE=h.gK.model({required:h.gK.optional(h.gK.boolean,!1),requiredmessage:h.gK.maybeNull(h.gK.string)}).actions((e=>{const t={validate:e.validate};return{validate(){if(!t.validate())return!1;if(!e.required)return!0;if(e.perregion){const t=e.toNameTag;for(const r of t.allRegs){const t=r.results.find((t=>t.from_name===e));if("region-selected"===e.visiblewhen&&e.whentagname){var n;const t=null==(n=r.labeling)||null==(n=n.from_name)?void 0:n.name;if(t&&t!==e.whentagname)continue}if((!e.whenlabelvalue||r.hasLabel(e.whenlabelvalue))&&(null==t||!t.hasValue))return e.annotation.selectArea(r),e.requiredModal(),!1}}else if((0,O.VS)(O.gF)&&e.peritem){const t=e.toNameTag,n=t.maxItemIndex,r=e.annotation.regions.reduce(((t,n)=>{const r=n.results.find((t=>t.from_name===e));return null!=r&&r.hasValue&&t.add(n.item_index),t}),new Set);for(let o=0;o<=n;o++)if(!r.has(o))return t.setCurrentItem(o),e.requiredModal(),!1}else{var r;if(!e.holdsState&&!1!==e.isVisible&&!1!==(null==(r=(0,h.PA)(e,2))?void 0:r.isVisible))return e.requiredModal(),!1}return!0}}})),OE=kE,RE="lsf-mark",EE="lsf-selected",_E="lsf-highlighted",AE="lsf-relation";var TE=n(6757),PE=n(39984);const IE={input:"input--GGvVi",editing:"editing--TQ89C",enter:"enter--FWKNX",delete:"delete--hGoXe"},LE=["className","rows","onlyEdit","name","onFocus","onChange","onDelete","isEditable","isDeleteable","ignoreShortcuts"],ME=["onChange","onDelete","isEditable","isDeleteable","text","ignoreShortcuts","onlyEdit"],{Paragraph:KE}=TE.A;class DE extends p.Component{constructor(...e){super(...e),this.state={editing:!1,height:0,value:this.props.text},this.textRef=p.createRef(),this.inputRef=p.createRef(),this.handleGlobalClick=e=>{var t;const n=null==e?void 0:e.target,r=null==n||null==(t=n.dataset)?void 0:t.shortcut;!this.state.editing||this.props.ignoreShortcuts&&r||n===this.inputRef.current||this.setEditing(!1)},this.startEditing=()=>{var e,t,n;const r=(null==(e=this.textRef.current)?void 0:e.parentNode.offsetHeight)||0;this.setState({editing:!0,height:r}),null==(t=(n=this.props).onStartEditing)||t.call(n),setTimeout(this.focus)},this.focus=()=>{const e=this.inputRef.current;e&&(e.selectionStart=this.state.value.length)},this.setEditing=e=>{this.setState({editing:e})},this.setValue=e=>{this.setState({value:e})},this.cancel=()=>{this.setValue(this.props.text),this.setEditing(!1)},this.save=()=>{this.props.onChange(this.state.value),this.setEditing(!1)},this.updateHeight=In()((()=>{var e,t;const n=null!=(e=null==(t=this.inputRef.current)?void 0:t.scrollHeight)?e:0,r=n+2;n&&r!==this.state.height&&this.setState({height:r})}),100)}static getDerivedStateFromProps(e,t){return e.text!==t.prevPropsText?{value:e.text,prevPropsText:e.text}:null}componentDidMount(){window.addEventListener("click",this.handleGlobalClick,{capture:!0})}componentWillUnmount(){window.removeEventListener("click",this.handleGlobalClick,{capture:!0})}renderEdit(){const e=this.props,{className:t="",rows:n=1,onlyEdit:r,name:o,onFocus:i,onChange:a}=e,s=(0,Yn.A)(e,LE),{height:l,value:c}=this.state,d={name:o,className:`ant-input ${IE.input}`,style:l?{height:l,borderWidth:1}:null,autoFocus:!0,ref:this.inputRef,value:c,onBlur:()=>{a(this.state.value)},onFocus:i,onChange:e=>{this.setValue(e.target.value),this.updateHeight()},onKeyDown:e=>{const{key:t,shiftKey:r}=e;"Enter"===t?(1==+n||r)&&(e.preventDefault(),e.stopPropagation(),this.save()):"Escape"===t?this.cancel():"Tab"===t&&this.setEditing(!1)}};return this.updateHeight(),(0,_.jsxs)(KE,Object.assign({},s,{className:`${t} ant-typography-edit-content ${IE.editing}`,children:[n>1?(0,_.jsx)("textarea",Object.assign({},d)):(0,_.jsx)("input",Object.assign({},d)),!r&&(0,_.jsx)(ir,{title:"Save: [shift+enter]",children:(0,_.jsx)(PE.A,{className:`ant-typography-edit-content-confirm ${IE.enter}`,onClick:this.save})})]}))}renderView(){const e=this.props,{onChange:t,onDelete:n,isEditable:r,isDeleteable:o,text:i}=e,a=(0,Yn.A)(e,ME);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(KE,Object.assign({},a,{children:(0,_.jsx)("span",{ref:this.textRef,children:i})})),r&&t&&(0,_.jsx)(za,{type:"text",className:IE.button,tooltip:"Edit",tooltipTheme:"Dark",style:{padding:0},icon:(0,_.jsx)(gy,{}),"aria-label":"Edit Region",onClick:this.startEditing}),o&&n&&(0,_.jsx)(za,{type:"text",look:"danger",className:IE.button,tooltip:"Delete",tooltipTheme:"Dark",style:{padding:0},icon:(0,_.jsx)(sf,{}),"aria-label":"Delete Region",onClick:n})]})}render(){return(this.state.editing||this.props.onlyEdit)&&this.props.isEditable?this.renderEdit():this.renderView()}}const NE=h.gK.model("TextAreaRegionModel",{id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"textarearegion",_value:h.gK.string}).volatile((()=>({classification:!0,perRegionTags:[],results:[],selected:!1}))).views((e=>({get parent(){return(0,h.k2)(e,YE)},getRegionElement:()=>document.querySelector(`#TextAreaRegion-${e.id}`),getOneColor:()=>null}))).actions((e=>({setValue(t){(!(0,O.VS)(O.q_)||e._value!==t&&e.parent.validateText(t))&&(e._value=t,e.parent.onChange())},deleteRegion(){e.parent.remove(e)},selectRegion(){e.selected=!0},afterUnselectRegion(){e.selected=!1}}))),VE=h.gK.compose("TextAreaRegionModel",it,We,NE),zE=(0,y.PA)((({item:e,onFocus:t})=>{var n;const r=[RE],o={onFocus:n=>t(n,e)},{parent:i}=e,{relationMode:a}=e.annotation,s=i.isEditable&&!e.isReadOnly(),l=i.isDeleteable&&!e.isReadOnly();a&&r.push(AE),e.selected?r.push(EE):e.highlighted&&r.push(_E),(s||i.transcription)&&(o.onChange=t=>{e.setValue(t),e.parent.updateLeadTime()},o.onInput=()=>{e.parent.countTime()}),o.onDelete=e.deleteRegion;let c={};i.perregion||(c={onMouseOver:()=>{a&&e.setHighlight(!0)},onMouseOut:()=>{a&&e.setHighlight(!1)}});const d=`${null!=(n=null==i?void 0:i.name)?n:""}:${e.id}`;return(0,_.jsx)("div",Object.assign({},c,{className:(0,Ze.cn)("row").toString(),"data-testid":"textarea-region",children:(0,_.jsx)(DE,Object.assign({isEditable:s,isDeleteable:l,onlyEdit:i.transcription,id:`TextAreaRegion-${e.id}`,name:d,className:r.join(" "),rows:i.rows,text:e._value},o,{ignoreShortcuts:!0}))}))}));x.addTag("textarearegion",VE,zE);const BE=h.gK.model("ClassificationBase",{isClassificationTag:!0}).extend((e=>{if(!0!==e.isControlTag)throw new Error("The ClassificationBase mixin should be used only for ControlTags");const t=["toname"].filter((t=>!e.$treenode.type.propertyNames.includes(t)));for(const e of t)throw new Error(`The property "${e}" should be defined for ClassificationBase mixin model needs`);return{}})).volatile((()=>({elementRef:p.createRef()}))).views((e=>({selectedValues(){throw new Error("ClassificationBase mixin model needs to implement selectedValues method in views")},get result(){return e.perregion?e._perRegionResult:e.peritem?e._perItemResult:e.annotation.results.find((t=>t.from_name===e))}}))).actions((e=>({validate:()=>e.perregion?e._validatePerRegion():e.peritem&&(0,O.VS)(O.gF)?e._validatePerItem():e._validatePerObject(),validateValue:e=>!0,_validatePerObject:()=>e.validateValue(e.selectedValues()),createPerObjectResult(t={}){e.annotation.createResult(t,{[e.valueType]:e.selectedValues()},e,e.toname)},updateResult(){e.result?e.result.area.setValue(e):e.perregion?null==e.createPerRegionResult||e.createPerRegionResult():e.peritem?e.createPerItemResult():e.createPerObjectResult()}}))),{TextArea:HE}=bE.A,FE=(0,p.forwardRef)((({idx:e,value:t,readOnly:n,onChange:r,onDelete:o,onFocus:i,validate:a,control:s,collapsed:l},c)=>{const d=Number.parseInt(s.rows)>1,[u,h]=(0,p.useState)(null!=t?t:"");(0,O.VS)(O.q_)&&(0,p.useEffect)((()=>{t!==u&&h(t)}),[t]);const g=(0,p.useMemo)((()=>{var e;return l?null!=(e=(null!=t?t:"").split(/\n/)[0])?e:"":(0,O.VS)(O.q_)?u:t}),[t,l,...(0,O.VS)(O.q_)?[u]:[]]),m=(0,O.VS)(O.q_)?(0,p.useCallback)((e=>{h(e.target.value)}),[]):t=>{l||r(e,t.target.value)},f=(0,p.useCallback)((n=>{t===n.target.value||l||(a&&!a(n.target.value)?h(t):null==r||r(e,n.target.value))}),[e,t,r,a,l]),v={className:`ant-input ${IE.input}`,value:g,autoSize:d?{minRows:1}:null,onChange:m,readOnly:n||l,onFocus:i};return(0,O.VS)(O.q_)&&(v.onBlur=f),((0,O.VS)(O.q_)||d)&&(v.onKeyDown=e=>{var t;("Enter"===e.key&&!e.shiftKey||"Escape"===e.key)&&(e.preventDefault(),e.stopPropagation(),null==(t=e.target)||null==t.blur||t.blur())}),(0,_.jsxs)(Ze.Sl,{name:"item",children:[(0,_.jsx)(Ze.Sl,Object.assign({name:"input",tag:d?HE:bE.A},v,{ref:c})),!l&&!n&&(0,_.jsx)(Ze.Sl,{name:"action","aria-label":"Delete Region",tag:vE.default,icon:(0,_.jsx)(bs,{}),size:"small",type:"text",onClick:()=>{o(e)}})]})})),WE=(0,y.PA)((({item:e,control:t,firstResultInputRef:n,onFocus:r,collapsed:o})=>{const i=e.mainValue,a=!e.isReadOnly()&&e.from_name.editable&&!e.area.isReadOnly(),s=(0,p.useCallback)(((t,n)=>{if(e.from_name.isReadOnly())return;const r=i.toJSON();r.splice(t,1,n),e.setValue(r)}),[i]),l=(0,p.useCallback)((t=>{if(!e.from_name.isDeleteable)return;const n=i.toJSON();n.splice(t,1),e.setValue(n)}),[i]);return i.map(((i,c)=>(0,_.jsx)(FE,{idx:c,value:i,readOnly:!a,onChange:s,onDelete:l,control:t,ref:0===c?n:null,onFocus:r,collapsed:o,validate:(0,O.VS)(O.q_)?e.from_name.validateText:null},c)))})),$E=(0,y.PA)((({item:e,area:t,collapsed:n,setCollapsed:r,outliner:o,color:i})=>{var a,s;const l=Number.parseInt(e.rows),c=l>1,d=e.perRegionArea===t,u=t.isCompleted&&t.perRegionFocusTarget===e&&t.perRegionFocusRequest,g=d?e._value:"",m=t.results.find((t=>t.from_name===e)),f=(0,p.useCallback)((()=>{n&&(r(!1),t.isSelected||t.annotation.selectArea(t))}),[n]),v=(0,p.useCallback)((()=>{m?(e.addTextToResult(e._value,m),e.setValue("")):(e.addText(e._value),e.setValue(""))}),[e,m]),y=(0,p.useRef)(),b=(0,p.useRef)(),x=(0,p.useRef)(0),w=(0,p.useMemo)((()=>i?{"--border-color":i}:{}),[i]);(0,p.useEffect)((()=>{var e;d&&u&&x.current{n&&e._value&&v()}),[n]);const C={ref:y,value:g,rows:e.rows,className:"is-search",label:e.label,placeholder:e.placeholder,autoSize:c?{minRows:1}:null,onChange:t=>{if(n)return;const{value:r}=t.target;e.setValue(r)},onFocus:e=>{e.stopPropagation(),e.preventDefault(),t.isSelected||t.annotation.selectArea(t)}};c&&(C.onKeyDown=t=>{var n;("Enter"!==t.key||t.shiftKey)&&"Escape"!==t.key||e.annotation.isReadOnly()||(t.preventDefault(),t.stopPropagation(),e.allowsubmit&&e._value?v():null==(n=t.target)||null==n.blur||n.blur())}),e.annotation.isReadOnly()&&(C.disabled=!0);!e.annotation.isReadOnly()&&(a=e.showsubmitbutton);const S=(!m||!(null!=m&&null!=(s=m.mainValue)&&s.length)||e.maxsubmissions&&m.mainValue.length(e.allowsubmit&&e._value&&!e.annotation.isReadOnly()&&v(),!1),onClick:e=>{e.stopPropagation()},children:(0,_.jsx)(Ze.Sl,Object.assign({name:"input",tag:c?HE:bE.A},C,{onClick:e=>{e.stopPropagation()}}))})]}):null}));x.addPerRegionView("textarea",lt.REGION_LIST,$E);const{TextArea:UE}=bE.A,ZE=h.gK.model(Object.assign({toname:h.gK.maybeNull(h.gK.string),allowsubmit:h.gK.optional(h.gK.boolean,!0),label:h.gK.optional(h.gK.string,""),value:h.gK.maybeNull(h.gK.string),rows:h.gK.optional(h.gK.string,"1"),showsubmitbutton:h.gK.maybeNull(h.gK.boolean),placeholder:h.gK.maybeNull(h.gK.string),maxsubmissions:h.gK.maybeNull(h.gK.string),editable:h.gK.optional(h.gK.boolean,!1),transcription:!1},(0,O.VS)(O.eB)?{skipduplicates:h.gK.optional(h.gK.boolean,!1)}:{})),GE=h.gK.model({type:"textarea",regions:h.gK.array(VE),_value:h.gK.optional(h.gK.string,""),children:Te.unionArray(["shortcut"])}).volatile((()=>({focusable:!0,textareaRef:(0,p.createRef)()}))).views((e=>({get isEditable(){return e.editable&&e.annotation.editable},get isDeleteable(){return!e.isReadOnly()},get valueType(){return"text"},get holdsState(){return e.regions.length>0},get submissionsNum(){return e.regions.length},get showSubmit(){if(e.maxsubmissions){const t=Number.parseInt(e.maxsubmissions);return e.submissionsNume.regions.map((e=>e._value)),hasResult(t){if(!e.result)return!1;let n=e.result.mainValue;return Array.isArray(n)||(n=[n]),t=t.toLowerCase(),n.some((e=>e.toLowerCase()===t))}}))).actions((()=>(0,O.VS)(O.y8)?{}:{countTime:()=>{}})).actions((e=>{let t=null,n=null;const r=(t,n)=>!!(t&&n&&(0,h._n)(n))&&(!(e===n&&!e.showSubmit)&&!!t.parentElement);return{getSerializableValue(){const t=e.regions.map((e=>e._value));if(0!==t.length)return{text:t}},needsUpdate(){var t;e.updateFromResult(null==(t=e.result)?void 0:t.mainValue)},requiredModal(){fn.warning(e.requiredmessage||`Input for the textarea "${e.name}" is required.`)},uniqueModal(){fn.warning("There is already an entry with that text. Please enter unique text.")},setResult(t){(Array.isArray(t)?t:[t]).forEach((t=>e.createRegion(t)))},updateFromResult(t){e.regions=[],t&&e.setResult(t)},setValue(t){e._value=t},remove(t){const n=e.regions.indexOf(t);n<0||(e.regions.splice(n,1),(0,h.zr)(t),e.onChange(t))},perRegionCleanup(){e.regions=[]},createRegion(t,n,r){const o=VE.create({pid:n,leadTime:r,_value:t});return e.regions.push(o),o},onChange(t){var n;e.updateResult();const r=null!=t?t:null==(n=e.result)?void 0:n.area;null==r||r.notifyDrawingFinished()},validateText:t=>!((0,O.VS)(O.eB)&&e.skipduplicates&&e.hasResult(t))||(e.uniqueModal(),!1),addText(t,n){e.validateText(t)&&(e.createRegion(t,n,e.leadTime),e.onChange(),e.updateLeadTime())},updateLeadTime(){var t,n;if(!(0,O.VS)(O.y8))return;const r=e.result;r&&(r.setMetaValue("lead_time",(null!=(t=null==(n=r.meta)?void 0:n.lead_time)?t:0)+e.leadTime/1e3),e.leadTime=0,e.resetLeadTimeCounters())},addTextToResult(t,n){if(!e.validateText(t))return;const r=n.mainValue.toJSON();r.push(t),n.setValue(r)},beforeSend(){e._value&&e._value.length&&(e.addText(e._value),e._value="")},submitChanges(){e.beforeSend()},deleteText(e){(0,h.zr)(e)},onShortcut(o){if(!r(t,n)){if(!(0,O.VS)(O.tz))return;{var i,a;const o=(null==(i=e.textareaRef.current)?void 0:i.input)||(null==(a=e.textareaRef.current)||null==(a=a.resizableTextArea)?void 0:a.textArea);if(!r(o,e))return;t=o,n=e}}t.setRangeText(o,t.selectionStart,t.selectionEnd,"end"),n.setValue(t.value)},setLastFocusedElement(r,o=e){t=r,n=o},returnFocus(){var e;null==(e=t)||null==e.focus||e.focus()}}})),YE=h.gK.compose("TextAreaModel",QR,BE,ZE,...(0,O.VS)(O.y8)?[CE]:[],ze,OE,ct,...(0,O.VS)(O.gF)?[jE]:[],Pe,$e,GE),XE=(0,y.PA)((({item:e})=>{var t;const n=Number.parseInt(e.rows),r=(0,p.useCallback)(((t,n)=>{e.setLastFocusedElement(t.target,n)}),[e]),o={name:e.name,value:e._value,rows:e.rows,className:"is-search",label:e.label,placeholder:e.placeholder,disabled:e.isReadOnly(),readOnly:e.isReadOnly(),onChange:t=>{if(e.annotation.isReadOnly())return;const{value:n}=t.target;e.setValue(n)},onFocus:r,ref:e.textareaRef,onKeyPress:e.countTime,onKeyDown:e.countTime,onKeyUp:e.countTime,onMouseDown:e.countTime,onMouseUp:e.countTime,onMouseMove:t=>(t.button||t.buttons)&&e.countTime()};n>1&&(o.onKeyDown=t=>{"Enter"===t.key&&t.shiftKey&&e.allowsubmit&&e._value&&!e.annotation.isReadOnly()?(t.preventDefault(),t.stopPropagation(),e.addText(e._value),e.setValue("")):e.countTime()});const i=e.perRegionVisible()?{}:{display:"none"},a=!e.isReadOnly()&&(null!=(t=e.showsubmitbutton)?t:1!==n),s={},l=(0,Ze.cn)("text-area").toClassName();return a&&(s.marginBottom=0),i.marginTop="4px",e.displaymode===lt.TAG?(0,_.jsxs)("div",{className:l,style:i,ref:e.elementRef,children:[D.renderChildren(e,e.annotation),e.showSubmit&&(0,_.jsx)(yE.A,{onFinish:()=>(e.allowsubmit&&e._value&&!e.annotation.isReadOnly()&&(e.addText(e._value),e.setValue("")),!1),children:(0,_.jsxs)(yE.A.Item,{style:s,children:[1===n?(0,_.jsx)(bE.A,Object.assign({},o,{"aria-label":"TextArea Input"})):(0,_.jsx)(UE,Object.assign({},o,{"aria-label":"TextArea Input"})),a&&(0,_.jsx)(yE.A.Item,{children:(0,_.jsx)(vE.default,{style:{marginTop:"10px"},type:"primary",htmlType:"submit",children:"Add"})})]})}),e.regions.length>0&&(0,_.jsx)("div",{style:{marginBottom:"1em"},children:e.regions.map((e=>(0,_.jsx)(zE,{item:e,onFocus:r},e.id)))})]}):null}));x.addTag("textarea",YE,XE);const qE=h.gK.model({visiblewhen:h.gK.maybeNull(h.gK.string),whentagname:h.gK.maybeNull(h.gK.string),whenchoicevalue:h.gK.maybeNull(h.gK.string),whenlabelvalue:h.gK.maybeNull(h.gK.string)}).views((e=>({get isVisible(){var t;if(!1===(null==(t=(0,h.PA)(e,2))?void 0:t.isVisible))return!1;if(e.visiblewhen){const t={"region-selected":({tagName:t,labelValue:n})=>{var r;const o=e.annotation.highlightedNode;return!(!o||t&&(null==(r=o.labeling)?void 0:r.from_name.name)!==t)&&(!n||n.split(",").some((e=>o.hasLabel(e))))},"choice-selected":({tagName:t,choiceValue:n})=>{if(!t){for(const t of e.annotation.names.values())if("choices"===t.type&&t.selectedValues&&t.selectedValues().length)return!0;return!1}const r=e.annotation.names.get(t);return!!(null!=r&&r.hasChoiceSelection||null!=n&&n.length)&&r.hasChoiceSelection(null==n?void 0:n.split(","),r.selectedValues())},"no-region-selected":()=>!e.annotation.highlightedNode,"choice-unselected":e=>!t["choice-selected"](e)};if(Object.keys(t).includes(e.visiblewhen)){return!1!==t[e.visiblewhen]({tagName:e.whentagname,choiceValue:e.whenchoicevalue,labelValue:e.whenlabelvalue})}}else if(e.whenchoicevalue){for(const t of e.annotation.names.values()){const n=null==t||null==t.selectedValues?void 0:t.selectedValues();if(null!=n&&n.length)for(const t of n)if(t===e.whenchoicevalue)return!0}return!1}return!0}}))),JE=qE;var QE=n(51129),e_=n(84779);var t_=n(94714),n_=n(42197);const r_=(e=!1)=>{const[t,n]=(0,p.useState)(e),[r,o,i]=(0,p.useMemo)((()=>[n.bind(null,!0),n.bind(null,!1),()=>n((e=>!e))]),[]);return[t,r,o,i]};var o_=n(84392);const i_=e=>{let t=0,n=e.length;for(;n--;){t++;const r=e[n].children;r&&(t+=i_(r))}return t},a_=(e,t)=>({label:"",depth:t,path:e,isOpen:!0});let s_={};const l_=({items:e,rowComponent:t,flatten:n,rowHeight:r,maxHeightPercentage:o,minWidth:i,maxWidth:a,transformationCallback:s,defaultExpanded:l,isEditable:c})=>{var d;const u=document.body.clientHeight,[h,g]=(0,p.useState)(),[m,f]=(0,p.useState)({}),[v,y]=(0,p.useState)(0),[b,x]=(0,p.useState)(i),w=(0,p.useRef)(),C=(0,p.useRef)(),S=null==(d=C.current)?void 0:d.firstChild;S&&(S.style.overflowX="hidden");const j=()=>{y((()=>{var e;w.current.resetAfterIndex(0);const t=null==(e=w.current)||null==(e=e._outerRef.firstChild)?void 0:e.offsetHeight,n=.01*o*u;return t>n?n:t})())},k=t=>{const n=l?{[t]:2!==m[t]?2:1}:{[t]:1!==m[t]?1:2};f(Object.assign({},m,n)),g(A({items:e,toggleItem:n})),y(.01*o*u),s_={},w.current.resetAfterIndex(0)},R=t=>{c&&(g(A(t?{items:e,addInsideId:t}:{items:e})),j())},E=({data:e,index:t,rowStyle:n,rowComponent:o})=>{const i=e(t),s=(0,p.useCallback)((e=>{const n=`${t}`,o=(null==S?void 0:S.offsetWidth)-(null==S?void 0:S.clientWidth)||0,i=((0,O.VS)(O.c0)?e.scrollWidth:e.offsetWidth)+o+5,s=e.scrollHeight;b{const i=[];for(let a=0;a{g(A({items:e}))}),[e]),(0,p.useEffect)((()=>{0===(null==h?void 0:h.length)&&j()}),[h]),(0,_.jsx)("div",{ref:C,children:(0,_.jsx)(o_._m,{ref:w,height:v+4,itemCount:(null==h?void 0:h.length)||0,itemSize:e=>s_[`${e}`]||r,width:b,itemData:e=>({row:h&&h[e],toggle:k,addInside:R}),children:({data:e,index:n,style:r})=>(0,_.jsx)(E,{data:e,rowStyle:r,index:n,rowComponent:t})})})},c_={taxonomy:"taxonomy--sbNxo",taxonomy_open:"taxonomy_open--InD7j",taxonomy__selected:"taxonomy__selected--VOtIN",taxonomy__dropdown:"taxonomy__dropdown--Qi8yg",taxonomy__search:"taxonomy__search--qkTHD",taxonomy__item:"taxonomy__item--I4JB1",taxonomy__measure:"taxonomy__measure--ialoK",taxonomy__measure_ff_dev4075:"taxonomy__measure_ff_dev4075--_zpBo",taxonomy__item_user:"taxonomy__item_user--JBwBu",taxonomy__item_session:"taxonomy__item_session--jWm5B",taxonomy__grouping:"taxonomy__grouping--iZK7b",taxonomy__extra:"taxonomy__extra--GgvBt",taxonomy__extra_actions:"taxonomy__extra_actions--tQuLD",taxonomy__extra_count:"taxonomy__extra_count--MtR7B",taxonomy__action:"taxonomy__action--rpruy",taxonomy__add__container:"taxonomy__add__container--rbs2W",taxonomy__add:"taxonomy__add--dOQt_",taxonomy__newitem:"taxonomy__newitem--amueo",taxonomy__collapsable:"taxonomy__collapsable--hc4oZ"},d_=["title","wrapper","children"],u_=p.createContext([[],()=>{}]),h_=p.createContext({}),g_=({onAddLabel:e,onFinish:t,path:n})=>{const r=(0,p.useRef)(null),o=o=>{if(!r.current)return;const i=r.current.value,a="key"in o&&"Escape"===o.key,s="key"in o&&"Enter"===o.key,l="blur"===o.type;a&&o.stopPropagation(),s&&!i||((l||s)&&i&&e([...n,i]),(l||s||a)&&(r.current.value="",null==t||t()))};return(0,p.useEffect)((()=>{var e;return null==(e=r.current)?void 0:e.focus()}),[]),(0,_.jsx)("div",{className:c_.taxonomy__newitem,children:(0,_.jsx)("input",{name:"taxonomy__add",onKeyDownCapture:o,onBlur:o,ref:r})})},m_=({isEditable:e,flatItems:t})=>{const[n,r]=(0,p.useContext)(u_),{showFullPath:o,pathSeparator:i=" / "}=(0,p.useContext)(h_),a=n.map((e=>e.map((e=>{var n;const r=null==(n=t.find((t=>t.path[t.path.length-1]===e)))?void 0:n.label;return null!=r?r:e}))));return(0,_.jsx)("div",{className:["htx-taxonomy-selected",c_.taxonomy__selected].join(" "),children:a.map(((t,a)=>(0,_.jsxs)("div",{children:[(0,_.jsx)("span",{children:o?t.join(i):t[t.length-1]}),e?(0,_.jsx)("input",{type:"button",onClick:()=>r(n[a],!1),value:"×"}):null]},t.join("|"))))})};const p_=e=>{let{title:t,wrapper:n,children:r}=e,o=(0,Yn.A)(e,d_);if(!(0,O.VS)(O.up))return r;const i=n?(0,_.jsx)(n,{children:r}):r;return t?(0,_.jsx)(ir,Object.assign({title:t,mouseEnterDelay:500},o,{children:i})):i},f_=({style:e,item:t,dimensionCallback:n,maxWidth:r,isEditable:o})=>{var i;const{row:{id:a,isOpen:s,childCount:l,isFiltering:c,name:d,path:u,padding:h,isLeaf:g,hint:m},toggle:f,addInside:v}=t,[y,b]=(0,p.useContext)(u_),{leafsOnly:x,maxUsages:C,maxUsagesReached:S,onAddLabel:j,onDeleteLabel:k}=(0,p.useContext)(h_),R=y.some((e=>(0,w.isArraysEqual)(e,u))),E=y.some((e=>function(e,t){return!(e.length<=t.length)&&t.every(((t,n)=>e[n]===t))}(e,u))),A=x&&!g,T=S&&!R,P=A||T||!o,I=g?{display:"none"}:{transform:s?"rotate(180deg)":"rotate(90deg)"},L=A?"Only leaf nodes allowed":T?`Maximum ${C} items already selected`:void 0,M=(0,p.useCallback)((e=>{e&&(e.indeterminate=!R&&E)}),[R,E]),K=(0,p.useCallback)((()=>{null==k||k(u),v()}),[t,k]),D="session"===t.row.origin?c_.taxonomy__item_session:"user"===t.row.origin?c_.taxonomy__item_user:"",N=""===d&&j,V=(0,p.useRef)(),z=r-h-(r-(null==(i=V.current)?void 0:i.parentElement.offsetWidth)||0)-90;return(0,p.useEffect)((()=>{const e=null==V?void 0:V.current;e&&(e.toggle=f,n(e))}),[]),(0,_.jsx)("div",{ref:V,style:Object.assign({paddingLeft:h,maxWidth:r},e,{width:"fit-content"}),children:N?(0,_.jsx)(g_,{onAddLabel:j,onFinish:()=>v(),path:u},""):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:[c_.taxonomy__measure,!!(0,O.VS)(O.c0)&&c_.taxonomy__measure_ff_dev4075].filter(Boolean).join(" "),children:[(0,_.jsx)("label",{children:d}),(0,O.VS)(O.c0)&&!c&&(0,_.jsx)("div",{className:c_.taxonomy__extra,children:(0,_.jsx)("span",{className:c_.taxonomy__extra_count,children:l})})]}),(0,_.jsx)(p_,{title:m,children:(0,_.jsxs)("div",{className:[c_.taxonomy__item,D].join(" "),children:[(0,_.jsx)("div",{className:c_.taxonomy__grouping,onClick:()=>f(a),children:(0,_.jsx)(lc,{stroke:"#09f",style:I})}),(0,_.jsx)("input",{className:"item",id:a,name:a,type:"checkbox",disabled:P,checked:R,ref:M,onChange:e=>{o&&b(u,e.currentTarget.checked)}}),(0,_.jsx)("label",{htmlFor:a,style:(0,O.VS)(O.c0)?{}:{maxWidth:`${z}px`},onClick:o?()=>A&&f(a):void 0,title:L,className:P?c_.taxonomy__collapsable:void 0,children:d}),!c&&(0,_.jsxs)("div",{className:c_.taxonomy__extra,children:[(0,_.jsx)("span",{className:c_.taxonomy__extra_count,children:l}),o&&j&&(0,_.jsx)("div",{className:c_.taxonomy__extra_actions,children:(0,_.jsx)(t_.A,{destroyPopupOnHide:!0,trigger:["click"],overlay:(0,_.jsxs)(n_.A,{children:[(0,_.jsx)(n_.A.Item,{className:c_.taxonomy__action,onClick:()=>{v(a)},children:"Add Inside"},"add-inside"),"session"===t.row.origin&&(0,_.jsx)(n_.A.Item,{className:c_.taxonomy__action,onClick:K,children:"Delete"},"delete")]}),children:(0,_.jsx)("div",{children:"..."})})})]})]})})]})})},v_=({show:e,flatten:t,items:n,dropdownRef:r,isEditable:o})=>{const i=(0,p.useRef)(null),[a,s]=(0,p.useState)(""),{onAddLabel:l,minWidth:c,maxWidth:d}=(0,p.useContext)(h_),[u,h,g]=r_(!1),m=a?((e,t)=>{const n=[],r=[];let o=-1;for(let a=e.length;a--;){const s=e[a];if(s.depth!==o){if(t(s)){const e=Object.assign({},s,{children:[]});0===s.depth?n.unshift(e):(o=s.depth-1,r[o]||(r[o]=[]),r[o].unshift(e))}}else{var i;const e=Object.assign({},s,{children:null!=(i=r[o])?i:[]});r[o]=[],o?(r[o-1]||(r[o-1]=[]),r[o-1].unshift(e)):n.unshift(e),o--}}return n})(t,(e=>e.label.toLocaleLowerCase().includes(a))):n;(0,p.useEffect)((()=>{const t=i.current;e&&t&&(t.value="",t.focus(),s(""))}),[e]);return(0,_.jsxs)("div",{className:c_.taxonomy__dropdown,ref:r,style:{display:e?"block":"none"},children:[(0,_.jsx)("input",{autoComplete:"off",className:c_.taxonomy__search,name:"taxonomy__search",placeholder:"Search...",onInput:e=>s(e.currentTarget.value.toLocaleLowerCase()),ref:i}),(0,_.jsx)(l_,{items:m,isEditable:o,rowComponent:f_,flatten:""!==a,rowHeight:30,defaultExpanded:!1,maxHeightPercentage:50,minWidth:Number(c)||200,maxWidth:Number(d)||600,transformationCallback:({node:{children:e,depth:t,label:n,origin:r,path:o,hint:i},nestingLevel:a,isFiltering:s,isOpen:l,childCount:c})=>({childCount:c,id:`${n}-${t}`,isFiltering:s,isLeaf:!(null!=e&&e.length),isOpen:l,isOpenByDefault:!0,name:n,nestingLevel:a,origin:r,padding:10*a+10,path:o,hint:i})}),l&&""===a&&(0,_.jsx)("div",{className:c_.taxonomy__add__container,children:u?(0,_.jsx)(g_,{path:[],onAddLabel:l,onFinish:g}):o?(0,_.jsx)("div",{className:c_.taxonomy__add,children:(0,_.jsx)("button",{type:"button",onClick:h,children:"Add"})}):null})]})},y_=({items:e,selected:t,onChange:n,onAddLabel:r,onDeleteLabel:o,options:i={},isEditable:a=!0})=>{const s=(0,p.useRef)(null),l=(0,p.useRef)(null),[c,d]=(0,p.useState)(!1),u=(0,p.useCallback)((()=>d(!1)),[]),h=(0,p.useCallback)((e=>{var t;const n=c_.taxonomy__action;[e.target,e.target.parentNode].some((e=>{var t;return null==e||null==(t=e.classList)?void 0:t.contains(n)}))||null!=(t=l.current)&&t.contains(e.target)||u()}),[]),g=c?c_.taxonomy_open:"",m=(0,p.useMemo)((()=>{const t=[],n=e=>{var r;t.push(e),null==(r=e.children)||r.forEach(n)};return e.forEach(n),t}),[e]),[f,v]=(0,p.useState)(t),y=(0,p.useMemo)((()=>[f,(e,t)=>{const r=t?[...f,e]:f.filter((t=>!(0,w.isArraysEqual)(t,e)));(!1!==i.canRemoveItems||r.length)&&(v(r),n&&n(null,r))}]),[f]),b=(0,p.useMemo)((()=>{const e=!!i.maxUsages&&f.length>=i.maxUsages;return Object.assign({},i,{maxUsagesReached:e,onAddLabel:r,onDeleteLabel:o})}),[i,i.maxUsages,i.maxUsages?f:0]),x=(0,p.useCallback)((e=>{var t,n,r;const o=null==(t=l.current)?void 0:t.querySelectorAll(".item"),i=null==(n=l.current)?void 0:n.querySelector("input"),a=document.activeElement||void 0,s=o&&o.length>0,c=o&&a?Array.from(o).findIndex((e=>e.id===a.id)):-1,h=(e,t)=>s&&o[e+t].focus(),g=e=>{["text","checkbox"].includes(e.target.type)&&e.preventDefault()};switch(e.key){case"Escape":u(),e.stopPropagation();break;case"ArrowDown":g(e),e.shiftKey&&(d(!0),i&&i.focus()),c>=0&&h(c,1),i===a&&h(0,0);break;case"ArrowUp":g(e),c>0?h(c,-1):0===c&&i&&i.focus();break;case"ArrowRight":c>=0&&(null==(r=a.parentNode)||null==(r=r.parentNode)||r.toggle(a.id)),i&&i.focus()}}),[]);return(0,p.useEffect)((()=>{v(t)}),[t]),(0,p.useEffect)((()=>(document.body.addEventListener("click",h,!0),document.body.addEventListener("keydown",x),()=>{document.body.removeEventListener("click",h),document.body.removeEventListener("keydown",x)})),[]),(0,_.jsx)(u_.Provider,{value:y,children:(0,_.jsxs)(h_.Provider,{value:b,children:[(0,_.jsx)(m_,{isEditable:a,flatItems:m}),(0,_.jsxs)("div",{className:["htx-taxonomy",c_.taxonomy,g].join(" "),ref:l,children:[(0,_.jsxs)("span",{onClick:()=>d((e=>!e)),children:[i.placeholder||"Click to add...",(0,_.jsx)(lc,{stroke:"#09f"})]}),(0,_.jsx)(v_,{show:c,isEditable:a,items:e,flatten:m,dropdownRef:s})]})]})})},b_=h.gK.model(Object.assign({},(0,O.VS)(O.cE)?{id:h.gK.identifier}:{},{selected:h.gK.optional(h.gK.boolean,!1),alias:h.gK.maybeNull(h.gK.string),value:h.gK.maybeNull(h.gK.string),hotkey:h.gK.maybeNull(h.gK.string),style:h.gK.maybeNull(h.gK.string),html:h.gK.maybeNull(h.gK.string),color:h.gK.maybeNull(h.gK.string)},(0,O.VS)(O.up)?{hint:h.gK.maybeNull(h.gK.string)}:{})),x_=h.gK.model({type:"choice",visible:h.gK.optional(h.gK.boolean,!0),_value:h.gK.optional(h.gK.string,""),children:Te.unionArray(["choice"]),parentTypes:Te.tagsTypes(["Choices","Taxonomy"]),readonly:h.gK.optional(h.gK.boolean,!1)}).views((e=>({get isCheckbox(){var t;const n=null==(t=e.parent)?void 0:t.choice;return"multiple"===n||"single"===n},get isSelect(){var t;return"select"===(null==(t=e.parent)?void 0:t.layout)},canBeUsed:()=>!0,get isLeaf(){var t;return!e.nestedResults||!(null!=(t=e.children)&&t.length)},get sel(){return e.isLeaf?e._sel:e.children.every((e=>!0===e.sel))},get indeterminate(){return!e.isLeaf&&(!e.sel&&e.children.some((e=>!0===e.sel)))},get parentChoice(){return Te.getParentTagOfTypeString(e,"choice")},get isSkipped(){return!e.nestedResults&&!!e.parentChoice},get nestedResults(){var t;return!1!==(null==(t=e.parent)?void 0:t.allownested)},get _resultValue(){var t;return null!=(t=e.alias)?t:e._value},get resultValue(){if(e.nestedResults){const t=[];let n=e;for(;n;)t.unshift(n._resultValue),n=n.parentChoice;return t}return e._resultValue},isReadOnly(){var t;return e.readonly||(null==(t=e.parent)?void 0:t.isReadOnly())}}))).volatile((()=>({_sel:!1}))).actions((e=>({toggleSelected(){var t,n;if(null!=(t=e.parent)&&t.readonly||null!=(n=e.annotation)&&n.isReadOnly())return;const r=e.parent,o=e.sel;r.shouldBeUnselected&&(null==r.resetSelected||r.resetSelected()),e.setSelected(!o),null==r.updateResult||r.updateResult()},setVisible(t){e.visible=t},setSelected(t){e._sel=t,e.isLeaf||e.children.forEach((e=>{e.setSelected(t)}))}}))).actions((e=>{var t;return"choices"===(null==(t=e.parent)?void 0:t.type)?{onHotKey:()=>e.toggleSelected()}:{}})),w_=h.gK.compose("ChoiceModel",nE,b_,ze,x_,Pe),C_=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{var n;let r={};e.style&&(r=D.cssConverter(e.style));const o=(t.settings.enableTooltips||t.settings.enableLabelTooltips)&&t.settings.enableHotkeys&&e.hotkey,i=(0,p.useCallback)((t=>{e.isReadOnly()||(e.toggleSelected(),t.nativeEvent.target.blur())}),[]),[a,s]=(0,p.useState)(!1),l=(0,p.useCallback)((()=>s((e=>!e))),[]);return(0,_.jsxs)(Ze.eB,{name:"choice",mod:{layout:e.parent.layout,leaf:e.isLeaf,notLeaf:!e.isLeaf,hidden:!e.visible},children:[(0,_.jsxs)(Ze.Sl,{name:"item",mod:{notLeaf:!e.isLeaf},style:r,children:[(0,_.jsx)(Ze.Sl,{name:"checkbox",component:(c=e.isCheckbox?e_.A:QE.Ay,d=e._value,e=>(0,_.jsx)(c,Object.assign({},e,{name:d}))),mod:{notLeaf:!e.isLeaf},checked:e.sel,indeterminate:!e.sel&&e.indeterminate,disabled:e.isReadOnly(),onChange:i,children:(0,_.jsxs)(p_,{title:e.hint,wrapper:"span",children:[e.html?(0,_.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(e.html)}}):e._value,o&&(0,_.jsxs)(ar,{children:["[",e.hotkey,"]"]})]})}),!e.isLeaf&&(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{collapsed:a},component:vE.default,type:"text",onClick:l,children:(0,_.jsx)(lc,{})})]}),e.nestedResults&&null!=(n=e.children)&&n.length?(0,_.jsx)(Ze.Sl,{name:"children",mod:{collapsed:a},children:D.renderChildren(e,e.annotation)}):null]});var c,d})));x.addTag("choice",w_,C_);const S_=h.gK.model().views((e=>({findSelectedChoice(t){var n,r;let o;return e.findLabel?o=e.findLabel(t):e.findItemByValueOrAlias&&(o=e.findItemByValueOrAlias(t)),(null==(n=o)?void 0:n.alias)||(null==(r=o)?void 0:r.value)},selectedChoicesMatch(t,n){const r=e.findSelectedChoice(t),o=e.findSelectedChoice(n);return(0,w.isDefined)(r)&&(0,w.isDefined)(o)&&r===o},hasChoiceSelectionSimple(t){if(null!=t&&t.length){const n=e.selectedValues().map((e=>Array.isArray(e)?e.at(-1):e));return t.some((e=>n.includes(e)))}return e.isSelected},hasChoiceSelection(t,n=[]){if(null!=t&&t.length){if(e.findLabel)return t.map((t=>e.findLabel(t))).some((e=>e&&e.sel));if(n.length){const r=t=>{if(e.findItemByValueOrAlias){const n=e.findItemByValueOrAlias(t);t=(null==n?void 0:n.alias)||(null==n?void 0:n.value)||t}return n.map((e=>Array.isArray(e)?e.at(-1):e)).includes(t)};return t.some(r)}return!1}return e.isSelected}}))),{Option:j_}=Zn.A,k_=h.gK.model({toname:h.gK.maybeNull(h.gK.string),showinline:h.gK.maybeNull(h.gK.boolean),choice:h.gK.optional(h.gK.enumeration(["single","single-radio","multiple"]),"single"),layout:h.gK.optional(h.gK.enumeration(["select","inline","vertical"]),"vertical"),value:h.gK.optional(h.gK.string,""),allownested:h.gK.optional(h.gK.boolean,!1)}),O_=h.gK.model({pid:h.gK.optional(h.gK.string,E),visible:h.gK.optional(h.gK.boolean,!0),type:"choices",children:Te.unionArray(["choice","view","header","hypertext"])}).views((e=>({get shouldBeUnselected(){return"single"===e.choice||"single-radio"===e.choice},states:()=>e.annotation.toNames.get(e.name),get serializableValue(){const t=e.selectedValues();return t&&t.length?{choices:t}:null},get preselectedValues(){return e.tiedChildren.filter((e=>!0===e.selected&&!e.isSkipped)).map((e=>e.resultValue))},get selectedLabels(){return e.tiedChildren.filter((e=>!0===e.sel&&!e.isSkipped))},selectedValues:()=>e.selectedLabels.map((e=>e.resultValue)),get defaultChildType(){return"choice"}}))).actions((e=>({afterCreate(){!0===e.showinline&&(e.layout="inline"),!1===e.showinline&&(e.layout="vertical")},needsUpdate(){e.result?e.setResult(e.result.mainValue):e.setResult([])},requiredModal(){fn.warning(e.requiredmessage||`Checkbox "${e.name}" is required.`)},unselectAll(){},updateFromResult(t){e.setResult(Array.isArray(t)?t:[t])},resetSelected(){e.selectedLabels.forEach((e=>e.setSelected(!1)))},setResult(t){e.tiedChildren.forEach((e=>{let n=!1;e.isSkipped||(n=null==t||null==t.some?void 0:t.some((t=>Array.isArray(t)&&Array.isArray(e.resultValue)?t.length===e.resultValue.length&&(null==t.every?void 0:t.every(((t,n)=>{var r;return t===(null==(r=e.resultValue)?void 0:r[n])}))):t===e.resultValue))),e.setSelected(n)}))}}))).actions((e=>{const t={validate:e.validate};return{validate(){if(!t.validate()||"multiple"!==e.choice&&e.checkResultLength()>1)return!1},checkResultLength:()=>e.children.filter((e=>e._sel)).length,beforeSend(){"multiple"!==e.choice&&e.checkResultLength()>1&&fn.warning(`The number of options selected (${e.checkResultLength()}) exceed the maximum allowed (1). To proceed, first unselect excess options for:\r\n • Choices (${e.name})`)}}})),R_=h.gK.compose("ChoicesModel",QR,BE,YR.props({_child:"ChoiceModel"}),OE,ct,...(0,O.VS)(O.gF)?[jE]:[],$e,S_,JE,qR,Pe,k_,O_),E_=(0,y.PA)((({item:e})=>(0,_.jsx)(Zn.A,{style:{width:"100%"},value:e.selectedLabels.map((e=>e._value)),mode:"multiple"===e.choice?"multiple":"",disabled:e.isReadOnly(),onChange:t=>{if(Array.isArray(t))e.resetSelected(),t.forEach((t=>e.findLabel(t).setSelected(!0))),e.updateResult();else{const n=e.findLabel(t);n&&n.toggleSelected()}},children:e.tiedChildren.map((e=>(0,_.jsx)(j_,{value:e._value,children:(0,_.jsx)(p_,{title:e.hint,wrapper:"div",children:e._value})},e._value)))}))),__=(0,y.PA)((({item:e})=>(0,_.jsx)(Ze.eB,{name:"choices",mod:{hidden:!e.isVisible||!e.perRegionVisible(),layout:e.layout},ref:e.elementRef,children:"select"===e.layout?(0,_.jsx)(E_,{item:e}):D.renderChildren(e,e.annotation)})));x.addTag("choices",R_,__);var A_=n(55454),T_=n(99811);const P_=h.gK.model({toname:h.gK.maybeNull(h.gK.string),maxrating:h.gK.optional(h.gK.string,"5"),icon:h.gK.optional(h.gK.string,"star"),size:h.gK.optional(h.gK.string,"medium"),defaultvalue:h.gK.optional(h.gK.string,"0"),hotkey:h.gK.maybeNull(h.gK.string)}),I_=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"rating",rating:h.gK.maybeNull(h.gK.number)}).views((e=>({selectedValues:()=>e.rating,get serializableValue(){const t=e.selectedValues();return t?{rating:t}:null},get holdsState(){return e.rating>0}}))).actions((e=>({getSelectedString:()=>`${e.rating} star`,needsUpdate(){e.result?e.rating=e.result.mainValue:e.rating=null},unselectAll(){},setRating(t){e.rating=t,e.updateResult()},updateFromResult(t){e.rating=t},requiredModal(){fn.warning(e.requiredmessage||`Rating "${e.name}" is required.`)},increaseValue(){e.rating>=Number(e.maxrating)?e.setRating(0):e.rating>0?e.setRating(e.rating+1):e.setRating(1)},onHotKey:()=>e.increaseValue()}))),L_=h.gK.compose("RatingModel",QR,BE,OE,ct,...(0,O.VS)(O.gF)?[jE]:[],Pe,P_,I_),M_=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{let n;"small"===e.size?n=15:"medium"===e.size?n=25:"large"===e.size&&(n=40);const r=e.perRegionVisible()?{}:{display:"none"};return(0,_.jsxs)("div",{style:r,onKeyDownCapture:e=>{if(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey){const t=document.activeElement;e.currentTarget.contains(t)&&t.blur()}},ref:e.elementRef,children:[(0,_.jsx)(A_.A,{character:(0,_.jsx)(T_.A,{style:{fontSize:n}}),value:e.rating,count:Number(e.maxrating),defaultValue:Number(e.defaultvalue),onChange:e.setRating}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)("sup",{style:{fontSize:"9px"},children:["[",e.hotkey,"]"]})]})})));x.addTag("rating",L_,M_);const K_=h.gK.model("ParagraphsRegionModel",{type:"textrange",object:h.gK.late((()=>h.gK.reference(W_))),startOffset:h.gK.integer,start:h.gK.string,endOffset:h.gK.integer,end:h.gK.string,states:h.gK.maybeNull(h.gK.array(h.gK.union(pE,YE,R_,L_)))}).volatile((()=>({text:"",hideable:!0}))).views((e=>({get parent(){return(0,h._n)(e)?e.object:null},getRegionElement(){var t;return null==(t=e._spans)?void 0:t[0]}}))).actions((e=>({beforeDestroy(){rn.HTML.removeSpans(e._spans)},setText(t){e.text=t},fixOffsets(t,n){e.startOffset=t,e.endOffset=n},serialize(){const{start:t,end:n}=e,r={value:{start:t,end:n,startOffset:e.startOffset,endOffset:e.endOffset}};return"yes"===e.object.savetextresult&&(r.value.text=e.text),r}}))),D_=h.gK.compose("ParagraphsRegionModel",it,ht,We,K_,UR);x.addRegionType(D_,"paragraphs");const N_={phrase:"phrase--qv9_O",numbered:"numbered--a9bkk",name:"name--PZvdb",text:"text--Ou0FP",dialoguename:"dialoguename--Z1bwn",dialoguetext:"dialoguetext--fQTLz",scroll_container:"scroll_container--zjNwB",wrapper_header:"wrapper_header--EZcmN",wrapper_header__buttons:"wrapper_header__buttons--V_YdW",container:"container--mYuCT",withAudio:"withAudio--toh21",collapsed:"collapsed--JuuM7",authorFilter:"authorFilter--koQOu",authorFilter__showall:"authorFilter__showall--iRWAc",authorFilter__placeholder:"authorFilter__placeholder--OnkZm",authorFilter__search:"authorFilter__search--CKZQK",authorFilter__search__input:"authorFilter__search__input--Z6sUA",authorFilter__select:"authorFilter__select--_OLb1",authorFilter__select__item:"authorFilter__select__item--q_yG2",audio:"audio--Fq_ZD",playNewUi:"playNewUi--oUID4",play:"play--q_72j",newUI:"newUI--hohwV",titleWrapper:"titleWrapper--guGg3",time:"time--JzGDH",wrapperText:"wrapperText--Rj0j9",readingLine:"readingLine--UoCCW"},V_=h.gK.model("ParagraphsModel",{value:h.gK.maybeNull(h.gK.string),valuetype:h.gK.optional(h.gK.enumeration(["json","url"]),(()=>window.LS_SECURE_MODE?"url":"json")),audiourl:h.gK.maybeNull(h.gK.string),showplayer:!1,highlightcolor:h.gK.maybeNull(h.gK.string),showlabels:h.gK.optional(h.gK.boolean,!1),layout:h.gK.optional(h.gK.enumeration(["none","dialogue"]),"none"),savetextresult:h.gK.optional(h.gK.enumeration(["none","no","yes"]),(()=>window.LS_SECURE_MODE?"no":"yes")),namekey:h.gK.optional(h.gK.string,"author"),textkey:h.gK.optional(h.gK.string,"text"),contextscroll:h.gK.optional(h.gK.boolean,!1)}),z_=h.gK.model("ParagraphsModel",{type:"paragraphs",_update:h.gK.optional(h.gK.number,1)}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,h.Zn)(e)},get audio(){if(!e.audiourl)return null;if("$"===e.audiourl[0]){const t=(0,h.Zn)(e),n=e.audiourl.substr(1);return t.task.dataObj[n]}return e.audiourl},layoutStyles(t){if("dialogue"===e.layout){const n=t[e.namekey],r=$R().make_color({seed:n})[0];return(0,O.VS)(O.LG)?{phrase:{"--highlight-color":r,"--background-color":"#FFF"},name:{color:r},inactive:{phrase:{"--highlight-color":rn.Colors.convertToRGBA(r,.4),"--background-color":"#FAFAFA"},name:{color:rn.Colors.convertToRGBA(r,.9)}}}:{phrase:{backgroundColor:rn.Colors.convertToRGBA(r,.25)}}}return{}},get layoutClasses(){return"dialogue"===e.layout?{phrase:N_.phrase,name:N_.dialoguename,text:N_.dialoguetext}:{phrase:N_.phrase,name:N_.name,text:N_.text}},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t&&t.filter((e=>e.isSelected&&"paragraphlabels"===e._type))},isVisibleForAuthorFilter:t=>!(0,O.VS)(O.fw)||(!e.filterByAuthor.length||e.filterByAuthor.includes(t[e.namekey]))}))),B_=h.gK.model().volatile((()=>({_value:null,filterByAuthor:[],searchAuthor:"",playingId:-1,playing:!1,audioRef:(0,p.createRef)(),audioDuration:null,audioFrameHandler:null}))).views((e=>({regionIndicesByTime(t){var n;const r=[];return null==(n=e._value)||n.forEach((({start:e,duration:n,end:o},i)=>void 0!==e&&(!(e>t)&&void((void 0===n&&void 0===o||(null!=o?o:e+n)>t)&&r.push(i))))),r},get regionsStartEnd(){var t;return e.audioDuration?null==(t=e._value)?void 0:t.map((t=>{var n,r;if(void 0===t.start)return{};const o=(0,w.clamp)(null!=(n=t.start)?n:0,0,e.audioDuration),i=t.duration?o+t.duration:null!=(r=t.end)?r:e.audioDuration;return{start:o,end:(0,w.clamp)(i,o,e.audioDuration)}})):[]},get regionsValues(){return Object.values(e.regionsStartEnd)}}))).actions((e=>({triggerSync(t,n){const r=e.audioRef.current;r&&e.syncSend(Object.assign({playing:!r.paused,time:r.currentTime},n),t)},registerSyncHandlers(){e.syncHandlers.set("pause",e.stopNow),e.syncHandlers.set("play",e.handleSyncPlay),e.syncHandlers.set("seek",e.handleSyncPlay),e.syncHandlers.set("speed",e.handleSyncSpeed)},handleSyncPlay({time:t,playing:n}){const r=e.audioRef.current;r&&(r.currentTime=t,r.paused&&n?e.play():e.trackPlayingId())},handleSyncSpeed({speed:t}){const n=e.audioRef.current;n&&(n.playbackRate=t)},syncMuted(t){const n=e.audioRef.current;n&&(n.muted=t)}}))).actions((e=>({handleAudioLoaded(t){const n=t.target;e.audioDuration=n.duration},reset(){e.playingId=-1,e.audioFrameHandler&&(cancelAnimationFrame(e.audioFrameHandler),e.audioFrameHandler=null)},stopNow(){const t=e.audioRef.current;t&&(t.paused||(t.pause(),e.playing=!1,e.triggerSync("pause")))},stopAtTheEnd(){var t;const n=e.audioRef.current;if(!n)return;if(n.paused)return;const{end:r}=null!=(t=e.regionsStartEnd[e.playingId])?t:{};n.currentTime=r)return void e.reset();const o=e.regionsValues;e.playingId=o.findIndex((({start:e,end:t})=>n>=e&&n({setAuthorSearch(t){e.searchAuthor=t},setAuthorFilter(t){e.filterByAuthor=t}}))),H_=h.gK.model().actions((e=>({needsUpdate(){e._update=e._update+1},updateValue(t){const n=j(e.value,t.task.dataObj);if("url"===e.valuetype){const r=n;if(!(0,w.isValidObjectURL)(r,!0)){const o=[];return r?(o.push(`URL (${r}) is not valid.`),o.push('You should not put data directly into your task if you use valuetype="url".')):o.push(`URL is empty, check ${n} in data JSON.`),window.LS_SECURE_MODE&&o.unshift('In SECURE MODE valuetype set to "url" by default.'),t.annotationStore.addErrors([Kj.generalError(o.join("\n"))]),void e.setRemoteValue("")}fetch(r).then((e=>{if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);return e.json()})).then(e.setRemoteValue).catch((n=>{const o=Ge.A.ERR_LOADING_HTTP({attr:e.value,error:String(n),url:r});t.annotationStore.addErrors([Kj.generalError(o)]),e.setRemoteValue("")}))}else e.setRemoteValue(n)},setRemoteValue(t){const n=[];if(Array.isArray(t)?(e.namekey in t[0]||n.push(`"${e.namekey}" field not found in task data; check your nameKey parameter`),e.textkey in t[0]||n.push(`"${e.textkey}" field not found in task data; check your textKey parameter`)):n.push("Provided data is not an array"),n.length){const t=[`Task data (provided as ${e.value}) has wrong format.
`,"It should be an array of objects with fields,",'defined by nameKey ("author" by default)','and textKey ("text" by default)'].join(" ");return void e.store.annotationStore.addErrors([Kj.generalError(`${t}
    ${n.map((e=>`
  • ${e}
  • `)).join("")}
`)])}const r=(0,O.VS)(O.LG)&&e.contextscroll?t.sort(((e,t)=>{if(!e.start)return 1;if(!t.start)return-1;const n=e.end?e.end:e.start+e.duration||0,r=t.end?t.end:t.start+t.duration||0;return e.start===t.start?n-r:e.start-t.start})):t;e._value=r,e.needsUpdate()},createRegion(t){const n=D_.create(Object.assign({pid:t.id},t));return n._range=t._range,e.regions.push(n),e.annotation.addRegion(n),n},addRegions(t){const n=[],r=(0,O.VS)(O.Zr)?e.getAvailableStates():e.activeStates();if(0===r.length)return;const o=r[0],i={[o.valueType]:o.selectedValues()};for(const r of t){const t=e.annotation.createResult(r,i,o,e);t.setText(r.text),t.notifyDrawingFinished(),t._range=r._range,n.push(t)}return n},addRegion(t){if((0,O.VS)(O.Gd))return e.addRegions([t])[0];const n=(0,O.VS)(O.Zr)?e.getAvailableStates():e.activeStates();if(0===n.length)return;const r=n[0],o={[r.valueType]:r.selectedValues()},i=e.annotation.createResult(t,o,r,e);return i.setText(t.text),i.notifyDrawingFinished(),i._range=t._range,i}}))),F_=[it,V_,Fe,bn,Pe,z_,B_,H_].filter(Boolean),W_=h.gK.compose("ParagraphsModel",...F_);var $_=n(8009);const U_=p.createContext(null),Z_=["animated","visible"];let G_=1;const Y_=(0,p.forwardRef)(((e,t)=>{var n;let{animated:r=!0,visible:o=!1}=e,i=(0,Yn.A)(e,Z_);const a=(0,Ze.cn)("dropdown"),s=(0,p.useRef)(),{triggerRef:l,minIndex:c}=null!=(n=(0,p.useContext)(U_))?n:{},d=void 0===l,{children:u}=i,[h,m]=(0,p.useState)(o),[f,v]=(0,p.useState)({}),[y,b]=(0,p.useState)(o?"visible":null),x=(0,p.useCallback)((()=>{var e;const t=s.current,n=null!=(e=null==l?void 0:l.current)?e:t.parentNode,{left:r,top:o}=er(n,t,i.alignment||"bottom-left");v({left:r,top:o})}),[l,c]),w=(0,p.useMemo)((()=>G_++),[]),C=(0,p.useCallback)((async(e=!1,t)=>{if(!1!==i.enabled||!0!==e)return new Promise((n=>{const o=s.current;if(!1===r||!0===t)return b(e?"visible":null),void n();Jn(o,{transition:()=>{b(e?"appear":"disappear")},beforeTransition:()=>{b(e?"before-appear":"before-disappear")},afterTransition:()=>{b(e?"visible":null),n()}})}))}),[r]),S=(0,p.useCallback)((async(e,t)=>{const n=null!=e?e:!h;h!==n&&(null==i.onToggle||i.onToggle(n),await C(n,t),m(n))}),[h,C,i.onToggle]),j=(0,p.useCallback)((async e=>{await S(!1,e)}),[S]),k=(0,p.useCallback)((async e=>{await S(!0,e)}),[S]);or({onEnterFullscreen:()=>j(!0),onExitFullscreen:()=>j(!0)},[]),(0,p.useEffect)((()=>{S(!1)}),[d]),(0,p.useEffect)((()=>{if(!t)return;const e={dropdown:s.current,visible:null!==y,toggle:S,open:k,close:j};t instanceof Function?t(e):t.current=e}),[j,k,t,S,s,y]),(0,p.useEffect)((()=>{m(o)}),[o]),(0,p.useEffect)((()=>{d||"before-appear"!==y||x()}),[y,x,d]),(0,p.useEffect)((()=>{!1===i.enabled&&C(!1)}),[i.enabled]),(0,p.useEffect)((()=>{o?k():j()}),[o]);const R=(0,p.useMemo)((()=>{const e=u;return e.props&&"Menu"===e.props.type?(0,p.cloneElement)(e,Object.assign({},e.props,{className:a.elem("menu").mix(e.props.className)})):u}),[u]),E=(0,p.useMemo)((()=>{switch(y){case"before-appear":return"before-appear";case"appear":return"appear before-appear";case"before-disappear":return"before-disappear";case"disappear":return"disappear before-disappear";case"visible":return"visible";default:return o?"visible":null}}),[y,o]),A=(0,p.useMemo)((()=>{var e;return Object.assign({},null!=(e=i.style)?e:{},null!=f?f:{},{zIndex:(null!=c?c:1e3)+w})}),[i.style,w,c,f]),T=(0,_.jsx)(Ze.eB,{ref:s,name:"dropdown","data-testid":i.dataTestId,mix:[i.className,E],style:Object.assign({},A,{borderRadius:(0,O.VS)(O.bA)&&4}),onClick:e=>e.stopPropagation(),children:R});return!0===i.inline?T:(0,g.createPortal)(T,document.body)}));Y_.displayName="Dropdown";const X_=["tag","children","content","toggle","closeOnClickOutside","disabled"],q_=(0,p.forwardRef)(((e,t)=>{var n;let{tag:r,children:o,content:i,toggle:a,closeOnClickOutside:s=!0,disabled:l=!1}=e,c=(0,Yn.A)(e,X_);const d=null!=t?t:(0,p.useRef)(),u=p.Children.only(o),h=(0,p.useRef)(new Set),[g,m]=(0,p.useState)(1e3),f=(0,p.useRef)(null==u||null==(n=u.props)||null==(n=n.ref)?void 0:n.current),v=(0,p.useContext)(U_),y=(0,p.useCallback)((e=>{var t,n;const r=null==(t=f.current)||null==t.contains?void 0:t.contains(e),o=null==(n=d.current)||null==(n=n.dropdown)||null==n.contains?void 0:n.contains(e),i=Array.from(h.current).reduce(((t,n)=>t||n.hasTarget(e)),!1);return r||o||i}),[f,d]),b=(0,p.useCallback)((e=>{var t;s&&(y(e.target)||null==(t=d.current)||null==t.close||t.close())}),[s,y]),x=(0,p.useCallback)((e=>{var t,n,r;if(l)return;return(null==(t=d.current)||null==(t=t.dropdown)||null==t.contains?void 0:t.contains(e.target))?e.stopPropagation():!1===a?null==d||null==(n=d.current)?void 0:n.open():void(null==d||null==(r=d.current)||r.toggle())}),[d,l]),w=(0,p.useMemo)((()=>Object.assign({},u.props,{tag:r,key:"dd-trigger",ref:e=>{var t;f.current=null!=(t=f.current)?t:e,f.current&&m(Math.max(g,(e=>{let t=1e3;if(e){let o=e.parentElement;for(;o;){var n,r;const e=Number.parseInt(getComputedStyle(o).zIndex);isNaN(e)||(t=Math.max(t,e)),o=null!=(n=null==(r=o)?void 0:r.parentElement)?n:null}}return t})(f.current)))},className:(0,Ze.cn)("dropdown").elem("trigger").mix(c.className),onClickCapture:x})),[u,f,c.className,x]),C=(0,p.useMemo)((()=>(0,p.cloneElement)(u,w)),[u,w]),S=i?(0,_.jsx)(Y_,Object.assign({},c,{ref:d,children:i})):null;(0,p.useEffect)((()=>(document.addEventListener("click",b,{capture:!0}),()=>document.removeEventListener("click",b,{capture:!0}))),[b]);const j=(0,p.useMemo)((()=>({minIndex:g,triggerRef:f,dropdown:d,hasTarget:y,addChild:e=>h.current.add(e),removeChild:e=>h.current.delete(e),open:()=>{var e;return null==d||null==(e=d.current)||null==e.open?void 0:e.open()},close:()=>{var e;return null==d||null==(e=d.current)||null==e.close?void 0:e.close()}})),[f,d,g]);return(0,p.useEffect)((()=>{if(v)return v.addChild(j),()=>v.removeChild(j)}),[]),(0,_.jsxs)(U_.Provider,{value:j,children:[C,S]})})),J_=()=>(0,p.useContext)(U_),Q_=Object.assign(Y_,{Trigger:q_}),eA=(0,p.createContext)({multiple:!1,focused:!1,currentValue:[],setCurrentValue(){}}),{Block:tA,Elem:nA}=(0,Ze.JE)(),rA=(e,t)=>p.Children.toArray(e).reduce(((n,r)=>{if(null!==n)return n;const{type:o,props:i}=r;return"Select.Option"===o.displayName?i.value===t?n=r:Array.isArray(t)&&1===t.length&&(n=rA(e,t[0])):"Select.OptGroup"===o.displayName&&(n=rA(i.children,t)),n}),null),oA=({value:e,defaultValue:t,size:n,children:r,style:o,multiple:i,renderMultipleSelected:a,onChange:s,variant:l,surface:c,dataTestid:d,tabIndex:u=0,placeholder:h="Select value"})=>{const g=(0,p.useRef)(),m=(0,p.useRef)(),[f,v]=(0,p.useState)(i?[].concat(null!=e?e:[]).flat(10):e),[y,b]=(0,p.useState)(),x=p.Children.toArray(r).filter((e=>"Select.Option"===e.type.displayName&&!e.props.exclude)),C={currentValue:f,focused:y,multiple:i,setCurrentValue(e){const t=(e=>{let t=e;return i&&Array.isArray(f)&&e&&(t=!Array.isArray(e)&&f.includes(e)?f.filter((t=>t!==e)):[...f,e].flat(10)),v(t),t})(e);var n;(null==s||s(t),!0!==i)&&(null==(n=g.current)||n.close())}},S=(0,p.useMemo)((()=>{var e;if((0,O.VS)(O.fw)&&i&&a)return a(Array.isArray(f)?f:[f||""]);if(i&&Array.isArray(f)&&(null==f?void 0:f.length)>1)return(0,_.jsx)(_.Fragment,{children:"Multiple values selected"});const n=rA(r,null!=t?t:f),o=null==n||null==(e=n.props)?void 0:e.children;return o?(0,p.cloneElement)((0,_.jsx)(_.Fragment,{children:o})):null}),[f,t,r,e,a]),j=e=>{const t=x[null!=e?e:0];b(t.props.value)},k=(0,p.useCallback)((e=>{const t=x.findIndex((e=>e.props.value===y));let n=-1===t?0:t+e;n>=x.length?n=0:n<0&&(n=x.length-1),j(n)}),[y]);return(0,p.useEffect)((()=>{var t;i&&Array.isArray(e)&&Array.isArray(f)?!1===(0,$_.b)(null!=e?e:[],null!=f?f:[])&&C.setCurrentValue(null!=(t=null==e||null==e.flat?void 0:e.flat(10))?t:[]):e!==f&&C.setCurrentValue(e)}),[e,i]),(0,_.jsx)(eA.Provider,{value:C,children:(0,_.jsx)(tA,{ref:m,name:"select",mod:{size:n,surface:c},style:o,tabIndex:u,onKeyDown:e=>{var t;document.activeElement===m.current&&(["ArrowDown","ArrowUp"].includes(e.key)?null!=g&&g.current.visible?k("ArrowDown"===e.key?1:-1):(null==(t=g.current)||t.open(),j()):"Space"!==e.code&&"Enter"!==e.code||!(0,w.isDefined)(y)||C.setCurrentValue(y))},children:(0,_.jsx)(Q_.Trigger,{ref:g,className:(0,Ze.cn)("select",{elem:"dropdown",mod:{variant:l}}).toClassName(),content:(0,_.jsx)(nA,{name:"list",children:r}),onToggle:e=>{e||b(null)},children:(0,_.jsxs)(nA,{name:"selected","data-testid":d,children:[(0,_.jsx)(nA,{name:"value",children:null!=S?S:h}),(0,_.jsx)(nA,{name:"icon"})]})})})})};oA.displayName="Select";const iA=({value:e,children:t,style:n})=>{const{setCurrentValue:r,multiple:o,currentValue:i,focused:a}=(0,p.useContext)(eA),s=(0,p.useMemo)((()=>{const t=String(e);return o&&Array.isArray(i)?i.map((e=>String(e))).includes(t):t===String(i)}),[e,a,i]),l=(0,p.useMemo)((()=>String(e)===String(a)),[e,a]);return(0,_.jsx)(nA,{name:"option",mod:{selected:s,focused:l},onClick:t=>{t.stopPropagation(),r(e)},style:n,children:t})};iA.displayName="Select.Option";const aA=({label:e,children:t,style:n})=>(0,_.jsxs)(nA,{name:"optgroup",style:n,children:[(0,_.jsx)(nA,{name:"optgroup-label",children:e}),(0,_.jsx)(nA,{name:"optgroup-list",children:t})]});aA.displayName="Select.OptGroup",oA.Option=iA,oA.OptGroup=aA;const sA=({name:e,selected:t})=>{const n={border:`2px solid ${rn.Colors.convertToRGBA($R().make_color({seed:e})[0])}`};return(0,_.jsx)("span",{className:[N_.authorFilter__select__item,t&&N_.authorFilter__select__item_selected].join(" "),style:n,children:e})},lA=e=>0===e.length?null:(0,_.jsx)("div",{className:N_.authorFilter__select,children:e.map((e=>(0,_.jsx)(sA,{name:e},e)))}),cA=(0,y.PA)((({item:e,onChange:t})=>{const n=(0,p.useMemo)((()=>(0,_.jsx)("span",{className:N_.authorFilter__placeholder,children:"Show all authors"})),[]),r=e.filterByAuthor,o=(0,p.useMemo)((()=>e._value.reduce(((t,n)=>t.includes(n[e.namekey])?t:[...t,n[e.namekey]]),[]).sort()),[e._value,e.namekey]),i=e.searchAuthor?o.filter((t=>t.toLowerCase().includes(e.searchAuthor.toLowerCase()))):o,a=(0,p.useCallback)((n=>{!n||null!=n&&n.includes(null)?e.setAuthorFilter([]):e.setAuthorFilter(n),null==t||t()}),[e.setAuthorFilter]);return(0,_.jsx)("div",{className:N_.authorFilter,children:(0,_.jsxs)(oA,{placeholder:n,value:r,options:o,onChange:a,renderMultipleSelected:lA,size:"compact",variant:"rounded",surface:"emphasis",multiple:!0,children:[(0,_.jsx)("div",{className:N_.authorFilter__search,children:(0,_.jsx)("input",{autoComplete:"off",className:N_.authorFilter__search__input,name:"search_author",placeholder:"Search",onInput:t=>e.setAuthorSearch(t.target.value)})}),(0,_.jsx)(oA.Option,{value:null,exclude:!0,children:(0,_.jsx)("span",{className:N_.authorFilter__showall,children:"Show all authors"})},"showAllAuthors"),i.map((e=>(0,_.jsx)(oA.Option,{value:e,children:(0,_.jsx)(sA,{name:e,selected:!1})},e)))]})})})),dA=e=>{if(isNaN(e))return"";const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.round(e%60);return`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`},uA=(0,y.PA)((({item:e,playingId:t,activeRef:n,setIsInViewport:r})=>{const[o,i]=(0,p.useState)(null),[a,s]=(0,p.useState)(0),[l,c]=(0,p.useState)(null),d=e.layoutClasses,u=!!e.audio;let g;const m=(0,p.useCallback)(((t,n,r,o=!0)=>{if(!t||!(0,O.VS)(O.LG)||!e.contextscroll)return;const a=t.animate([{top:`${n}%`},{top:"100%"}],{easing:"linear",duration:1e3*r});o?a.play():a.pause(),i(a)}),[o,i]),f=(0,p.useCallback)((r=>{var o,i,s,l,d,u,h,g;if(!(0,O.VS)(O.LG)||!e.contextscroll)return;const p=(null==(o=e._value[t])?void 0:o.duration)||(null==(i=e._value[t])?void 0:i.end)-(null==(s=e._value[t])?void 0:s.start),f=(null!=(l=e._value[t])&&l.end?null==(h=e._value[t])?void 0:h.end:(null==(d=e._value[t])?void 0:d.start)+(null==(u=e._value[t])?void 0:u.duration))-a.time,v=100-100*f/p;v>0&&v<100?m(null==(g=n.current)?void 0:g.querySelector(".reading-line"),v,f,a.playing):c(r)}),[a,t]),v=(0,p.useCallback)((n=>{if(g&&g.disconnect(),null!==n){var o,i,a;const s=(null==(o=e._value[t])?void 0:o.duration)||(null==(i=e._value[t])?void 0:i.end)-(null==(a=e._value[t])?void 0:a.start);isNaN(s)||m(n,0,s,e.playing),g=new IntersectionObserver((e=>{r(e[0].isIntersecting)}),{rootMargin:"0px"}),g.observe(n)}}),[t]);if((0,p.useEffect)((()=>{var t;if((0,O.VS)(O.LG)&&e.contextscroll)return null==(t=e.syncHandlers)||t.set("seek",(t=>{e.handleSyncPlay(t),s(t),r(!0)})),()=>{var e;null==(e=g)||e.disconnect()}}),[]),(0,p.useEffect)((()=>{f(!0)}),[a]),(0,p.useEffect)((()=>{l&&f(!1)}),[t]),(0,p.useEffect)((()=>{(0,O.VS)(O.LG)&&e.contextscroll&&(e.playing?null==o||o.play():null==o||o.pause())}),[e.playing]),!e._value)return null;return e._value.map(((o,i)=>{const a=t===i,s=a&&e.playing,l=(0,O.VS)(O.LG)&&!a?e.layoutStyles(o).inactive:e.layoutStyles(o),c=[d.phrase],g=e.isVisibleForAuthorFilter(o);return u&&c.push(N_.withAudio),g||c.push(N_.collapsed),(0,h.Zn)(e).settings.showLineNumbers&&c.push(N_.numbered),(0,_.jsxs)("div",{ref:a?n:null,"data-testid":`phrase:${i}`,className:`${c.join(" ")} ${(0,O.VS)(O.LG)&&N_.newUI}`,style:null==l?void 0:l.phrase,children:[g&&u&&!isNaN(o.start)&&(0,_.jsx)(jr.A,{type:"text",className:(0,O.VS)(O.LG)?N_.playNewUi:N_.play,"aria-label":s?"pause":"play",icon:s?(0,O.VS)(O.LG)?(0,_.jsx)(qd,{}):(0,_.jsx)(kr.A,{}):(0,O.VS)(O.LG)?(0,_.jsx)(Wd,{}):(0,_.jsx)(Or.A,{}),onClick:()=>{r(!0),e.play(i)}}),(0,O.VS)(O.LG)?(0,_.jsxs)("span",{className:N_.titleWrapper,"data-skip-node":"true",children:[(0,_.jsx)("span",{className:null==d?void 0:d.name,style:null==l?void 0:l.name,children:o[e.namekey]}),(0,_.jsx)("span",{className:N_.time,children:(e=>{var t,n,r,o,a;return`${dA(null==(t=e._value[i])?void 0:t.start)} - ${dA(null!=(n=e._value[i])&&n.end?null==(a=e._value[i])?void 0:a.end:(null==(r=e._value[i])?void 0:r.start)+(null==(o=e._value[i])?void 0:o.duration))}`})(e)})]}):(0,_.jsx)("span",{className:null==d?void 0:d.name,"data-skip-node":"true",style:null==l?void 0:l.name,children:o[e.namekey]}),(0,O.VS)(O.LG)?(0,_.jsxs)("span",{className:N_.wrapperText,children:[a&&(0,_.jsx)("span",{ref:v,className:`${N_.readingLine} reading-line`,"data-skip-node":"true"}),(0,_.jsx)("span",{className:`${null==d?void 0:d.text}`,children:o[e.textkey]})]}):(0,_.jsx)("span",{className:`${null==d?void 0:d.text}`,children:o[e.textkey]})]},`${e.name}-${i}`)}))})),hA=["className","label","labelProps","description","checked","defaultChecked","onChange","required","style"],gA=(0,p.forwardRef)(((e,t)=>{var n;let{className:r,label:o,labelProps:i,description:a,checked:s,defaultChecked:l,onChange:c,required:d,style:u}=e,h=(0,Yn.A)(e,hA);const g=(0,Ze.cn)("toggle"),m=(0,p.useMemo)((()=>{var e;return null!=(e=null!=l?l:s)&&e}),[l,s]),[f,v]=(0,p.useState)(null!=(n=null!=l?l:s)&&n),y={};(0,p.useEffect)((()=>{v(m)}),[m]),f&&(y.checked=f),y.disabled=h.disabled;const b=(0,_.jsxs)(Ze.eB,{name:"toggle",className:r,mod:y,style:u,children:[(0,_.jsx)("input",Object.assign({ref:t},h,{className:g.elem("input"),type:"checkbox",checked:f,onChange:e=>{v(e.target.checked),null==c||c(e)}})),(0,_.jsx)(Ze.Sl,{tag:"span",name:"indicator"})]});return o?(0,_.jsx)(CC,Object.assign({ref:t,placement:"right",required:d,text:o,children:b,description:a},null!=i?i:{})):b})),mA={};(0,O.VS)(O.xS)&&(mA.crossOrigin="anonymous");class pA extends p.Component{constructor(e){super(e),this._regionSpanSelector=".htx-highlight",this.mainContentSelector=`.${(0,Ze.cn)("main-content").toClassName()}`,this.mainViewAnnotationSelector=`.${(0,Ze.cn)("main-view").elem("annotation").toClassName()}`,this._selectRegions=e=>{const{item:t}=this.props,n=this.myRef.current,r=window.getSelection(),o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i=[];for(;o.nextNode();){const e=o.currentNode;if("SPAN"===e.nodeName&&e.matches(this._regionSpanSelector)&&tn(e)){const t=this._determineRegion(e);i.push(t)}}i.length&&(e?t.annotation.extendSelectionWith(i):t.annotation.selectAreas(i),r.removeAllRanges())},this._handleScrollContainerHeight=()=>{requestAnimationFrame((()=>{var e,t;const n=this.myRef.current,r=document.querySelector(this.mainContentSelector),o=r.getBoundingClientRect(),i=document.documentElement.clientHeight-o.top,a=document.querySelector(this.mainViewAnnotationSelector),s=Math.floor(i{e.style.visibility="hidden"}));const o=[],i=window.getSelection();if(i.isCollapsed)return n.forEach((e=>{e.style.visibility="unset"})),[];for(r=0;r(e.isVisibleForAuthorFilter(n)&&a<=r&&d>=r&&t.push(r),t)),[]);if(c.length!==d-a+1){const e=this.phraseElements;let d=a;for(let u=0;uu&&(d=c[u+1])}}}else o.push({startOffset:n,start:String(r),endOffset:s,end:String(l),_range:t,text:this.removeSurroundingNewlines(i.toString())})}else o.push({startOffset:n,start:String(r),endOffset:s,end:String(l),_range:t,text:this.removeSurroundingNewlines(i.toString())})}catch(e){console.error("Can not get selection",e)}}return n.forEach((e=>{e.style.visibility="unset"})),i.removeAllRanges(),o}_determineRegion(e){if((0,je.matchesSelector)(e,this._regionSpanSelector)){const t="SPAN"===e.tagName?e:e.closest(this._regionSpanSelector),{item:n}=this.props;return n.regs.find((e=>e.find(t)))}}_disposeTimeout(){this.scrollTimeout.length>0&&(this.scrollTimeout.forEach((e=>clearTimeout(e))),this.scrollTimeout=[])}onMouseUp(e){const t=this.props.item,n=t.activeStates();if(!n||0===n.length||e.ctrlKey||e.metaKey)return this._selectRegions(e.ctrlKey||e.metaKey);const r=this.captureDocumentSelection();if(0!==r.length)if(t._currentSpan=null,(0,O.VS)(O.Gd)){const e=t.addRegions(r);for(const t of e){const e=t.createSpans();t.addEventsToSpans(e)}}else{const e=t.addRegion(r[0]);if(e){const t=e.createSpans();e.addEventsToSpans(t)}}}_getResultText(e,t,n,r){const o=this.phraseElements;return e===t?o[e].innerText.slice(n,r):[o[e].innerText.slice(n),o.slice(e+1,t).map((e=>e.innerText)),o[t].innerText.slice(0,r)].flat().join("")}_handleUpdate(){const e=this.myRef.current,{item:t}=this.props;if(t._value&&(t.regs.forEach(((n,r)=>{var o;if(null==(o=n._spans)||null==(o=o[0])||!o.isConnected)try{const o=e.children,i=document.createRange(),a=o[n.start].getElementsByClassName(t.layoutClasses.text)[0],s=o[n.end].getElementsByClassName(t.layoutClasses.text)[0];let{startOffset:l,endOffset:c}=n;if(i.setStart(...(0,je.findNodeAt)(a,l)),i.setEnd(...(0,je.findNodeAt)(s,c)),n.text&&i.toString().replace(/\s+/g,"")!==n.text.replace(/\s+/g,"")){if(console.info("Restore broken position",r,i.toString(),"->",n.text,n),t.regs.slice(0,r).some((e=>n.start===e.end))&&n.start===n.end){const e=a.textContent.match(new RegExp(n.text.replace(/\s+/g,"\\s+")));e||console.warn("Can't find the text",n);const{index:t=0}=e||{};n.endOffset-n.startOffset!==n.text.length&&console.warn("Text length differs from region length; possible regions overlap"),l=t,c=l+n.text.length,i.setStart(...(0,je.findNodeAt)(a,l)),i.setEnd(...(0,je.findNodeAt)(s,c)),n.fixOffsets(l,c)}}else!n.text&&i.toString()&&n.setText(this._getResultText(+n.start,+n.end,l,c));(0,je.splitBoundaries)(i),n._range=i;const d=n.createSpans();n.addEventsToSpans(d)}catch(e){console.log(e,n)}})),Array.from(this.myRef.current.getElementsByTagName("a")).forEach((e=>{e.addEventListener("click",(e=>(e.preventDefault(),!1)))})),(0,O.VS)(O.LG)&&this.props.item.contextscroll&&t.playingId>=0&&this.lastPlayingId!==t.playingId&&this.state.canScroll)){var n,r,o,i,a;const s=Number.parseInt(null==(n=window.getComputedStyle(this.myRef.current))?void 0:n.getPropertyValue("padding-top"))||0,l=this.props.item._value[t.playingId],c=l.start,d=l.end,u=(null==(r=this.activeRef.current)?void 0:r.offsetHeight)||0,h=this.props.item._value[t.playingId].duration||d-c,g=e.offsetHeight,m=(null==(o=this.activeRef.current)?void 0:o.offsetTop)-s,p=Math.ceil((null==(i=this.activeRef.current)?void 0:i.offsetHeight)/(null==(a=this.myRef.current)?void 0:a.offsetHeight))+1;if(this._disposeTimeout(),u>g)for(let t=0;t{const n=m+u*(t*(1/p));this.state.inViewPort&&this.state.canScroll&&e.scrollTo({top:n,behavior:"smooth"})}),h/p*t*1e3));else this.state.inViewPort&&e.scrollTo({top:m,behavior:"smooth"});this.lastPlayingId=t.playingId}}_handleScrollToPhrase(){var e,t;const n=Number.parseInt(null==(e=window.getComputedStyle(this.myRef.current))?void 0:e.getPropertyValue("padding-top"))||0,r=(null==(t=this.activeRef.current)?void 0:t.offsetTop)-n;this.myRef.current.scrollTo({top:r,behavior:"smooth"})}componentDidUpdate(){this._handleUpdate()}componentDidMount(){(0,O.VS)(O.LG)&&this.props.item.contextscroll&&this._resizeObserver.observe(document.querySelector(this.mainContentSelector)),this._handleUpdate()}componentWillUnmount(){var e,t;const n=document.querySelector(this.mainContentSelector);n&&(null==(e=this._resizeObserver)||e.unobserve(n)),null==(t=this._resizeObserver)||t.disconnect()}setIsInViewPort(e){this.setState({inViewPort:e})}renderWrapperHeader(){const{item:e}=this.props;return(0,_.jsxs)("div",{className:N_.wrapper_header,children:[(0,O.VS)(O.fw)&&(0,_.jsx)(cA,{item:e,onChange:()=>{if(!this.activeRef.current)return;const e=1e3*Number.parseFloat(window.getComputedStyle(this.activeRef.current).transitionDuration);setTimeout((()=>{this._handleScrollToPhrase()}),e)}}),e.contextscroll&&(0,_.jsxs)("div",{className:N_.wrapper_header__buttons,children:[(0,_.jsx)(gA,{"data-testid":"auto-scroll-toggle",checked:this.state.canScroll,onChange:()=>{this.state.canScroll||this._handleScrollToPhrase(),this.setState({canScroll:!this.state.canScroll})},label:"Auto-scroll"}),(0,_.jsx)(ir,{placement:"topLeft",title:"Automatically sync transcript scrolling with audio playback",children:(0,_.jsx)(ru,{})})]})]})}render(){const{item:e}=this.props,t=!!e.audio,n=(0,O.VS)(O.LG)&&this.props.item.contextscroll;return!e.playing&&(0,O.VS)(O.LG)&&this._disposeTimeout(),(0,O.VS)(O.fw)&&!e._value?null:(0,_.jsxs)(_n,{item:e,className:(0,Ze.cn)("paragraphs").toClassName(),children:[t&&(0,_.jsx)("audio",Object.assign({},mA,{controls:e.showplayer&&!e.syncedAudio,className:N_.audio,src:e.audio,ref:e.audioRef,onLoadedMetadata:e.handleAudioLoaded,onEnded:e.reset,onError:e.handleError,onCanPlay:e.handleCanPlay})),(0,O.VS)(O.LG)?this.renderWrapperHeader():(0,O.VS)(O.fw)&&(0,_.jsx)(cA,{item:e}),(0,_.jsx)("div",{ref:this.myRef,"data-testid":"phrases-wrapper","data-update":e._update,className:n?N_.scroll_container:N_.container,onMouseUp:this.onMouseUp.bind(this),children:(0,_.jsx)(uA,Object.assign({setIsInViewport:this.setIsInViewPort.bind(this),item:e,playingId:e.playingId},(0,O.VS)(O.LG)?{activeRef:this.activeRef}:{}))})]})}}const fA=(0,y.WQ)("store")((0,y.PA)(pA));x.addTag("paragraphs",W_,fA),x.addObjectType(W_);class vA{constructor(e,t,n,r,o){this.node=void 0,this.start=void 0,this.end=void 0,this.content=void 0,this.path=void 0,this.node=e,this.start=t,this.end=n,this.content=r,this.path=o}getContent(e,t){return this.content.slice(Math.max(e-this.start,0),Math.min(t-this.start,this.end))}get text(){return this.content.join("")}getText(e,t){return this.getContent(e,t).join("")}createSubtext(e,t){e=Math.max(this.start,e),t=Math.min(this.end,t);const{node:n}=this,r=n.cloneNode(),o=this.getContent(e,t);return r.textContent&&(r.textContent=[...r.textContent].slice(e-this.start,t-this.start).join("")),new vA(r,e,t,o)}wrapWithSpan(){const{node:e,start:t,end:n}=this,r=e.ownerDocument,o=e.parentNode,i=r.createTextNode(""),a=r.createElement("span");null==o||o.replaceChild(i,e),a.appendChild(e),null==o||o.replaceChild(a,i);const s=new bA(a,t,n);return s.children.push(this),s}createSpanElements(e,t){const{node:n}=this,r=n.ownerDocument,o=n.parentNode,i=r.createDocumentFragment(),a=r.createTextNode(""),s=[];e>this.start&&s.push(this.createSubtext(this.start,e));const l=this.createSubtext(e,t).wrapWithSpan();return s.push(l),t{i.appendChild(e.node)})),o.replaceChild(a,n),o.replaceChild(i,a),s}removeNode(){const{node:e}=this;e.parentNode.removeChild(e)}mergeWith(e){this.node.data+=e.map((e=>e.node.data)).join(""),this.end=e[e.length-1].end,this.content.push(...e.flatMap((e=>e.content)))}}class yA{constructor(e,t=e){this.start=void 0,this.end=void 0,this.children=[],this.start=e,this.end=t}findTextElement(e,t="start"){const n=this.children.find((n=>n.start<=e&&n.end>=e&&n[t]!==e));return n instanceof bA?n.findTextElement(e,t):n instanceof vA?n:void 0}findElementByNode(e){for(const t of this.children){if(t.node===e)return t;if(t instanceof bA){const n=t.findElementByNode(e);if(n)return n}}}getText(e,t){const n=[];return this.children.forEach((r=>{r.end>e&&r.start{s.appendChild(e.node)})),i.replaceChild(s,a);const l=new bA(s,t.start,n.end);return l.children.push(...e),l}createSpans(e,t){const n=[],r=[];let o=[];for(const i of this.children){const a=i instanceof vA;if(i.start>=e&&i.end<=t)o.push(i);else{if(o.length){const e=this.wrapElementsWithSpan(o);r.push(e),n.push(e.node),o=[]}if(e>=i.start&&ei.start&&t<=i.end)if(a){const o=i.createSpanElements(e,t);r.push(...o),n.push(...o.filter((e=>e instanceof bA)).map((e=>e.node)))}else r.push(i),n.push(...i.createSpans(e,t));else r.push(i)}}if(o.length){const e=this.wrapElementsWithSpan(o);r.push(e),n.push(e.node)}return this.children=r,n}removeSpans(e){for(let t=this.children.length-1;t>=0;t--){const n=this.children[t];n instanceof bA&&(e.includes(n.node)?(n.removeNode(),this.children.splice(t,1,...n.children)):n.removeSpans(e))}let t=[];const n=[],r=()=>{if(t.length>0){const e=t[0];if(t.length>1){const n=t.slice(1);e.mergeWith(n),n.forEach((e=>e.removeNode()))}n.push(e),t=[]}};for(const e of this.children)e instanceof vA&&(0===t.length||t[t.length-1].node.nextSibling===e.node)?t.push(e):(r(),n.push(e));r(),this.children=n}}class bA extends yA{constructor(e,t,n){super(t,n),this.node=void 0,this.node=e}removeNode(){const{node:e}=this,t=e.ownerDocument,n=e.parentNode,r=t.createDocumentFragment();for(;e.firstChild;)r.appendChild(e.firstChild);n.replaceChild(r,e)}}class xA extends yA{constructor(e,t){super(e),this.path=void 0,this.content=[],this.path=t}addTextNode(e,t,n,r,o){this.content=r,this.children.push(new vA(e,t,n,r,o)),this.end=n}getRelativeOffsetByGlobal(e){return this.content.slice(0,e-this.start).map((e=>""===e?" ":e)).join("").length}getGlobalOffsetByRelative(e){let t=e;const n=0===e?0:1+this.content.findIndex((e=>(""===e?t--:t-=e.length,t<=0)));return this.start+n}}class wA{constructor(e,t,n){this.node=void 0,this.start=void 0,this.path=void 0,this.node=e,this.start=t,this.path=n}getText(){return""}}class CA{constructor(){this.elements=[],this.endPos=void 0,this.displayedText="",this.displayedTextPos=0,this.endPos=0}createDynamicBlock(e){const{endPos:t}=this,n=new xA(t,e);return this.elements.push(n),n}setDisplayedText(e){this.displayedText=e}addStaticElement(e,t){this.elements.push(new wA(e,this.endPos,t.toString()))}addExtraText(e){let t=this.elements.length-1;for(;!(this.elements[t]instanceof xA)&&t>-1;)--t;this.elements.splice(t+1,0,function(e){return e.replace(/[\n\r]/g,"\\n")}(e))}findProjectionOnDisplayedText(e){const{displayedText:t}=this;let n=this.displayedTextPos;const r=[];for(;"\n"===t[n]||"\r"===t[n];)n++;let o=n;for(const n of e){const e=t.substring(o,o+n.length);e===n||" "===e&&"\n"===n?(r.push(e),o+=n.length):r.push("")}return{fromIdx:n,toIdx:o,content:r.flatMap((e=>e?[...e]:e))}}addTextElement(e,t){const{displayedText:n}=this,r=e.textContent;let o=n.indexOf(r,this.displayedTextPos),i=[...r];const a=i.length;let s=r.length;if(-1===o||o-this.displayedTextPos>1){const{fromIdx:e,toIdx:t,content:n}=this.findProjectionOnDisplayedText(r);o=e,s=t-e,i=n}o!==this.displayedTextPos&&(this.addExtraText(this.displayedText.substring(this.displayedTextPos,o)),this.displayedTextPos=o);this.createDynamicBlock(t.toString()).addTextNode(e,this.endPos,this.endPos+a,i,t.toString()),this.endPos+=a,this.displayedTextPos+=s}addBR(){this.endPos+=1}findTextElement(e,t="start"){var n;return null==(n=this.findTextBlock(e,t))?void 0:n.findTextElement(e,t)}findElementByPath(e){for(const t of this.elements)if("string"!=typeof t&&t.path===e)return t}getNextElement(e){let t=this.elements.indexOf(e);for(;!(this.elements[t+1]instanceof wA||this.elements[t+1]instanceof xA);)if(t++,t>=this.elements.length-1)return;return this.elements[t+1]}getEndOf(e){if(e instanceof bA||e instanceof vA)return e.end;const t=this.getNextElement(e);return t?t.start:this.endPos}findElementByNode(e){for(const t of this.elements)if(t instanceof wA){if(t.node===e)return t}else if(t instanceof xA){const n=t.findElementByNode(e);if(n)return n}}findTextBlock(e,t="start"){const n=this.elements.find((n=>n instanceof xA&&n.start<=e&&n.end>=e&&n[t]!==e));return(0,w.isDefined)(n),n}indexOfTextBlock(e,t="start"){return this.elements.findIndex((n=>n instanceof xA&&n.start<=e&&n.end>=e&&n[t]!==e))}getText(e,t){const n=this.indexOfTextBlock(e,"end"),r=this.indexOfTextBlock(t,"start");return this.elements.slice(n,r+1).map((n=>"string"!=typeof n?n.getText(e,t):n)).join("")}collectBlocks(e,t){const n=this.indexOfTextBlock(e,"end"),r=Math.max(this.indexOfTextBlock(t,"start"),n);return this.elements.slice(n,r+1).filter((e=>e instanceof xA))}createSpans(e,t){tn.createSpans(e,t))))}removeSpans(e,t,n){const r=this.collectBlocks(t,n);for(const t of r)t.removeSpans(e)}destroy(){this.elements=[]}}class SA{constructor(){this.segments=[],this.counters=[]}get currentSegment(){return this.segments[this.segments.length-1]}get currentCounters(){return this.counters[this.counters.length-1]}getSegmentName(e){return e.nodeType===Node.TEXT_NODE?"text()":e.nodeName.toLowerCase()}into(e){const t=this.getSegmentName(e);this.segments.push([t,1]),this.counters.push({[t]:1})}next(e){const t=this.getSegmentName(e);this.currentCounters[t]||(this.currentCounters[t]=0),this.currentSegment[0]=t,this.currentSegment[1]=++this.currentCounters[t]}outOf(){this.segments.pop(),this.counters.pop()}toString(){return`/${this.segments.map((e=>`${e[0]}[${e[1]}]`)).join("/")}`}}class jA{constructor(e){if(this.container=void 0,this.root=void 0,this.doc=void 0,this.view=void 0,this.domData=void 0,this.fragment=void 0,this.styleTags=void 0,this.walker=null,this.currentPath=new SA,this.container=e,e instanceof HTMLIFrameElement){const e=this.container.contentDocument;this.root=e.body}else this.root=e;this.doc=this.root.ownerDocument,this.view=this.doc.defaultView,this.domData=new CA,this.fragment=document.createDocumentFragment(),this.styleTags={},this.initDataMap()}nextStep(e=!1){const t=this.walker,n=this.currentPath;let r;return!e&&(r=t.firstChild(),r)?(n.into(r),r):(r=t.nextSibling(),r?(n.next(r),r):(r=t.parentNode(),n.outOf(),r?this.nextStep(!0):r))}initDataMap(){const{doc:e,root:t,domData:n}=this,r=this.walker=e.createTreeWalker(t,NodeFilter.SHOW_ALL);let o;for(this.currentPath=new SA,o=r.currentNode,n.setDisplayedText(this.collectText());o;){const e=o.nodeType===Node.TEXT_NODE,t="BR"===o.nodeName;e?n.addTextElement(o,this.currentPath):t?n.addBR():n.addStaticElement(o,this.currentPath),o=this.nextStep()}this.walker=null}collectText(){const{root:e,view:t}=this,n=t.getSelection(),r=new Range,o=[];for(let e=0;e({get _hasSpans(){return!!e._spans&&e._spans.every((e=>e.isConnected))},get identifier(){return`${e.id.split("#")[0]}-${e.ouid}`},get className(){return`${kA}-${e.identifier}`},get classNames(){var t;const n=[kA,e.className];return(null!=(t=e.parent.showlabels)?t:e.store.settings.showLabels)||n.push(OA),(0,w.isDefined)(e.parent.showlabels)&&n.push("htx-manual-label"),n},get styles(){const{className:t}=e,n=e.getLabelColor(),r=rn.Colors.rgbaChangeAlpha(n,.8);return`\n .${t} {\n background-color: ${n} !important;\n border: 1px dashed transparent;\n }\n .${t}.${EA.active}:not(.${EA.hidden}) {\n color: ${rn.Colors.contrastColor(r)} !important;\n background-color: ${r} !important;\n }\n `}}))).actions((e=>({applyHighlight(t=!1){var n,r;if((0,O.VS)(O.Er)){var o;if(e._hasSpans)return;return e._spans=e.parent.createSpansByGlobalOffsets(e.globalOffsets),null==(o=e._spans)||o.forEach((t=>t.className=e.classNames.join(" "))),e.updateSpans(),void(t||e.parent.setStyles({[e.identifier]:e.styles}))}if(!1===e.parent.isLoaded)return;const i=Boolean(null==(n=e._spans)||null==(n=n[0])||null==(n=n.ownerDocument)?void 0:n.defaultView);if(e._hasSpans&&i)return;const a=e.getRangeToHighlight(),s=e._getRootNode();if(!a)return void console.warn("No range found to highlight");if(!s)return;const l=e.getLabelColor(),c=E(5),d=_A(s.ownerDocument,c,l),u=["htx-highlight",d.className];return(null!=(r=e.parent.showlabels)?r:e.store.settings.showLabels)||u.push(OA),(0,w.isDefined)(e.parent.showlabels)&&u.push("htx-manual-label"),e._stylesheet=d,e._spans=rn.Selection.highlightRange(a,{classNames:u,index:e.region_index,label:e.getLabels()}),e._spans},updateHighlightedText(){if(!e.text){if((0,O.VS)(O.Er))return void(e.text=e.parent.getTextFromGlobalOffsets(e.globalOffsets));const t=e.getRangeToHighlight(),n=e._getRootNode();if(!t||!n)return;const r=n.ownerDocument.defaultView.getSelection();r.removeAllRanges(),r.addRange(t),e.text=String(r),r.removeAllRanges()}},updateSpans(){var t;if(e._hasSpans||(0,O.VS)(O.Er)&&null!=(t=e._spans)&&t.length){const t=e._spans[e._spans.length-1];rn.Selection.applySpanStyles(t,{index:e.region_index,label:e.getLabels()})}},clearSpans(){e._spans=null},removeHighlight(){if((0,O.VS)(O.Er)){var t,n;if(e.globalOffsets)null==(n=e.parent)||n.removeSpansInGlobalOffsets(e._spans,e.globalOffsets);null==(t=e.parent)||t.removeStyles([e.identifier])}else rn.Selection.removeRange(e._spans)},updateAppearenceFromState(){var t;if(null==(t=e._spans)||!t.length)return;const n=e._spans[e._spans.length-1];(0,O.VS)(O.Er)?null==e.parent.setStyles||e.parent.setStyles({[e.identifier]:e.styles}):e._stylesheet.setColor(e.getLabelColor()),rn.Selection.applySpanStyles(n,{index:e.region_index,label:e.getLabels()})},selectRegion(){var t;e.annotation.setHighlightedNode(e),e.addClass(EA.active);const n=null==(t=e._spans)?void 0:t[0];n&&(n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded():n.scrollIntoView({block:"center",behavior:"smooth"}))},afterUnselectRegion(){var t;e.removeClass((0,O.VS)(O.Er)?EA.active:null==(t=e._stylesheet)?void 0:t.state.active)},beforeDestroy(){var t;if((0,O.VS)(O.Er))null==(t=e.parent)||t.removeStyles([e.identifier]);else try{e._stylesheet.remove()}catch(e){}},setCursor(t){var n;null==(n=e._stylesheet)||n.setCursor(t)},setHighlight(t){var n,r;(e._stylesheet||(0,O.VS)(O.Er)&&e._spans)&&(e._highlighted=t,e.highlighted?(0,O.VS)(O.Er)?e.addClass(EA.highlighted):(e.addClass(e._stylesheet.state.highlighted),null==(n=e._stylesheet)||n.setCursor(V.A.LINKING_MODE_CURSOR)):(0,O.VS)(O.Er)?e.removeClass(EA.highlighted):(e.removeClass(e._stylesheet.state.highlighted),null==(r=e._stylesheet)||r.setCursor(V.A.POINTER_CURSOR)))},getLabels(){var t,n;return[e.region_index,(null!=(t=null==(n=e.labeling)?void 0:n.selectedLabels)?t:[]).map((e=>e.value)).join(",")].filter(Boolean).join(":")},getLabelColor(){const t=e.parent.highlightcolor||(e.style||e.tag||V.l).fillcolor;return rn.Colors.convertToRGBA(null!=t?t:"#DA935D",.3)},find:t=>e._spans&&e._spans.indexOf(t)>=0?e:void 0,addClass(t){if(!t||!e._spans)return;const n=[].concat(t);e._spans.forEach((e=>e.classList.add(...n)))},removeClass(t){if(!t||!e._spans)return;const n=[].concat(t);e._spans.forEach((e=>e.classList.remove(...n)))},toggleHidden(t){e.hidden=!e.hidden,e.hidden?e.addClass("__hidden"):e.removeClass("__hidden"),null==t||t.stopPropagation()}}))),EA={active:"__active",highlighted:"__highlighted",collapsed:"__collapsed",hidden:"__hidden",noLabel:OA},_A=(e,t,n)=>{var r;const o=`.htx-highlight-${t}`,i={color:`--background-color-${t}`,cursor:`--cursor-style-${t}`},a=`${o}.${EA.active}:not(.${EA.hidden})`,s=`${o}.${EA.highlighted}`,l=e=>rn.Colors.rgbaChangeAlpha(e,.8),c=l(n);e.documentElement.style.setProperty(i.color,n);const d={[o]:`\n background-color: var(${i.color}) !important;\n cursor: var(${i.cursor}, pointer);\n border: 1px dashed transparent;\n `,[`${o}[data-label]::after`]:"\n padding: 2px 2px;\n font-size: 9.5px;\n font-weight: bold;\n font-family: var(--font-mono);\n vertical-align: super;\n content: attr(data-label);\n line-height: 0;\n ",[a]:`\n color: ${rn.Colors.contrastColor(c)} !important;\n ${i.color}: ${c}\n `,[s]:"\n position: relative;\n border-color: rgb(0, 174, 255);\n ",[`${o}.${EA.hidden}`]:`\n border: none;\n padding: 0;\n pointer-events: none;\n ${i.color}: transparent;\n `,[`${o}.${EA.hidden}::before`]:"\n display: none\n ",[`${o}.${EA.hidden}::after`]:"\n display: none\n ",[`${o}.${EA.noLabel}::after`]:"\n display: none\n "},u=e.createElement("style");u.type="text/css",u.id=`highlight-${t}`,e.head.appendChild(u);const h=null!=(r=u.sheet)?r:u.styleSheet,g=!!h.insertRule;let m=0;for(const e in d)Object.prototype.hasOwnProperty.call(d,e)&&(g?h.insertRule(`${e} { ${d[e]} } `,m++):h.addRule(e,d));return{className:o.substr(1),state:EA,setColor:e=>{var t;const n=l(e),r=[...(null!=(t=u.sheet)?t:u.styleSheet).rules].find((e=>e.selectorText.includes("__active"))),{style:o}=r;u.ownerDocument.documentElement.style.setProperty(i.color,e),o.setProperty(i.color,n),o.color=rn.Colors.contrastColor(n)},setCursor:e=>{u.ownerDocument.documentElement.style.setProperty(i.cursor,e)},remove:()=>{u.remove()}}},AA=()=>"Do not put text directly in task data if you use valueType=url.",TA=e=>`URL (${(0,w.escapeHtml)(e)}) is not valid.`,PA=()=>'In SECURE MODE valueType is set to "url" by default.',IA=h.gK.model("RichTextModel",{value:h.gK.maybeNull(h.gK.string),valuetype:h.gK.optional(h.gK.enumeration(["text","url"]),(()=>window.LS_SECURE_MODE?"url":"text")),inline:!1,savetextresult:h.gK.optional(h.gK.enumeration(["none","no","yes"]),(()=>window.LS_SECURE_MODE?"no":"none")),selectionenabled:h.gK.optional(h.gK.boolean,!0),clickablelinks:!1,highlightcolor:h.gK.maybeNull(Re.color),showlabels:h.gK.maybeNull(h.gK.boolean),encoding:h.gK.optional(h.gK.enumeration(["none","base64","base64unicode"]),"none"),granularity:h.gK.optional(h.gK.enumeration(["symbol","word","sentence","paragraph"]),"symbol")}),LA=h.gK.model("RichTextModel",{type:"richtext",_value:h.gK.optional(h.gK.maybeNull(h.gK.string),null)}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t?t.filter((e=>e.isLabeling&&e.isSelected)):null},get isLoaded(){var t;return e._isLoaded&&e._loadedForAnnotation===(null==(t=e.annotation)?void 0:t.id)},get isReady(){return e.isLoaded&&e._isReady},get styles(){return`\n .htx-highlight {\n cursor: pointer;\n border: 1px dashed transparent;\n }\n .htx-highlight[data-index]::after,\n .htx-highlight[data-label]::after {\n padding: 2px 2px;\n font-size: 9.5px;\n font-weight: bold;\n font-family: var(--font-mono);\n vertical-align: super;\n content: attr(data-label);\n line-height: 0;\n }\n .htx-highlight[data-index]:not([data-label])::after {\n content: attr(data-index);\n }\n .htx-highlight.${EA.highlighted} {\n position: relative;\n cursor: ${V.A.LINKING_MODE_CURSOR};\n border-color: rgb(0, 174, 255);\n }\n .htx-highlight.${EA.hidden} {\n border: none;\n padding: 0;\n background: transparent !important;\n cursor: inherit;\n // pointer-events: none;\n }\n .htx-highlight.${EA.hidden}::before,\n .htx-highlight.${EA.hidden}::after,\n .htx-highlight.${EA.noLabel}::after {\n display: none;\n }\n `}}))).volatile((()=>({visibleNodeRef:(0,p.createRef)(),workingNodeRef:(0,p.createRef)(),originalContentRef:(0,p.createRef)(),useWorkingNode:!1,_isReady:!1,regsObserverDisposer:null,_isLoaded:!1,_loadedForAnnotation:null}))).actions((e=>{let t,n,r;return{setWorkingMode(t){e.useWorkingNode=t},setLoaded(t=!0){var n;t&&e.onLoaded(),e._isLoaded=t,e._loadedForAnnotation=null==(n=e.annotation)?void 0:n.id},onLoaded(){e.visibleNodeRef.current&&(0,O.VS)(O.Er)&&(r=new jA(e.visibleNodeRef.current))},onDispose(){e.regs.forEach((e=>{e.clearSpans()}))},updateValue:(0,h.L3)((function*(t){const n=j(e.value,t.task.dataObj),r=yield e.resolveValue(n);if("url"===e.valuetype){const t=r;if(!(0,w.isValidObjectURL)(t,!0)){const n=[TA(t),AA()];return window.LS_SECURE_MODE&&n.unshift(PA()),e.annotationStore.addErrors([Kj.generalError(n.join("
\n"))]),void e.setRemoteValue("")}try{const n=yield fetch(t),{ok:r,status:o,statusText:i}=n;if(!r)throw new Error(`${o} ${i}`);e.setRemoteValue(yield n.text())}catch(n){const r=Ge.A.ERR_LOADING_HTTP({attr:e.value,error:String(n),url:t});e.annotationStore.addErrors([Kj.generalError(r)]),e.setRemoteValue("")}}else e.setRemoteValue(r)})),setRemoteValue(t){e.loaded=!0,"base64"===e.encoding&&(t=atob(t)),"base64unicode"===e.encoding&&(t=rn.Checkers.atobUnicode(t)),(0,O.VS)(O.pN)&&"text"===e.type?e._value=String(t):e._value=(0,je.sanitizeHtml)(String(t)),e._regionsCache.forEach((({region:t,annotation:n})=>{t.setText(e._value.substring(t.startOffset,t.endOffset)),e.regions.push(t),n.addRegion(t)})),e._regionsCache=[]},afterCreate(){e._regionsCache=[],"text"===e.type&&(e.inline=!0),"none"===e.savetextresult&&("url"===e.valuetype?e.savetextresult="no":"text"===e.valuetype&&(e.savetextresult="yes"))},beforeDestroy(){var o,i;(null==e.regsObserverDisposer||e.regsObserverDisposer(),(0,O.VS)(O.Er))&&(null==(o=r)||o.removeStyles(e.name),null==(i=r)||i.destroy(),t=null,n=null,r=null)},setNeedsUpdateCallbacks(e,r){t=e,n=r},needsUpdate(){if(!1!==e.isLoaded){if(e.setReady(!1),(0,O.VS)(O.Er)){const t={[e.name]:e.styles};e.regs.forEach((e=>{try{e.initRangeAndOffsets(),e.applyHighlight(!0),e.updateHighlightedText(),t[e.identifier]=e.styles}catch(e){console.error(e)}})),e.setStyles(t)}else null==t||t(),e.regs.forEach((e=>{try{e.initRangeAndOffsets(),e.applyHighlight()}catch(e){console.error(e)}})),null==n||n(),e.regs.forEach((e=>{try{e.updateHighlightedText()}catch(e){console.error(e)}}));e.setReady(!0)}},setStyles(e){r.setStyles(e)},removeStyles(e){var t;null==(t=r)||t.removeStyles(e)},globalOffsetsToRelativeOffsets:({start:e,end:t})=>r.globalOffsetsToRelativeOffsets(e,t),relativeOffsetsToGlobalOffsets:(e,t,n,o)=>r.relativeOffsetsToGlobalOffsets(e,t,n,o),rangeToGlobalOffset:e=>r.rangeToGlobalOffset(e),createSpansByGlobalOffsets:({start:e,end:t})=>r.createSpans(e,t),removeSpansInGlobalOffsets(e,{start:t,end:n}){var o;return null==(o=r)?void 0:o.removeSpans(e,t,n)},getTextFromGlobalOffsets:({start:e,end:t})=>r.getText(e,t),setHighlight(t){e.regs.forEach((e=>e.setHighlight(!1))),t&&t.annotation.isLinkingMode&&t.setHighlight(!0)},addRegion(t,n){var r,o,i;const a=e.getAvailableStates();if(0===a.length)return;const[s,...l]=a,c=null!=(r=null==n?void 0:n.value)?r:s.selectedValues(),d={[s.valueType]:c},u=l.map((e=>yO(e))),g=e.annotation.createResult(t,d,s,e),m=e.visibleNodeRef.current,p=null!=(o=null==m||null==(i=m.contentDocument)?void 0:i.body)?o:m;u.forEach((e=>{g.setValue(e),(0,h.zr)(e)})),g._range=t._range;const[f,v]=Qt(t._range,p);if(g.updateGlobalOffsets(f,v),t.isText)g.updateTextOffsets(f,v);else if((0,O.VS)(O.Er))g.updateXPathsFromGlobalOffsets();else{const e=g._getRootNode(!0),t=Gt(f,v,e);t&&g._fixXPaths(t,e)}return g.applyHighlight(),g.notifyDrawingFinished(),g}}})),MA=h.gK.compose("RichTextModel",ze,bn,it,Pe,Le,IA,LA);var KA=n(71161);class DA extends p.Component{constructor(...e){super(...e),this._regionSpanSelector=".htx-highlight",this._regionVisibleSpanSelector=".htx-highlight:not(.__hidden)",this.loadingRef=p.createRef(),this.doubleClickSelection=void 0,this._selectRegions=e=>{const{item:t}=this.props,n=t.visibleNodeRef.current,r=window.getSelection(),o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i=[];for(;o.nextNode();){const e=o.currentNode;if("SPAN"===e.nodeName&&e.matches((0,O.VS)(O.Er)?this._regionVisibleSpanSelector:this._regionSpanSelector)&&r.containsNode(e)){const t=this._determineRegion(e);i.push(t)}}i.length&&(t.annotation.extendSelectionWith(i),e?t.annotation.extendSelectionWith(i):t.annotation.selectAreas(i),r.removeAllRanges())},this._onMouseUp=e=>{var t,n,r,o,i,a;const{item:s}=this.props,l=s.activeStates(),c=s.visibleNodeRef.current,d=null!=(t=null==c||null==(n=c.contentDocument)?void 0:n.body)?t:c;if(!l||0===l.length||e.ctrlKey||e.metaKey)return this._selectRegions(e.ctrlKey||e.metaKey);if(!1===s.selectionenabled||s.annotation.isReadOnly())return;const u=null==(r=l[0])||null==(r=r.selectedLabels)?void 0:r[0],h=null==(o=l[0])||null==o.selectedValues?void 0:o.selectedValues();rn.Selection.captureSelection((({selectionText:t,range:n})=>{if(!n||n.collapsed||!d.contains(n.startContainer)||!d.contains(n.endContainer))return;qt(n);const r=KA.fromRange(n,d);r&&(this.doubleClickSelection&&(Date.now()-this.doubleClickSelection.time>450||Math.abs(e.pageX-this.doubleClickSelection.x)>5||Math.abs(e.pageY-this.doubleClickSelection.y)>5)&&(this.doubleClickSelection=void 0),r._range=n,r.text=t,r.isText="text"===s.type,s.addRegion(r,this.doubleClickSelection))}),{window:null!=(i=null==c?void 0:c.contentWindow)?i:window,granularity:null!=(a=null==u?void 0:u.granularity)?a:s.granularity,beforeCleanup:()=>{this.doubleClickSelection=void 0,this._selectionMode=!0}}),this.doubleClickSelection={time:Date.now(),value:null!=h&&h.length?h:void 0,x:e.pageX,y:e.pageY}},this._onRegionClick=e=>{if(this._selectionMode)return void(this._selectionMode=!1);if(!this.props.item.clickablelinks&&(0,je.matchesSelector)(e.target,"a[href]"))return void e.preventDefault();const t=this._determineRegion(e.target);t&&(t&&t.onClickRegion(e),e.stopPropagation())},this._onRegionMouseOver=e=>{const t=this._determineRegion(e.target),{item:n}=this.props;n.setHighlight(t)},this._moveStyles=je.moveStylesBetweenHeadTags,this._moveElementsToWorkingNode=()=>{const{item:e}=this.props,t=e.visibleNodeRef.current,n=e.workingNodeRef.current;if(e.inline)this._moveElements(t,n,!0);else{const e=t.contentDocument.documentElement,r=t.contentDocument.body,o=n.contentDocument.documentElement,i=n.contentDocument.head,a=n.contentDocument.body;o.setAttribute("style",e.getAttribute("style")),this._removeChildrenFrom(i),this._moveElements(r,a,!0)}e.setWorkingMode(!0)},this._returnElementsFromWorkingNode=()=>{const{item:e}=this.props,t=e.visibleNodeRef.current,n=e.workingNodeRef.current;if(e.inline)this._moveElements(n,t);else{const e=t.contentDocument.documentElement,r=t.contentDocument.head,o=t.contentDocument.body,i=n.contentDocument.documentElement,a=n.contentDocument.head,s=n.contentDocument.body;e.setAttribute("style",i.getAttribute("style")),this._moveStyles(a,r),this._moveElements(s,o)}e.setWorkingMode(!1)},this.updateLoadingVisibility=()=>{const{item:e}=this.props,t=this.loadingRef.current;t&&(e&&(0,h._n)(e)&&e.isLoaded&&e.isReady?t.setAttribute("style","display: none"):t.removeAttribute("style"))},this._passHotkeys=e=>{const t="key code keyCode location ctrlKey shiftKey altKey metaKey".split(" "),n={};for(const r of t)n[r]=e[r];const r=new KeyboardEvent(e.type,n);document.dispatchEvent(r)},this.onIFrameLoad=()=>{const{item:e}=this.props,t=e.visibleNodeRef.current,n=null==t?void 0:t.contentDocument,r=null==n?void 0:n.body,o=null==r?void 0:r.parentElement,i={click:[this._onRegionClick,!0],keydown:[this._passHotkeys,!1],keyup:[this._passHotkeys,!1],keypress:[this._passHotkeys,!1],mouseup:[this._onMouseUp,!1],mouseover:[this._onRegionMouseOver,!0]};if(!r)return;for(const e in i)r.addEventListener(e,...i[e]);const a=n.createElement("style");a.textContent="body a[href] { pointer-events: all; }",n.head.appendChild(a),r.scrollHeight&&(t.style.height=`${Math.max(r.scrollHeight,o.offsetHeight)}px`),this.markObjectAsLoaded()}}_removeChildrenFrom(e){for(;e.lastChild;)e.removeChild(e.lastChild)}_moveElements(e,t,n){const r=document.createDocumentFragment();for(let t=0;te.find(n)))}}componentDidMount(){const{item:e}=this.props;(0,O.VS)(O.Er)||e.setNeedsUpdateCallbacks(this._moveElementsToWorkingNode,this._returnElementsFromWorkingNode),e.inline||(this.dispose=(0,u.lB)(e,"_isReady",this.updateLoadingVisibility,!0))}componentWillUnmount(){var e;const{item:t}=this.props;t&&(0,h._n)(t)&&(null==(e=this.dispose)||e.call(this),t.setLoaded(!1),t.setReady(!1),t.onDispose())}markObjectAsLoaded(){const{item:e}=this.props;e&&(0,h._n)(e)&&(e.setLoaded(!0),this.updateLoadingVisibility(),setTimeout((()=>this._handleUpdate(!0))))}render(){const{item:e}=this.props;if(!(0,w.isDefined)(e._value))return null;let t=e._value||"";const n=this.props.store.settings,r="text"===e.type;if(r){const e=(0,Ze.cn)("richtext",{elem:"line"});t=(0,je.htmlEscape)(t).split(/\n|\r/g).map((t=>`${t}`)).join("
")}if(e.inline){const o={onClickCapture:this._onRegionClick,onMouseUp:this._onMouseUp,onMouseOverCapture:this._onRegionMouseOver};return(0,_.jsxs)(Ze.eB,{name:"richtext",tag:_n,item:e,children:[(0,_.jsx)(Ze.Sl,Object.assign({name:"container",ref:t=>{e.visibleNodeRef.current=t,t&&this.markObjectAsLoaded()},"data-linenumbers":r&&n.showLineNumbers?"enabled":"disabled",className:"htx-richtext",dangerouslySetInnerHTML:{__html:t}},o),"root"),(0,O.VS)(O.Er)?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"orig-container",ref:e.originalContentRef,className:"htx-richtext-orig",dangerouslySetInnerHTML:{__html:t}},"orig"),(0,_.jsx)(Ze.Sl,{name:"work-container",ref:e.workingNodeRef,className:"htx-richtext-work"},"work")]})]})}return(0,_.jsxs)(Ze.eB,{name:"richtext",tag:_n,item:e,children:[(0,_.jsx)(Ze.Sl,{name:"loading",ref:this.loadingRef,children:(0,_.jsx)(Fj.A,{})}),(0,_.jsx)(Ze.Sl,{name:"iframe",tag:"iframe",referrerPolicy:"no-referrer",sandbox:"allow-same-origin allow-scripts",ref:t=>{e.setReady(!1),e.visibleNodeRef.current=t},className:"htx-richtext",srcDoc:t,onLoad:this.onIFrameLoad},"root"),(0,O.VS)(O.Er)?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"orig-iframe",tag:"iframe",referrerPolicy:"no-referrer",sandbox:"allow-same-origin allow-scripts",ref:e.originalContentRef,className:"htx-richtext-orig",srcDoc:t},"orig"),(0,_.jsx)(Ze.Sl,{name:"work-iframe",tag:"iframe",referrerPolicy:"no-referrer",sandbox:"allow-same-origin allow-scripts",ref:e.workingNodeRef,className:"htx-richtext-work"},"work")]})]})}}const NA=(0,y.WQ)("store"),VA=NA((0,y.PA)(DA)),zA=({isText:e=!1}={})=>NA((0,y.PA)((t=>(0,_.jsx)(VA,Object.assign({},t,{isText:e})))));x.addTag("text",MA,zA({isText:!0})),x.addTag("hypertext",MA,zA({isText:!1})),x.addObjectType(MA);var BA=n(23350);const HA=h.gK.model({type:"table",value:h.gK.maybeNull(h.gK.string),_value:h.gK.frozen([]),valuetype:h.gK.optional(h.gK.string,"json")}).views((e=>({get dataSource(){const{type:t}=k(e.valuetype);return"json"===t?Object.keys(e._value).sort(((e,t)=>e.toLowerCase().localeCompare(t.toLowerCase()))).map((t=>{let n=e._value[t];return"object"==typeof n&&(n=JSON.stringify(n)),{type:t,value:n}})):e._value},get columns(){return"json"!==e.valuetype&&e._value[0]?Object.keys(e._value[0]).map((e=>({title:e,dataIndex:e}))):[{title:"Name",dataIndex:"type"},{title:"Value",dataIndex:"value"}]}}))).actions((e=>({updateValue:(0,h.L3)((function*(t){const{type:n,options:r}=k(e.valuetype);let o=j(e.value,t.task.dataObj);if(r.url)try{const e=yield fetch(o),{ok:t,status:n,statusText:r}=e;if(!t)throw new Error(`${n} ${r}`);o=yield e.text()}catch(t){const n=(0,h._$)(e).messages.ERR_LOADING_HTTP({attr:e.value,error:String(t),url:o});e.annotationStore.addErrors([Kj.generalError(n)])}if("csv"===n)De().parse(o,{delimiter:r.separator,header:!r.headless,download:!1,complete:({data:t})=>{e._value=t}});else e._value="string"==typeof o?JSON.parse(o):o}))}))),FA=h.gK.compose("TableModel",bn,ze,Pe,HA),WA=(0,y.WQ)("store")((0,y.PA)((({item:e})=>(0,_.jsx)(BA.A,{bordered:!0,dataSource:e.dataSource,columns:e.columns,pagination:{hideOnSinglePage:!0}}))));x.addTag("table",FA,WA),x.addObjectType(FA);var $A=n(46288);const UA=()=>(window.screen&&window.screen.width||1440)*(window.devicePixelRatio||2),ZA=(e,t=1e6)=>{if(e.length<=t)return e;let n=0;const r=(e.length-1)/(t-1);return e.filter(((e,t)=>!(t{const n=(e.style||V.l).fillcolor;return rn.Colors.convertToRGBA(n,t)},YA=e=>!$A.f0J.sourceEvent||(e?$A.f0J.sourceEvent.type===e:["start","brush","end"].includes($A.f0J.sourceEvent.type)),XA=e=>new Date(e).toUTCString(),qA=h.gK.model({}).views((()=>({get persistentValuesKey(){return"labelStudio:storedValues"},get persistentValues(){return{}}}))).actions((e=>({afterCreate(){setTimeout(e.restoreValues)},beforeDestroy(){e.storeValues()},storeValues(){var t;const n=e.persistentValuesKey,r={task:null==(t=(0,h.Zn)(e).task)?void 0:t.id,values:e.persistentValues};localStorage.setItem(n,JSON.stringify(r))},restoreValues(){var t;const n=JSON.parse(localStorage.getItem(e.persistentValuesKey)||"{}");if(!n||n.task!==(null==(t=(0,h.Zn)(e).task)?void 0:t.id))return;const r=n.values||{};for(const t of Object.keys(r))e[t]=r[t]}}))),JA=h.gK.model({legend:"",units:"",displayformat:h.gK.optional(h.gK.string,".1f"),interpolation:h.gK.optional(h.gK.enumeration(Object.values({curvebasis:"curvebasis",curvebasisopen:"curveBasisOpen",curvebundle:"curveBundle",curvecardinal:"curveCardinal",curvecardinalopen:"curveCardinalOpen",curvecatmullrom:"curveCatmullRom",curvecatmullromopen:"curveCatmullRomOpen",curvelinear:"curveLinear",curvemonotonex:"curveMonotoneX",curvemonotoney:"curveMonotoneY",curvenatural:"curveNatural",curveradial:"curveRadial",curvestep:"curveStep",curvestepafter:"curveStepAfter",curvestepbefore:"curveStepBefore"})),"curveStep"),height:h.gK.optional(h.gK.string,"200"),strokewidth:h.gK.optional(h.gK.string,"1"),strokecolor:h.gK.optional(h.gK.string,"#1f77b4"),markersize:h.gK.optional(h.gK.string,"0"),markercolor:h.gK.optional(h.gK.string,"#1f77b4"),markersymbol:h.gK.optional(h.gK.string,"circle"),datarange:h.gK.maybe(h.gK.string),timerange:h.gK.maybe(h.gK.string),showaxis:h.gK.optional(h.gK.boolean,!0),fixedscale:h.gK.maybe(h.gK.boolean),column:h.gK.string}),QA=h.gK.model("ChannelModel",Object.assign({},(0,O.VS)(O.cE)?{id:h.gK.identifier}:{id:h.gK.optional(h.gK.identifier,E)},{type:"channel",children:Te.unionArray(["channel","view"]),parentTypes:Te.tagsTypes(["TimeSeries"])})).views((e=>({get columnName(){let t=e.column;var n;/^\d+$/.test(t)&&(t=(null==(n=e.parent)?void 0:n.headers[t])||t);return t=t.toLowerCase(),t}}))),eT=h.gK.compose("ChannelModel",nE,QA,JA);class tT extends p.Component{constructor(...e){super(...e),this.ref=p.createRef(),this.gCreator=void 0,this.brushCreator=void 0,this.gBrushes=void 0,this.tracker=void 0,this.trackerX=0,this.trackerPoint=void 0,this.trackerTime=void 0,this.trackerValue=void 0,this.extent=[0,0],this.useOptimizedData=!1,this.optimizedSeries=null,this.zoomStep=10,this.line=void 0,this.lineSlice=void 0,this.height=+this.props.item.height,this.state={width:840},this.changeWidth=()=>{const e=this.ref.current.offsetWidth,{margin:t}=this.props.item.parent;if(e){const n=e-t.left-t.right;this.setState({width:n})}},this.getRegion=(e,t)=>{const[n,r]=e.map((e=>+this.stick(e)[0]));return{start:n,end:t?n:r}},this.createBrushMovedHandler=e=>()=>{if(YA("end")||!$A.f0J.selection)return;const{ranges:t}=this.props,{parent:n}=this.props.item,r=t.findIndex((t=>t.id===e));if(r<0)return void console.error(`REGION ${e} was not found`);const o=t[r],i=this.getRegion($A.f0J.selection,o.instant);i.start===o.start&&i.end===o.end?(null==n||n.annotation.unselectAreas(),o.onClickRegion($A.f0J.sourceEvent)):null==n||n.regionChanged(i,r)},this.newRegion=void 0,this.newRegionTimer=void 0,this.newBrushHandler=()=>{var e;const{ranges:t,item:{parent:n}}=this.props,r=null==n?void 0:n.activeStates(),o=r&&r.length,i=null==n||null==(e=n.annotation)?void 0:e.isReadOnly();if(YA("end"))return;if(!$A.f0J.selection){const e=$A.grR($A.f0J.sourceEvent.target)[0],i=this.newRegion;i&&Math.abs(i.x-e)<4?(clearTimeout(this.newRegionTimer),null==n||n.regionChanged(i.range,t.length,i.states),this.newRegion=null,this.newRegionTimer=null):o&&(this.newRegion={range:this.getRegion([e,e]),states:r.map((e=>yO(e))),x:e},this.newRegionTimer=setTimeout((()=>{this.newRegion=null,this.newRegionTimer=null}),300));const a=this.x.invert(e),s=t.filter((e=>e.start<=a&&e.end>=a)),l=s.findIndex((e=>e.selected))+1,c=s[l];return void(c?c.onClickRegion($A.f0J.sourceEvent):null==n||n.annotation.unselectAreas())}const a=this.getRegion($A.f0J.selection);this.brushCreator.move(this.gCreator,null);const s=$A.f0J.sourceEvent.ctrlKey||$A.f0J.sourceEvent.metaKey;if(s||!o||i){const e=t.filter((e=>e.start>=a.start&&e.end<=a.end));s?null==n||n.annotation.extendSelectionWith(e):null==n||n.annotation.selectAreas(e)}else null==n||n.addRegion(a.start,a.end)},this.updateTracker=(e,t=0)=>{const{width:n}=this.state;if(e<0||e>n)return;const[r,o]=this.stick(e);this.trackerX=r,this.tracker.attr("transform",`translate(${this.x(r)+.5},0)`),this.trackerTime.text(`${this.formatTime(r)}${0===t?"":` [${this.formatDuration(t)}]`}`),this.trackerValue.text(`${this.formatValue(o)} ${this.props.item.units}`),this.trackerPoint.attr("cy",this.y(o)),this.tracker.attr("text-anchor",e>n-100?"end":"start")},this.renderTracker=()=>{const e=this.updateTracker;this.tracker=this.main.append("g").style("pointer-events","none"),this.trackerValue=this.tracker.append("text").attr("font-size",10).attr("fill","#666"),this.trackerTime=this.tracker.append("text").attr("y",this.height-1).attr("font-size",10).attr("fill","#666"),this.trackerPoint=this.tracker.append("circle").attr("cx",0).attr("r",3).attr("stroke","red").attr("fill","none"),this.tracker.append("line").attr("y1",this.height).attr("y2",0).attr("stroke","#666"),this.main.on("mousemove",(function(){e($A.grR(this)[0])}))},this.renderXAxis=()=>{const{item:e}=this.props;if(!e.showaxis)return;const{width:t}=this.state,{margin:n}=e.parent,r=this.height+n.top,o=-n.top;let i=this.main.select(".xaxis");i.size()||(i=this.main.append("g").attr("class","xaxis")),i.attr("transform",`translate(0,${o})`).call($A.l78(this.x).ticks(t/80).tickSize(r+4)).call((e=>e.selectAll(".domain").remove())).call((e=>e.selectAll(".tick").attr("stroke-opacity",.2).selectAll(".bottom").data([0]).enter().append("line").attr("class","bottom").attr("stroke","currentColor").attr("y1",r+16).attr("y2",r+n.bottom)))},this.renderYAxis=()=>{const{item:e}=this.props;if(!e.showaxis)return;let t=this.main.select(".yaxis");t.size()||(t=this.main.append("g").attr("class","yaxis")),t.call($A.V4s(this.y).tickFormat(this.formatValue).tickSize(3)).call((e=>e.select(".domain").remove())).call((e=>e.append("text").attr("class","title").attr("font-size",8).attr("x",-6).attr("y",0).attr("fill","currentColor").attr("text-anchor","end").text(this.props.item.units)))}}renderBrushes(e,t=!1){const{width:n}=this.state,r=this.height,{item:o}=this.props,i=[[0,0],[n,r]],a=$A.n55().extent(i),s=this.x;t&&this.gBrushes.selectAll(".brush").remove();const l=this.gBrushes.selectAll(".brush").data(e,(e=>e.id)),c=this.createBrushMovedHandler,d=this.updateTracker,u=this.getRegion;l.enter().append("g").attr("class","brush").attr("id",(e=>`brush_${o.id}_${e.id}`)).each((function(e){const t=$A.Ltv(this),n=$A.n55().extent(i);n.on("brush",(function(){if(YA("brush"))return;const n=u($A.f0J.selection,e.instant);a.move(t,[s(n.start),s(n.end)+.5*e.instant]),d($A.grR(this)[0])})),n.on("end",c(e.id)),n(t),e.instant?t.selectAll(".handle").style("pointer-events","none"):t.selectAll(".selection").style("pointer-events","none"),t.selectAll(".overlay").style("pointer-events","none"),e.isReadOnly()&&t.selectAll(".handle").remove(),void 0!==e._brushRef&&e._brushRef.isConnected||(e._brushRef=t.select(".selection").node())})).merge(l).each((function(e){const t=$A.Ltv(this),n=t.selectAll(".selection");t.style("display",e.hidden?"none":"block");const r=GA(e);if(e.instant){n.attr("stroke-opacity",e.inSelection||e.highlighted?.6:.2).attr("fill-opacity",e.inSelection||e.highlighted?1:.6).attr("stroke-width",3).attr("stroke",r).attr("fill",r);const o=s(e.start);a.move(t,[o,o+1])}else n.attr("stroke-opacity",e.inSelection||e.highlighted?.8:.5).attr("fill-opacity",e.inSelection||e.highlighted?.6:.3).attr("stroke",r).attr("fill",r),a.move(t,[e.start,e.end].map(s))})),l.exit().remove()}renderBrushCreator(){this.gCreator?this.gCreator.selectAll("*").remove():this.gCreator=this.main.append("g").attr("class","new_brush");const e=this.updateTracker,t=this.gCreator,n=this.getRegion,r=this.x,o=this.brushCreator=$A.n55().extent([[0,0],[this.state.width,this.height]]).on("brush",(function(){if(YA("brush")||!$A.f0J.selection)return;const i=n($A.f0J.selection);o.move(t,[r(i.start),r(i.end)]),e($A.grR(this)[0],i.end-i.start)})).on("end",this.newBrushHandler).filter((()=>!$A.f0J.button));this.gCreator.call(this.brushCreator)}initZoom(){var e;const{data:t,item:n,time:r}=this.props,o=t[r],i=null==(e=n.parent)?void 0:e.throttledRangeUpdate();this.main.on("wheel",(()=>{const e=$A.f0J;if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const{range:t}=this.props,n=t.map((e=>$A.Jjl(o,e))),[r]=$A.grR($A.f0J.target),a=this.x.range()[1],s=Math.min(.3,-e.deltaY/this.height);if(n[1]-n[0]<10&&s>0)return;const l=t[1]-t[0],c=[Math.max(+this.extent[0],+t[0]+l*s*r/a),Math.min(+this.extent[1],t[1]-l*s*(1-r/a))];i(c,s)}))}componentDidMount(){var e;if(!this.ref.current)return;const{data:t,item:n,range:r,time:o,column:i}=this.props,{isDate:a,formatTime:s,formatDuration:l,margin:c,slicesCount:d}=n.parent,u=this.height;this.zoomStep=d;const g=`marker_${n.id}`,m=`clip_${n.id}`;let{series:p}=this.props;const f=UA()*this.zoomStep;let v,y;this.useOptimizedData=p.length>f,(0,O.VS)(O.dY)&&(v=p.filter((e=>null!==e[i])),y=v.map((e=>e[o]))),this.useOptimizedData&&(this.optimizedSeries=ZA(p,f),p=this.optimizedSeries),p=p.filter((e=>null!==e[i])),this.optimizedSeries&&(this.optimizedSeries=p);const b=p.map((e=>e[o])),x=p.map((e=>e[i]));if(!x){const e=Object.keys(t).filter((e=>e!==o)),r=`\`${i}\` not found in data. Available columns: ${e.join(", ")}. For headless csv you can use column index`;return void(0,h.Zn)(n).annotationStore.addErrors([Kj.generalError(r)])}this.slices=null==(e=n.parent)?void 0:e.dataSlices;const w=$A.GPZ(n.displayformat);this.formatValue=w,this.formatTime=s,this.formatDuration=l;const C=this.ref.current.offsetWidth,S=C?C-c.left-c.right:this.state.width;this.state.width=S,this.extent=$A.Xxv(b);const j=(a?$A.Pps():$A.m4Y()).domain(this.extent).range([0,S]),k=$A.m4Y().domain($A.Xxv(x)).range([u-c.max,c.min]);this.x=j,this.y=k,this.plotX=j.copy(),this.stick=e=>{const t=j.invert(e),n=(0,O.VS)(O.dY)?y:b;let r=$A.Jjl(n,t,0,n.length-1);return n[r]-t>t-n[r-1]&&r--,[n[r],(0,O.VS)(O.dY)?v[r][i]:x[r]]},this.line=$A.n8j().y((e=>this.y(e[i]))).x((e=>this.plotX(e[o]))),this.lineSlice=$A.n8j().defined((e=>e[o]>=r[0]&&e[o]<=r[1])).y((e=>this.y(e[i]))).x((e=>this.x(e[o])));const R=$A.Ltv(this.ref.current).append("svg").attr("viewBox",[0,0,S+c.left+c.right,u+c.top+c.bottom]).style("display","block").append("g").attr("transform",`translate(${c.left},${c.top})`);((e,t,n,r)=>{switch(t){case"circle":e.append("path").attr("d",$A.HRO().type($A.hKN).size(2*n)).attr("transform",`translate(${n/2}, ${n/2})`).attr("stroke","none").attr("fill",r);break;case"square":e.append("path").attr("d",$A.HRO().type($A.yDW).size(2*n)).attr("transform",`translate(${n/2}, ${n/2})`).attr("stroke","none").attr("fill",r);break;case"triangle":case"triangleUp":e.append("path").attr("d",$A.HRO().type($A.ZKi).size(2*n)).attr("transform",`translate(${n/2}, ${n/2})`).attr("stroke","none").attr("fill",r);break;case"triangleDown":e.append("path").attr("d",$A.HRO().type($A.ZKi).size(2*n)).attr("transform",`translate(${n/2}, ${n/2}) rotate(180 0 0)`).attr("stroke","none").attr("fill",r)}})(R.append("defs").append("marker").attr("id",g).attr("markerWidth",n.markersize).attr("markerHeight",n.markersize).attr("refX",n.markersize/2).attr("refY",n.markersize/2),n.markersymbol,n.markersize,n.markercolor),R.append("clipPath").attr("id",m).append("rect").attr("x",0).attr("y",0).attr("height",u).attr("width",S),R.append("text").text(n.legend).attr("dx","1em").attr("dy","1em").attr("font-weight","bold").attr("font-size","1.4em").attr("dy","1em").attr("opacity",.1),this.main=R;const E=R.append("g").attr("clip-path",`url("#${m}")`);this.path=E.append("path").datum(p).attr("d",this.line),this.path2=E.append("path"),E.selectAll("path").attr("vector-effect","non-scaling-stroke").attr("fill","none").attr("stroke-width",n.strokewidth||1).attr("stroke",n.strokecolor||"steelblue").attr("marker-start",n.markersize>0?`url(#${g})`:"").attr("marker-mid",n.markersize>0?`url(#${g})`:"").attr("marker-end",n.markersize>0?`url(#${g})`:""),this.renderTracker(),this.updateTracker(0),this.renderYAxis(),this.setRangeWithScaling(r),this.renderBrushCreator(),this.initZoom(),this.gBrushes=R.append("g").attr("class","brushes").attr("clip-path",`url("#${m}")`),this.renderBrushes(this.props.ranges),window.addEventListener("resize",this.changeWidth)}componentWillUnmount(){window.removeEventListener("resize",this.changeWidth)}setRangeWithScaling(e){var t;this.x.domain(e);const n=this.x.range(),r=this.plotX.domain().map(this.x),o=(r[1]-r[0])/(n[1]-n[0]),i=Math.max(0,Math.floor(this.zoomStep*(n[0]-r[0])/(r[1]-r[0]))),a=Math.max(0,Math.floor(this.zoomStep*(n[1]-r[0])/(r[1]-r[0]))),s=r[0]-n[0];let l=0,c=1;const d=this.y.range()[0],{item:u}=this.props,h=void 0===u.fixedscale?null==(t=u.parent)?void 0:t.fixedscale:u.fixedscale;if(u.timerange){const e=u.timerange.split(",").map(Number);this.x.domain(e)}if(!h){const{data:t,time:n,column:r}=this.props,o=t[r];let i=$A.Jjl(t[n],e[0]);const a=$A.Jjl(t[n],e[1]);let s=o[i],d=o[i];for(;io[i]&&(s=o[i]),dt-e));c=h/(d-s),l=s/h,this.y.domain([s,d])}const g=o>this.zoomStep===this.useOptimizedData;this.optimizedSeries&&g&&(this.useOptimizedData=!this.useOptimizedData,this.useOptimizedData?(this.path.datum(this.optimizedSeries),this.path.attr("d",this.line)):this.path.attr("transform","")),this.useOptimizedData?(this.path.attr("transform",`translate(${s} ${l}) scale(${o} ${c})`),this.path.attr("transform-origin",`left ${d}`),this.path2.attr("d","")):this.optimizedSeries?(this.path.datum(this.slices[i]),this.path.attr("d",this.lineSlice),i!==a&&this.slices[a]?(this.path2.datum(this.slices[a]),this.path2.attr("d",this.lineSlice)):this.path2.attr("d","")):(this.path.attr("d",this.lineSlice),this.path2.attr("d","")),this.renderXAxis(),this.renderYAxis(),this.updateTracker(this.x(this.trackerX))}componentDidUpdate(e,t){const{range:n}=this.props,{width:r}=this.state;let o=!1;if(r!==t.width){const{item:e,range:t}=this.props,{margin:n}=e.parent,i=this.height,a=$A.Ltv(this.ref.current).selectAll("svg");a.attr("viewBox",[0,0,r+n.left+n.right,i+n.top+n.bottom]),this.x.range([0,r]),this.renderBrushCreator(),a.selectAll("clipPath rect").attr("width",r),this.setRangeWithScaling(t),this.renderBrushCreator(),o=!0}else{const e=this.x.domain();+e[0]==+n[0]&&+e[1]==+n[1]||this.setRangeWithScaling(n)}this.renderBrushes(this.props.ranges,o)}render(){return this.props.ranges.map((e=>{var t;return(0,w.fixMobxObserve)(e.start,e.end,e.selected,e.inSelection,e.highlighted,e.hidden,null==(t=e.style)?void 0:t.fillcolor)})),(0,w.fixMobxObserve)(this.props.range.map(Number)),(0,_.jsx)("div",{className:"htx-timeseries-channel",ref:this.ref})}}const nT=(0,y.PA)(tT),rT=(0,y.PA)((({item:e})=>{var t,n,r,o,i,a;return null!=(t=e.parent)&&t.dataObj?(0,_.jsx)(nT,{time:null==(n=e.parent)?void 0:n.keyColumn,column:e.columnName,item:e,data:null==(r=e.parent)?void 0:r.dataObj,series:null==(o=e.parent)?void 0:o.dataHash,range:null==(i=e.parent)?void 0:i.brushRange,ranges:null==(a=e.parent)?void 0:a.regs}):null}));x.addTag("channel",eT,rT);const oT=h.gK.model({value:h.gK.string,valuetype:h.gK.optional(h.gK.enumeration(["url","json"]),"url"),timecolumn:"",sep:",",timeformat:"",timedisplayformat:"",durationdisplayformat:".0f",overviewchannels:"",overviewwidth:"25%",fixedscale:!1,multiaxis:h.gK.optional(h.gK.boolean,!1),hotkey:h.gK.maybeNull(h.gK.string)}),iT=h.gK.model("TimeSeriesModel",{type:"timeseries",children:Te.unionArray(["channel","timeseriesoverview","view","hypertext"]),width:840,margin:h.gK.frozen({top:20,right:20,bottom:30,left:50,min:10,max:10}),brushRange:h.gK.array(h.gK.number),_needsUpdate:h.gK.optional(h.gK.number,0)}).volatile((()=>({data:null,valueLoaded:!1,zoomedRange:0,scale:1,headers:[]}))).views((e=>({get regionsTimeRanges(){return e.regs.map((e=>[e.start,e.end]))},get defaultOverviewWidth(){var t,n;return[0,Math.min(null!=(t=null==(n=e.overviewwidth.match(/(\d+)%$/))?void 0:n[1])?t:25,100)/100]},get store(){return(0,h.Zn)(e)},get isDate(){return Boolean(e.timeformat)||e.timedisplayformat&&/[a-zA-Z]/.test(e.timedisplayformat[0])},get keyColumn(){return(e.timecolumn||"#@$").toLowerCase()},get parseTimeFn(){return e.timeformat&&e.timecolumn?$A.GYh(e.timeformat):Number},parseTime(t){const n=(0,e.parseTimeFn)(t);return n instanceof Date?n.getTime():n},get dataObj(){if(!e.valueLoaded||!e.data)return null;let t=e.data;if(e.timecolumn){if(!e.timeformat&&isNaN(t[e.keyColumn][0])){const n=[`Looks like your timeColumn (${e.timecolumn}) contains non-numbers.`,"You have to use timeFormat parameter if your values are datetimes.",`First wrong values: ${t[e.keyColumn].slice(0,3).join(", ")}`,`Read Documentation for details.`];throw new Error(n.join("
"))}{let n=0,r=Number.NEGATIVE_INFINITY;const o=t[e.keyColumn].length,i=Array.from({length:o});for(let a=0;atimeColumn (${e.timecolumn}) must be incremental and sequentially ordered.`,`First wrong values: ${n.join(", ")}`,`
Read Documentation for details.`].join("
"))}r=n}if(0===i[0]&&0===i[1]&&0===i[2]){const n=[`timeColumn (${e.timecolumn}) cannot be parsed.`,`First wrong values: ${t[e.keyColumn].slice(0,3).join(", ")}`];throw e.timeformat?n.push(`Your timeFormat: ${e.timeformat}. It should be compatible with these values.`):n.push("You have to use timeFormat parameter if your values are datetimes."),n.push(`
Read Documentation for details.`),new Error(n.join("
"))}t=Object.assign({},t,{[e.keyColumn]:i})}}else{const n=Object.values(t)[0],r=Array.from({length:n.length},((e,t)=>t));t=Object.assign({},t,{[e.keyColumn]:r})}return t},get dataHash(){const t=e.dataObj,{keyColumn:n}=e;if(!t)return null;const r=Object.keys(t),o=[];for(const i of r)for(let r=0;re.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t?t.filter((e=>e.isSelected&&"TimeSeriesLabelsModel"===(0,h.Pw)(e).name)):null},formatTime(t){if(!e._format){const{timedisplayformat:t,isDate:n}=e;e._format="date"===t?XA:t?n?$A.aLc(t):$A.GPZ(t):String}return e._format(t)},formatDuration(t){if(!e._formatDuration){const{durationdisplayformat:t,isDate:n}=e;e._formatDuration=t?n?$A.aLc(t):$A.GPZ(t):String}return e._formatDuration(t)}}))).actions((e=>({setData(t){e.data=t,e.valueLoaded=!0},setColumnNames(t){e.headers=t},setZoomedRange(t){e.zoomedRange=t},setScale(t){e.scale=t},updateView(){e._needsUpdate=e._needsUpdate+1},scrollToRegion(t){const n=[...e.brushRange];if(t.start>=n[0]&&t.end<=n[1])return;const r=n[1]-n[0],o=t.end-t.start,i=1.5*o,a=(i-o)/2;if(rn[1]&&(n[0]+=t.end+a-n[1],n[1]=t.end+a),n[0]=Math.max(e.keysRange[0],n[0]),n[1]=Math.min(e.keysRange[1],n[1]),e.updateTR(n,e.scale+1e-4)},updateTR(t,n=1){null!==t&&(e.initialRange=t,e.brushRange=t,e.setZoomedRange(t[1]-t[0]),e.setScale(n),e.updateView())},throttledRangeUpdate:()=>In()(e.updateTR,100),addRegion(t,n){const r=e.getAvailableStates();if(0===r.length)return;const o=r[0],i={[o.valueType]:o.selectedValues()};return e.annotation.createResult({start:t,end:n,instant:t===n},i,o,e)},regionChanged(t,n,r){const o=e.regs[n];let i=!1;if(o)i=o.start!==t.start||o.end!==t.end,o.updateRegion(t.start,t.end);else{i=!0,e.addRegion(t.start,t.end,r).notifyDrawingFinished()}i&&e.updateView()},async preloadValue(t){const n=t.task.dataObj;if("url"!==e.valuetype)return void(e.value?e.setData(j(e.value,n)):e.setData(n));if(!e.value){const n=`Attribute value for ${e.name} should be provided when valuetype="url"`;return void t.annotationStore.addErrors([Kj.generalError(n)])}const r=j(e.value,n);if(!r||"string"!=typeof r){const n=`Cannot find url in ${o=e.value,o.substr(1)} field of your task`;return void t.annotationStore.addErrors([Kj.generalError(n)])}var o;let i,a="",s=!1;try{if(i=await fetch(r),!i.ok){if(400===i.status)return void t.annotationStore.addErrors([Kj.loadingError(`${i.status} ${i.statusText}`,r,e.value,(0,h._$)(t).messages.ERR_LOADING_S3)]);throw new Error(`${i.status} ${i.statusText}`)}a=await i.text()}catch(n){let o=n;if(!i)try{i=await fetch(r,{mode:"no-cors"}),i.ok||0!==i.status||(s=!0)}catch(e){o=e}return void t.annotationStore.addErrors([Kj.loadingError(o,r,e.value,s?(0,h._$)(t).messages.ERR_LOADING_CORS:void 0)])}try{let n=(e=>{if((0,w.isString)(e)&&"{"===e[0])try{return JSON.parse(e)}catch(e){}return!1})(a),r=[];if(!n){var l;let t=e.sep;if((null==(l=t)?void 0:l.length)>1){t={tab:"\t","\\t":"\t",space:" ",auto:"auto",comma:",",dot:"."}[t]||t[0]}[n,r]=((e,t="auto")=>{const n=e.split("\n");let r;if("auto"!==t&&!n[0].includes(t))throw new Error([`Cannot find provided separator "${t}".`,`Row 1: ${n[0]}`].join("\n"));if("auto"===t&&n.length>1){const e=n[1].trim().match(/[,;\s\t]/g);if(!e.length)throw new Error("No separators found");if(e.some((t=>t!==e[0]))){const t=Array.from(new Set(e)).map(w.escapeHtml).map((e=>`"${e}"`)).join(", ");throw new Error([`More than one possible separator found: ${t}`,'You can provide correct one with '].join("\n"))}if(t=e[0],n[0].split(t).length!==n[1].split(t).length)throw new Error(["Different amount of elements in rows.",`Row 1: ${n[0]}`,`Row 2: ${n[1]}`,`Guessed separator: ${t}`,'You can provide correct one with '].join("\n"))}const o=new RegExp(['"(?:""|[^"])*"',`[^"${t}]+`,`(?=${t}(?:${t}|$))`,`^(?=${t})`].join("|"),"g"),i=e=>e.trim().match(o);r=i(n[0]);const a=i(n[1]);r.every(((e,t)=>isNaN(e)===isNaN(a[t])))?r=r.map(((e,t)=>String(t))):(n.shift(),r=r.map((e=>e.toLowerCase())));const s={};for(const e of r)s[e]=[];if(r.length!==i(n[0]).length)throw new Error(["Column names count differs from data columns count.",`Columns: ${r.join(", ")};`,`Data: ${n[0]};`,`Separator: "${t}".`].join("\n"));let l,c;for(const e of n)if(e.trim())for(l=i(e),c=0;cURL: ${r}`;t.annotationStore.addErrors([Kj.generalError(n)])}},async updateValue(t){var n;let r;try{e.dataObj||await e.preloadValue(t),r=e.dataObj}catch(e){return void t.annotationStore.addErrors([Kj.generalError(e.message)])}if(!r)return;const o=r[e.keyColumn];if(!o){const n=[`${e.keyColumn} not found in data.`,'Use valueType="url" for data loading or column index for headless csv'].join(" ");return void t.annotationStore.addErrors([Kj.generalError(n)])}if(null!=(n=e.brushRange)&&n.length)return;const i=e.defaultOverviewWidth.map((e=>o[Math.round((o.length-1)*e)]));e.updateTR(i)},onHotKey(){}})));const aT=(0,y.PA)((({item:e,data:t,series:n})=>{const r=e.regs,[o,i,a]=function(){const[e,t]=p.useState(840),[n,r]=p.useState(null),o=p.useCallback((e=>{r(e)}),[]);return p.useLayoutEffect((()=>{if(n){const e=()=>t(n.offsetWidth);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}}),[n]),[o,e,n]}(),s=60,{margin:l,keyColumn:c}=e,d=Math.max(i-l.left-l.right,0);let u=e.children.map((e=>e.columnName));if(e.overviewchannels){const t=e.overviewchannels.toLowerCase().split(",").map((t=>/^\d+$/.test(t)?e.headers[t]:t)).filter((e=>u.includes(e)));t.length&&(u=t)}const h=p.useRef(),g=p.useRef(),m=p.useRef(),f=p.useRef(),v=p.useRef(),y=(e.isDate?$A.w7C():$A.m4Y()).domain($A.Xxv(t[c])).range([0,d]),b=p.useCallback(e.throttledRangeUpdate(),[]),x=[0,d>>2],C=p.useRef(x),S=10;let j;const k=$A.n55().extent([[0,0],[d,s]]).on("start",(function(){const[e,t]=$A.f0J.selection;j=e===t?e:null})).on("brush",(function(){if($A.f0J.selection&&!YA("brush")&&!YA("wheel")){let[t,n]=$A.f0J.selection;const r=C.current,o=n-t;let i=+y.invert(t),a=+y.invert(n);if(r[0]===t&&r[1]===n);else if(r[0]!==t&&r[1]!==n&&Math.abs(o-S)<.001){const t=(i+a)/2;i=t-e.zoomedRange/2,a=t+e.zoomedRange/2}else o>1;let o=[t-r,t+r];o[0]<0&&(o=[0,2*r]),o[1]>d&&(o=[d-2*r,d]),v.current.call(k.move,o)}})),O=r=>{const o=e.children.find((e=>e.columnName===r)),i=o?o.strokecolor:"steelblue",a=$A.m4Y().domain([$A.jkA(t[r]),$A.T9B(t[r])]).range([s-l.max,l.min]);m.current.append("path").datum(ZA(n,UA())).attr("class","channel").attr("fill","none").attr("stroke",i).attr("d",$A.n8j().y((e=>a(e[r]))).defined((e=>e[c])).x((e=>y(e[c]))))};return p.useEffect((()=>{a&&(h.current=$A.Ltv(a).append("svg").attr("viewBox",[0,0,d+l.left+l.right,s+l.bottom]).style("display","block").append("g").attr("transform",`translate(${l.left},0)`),f.current=h.current.append("g").attr("transform","translate(0,60)"),m.current=h.current.append("g").attr("class","channels"),g.current=h.current.append("g").attr("class","regions"),v.current=h.current.append("g").call(k).call(k.move,x),v.current.select(".handle--w").style("transform","translate(-1px, 0)"),v.current.select(".handle--e").style("transform","translate(1px, 0)"))}),[a]),p.useEffect((()=>{if(a){$A.Ltv(a).selectAll("svg").attr("viewBox",[0,0,d+l.left+l.right,s+l.bottom]),m.current.selectAll("path").remove();for(const e of u)O(e);f.current.call($A.l78(y).ticks(d/80).tickSizeOuter(0)),v.current.call(k).call(k.move,e.brushRange.map(y))}}),[d,a]),p.useEffect((()=>{if(!v.current)return;const t=e.brushRange.map(y);if(t[1]-t[0]{a&&(e=>{const t=g.current.selectAll(".region").data(e);t.enter().append("rect").attr("class","region").merge(t).attr("y",0).attr("height",s).attr("x",(e=>y(e.start))).attr("width",(e=>Math.max(2,y(e.end)-y(e.start)))).attr("fill",(e=>GA(e,e.selected?.8:.3))).style("display",(e=>e.hidden?"none":"block")),t.exit().remove()})(r)})),e.regs.map((e=>{var t;return(0,w.fixMobxObserve)(e.start,e.end,e.selected,e.hidden,null==(t=e.style)?void 0:t.fillcolor)})),(0,_.jsx)("div",{className:"htx-timeseries-overview",ref:o})})),sT=h.gK.compose("TimeSeriesModel",bn,qA,Pe,oT,iT),lT=(0,y.WQ)("store")((0,y.PA)((({item:e})=>{var t;const n=p.createRef();return p.useEffect((()=>{var t;null!=e&&null!=(t=e.brushRange)&&t.length&&(e._nodeReference=n.current)}),[e,n]),null!=e&&null!=(t=e.brushRange)&&t.length&&e.data?(0,_.jsx)("div",{ref:n,className:"htx-timeseries",children:(0,_.jsxs)(_n,{item:e,children:[D.renderChildren(e,e.annotation),(0,_.jsx)(aT,{data:e.dataObj,series:e.dataHash,item:e,range:e.brushRange})]})}):(0,_.jsx)("div",{style:{textAlign:"center",height:100},children:(0,_.jsx)(v.A,{size:"large",delay:300})})})));x.addTag("timeseries",sT,lT),x.addObjectType(sT);const cT=h.gK.model({id:h.gK.identifier,type:"pagedview",children:Te.unionArray(["view","header","labels","label","table","taxonomy","choices","choice","collapse","datetime","number","rating","ranker","rectangle","ellipse","polygon","keypoint","brush","magicwand","rectanglelabels","ellipselabels","polygonlabels","keypointlabels","brushlabels","hypertextlabels","timeserieslabels","text","audio","image","hypertext","richtext","timeseries","audioplus","list","dialog","textarea","pairwise","style","label","relations","filter","timeseries","timeserieslabels","pagedview","paragraphs","paragraphlabels","video","videorectangle"])}),dT=h.gK.compose("PagedViewModel",cT,Pe),uT="view_page",hT=yr("Repeater"),gT=`.${(0,Ze.cn)("sidepanels").elem("content").toClassName()}`,mT=[1,5,10,25,50,100],pT=()=>{const e=new URLSearchParams(window.location.search).get(uT);return e?Number.parseInt(e):1};let fT=null;const vT=(e,t=null)=>{const n=new URLSearchParams(window.location.search),r=fT&&t!==fT;fT=t,r?n.delete(uT):1!==e?n.set(uT,e.toString()):n.delete(uT),window.history.replaceState(void 0,void 0,`${window.location.pathname}?${n}`)},yT=(0,y.PA)((({item:e})=>{const[t,n]=(0,p.useState)(pT),[r,o]=(0,p.useState)(1),i=(0,p.useCallback)((t=>{var r;n(t),vT(t,null==(r=e.annotationStore)||null==(r=r.store)?void 0:r.task.id)}),[]),a=Math.ceil(e.children.length/r);(0,p.useEffect)((()=>{o(((e,t)=>{const n=localStorage.getItem(`pages:${e}`);return n?Number.parseInt(n):null!=t?t:void 0})("repeater",1))}),[]),(0,p.useEffect)((()=>{const t=e.annotation.lastSelectedRegion;if(t){const e=Number.parseFloat(t.object.name.split("_")[1])+1;i(Math.ceil(e/r))}}),[e.annotation.lastSelectedRegion]),(0,p.useEffect)((()=>{var e,n;(0,O.VS)(O.LE)?null==(e=document.querySelector(gT))||e.scrollTo(0,0):null==(n=document.querySelector("#label-studio-dm"))||n.scrollTo(0,0);return setTimeout((()=>{hT.addNamed("repeater:next-page",(()=>{t{t>1&&i(t-1)}))})),()=>{hT.removeNamed("repeater:next-page"),hT.removeNamed("repeater:previous-page")}}),[t]),(0,p.useEffect)((()=>{var t;return vT(pT(),null==(t=e.annotationStore)||null==(t=t.store)?void 0:t.task.id),()=>{var t;vT(1,null==(t=e.annotationStore)||null==(t=t.store)?void 0:t.task.id)}}),[]);const s=(0,p.useCallback)((()=>{const n=[];for(let o=0;o{e.annotation.unselectAll(),i(t),n!==r&&(((e,t)=>{localStorage.setItem(`pages:${e}`,t.toString())})("repeater",n),o(n))}})]})}));x.addTag("pagedview",dT,yT);const bT=p.createContext(),xT=["name","children","label","icon","to","className","href","danger","exact","forceReload","active","onClick"],wT=(0,p.forwardRef)((({children:e,className:t,style:n,size:r,selectedKeys:o,closeDropdownOnItemClick:i,allowClickSelected:a},s)=>{const l=J_(),c=(0,p.useMemo)((()=>new Set(null!=o?o:[])),[o]),d=(0,p.useCallback)((e=>{const t=(0,Ze.cn)("menu").elem("item").closest(e.target);l&&t&&!1!==i&&l.close()}),[l]),u=(0,p.useMemo)((()=>!!l),[l]),h=(0,p.useMemo)((()=>({selected:c,allowClickSelected:a})),[c,a]);return(0,_.jsx)(bT.Provider,{value:h,children:(0,_.jsx)(Ze.eB,{ref:s,tag:"ul",name:"menu",mod:{size:r,collapsed:u},mix:t,style:n,onClick:d,children:e})})}));wT.Item=e=>{let{name:t,children:n,label:r,icon:o,to:i,className:a,href:s,danger:l,exact:c=!1,forceReload:d=!1,active:u=!1,onClick:h}=e,g=(0,Yn.A)(e,xT);const{selected:m,allowClickSelected:f}=p.useContext(bT),v=(0,Ze.cn)("menu",{elem:"item"}),y=(()=>{const e=window.location.pathname.replace(/\/$/,""),n=null!=i?i:s;return!!m.has(t)||(c?e===n:e.includes(n))})(),b=(0,p.useMemo)((()=>(0,_.jsxs)(_.Fragment,{children:[o&&(0,_.jsx)("span",{className:v.elem("item-icon"),children:o}),null!=n?n:r]})),[n,r,o]),x=Object.assign({className:v.mod({active:y||u,look:l&&"danger",clickable:f}).mix(a),onClick:h},g);return d&&(x.onClick=()=>window.location.href=null!=i?i:s),(0,_.jsx)("li",{children:s?(0,_.jsx)("a",Object.assign({href:null!=s?s:"#"},x,{children:b})):(0,_.jsx)("div",Object.assign({},x,{children:b}))})},wT.Spacer=()=>(0,_.jsx)("li",{className:(0,Ze.cn)("menu",{elem:"spacer"})}),wT.Divider=()=>(0,_.jsx)("li",{className:(0,Ze.cn)("menu",{elem:"divider"})}),wT.Builder=(e,t)=>(null!=t?t:[]).map(((t,n)=>{if("SPACER"===t)return(0,_.jsx)(wT.Spacer,{},n);if("DIVIDER"===t)return(0,_.jsx)(wT.Divider,{},n);const[r,o]=t,i=`${e}${r}`.replace(/([/]+)/g,"/");return(0,_.jsx)(wT.Item,{to:i,exact:!0,children:o},n)})),wT.Group=({children:e,title:t,className:n,style:r})=>{const o=(0,Ze.cn)("menu-group");return(0,_.jsxs)("li",{className:o.mix(n),style:r,children:[(0,_.jsx)("div",{className:o.elem("title"),children:t}),(0,_.jsx)("ul",{className:o.elem("list"),children:e})]})};const CT=(0,p.forwardRef)(((e,t)=>{const n=(0,p.useRef)(),r=(0,p.useRef)(null),o=e=>{t instanceof Function?t(e):t&&(t.current=e)};return(0,p.useEffect)((()=>{var t;const i=document.createElement("canvas");i.width=e.width,i.height=e.height,i.style.background="#efefef",r.current=i,null==(t=n.current)||t.appendChild(i),o(r.current)}),[]),(0,p.useEffect)((()=>{r.current&&(r.current.width=e.width,r.current.height=e.height)}),[e.width,e.height]),(0,p.useEffect)((()=>()=>{const e=r.current,t=e.getContext("2d");null==t||t.clearRect(0,0,e.width,e.height),e.remove(),r.current=null,o(null)}),[]),(0,_.jsx)("div",{ref:n})})),ST={mp4:"video/mp4",mp4v:"video/mp4",mpg4:"video/mp4",ogg:"video/ogg",ogv:"video/ogg",ogm:"video/ogg",ogx:"video/ogg",webm:"video/webm",avi:"video/avi",mov:"video/quicktime",qt:"video/quicktime"},jT=(0,p.forwardRef)(((e,t)=>{const n=(0,p.useRef)(null),r=(0,p.useRef)(null),o=(0,p.useRef)([]),i=(0,p.useCallback)((async t=>{let n=!1;return t&&(n=await(async e=>{var t;const n=document.createElement("video"),r=null!=(t=new URL(e,/^https?/.exec(e)?void 0:window.location.href).pathname.split(".").pop())?t:"";let o=ST[r];o||(o=(await fetch(e,{method:"GET",headers:{Range:"bytes=0-0"}})).headers.get("content-type"));const i=!!(a=o)&&a.includes("octet-stream")||!!o&&""!==n.canPlayType(o);var a;const s=document.querySelector(".ant-modal");return i||s||fn.error("There has been an error rendering your video, please check the format is supported"),i})(t)),e.canPlayType&&e.canPlayType(n),n}),[e.canPlayType]),a=(0,p.useCallback)((()=>{const t=document.createElement("video");t.muted=!!e.muted,t.controls=!1,t.preload="auto",(0,O.VS)(O.xS)&&(t.crossOrigin="anonymous"),Object.assign(t.style,{top:"-9999px",width:0,height:0,position:"absolute"}),n.current=t}),[]),s=(0,p.useCallback)((e=>{t instanceof Function?t(e):t&&(t.current=e)}),[]),l=()=>{const t=Object.entries(e).filter((([e])=>e.startsWith("on"))).map((([e,t])=>[e.toLowerCase(),t])),r=[];t.forEach((([e,t])=>{var o;const i=e.replace(/^on/,"");null==(o=n.current)||o.addEventListener(i,t),r.push([i,t])})),o.current=r},c=()=>{var e;n.current&&((null!=(e=o.current)?e:[]).forEach((([e,t])=>{var r;null==(r=n.current)||r.removeEventListener(e,t)})),o.current=[])},d=()=>{var e,t,o;r&&n&&(null==(e=n.current)||e.pause(),null==(t=r.current)||t.setAttribute("src",""),null==(o=n.current)||o.load())},u=(0,p.useCallback)((()=>{var t,o,i;if(!n.current)return;null==(t=n.current)||t.pause(),r.current&&d();const a=document.createElement("source");a.setAttribute("src",null!=(o=e.src)?o:""),null==(i=n.current)||i.appendChild(a),r.current=a}),[e.src]);return(0,p.useEffect)((()=>{c(),l()})),(0,p.useEffect)((()=>{var t;return a(),l(),i(null!=(t=e.src)?t:"").then((e=>{e&&n.current&&(u(),s(n.current),document.body.append(n.current))})),()=>{var e;c(),d(),s(null),null==(e=n.current)||e.remove(),n.current=null}}),[]),(0,p.useEffect)((()=>{n.current&&void 0!==e.muted&&(n.current.muted=e.muted)}),[e.muted]),null})),kT=e=>(0,w.clamp)(e,.1,10),OT=(e,t,n,r)=>Math.min(1,Math.min(e/n,t/r)),RT=(0,p.memo)((0,p.forwardRef)(((e,t)=>{var n,r,o,i,a;const s=(0,p.useRef)(),l=(0,p.useRef)(),c=(0,p.useRef)(),d=(0,p.useRef)(),u=(0,p.useRef)(),h=(0,p.useRef)(null),g=(0,p.useRef)(!1),m=(0,p.useMemo)((()=>{var t;return null!=(t=e.width)?t:600}),[e.width]),f=(0,p.useMemo)((()=>{var t;return null!=(t=e.height)?t:600}),[e.height]),v=null!=(n=e.framerate)?n:29.97,[y,b]=(0,p.useState)(!0),[x,C]=(0,p.useState)(0),[S,j]=(0,p.useState)(null!=(r=e.position)?r:1),[k,R]=(0,p.useState)(!1),[E,A]=(0,p.useState)(!1),[T,P]=(0,p.useState)(null!=(o=e.zoom)?o:1),[I,L]=(0,p.useState)(null!=(i=e.pan)?i:{x:0,y:0}),[M,K]=(0,p.useState)({width:0,height:0,ratio:1}),[D,N]=(0,p.useState)(1),[V,z]=(0,p.useState)(1),[B,H]=(0,p.useState)(1),F=(0,p.useMemo)((()=>{const e=[];return 1!==D&&e.push(`contrast(${D})`),1!==V&&e.push(`brightness(${V})`),1!==B&&e.push(`saturate(${B})`),e.join(" ")}),[V,D,B]),W=(0,p.useCallback)((t=>{const{width:n,height:r}=M,o=n*T,i=r*T,a=(0,w.clamp)((o-m)/2,0,Number.POSITIVE_INFINITY),s=(0,w.clamp)((i-f)/2,0,Number.POSITIVE_INFINITY);return{x:e.allowPanOffscreen?t.x:(0,w.clamp)(t.x,-a,a),y:e.allowPanOffscreen?t.y:(0,w.clamp)(t.y,-s,s)}}),[e.allowPanOffscreen,m,f,T]),$=(0,p.useCallback)((()=>{try{if(d.current&&u.current){const e=d.current,{width:t,height:n}=M;if(0===t&&0===n)return;const r=t*T,o=n*T,i=(m-r)/2+I.x,a=(f-o)/2+I.y;e.clearRect(0,0,m,f),e.filter=F,e.drawImage(u.current,0,0,t,n,i,a,r,o)}}catch(e){console.log("Error rendering video",e)}}),[M,T,I,F,m,f]),U=(0,p.useCallback)(((t=!1)=>{var n,r,o;if(!d.current)return;const i=null!=(n=null==(r=u.current)?void 0:r.currentTime)?n:0,a=Math.round(i*v),s=(0,w.clamp)(a,1,x||1),l=null!=(o=e.onFrameChange)?o:()=>{};s===S&&!0!==t||(j(s),$(),l(s,x))}),[v,S,$,e.onFrameChange,x]),Z=(0,p.useCallback)((()=>{if(!u.current)return;if(!d.current)return;const e=u.current;e&&(k||U(!0),e.networkState===e.NETWORK_IDLE?(g.current=!0,A(!1)):A(!0))}),[k,U]),G=(0,p.useCallback)((()=>{R(!0),A(!1),null==e.onPlay||e.onPlay()}),[e.onPlay]),Y=(0,p.useCallback)((()=>{R(!1),A(!1),null==e.onPause||e.onPause()}),[e.onPause]),X=(0,p.useCallback)((()=>{A(!1),Z()}),[Z]),q=(0,p.useCallback)((()=>{A(!0)}),[]),J=(0,p.useCallback)((()=>{R(!1),A(!1),null==e.onSeeked||e.onSeeked(),null==e.onEnded||e.onEnded(),null==e.onPause||e.onPause()}),[e.onEnded]),Q=(0,p.useCallback)((()=>{if(!(0,O.VS)(O.xS))return;const t=u.current;null!=t&&t.error&&g.current?(g.current=!1,t.load()):t&&(null==e.onError||e.onError(t.error))}),[e.onError]),ee=()=>{U(),k?s.current=requestAnimationFrame(ee):cancelAnimationFrame(s.current)};(0,p.useEffect)((()=>{k||$()}),[$,k]),(0,p.useEffect)((()=>(k&&(s.current=requestAnimationFrame(ee)),()=>{cancelAnimationFrame(s.current)})),[k]),(0,p.useEffect)((()=>{u.current&&e.speed&&(u.current.playbackRate=e.speed)}),[e.speed]),(0,p.useEffect)((()=>{u.current&&e.position&&(u.current.currentTime=e.position/v)}),[v,e.position]),(0,p.useEffect)((()=>{u.current&&e.currentTime&&(u.current.currentTime=e.currentTime)}),[e.currentTime]),(0,p.useEffect)((()=>{u.current&&(e.playing&&!k?u.current.play():!1===e.playing&&k&&u.current.pause())}),[k,e.playing]),(0,p.useEffect)((()=>{var t;e.allowInteractions&&(null==(t=l.current)||t.addEventListener("wheel",(e=>{e.preventDefault()})))}),[]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.zoom)&&P(kT(e.zoom))}),[e.zoom]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.pan)&&L(W(e.pan))}),[e.pan,W]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.brightness)&&z(e.brightness)}),[e.brightness]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.contrast)&&N(e.contrast)}),[e.contrast]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.saturation)&&H(e.saturation)}),[e.saturation]),(0,p.useEffect)((()=>{$()}),[F,T,I,m,f]),(0,p.useEffect)((()=>{const t=new ResizeObserver((()=>{null==e.onResize||e.onResize(M)}));return t.observe(l.current),()=>t.disconnect()}),[M]);const te={currentFrame:S,length:x,playing:k,zoom:T,pan:I,videoDimensions:M,width:m,height:f,set currentTime(e){const t=u.current;t&&e!==this.currentTime&&(t.currentTime=e)},get currentTime(){var e,t;return null!=(e=null==(t=u.current)?void 0:t.currentTime)?e:0},get duration(){var e,t;return null!=(e=null==(t=u.current)?void 0:t.duration)?e:0},get volume(){var e,t;return null!=(e=null==(t=u.current)?void 0:t.volume)?e:1},set volume(e){const t=u.current;t&&(t.currentTime=e)},adjustPan:(e,t)=>W({x:e,y:t}),setZoom(e){P(kT(e))},setPan(e,t){const n=this.adjustPan(e,t);L(n)},setContrast(e){N(e)},setBrightness(e){z(e)},setSaturation(e){H(e)},play(){var e;null==(e=u.current)||e.play()},pause(){var e;null==(e=u.current)||e.pause()},seek(e){this.currentTime=(0,w.clamp)(e,0,this.duration),requestAnimationFrame((()=>$()))},goToFrame(e){const t=(0,w.clamp)(e,1,x);this.currentTime=t/v,requestAnimationFrame((()=>$()))}};return t instanceof Function?t(te):t&&(t.current=te),(0,p.useEffect)((()=>{const{width:t,height:n}=M,r=OT(m,f,t,n);if(M.ratio!==r){const t=Object.assign({},M,{ratio:r});K(t),e.zoom!==M.ratio&&(null==e.onResize||e.onResize(t))}}),[T,m,f,M]),(0,p.useEffect)((()=>{let t,n,r=!1;const o=()=>{var i;if(!r)if(!1!==h.current)if(4!==(null==(i=u.current)?void 0:i.readyState))n=setTimeout(o,10);else{r=!0;const n=u.current;t=setTimeout((()=>{const t=Math.ceil(n.duration*v),[r,o]=[n.videoWidth,n.videoHeight],i={width:r,height:o,ratio:OT(m,f,r,o)};K(i),C(t),b(!1),U(!0),null==e.onLoad||e.onLoad(Object.assign({},te,{videoDimensions:i,length:t}))}),200)}else b(!1)};return o(),()=>{n&&clearTimeout(n),t&&clearTimeout(t)}}),[]),(0,p.useEffect)((()=>()=>{const e=d.current;e&&e.clearRect(0,0,e.canvas.width,e.canvas.height),d.current=void 0,c.current=void 0,u.current=void 0,l.current=void 0}),[]),(0,_.jsxs)(Ze.eB,{ref:l,name:"video-canvas",children:[y&&(0,_.jsx)(Ze.Sl,{name:"loading",children:(0,_.jsx)(Ze.eB,{name:"spinner"})}),(0,_.jsxs)(Ze.Sl,{name:"view",onClick:e.onClick,style:{width:m,height:f},children:[(0,_.jsx)(CT,{ref:e=>{e&&c.current!==e&&(c.current=e,d.current=e.getContext("2d"))},width:m,height:f}),!y&&E&&(0,_.jsx)(Ze.Sl,{name:"buffering"})]}),(0,_.jsx)(jT,{ref:u,controls:!1,preload:"auto",src:e.src,muted:null!=(a=e.muted)&&a,canPlayType:e=>h.current=e,onPlay:G,onPause:Y,onLoadedData:Z,onCanPlay:Z,onSeeked:t=>{Z(),null==e.onSeeked||e.onSeeked(t)},onSeeking:t=>{Z(),null==e.onSeeked||e.onSeeked(t)},onTimeUpdate:t=>{Z(),null==e.onTimeUpdate||e.onTimeUpdate(t)},onProgress:Z,onPlaying:X,onWaiting:q,onEnded:J,onError:Q})]})})));RT.displayName="VideoCanvas";const ET=h.gK.model("TimeTraveller",{undoIdx:0,targetPath:"",skipNextUndoState:h.gK.optional(h.gK.boolean,!1),lastAdditionTime:h.gK.optional(h.gK.Date,new Date),createdIdx:0}).volatile((()=>({history:[],isFrozen:!1}))).views((e=>({get canUndo(){return e.undoIdx>0},get canRedo(){return e.undoIdx1}}))).actions((e=>{let t,n;const r=new Set,o=new Set;let i=!1,a=!1;function s(e=!0){r.forEach((t=>t(e)))}return{freeze(t){o.add(t),e.isFrozen||(i=!1,e.isFrozen=!0)},safeUnfreeze(t){o.delete(t),e.isFrozen=o.size>0},unfreeze(t){e.safeUnfreeze(t),e.isFrozen||(i&&e.recordNow(),e.setReplaceNextUndoState(!1))},setSkipNextUndoState(t=!0){e.skipNextUndoState=t},setReplaceNextUndoState(e=!0){a=e},recordNow(){t&&e.addUndoState((0,h.dV)(t))},onUpdate:e=>(r.add(e),()=>{r.delete(e)}),addUndoState(t){e.isFrozen?i=!0:e.skipNextUndoState?e.skipNextUndoState=!1:(e.history=e.history.slice(0,e.undoIdx+!a).concat(t),e.undoIdx=e.history.length-1,a=!1,i=!1,e.lastAdditionTime=new Date)},reinit(n=!0){e.history=[(0,h.dV)(t)],e.undoIdx=0,e.createdIdx=0,s(n)},afterCreate(){if(t=e.targetPath?(0,h.o1)(e,e.targetPath):(0,h._$)(e).targetStore,!t)throw new Error("Failed to find target store for TimeTraveller. Please provide `targetPath` property, or a `targetStore` in the environment");n=(0,h.aQ)(t,(e=>this.addUndoState(e))),0===e.history.length&&e.recordNow(),e.createdIdx=e.undoIdx},beforeDestroy(){n(),t=null,n=null,r.clear(),o.clear()},undo(){e.set(e.undoIdx-1)},redo(){e.set(e.undoIdx+1)},set(n){e.undoIdx=n,e.skipNextUndoState=!0,(0,h.Nh)(t,e.history[n]),s(),(0,O.VS)(O.$b)&&setTimeout((()=>{e.setSkipNextUndoState(!1)}))},reset(){(0,h.Nh)(t,e.history[e.createdIdx]),s()}}})),_T=h.gK.model("GlobalOffset",{start:h.gK.number,end:h.gK.number,calculated:!1}).views((e=>({get serialized(){return{start:e.start,end:e.end}}}))),AT=h.gK.model("RichTextRegionModel",{type:"richtextregion",object:h.gK.late((()=>h.gK.reference(MA))),startOffset:h.gK.integer,endOffset:h.gK.integer,start:h.gK.string,end:h.gK.string,text:h.gK.maybeNull(h.gK.string),isText:h.gK.optional(h.gK.boolean,!1),globalOffsets:h.gK.maybeNull(_T)}).volatile((()=>({hideable:!0,cachedRange:null}))).views((e=>({get parent(){return(0,h.$Q)((()=>e.object))},getRegionElement(){var t;return null==(t=e._spans)?void 0:t[0]},get displayValue(){return e.text}}))).actions((e=>({beforeDestroy(){try{e.removeHighlight()}catch(e){console.warn(e)}},applyAdditionalDataFromResult(t){var n,r;const o=null==t||null==(n=t.type)?void 0:n.endsWith("labels"),i=(0,w.isDefined)(null==t||null==(r=t.value)?void 0:r.text);o&&i&&(e.text=t.value.text)},serialize(){const t={value:{}};if(e.isText)Object.assign(t.value,{start:e.startOffset,end:e.endOffset});else try{if((0,O.VS)(O.Er)){const n=e.parent.globalOffsetsToRelativeOffsets(e.globalOffsets);Object.assign(t.value,Object.assign({},n,{globalOffsets:e.globalOffsets.serialized}))}else{const n=e._getRootNode(!0),r=Gt(e.globalOffsets.start,e.globalOffsets.end,n);if(!r)throw new Error;const o=KA.fromRange(r,n);Object.assign(t.value,Object.assign({},o,{globalOffsets:e.globalOffsets.serialized}))}}catch(n){const{start:r,end:o,startOffset:i,endOffset:a}=e;Object.assign(t.value,{start:r,end:o,startOffset:i,endOffset:a}),e.globalOffsets&&Object.assign(t.value,{globalOffsets:e.globalOffsets.serialized})}return"yes"===e.object.savetextresult&&(0,w.isDefined)(e.text)&&(t.value.text=e.text),t},updateTextOffsets(t,n){Object.assign(e,{startOffset:t,endOffset:n})},updateGlobalOffsets(t,n){e.globalOffsets=_T.create({start:t,end:n,calculated:!0})},getRangeToHighlight(){var t;const n=e._getRootNode();if(!n||!e.globalOffsets)return;if(!e.cachedRange||e.cachedRange.collapsed||!(null!=(t=e.cachedRange.startContainer)&&null!=(t=t.ownerDocument)&&t.defaultView)){const{start:t,end:r}=e.globalOffsets;e.cachedRange=Gt(t,r,n)}return e.cachedRange},updateXPathsFromGlobalOffsets(){const t=e.parent.globalOffsetsToRelativeOffsets(e.globalOffsets);t&&e._setXPaths(t)},initRangeAndOffsets(){var t;if(null!=(t=e.globalOffsets)&&t.calculated)return;const n=e._getRootNode();let r;if(e.isText){const{startOffset:t,endOffset:r}=e;return e.globalOffsets={start:t,end:r,calculated:!0},void((0,O.VS)(O.Er)||(e.cachedRange=Gt(t,r,n)))}if((0,O.VS)(O.Er)){const t=e.parent.relativeOffsetsToGlobalOffsets(e.start,e.startOffset,e.end,e.endOffset);if(t){const[n,r]=t;return void(e.globalOffsets={start:n,end:r,calculated:!0})}if(e.globalOffsets)return void e.updateXPathsFromGlobalOffsets()}else{if(r=e._getRange({useOriginalContent:!0}),r){const t=e._getRootNode(!0),[o,i]=Qt(r,t);return e.globalOffsets={start:o,end:i,calculated:!0},void(e.cachedRange=Gt(o,i,n))}if(r=e._getRange({useOriginalContent:!1}),r){const[t,o]=Qt(r,n);return e.globalOffsets={start:t,end:o,calculated:!0},void(e.cachedRange=r)}if(e.globalOffsets&&(0,w.isDefined)(n)){const{start:t,end:r}=e.globalOffsets;return e.cachedRange=Gt(t,r,n),void(e.cachedRange&&(e._fixXPaths(e.cachedRange,n),e.globalOffsets.calculated=!0))}}},_fixXPaths(t,n){const r=KA.fromRange(t,n);(0,w.isDefined)(r)&&(e.start=r.start,e.end=r.end,e.startOffset=r.startOffset,e.endOffset=r.endOffset)},_setXPaths(t){e.start=t.start,e.end=t.end,e.startOffset=t.startOffset,e.endOffset=t.endOffset},_getRange({useOriginalContent:t=!1,useCache:n=!0}={}){const r=e._getRootNode(t),o=(0,w.isDefined)(e._cachedRange)&&!t&&n,i=o&&r&&!r.contains(e._cachedRange.commonAncestorContainer);if(!1===o||i){const r=e._createNativeRange(t);return t||!1===n?r:e._cachedRange=r}return e._cachedRange},_getRootNode(t=!1){var n,r;const o=e.parent;let i;i=(0,O.VS)(O.Er)?o.visibleNodeRef:t?o.originalContentRef:o.useWorkingNode?o.workingNodeRef:o.visibleNodeRef;const a=i.current;return null!=(n=null==a||null==(r=a.contentDocument)?void 0:r.body)?n:a},_createNativeRange(t=!1){const n=e._getRootNode(t);if(void 0===n)return;const{start:r,startOffset:o,end:i,endOffset:a}=e;try{return KA.toRange(r,o,i,a,n)}catch(e){console.warn("can't locate xpath",{start:r,end:i},e)}}}))),TT=h.gK.compose("RichTextRegionModel",it,ht,We,AT,RA);x.addRegionType(TT,"text"),x.addRegionType(TT,"hypertext"),x.addRegionType(TT,"richtext");const PT=h.gK.model({value:h.gK.maybeNull(h.gK.string),hotkey:h.gK.maybeNull(h.gK.string),framerate:h.gK.optional(h.gK.string,"24"),height:h.gK.optional(h.gK.string,"600"),timelineheight:h.gK.maybeNull(h.gK.string),muted:!1}),IT=h.gK.model({type:"video",_value:h.gK.optional(h.gK.string,""),mergeLabelsAndResults:!0}).volatile((()=>({errors:[],speed:1,ref:p.createRef(),frame:1,length:1,drawingRegion:null}))).views((e=>({get store(){return(0,h.Zn)(e)},get currentFrame(){var t,n;return null!=(t=null==(n=e.ref.current)?void 0:n.position)?t:1},get timelineControl(){var t;return null==(t=e.annotation.toNames.get(e.name))?void 0:t.find((e=>e.type.includes("timeline")))},get videoControl(){var t;return null==(t=e.annotation.toNames.get(e.name))?void 0:t.find((e=>e.type.includes("video")))},states(){var t;return null==(t=e.annotation.toNames.get(e.name))?void 0:t.filter((e=>e.type.endsWith("labels")))},activeStates(){const t=e.states();return t?t.filter((e=>!0===e.isSelected)):null},get hasStates(){const t=e.states();return t&&t.length>0}}))).actions((e=>({afterCreate(){var t;const n=Number(j(e.framerate,null==(t=e.store.task)?void 0:t.dataObj));!n||isNaN(n)?e.framerate="24":e.framerate=String(n<1?1/n:n)}}))).actions((e=>({triggerSync(t,n){e.ref.current&&e.syncSend(Object.assign({playing:e.ref.current.playing,time:e.ref.current.currentTime},n),t)},triggerSyncPlay(){e.triggerSync("play",{playing:!0})},triggerSyncPause(){e.triggerSync("pause",{playing:!1})},registerSyncHandlers(){["play","pause","seek"].forEach((t=>{e.syncHandlers.set(t,e.handleSync)})),e.syncHandlers.set("speed",e.handleSyncSpeed)},handleSync(t){if(!e.ref.current)return;const n=e.ref.current;t.playing?n.playing||n.play():n.playing&&n.pause(),t.speed&&(e.speed=t.speed),n.currentTime=t.time},handleSyncSpeed({speed:t}){e.speed=t},handleSeek(){e.triggerSync("seek")},syncMuted(t){e.muted=t}}))).actions((e=>({setLength(t){e.length=t},setOnlyFrame(t){e.frame!==t&&(e.frame=t)},setFrame(t){e.frame!==t&&e.framerate&&(e.frame=t,e.ref.current.currentTime=t/e.framerate)},addVideoRegion(t){const n=e.videoControl;if(!n)return void console.error("No video control is found");const r=[Object.assign({frame:e.frame,enabled:!0,rotation:0},t)],o=e.annotation.createResult({sequence:r},{},n,e);return e.activeStates().forEach((e=>{o.setValue(e)})),o},addTimelineRegion(t){var n,r;const o=e.timelineControl;if(!o)return void console.error("No video timeline control is found");const i=null!=(n=t.frame)?n:e.frame,a={ranges:[{start:i,end:i}]},s=null==(r=e.activeStates())?void 0:r[0],l={[s.valueType]:s.selectedValues()};return e.annotation.createResult(a,l,o,e)},deleteRegion(t){var n;null==(n=e.findRegion(t))||n.deleteRegion()},findRegion:t=>e.regs.find((e=>e.cleanId===t)),startDrawing(t){var n;const r=e.timelineControl;if(null!=r&&null!=(n=r.selectedLabels)&&n.length||null!=r&&r.allowempty)return e.drawingRegion=e.addTimelineRegion({frame:t,enabled:!1}),e.drawingRegion},finishDrawing(){e.drawingRegion=null}}))),LT=h.gK.compose("VideoModel",Fe,PT,ze,bn,Pe,IT,Le),MT=h.gK.model("TimelineRange",{start:h.gK.maybeNull(h.gK.integer),end:h.gK.maybeNull(h.gK.integer)});function KT(e){const{start:t,end:n}=e;return(0,w.isDefined)(t)?(0,w.isDefined)(n)?t===n?{frame:t,enabled:!1}:[{frame:t,enabled:!0},{frame:n,enabled:!1}]:{frame:t,enabled:!0}:(0,w.isDefined)(n)?{frame:n,enabled:!1}:[]}const DT=h.gK.model("TimelineRegionModel",{type:"timelineregion",object:h.gK.late((()=>h.gK.reference(LT))),ranges:h.gK.array(MT)}).volatile((()=>({hideable:!0}))).views((e=>({get parent(){return(0,h._n)(e)?e.object:null},get sequence(){return e.ranges.flatMap(KT)},getShape:()=>null}))).actions((e=>({serialize:()=>({value:{ranges:e.ranges}}),isInLifespan:e=>!0,setRanges([t,n]){e.parent.annotation.history.setReplaceNextUndoState(),e.ranges=[{start:t,end:n}]}}))),NT=h.gK.compose("TimelineRegionModel",it,ht,We,DT);x.addRegionType(NT,"video");const VT=yr("TimeSeries","Time Series Segmentation"),zT=h.gK.model("TimeSeriesRegionModel",{id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"timeseriesregion",object:h.gK.late((()=>h.gK.reference(sT))),start:h.gK.union(h.gK.number,h.gK.string),end:h.gK.union(h.gK.number,h.gK.string),instant:!1}).volatile((()=>({hideable:!0}))).views((e=>({get parent(){return e.object},get annotation(){var t;const n=(0,h.Zn)(e);return n!==e?null==(t=n.annotationStore)?void 0:t.selected:null},getRegionElement:()=>e._brushRef}))).actions((e=>({growRight(t){e.end=e.end+t},growLeft(t){e.start=e.start-t},shrinkRight(t){e.end=e.end-t},shrinkLeft(t){e.start=e.start+t},selectRegion(){const t=1e3,n=1e4;VT.addNamed("ts:grow-left",(()=>e.growLeft(t))),VT.addNamed("ts:grow-right",(()=>e.growRight(t))),VT.addNamed("ts:shrink-left",(()=>e.shrinkLeft(t))),VT.addNamed("ts:shrink-right",(()=>e.shrinkRight(t))),VT.addNamed("ts:grow-left-largre",(()=>e.growLeft(n))),VT.addNamed("ts:grow-right-largre",(()=>e.growRight(n))),VT.addNamed("ts:shrink-left-largre",(()=>e.shrinkLeft(n))),VT.addNamed("ts:shrink-right-largre",(()=>e.shrinkRight(n))),e.parent.scrollToRegion(e)},updateAppearenceFromState(){e.labelsState&&e.parent.updateView()},afterUnselectRegion(){VT.unbindAll(),e.parent.updateView()},updateRegion(t,n){e.start=t,e.end=n,e.notifyDrawingFinished()},afterCreate(){"string"==typeof e.start&&(e.start=e.parent.parseTime(e.start),e.end=e.parent.parseTime(e.end))},serialize(){const t=e.parent.timeformat?$A.aLc(e.parent.timeformat):Number;return{value:{start:t(e.start),end:t(e.end),instant:e.instant}}}}))),BT=h.gK.compose("TimeSeriesRegionModel",it,ht,We,Pe,zT);x.addTag("timeseriesregion",BT,(()=>{})),x.addRegionType(BT,"timeseries");const HT=(e,t)=>Object.fromEntries(e.map((e=>[e,t[e]]))),FT=h.gK.model("VideoRegionModel",{id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),object:h.gK.late((()=>h.gK.reference(LT))),sequence:h.gK.frozen([])}).preProcessSnapshot((e=>Object.assign({},e,{sequence:e.sequence||e.value.sequence}))).volatile((()=>({hideable:!0}))).views((e=>({get parent(){return e.object},get annotation(){var t;return null==(t=(0,h.Zn)(e))||null==(t=t.annotationStore)?void 0:t.selected},getShape(){throw new Error("Method getShape be implemented on a shape level")},getVisibility:()=>!0}))).actions((e=>({updateShape(){throw new Error("Method updateShape must be implemented on a shape level")},onSelectInOutliner(){(0,O.VS)(O.Fk)&&e.object.setFrame(e.sequence[0].frame)},serialize(){var t,n;const{framerate:r,length:o}=e.object;return{value:{framesCount:o,duration:null!=(t=null==(n=e.object)||null==(n=n.ref)||null==(n=n.current)?void 0:n.duration)?t:0,sequence:e.sequence.map((e=>Object.assign({},e,{time:e.frame/r})))}}},toggleLifespan(t){const n=e.closestKeypoint(t,!0);if(n){const t=e.sequence.indexOf(n);e.sequence=[...e.sequence.slice(0,t),Object.assign({},n,{enabled:!n.enabled}),...e.sequence.slice(t+1)]}},addKeypoint(t){var n,r,o;const i=Array.from(e.sequence),a=e.closestKeypoint(t),s=Object.assign({},null!=(n=null!=(r=e.getShape(t))?r:a)?n:{x:0,y:0},{enabled:null==(o=null==a?void 0:a.enabled)||o,frame:t});i.push(s),i.sort(((e,t)=>e.frame-t.frame)),e.sequence=i,e.updateShape(Object.assign({},s),s.frame)},removeKeypoint(t){e.sequence=e.sequence.filter((e=>e.frame!==t))},isInLifespan(t){const n=e.closestKeypoint(t);if(n){const{enabled:e,frame:r}=n;return r===t&&!e||e}return!1},closestKeypoint(t,n=!1){const r=e.sequence;let o;const i=r.filter((({frame:e})=>e<=t));return o=i[i.length-1],o||!0===n||(o=r.find((({frame:e})=>e>=t))),o}}))),WT=h.gK.compose("VideoRegionModel",it,ht,We,FT);function $T(e){let t=e;for(;t>0;)t-=360;return(t-180)%360+180}const UT=(e,t,n,r)=>{const o=(n-e.frame)/(t.frame-e.frame);if("rotation"===r){const n=$T(t[r]-e[r]);return $T(e[r]+n*o)}return e[r]+(t[r]-e[r])*o},ZT=h.gK.model("VideoRectangleRegionModel",{type:"videorectangleregion"}).volatile((()=>({props:["x","y","width","height","rotation"]}))).views((e=>({getShape(t){let n,r;for(const o of e.sequence){if(o.frame===t)return HT(e.props,o);if(o.frame>t){r=o;break}n=o}return n?r?Object.fromEntries(e.props.map((e=>[e,UT(n,r,t,e)]))):HT(e.props,n):null},getVisibility:()=>!0}))).actions((e=>({updateShape(t,n){const r=Object.assign({},t,{frame:n,enabled:!0}),o=e.closestKeypoint(n),i=e.sequence.findIndex((e=>e.frame>=n));if(i<0)e.sequence=[...e.sequence,r];else{var a,s;const r=Object.assign({},null!=(a=e.sequence[i])?a:{},t,{enabled:null==(s=null==o?void 0:o.enabled)||s,frame:n});e.sequence=[...e.sequence.slice(0,i),r,...e.sequence.slice(i+(e.sequence[i].frame===n))]}}}))),GT=h.gK.compose("VideoRectangleRegionModel",it,WT,ht,We,ZT);x.addRegionType(GT,"video");const YT=h.gK.compose("ClassificationArea",it,We,ht,h.gK.model({object:h.gK.late((()=>h.gK.reference(h.gK.union(...x.objectTypes())))),classification:!0}).views((e=>({get supportSuggestions(){return!1},get type(){return""}}))).actions((()=>({serialize:()=>({})})))),XT=h.gK.union({dispatcher(e){if(e.$treenode)return e.$treenode.type;if(!e.points&&!e.sequence&&!e.ranges&&e.value&&Object.values(e.value).length<=1)return YT;const t=D.cleanUpId(e.object.name||e.object),n=window.Htx.annotationStore.names.get(t),r=x.getAvailableAreas(n.type,e);var o;return"video"===n.type?e.sequence||null!=(o=e.value)&&o.sequence?GT:NT:r.length?h.gK.union(...r,YT):YT}},un,D_,NT,BT,fO,TT,qk,Zk,aO,Vk,GT,YT),qT=XT;var JT=n(87835),QT=n.n(JT);const eP=e=>e?e.map((e=>e.map((e=>({label:e,value:e}))))):[],tP={pathSeparator:"/",showFullPath:!0},nP=h.gK.model("UserExtended",{id:h.gK.identifierNumber,firstName:h.gK.maybeNull(h.gK.string),lastName:h.gK.maybeNull(h.gK.string),username:h.gK.maybeNull(h.gK.string),email:h.gK.maybeNull(h.gK.string),lastActivity:h.gK.maybeNull(h.gK.string),avatar:h.gK.maybeNull(h.gK.string),initials:h.gK.maybeNull(h.gK.string),phone:h.gK.maybeNull(h.gK.string)}).preProcessSnapshot((e=>(0,w.camelizeKeys)(null!=e?e:{}))),rP=(h.gK.model("UserStore",{id:h.gK.maybeNull(h.gK.integer),pk:h.gK.maybeNull(h.gK.integer),firstName:h.gK.maybeNull(h.gK.string),lastName:h.gK.maybeNull(h.gK.string)}).views((e=>({get displayName(){return e.firstName||e.lastName?`${e.firstName} ${e.lastName}`:""}}))),["id"]),oP=h.gK.model({regionId:h.gK.maybe(h.gK.string),controlName:h.gK.maybe(h.gK.string)}).views((e=>({get annotation(){return(0,h.PA)(e).annotation},get region(){return e.annotation.regions.find((t=>t.cleanId===e.regionId))},get result(){return e.controlName&&e.region?e.region.results.find((t=>t.from_name.name===e.controlName)):null},get overlayNode(){var t;return null!=(t=e.result)?t:e.region},get targetKey(){const t=[e.regionId];return(0,w.isDefined)(e.controlName)&&t.push(e.controlName),t.join("-")}}))).actions((e=>({serialize(){const t=e.toJSON();return(0,Yn.A)(t,rP)},setRegion(t){e.regionId=t.cleanId}}))),iP=h.gK.model("CommentBase",Object.assign({text:h.gK.string},isFF(O.v1)?{regionRef:h.gK.optional(h.gK.maybeNull(oP),null),classifications:h.gK.optional(h.gK.frozen({}),null)}:{})).views((e=>({get commentsStore(){try{return Te.getParentOfTypeString(e,"CommentStore")}catch(e){return null}},get annotation(){const t=(0,h._$)(e);if(null!=t&&t.annotationStore)return t.annotationStore.selected;const n=e.commentsStore;return null==n?void 0:n.annotation},get isHighlighted(){var t,n;const r=null==(t=e.commentsStore)||null==(t=t.highlightedComment)||null==(t=t.regionRef)?void 0:t.targetKey,o=null==(n=e.regionRef)?void 0:n.targetKey;return!!r&&r===o}}))).actions((e=>({setText(t){e.text=t},unsetLink(){e.regionRef=null},setRegionLink(t){e.regionRef={regionId:t.cleanId}},setClassifications(t){e.classifications=t},setResultLink(t){e.regionRef={regionId:t.area.cleanId,controlName:t.from_name.name}},setHighlighted(t=!0){const n=e.commentsStore;n&&(t?n.setHighlightedComment(e):e.isHighlighted&&n.setHighlightedComment(void 0))}}))),aP=iP.named("Comment").props({id:h.gK.identifierNumber,text:h.gK.string,createdAt:h.gK.optional(h.gK.string,rn.UDate.currentISODate()),updatedAt:h.gK.optional(h.gK.string,rn.UDate.currentISODate()),resolvedAt:h.gK.optional(h.gK.maybeNull(h.gK.string),null),createdBy:h.gK.optional(h.gK.maybeNull(h.gK.safeReference(nP)),null),isResolved:!1,isEditMode:h.gK.optional(h.gK.boolean,!1),isDeleted:h.gK.optional(h.gK.boolean,!1),isConfirmDelete:h.gK.optional(h.gK.boolean,!1),isUpdating:h.gK.optional(h.gK.boolean,!1)}).preProcessSnapshot((e=>(0,w.camelizeKeys)(null!=e?e:{}))).volatile((e=>({_commentRef:(0,p.createRef)()}))).views((e=>({get sdk(){return(0,h._$)(e).events},get isPersisted(){return e.id>0&&!e.isUpdating},get canResolveAny(){return(0,h.Zn)(e).interfaces.includes("comments:resolve-any")}}))).actions((e=>{const t=(0,h.L3)((function*(){if(e.isPersisted&&!e.isDeleted){e.isResolved=!e.isResolved;try{yield e.sdk.invoke("comments:update",{id:e.id,is_resolved:e.isResolved})}catch(t){throw e.isResolved=!e.isResolved,t}}}));const n=(0,h.L3)((function*(t,n=void 0){if(e.isPersisted&&!e.isDeleted){const r={id:e.id,text:t};void 0!==n&&(r.classifications=n),yield e.sdk.invoke("comments:update",r)}e.setEditMode(!1)})),r=(0,h.L3)((function*(t){if(e.isPersisted&&!e.isDeleted&&!e.isUpdating){e.isUpdating=!0;const[n]=yield e.sdk.invoke("comments:update",Object.assign({id:e.id},(0,w.snakeizeKeys)(t)));if(n.error)return void(e.isUpdating=!1);const r=(0,w.camelizeKeys)(n);(0,h.Nh)(e,r),e.isUpdating=!1}}));return{toggleResolve:t,setEditMode:function(t){e.isEditMode=t},setDeleted:function(t){e.isDeleted=t},setConfirmMode:function(t){e.isConfirmDelete=t},updateComment:n,update:r,deleteComment:(0,h.L3)((function*(){e.isPersisted&&!e.isDeleted&&e.isConfirmDelete&&(yield e.sdk.invoke("comments:delete",{id:e.id})),e.setDeleted(!0),e.setConfirmMode(!1)})),setRegionLink:function(t){const n={regionId:t.cleanId};e.update({regionRef:n})},unsetLink:function(){e.update({regionRef:null})},scrollIntoView:()=>{const t=e._commentRef.current;t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView({block:"center",behavior:"smooth"}))}}})),sP=h.gK.model("CommentStore",{loading:h.gK.optional(h.gK.maybeNull(h.gK.string),"list"),comments:h.gK.optional(h.gK.array(aP),[]),highlightedComment:h.gK.safeReference(aP)}).volatile((()=>({addedCommentThisSession:!1,commentFormSubmit:()=>{},currentComment:{},inputRef:{},tooltipMessage:"",commentsKey:null}))).views((e=>({get store(){return(0,h.PA)(e)},get task(){return(0,h.PA)(e).task},get annotationStore(){return(0,h.PA)(e).annotationStore},get annotation(){return e.annotationStore.selected},get annotationId(){var t;return isNaN(null==(t=e.annotation)?void 0:t.pk)?void 0:e.annotation.pk},get draftId(){var t;return null!=(t=e.annotation)&&t.draftId?e.annotation.draftId:null},get currentUser(){return(0,h.Zn)(e).user},get commentClassificationsItems(){return(e=>{if(!e)return[];const t=(new DOMParser).parseFromString(e,"application/xml"),n=[],r=(e,t=0,n=[])=>{const o=e.getAttribute("value")||"",i=[...n,o],a=[];return e.querySelectorAll(":scope > TaxonomyItem").forEach((e=>{a.push(r(e,t+1,i))})),{label:o,children:a.length?a:void 0,depth:t,path:i}},o=t.querySelector("Taxonomy");return o&&o.querySelectorAll(":scope > TaxonomyItem").forEach((e=>{n.push(r(e))})),n})((0,h.Zn)(e).commentClassificationConfig)},get sdk(){return(0,h._$)(e).events},get isListLoading(){return"list"===e.loading},get taskId(){var t;return null==(t=e.task)?void 0:t.id},get canPersist(){return(0,O.VS)(O.K3)?null!==e.taskId&&void 0!==e.taskId:null!==e.annotationId&&void 0!==e.annotationId},get isCommentable(){return!e.annotation||["annotation"].includes(e.annotation.type)},get queuedComments(){return e.comments.filter((e=>!e.isPersisted)).sort(((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()))},get hasUnsaved(){return e.queuedComments.length>0},get commentInProgress(){if(e.annotation)return e.currentComment[e.annotation.id]},get overlayComments(){const t=new Set;return e.comments.filter((e=>{const{regionRef:n}=e;return!!n&&(!t.has(n.targetKey)&&(t.add(n.targetKey),!0))}))},get isHighlighting(){return!!e.highlightedComment},get targetCommentsKey(){return e.annotationId?{annotation:e.annotationId}:e.draftId?{draft:e.draftId}:null},get isRelevantList(){return!(!e.commentsKey||!e.targetCommentsKey)&&(Object.keys(e.commentsKey).length===Object.keys(e.targetCommentsKey).length&&Object.keys(e.commentsKey).every((t=>e.commentsKey[t]===e.targetCommentsKey[t])))}}))).actions((e=>{const t=(0,h.L3)((function*(t){if("addComment"===e.loading)return;"string"==typeof t&&(t={text:t}),e.setLoading("addComment");const n=-1*Date.now(),r=Object.assign({},(0,w.snakeizeKeys)(t),{id:n,task:e.taskId,created_by:e.currentUser.id,created_at:rn.UDate.currentISODate()});let o=!1;const{annotation:i}=e;if(!(0,O.VS)(O.K3)||e.annotationId||e.draftId||(i.history.hasChanges&&!i.draftSaved?(i.saveDraftImmediately(),yield(0,u.z7)((()=>i.draftSaved))):(i.versions.draft=i.versions.result,i.setDraftSelected(),i.setDraftSaving(!0),yield e.store.submitDraft(e.annotation),i.onDraftSaved()),o=!0),e.annotationId&&(r.annotation=e.annotationId),e.draftId&&(r.draft=e.draftId),e.comments.unshift(r),e.setAddedCommentThisSession(!0),e.canPersist)try{const[t]=yield e.sdk.invoke("comments:create",r);t&&(e.replaceId(n,t),e.setCurrentComment(void 0),o&&e.listComments())}catch(t){throw e.removeCommentById(n),t}finally{e.setLoading(null)}else e.setLoading(null)})),n=(0,h.L3)((function*(){e.currentComment&&(yield t(e.currentComment))}));const r=(0,h.L3)((function*({mounted:t={current:!0},suppressClearComments:n}={}){if(n||e.setComments([]),e.draftId||e.annotationId)try{t.current&&e.setLoading("list");const n=e.annotationId,r=e.targetCommentsKey,[o]=yield e.sdk.invoke("comments:list",{annotation:n,draft:e.draftId});t.current&&n===e.annotationId&&e.setComments(o,r)}catch(e){console.error(e)}finally{t.current&&e.setLoading(null)}}));return{serialize:function({commentsFilter:t,queueComments:n}={commentsFilter:"all",queueComments:!1}){const r=(0,h.dV)("queued"===t?e.queuedComments:e.comments);return{comments:n?r.map((e=>Object.assign({id:e.id>0?-1*e.id:e.id},e))):r}},hasCache:function(e){localStorage.getItem(`commentStore.${e}`)},removeCache:function(e){localStorage.removeItem(`commentStore.${e}`)},toCache:function(t,n={commentsFilter:"all",queueComments:!0}){localStorage.setItem(`commentStore.${t}`,JSON.stringify(e.serialize(n)))},fromCache:function(t,{merge:n=!0,queueRestored:r=!1}={}){const o=localStorage.getItem(`commentStore.${t}`);if(o){const t=JSON.parse(o);if(Array.isArray(null==t?void 0:t.comments)){let o=[];r&&(o=t.comments.map((e=>e.id))),n&&(t.comments=QT()([...t.comments,...(0,h.dV)(e.comments)],"id").sort(((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()))),o.length&&(t.comments=t.comments.map((e=>o.includes(e.id)?Object.assign({id:e.id>0?-1*e.id:e.id},e):e))),e.setComments(t.comments)}}},restoreCommentsFromCache:async function(t){e.fromCache(t,{merge:!0,queueRestored:!0})},setAddedCommentThisSession:function(t=!1){e.addedCommentThisSession=t},setCommentFormSubmit:function(t){e.commentFormSubmit=t},setInputRef:function(t){e.inputRef=t},setLoading:function(t=null){e.loading=t},setTooltipMessage:function(t){e.tooltipMessage=t},replaceId:function(t,n){const r=e.comments,o=r.findIndex((e=>e.id===t));if(o>-1){const e=(0,h.dV)(r[o]);r[o]=Object.assign({},e,{id:n.id||e.id})}},removeCommentById:function(t){const n=e.comments,r=n.findIndex((e=>e.id===t));r>-1&&n.splice(r,1)},persistQueuedComments:async function(){const t=e.queuedComments;if(e.canPersist&&t.length){!(0,O.VS)(O.K3)||e.annotationId||e.draftId||await e.store.submitDraft(e.annotation);try{e.setLoading("persistQueuedComments");for(const n of t){e.annotationId?n.annotation=e.annotationId:e.draftId?n.draft=e.draftId:n.task=e.taskId;const[t]=await e.sdk.invoke("comments:create",n);t&&e.replaceId(n.id,t)}}catch(e){console.error(e)}finally{e.setLoading(null)}}},setCurrentComment:function(t){e.currentComment=Object.assign({},e.currentComment,{[e.annotation.id]:t})},addCurrentComment:n,addComment:t,setComments:function(t,n=null){t&&(e.comments.replace(t),e.commentsKey=n)},listComments:r,setHighlightedComment:function(t){e.highlightedComment=t}}})),lP=h.gK.union(un,Vk,Zk,BT,qk,aO,fO,VE,TT,BT,NT,D_,GT);var cP,dP,uP;const hP=yr("RegionStore"),gP="outliner:sort",mP="outliner:sort-direction",pP="outliner:group",fP="regionstore:view",vP=h.gK.model({selected:h.gK.optional(h.gK.map(h.gK.safeReference(lP)),{}),drawingSelected:h.gK.optional(h.gK.map(h.gK.safeReference(lP)),{})}).views((e=>({get keys(){return Array.from(e.selected.keys())},get annotation(){return(0,h.PA)(e).annotation},get highlighted(){return 1===e.selected.size?e.selected.values().next().value:null},get size(){return e.selected.size},get list(){return Array.from(e.selected.values())},isSelected:t=>e.selected.has(t.id)}))).actions((e=>{const t=Y((()=>{e._updateResultsFromSelection()}),0);return{beforeUnselect(e){e.perRegionTags.forEach((e=>null==e.submitChanges?void 0:e.submitChanges()))},afterUnselect(e){null==e.afterUnselectRegion||e.afterUnselectRegion()},drawingSelect(t){e.drawingSelected.put(t)},drawingUnselect(){Array.from(e.drawingSelected.values()).forEach((t=>{e.drawingSelected.delete(t.id)}))},select(n){var r;e.selected.put(n),n.selectRegion&&n.selectRegion(),e.highlighted?(e.highlighted.perRegionTags.forEach((e=>null==e.updateFromResult?void 0:e.updateFromResult(void 0))),e.highlighted.labelingTags.forEach((e=>null==e.updateFromResult?void 0:e.updateFromResult(void 0))),t()):t(),null==(r=n.object)||null==r.afterRegionSelected||r.afterRegionSelected(n)},_updateResultsFromSelection(){e._updateResultsFromRegions(e.selected.values())},_updateResultsFromRegions(t){const n={},r={};Array.from(t).map((e=>{e.results.forEach((e=>{const t=e.from_name.name,o=n[t];void 0!==o?n[t]=e.mergeMainValue(o):(r[t]=e.from_name,n[t]=e.mainValue)}))})),e.annotation.unselectStates();for(const[e,t]of Object.entries(n)){const n=r[e];null==n.updateFromResult||n.updateFromResult(t)}},unselect(t){e.beforeUnselect(t),e.selected.delete(t.id),e.afterUnselect(t)},clear(){const t=[...e.selected.values()];for(const n of t)e.beforeUnselect(n);e.selected.clear();for(const n of t)e.afterUnselect(n)},highlight(t){e.clear(),e.select(t)}}})),yP=h.gK.model("RegionStore",{sort:h.gK.optional(h.gK.enumeration(["date","score"]),null!=(cP=window.localStorage.getItem(gP))?cP:"date"),sortOrder:h.gK.optional(h.gK.enumeration(["asc","desc"]),null!=(dP=window.localStorage.getItem(mP))?dP:"asc"),group:h.gK.optional(h.gK.enumeration(["type","label","manual"]),(()=>{var e;return null!=(e=window.localStorage.getItem(pP))?e:"manual"})),filter:h.gK.maybeNull(h.gK.array(h.gK.safeReference(lP)),null),view:h.gK.optional(h.gK.enumeration(["regions","labels"]),null!=(uP=window.localStorage.getItem(fP))?uP:"regions"),selection:h.gK.optional(vP,{})}).views((e=>{let t;const n=n=>(r,o)=>{if(r.shiftKey){const r=((e,n)=>{const r=[];let o=0;return D.traverseTree({children:n},(n=>{if(n.isArea)return n.item!==t&&n.item!==e&&1!==o||(n.item&&r.push(n.item),n.item===t&&++o,n.item===e&&++o),o>=2?T:void 0})),r})(o,n);return r.forEach((t=>{e.selection.select(t)})),void(t=null)}t=o,r.metaKey||r.ctrlKey?e.toggleSelection(o):e.selection.highlighted!==o?e.highlight(o):e.clearSelection()};return{get annotation(){return(0,h.PA)(e)},get classifications(){const t=Array.from(e.annotation.names.values()).filter((e=>(0,w.isDefined)(e))).filter((e=>"textarea"===e.type&&!e.perregion)).map((e=>e.regions));return[].concat(...t)},get regions(){return Array.from(e.annotation.areas.values()).filter((e=>!e.classification))},get filteredRegions(){return e.filter||e.regions},get suggestions(){return Array.from(e.annotation.suggestions.values()).filter((e=>!e.classification))},get isAllHidden(){return!e.regions.find((e=>!e.hidden))},get sortedRegions(){return{date:t=>[...e.filteredRegions].sort(t?(e,t)=>t.ouid-e.ouid:(e,t)=>e.ouid-t.ouid),score:t=>[...e.filteredRegions].sort(t?(e,t)=>t.score-e.score:(e,t)=>e.score-t.score)}[e.sort]("desc"===e.sortOrder)},getRegionsTree:t=>null===e.group||"manual"===e.group?e.asTree(t):"label"===e.group?e.asLabelsTree(t):"type"===e.group?e.asTypeTree(t):void console.error(`Grouping by ${e.group} is not implemented`),asTree(t){const r=e.sortedRegions,o=[],i=new Map,a=n(o);return r.forEach(((e,n)=>{const r=t(e,n,a);Object.assign(r,{item:e,children:[],isArea:!0}),i.set(e.cleanId,r)})),i.forEach((e=>{var t;const n=e.item.parentID,r=n?null!=(t=i.get(n))?t:i.get(n.replace(/#(.+)/i,"")):null;if(r)return r.children.push(e);o.push(e)})),o},asLabelsTree(t){const r={},o=[],i=n(o);let a=0;const s=(e,n,o)=>{var s;const l=((e,n)=>{const o=r[n];return o||(r[n]=Object.assign({},t(e,a,!0),{id:n,isGroup:!0,isNotLabel:!0,children:[]}))})(n,e),c=l.id,d=null==(s=(e=>{var t;return(null==(t=e.labeling)?void 0:t.selectedLabels)||e.emptyLabel&&[e.emptyLabel]})(o))||null==(s=s[0])?void 0:s.hotkey;(0,O.VS)(O.TU)&&(l.hotkey=d,l.pos=c.slice(0,c.indexOf("#"))),l.children.push(Object.assign({},t(o,a,!1,null,i,c),{item:o,isArea:!0}))},l=(e,t)=>{if(e)for(const n of e)s(`${n.value}#${n.id}`,n,t);else s("no-label",void 0,t)};for(const t of e.regions){var c;l(null==(c=t.labeling)?void 0:c.selectedLabels,t),a++}const d=Object.values(r);return(0,O.VS)(O.TU)&&d.sort(((e,t)=>e.hotkey>t.hotkey?1:e.hotkey{const n=((e,n)=>{const o=r[n];if(o)return o;const i={type:"tool",value:n.replace("region",""),background:"#000"};return r[n]=Object.assign({},t(i,a,!0),{id:n,key:n,isArea:!1,children:[],isGroup:!0,entity:e})})(e,e.type);n.children.push(Object.assign({},t(e,a,!1,null,i),{item:e,isArea:!0}))};for(const t of e.regions)s(t),a++;return o.push(...Object.values(r)),o},get hasSelection(){return!!e.selection.size},isSelected:t=>e.selection.isSelected(t),get selectedIds(){return Array.from(e.selection.selected.values()).map((e=>e.id))},get persistantView(){var t;return null!=(t=window.localStorage.getItem(fP))?t:e.view}}})).actions((e=>({addRegion(t){e.regions.push(t),(0,h._$)(e).events.invoke("entityCreate",t)},toggleSortOrder(){"asc"===e.sortOrder?e.sortOrder="desc":e.sortOrder="asc"},setView(t){(0,O.VS)(O.TU)&&window.localStorage.setItem(fP,t),e.view=t},setSort(t){e.sort===t?e.toggleSortOrder():(e.sortOrder="asc",e.sort=t),window.localStorage.setItem(gP,e.sort),window.localStorage.setItem(mP,e.sortOrder),e.initHotkeys()},setGrouping(t){e.group=t,window.localStorage.setItem(pP,e.group)},setFilteredRegions(t){if(e.regions.length===t.length)e.filter=null,e.regions.forEach((e=>e.filtered&&e.toggleFiltered()));else{const n=t.map((e=>e.id));e.filter=t,e.regions.forEach((e=>{!e.hideable||e.hidden&&!e.filtered||(n.includes(e.id)?e.hidden&&e.toggleFiltered():e.hidden||e.toggleFiltered())}))}},deleteRegion(t){(0,h.Yo)(t);const n=e.filterByParentID(t.id);n&&n.forEach((e=>e.setParentID(t.parentID))),(0,h._$)(e).events.invoke("entityDelete",t),(0,h.zr)(t),e.initHotkeys()},findRegionID:t=>e.regions.find((e=>e.id===t)),findRegion:t=>e.regions.find((e=>e.id===t)),filterByParentID:t=>e.regions.filter((e=>e.parentID===t)),afterCreate(){var t;(0,h.k4)(e,(t=>{"add"!==t.op&&"delete"!==t.op||-1===t.path.indexOf("/regions/")||e.initHotkeys()})),e.view=null!=(t=window.localStorage.getItem(fP))?t:e.annotation.store.settings.displayLabelsByDefault?"labels":"regions"},initHotkeys(){hP.unbindAll(),e.sortedRegions.forEach(((t,n)=>{hP.addKey("alt+shift+"+(n+1),(()=>{e.unselectAll(),t.selectRegion()}))})),hP.addKey("alt+shift+$n",(()=>{}),"Select a region")},unselectAll(){e.annotation.unselectAll()},unhighlightAll(){e.regions.forEach((e=>e.setHighlight(!1)))},selectNext(){const{regions:t}=e,n=e.regions.findIndex((e=>e.selected));if(n<0){const n=t[0];n&&e.annotation.selectArea(n)}else{const r=(0,w.isDefined)(t[n+1])?t[n+1]:t[0];r&&e.annotation.selectArea(r)}},toggleVisibility(){const t=!e.isAllHidden;e.regions.forEach((e=>{e.hidden!==t&&e.toggleHidden()}))},setHiddenByTool(t,n){e.regions.forEach((e=>{e.hidden!==t&&e.type===n.type&&e.toggleHidden()}))},setHiddenByLabel(t,n){e.regions.forEach((e=>{if(e.hidden!==t){const t=e.labeling;if(t){t.selectedLabels.includes(n)&&e.toggleHidden()}}}))},highlight(t){e.selection.highlight(t)},clearSelection(){e.selection.clear()},selectRegionsByIds(t){e.regions.map((n=>{-1!==t.indexOf(n.id)&&e.toggleSelection(n,!0)}))},toggleSelection(t,n){(0,w.isDefined)(n)||(n=!e.selection.isSelected(t)),n?e.selection.select(t):e.selection.unselect(t)}})));var bP;const xP="relations:order",wP=h.gK.model("Relation",{id:h.gK.optional(h.gK.identifier,E),node1:h.gK.reference(qT),node2:h.gK.reference(qT),direction:h.gK.optional(h.gK.enumeration(["left","right","bi"]),"right"),labels:h.gK.maybeNull(h.gK.array(h.gK.string))}).volatile((()=>({showMeta:!1,visible:!0}))).views((e=>({get parent(){return(0,h.k2)(e,CP)},get control(){return e.parent.control},get selectedValues(){var t;return null==(t=e.labels)?void 0:t.filter((t=>{var n;return null==(n=e.control)?void 0:n.values.includes(t)}))},get hasRelations(){var t;return(null==(t=e.control)||null==(t=t.children)?void 0:t.length)>0},get shouldRender(){if(!(0,h._n)(e))return!1;const{node1:t,node2:n}=e,[r,o]=[t.item_index,n.item_index];return(!(0,w.isDefined)(r)||!t.object.multiImage||r===t.object.currentImage)&&(!(0,w.isDefined)(o)||!n.object.multiImage||o===n.object.currentImage)}}))).actions((e=>({rotateDirection(){const t=["left","right","bi"];let n=t.findIndex((t=>t===e.direction));n+=1,n>=t.length&&(n=0),e.direction=t[n]},toggleHighlight(){e.node1===e.node2?e.node1.toggleHighlight():(e.node1.toggleHighlight(),e.node2.toggleHighlight())},toggleMeta(){e.showMeta=!e.showMeta},setSelfHighlight(t=!1){t?e.parent.setHighlight(e):e.parent.removeHighlight()},toggleVisibility(){e.visible=!e.visible},setRelations(t){e.labels=t}}))),CP=h.gK.model("RelationStore",{relations:h.gK.array(wP),order:h.gK.optional(h.gK.enumeration(["asc","desc"]),null!=(bP=window.localStorage.getItem(xP))?bP:"asc")}).volatile((()=>({showConnections:!0,_highlighted:null,control:null}))).views((e=>({get highlighted(){return e.relations.find((t=>t.id===e._highlighted))},get size(){return e.relations.length},get orderedRelations(){return e.relations?"asc"===e.order?e.relations.slice():e.relations.slice().reverse():[]},get isAllHidden(){return!e.relations.find((e=>!e.visible))},get values(){var t,n;return null!=(t=null==(n=e.control)?void 0:n.values)?t:[]}}))).actions((e=>({afterAttach(){const t=(0,h.Zn)(e);let n=null;D.traverseTree(t.annotationStore.root,(e=>{if("relations"===e.type)return n=e,A})),e.setControl(n)},setControl(t){e.control=t},findRelations(t,n){const r=t.id||t,o=(null==n?void 0:n.id)||n;return o?e.relations.filter((e=>e.node1.id===r&&e.node2.id===o)):e.relations.filter((e=>e.node1.id===r||e.node2.id===r))},nodesRelated:(t,n)=>e.findRelations(t,n).length>0,addRelation(t,n){if(e.nodesRelated(t,n))return;const r=wP.create({node1:t,node2:n});return e.relations.push(r),r},deleteRelation(t){e.relations=e.relations.filter((e=>e.id!==t.id)),(0,h.zr)(t)},deleteNodeRelation(t){const n=e.findRelations(t);n.length&&n.forEach(e.deleteRelation)},deleteAllRelations(){e.relations.forEach((e=>(0,h.zr)(e))),e.relations=[]},serialize:()=>e.relations.map((e=>{const t={from_id:e.node1.cleanId,to_id:e.node2.cleanId,type:"relation",direction:e.direction};return e.selectedValues&&(t.labels=e.selectedValues),t})),deserializeRelation(t,n,r,o){const i=e.addRelation(t,n);i&&(i.direction=r,i.labels=o)},toggleConnections(){e.showConnections=!e.showConnections},toggleOrder(){e.order="asc"===e.order?"desc":"asc",window.localStorage.setItem(xP,e.order)},toggleAllVisibility(){const t=!e.isAllHidden;e.relations.forEach((e=>{e.visible!==t&&e.toggleVisibility()}))},setHighlight(t){e._highlighted=t.id},removeHighlight(){e._highlighted=null}}))),SP=CP,jP=["id","value","type"],kP=yr("Annotations","Annotations");const OP=h.gK.model("TrackedState",{areas:h.gK.map(qT),relationStore:h.gK.optional(SP,{})}),RP=h.gK.model("AnnotationBase",Object.assign({id:h.gK.identifier,pk:h.gK.maybeNull(h.gK.string),selected:h.gK.optional(h.gK.boolean,!1),type:h.gK.enumeration(["annotation","prediction","history"]),createdDate:h.gK.optional(h.gK.string,rn.UDate.currentISODate()),createdAgo:h.gK.maybeNull(h.gK.string),createdBy:h.gK.optional(h.gK.string,"Admin"),user:h.gK.optional(h.gK.maybeNull(h.gK.safeReference(nP)),null),parent_prediction:h.gK.maybeNull(h.gK.integer),parent_annotation:h.gK.maybeNull(h.gK.integer),last_annotation_history:h.gK.maybeNull(h.gK.integer),comment_count:h.gK.maybeNull(h.gK.integer),unresolved_comment_count:h.gK.maybeNull(h.gK.integer),loadedDate:h.gK.optional(h.gK.Date,(()=>new Date)),leadTime:h.gK.maybeNull(h.gK.number),draftSaved:h.gK.maybe(h.gK.string),userGenerate:h.gK.optional(h.gK.boolean,!0),sentUserGenerate:h.gK.optional(h.gK.boolean,!1),localUpdate:h.gK.optional(h.gK.boolean,!1),ground_truth:h.gK.optional(h.gK.boolean,!1),skipped:!1,trackedState:h.gK.optional(OP,{}),history:h.gK.optional(ET,{targetPath:"../trackedState"}),dragMode:h.gK.optional(h.gK.boolean,!1),editable:h.gK.optional(h.gK.boolean,!0),readonly:h.gK.optional(h.gK.boolean,!1),suggestions:h.gK.map(qT),regionStore:h.gK.optional(yP,{regions:[]}),isDrawing:h.gK.optional(h.gK.boolean,!1),commentStore:h.gK.optional(sP,{comments:[]})},(0,O.VS)(O.cE)?{root:Te.allModelsTypes()}:{})).views((e=>({get areas(){return e.trackedState.areas},get relationStore(){return e.trackedState.relationStore}}))).preProcessSnapshot((e=>{var t,n,r,o,i,a,s;let l,c=null!=(t=null!=(n=e.user)?n:e.completed_by)?t:void 0;const d=t=>{var n,r;const o=null==(n=t.children)?void 0:n.map(d);return o&&(t=Object.assign({},t,{children:o})),t.id&&(t=Object.assign({},t,{id:`${null!=(r=t.name)?r:t.id}@${e.id}`})),t};return(0,O.VS)(O.cE)&&(l=d(e.root.toJSON())),c&&"number"!=typeof c&&(c=c.id),Object.assign({},e,(0,O.VS)(O.cE)?{root:l}:{},{user:c,editable:null!=(r=e.editable)?r:"annotation"===e.type,ground_truth:null!=(o=null!=(i=e.honeypot)?i:e.ground_truth)&&o,skipped:e.skipped||e.was_cancelled,acceptedState:null!=(a=null!=(s=e.accepted_state)?s:e.acceptedState)?a:null})})).views((e=>(0,O.VS)(O.cE)?{}:{get root(){return e.list.root},get names(){return e.list.names},get toNames(){return e.list.toNames}})).views((e=>({get store(){return(0,h.Zn)(e)},get list(){return(0,h.PA)(e,2)},get objects(){return Array.from(e.names.values()).filter((e=>e.isObjectTag))},get regions(){return Array.from(e.areas.values())},get lastSelectedRegion(){return e.selectedRegions[e.selectedRegions.length-1]},get results(){const t=[];return(0,h._n)(e)&&e.areas.forEach((e=>e.results.forEach((e=>t.push(e))))),t},get serialized(){return e.areas.toJSON(),e.results.map((e=>e.serialize())).filter(Boolean).concat(e.relationStore.serialize())},get serializedSelection(){e.areas.toJSON();const t=[];return e.areas.forEach((e=>{e.inSelection&&e.results.forEach((e=>{t.push(e)}))})),t.map((e=>e.serialize())).filter(Boolean)},get highlightedNode(){return e.regionStore.selection.highlighted},get hasSelection(){return e.regionStore.hasSelection},get selectionSize(){return e.regionStore.selection.size},get selectedRegions(){return Array.from(e.regionStore.selection.selected.values())},get selectedDrawingRegions(){return Array.from(e.regionStore.selection.drawingSelected.values())},get exists(){const t=e.userGenerate&&e.sentUserGenerate||(0,w.isDefined)(e.versions.result),n=(0,w.isDefined)(e.pk);return t&&n},get hasSuggestionsSupport(){return e.objects.some((e=>e.supportSuggestions))},isReadOnly:()=>e.readonly||!e.editable}))).volatile((()=>({hidden:!1,draftId:0,draftSelected:!1,autosaveDelay:5e3,isDraftSaving:!1,isSuggestionsAccepting:!1,submissionStarted:0,versions:{},resultSnapshot:""}))).volatile((()=>(0,O.VS)(O.cE)?{names:new Map,toNames:new Map,ids:new Map}:{})).views((e=>({get canBeReviewed(){var t,n,r;const o=e.store;return(0,O.VS)(O.I8)&&(null==(t=e.user)?void 0:t.email)&&(null==(n=o.user)?void 0:n.email)!==(null==(r=e.user)?void 0:r.email)&&(0,h._$)(e).events.hasEvent("acceptAnnotation")&&o.hasInterface("annotations:view-all")&&!isNaN(e.pk)}}))).actions((e=>({reinitHistory(t=!0){e.history.reinit(t),e.autosave&&e.autosave.cancel(),"annotation"===e.type&&e.setInitialValues()},setEdit(t){e.editable=t},setReadonly(t){e.readonly=t},setIsDrawing(t){e.isDrawing=t},setUnresolvedCommentCount(t){e.unresolved_comment_count=t},setCommentCount(t){e.comment_count=t},setGroundTruth(t,n=!0){const r=(0,h.Zn)(e);if(r&&r!==e&&n){const t=r.annotationStore,n=t=>{e!==t&&t.setGroundTruth(!1,!1)};t.predictions.forEach(n),t.annotations.forEach(n)}e.ground_truth=t,n&&(0,h._$)(e).events.invoke("groundTruth",e.store,e,t)},sendUserGenerate(){e.sentUserGenerate=!0},setLocalUpdate(t){e.localUpdate=t},setDragMode(t){e.dragMode=t},updatePersonalKey(t){var n,r;e.pk=t,null==(n=(r=(0,h.Zn)(e)).addAnnotationToTaskHistory)||n.call(r,e.pk)},toggleVisibility(t){e.hidden=void 0===t?!e.hidden:!t},setHighlightedNode(){},selectArea(t){e.highlightedNode!==t&&e.regionStore.highlight(t)},toggleRegionSelection(t,n){e.regionStore.toggleSelection(t,n)},selectAreas(t){e.unselectAreas(),e.extendSelectionWith(t)},extendSelectionWith(t){for(const n of Array.isArray(t)?t:[t])e.regionStore.toggleSelection(n,!0)},unselectArea(t){e.highlightedNode===t&&e.regionStore.toggleSelection(t,!1)},unselectAreas(){e.selectionSize&&e.regionStore.clearSelection()},hideSelectedRegions(){e.selectedRegions.forEach((e=>{e.toggleHidden()}))},deleteSelectedRegions(){e.selectedRegions.forEach((e=>{e.deleteRegion()}))},unselectStates(){e.names.forEach((e=>e.unselectAll&&e.unselectAll()))},unselectAll(t=!1){const n=t&&e.store.settings.continuousLabeling;e.unselectAreas(),n||e.unselectStates()},removeArea(e){(0,h.zr)(e)},deleteAllRegions({deleteReadOnly:t=!1}={}){let n=Array.from(e.areas.values());if(t)return e.unselectAll(!0),e.setIsDrawing(!1),e.relationStore.deleteAllRelations(),n.forEach((e=>{null==e.destroyRegion||e.destroyRegion(),(0,h.zr)(e)})),void e.updateObjects();!1===t&&(n=n.filter((e=>!1===e.readonly))),n.forEach((e=>e.deleteRegion())),e.updateObjects()},addRegion(t){e.regionStore.unselectAll(!0),e.isLinkingMode&&(e.addLinkedRegion(t),e.stopLinkingMode())},unloadRegionState(t){t.states&&t.states.forEach((t=>{const n=e.names.get(t.name);n.unselectAll&&n.unselectAll(),n.perRegionCleanup&&n.perRegionCleanup()}))},validate(){var t;let n=!0;return e.traverseTree((e=>{if(n=null==e.validate?void 0:e.validate(),!1===n)return T})),null==(t=n)||t},traverseTree:t=>D.traverseTree(e.root,t),beforeSend(){e.traverseTree((e=>{e&&e.beforeSend&&e.beforeSend()})),e.stopLinkingMode(),e.unselectAll()},deleteRegion(t){if(t.isReadOnly())return;const{regions:n}=e.regionStore,r=n.filter((e=>e.parentID===t.id));r&&r.forEach((e=>e.setParentID(t.parentID))),t.classification||(0,h._$)(e).events.invoke("entityDelete",t),e.relationStore.deleteNodeRelation(t),"polygonregion"===t.type&&(0,h.Yo)(t),(0,h.zr)(t),e.setIsDrawing(!1)},deleteArea(e){(0,h.zr)(e)},undo(){const{history:t,regionStore:n}=e;if(t&&t.canUndo){var r,o;let s=!1;const l=n.selectedIds,c=n.findRegion(null!=(r=l[l.length-1])?r:null==(o=n.regions[n.regions.length-1])?void 0:o.id);if("polygonregion"===(null==c?void 0:c.type)){var i,a;s=(null!=(i=null==c||null==(a=c.points)?void 0:a.length)?i:0)<=1}t.undo(),n.selectRegionsByIds(l),s&&(c.setDrawing(!1),e.setIsDrawing(!1))}},redo(){const{history:t,regionStore:n}=e;if(t&&t.canRedo){const e=n.selectedIds;t.redo(),n.selectRegionsByIds(e)}},updateObjects(t=!0){if(t&&e.unselectAll(),e.names.forEach((e=>e.needsUpdate&&e.needsUpdate())),e.areas.forEach((e=>e.updateAppearenceFromState&&e.updateAppearenceFromState())),(0,O.VS)(O.vz)){const t=Array.from(e.areas.values()).filter((e=>e.isDrawing));e.regionStore.selection._updateResultsFromRegions(t)}},setInitialValues(){e.names.forEach((e=>{if(e.type.endsWith("labels")){var t;const n=null==(t=e.children)?void 0:t.find((e=>e.initiallySelected));n&&n.setSelected(!0)}}))},setDefaultValues(){e.names.forEach((t=>{var n;["choices","taxonomy"].includes(null==t?void 0:t.type)&&null!=(n=t.preselectedValues)&&n.length&&e.createResult({},{[null==t?void 0:t.type]:t.preselectedValues},t,t.toname)}))},addVersions(t){e.versions=Object.assign({},e.versions,t),t.draft&&e.setDraftSelected()},toggleDraft(t){const n=e.draftSelected,r=null!=t?t:!n;r!==n&&(r&&!e.versions.draft||(e.autosave.flush(),e.pauseAutosave(),e.deleteAllRegions({deleteReadOnly:!0}),r?e.deserializeResults(e.versions.draft):e.deserializeResults(e.versions.result),e.draftSelected=r,e.updateObjects(),e.startAutosave()))},startAutosave:(0,h.L3)((function*(){if((0,h._$)(e).events.hasEvent("submitDraft")&&!e.isReadOnly()){if(yield(0,w.delay)(0),e.autosave)return e.autosave.cancel(),void(e.autosave.paused=!1);e.autosave=In()((()=>{e.autosave.paused||e.saveDraft()}),e.autosaveDelay,{leading:!1}),(0,h.aQ)(e.areas,e.autosave)}})),async saveDraft(t){if(e.submissionStarted)return;if(!e.editable)return;const n=e.serializeAnnotation({fast:!0});return(0,O.VS)(O.yP)||e.pk||n.length?(e.setDraftSelected(),e.versions.draft=n,e.setDraftSaving(!0),e.store.submitDraft(e,t).then((t=>(e.onDraftSaved(t),t)))):void 0},submissionInProgress(){e.submissionStarted=Date.now()},saveDraftImmediately(){e.autosave&&e.autosave.flush()},async saveDraftImmediatelyWithResults(t){if(e.submissionStarted||e.isDraftSaving)return{};e.setDraftSaving(!0);return await e.saveDraft(t)},pauseAutosave(){e.autosave&&(e.autosave.paused=!0,e.autosave.cancel())},beforeDestroy(){e.autosave&&e.autosave.cancel&&e.autosave.cancel()},setDraftId(t){e.draftId=t},setDraftSelected(t=!0){e.draftSelected=t},onDraftSaved(){e.setDraftSaved(rn.UDate.currentISODate()),e.setDraftSaving(!1)},dropDraft(){e.autosave&&(e.autosave.cancel(),e.draftId=0,e.draftSelected=!1,e.draftSaved=void 0,e.versions.draft=void 0)},setDraftSaving(t=!1){e.isDraftSaving=t},setDraftSaved(t){e.draftSaved=t},afterAttach(){e.traverseTree((e=>{e.annotationAttached&&e.annotationAttached()})),e.history.onUpdate(e.updateObjects),e.startAutosave()},afterCreate(){if((0,O.VS)(O.cE)){const{names:t,toNames:n}=D.extractNames(e.root);t.forEach(((t,n)=>e.names.set(n,t))),n.forEach(((t,n)=>e.toNames.set(n,t))),D.traverseTree(e.root,(t=>{var n;const r=null!=(n=t.id)?n:t.name;r&&e.ids.set(D.cleanUpId(r),t),e.store.task&&t.updateValue&&t.updateValue(e.store)}))}e.userGenerate&&!e.sentUserGenerate&&(e.loadedDate=new Date)},setupHotKeys(){kP.unbindAll();let t=0,n=null;const r="shift+space";let o=r;e.traverseTree((e=>{e&&e.onHotKey&&e.hotkey&&kP.addKey(e.hotkey,e.onHotKey,void 0,e.hotkeyScope)})),e.traverseTree((e=>{!e||e.hotkey||"audio"!==e.type&&"audioplus"!==e.type||(t>0?o=`${r}+${t+1}`:n=e,e.hotkey=o,kP.addKey(o,e.onHotKey,"Play an audio",`${yr.DEFAULT_SCOPE},${yr.INPUT_SCOPE}`),t++)})),e.traverseTree((e=>{if(e&&e.onHotKey&&!e.hotkey){const t=kP.makeComb();if(!t)return;e.hotkey=t,kP.addKey(e.hotkey,e.onHotKey)}})),n&&t>1&&(n.hotkey=`${r}+1`,kP.addKey(n.hotkey,n.onHotKey),kP.removeKey(r)),yr.setScope(yr.DEFAULT_SCOPE)},createResult(t,n,r,o,i=!1){var a,s;o||"textarea"!==r.type||(o=e.objects[0]);const l=e.names.get(null!=(a=o.name)?a:o),c={from_name:e.names.get(r.name),to_name:l,type:r.resultType,value:n,readonly:e.readonly},d=Object.assign({id:E(),object:l},t,{value:t,results:[c]}),u=null==e||null==(s=e.areas)?void 0:s.put(d);if(null==l||null==l.afterResultCreated||l.afterResultCreated(u),u)return u.classification||(0,h._$)(e).events.invoke("entityCreate",u),i||e.afterCreateResult(u,r),u},afterCreateResult(t,n){e.store.settings.selectAfterCreate?t.classification||setTimeout((()=>(0,h._n)(t)&&e.selectArea(t))):n.isLabeling&&e.unselectAll(!0)},appendResults(t){if(!e.editable||e.readonly)return;const n={},r=e.regionStore.regions.length;return t.forEach((e=>{const t=e.id;n[t]||(n[t]=E()),e.id=n[t]})),e.deserializeResults(t),e.updateObjects(),e.regionStore.regions.slice(r)},serializeAnnotation(t){document.body.style.cursor="wait";const n=e.results.map((e=>e.serialize(t))).filter(Boolean).concat(e.relationStore.serialize(t));return document.body.style.cursor="default",n},fixBrokenAnnotation:t=>(null!=t?t:[]).reduce(((t,n)=>{var r;const o=null!=(r=structuredClone(n))?r:{};if("relation"===o.type)return t.push(n),t;"htmllabels"===o.type&&(o.type="hypertextlabels"),o.normalization&&(o.meta=Object.assign({},o.meta,{text:[o.normalization]}));const i=e.names;if(o.type.endsWith("labels")){const t=Object.keys(o.value);for(let n of t)if(n.endsWith("labels")){const t=i.has(o.from_name)||i.has("labels");if(!(0,O.VS)(O.TJ)&&t){var a;const e=null!=(a=i.get(o.from_name))?a:i.get("labels"),t=o.value[n];if(t&&t.length&&e.type.endsWith("labels")){const r=t.filter((t=>!!e.findLabel(t))),i=n;n=n===e.type?n:e.type,i!==n&&(o.type=n,o.value[n]=o.value[i],delete o.value[i]),r.length!==t.length&&(o.value[n]=r)}}if((!i.has(o.from_name)||!o.value[n].length&&!i.get(o.from_name).allowempty)&&(delete o.value[n],i.has(o.to_name))){const t=i.get(o.to_name),n=e.toNames.get(t.name);if(null!=n&&n.length){const e=o.type.replace(/labels$/,""),t=o.type,r="labels";for(const i of[e,t,r]){const e=n.find((e=>e.type===i));if(e){o.type=i,o.from_name=e.name;break}}}}}}return i.has(o.from_name)&&i.has(o.to_name)&&t.push(o),(e=>{if(!(0,w.isDefined)(o.original_width))return;if(!i.has(o.to_name))return;const t=i.get(o.to_name);if("image"!==t.type)return;const n=t.findImageEntity(null!=(e=o.item_index)?e:0);n&&!n.imageLoaded&&(n.setNaturalWidth(o.original_width),n.setNaturalHeight(o.original_height))})(),t}),[]),setSuggestions(t){const{history:n}=e;e.suggestions.clear(),t&&(e.deserializeResults(t,{suggestions:!0}),e.isSuggestionsAccepting=!0,(0,h.Zn)(e).autoAcceptSuggestions?((0,O.VS)(O.$b)&&e.history.setReplaceNextUndoState(!0),e.acceptAllSuggestions()):e.suggestions.forEach((t=>{t.supportSuggestions||(e.acceptSuggestion(t.id),(0,O.VS)(O.$b)&&n.setReplaceNextUndoState(!0))})),e.isSuggestionsAccepting=!1,(0,O.VS)(O.$b)||n.freeze("richtext:suggestions"),e.names.forEach((e=>null==e.needsUpdate?void 0:e.needsUpdate({suggestions:!0}))),(0,O.VS)(O.$b)||(n.setReplaceNextUndoState(!0),n.unfreeze("richtext:suggestions")))},cleanClassificationAreas(){const t={},n=[];e.areas.forEach((e=>{const r=e.results[0].from_name.name,o=e.item_index;var i;e.classification&&(null!=(i=t[r])&&i[o]&&n.push(t[r][o]),t[r]=t[r]||{},t[r][o]=e.id)})),n.forEach((t=>e.areas.delete(t)))},deserializeResults(t,{suggestions:n=!1,hidden:r=!1}={}){try{const o=e.prepareAnnotation(t),i=n?e.suggestions:e.areas;e._initialAnnotationObj=o,o.forEach((t=>{e.deserializeSingleResult(t,(e=>i.get(e)),(e=>i.put(e)))})),e.cleanClassificationAreas(),!r&&e.results.filter((e=>e.area.classification)).forEach((e=>null==e.from_name.updateFromResult?void 0:e.from_name.updateFromResult(e.mainValue))),o.forEach((t=>{"relation"===t.type&&e.relationStore.deserializeRelation(`${t.from_id}#${e.id}`,`${t.to_id}#${e.id}`,t.direction,t.labels)}))}catch(t){console.error(t),e.list.addErrors([Kj.generalError(t)])}},deserializeAnnotation:(...t)=>(console.warn("deserializeAnnotation() is deprecated. Use deserializeResults() instead"),e.deserializeResults(...t)),prepareAnnotation(t){var n;let r=t;return"object"!=typeof r&&(r=JSON.parse(r)),r=e.fixBrokenAnnotation(null!=(n=r)?n:[]),r},deserializeSingleResult(t,n,r){if("relation"!==t.type){var o;const{id:a,value:s,type:l}=t,c=(0,Yn.A)(t,jP);let{from_name:d,to_name:u}=c;const h=null!=(o=e.names.get(c.to_name))?o:{},g=h.type,m=`${a||E()}#${e.id}`,p=`${c.from_name}@${m}`,f=e.prepareValue(s,g);(0,O.VS)(O.cE)&&(u=`${u}@${e.id}`,d=`${d}@${e.id}`);let v=n(m);if(!v){v=r(Object.assign({id:m,object:u},c,function(e){const t=Object.assign({},e);return st.properties.value.propertyNames.forEach((e=>{delete t[e]})),t}(f),{value:f})),(0,O.VS)(O.gF)&&Object.defineProperty(v,"_rawResult",{value:Object.freeze(structuredClone(t))})}const y=Object.assign({},c,{id:p,type:l,value:f,from_name:d,to_name:u});if(v.addResult(y),null==v.applyAdditionalDataFromResult||v.applyAdditionalDataFromResult(y),!l.endsWith("labels")&&f.labels&&h.mergeLabelsAndResults){const t=f.labels,n=e.toNames.get(h.name).filter((e=>e.type.endsWith("labels"))).find((e=>null==e?void 0:e.findLabel(t[0])));var i;if(n)v.setValue(n),null==(i=v.results.find((e=>e.type.endsWith("labels"))))||i.setValue(t)}}},prepareValue(e,t){switch(t){case"text":case"hypertext":case"richtext":{const t=(0,w.isDefined)(e.start)&&(0,w.isDefined)(e.end),n=!(0,w.isDefined)(e.startOffset)&&!(0,w.isDefined)(e.endOffset);if(t&&n)return Object.assign({},e,{start:"",end:"",startOffset:Number(e.start),endOffset:Number(e.end),isText:!0});break}default:return e}return e},acceptAllSuggestions(){Array.from(e.suggestions.keys()).forEach((t=>{e.acceptSuggestion(t)})),e.deleteAllDynamicregions((0,O.VS)(O.$b))},rejectAllSuggestions(){Array.from(e.suggestions.keys()).forEach((t=>{e.suggestions.delete(t)})),e.deleteAllDynamicregions((0,O.VS)(O.$b))},deleteAllDynamicregions(t=!1){e.regions.forEach((e=>{e.dynamic&&(t&&e.setDrawing(!0),e.deleteRegion())}))},acceptSuggestion(t){const n=e.suggestions.get(t);let r=t;const o=n.classification;if((0,O.VS)(O.jS))if(o){const t=n.results[0],o=e.areas.values();for(const e of o){const n=e.results[0];if(n.from_name===t.from_name&&n.to_name===t.to_name&&n.item_index===t.item_index){r=e.id;break}}}else{const t=e.areas.get(n.cleanId);t&&(r=t.id)}e.areas.set(r,Object.assign({},n.toJSON(),{id:r,fromSuggestion:!0}));const i=e.areas.get(r);i.object.activeStates().forEach((e=>{i.setValue(e)})),e.suggestions.delete(t)},rejectSuggestion(t){e.suggestions.delete(t)},resetReady(){e.objects.forEach((e=>e.setReady&&e.setReady(!1))),e.areas.forEach((e=>e.setReady&&e.setReady(!1)))}}))),EP=h.gK.compose("Annotation",U,RP),_P=["reg","box","frame","workingArea","selected","draggable","listening","onDragMove"],AP=(0,y.PA)((e=>{var t;let{reg:n,box:r,frame:o,workingArea:i,selected:a,draggable:s,listening:l,onDragMove:c}=e,d=(0,Yn.A)(e,_P);const u=Fk(n,{includeFill:!0}),{realWidth:h,realHeight:g,scale:m}=i,f=(0,p.useMemo)((()=>({x:r.x*h/100,y:r.y*g/100,width:r.width*h/100,height:r.height*g/100,rotation:r.rotation})),[r,h,g]),v=e=>{const t=e.target;"dragmove"===e.type&&c(e),n.updateShape(((e,t)=>{const{realWidth:n,realHeight:r}=t;return{x:e.x()/n*100,y:e.y()/r*100,width:e.width()/n*100,height:e.height()/r*100,rotation:e.rotation()}})(t,i),o)};return(0,_.jsxs)(pj.YJ,{children:[(0,_.jsx)(Ek,{reg:n,box:f,scale:m,color:u.strokeColor,strokeWidth:u.strokeWidth,adjacent:!0}),(0,_.jsx)(pj.rw,Object.assign({},f,{fill:null!=(t=u.fillColor)?t:"#fff",stroke:u.strokeColor,strokeScaleEnabled:!1,selected:a,draggable:s,listening:l,opacity:n.hidden?0:1,onTransform:e=>{((e,t)=>{const n=e.scaleX(),r=e.scaleY();"rect"===t&&(e.width(Math.max(jj.X,e.width()*n)),e.height(Math.max(jj.Y,e.height()*r)));e.scaleX(1),e.scaleY(1)})(e.target,"rect")},onTransformEnd:v,onDragMove:v,onDragEnd:v},d))]})})),TP=(e,t,n,r,o)=>{const i=Math.sqrt(n*n+r*r);o+=Math.atan2(r,n);return{x:e+i*Math.cos(o),y:t+i*Math.sin(o)}},PP=(e,t=!0)=>(n,r)=>{if(!t)return r;const o=(e=>{const{x:t,y:n,width:r,height:o}=e,i=e.rotation,a=TP(t,n,0,0,i),s=TP(t,n,r,0,i),l=TP(t,n,r,o,i),c=TP(t,n,0,o,i),d=Math.min(a.x,s.x,l.x,c.x),u=Math.min(a.y,s.y,l.y,c.y);return{x:d,y:u,width:Math.max(a.x,s.x,l.x,c.x)-d,height:Math.max(a.y,s.y,l.y,c.y)-u}})(r),i=Object.assign({},r);return[o.x<=e.x,o.y<=e.y,o.x+o.width>=e.x+e.width,o.y+o.height>=e.y+e.height].some(Boolean)?n:i},IP=(e,t=!0)=>function(n){if(!t)return;const r=null!=this&&this.nodes?this.nodes():[n.target],o=(e=>{let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.forEach((e=>{t=Math.min(t,e.x),n=Math.min(n,e.y),r=Math.max(r,e.x+e.width),o=Math.max(o,e.y+e.height)})),{x:t,y:n,width:r-t,height:o-n}})(r.map((e=>e.getClientRect())));r.forEach((t=>{const n=t.getAbsolutePosition(),r=o.x-e.x-n.x,i=o.y-e.y-n.y,a=Object.assign({},n);o.x-e.x<0&&(a.x=-r),o.y-e.y<0&&(a.y=-i),o.x-e.x+o.width>e.width&&(a.x=e.width-o.width-r),o.y-e.y+o.height>e.height&&(a.y=e.height-o.height-i),t.setAbsolutePosition(a)}))},LP=["reg","frame","stageRef"],MP=e=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(pj.rw,Object.assign({},e,{strokeWidth:2,stroke:"#fff"})),(0,_.jsx)(pj.rw,Object.assign({},e,{fill:pt()("#617ADA").alpha(.1).css(),strokeWidth:2,stroke:"#617ADA",dash:[2,2]}))]}),KP=(0,y.PA)((({regions:e,item:t,locked:n,isDrawing:r,workinAreaCoordinates:o,stageRef:i,onDragMove:a})=>(0,_.jsx)(_.Fragment,{children:e.map((e=>(0,_.jsx)(DP,{id:e.id,reg:e,frame:t.frame,workingArea:o,draggable:!e.isReadOnly()&&!r&&!n,selected:e.selected||e.inSelection,listening:!e.locked&&!e.hidden,stageRef:i,onDragMove:a},e.id)))}))),DP=(0,y.PA)((e=>{let{reg:t,frame:n,stageRef:r}=e,o=(0,Yn.A)(e,LP);const i=t.getShape(n);return t.isInLifespan(n)&&i&&(0,_.jsx)(AP,Object.assign({reg:t,box:i,frame:n,onClick:e=>{const n=(0,h.k2)(t,EP);n&&n.isLinkingMode&&(r.current.container().style.cursor=V.A.DEFAULT_CURSOR),t.setHighlight(!1),t.onClickRegion(e)}},o))})),NP=(0,y.PA)((({item:e,regions:t,width:n,height:r,zoom:o,workingArea:i,locked:a=!1,allowRegionsOutsideWorkingArea:s=!0,pan:l={x:0,y:0},stageRef:c})=>{var d,u;const[h,g]=(0,p.useState)(),[m,f]=(0,p.useState)(!1),v=t.filter((t=>(t.selected||t.inSelection)&&!t.hidden&&!t.isReadOnly()&&t.isInLifespan(e.frame))),y=!a;t.map((e=>(0,w.fixMobxObserve)(e.sequence)));const b=(0,p.useMemo)((()=>{const e=i.width*o,t=i.height*o,a=Math.abs(l.x)>=Math.abs((n-e)/2),s=Math.abs(l.y)>=Math.abs((r-t)/2),c=l.x>0?1:-1,d=l.y>0?1:-1,u=(Math.abs(l.x)-Math.abs((n-e)/2))*c,h=(Math.abs(l.y)-Math.abs((r-t)/2))*d,g=a?u:0,m=s?h:0;return{width:e,height:t,x:(n-e)/2+l.x-g,y:(r-t)/2+l.y-m,scale:o,realWidth:i.width,realHeight:i.height}}),[l.x,l.y,o,i,n,r]),x=(0,p.useMemo)((()=>({width:b.width,height:b.height,scaleX:o,scaleY:o,position:{x:b.x,y:b.y}})),[b,o]),C=(0,p.useCallback)(((e,t)=>{const{x:n,y:r}=b;return{x:(e-n)/o,y:(t-r)/o}}),[b,o]);(0,p.useEffect)((()=>{if(!m&&h){const{width:t,height:n}=i;let r=h.x/t*100,o=h.y/n*100,a=h.width/t*100,s=h.height/n*100;a<0&&(a*=-1,r-=a),s<0&&(s*=-1,o-=s);const l={x:r,y:o,width:a,height:s};e.addVideoRegion(l),g(null)}}),[m,b,i]);const S=({x:e,y:t})=>s?{x:e,y:t}:{x:(0,KC.clamp)(e,0,b.realWidth),y:(0,KC.clamp)(t,0,b.realHeight)},j=y?{onMouseDown:t=>{var n;if(t.target!==c.current||null!=(n=e.annotation)&&n.isReadOnly())return;const{x:r,y:o}=S(C(t.evt.offsetX,t.evt.offsetY)),i=((e,t)=>!!s||e>0&&t>0&&e{var n;if(!m||null!=(n=e.annotation)&&n.isReadOnly())return!1;const{x:r,y:o}=S(C(t.evt.offsetX,t.evt.offsetY));g((e=>Object.assign({},e,{width:r-e.x,height:o-e.y})))},onMouseUp:t=>{var n;if(!m||null!=(n=e.annotation)&&n.isReadOnly())return!1;const{x:r,y:o}=S(C(t.evt.offsetX,t.evt.offsetY));Math.abs(h.x-r)<5&&Math.abs(h.y-o)<5?g(null):g((e=>Object.assign({},e,{width:r-e.x,height:o-e.y}))),f(!1)}}:{};return(0,_.jsxs)(pj.BI,Object.assign({ref:c,width:n,height:r,style:{position:"absolute",zIndex:1},listening:y},j,{children:[(0,_.jsx)(pj.Wd,Object.assign({},x,{children:(0,_.jsx)(KP,{regions:t,item:e,layerProps:x,locked:a,isDrawing:m,workinAreaCoordinates:b,onDragMove:IP(b,!s),stageRef:c})})),null!=(d=e.annotation)&&d.isReadOnly()||!m?null:(0,_.jsx)(pj.Wd,Object.assign({},x,{children:(0,_.jsx)(MP,Object.assign({},h))})),(null==(u=e.annotation)||!u.isReadOnly())&&(null==v?void 0:v.length)>0?(0,_.jsx)(pj.Wd,{children:(0,_.jsx)(pj.Ge,{ref:e=>{if(!e)return;const t=e.getStage(),n=v.map((e=>t.findOne(`#${e.id}`))).filter(Boolean);e.nodes(n),e.getLayer().batchDraw()},keepRatio:!1,ignoreStroke:!0,flipEnabled:!1,boundBoxFunc:PP(b,!s),onDragMove:IP(b,!s)})}):null]}))})),VP=(0,O.VS)(O.vS);const zP=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{var n,r;if(!e._value)return null;const o=!t.settings.videoDrawOutside,i=(0,p.useRef)(),a=(0,p.useRef)(),s=(0,p.useRef)(),l=(0,p.useRef)(),[c,d]=(0,p.useState)(!1),[u,h]=(0,p.useState)(0),[g,m]=(0,p.useState)(!1),[f,v]=(0,p.useState)(1),[y,b]=(0,p.useState)(null),[x,C]=(0,p.useState)({width:0,height:0,ratio:1}),[{zoom:S,pan:j},{setZoomAndPan:k,setZoom:O,setPan:R}]=function(e,t,n){const[r,o]=(0,p.useState)({zoom:1,pan:{x:0,y:0}}),i=(0,p.useRef)({});i.current.video=e,i.current.canvas=t,i.current.shouldClampPan=n;const a=(0,p.useCallback)(((e,t)=>{if(!n)return e;const r=(0,w.clamp)((i.current.video.width*t-i.current.canvas.width)/2,0,Number.POSITIVE_INFINITY),o=(0,w.clamp)((i.current.video.height*t-i.current.canvas.height)/2,0,Number.POSITIVE_INFINITY);return{x:(0,w.clamp)(e.x,-r,r),y:(0,w.clamp)(e.y,-o,o)}}),[]);return[r,{setZoomAndPan:(0,p.useCallback)((e=>o((t=>{const n=e instanceof Function?e(t):e,{zoom:r,pan:o}=t,i=kT(n.zoom);if(i===r)return t;if(i===n.zoom)return{zoom:n.zoom,pan:a(n.pan,n.zoom)};const s=(i-r)/(n.zoom-r),l={x:o.x+(n.pan.x-o.x)*s,y:o.y+(n.pan.y-o.y)*s};return{pan:a(l,i),zoom:i}}))),[]),setZoom:(0,p.useCallback)((e=>o((({zoom:t,pan:n})=>{const r=kT(e instanceof Function?e(t):e);return{zoom:r,pan:{x:n.x/t*r,y:n.y/t*r}}}))),[]),setPan:(0,p.useCallback)((e=>o((t=>(e=e instanceof Function?e(t.pan):e,Object.assign({},t,{pan:e}))))),[])}]}(x,e.ref.current?{width:e.ref.current.width,height:e.ref.current.height}:{width:0,height:0},o),[E,A]=(0,p.useState)(!1),[T,P,I,L]=r_(!1),M=or({onEnterFullscreen(){P()},onExitFullscreen(){I()}}),K=(0,p.useCallback)((e=>{if(e!==f&&u){const t=(0,w.clamp)(e,1,u);v(t)}}),[f,u]),D=(0,p.useCallback)((e=>{e!==u&&h(e)}),[u]),N=(0,p.useMemo)((()=>(0,w.isDefined)(null==e?void 0:e.videoControl)),[e]),z=(0,p.useMemo)((()=>(0,w.isDefined)(null==e?void 0:e.timelineControl)),[e]);(0,p.useEffect)((()=>{const e=s.current,t=e=>{e.shiftKey&&e.preventDefault()};return e.addEventListener("wheel",t),()=>e.removeEventListener("wheel",t)}),[]),(0,p.useEffect)((()=>{const e=e=>{if(e.code.startsWith("Shift")&&(e.preventDefault(),!E)){A(!0);const e=t=>{t.code.startsWith("Shift")&&(A(!1),document.removeEventListener("keyup",e))};document.addEventListener("keyup",e)}};document.addEventListener("keydown",e);const t=new G((()=>(()=>{const e=s.current;e&&b([e.clientWidth,e.clientHeight])})())),[n,r]=[s.current,i.current];return t.observe(n),t.observe(r),()=>{document.removeEventListener("keydown",e),t.unobserve(n),t.unobserve(r),t.disconnect()}}),[]),(0,p.useEffect)((()=>{const e=M.getElement();T&&!e?M.enter(l.current):!T&&e&&M.exit()}),[T]);const B=(0,p.useCallback)((t=>{if(!t.shiftKey||!a.current)return;const n=0===Math.abs(t.deltaY)?t.deltaX:t.deltaY,r=n>0?1:-1,o=Math.abs(25e-5*n),i=r*(0,w.clamp)(o,.05,.5);requestAnimationFrame((()=>{k((({zoom:t,pan:n})=>{const r=t+i,o=r/t,s=a.current.pointerPos.x-e.ref.current.width/2,l=a.current.pointerPos.y-e.ref.current.height/2;return{zoom:r,pan:{x:n.x*o+s*(1-o),y:n.y*o+l*(1-o)}}}))}))}),[]),H=(0,p.useCallback)((t=>{if(!E)return;const n=t.pageX,r=t.pageY,o=t=>{const o=e.ref.current.adjustPan(j.x+(t.pageX-n),j.y+(t.pageY-r));requestAnimationFrame((()=>{R(o)}))},i=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",i)}),[E,j]),F=(0,p.useCallback)((()=>{O((e=>e+.1))}),[]),W=(0,p.useCallback)((()=>{O((e=>e-.1))}),[]),$=(0,p.useCallback)((()=>{k({zoom:e.ref.current.videoDimensions.ratio,pan:{x:0,y:0}})}),[]),U=(0,p.useCallback)((()=>{k({zoom:1,pan:{x:0,y:0}})}),[]),Z=(0,p.useCallback)(((t,n)=>{K(t),D(n),e.setOnlyFrame(t)}),[e,K,D]),Y=(0,p.useCallback)((({length:t,videoDimensions:n})=>{d(!0),O(n.ratio),C(n),D(t),e.setOnlyFrame(1),e.setLength(t),e.setReady(!0)}),[e,D]),X=(0,p.useCallback)((e=>{C(e)}),[]),q=(0,p.useCallback)((()=>{m(!1),K(u)}),[u,K,m]),J=(0,p.useCallback)((()=>{m((t=>VP?(e.ref.current.playing||(e.ref.current.play(),e.triggerSyncPlay()),!0):!1===t?(e.ref.current.play(),e.triggerSyncPlay(),!0):t))}),[]),Q=(0,p.useCallback)((()=>{m((t=>VP?(e.ref.current.playing&&(e.ref.current.pause(),e.triggerSyncPause()),!1):!0===t?(e.ref.current.pause(),e.triggerSyncPause(),!1):t))}),[]),ee=(0,p.useCallback)(((t,n,r)=>{const o=e.findRegion(n),i=(null==o?void 0:o.selected)||(null==o?void 0:o.inSelection);!o||(0,w.isDefined)(r)&&i===r||o.onClickRegion()}),[e]),te=(0,p.useCallback)(((t,n,r)=>{e.regs.filter((e=>e.selected||e.inSelection)).forEach((e=>{switch(n){case"lifespan_add":case"lifespan_remove":e.toggleLifespan(r.frame);break;case"keypoint_add":e.addKeypoint(r.frame);break;case"keypoint_remove":e.removeKeypoint(r.frame);break;default:console.warn("unknown action")}}))}),[e.regs]),ne=(0,p.useCallback)((t=>{f!==t&&(e.setFrame(t),K(t))}),[e,f]);(0,p.useEffect)((()=>()=>{e.ref.current=null}),[]);const re=e.regs.map((e=>{var t,n,r,o;const i=null!=(t=null!=(n=null==(r=e.style)?void 0:r.fillcolor)?n:null==(o=e.tag)?void 0:o.fillcolor)?t:V.l.fillcolor,a=e.labels.join(", ")||"Empty",s=e.type.includes("timeline"),l=e.sequence;return{id:e.cleanId,index:e.region_index,label:a,color:i,visible:!e.hidden,selected:e.selected||e.inSelection,sequence:l,timeline:s}}));if(e.timelineControl&&re.reverse(),null!=(n=e.timelineControl)&&null!=(n=n.selectedLabels)&&n.length&&!e.annotation.selectionSize&&!e.drawingRegion){const t=e.timelineControl.selectedLabels[0];re.unshift({id:"new",label:t.value,color:t.background,visible:!0,selected:!0,sequence:[],timeline:!0})}return(0,_.jsx)(_n,{item:e,children:(0,_.jsxs)(Ze.eB,{name:"video-segmentation",ref:l,mod:{fullscreen:T},children:[null==(r=e.errors)?void 0:r.map(((e,t)=>(0,_.jsx)(ke,{error:e},`err-${t}`))),(0,_.jsx)(Ze.eB,{name:"video",mod:{fullscreen:T},ref:i,children:(0,_.jsx)(Ze.Sl,{name:"main",ref:s,style:{height:Number(e.height)},onMouseDown:H,onWheel:B,children:y&&(0,_.jsxs)(_.Fragment,{children:[c&&N&&(0,_.jsx)(NP,{item:e,zoom:S,pan:j,locked:E,regions:e.regs,width:y[0],height:y[1],workingArea:x,allowRegionsOutsideWorkingArea:!o,stageRef:a}),(0,_.jsx)(RT,{ref:e.ref,src:e._value,width:y[0],height:y[1],muted:e.muted,zoom:S,pan:j,speed:e.speed,framerate:e.framerate,allowInteractions:!1,allowPanOffscreen:!o,onFrameChange:Z,onLoad:Y,onResize:X,onEnded:q,onPlay:J,onPause:Q,onSeeked:e.handleSeek})]})})}),c&&(0,_.jsx)(Ze.Sl,{name:"timeline",tag:iS,playing:g,length:u,position:f,regions:re,height:e.timelineheight,altHopSize:t.settings.videoHopSize,allowFullscreen:!1,fullscreen:T,defaultStepSize:16,disableView:!z&&!N,framerate:e.framerate,controls:{FramesControl:!0},customControls:[{position:"left",component:()=>(0,_.jsx)(Q_.Trigger,{inline:T,content:(0,_.jsxs)(wT,{size:"auto",closeDropdownOnItemClick:!1,children:[(0,_.jsx)(wT.Item,{onClick:F,children:"Zoom In"}),(0,_.jsx)(wT.Item,{onClick:W,children:"Zoom Out"}),(0,_.jsx)(wT.Item,{onClick:$,children:"Zoom To Fit"}),(0,_.jsx)(wT.Item,{onClick:U,children:"Zoom 100%"})]}),children:(0,_.jsx)(za,{size:"small",nopadding:!0,children:(0,_.jsx)(Sm,{})})},"dd")}],onPositionChange:ne,onPlay:J,onPause:Q,onFullscreenToggle:L,onSelectRegion:ee,onStartDrawing:e.startDrawing,onFinishDrawing:e.finishDrawing,onAction:te})]})})})));x.addTag("video",LT,zP),x.addObjectType(LT);var BP=n(76694);const HP={board:"board--RCWAA",column:"column--gZT9f",columnTitle:"columnTitle--D1Oix",expanded:"expanded--IxfAA",collapsed:"collapsed--wo2M4",item:"item--SAih8",itemLine:"itemLine--J7fhn",itemTitle:"itemTitle--cZnga",dropArea:"dropArea--OHu8G"},FP=e=>{var t;const{item:n,index:r,readonly:o}=e,i=(0,p.useMemo)((()=>n.html?(0,je.sanitizeHtml)(n.html):""),[n.html]),[a,s,l]=(0,p.useContext)(GP),c=null!=(t=s[n.id])&&t,d=a?()=>l(n.id,!c):void 0,u=[HP.item,"htx-ranker-item"];return a&&u.push(c?HP.collapsed:HP.expanded),(0,_.jsx)(BP.sx,{draggableId:n.id,index:r,isDragDisabled:o,children:e=>(0,_.jsxs)("div",Object.assign({},e.draggableProps,e.dragHandleProps,{style:Object.assign({},e.draggableProps.style),className:u.join(" "),ref:e.innerRef,"data-ranker-id":n.id,children:[n.title&&(0,_.jsx)("h3",{className:HP.itemTitle,onClick:d,children:n.title}),n.body&&(0,_.jsx)("p",{className:HP.itemLine,children:n.body}),n.html&&(0,_.jsx)("p",{className:HP.itemLine,dangerouslySetInnerHTML:{__html:i}}),(0,_.jsx)("p",{className:HP.itemLine,children:n.id})]}))})},WP=["children"],$P=e=>{let{children:t}=e,n=(0,Yn.A)(e,WP);const[r,o]=(0,p.useState)(!1);return(0,p.useEffect)((()=>{const e=requestAnimationFrame((()=>o(!0)));return()=>{cancelAnimationFrame(e)}}),[]),r?(0,_.jsx)(BP.gL,Object.assign({},n,{children:t})):null},UP=({items:e,title:t})=>{const[,n,r]=(0,p.useContext)(GP),o=e.every((e=>n[e.id]));return(0,_.jsxs)("h1",{className:[HP.columnTitle,o?HP.collapsed:HP.expanded].join(" "),children:[t,(0,_.jsx)("button",{type:"button",onClick:()=>r(e.map((e=>e.id)),!o),children:(0,_.jsx)("span",{})})]})},ZP=e=>{const{column:t,items:n,readonly:r}=e,[o]=(0,p.useContext)(GP),i=o?(0,_.jsx)(UP,{items:n,title:t.title}):(0,_.jsx)("h1",{className:HP.columnTitle,children:t.title});return(0,_.jsxs)("div",{className:[HP.column,"htx-ranker-column"].join(" "),children:[i,(0,_.jsx)($P,{droppableId:t.id,children:e=>(0,_.jsxs)("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:HP.dropArea,children:[n.map(((e,t)=>(0,_.jsx)(FP,{item:e,index:t,readonly:r},e.id))),e.placeholder]}))})]})},GP=(0,p.createContext)([!0,{},(e,t)=>{}]),YP=({inputData:e,handleChange:t,readonly:n,collapsible:r=!0})=>{const[o,i]=(0,p.useState)(e),[a,s]=(0,p.useState)({}),l=(0,p.useCallback)(((e,t)=>{const n=(Array.isArray(e)?e:[e]).reduce(((e,n)=>Object.assign({},e,{[n]:t})),{});s((e=>Object.assign({},e,n)))}),[]);(0,p.useEffect)((()=>{i(e)}),[e]);return(0,_.jsx)(GP.Provider,{value:[r,a,l],children:(0,_.jsx)(BP.JY,{onDragEnd:e=>{var n;const{destination:r,source:a,draggableId:s}=e;if(!r||r.droppableId===a.droppableId&&r.index===a.index)return;const l=o.columns.find((e=>e.id===a.droppableId)),c=o.columns.find((e=>e.id===r.droppableId));if(l===c){const e=[...o.itemIds[a.droppableId]];e.splice(a.index,1),e.splice(r.index,0,s);const n=Object.assign({},o.itemIds,{[a.droppableId]:e}),l=Object.assign({},o,{itemIds:n});return i(l),void(t&&t(n))}const d=[...o.itemIds[a.droppableId]];d.splice(a.index,1);const u=[...null!=(n=o.itemIds[r.droppableId])?n:[]];u.splice(r.index,0,s);const h=Object.assign({},o.itemIds,{[a.droppableId]:d,[r.droppableId]:u}),g=Object.assign({},o,{itemIds:h});t&&t(h),i(g)},children:(0,_.jsx)("div",{className:HP.board,children:(0,_.jsx)(_.Fragment,{children:o.columns.map((e=>{var t,r;const i=null!=(t=null==(r=o.itemIds[e.id])?void 0:r.map((e=>o.items[e])))?t:[];return(0,_.jsx)(ZP,{column:e,items:i,readonly:n},e.id)}))})})})})},XP=h.gK.model({type:"list",value:h.gK.maybeNull(h.gK.string),_value:h.gK.frozen([]),title:h.gK.optional(h.gK.string,"")}).views((e=>({get ranker(){var t;return null==(t=e.annotation.toNames.get(e.name))?void 0:t.filter((e=>"ranker"===e.type))},get items(){return Object.fromEntries(e._value.map((e=>[e.id,e])))}}))).views((e=>({get dataSource(){return{items:e.items,columns:[{id:e.name,title:e.title}],itemIds:{[e.name]:Object.keys(e.items)}}},get result(){var t;return null==(t=e.annotation)?void 0:t.results.find((t=>t.from_name===e))}}))).actions((e=>({updateValue(t){const n=j(e.value,t.task.dataObj);Array.isArray(n)&&(e._value=n.map((e=>Object.assign({},e,{id:String(e.id)}))))}}))),qP=h.gK.compose("ListModel",bn,ze,Pe,XP),JP=(0,y.WQ)("store")((0,y.PA)((({item:e})=>{const t=e.dataSource;return t?e.ranker?null:(0,_.jsx)(p.StrictMode,{children:(0,_.jsx)(YP,{inputData:t,readonly:!0})}):null})));x.addTag("list",qP,JP),x.addObjectType(qP);const QP=e=>(e<10?"0":"")+e,eI=h.gK.model({toname:h.gK.maybeNull(h.gK.string),format:h.gK.maybeNull(h.gK.string),only:h.gK.maybeNull(h.gK.string),min:h.gK.maybeNull(h.gK.string),max:h.gK.maybeNull(h.gK.string),step:h.gK.maybeNull(h.gK.string),defaultvalue:h.gK.maybeNull(h.gK.string),hotkey:h.gK.maybeNull(h.gK.string)}),tI=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"datetime"}).views((e=>({selectedValues:()=>e.datetime,get holdsState(){return!(e.onlyTime&&!(0,w.isDefined)(e.time))&&((0,w.isDefined)(e.month)||(0,w.isDefined)(e.year))},get showDate(){return!e.only||e.only.includes("date")},get showTime(){return!e.only||e.only.includes("time")},get onlyTime(){return"time"===e.only},get showMonth(){var t,n;return(null==(t=e.only)?void 0:t.includes("month"))&&!(null!=(n=e.only)&&n.includes("date"))},get showYear(){var t;return null==(t=e.only)?void 0:t.includes("year")},getISODate(t){if(e.onlyYear)return t;if(e.onlyTime)return;const n=e.parseDateTime(t);return[n.getFullYear(),QP(n.getMonth()+1),QP(n.getDate())].join("-")},get date(){var t;return null!=(t=e.only)&&t.includes("year")?e.year:e.month&&e.year?[e.year,QP(e.month),QP(e.day)].join("-"):void 0},get datetime(){const t=e.time||"00:00";if(e.onlyTime)return t;if(!e.date)return e.year?e.year:void 0;const n=new Date(e.date+"T"+t);return e.formatDateTime(n)},get isValid(){return!(e.min&&e.datee.max)}}))).volatile((()=>({updateValue:!1,day:void 0,month:void 0,year:void 0,time:void 0}))).volatile((e=>{let t;return t=e.onlyTime?String:e.format?e.format:e.showTime?"%Y-%m-%dT%H:%M":"%Y-%m-%d",{formatTime:$A.DCK("%H:%M"),formatDateTime:$A.DCK(t),parseDateTime:$A.T6w(t)}})).volatile((e=>{var t,n;const r=[],o=[],i=$A.DCK("%B"),a=new Date,s=t=>{var n;return"current"===t?a.getFullYear():4===t.length?t:null==(n=e.parseDateTime(t))?void 0:n.getFullYear()},l=s(null!=(t=e.min)?t:"2000");for(let t=s(null!=(n=e.max)?n:"current");t>=l;t--)r.push(t);a.setDate(1);for(let e=0;e<12;e++)a.setMonth(e),o[e]=i(a);return{months:o,years:r}})).actions((e=>({setNeedsUpdate(t){e.updateValue=t},needsUpdate(){e.setNeedsUpdate(!0),e.result?e.setDateTime(e.result.mainValue):e.resetDateTime()},unselectAll(){},resetDate(){e.day=void 0,e.month=void 0,e.year=void 0},resetDateTime(){e.resetDate(),e.time=void 0},validDateFormat(e){const t=e.split("-").map((e=>Number.parseInt(e,10))),n=t[0];return!(isNaN(new Date(e))||!(n<=9999&&n>=1e3))&&t},setDateTime(t){if(e.onlyTime)return void(e.time=t);const n=e.parseDateTime(t);if(!n)return e.resetDateTime();e.day=n.getDate(),e.month=n.getMonth()+1,e.year=n.getFullYear(),e.showTime&&(e.time=e.formatTime(n))},onMonthChange(t){e.month=+t.target.value||void 0,e.updateResult()},onYearChange(t){e.year=+t.target.value||void 0,e.updateResult()},setDate(t){t?(e.day=t[2],e.month=t[1],e.year=t[0]):(e.day=void 0,e.month=void 0,e.year=void 0),e.updateResult()},onTimeChange(t){e.time=t.target.value||void 0,e.updateResult()},updateFromResult(){this.needsUpdate()},requiredModal(){fn.warning(e.requiredmessage||`DateTime "${e.name}" is required.`)}}))).actions((e=>{const t={validateValue:e.validateValue};return{validateValue(n){var r;if(!t.validateValue(n))return!1;const o=[];if(!n)return!0;let i=e.getISODate(n);null!=(r=e.only)&&r.includes("year")&&(i=i.slice(0,4));const{min:a,max:s}=e;return a&&is&&o.push(`max date is ${s}`),!o.length||(fn.warning(`Date "${i}" is not valid: ${o.join(", ")}.`),!1)}}})),nI=h.gK.compose("DateTimeModel",QR,BE,OE,$e,ct,...(0,O.VS)(O.gF)?[jE]:[],Pe,eI,tI),rI=(0,y.WQ)("store")((0,y.PA)((({item:e})=>{var t;const n=e.isReadOnly(),r=e.perRegionVisible()?{margin:"0 0 1em"}:{display:"none"},o={style:{width:"auto",marginRight:"4px",borderColor:e.isValid?void 0:"red"},className:"ant-input"},[i,a]=[e.min,e.max].map((e=>{var t;return null==e||null==(t=e.match(/\d?\d:\d\d/))?void 0:t[0]})),[s,l]=(0,p.useState)("");e.updateValue&&(!e.showDate||void 0!==e.date&&e.date===s||l(e.date||""),e.setNeedsUpdate(!1));return(0,_.jsxs)("div",{className:"htx-datetime",style:r,ref:e.elementRef,children:[e.showMonth&&(0,_.jsxs)("select",Object.assign({},o,{name:`${e.name}-date`,disabled:n,value:e.month,onChange:n?void 0:e.onMonthChange,children:[(0,_.jsx)("option",{value:"",children:"Month..."}),e.months.map(((e,t)=>(0,_.jsx)("option",{value:t+1,children:e},e)))]})),e.showYear&&(0,_.jsxs)("select",Object.assign({},o,{name:`${e.name}-year`,disabled:n,value:e.year||"",onChange:n?void 0:e.onYearChange,children:[(0,_.jsx)("option",{value:"",children:"Year..."}),e.years.map((e=>(0,_.jsx)("option",{value:e,children:e},e)))]})),e.showDate&&(0,_.jsx)("input",Object.assign({},o,{type:"date",readOnly:n,name:`${e.name}-date`,value:s,min:e.min,max:e.max,onChange:n?void 0:t=>{const n=t.target.value,r=e.validDateFormat(n);l(n),n&&!r||e.setDate(r)},onBlur:n?void 0:()=>{s!==e.date&&l(e.date||"")}})),e.showTime&&(0,_.jsx)("input",Object.assign({},o,{type:"time",readOnly:n,name:`${e.name}-time`,value:null!=(t=e.time)?t:"",min:i,max:a,onChange:n?void 0:e.onTimeChange}))]})})));x.addTag("datetime",nI,rI);const oI=h.gK.model({toname:h.gK.maybeNull(h.gK.string),min:h.gK.maybeNull(h.gK.string),max:h.gK.maybeNull(h.gK.string),step:h.gK.maybeNull(h.gK.string),defaultvalue:h.gK.maybeNull(h.gK.string),slider:h.gK.optional(h.gK.boolean,!1),hotkey:h.gK.maybeNull(h.gK.string)}),iI=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"number",number:h.gK.maybeNull(h.gK.number)}).views((e=>({selectedValues:()=>e.number,get holdsState(){return(0,w.isDefined)(e.number)}}))).actions((e=>{const t={validateValue:e.validateValue};return{validateValue(n){if(!t.validateValue(n))return!1;if(!(0,w.isDefined)(n))return!0;const r=[];if((0,w.isDefined)(e.min)&&ne.max&&r.push(`Value must be less than or equal to ${e.max}`),(0,w.isDefined)(e.step)){const t=Number.parseFloat(e.step),o=(n-((0,w.isDefined)(e.min)?+e.min:0))%t;0!==o&&r.push(`The two nearest valid values are ${n-o} and ${n-o+t}`)}return!r.length||(fn.warning(`Number "${n}" is not valid: ${r.join(", ")}.`),!1)},getSelectedString:()=>`${e.number} star`,needsUpdate(){e.result?e.number=e.result.mainValue:e.number=null},beforeSend(){if((0,w.isDefined)(e.defaultvalue))if(e.perregion&&e.required){const n=e.toNameTag;for(const r of null!=(t=null==n?void 0:n.allRegs)?t:[]){var t;r.results.some((t=>t.from_name===e))||r.results.push({area:r,from_name:e,to_name:n,type:e.resultType,value:{[e.valueType]:+e.defaultvalue}})}}else(0,w.isDefined)(e.number)||e.setNumber(+e.defaultvalue)},unselectAll(){},setNumber(t){e.number=t,e.updateResult()},onChange(t){const n=+t.target.value;isNaN(n)||(e.setNumber(n),t.target.value=(0,w.isDefined)(e.number)?e.number:"")},updateFromResult(){this.needsUpdate()},requiredModal(){fn.warning(e.requiredmessage||`Number "${e.name}" is required.`)},increaseValue(){e.number>=Number(e.max)?e.setNumber(0):e.number>0?e.setNumber(e.number+1):e.setNumber(1)},onHotKey:()=>e.increaseValue()}})),aI=h.gK.compose("NumberModel",QR,BE,OE,$e,ct,...(0,O.VS)(O.gF)?[jE]:[],Pe,oI,iI),sI=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{var n,r,o,i,a;const s=e.perRegionVisible()?{display:"flex",alignItems:"center"}:{display:"none"},l=e.slider?{padding:"9px 0px",border:0}:{},c=e.isReadOnly(),d=(0,Ze.cn)("number").toClassName();return(0,_.jsxs)("div",{className:d,style:s,ref:e.elementRef,children:[(0,_.jsx)("input",{disabled:c,style:l,type:e.slider?"range":"number",name:e.name,value:null!=(n=null!=(r=e.number)?r:e.defaultvalue)?n:"",step:null!=(o=e.step)?o:1,min:(0,w.isDefined)(e.min)?Number(e.min):void 0,max:(0,w.isDefined)(e.max)?Number(e.max):void 0,onChange:c?void 0:e.onChange}),e.slider&&(0,_.jsx)("output",{style:{marginLeft:"5px"},children:null!=(i=null!=(a=e.number)?a:e.defaultvalue)?i:""}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)("sup",{style:{fontSize:"9px"},children:["[",e.hotkey,"]"]})]})})));x.addTag("number",aI,sI);const lI=h.gK.model({toname:h.gK.maybeNull(h.gK.string),selectionstyle:h.gK.maybeNull(h.gK.string),leftclass:h.gK.maybeNull(h.gK.string),rightclass:h.gK.maybeNull(h.gK.string)}),cI=h.gK.model({type:"pairwise",selected:h.gK.maybeNull(h.gK.enumeration(["left","right","none"]))}).views((e=>({get names(){return e.toname.split(",")},get left(){return e.annotation.names.get(e.names[0])},get right(){return e.annotation.names.get(e.names[1])},get valueType(){return"selected"}}))).actions((e=>({updateResult(){const{result:t,selected:n}=e;"none"===n?t&&t.area.removeResult(t):t?t.setValue(n):e.annotation.createResult({},{selected:n},e,e.name)},setResult(t="none"){e.selected=t,e.left.addProp("style","left"===t?e._selection:{}),e.right.addProp("style","right"===t?e._selection:{})},selectLeft(){e.setResult("left"===e.selected?"none":"left"),e.updateResult()},selectRight(){e.setResult("right"===e.selected?"none":"right"),e.updateResult()},afterCreate(){2===e.names.length&&e.names[0]!==e.names[1]||fn.error("Incorrect toName parameter on Pairwise, must be two names separated by a comma: name1,name2");let t={};if(e.selectionstyle){const n=D.cssConverter(e.selectionstyle);for(const e in n)t[e]=n[e]}else t={backgroundColor:"#f6ffed",border:"1px solid #b7eb8f"};e._selection=t},needsUpdate(){e.result?e.setResult(e.result.value.selected):e.setResult()},annotationAttached(){setTimeout((()=>{var t;e.left.addProp("onClick",e.selectLeft),e.right.addProp("onClick",e.selectRight),e.setResult(null==(t=e.result)?void 0:t.value.selected)}))}}))),dI=h.gK.compose("PairwiseModel",QR,lI,cI,Pe);x.addTag("pairwise",dI,(()=>null)),x.addObjectType(dI);const uI="_",hI=h.gK.model({type:"ranker",toname:h.gK.maybeNull(h.gK.string),collapsible:h.gK.optional(h.gK.boolean,!0),children:Te.unionArray(["bucket"])}).views((e=>({get list(){const t=e.annotation.names.get(e.toname);return"list"===t.type?t:null},get buckets(){return D.filterChildrenOfType(e,"BucketModel")},get defaultBucket(){var t;return e.buckets.length>0?null==(t=e.buckets.find((e=>e.default)))?void 0:t.name:e.name},get rankOnly(){return!e.buckets.length},get columns(){if(!e.list)return[];if(e.rankOnly)return[{id:e.name,title:e.list.title}];const t=e.buckets.map((e=>{var t;return{id:e.name,title:null!=(t=e.title)?t:""}}));return e.defaultBucket||t.unshift({id:uI,title:e.list.title}),t}}))).views((e=>({get dataSource(){var t,n,r;const o=null==(t=e.list)?void 0:t._value,i=null==(n=e.list)?void 0:n.items,a=Object.keys(i),s=e.columns,l=Object.fromEntries(e.columns.map((e=>[e.id,[]]))),c=null==(r=e.result)?void 0:r.value.ranker;let d={};if(!o)return[];var u;if(c){if(d=Object.assign({},l,c),!e.defaultBucket){const t=e.columns.map((e=>e.id)),n=Object.entries(c).filter((([e])=>t.includes(e))).flatMap((([e,t])=>t)),r=a.filter((e=>!n.includes(e)));var h;if(r.length)d[uI]=[...null!=(h=d[uI])?h:[],...r]}}else d=Object.assign({},l,{[null!=(u=e.defaultBucket)?u:uI]:a});return{items:i,columns:s,itemIds:d}},get result(){var t;return null==(t=e.annotation)?void 0:t.results.find((t=>t.from_name===e))}}))).actions((e=>({createResult(t){e.annotation.createResult({},{ranker:t},e,e.list)},updateResult(t){e.result?e.result.setValue(t):e.createResult(t)},beforeSend(){var t,n;if(!e.list)return;if(e.result)return;const r=Object.keys(null==(t=e.list)?void 0:t.items),o=Object.fromEntries(e.columns.map((e=>[e.id,[]])));o[null!=(n=e.defaultBucket)?n:uI]=r,e.createResult(o)}}))),gI=h.gK.compose("RankerModel",QR,Pe,hI,$e),mI=(0,y.WQ)("store")((0,y.PA)((({item:e})=>{const t=e.dataSource;return t?(0,_.jsx)(YP,{inputData:t,handleChange:e.updateResult,readonly:e.isReadOnly(),collapsible:e.collapsible}):null}))),pI=h.gK.model("BucketModel",{id:h.gK.optional(h.gK.identifier,E),type:"bucket",name:h.gK.string,title:h.gK.maybeNull(h.gK.string),default:h.gK.optional(h.gK.boolean,!1)}),fI=(0,y.WQ)("store")((0,y.PA)((({item:e})=>(0,_.jsx)("h1",{children:e.name}))));x.addTag("ranker",gI,mI),x.addTag("bucket",pI,fI),x.addObjectType(gI);var vI=n(97141);const yI=h.gK.model({value:h.gK.maybeNull(h.gK.string),alias:h.gK.maybeNull(h.gK.string),background:h.gK.optional(Re.color,"#333333"),hotkey:h.gK.maybeNull(h.gK.string)}),bI=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"shortcut",_value:h.gK.optional(h.gK.string,"")}).volatile((()=>({hotkeyScope:yr.INPUT_SCOPE}))).actions((e=>({onClick(){const t=(0,h.PA)(e,2);t.onShortcut&&(t.onShortcut(e.value),null==t.returnFocus||t.returnFocus())},onHotKey(t){const n=(0,h.PA)(e,2),r=(t.target||t.srcElement).name;if(n.name===r||r.startsWith(`${n.name}:`))return t.preventDefault(),e.onClick()}}))),xI=h.gK.compose("ShortcutModel",yI,bI,ze),wI=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{const n={background:pt()(e.background).alpha(.15),color:"#333333",cursor:"pointer",margin:"5px"};return(0,_.jsxs)(vI.A,{"data-shortcut":!0,onClick:t=>(t.preventDefault(),t.stopPropagation(),e.onClick(),!1),style:n,children:[e.alias?e.alias:e._value,t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)(ar,{children:["[",e.hotkey,"]"]})]})})));x.addTag("shortcut",xI,wI);var CI=n(44318);const SI=p.forwardRef((({treeData:e,onChange:t},n)=>{(0,p.useImperativeHandle)(n,(()=>({resetValue(){i(""),t(e,[])},focus(){var e;return null==(e=r.current)?void 0:e.focus()}})));const r=(0,p.useRef)(),[o,i]=(0,p.useState)("");(0,p.useEffect)((()=>{const n=l(e,o);t(n.filteredDataTree,null)}),[e]);const a=(0,p.useCallback)((e=>"string"==typeof e?e:"object"==typeof e.props.children?a(e.props.children):e.props.children),[]),s=(0,p.useCallback)(((e,t)=>{const n=String(e).toLowerCase(),r=a(t.title);return!!n&&String(r).toLowerCase().includes(n)}),[]),l=(0,p.useCallback)(((e,t)=>{const n=[];if(!t)return{filteredDataTree:e,expandedKeys:n};const r=(e,o=!1)=>e.reduce(((e,i)=>{const a=i.children,l=o||s(t,i),c=null!=a&&a.length?r(a,l):void 0;var d;(l||null!=c&&c.length)&&(!o&&null!=(d=i.children)&&d.length&&n.push(i.key),e.push(Object.assign({},i,{isLeaf:!(null!=c&&c.length),children:c})));return e}),[]);return{filteredDataTree:r(e),expandedKeys:n}}),[]),c=(0,p.useCallback)((0,KC.debounce)((async n=>{const r=l(e,n.target.value);t(r.filteredDataTree,r.expandedKeys)}),300),[e]);return(0,_.jsx)(Ze.eB,{ref:r,value:o,tag:"input",onChange:e=>{i(e.target.value),c(e)},onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||e.stopPropagation()},placeholder:"Search","data-testid":"taxonomy-search",name:"taxonomy-search-input"})})),jI=({items:e,selected:t,onChange:n,onLoadData:r,defaultSearch:o=!0,options:i})=>{var a;const s=(0,p.useRef)(null),[l,c]=(0,p.useState)([]),[d,u]=(0,p.useState)([]),[h,g]=(0,p.useState)([]),m=i.pathSeparator,f={minWidth:null!=(a=i.minWidth)?a:200,maxWidth:i.maxWidth},v=void 0===i.dropdownWidth||+i.dropdownWidth,y=!!i.maxUsages&&t.length>=i.maxUsages,b=t.map((e=>e.map((e=>e.value)).join(m))),x=t.map((e=>({value:e.map((e=>e.value)).join(m),label:i.showFullPath?e.map((e=>e.label)).join(m):e.at(-1).label})));(0,p.useEffect)((()=>{c(((e,t,n)=>{const r=e=>{const t=e=>(0,_.jsx)("span",{className:"htx-taxonomy-item-color",style:{background:e.color},children:e.label});return e.hint?(0,_.jsx)(ir,{title:e.hint,mouseEnterDelay:500,children:e.color?t(e):(0,_.jsx)("span",{children:e.label})}):e.color?t(e):e.label},o=e=>{var i;const a=e.path.join(t.pathSeparator),s=t.leafsOnly&&(!1===e.isLeaf||!!e.children),l=t.maxUsagesReached&&!n.includes(a);return{title:r(e),value:a,key:a,isLeaf:!1!==e.isLeaf&&!e.children,disableCheckbox:s||l,children:null==(i=e.children)?void 0:i.map(o)}};return e.map(o)})(e,Object.assign({},i,{maxUsagesReached:y}),b))}),[e,y]);const w=(0,p.useCallback)((async e=>null==r?void 0:r(e.value.split(m))),[]),C=(0,p.useCallback)(((e,t)=>{u(e),null!=t&&t.length?g(t):g(void 0)}),[]),S=(0,p.useCallback)((e=>(0,_.jsxs)(_.Fragment,{children:[!o&&(0,_.jsx)(SI,{ref:s,treeData:l,onChange:C}),e]})),[l]),j=(0,p.useCallback)((e=>{var t;e?setTimeout((()=>{var e;null==(e=s.current)||e.focus()}),200):null==(t=s.current)||t.resetValue()}),[s]);return(0,_.jsx)(CI.A,{treeData:o?l:d,value:x,labelInValue:!0,onChange:e=>n(null,e.map((e=>e.value.split(m)))),loadData:w,treeCheckable:!0,showSearch:o,showArrow:!o,dropdownRender:S,onDropdownVisibleChange:j,treeExpandedKeys:o?void 0:h,onTreeExpand:e=>{g(e)},treeCheckStrictly:!0,showCheckedStrategy:CI.A.SHOW_ALL,treeExpandAction:!1,dropdownMatchSelectWidth:v,placeholder:i.placeholder||"Click to add...",style:f,className:"htx-taxonomy"})},kI=h.gK.model("SharedStoreModel",{id:h.gK.identifier,locked:!1,children:Te.unionArray(["choice"])}).actions((e=>({setChildren(t){e.children=t},clear(){e.children=[]},lock(){e.locked=!0},unlock(){e.locked=!1},destroy(){e.clear(),(0,h.Yo)(e)}}))),OI=new Map,RI=new Set,EI=h.gK.optional(h.gK.maybeNull(h.gK.string),null),_I=h.gK.optional(h.gK.maybeNull(h.gK.late((()=>h.gK.reference(kI)))),null),AI=h.gK.model("SharedStoreMixin",{sharedstore:EI,store:_I}).views((e=>({get children(){return e.sharedChildren},get locked(){var t,n;return null!=(t=null==(n=e.store)?void 0:n.locked)&&t},set children(t){var n;null==(n=e.store)||n.lock(),e.store.setChildren(t)},get sharedChildren(){var t;return null!=(t=e.store.children)?t:[]},get storeId(){var t;return null!=(t=e.sharedstore)?t:e.name}}))).actions((e=>({afterCreate(){if(!e.store){const t=OI.get(e.storeId);Te.getParentOfTypeString(e,"AnnotationStore").addSharedStore(t),RI.add(e.storeId),e.store=e.storeId}}}))).preProcessSnapshot((e=>{var t;const n=null!=(t=e.sharedstore)?t:e.name;var r,o;RI.has(n)?e.store=n:OI.set(n,kI.create({id:n,children:null!=(r=null!=(o=e._children)?o:e.children)?r:[]}));return e})),TI=()=>{OI.clear(),RI.clear()},PI={taxonomy:"lsf-taxonomy",taxonomy__loading:"lsf-taxonomy__loading",taxonomy__new:"lsf-taxonomy__new"},II=["alias","children","isLeaf","value"],LI=h.gK.model({toname:h.gK.maybeNull(h.gK.string),labeling:h.gK.optional(h.gK.boolean,!1),leafsonly:h.gK.optional(h.gK.boolean,!1),showfullpath:h.gK.optional(h.gK.boolean,!1),legacy:h.gK.optional(h.gK.boolean,!1),pathseparator:h.gK.optional(h.gK.string," / "),apiurl:h.gK.maybeNull(h.gK.string),placeholder:"",minwidth:h.gK.maybeNull(h.gK.string),maxwidth:h.gK.maybeNull(h.gK.string),dropdownwidth:h.gK.maybeNull(h.gK.string),maxusages:h.gK.maybeNull(h.gK.string),value:h.gK.optional(h.gK.string,"")});const MI=new Map,KI=h.gK.model({}).views((e=>({get result(){if(!e.isLabeling&&!e.perregion)return e.peritem?e._perItemResult:e.annotation.results.find((t=>t.from_name===e));const t=e.annotation.highlightedNode;return t?e.annotation.results.find((n=>n.from_name===e&&n.area===t)):null},get canRemoveItems(){return!e.isLabeling||!e.result}}))).actions((e=>{const t={updateResult:e.updateResult};return{updateResult(){if(!e.isLabeling)return t.updateResult();e.result&&e.result.area.setValue(e)},findLabel(t){let n,r="",o=e.items;for(const a of t){var i;if(n=null==(i=o)?void 0:i.find((e=>e.path.at(-1)===a)),!n)return null;o=n.children,r=e.showfullpath&&r?r+e.pathseparator+n.label:n.label}const a={value:r,id:t.join(e.pathseparator)};return n.color&&(a.background=n.color,a.parent={}),a}}})),DI=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"taxonomy",[(0,O.VS)(O.Ls)?"_children":"children"]:Te.unionArray(["choice"])}).volatile((()=>({maxUsagesReached:!1,selected:[],loading:!0,_api:"",_items:[]}))).views((e=>(0,O.VS)(O.Ls)?{get children(){return e._children},set children(t){e._children=t},get isLabeling(){return(0,O.VS)(O.um)&&e.labeling}}:{})).views((e=>({get userLabels(){return e.annotation.store.userLabels},get holdsState(){return e.selected.length>0},get isSelected(){return e.holdsState},get hasValue(){return e.holdsState},get valueType(){return"taxonomy"},get tiedChildren(){return D.filterChildrenOfType(e,"ChoiceModel")},get preselectedValues(){return e.tiedChildren.filter((e=>!0===e.selected&&!e.isSkipped)).map((e=>e.resultValue))},get isLoadedByApi(){return(0,O.VS)(O.yD)&&!!e.apiurl},get items(){var t,n;if(e.isLoadedByApi)return e._items;const r=function(e){const t=(e,t=[])=>{const r=new Set,o=[];for(const i of e)r.has(i.value)||(r.add(i.value),o.push(n(i,t)));return o},n=(e,n=[])=>{var r;const o=e.value,i=e.hint,a=[...n,null!=(r=e.alias)?r:o],s={label:o,path:a,depth:n.length,hint:i};return e.color&&(s.color=e.color),e.children&&(s.children=t(e.children,a)),s};return e?Array.isArray(e)?t(e):t([e]):[]}(e.children),o=null!=(t=null==(n=e.userLabels)?void 0:n.controls[e.name])?t:[];for(const e of o){let t={children:r};const{origin:n,path:o}=e,a=o.length-1;for(let e=0;et.label===o[e])),!t)break}t&&(t.children||(t.children=[]),t.children.push({label:o[a],path:o,depth:a,origin:n}))}return r},get selectedItems(){return e.selected.map((t=>{let n=e.items;const r=[];for(const e of t){var o,i;const t=n.find((t=>t.path.at(-1)===e));r.push({label:null!=(o=null==t?void 0:t.label)?o:e,value:e}),n=null!=(i=null==t?void 0:t.children)?i:[]}return r}))},get defaultChildType(){return"choice"},selectedValues:()=>e.selected,findItemByValueOrAlias(t){const n=e=>{for(const r of e){const e=r.label,o=r.path[r.path.length-1];if(r.value=e,o!==e&&(r.alias=o),r.value===t||r.alias===t)return r;if(r.children){const e=n(r.children,t);if(e)return e}}};return n(e.items)}}))).actions((e=>({afterAttach(){var t;if(e.isLoadedByApi)return;const n=null!=(t=MI.get(e.name))?t:[];(0,O.VS)(O.Ls)&&e.store&&n.length!==e.children.length?(0,O.VS)(O.xD)?e.updateChildren():setTimeout((()=>e.updateChildren())):e.loading=!1},loadItems:(0,h.L3)((function*(t){if(!e._api)return;let n,r={};if(t){n={children:e.items};for(const e of t){var o;if(n=null==(o=n.children)?void 0:o.find((t=>t.path.at(-1)===e)),!n)return}}if(t&&(!1!==n.isLeaf||n.children))return;e.loading=!0;const i=new URL(e._api);null==t||t.forEach((e=>i.searchParams.append("path",e))),i.username&&i.password&&(r={headers:new Headers({Authorization:`Basic ${btoa(`${i.username}:${i.password}`)}`})},i.username="",i.password="");try{var a;const o=yield fetch(i,r),{ok:s,status:l,statusText:c}=o;if(!s)throw new Error(`${l} ${c}`);const d=yield o.json(),u=null!=(a=d.items)?a:d,h=(e,t)=>e.map((e=>{let{alias:n,children:r,isLeaf:o,value:i}=e,a=(0,Yn.A)(e,II);const s=Object.assign({label:i,path:[...t,null!=n?n:i],depth:t.length,isLeaf:o},a);return r&&(s.children=h(r,s.path)),s})),g=h(u,null!=t?t:[]);t?(n.children=g,e._items=[...e._items]):e._items=g}catch(t){const n=Ge.A.ERR_LOADING_HTTP({attr:"apiUrl",error:String(t),url:e.apiurl});e.annotationStore.addErrors([Kj.generalError(n)]),console.error(t)}e.loading=!1})),beforeDestroy(){MI.delete(e.name)},updateChildren(){var t;const n=null!=(t=MI.get(e.name))?t:[];if(n.length){const t=(0,h.Zn)(e),r=e=>{null==e||e.map((e=>{null==e.updateValue||e.updateValue(t),r(e.children)}))};e._children=n,e.children=[...n],e.store.unlock(),MI.delete(e.name),r(e.children)}e.loading=!1},requiredModal(){fn.warning(e.requiredmessage||`Taxonomy "${e.name}" is required.`)},needsUpdate(){e.result?e.selected=e.result.mainValue:e.selected=[],e.maxUsagesReached=e.selected.length>=e.maxusages},updateFromResult(){e.needsUpdate()},onChange(t,n){(!1!==e.canRemoveItems||n.length)&&(e.selected=n.map((e=>{var t;return null!=(t=e.path)?t:e})),e.maxUsagesReached=e.selected.length>=e.maxusages,e.updateResult())},unselectAll(){(0,O.VS)(O.um)&&e.isLabeling&&(e.selected=[])},onAddLabel(t){var n;null==(n=e.userLabels)||n.addLabel(e.name,t)},onDeleteLabel(t){var n;null==(n=e.userLabels)||n.deleteLabel(e.name,t)}}))).actions((e=>{const t={validate:e.validate};return{validate(){if(!t.validate()||e.maxusages&&e.selected.length>e.maxusages)return!1},beforeSend(){e.maxusages&&e.selected.length>e.maxusages&&fn.warning(`The number of options selected (${e.selected.length}) exceed the maximum allowed (${e.maxusages}). To proceed, first unselect excess options for:\r\n • Taxonomy (${e.name})`)}}})).actions((e=>{const t={updateValue:e.updateValue};return{updateValue:(0,h.L3)((function*(n){var r;if(!e.isLoadedByApi)return null==t.updateValue?void 0:t.updateValue(n);e._api=j(e.apiurl,n.task.dataObj),e._api=null!=(r=yield n.presignUrlForProject(e._api))?r:e._api,yield e.loadItems()}))}})).preProcessSnapshot((e=>{if((0,O.VS)(O.Ls)){var t;const n=null!=(t=e._children)?t:e.children;n&&!MI.has(e.name)&&MI.set(e.name,n),delete e._children,delete e.children}return e})),NI=h.gK.compose("TaxonomyModel",QR,BE,LI,qR,Pe,OE,DI,...(0,O.VS)(O.Ls)?[AI]:[],ct,...(0,O.VS)(O.gF)?[jE]:[],...(0,O.VS)(O.um)?[KI]:[],$e,S_,JE),VI=(0,y.PA)((({item:e})=>{const t=[PI.taxonomy,"taxonomy",(0,O.VS)(O.yD)?PI.taxonomy__new:""].filter(Boolean).join(" "),n=e.perRegionVisible()&&e.isVisible?{}:{display:"none"},r={showFullPath:e.showfullpath,leafsOnly:e.leafsonly,pathSeparator:e.pathseparator,maxUsages:e.maxusages,maxWidth:e.maxwidth,minWidth:e.minwidth,dropdownWidth:e.dropdownwidth,placeholder:e.placeholder,canRemoveItems:e.canRemoveItems},o=!e.isLoadedByApi||!e.items.length;return e.loading&&(0,O.VS)(O.Ls)&&o?(0,_.jsx)("div",{className:t,style:n,children:(0,_.jsx)("div",{className:PI.taxonomy__loading,children:(0,_.jsx)(v.A,{size:"small"})})}):(0,_.jsx)("div",{className:t,style:n,ref:e.elementRef,children:(0,O.VS)(O.yD)&&!e.legacy?(0,_.jsx)(jI,{items:e.items,selected:e.selectedItems,onChange:e.onChange,onLoadData:e.loadItems,onAddLabel:e.userLabels&&e.onAddLabel,onDeleteLabel:e.userLabels&&e.onDeleteLabel,options:r,defaultSearch:!(0,O.VS)(O._m),isEditable:!e.isReadOnly()}):(0,_.jsx)(y_,{items:e.items,selected:e.selected,onChange:e.onChange,onAddLabel:e.userLabels&&e.onAddLabel,onDeleteLabel:e.userLabels&&e.onDeleteLabel,options:r,isEditable:!e.isReadOnly()})})}));x.addTag("taxonomy",NI,VI);const zI=h.gK.model({controlledTags:Te.unionTag(["HyperText"])}),BI=h.gK.model("HyperTextLabelsModel",{type:"hypertextlabels",children:Te.unionArray(["label","header","view","hypertext"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get serializableValue(){const t={};return t[e.resultType]=e.selectedValues(),t},get resultType(){return"hypertextlabels"},get valueType(){return"hypertextlabels"}}))),HI=h.gK.compose(QR,dE,BI,zI,ZR,YR.props({_child:"LabelModel"})),FI=h.gK.compose("HyperTextLabelsModel",HI),WI=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("hypertextlabels",FI,WI);const $I=h.gK.model({opacity:h.gK.optional(h.gK.string,"0.9"),fillcolor:h.gK.maybeNull(h.gK.string),strokeWidth:h.gK.optional(h.gK.number,1),strokeColor:h.gK.optional(h.gK.string,"#f48a42")}),UI=h.gK.model("TimeSeriesLabelesModel",{pid:h.gK.optional(h.gK.string,E),type:"timeserieslabels",children:Te.unionArray(["labels","label","choice"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t?t.filter((e=>!0===e.isSelected)):null}}))),ZI=ZR.props({_type:"timeserieslabels"}).views((e=>({get shouldBeUnselected(){return"single"===e.choice}}))),GI=h.gK.compose(QR,dE,UI,$I,ZI,YR.props({_child:"LabelModel"})),YI=h.gK.compose("TimeSeriesLabelsModel",GI),XI=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("timeserieslabels",YI,XI);const qI=h.gK.model({toname:h.gK.maybeNull(h.gK.string)}),JI=h.gK.model("TimelineLabelsModel",{pid:h.gK.optional(h.gK.string,E),type:"timelinelabels"}),QI=h.gK.compose("TimelineLabelsModel",QR,dE,JI,qI,YR.props({_child:"LabelModel"})),eL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("timelinelabels",QI,eL);const tL=h.gK.model({toname:h.gK.maybeNull(h.gK.string)}),nL=h.gK.model("VideoRectangleModel",{pid:h.gK.optional(h.gK.string,E),type:"videorectangle"}),rL=h.gK.compose("VideoRectangleModel",QR,nL,tL),oL=(0,y.PA)((()=>null));x.addTag("videorectangle",rL,oL);const iL=h.gK.model().volatile((()=>({isSeparated:!0}))).views((e=>({get obj(){var t;return null==(t=e.annotation)?void 0:t.names.get(e.toname)},get selectedLabels(){return[]},selectedValues:()=>[],getResultValue:()=>({})}))),aL=h.gK.model().actions((e=>({afterAttach(){var t;const n=null!=(t=e.toolNames)?t:[],r=RR.getInstance({name:e.toname}),o={manager:r,control:e},i={};n.forEach((e=>{if(e in l){const t=l[e].create({},o);i[e]=t}})),e.tools=i,r.addToolsFromControl(e)}}))),sL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),strokewidth:h.gK.optional(h.gK.string,"15")}),lL=h.gK.model({type:"brush",removeDuplicatesNamed:"Erase"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["Brush","Erase"]}))),cL=h.gK.compose("BrushModel",QR,Pe,iL,sL,lL,aL);x.addTag("brush",cL,(()=>null));const dL=h.gK.model({controlledTags:Te.unionTag(["Image"])}),uL=h.gK.model("BrushLabelsModel",{type:"brushlabels",children:Te.unionArray(["label","header","view","hypertext"])}),hL=h.gK.compose("BrushLabelsModel",QR,dE,uL,cL,dL,ZR,YR.props({_child:"LabelModel"})),gL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("brushlabels",hL,gL);const mL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.2"),fillcolor:h.gK.optional(Re.color,"#f48a42"),strokewidth:h.gK.optional(h.gK.string,"1"),strokecolor:h.gK.optional(Re.color,"#f48a42"),fillopacity:h.gK.maybeNull(Re.range()),canrotate:h.gK.optional(h.gK.boolean,!0)}),pL=h.gK.model({type:"ellipse"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["Ellipse"]}))),fL=h.gK.compose("EllipseModel",QR,Pe,iL,mL,pL,aL);x.addTag("ellipse",fL,(()=>null));const vL=h.gK.model("EllipseLabelsModel",{type:"ellipselabels",children:Te.unionArray(["label","header","view","hypertext"])}),yL=h.gK.compose(QR,dE,vL,fL,ZR,YR.props({_child:"LabelModel"})),bL=h.gK.compose("EllipseLabelsModel",yL),xL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("ellipselabels",bL,xL);const wL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.9"),fillcolor:h.gK.optional(Re.color,"#8bad00"),snap:h.gK.optional(h.gK.string,"none"),strokecolor:h.gK.optional(Re.color,"#8bad00"),strokewidth:h.gK.optional(h.gK.string,"2")}),CL=h.gK.model({type:"keypoint"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["KeyPoint"],snapMode:Je}))),SL=h.gK.compose("KeyPointModel",QR,Pe,iL,wL,CL,aL);x.addTag("keypoint",SL,(()=>null));const jL=h.gK.model({controlledTags:Te.unionTag(["Image"])}),kL=h.gK.model("KeyPointLabelsModel",{type:"keypointlabels",children:Te.unionArray(["label","header","view","hypertext"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))),OL=h.gK.compose(QR,dE,kL,SL,jL,ZR,YR.props({_child:"LabelModel"})),RL=h.gK.compose("KeyPointLabelsModel",OL),EL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("keypointlabels",RL,EL);const _L=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.6"),blurradius:h.gK.optional(h.gK.string,"5"),defaultthreshold:h.gK.optional(h.gK.string,"15")}),AL=h.gK.model({type:"magicwand",removeDuplicatesNamed:"Erase"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["MagicWand","Erase"]}))),TL=h.gK.compose("MagicWandModel",QR,Pe,iL,_L,AL,aL);(0,O.VS)(O.bP)&&x.addTag("magicwand",TL,(()=>null));const PL=yr("Polygons"),IL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.2"),fillcolor:h.gK.optional(Re.color,"#f48a42"),strokewidth:h.gK.optional(h.gK.string,"2"),strokecolor:h.gK.optional(Re.color,"#f48a42"),snap:h.gK.optional(h.gK.string,"none"),pointsize:h.gK.optional(h.gK.string,"small"),pointstyle:h.gK.optional(h.gK.string,"circle")}),LL=h.gK.model({controlledTags:Te.unionTag(["Image"])}),ML=h.gK.model({type:"polygon",_value:h.gK.optional(h.gK.string,"")}).volatile((()=>({toolNames:["Polygon"]}))).actions((e=>({initializeHotkeys(){PL.addNamed("polygon:undo",(()=>{e.annotation.isDrawing&&e.annotation.undo()})),PL.addNamed("polygon:redo",(()=>{e.annotation.isDrawing&&e.annotation.redo()}))},disposeHotkeys(){PL.removeNamed("polygon:undo"),PL.removeNamed("polygon:redo")},afterCreate(){e.initializeHotkeys()},beforeDestroy(){e.disposeHotkeys()}}))),KL=h.gK.compose("PolygonModel",QR,Pe,iL,IL,LL,aL,ML);x.addTag("polygon",KL,(()=>null));const DL=h.gK.model({controlledTags:Te.unionTag(["Image"])}),NL=h.gK.model("PolygonLabelsModel",{type:"polygonlabels",children:Te.unionArray(["label","header","view","hypertext"])}),VL=h.gK.compose(QR,dE,NL,KL,DL,ZR,YR.props({_child:"LabelModel"})),zL=h.gK.compose("PolygonLabelsModel",VL),BL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("polygonlabels",zL,BL);const HL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.2"),fillcolor:h.gK.optional(Re.color,"#f48a42"),strokewidth:h.gK.optional(h.gK.string,"1"),strokecolor:h.gK.optional(Re.color,"#f48a42"),fillopacity:h.gK.maybeNull(Re.range()),canrotate:h.gK.optional(h.gK.boolean,!0)}),FL=h.gK.model({type:"rectangle"}).volatile((()=>({toolNames:["Rect","Rect3Point"]}))),WL=h.gK.compose("RectangleModel",QR,Pe,iL,HL,FL,aL);x.addTag("rectangle",WL,(()=>null));const $L=h.gK.model({controlledTags:Te.unionTag(["Image"])}),UL=h.gK.model("RectangleLabelsModel",{pid:h.gK.optional(h.gK.string,E),type:"rectanglelabels",children:Te.unionArray(["label","header","view","hypertext"])}),ZL=h.gK.compose(QR,dE,UL,WL,$L,ZR,YR.props({_child:"LabelModel"})),GL=h.gK.compose("RectangleLabelsModel",ZL),YL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("rectanglelabels",GL,YL);const XL=h.gK.model({choice:h.gK.optional(h.gK.enumeration(["single","multiple"]),"multiple")}),qL=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"relations",children:Te.unionArray(["relation"])}).views((e=>({get values(){return e.children.map((e=>e.value))},findRelation:t=>e.children.find((e=>e.value===t))}))).actions((()=>({}))),JL=h.gK.compose("RelationsModel",qL,XL);x.addTag("relations",JL,(()=>null));const QL=h.gK.model({value:h.gK.maybeNull(h.gK.string),background:h.gK.optional(Re.color,V.A.RELATION_BACKGROUND)}),eM=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"relation"}).actions((()=>({}))),tM=h.gK.compose("RelationModel",QL,eM);x.addTag("relation",tM,(()=>null));var nM=n(68703);const{Panel:rM}=nM.A,oM=h.gK.model({type:"panel",_value:h.gK.optional(h.gK.string,""),value:h.gK.optional(h.gK.string,""),children:Te.unionArray(["view","header","labels","label","table","taxonomy","choices","choice","rating","ranker","rectangle","ellipse","polygon","keypoint","brush","rectanglelabels","ellipselabels","polygonlabels","keypointlabels","brushlabels","hypertextlabels","text","audio","image","hypertext","audioplus","list","dialog","textarea","pairwise","style","label","relations","filter","timeseries","timeserieslabels","paragraphs","paragraphlabels"])}),iM=h.gK.model({type:"collapse",size:h.gK.optional(h.gK.string,"4"),style:h.gK.maybeNull(h.gK.string),_value:h.gK.optional(h.gK.string,""),value:h.gK.optional(h.gK.string,""),bordered:h.gK.optional(h.gK.boolean,!1),accordion:h.gK.optional(h.gK.boolean,!0),children:Te.unionArray(["panel"])}),aM=h.gK.compose("CollapseModel",iM,ze),sM=(0,y.PA)((({item:e})=>(0,_.jsx)(nM.A,{bordered:e.bordered,accordion:e.accordion,children:e.children.filter((e=>"panel"===e.type)).map((t=>(0,_.jsx)(rM,{header:t._value,children:D.renderChildren(t,e.annotation)},t._value)))})));x.addTag("panel",h.gK.compose("PanelModel",oM,ze),(()=>{})),x.addTag("collapse",aM,sM);var lM=n(70821),cM=n(92132);const dM={block:"block--fqozC",block_selected:"block_selected--BXxdo",name:"name--sC49k",tag:"tag--efLdj",date:"date--h1U4a"};class uM extends p.Component{render(){let e,t,n,r=`${dM.block}`;return this.props.hint&&(e=(0,_.jsx)(vI.A,{color:"blue",children:this.props.hint})),this.props.bg&&(t=this.props.bg),this.props.selected&&(r=`${r} ${dM.block_selected}`,e=(0,_.jsx)("div",{children:(0,_.jsx)(vI.A,{color:"magenta",children:"Selected Message"})}),this.props.hint&&(e=(0,_.jsx)("div",{className:dM.tag,children:(0,_.jsx)(vI.A,{color:"magenta",children:this.props.hint})}))),this.props.date&&(n=(0,_.jsx)("span",{className:dM.date,children:this.props.date})),(0,_.jsxs)("div",{className:r,style:{background:t,width:"max-content",maxWidth:"100%"},children:[(0,_.jsxs)("span",{className:dM.name,children:[this.props.name,": "]}),(0,_.jsx)("p",{className:dM.text,children:this.props.text}),n,e]})}}uM.propTypes={name:Ce.PropTypes.string.isRequired,text:Ce.PropTypes.string.isRequired,selected:Ce.PropTypes.bool,date:Ce.PropTypes.string,hint:Ce.PropTypes.string};const hM=h.gK.model({name:h.gK.string,text:h.gK.string,selected:h.gK.optional(h.gK.boolean,!1),date:h.gK.optional(h.gK.string,""),hint:h.gK.optional(h.gK.string,"")}),gM=h.gK.model({value:h.gK.maybeNull(h.gK.string),name:h.gK.maybeNull(h.gK.string)}),mM=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"Dialog",data:h.gK.map(hM)}),pM=h.gK.compose("DialogModel",gM,mM,Pe),fM=(0,y.WQ)("store")((0,y.PA)((({store:e,item:t})=>{if(!e.task||!e.task.dataObj)return(0,_.jsx)(lM.A,{});const n=[];let r=t.value;return"$"===r.charAt(0)&&(r=r.substr(1)),e.task.dataObj[r].forEach(((e,t)=>{let r;e.name&&(r=(0,gt.convertToRGBA)((0,gt.stringToColor)(e.name),.1)),n.push((0,_.jsx)(uM,{name:e.name,hint:e.hint,text:e.text,selected:e.selected,date:e.date,id:e.id,bg:r},t))})),(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{style:{display:"flex",flexFlow:"column",maxHeight:"500px",overflowY:"scroll",paddingRight:"10px",marginTop:"10px"},children:n}),(0,_.jsx)(cM.A,{dashed:!0})]})})));x.addTag("dialog",pM,fM);const vM=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"header",size:h.gK.optional(h.gK.string,"4"),style:h.gK.maybeNull(h.gK.string),_value:h.gK.optional(h.gK.string,""),value:h.gK.optional(h.gK.string,""),underline:h.gK.optional(h.gK.boolean,!1)}),yM=h.gK.compose("HeaderModel",vM,ze),bM=(0,y.PA)((({item:e})=>{const t=(0,w.clamp)(Number.parseInt(e.size),1,5),n=e.style?D.cssConverter(e.style):{margin:"10px 0"};return!n.fontSize&&t>4&&(n.fontSize=5===t?"1.2em":"1.1em"),(0,_.jsx)(TE.A.Title,{underline:e.underline,level:t,style:n,children:e._value})}));x.addTag("header",yM,bM);const xM=h.gK.model({classname:h.gK.optional(h.gK.string,""),display:h.gK.optional(h.gK.string,"block"),style:h.gK.maybeNull(h.gK.string),idattr:h.gK.optional(h.gK.string,"")}),wM=h.gK.model({id:h.gK.identifier,type:"view",children:Te.unionArray(["view","header","labels","label","table","taxonomy","choices","choice","collapse","datetime","number","rating","ranker","rectangle","ellipse","polygon","keypoint","brush","magicwand","rectanglelabels","ellipselabels","polygonlabels","keypointlabels","brushlabels","hypertextlabels","timeserieslabels","text","audio","image","hypertext","richtext","timeseries","audioplus","list","dialog","textarea","pairwise","style","relations","filter","pagedview","paragraphs","paragraphlabels","video","videorectangle","timelinelabels"])}),CM=h.gK.compose("ViewModel",xM,wM,JE,Pe),SM=(0,y.PA)((({item:e})=>{let t={};return"inline"===e.display&&(t={display:"inline-block",marginRight:"15px"}),e.style&&(t=D.cssConverter(e.style)),!1===e.isVisible&&(t.display="none"),(0,_.jsx)("div",{id:e.idattr,className:e.classname,style:t,children:D.renderChildren(e,e.annotation)})}));x.addTag("view",CM,SM);const jM=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"style",value:h.gK.optional(h.gK.string,"")}),kM=h.gK.compose("StyleModel",jM),OM=(0,y.PA)((({item:e})=>(0,_.jsx)("style",{dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(e.value)}})));x.addTag("style",kM,OM);var RM=n(31927);const EM=h.gK.model({casesensetive:h.gK.optional(h.gK.boolean,!1),cleanup:h.gK.optional(h.gK.boolean,!0),placeholder:h.gK.optional(h.gK.string,"Quick Filter"),minlength:h.gK.optional(h.gK.string,"3"),hotkey:h.gK.maybeNull(h.gK.string)}),_M=h.gK.model(Object.assign({type:"filter",_value:h.gK.maybeNull(h.gK.string)},(0,O.VS)(O.cE)?{id:h.gK.identifier,name:h.gK.string}:{name:h.gK.identifier},{toname:h.gK.maybeNull(h.gK.string)})).views((e=>({get toTag(){return e.annotation.names.get(e.toname)}}))).actions((e=>({applyFilter(){let t=e._value;const n=e.toTag.tiedChildren;Number(e.minlength)>t.length?n.filter((e=>!e.visible)).forEach((e=>e.setVisible(!0))):(e.casesensetive||(t=t.toLowerCase()),n.forEach((n=>{let r=n._value;e.casesensetive||(r=r.toLowerCase()),-1!==r.indexOf(t)?n.setVisible(!0):n.setVisible(!1)})))},applyFilterEv(t){const{value:n}=t.target;e._value=n,e.applyFilter()},onHotKey:()=>(e._ref&&e._ref.focus(),!1),setInputRef(t){e._ref=t},selectFirstElement(){e.toTag.selectFirstVisible()&&e.cleanup&&(e._value="",e.applyFilter())}}))),AM=h.gK.compose("FilterModel",_M,EM,ze,Pe),TM=(0,y.PA)((({item:e})=>{const t=e.toTag;return-1===t.type.indexOf("labels")&&-1===t.type.indexOf("choices")?null:(0,_.jsx)(RM.A,{ref:t=>{e.setInputRef(t)},value:e._value,size:"small",onChange:e.applyFilterEv,onPressEnter:e.selectFirstElement,placeholder:e.placeholder})}));function PM(e){const t=[e];let n;for(;n=t.pop();){const e=Object.keys(n),r=Object.getOwnPropertyDescriptors(n);if(!("svg"===n.elementType))for(const o of e){const e=n[o],i=r[o].writable;e&&i&&("_debugOwner"!==o&&"object"==typeof e&&{}.hasOwnProperty.call(e,"stateNode")&&t.push(n[o]),"object"!=typeof e&&"function"!=typeof e||(n[o]=null))}}}function IM(e){const t=Object.keys(e);for(const e of t){const t=RegExp(/^__reactProps(\$[^$]+)$/).exec(e);if(t)return t[1]}return""}function LM(e,t){for(const n of e){if(n.isConnected)return;if("svg"===n.tagName)return;const e=Object.keys(n).filter((e=>e.startsWith("__react")&&(!RegExp(/^(?:__reactProps|__reactFiber)/).exec(e)||RegExp(new RegExp(`\\${t}$`)).exec(e))));if(e.length){for(const t of e)PM(n[t]),n[t]=null;n.childNodes&&LM(n.childNodes,t)}}}x.addTag("filter",AM,TM);const MM=new WeakMap;function KM(e,t="default"){MM.has(e)||MM.set(e,new Map);const n=MM.get(e);return n.has(t)||n.set(t,function(){let e=null;return t=>{if(t)e=t;else if(e){const t=e,n=IM(t);e=null,setTimeout((()=>{LM([t],n)}))}}}()),n.get(t)}function DM({annotation:e,root:t}){return(0,p.useLayoutEffect)((()=>()=>{e&&(0,h._n)(e)&&e.resetReady()}),[e.pk,e.id]),t?D.renderItem(t,e):null}const NM=(0,Ze.cn)("draft-panel"),VM=(0,y.PA)((({item:e})=>{if(!e.draftSaved&&!e.versions.draft)return null;const t=e.draft&&e.draftSaved?` saved ${rn.UDate.prettyDate(e.draftSaved)}`:"";return e.selected?e.versions.result&&e.versions.result.length?(0,_.jsxs)("div",{className:NM,children:[(0,_.jsx)(ir,{placement:"topLeft",title:e.draftSelected?"switch to original result":"switch to current draft",children:(0,_.jsx)("button",{type:"button",onClick:()=>e.toggleDraft(),className:NM.elem("toggle"),children:e.draftSelected?"draft":"original"})}),t]}):(0,_.jsx)("div",{className:NM,children:t?`draft${t}`:"not submitted draft"}):e.draft?(0,_.jsxs)("div",{className:NM,children:["draft",t]}):null}));var zM=n(11346);const BM=["badge","className","faded","showUsername","size","src","style","user","username","useRandomBackground","children"],HM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",FM=(0,p.forwardRef)(((e,t)=>{var n,r;let{badge:o=null,className:i,faded:a=!1,showUsername:s,size:l,src:c,style:d,user:u={},username:h,useRandomBackground:g=!0,children:m}=e,f=(0,Yn.A)(e,BM);const v=null!=(n=null==u?void 0:u.avatar)?n:c,y=(0,p.useRef)(),[b,x]=(0,p.useState)(v),[C,S]=(0,p.useState)(!1),[j,k]=(0,p.useState)(!0);(0,p.useEffect)((()=>{v!==b&&(x(v),S(!1),k(!0))}),[v]),l&&(d=Object.assign({width:l,height:l,fontSize:.4*l},d));const O=(0,p.useMemo)((()=>(0,w.userDisplayName)(u)),[u]),R=(0,p.useMemo)((()=>{if((0,w.isDefined)(u.id)){var e;const t=null!=(e=localStorage.getItem(`userpic-color-${u.id}`))?e:pt().average([pt().random(),"#cfcfcf"]).css();return localStorage.setItem(`userpic-color-${u.id}`,t),t}return null}),[u,g]),E=(0,p.useMemo)((()=>{if(R){return pt().contrast(R,"#fff")>=4.5?"#fff":"#000"}return null}),[R]),A=(0,p.useCallback)((()=>{S(!0),b!==HM&&k(!1)}),[b]),T=Object.assign({},null!=(r=d)?r:{},{background:R,color:E}),P=(0,_.jsxs)(Ze.eB,Object.assign({ref:t,name:"userpic",mix:i,mod:{faded:a},style:T},f,{children:[m||(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{tag:"img",name:"avatar",ref:y,src:b,alt:(null!=O?O:"").toUpperCase(),style:{opacity:C?a?.3:1:0},onLoad:A,onError:()=>x(HM),mod:{faded:a}}),j&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"username",children:(null!=O?O:"").slice(0,2).toUpperCase()})]}),o&&Object.entries(o).map((([e,t],n)=>(0,_.jsx)(Ze.Sl,{name:"badge",mod:{[e]:!0},children:t},`badge-${n}`)))]})),I=(0,p.useMemo)((()=>{var e,t;return null!=u&&u.firstName||null!=u&&u.lastName?`${null!=(e=null==u?void 0:u.firstName)?e:""} ${null!=(t=null==u?void 0:u.lastName)?t:""}`.trim():null!=u&&u.email?u.email:h}),[u,h]);return s&&I?(0,_.jsx)(ir,{title:I,children:P}):P}));FM.displayName="Userpic";const WM=(0,y.WQ)((({store:e})=>{var t;const n=e.annotationStore,r=null==n?void 0:n.selected;return{annotationStore:n,selected:null==n?void 0:n.selected,createdBy:null!=(t=null==r?void 0:r.user)?t:{email:null==r?void 0:r.createdBy},createdDate:null==r?void 0:r.createdDate,history:null==n?void 0:n.history,selectedHistory:null==n?void 0:n.selectedHistory}})),$M=(0,y.PA)((({annotation:e,inline:t,isSelected:n})=>{var r;const o=e.history.hasChanges,i=e.list,[a,s]=(0,p.useState)(!1);return(0,p.useEffect)((()=>s(!0)),[e.history.history.length]),(0,p.useEffect)((()=>s(!1)),[e.draftSaved]),o||e.versions.draft?(0,_.jsx)(GM,{user:null!=(r=e.user)?r:{email:e.createdBy},date:e.draftSaved,extra:e.isDraftSaving?(0,_.jsx)(Ze.Sl,{name:"saving",children:(0,_.jsx)(Ze.Sl,{name:"spin"})}):a?(0,_.jsx)(Ze.Sl,{name:"saving",children:(0,_.jsx)(Ze.Sl,{name:"dot"})}):o?(0,_.jsx)(Ze.Sl,{name:"saving",children:(0,_.jsx)(Ze.Sl,{name:"saved",component:cu})}):null,inline:t,comment:"",acceptedState:"draft_created",selected:n,onClick:()=>{i.selectHistory(null),e.toggleDraft(!0)}},"draft"):null})),UM=({reason:e,comment:t})=>{const[n,r]=(0,p.useState)(!1),[o,i]=(0,p.useState)(!1),a=(0,p.useRef)();return(0,p.useLayoutEffect)((()=>{if(a.current){const{clientHeight:e}=a.current,t=e>66;i(t),r(t)}}),[]),(0,_.jsxs)(Ze.Sl,{name:"comment",ref:a,mod:{collapsed:n},children:[(0,_.jsx)(Ze.Sl,{name:"comment-content","data-reason":`${e}${t?": ":""}`,children:t}),o&&(0,_.jsx)(Ze.Sl,{name:"collapse-comment",mod:{collapsed:n},onClick:e=>{e.stopPropagation(),r((e=>!e))},children:n?"Show more":"Show less"})]})},ZM=({type:e})=>{const t=(0,p.useMemo)((()=>{switch(e){case"submitted":case"updated":return(0,_.jsx)(Fb,{style:{color:"#617ADA"}});case"draft_created":return(0,_.jsx)(Qb,{style:{color:"#617ADA"}});case"accepted":return(0,_.jsx)(Sb,{style:{color:"#2AA000"}});case"rejected":return(0,_.jsx)(Tb,{style:{color:"#dd0000"}});case"fixed_and_accepted":return(0,_.jsx)(Sb,{style:{color:"#FA8C16"}});case"prediction":return(0,_.jsx)(vx,{style:{color:"#944BFF"}});case"imported":return(0,_.jsx)(Ix,{style:{color:"#2AA000"}});case"skipped":return(0,_.jsx)(kx,{style:{color:"#dd0000"}});case"deleted_review":return(0,_.jsx)(Bx,{style:{color:"#dd0000"}});case"propagated_annotation":return(0,_.jsx)(Xx,{style:{color:"#2AA000"}});default:return null}}),[e]);return t&&(0,_.jsx)(Ze.Sl,{name:"history-icon",children:t})},GM=(0,y.PA)((({entity:e,user:t,date:n,extra:r,comment:o,acceptedState:i,selected:a=!1,disabled:s=!1,inline:l=!1,onClick:c})=>{const d="prediction"===(null==e?void 0:e.type),u=(0,p.useMemo)((()=>{switch(i){case"accepted":return"Accepted";case"rejected":return"Rejected";case"fixed_and_accepted":return"Fixed";case"updated":return"Updated";case"submitted":return"Submitted";case"prediction":return"From prediction";case"imported":return"Imported";case"skipped":return"Skipped";case"draft_created":return"Draft";case"deleted_review":return"Review deleted";case"propagated_annotation":return"Propagated";default:return null}}),[]),h=(0,p.useCallback)((e=>{s||c(e)}),[c,s]);return(0,_.jsxs)(Ze.eB,{name:"history-item",mod:{inline:l,selected:a,disabled:s},onClick:h,children:[(0,_.jsxs)(Fa,{spread:!0,size:"medium",truncated:!0,children:[(0,_.jsxs)(Fa,{size:"small",truncated:!0,children:[(0,_.jsx)(Ze.Sl,{tag:FM,user:t,name:"userpic",showUsername:!0,username:d?e.createdBy:null,mod:{prediction:d},children:d&&(0,_.jsx)(Ps,{style:{width:16,height:16}})}),(0,_.jsx)(Ze.Sl,{name:"name",tag:"span",children:d?e.createdBy:(0,w.userDisplayName)(t)})]}),(0,_.jsxs)(Fa,{size:"small",children:[r&&(0,_.jsx)(Ze.Sl,{name:"date",children:r}),n&&(0,_.jsx)(Ze.Sl,{name:"date",children:(0,_.jsx)(zM.A,{placement:"topRight",title:new Date(n).toLocaleString(),children:(0,w.humanDateDiff)(n)})})]})]}),(u||o)&&(0,_.jsxs)(Ze.Sl,{name:"action",tag:Fa,size:"small",children:[i&&(0,_.jsx)(ZM,{type:i}),(0,_.jsx)(UM,{comment:o,reason:u})]})]})}));GM.displayName="HistoryItem";const YM=WM((0,y.PA)((({annotationStore:e,selectedHistory:t,history:n,enabled:r=!0,showDraft:o=!1,inline:i=!1})=>{const a=e.selected,s=null!=n&&n.length?n[0]:null,l=a.history.hasChanges,c=!e.selectedHistory&&(a.draftSelected||!a.versions.draft&&l);return(0,_.jsxs)(Ze.eB,{name:"annotation-history",mod:{inline:i},children:[o&&(0,_.jsx)($M,{annotation:a,isSelected:c,inline:i}),r&&n.length>0&&n.map((n=>{const{id:r,user:d,createdDate:h}=n,g=(null==s?void 0:s.id)===n.id,m=g&&!t&&o?!c:(null==t?void 0:t.id)===n.id;return(0,_.jsx)(GM,{inline:i,user:null!=d?d:{email:null==n?void 0:n.createdBy},date:h,comment:n.comment,acceptedState:n.actionType,selected:m,disabled:0===n.results.length,onClick:async()=>{o?(l&&(a.saveDraftImmediately(),await(0,u.z7)((()=>!a.isDraftSaving))),g||m?(e.selectHistory(null),a.toggleDraft(m)):e.selectHistory(n)):e.selectHistory(m?null:n)}},r)}))]})})));YM.displayName="AnnotationHistory";const XM=e=>{var t;(0,p.useEffect)((()=>{const t=e=>{var t;if(!e)return!1;if(e.nodeType!==Node.ELEMENT_NODE)return!1;const n=e,r=Number.parseInt(null!=(t=n.getAttribute("tabindex"))?t:"",10);return n.matches("a, button, input, textarea, select, details, [tabindex], [contenteditable]")||r>-1},n=()=>{var e;const n=window.getSelection(),r=null==n?void 0:n.focusNode,o=t(r),i=t(document.activeElement);return(null==(e=null==n?void 0:n.isCollapsed)||e)&&!o&&!i},r=t=>{const{clipboardData:n}=t,r=e.serializedSelection;null==n||n.setData("application/json",JSON.stringify(r)),t.preventDefault()},o=e=>{n()&&r(e)},i=t=>{n()&&(t=>{const{clipboardData:n}=t,r=null==n?void 0:n.getData("application/json");try{const n=(r?JSON.parse(r):[]).map((e=>Object.assign({},e,{readonly:!1})));e.appendResults(n),t.preventDefault()}catch(e){return void console.error(e)}})(t)},a=t=>{n()&&(r(t),e.deleteSelectedRegions())};return window.addEventListener("copy",o),window.addEventListener("paste",i),window.addEventListener("cut",a),()=>{window.removeEventListener("copy",o),window.removeEventListener("paste",i),window.removeEventListener("cut",a)}}),[null!=(t=e.pk)?t:e.id])},qM=(0,y.WQ)("store")((0,y.PA)((({entity:e,showHistory:t=!0})=>{var n;const r=(0,O.VS)(O.Lk);return XM(e),e?(0,_.jsxs)(Ze.eB,{name:"annotation",onClick:e=>e.stopPropagation(),children:[!r&&(0,_.jsx)(VM,{item:e}),t&&(0,_.jsxs)(Ze.Sl,{tag:Fa,spread:!0,name:"title",children:["Annotation History",(0,_.jsxs)(Ze.Sl,{name:"id",children:["#",null!=(n=e.pk)?n:e.id]})]}),(0,_.jsx)(YM,{enabled:t,showDraft:r})]}):null})));var JM=n(65604);const QM={section:"section--REpX0",header:"header--AcE7u",title:"title--Raola",treelabels:"treelabels--_0J5K",switcherIcon:"switcherIcon--qMJcX",treelabel:"treelabel--dvLD2",treetag:"treetag--Ijool",item:"item--vCp4N",lstitem:"lstitem--p2hZD",hidden:"hidden--UN2IK",visible:"visible--zJ3y7",selected:"selected--mRL_K",lstitem_label:"lstitem_label--G8OgE",lstitem__actions:"lstitem__actions--wwYMx",lstitem__actionIcon:"lstitem__actionIcon--ypg29",list:"list--DRxFA",uihidden:"uihidden--qWqTy",uivisible:"uivisible--EGiBT","ant-tree-switcher":"ant-tree-switcher--QgNI1"};var eK=n(23882),tK=n(50417);const nK=(0,y.PA)((({item:e,setDraggable:t})=>{const[n,r]=(0,p.useState)(!1),o=(0,p.useCallback)((e=>{r((e=>!e)),e.preventDefault(),e.stopPropagation()}),[]),i=e.perRegionDescControls||[];return(0,_.jsxs)(Ze.Sl,{name:"desc",tag:"div",mod:{collapsed:n,empty:!((null==i?void 0:i.length)>0)},onMouseEnter:()=>{null==t||t(!1)},onMouseLeave:()=>{null==t||t(!0)},children:[(0,_.jsx)(Ze.Sl,{name:"controls",children:i.map(((t,o)=>{const i=x.getPerRegionView(t.type,lt.REGION_LIST);return i?(0,_.jsx)(i,{item:t,area:e,collapsed:n,setCollapsed:r},o):null}))}),(0,_.jsx)(Ze.Sl,{name:"collapse",tag:za,size:"small",type:"text",onClick:o,children:n?(0,_.jsx)(pc,{}):(0,_.jsx)(Ec,{})})]})})),rK=(0,y.PA)((({idx:e,item:t,setDraggable:n})=>{const r=(0,p.useRef)();return(0,p.useEffect)((()=>{if(t.selected){const e=r.current;if(!e)return;(e.scrollIntoViewIfNeeded||e.scrollIntoView).call(e)}}),[t.selected]),(0,_.jsxs)(Ze.eB,{ref:r,name:"region-item",mod:{hidden:t.hidden},"data-testid":`regionitem:selected=${t.selected}`,children:[(0,_.jsxs)(Ze.Sl,{name:"header",tag:"div",children:[(0,_.jsx)(Ze.Sl,{name:"counter",children:(0,w.isDefined)(e)?e+1:""}),(0,_.jsx)(Ze.Sl,{name:"title",tag:IO,node:t,mix:QM.node}),(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{tag:"span",name:"id",children:(0,_.jsx)(LO,{node:t})}),(0,_.jsx)(Ze.Sl,{name:"prediction",children:"prediction"===t.origin&&(0,_.jsx)(Ps,{style:{width:16,height:16}})}),t.isReadOnly()&&(0,_.jsx)(eK.A,{count:"ro",style:{backgroundColor:"#ccc"}}),t.score&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"score",style:{color:rn.Colors.getScaleGradient(t.score)},children:t.score.toFixed(2)}),t.hideable&&(0,_.jsx)(Ze.Sl,{tag:za,name:"toggle",size:"small",type:"text",mod:{active:!t.hidden},onClick:t.toggleHidden,children:t.hidden?(0,_.jsx)(nc,{}):(0,_.jsx)($l,{})})]})]}),(0,_.jsx)(nK,{item:t,setDraggable:n})]})})),oK=(0,y.PA)((({item:e,idx:t,flat:n,setDraggable:r,onClick:o})=>{const i=(0,p.useMemo)((()=>{let t;return()=>{if(!t){const n=e.getOneColor();t=n?nn({labelColor:n,labelBgColor:pt()(n).alpha(.15)}):null}return t}}),[(0,h._n)(e)&&e.getOneColor()]);if(!(0,h._n)(e))return null;const a=[QM.lstitem,n&&QM.flat,!0===e.hidden&&QM.hidden,e.inSelection&&QM.selected].filter(Boolean),s=i();return(0,_.jsx)(tK.Ay.Item,{className:a.join(" "),onClick:t=>{o(t,e)},onMouseOver:()=>e.setHighlight(!0),onMouseOut:()=>e.setHighlight(!1),style:s,"aria-label":"region",children:(0,_.jsx)(rK,{idx:t,item:e,setDraggable:r})},e.id)})),iK=(0,y.PA)((({regionStore:e})=>{const[t,n]=(0,p.useState)(!0),r=(0,p.useCallback)((()=>n(!1)),[]);(0,p.useEffect)((()=>{setTimeout(r)}),[r]);const o=(0,p.useRef)(!0),i=(0,p.useCallback)((e=>{o.current=e}),[]);if(t)return(0,_.jsx)("div",{style:{textAlign:"center"},children:(0,_.jsx)(v.A,{})});const a=!e.sortedRegions.some((e=>e.parentID)),s=e.asTree(((e,t,n)=>({key:e.id,title:(0,_.jsx)(oK,{item:e,idx:t,flat:a,setDraggable:i,onClick:n})}))),l=[...e.classifications.map((e=>({classification:!0,key:e.id,title:(0,_.jsx)(oK,{item:e,flat:!0,setDraggable:i})}))),...s];return(0,_.jsx)(JM.A,{className:QM.treelabels,treeData:l,draggable:!0,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,switcherIcon:(0,_.jsx)(lc,{opacity:"0.25"}),onDragStart:({event:e,node:t})=>{if(t.classification||!o.current)return e.preventDefault(),e.stopPropagation(),!1},onDrop:({node:t,dragNode:n,dropPosition:r,dropToGap:o})=>{if(t.classification)return!1;const i=t.props.eventKey,a=n.props.eventKey,s=t.props.pos.split("-");r-=Number.parseInt(s[s.length-1]);const l=s.length,c=e.findRegionID(i),d=e.findRegionID(a);if(e.unhighlightAll(),2===l&&o&&-1===r)d.setParentID("");else if(-1!==r){var u,h;const t=((null==(u=c.labeling)?void 0:u.selectedLabels)||[]).filter((e=>e.groupcancontain));if(t.length){const e=d.labeling.selectedLabels,n=rn.Checkers.flatten(t.map((e=>e.groupcancontain.split(",")))),r=rn.Checkers.flatten(e.map((e=>e.alias?[e.alias,e.value]:[e.value])));if(0===n.filter((e=>-1!==r.indexOf(e))).length)return}if(null!=(h=c.labeling)&&null!=(h=h.from_name)&&h.groupdepth){let t=Number(c.labeling.from_name.groupdepth);const n=t=>{if(!t)return 0;const r=e.filterByParentID(t.pid).map((e=>n(e)));return r.length?1+Math.max.apply(Math,r):0};if(t>=0){t-=n(d);let r=c;for(;r;)r=e.findRegion(r.parentID),t-=1;if(t<0)return}}d.setParentID(c.id)}}})})),aK=(0,y.PA)((({item:e,regions:t,regionStore:n})=>{const r=e.background,o=nn({color:r}),i=Object.values(t).reduce(((e,t)=>e&&t.hidden),!0),a=Object.values(t).length;return(0,_.jsx)(Ze.eB,{name:"list-item",tag:tK.Ay.Item,style:o,children:(0,_.jsxs)(Fa,{spread:!0,children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[e.isNotLabel?(0,_.jsx)(_.Fragment,{children:"Not labeled"}):(0,_.jsx)(tE,{color:r,empty:e.isEmpty,children:e._value}),(0,_.jsx)(Ze.Sl,{name:"counter",children:`${a} Region${0===a||a>1?"s":""}`})]}),(0,_.jsx)(Ze.Sl,{name:"visibility",tag:za,type:"text",icon:i?(0,_.jsx)(nc,{}):(0,_.jsx)($l,{}),onClick:()=>n.setHiddenByLabel(!i,e),mod:{hidden:i}})]})},e.id)})),{localStorage:sK}=window,lK="collapsed-label-pos",cK=(0,y.PA)((({regionStore:e})=>{const t=e.asLabelsTree(((t,n,r,o,i)=>({key:t.id,title:o=>r?(0,_.jsx)(aK,{item:t,idx:n,regions:o.children,regionStore:e}):(0,_.jsx)(oK,{item:t,idx:n,onClick:i})})));if((0,O.VS)(O.TU)){var n,r,o;const[e,i]=(0,p.useState)(null!=(n=null==(r=sK.getItem(lK))||null==r.split||null==(r=r.split(","))?void 0:r.filter((e=>!!e)))?n:[]),a=e=>{sK.setItem(lK,e)},s=t=>{const n=[...e,t];i(n),a(n)},l=t=>{const n=e.filter((e=>e!==t));i(n),a(n)},c=null!=(o=t.filter((t=>!e.includes(t.pos))).map((e=>e.key)))?o:[];return(0,_.jsx)(JM.A,{className:QM.treelabels,treeData:t,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,expandedKeys:c,switcherIcon:(0,_.jsx)(lc,{className:QM.switcherIcon,opacity:"0.25"}),onExpand:(n,{node:r})=>{const o=t.find((e=>e.key===r.key)).pos;e.includes(o)?l(o):s(o)}})}return(0,_.jsx)(JM.A,{className:QM.treelabels,treeData:t,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,switcherIcon:(0,_.jsx)(lc,{opacity:"0.25"})})}));var dK=n(53312);const uK=({sortKey:e})=>{switch(e){case"date":return(0,_.jsx)(Bc,{});case"score":return(0,_.jsx)(dK.A,{});default:return null}},hK=(0,y.PA)((({regionStore:e})=>(0,_.jsxs)(Ze.eB,{name:"sort-menu",tag:n_.A,selectedKeys:[e.sort],children:[(0,_.jsx)(n_.A.Item,{children:(0,_.jsxs)(Ze.Sl,{name:"option-inner",onClick:t=>(e.setSort("date"),t.preventDefault(),!1),children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[(0,_.jsx)(Ze.Sl,{name:"icon",tag:"span",children:(0,_.jsx)(uK,{sortKey:"date"})})," ","Date"]}),(0,_.jsx)("span",{children:"date"===e.sort&&("asc"===e.sortOrder?"↓":"↑")})]})},"date"),(0,_.jsx)(n_.A.Item,{children:(0,_.jsxs)(Ze.Sl,{name:"option-inner",onClick:t=>(e.setSort("score"),t.preventDefault(),!1),children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[(0,_.jsx)(Ze.Sl,{name:"icon",tag:"span",children:(0,_.jsx)(uK,{sortKey:"score"})})," ","Score"]}),(0,_.jsx)("span",{children:"score"===e.sort&&("asc"===e.sortOrder?"↓":"↑")})]})},"score")]}))),gK=({value:e,children:t,className:n})=>{const r=p.Children.toArray(t),o=(0,p.useMemo)((()=>r.find((t=>t.props.case===e))||null),[r,e]);return o?(0,p.cloneElement)(o,Object.assign({},o.props,{className:[n,o.props.className].join(" ")})):null},mK=["size","value","defaultValue","onChange","children"],pK=p.createContext(),fK=e=>{let{size:t,value:n,defaultValue:r,onChange:o,children:i}=e,a=(0,Yn.A)(e,mK);const[s,l]=(0,p.useState)(r);return(0,_.jsx)(pK.Provider,{value:{value:null!=n?n:s,onChange:e=>{l(e.target.value),null==o||o(e)},defaultValue:r},children:(0,_.jsx)("div",{className:(0,Ze.cn)("radio-group").mod({size:t}),style:a.style,children:(0,_.jsx)("div",{className:(0,Ze.cn)("radio-group").elem("buttons"),children:i})})})};fK.Button=({value:e,disabled:t,children:n})=>{const{onChange:r,value:o}=p.useContext(pK),i=e===o;return(0,_.jsxs)("label",{className:(0,Ze.cn)("radio-group").elem("button").mod({checked:i,disabled:t}),children:[(0,_.jsx)("input",{className:(0,Ze.cn)("radio-group").elem("input"),type:"radio",value:e,checked:e===o,onChange:r,disabled:t}),n]})};const{Block:vK,Elem:yK}=(0,Ze.JE)();class bK extends p.Component{constructor(e){var t;super(e),this.modalRef=(0,p.createRef)(),this.onClickOutside=e=>{const t=(0,Ze.cn)("modal"),{closeOnClickOutside:n}=this.props,r=this.modalRef.current.contains(e.target),o=t.elem("content").closest(e.target),i=t.elem("close").closest(e.target);(r&&i||null===o&&!1!==n)&&this.hide()},this.state={title:e.title,body:e.body,footer:e.footer,visible:!e.animateAppearance&&(null!=(t=e.visible)&&t),transition:e.visible?"visible":null}}componentDidMount(){this.props.animateAppearance&&setTimeout((()=>this.show()),30)}setBody(e){this.setState({body:e})}show(e){var t=this;return new Promise((n=>{this.setState({visible:!0},(async function(){null==e||e(),null==t.props.onShow||t.props.onShow(),await t.transition("appear",n)}))}))}async hide(e){return new Promise((t=>{this.transition("disappear",(()=>{this.setState({visible:!1},(()=>{var n,r;null==(n=(r=this.props).onHide)||n.call(r),t(),null==e||e()}))}))}))}render(){if(!this.state.visible)return null;const e=this.props.bare,t={fullscreen:!!this.props.fullscreen,bare:this.props.bare,visible:this.props.visible||this.state.visible},n=[this.transitionClass,this.props.className],r=(0,_.jsx)(vK,{name:"modal",ref:this.modalRef,mod:t,mix:n,onClick:this.onClickOutside,children:(0,_.jsx)(yK,{name:"wrapper",children:(0,_.jsxs)(yK,{name:"content",style:this.props.style,children:[!e&&(0,_.jsxs)(bK.Header,{children:[(0,_.jsx)(yK,{name:"title",children:this.state.title}),!1!==this.props.allowClose&&(0,_.jsx)(yK,{tag:za,name:"close",type:"text",style:{color:"0099FF"},icon:(0,_.jsx)(hs,{})})]}),(0,_.jsx)(yK,{name:"body",mod:{bare:e},children:this.body}),this.state.footer&&(0,_.jsx)(bK.Footer,{children:this.state.footer})]})})});return(0,g.createPortal)(r,document.body)}transition(e,t){var n=this;return Jn(this.modalRef.current,{transition:async function(){return new Promise((t=>{n.setState({transition:e},(()=>{t()}))}))},beforeTransition:async function(){return new Promise((t=>{n.setState({transition:`before-${e}`},(()=>{t()}))}))},afterTransition:async function(){return new Promise((r=>{n.setState({transition:"appear"===e?"visible":null},(()=>{null==t||t(),r()}))}))}})}get transitionClass(){switch(this.state.transition){case"before-appear":return"before-appear";case"appear":return"appear before-appear";case"before-disappear":return"before-disappear";case"disappear":return"disappear before-disappear";case"visible":return"visible"}return null}get body(){if(this.state.body){const e=this.state.body;return e instanceof Function?(0,_.jsx)(e,{}):e}return this.props.children}}bK.Header=({children:e,divided:t})=>(0,_.jsx)(yK,{name:"header",mod:{divided:t},children:e}),bK.Footer=({children:e})=>(0,_.jsx)(yK,{name:"footer",children:e});const xK=["okText","onOk","cancelText","onCancel","buttonLook"],wK=["okText","onOkPress"],CK=e=>{const t=(0,p.createRef)(),n=document.createElement("div");n.className=(0,Ze.cn)("modal-holder").toClassName(),document.body.appendChild(n);const r=(e,r)=>{(0,g.render)((0,_.jsx)(bK,Object.assign({ref:t},e,{onHide:()=>{null==e.onHidden||e.onHidden(),n.remove()},animateAppearance:r})),n)};return r(e,!0),{update(t){r(Object.assign({},e,null!=t?t:{}),!1)},close(){t.current.hide()}}},SK=e=>{let{okText:t,onOk:n,cancelText:r,onCancel:o,buttonLook:i}=e,a=(0,Yn.A)(e,xK);const s=CK(Object.assign({},a,{allowClose:!1,footer:(0,_.jsxs)(Fa,{align:"end",children:[(0,_.jsx)(za,{onClick:()=>{null==o||o(),s.close()},size:"compact",autoFocus:!0,children:null!=r?r:"Cancel"}),(0,_.jsx)(za,{onClick:()=>{null==n||n(),s.close()},size:"compact",look:null!=i?i:"primary",children:null!=t?t:"OK"})]})}));return s};Object.assign(bK,{info:e=>{let{okText:t,onOkPress:n}=e,r=(0,Yn.A)(e,wK);const o=CK(Object.assign({},r,{footer:(0,_.jsx)(Fa,{align:"end",children:(0,_.jsx)(za,{onClick:()=>{null==n||n(),o.close()},look:"primary",size:"compact",children:null!=t?t:"OK"})})}));return o},confirm:SK,modal:CK});const jK=(0,y.PA)((({regionStore:e,annotation:t})=>{const{classifications:n,regions:r,view:o}=e,i=r.length+("regions"===o?n.length:0);return(0,_.jsxs)(Ze.eB,{name:"entities",children:[(0,_.jsx)(Ze.Sl,{name:"source",children:(0,_.jsxs)(Fa,{spread:!0,children:[(0,_.jsxs)(fK,{size:"small",value:o,style:{width:240},onChange:t=>{e.setView(t.target.value)},children:[(0,_.jsxs)(fK.Button,{value:"regions",children:["Regions",i?(0,_.jsxs)(Ze.Sl,{name:"counter",children:[" ",i]}):null]}),(0,_.jsx)(fK.Button,{value:"labels",children:"Labels"})]}),t.isReadOnly()&&(0,_.jsx)(ir,{title:"Delete All Regions",children:(0,_.jsx)(za,{look:"danger",type:"text","aria-label":"Delete All Regions",icon:(0,_.jsx)(bs,{}),style:{height:36,width:36,padding:0},onClick:()=>{SK({title:"Removing all regions",body:"Do you want to delete all annotated regions?",buttonLook:"destructive",onOk:()=>t.deleteAllRegions()})}})})]})}),i?(0,_.jsx)(Ze.Sl,{name:"header",children:(0,_.jsxs)(Fa,{spread:!0,align:"regions"===o?null:"end",children:["regions"===o&&(0,_.jsx)(t_.A,{overlay:(0,_.jsx)(hK,{regionStore:e}),placement:"bottomLeft",children:(0,_.jsxs)(Ze.Sl,{name:"sort",onClick:e=>e.preventDefault(),children:[(0,_.jsx)(Ze.Sl,{name:"sort-icon",children:(0,_.jsx)(uK,{sortKey:e.sort})})," ",`Sorted by ${e.sort[0].toUpperCase()}${e.sort.slice(1)}`]})}),(0,_.jsx)(Fa,{size:"small",align:"end",children:r.length>0?(0,_.jsx)(Ze.Sl,{name:"visibility",tag:za,size:"small",type:"link",style:{padding:0},onClick:t=>{t.preventDefault(),t.stopPropagation(),e.toggleVisibility()},mod:{hidden:e.isAllHidden},children:e.isAllHidden?(0,_.jsx)(nc,{}):(0,_.jsx)($l,{})}):null})]})}):null,(0,_.jsxs)(gK,{value:o,children:[(0,_.jsx)(Ze.Sl,{name:"regions",case:"regions",children:i?(0,_.jsx)(iK,{regionStore:e}):(0,_.jsx)(Ze.Sl,{name:"empty",children:"No Regions created yet"})}),(0,_.jsx)(Ze.Sl,{name:"labels",case:"labels",children:i?(0,_.jsx)(cK,{regionStore:e}):(0,_.jsx)(Ze.Sl,{name:"empty",children:"No Labeled Regions created yet"})})]})]})}));var kK=n(98065),OK=n(91846),RK=n(37142),EK=n(29961),_K=n(88841);const AK="block--U6qY7",TK="button--XQcyF",PK="labels--aLxIm",IK="statesblk--aVJvV",LK="row--BJ8uf",MK="long--bEvKZ",KK={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekBlue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",accent:"#617ADA"},DK=({className:e,style:t,size:n,color:r,solid:o=!1,children:i})=>{const a=((e,t)=>{const n=pt()(e);return t?{color:pt().contrast(n,"#fff")>4.5?"#fff":"#000",background:n,"shadow-color":n.darken(.22)}:{color:n,background:n.desaturate(2).brighten(2.2),"shadow-color":n.desaturate(1).brighten(1.22)}})((s=r)?null!=(l=KK[s])?l:s:KK.blue,o);var s,l;const c=Object.entries(a).reduce(((e,[t,n])=>Object.assign({},e,{[`--${t}`]:n})),{}),d=Object.assign({},null!=t?t:{},c);return(0,_.jsx)(Ze.eB,{tag:"span",name:"tag",mod:{size:n},mix:e,style:d,children:i})},{Paragraph:NK,Text:VK}=TE.A,zK=e=>{return e.type.endsWith("labels")?null!=(n=(t=e).selectedLabels)&&n.length?(0,_.jsxs)(VK,{className:PK,children:["Labels: ",t.selectedLabels.map((e=>{const t=e.background||"#000000";return(0,_.jsx)(DK,{color:t,solid:!0,children:e.value},e.id)}))]},t.pid):null:"rating"===e.type?(0,_.jsxs)(NK,{children:["Rating: ",e.mainValue]}):"textarea"!==e.type||e.from_name.perregion&&e.from_name.displaymode===lt.REGION_LIST?"choices"===e.type?(0,_.jsxs)(NK,{children:["Choices: ",e.mainValue.join(", ")]}):null:(0,_.jsxs)(NK,{className:LK,children:[(0,_.jsx)(VK,{children:"Text: "}),(0,_.jsx)(VK,{mark:!0,className:MK,children:e.mainValue.join("\n")})]});var t,n},BK=(0,y.PA)((({store:e,annotation:t})=>{var n;const{highlightedNode:r,selectedRegions:o,selectionSize:i}=t,[a,s]=p.useState(!1),l=[],c=!!o.find((e=>!e.isReadOnly())),d=!!o.find((e=>!e.isReadOnly()&&!e.classification)),u=window.HTX_DEBUG?PO:MO;d&&(l.push((0,_.jsx)(yr.Tooltip,{placement:"topLeft",name:"region:relation",children:(0,_.jsxs)(za,{"aria-label":"Create Relation",className:TK,onClick:()=>{t.startLinkingMode(F,r)},disabled:!r,children:[(0,_.jsx)(OK.A,{}),e.settings.enableHotkeys&&e.settings.enableTooltips&&(0,_.jsx)(ar,{children:"[ alt + r ]"})]})},"relations")),l.push((0,_.jsx)(ir,{placement:"topLeft",title:"Add Meta Information",children:(0,_.jsx)(za,{className:TK,onClick:()=>{s(!0)},disabled:!r,children:(0,_.jsx)(RK.A,{})})},"meta"))),l.push((0,_.jsx)(yr.Tooltip,{placement:"topLeft",name:"region:unselect",children:(0,_.jsxs)(za,{className:TK,type:"dashed",onClick:()=>{t.unselectAll()},children:[(0,_.jsx)(EK.A,{}),(0,_.jsx)(yr.Hint,{name:"region:unselect"})]})},"unselect"));const h=(0,Ze.cn)("entity-states").toClassName(),g=(0,Ze.cn)("entity-buttons").toClassName();return(0,_.jsxs)(Ze.eB,{name:"entity",children:[(0,_.jsxs)(Ze.Sl,{name:"info",tag:Fa,spread:!0,children:[(0,_.jsx)(Ze.Sl,{name:"node",children:r?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(u,{node:r})," (ID: ",r.id,")"]}):`${i} Region${i>1?"s are":" is"} selected`}),!c&&(0,_.jsx)(eK.A,{count:"readonly",style:{backgroundColor:"#ccc"}})]}),(0,_.jsxs)("div",{className:`${IK} ${h}`,children:[(null==r?void 0:r.score)&&(0,_.jsx)(p.Fragment,{children:(0,_.jsxs)(VK,{children:["Score: ",(0,_.jsx)(VK,{underline:!0,children:r.score})]})}),(null==r||null==(n=r.meta)?void 0:n.text)&&(0,_.jsxs)(VK,{children:["Meta: ",(0,_.jsx)(VK,{code:!0,children:r.meta.text})," ",(0,_.jsx)(_K.A,{type:"delete",style:{cursor:"pointer"},onClick:()=>{r.deleteMetaText()}})]}),(0,_.jsx)(p.Fragment,{children:null==r?void 0:r.results.map(zK)})]}),(null==r?void 0:r.isDrawing)&&(0,_.jsxs)(Ze.Sl,{name:"warning",children:[(0,_.jsx)(Nd,{}),(0,_.jsxs)(Ze.Sl,{name:"warning-text",children:["Incomplete ",r.type.replace("region","")]})]}),(0,_.jsx)("div",{className:`${AK} ${g}`,children:(0,_.jsxs)(Fa,{spread:!0,children:[(0,_.jsx)(Fa,{children:l}),c&&(0,_.jsx)(yr.Tooltip,{placement:"topLeft",name:"region:delete",children:(0,_.jsxs)(za,{look:"danger",className:TK,onClick:()=>{t.deleteSelectedRegions()},children:[(0,_.jsx)(_K.A,{}),(0,_.jsx)(yr.Hint,{name:"region:delete"})]})})]})}),a&&(0,_.jsxs)(kK.A,{style:{marginTop:"0.5em",marginBottom:"0.5em"},onFinish:()=>{r.setMetaText(r.normInput),s(!1)},children:[(0,_.jsx)(RM.A,{autoFocus:!0,onChange:e=>{const{value:t}=e.target;r.setNormInput(t)},style:{marginBottom:"0.5em"},placeholder:"Meta Information"}),(0,_.jsx)(za,{type:"primary",htmlType:"submit",style:{marginRight:"0.5em"},children:"Add"}),(0,_.jsx)(za,{type:"danger",htmlType:"reset",onClick:e=>(s(!1),e.preventDefault(),!1),children:"Cancel"})]})]})}));var HK=n(79834),FK=n(37720),WK=n(72992),$K=n(74383);const UK={list:"list--FAmTd",item:"item--MfWOD",selected:"selected--qI1ER",block:"block--Z1yxd",relationbtn:"relationbtn--Z2zT9",header:"header--mDSME",section:"section--htmcU",section__blocks:"section__blocks--iGtwJ",uihidden:"uihidden--W82jq",uivisible:"uivisible--UrLqJ"};var ZK=n(38451),GK=n(9099);const{Option:YK}=Zn.A,XK=(0,y.PA)((({rl:e})=>{const t=e.relations,n=t.getSelected().map((e=>e.value));return(0,_.jsxs)("div",{style:{marginTop:"10px"},children:[(0,_.jsx)("h4",{className:UK.header,children:"LABELS"}),(0,_.jsx)(Zn.A,{mode:"multiple"===t.choice?"multiple":"",style:{width:"100%"},placeholder:"Please select",defaultValue:n,onChange:e=>{const n=(0,w.wrapArray)(e);t.unselectAll(),n.forEach((e=>t.findRelation(e).setSelected(!0)))},children:t.children.map((e=>(0,_.jsx)(YK,{style:{background:e.background},children:e.value},e.value)))})]})})),qK=(0,y.PA)((({rl:e})=>{if(!(0,h.aF)((()=>e.node1))||!(0,h.aF)((()=>e.node2)))return null;const t={left:(0,_.jsx)(HK.A,{}),right:(0,_.jsx)(FK.A,{}),bi:(0,_.jsx)(WK.A,{})};return(0,_.jsx)("div",{children:(0,_.jsxs)("div",{className:UK.section__blocks,children:[(0,_.jsx)("div",{children:(0,_.jsx)(MO,{node:e.node1})}),(0,_.jsx)(jr.A,{onClick:()=>e.rotateDirection(),size:"small",className:UK.relationbtn,children:t[e.direction]}),(0,_.jsx)("div",{children:(0,_.jsx)(MO,{node:e.node2})})]})})})),JK=(0,y.PA)((({item:e})=>{const t=(0,h.Zn)(e).annotationStore.selected.highlightedNode,n=t===e.node1||t===e.node2;return(0,_.jsxs)(tK.Ay.Item,{className:n&&UK.selected,actions:[],onMouseEnter:()=>{e.toggleHighlight(),e.setSelfHighlight(!0)},onMouseLeave:()=>{e.toggleHighlight(),e.setSelfHighlight(!1)},children:[(0,_.jsxs)("div",{className:UK.item,children:[(0,_.jsx)("div",{children:(0,_.jsx)(qK,{rl:e})}),(0,_.jsxs)("div",{children:[e.hasRelations&&(0,_.jsx)(jr.A,{size:"small",onClick:()=>{e.toggleMeta()},className:UK.button,children:(0,_.jsx)($K.A,{})})," ",(0,_.jsx)(jr.A,{size:"small",className:UK.button,onClick:()=>(e.node1.setHighlight(!1),e.node2.setHighlight(!1),e.parent.deleteRelation(e),!1),danger:!0,children:(0,_.jsx)(_K.A,{})})]})]}),e.showMeta&&(0,_.jsx)(XK,{rl:e})]},e.id)})),QK=(0,y.PA)((({store:e})=>{const t=e.annotationStore.selected,{relations:n}=t.relationStore,r=n.length>0,o=t.relationStore.showConnections;return(0,_.jsxs)(Ze.eB,{name:"relations",children:[(0,_.jsxs)(Ze.Sl,{name:"header",children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:["Relations (",n.length,")"]}),r&&(0,_.jsx)(jr.A,{size:"small",type:"link",icon:o?(0,_.jsx)(ZK.A,{}):(0,_.jsx)(GK.A,{}),onClick:()=>t.relationStore.toggleConnections(),className:[o?UK.uihidden:UK.uivisible,Fn]})]}),(0,_.jsx)(Ze.Sl,{name:"content",children:r?(0,_.jsx)(tK.Ay,{size:"small",bordered:!0,itemLayout:"vertical",className:UK.list,dataSource:t.relationStore.relations,renderItem:e=>(0,_.jsx)(JK,{item:e})}):(0,_.jsx)("p",{children:"No Relations added yet"})})]})})),eD=QK;var tD,nD=["title","titleId"];function rD(){return rD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iD=function(e,t){var n=e.title,r=e.titleId,o=oD(e,nD);return p.createElement("svg",rD({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,tD||(tD=p.createElement("path",{d:"M3.51 6.03L11.02 9.25L3.5 8.25L3.51 6.03ZM11.01 14.75L3.5 17.97V15.75L11.01 14.75ZM1.51 3L1.5 10L16.5 12L1.5 14L1.51 21L22.5 12L1.51 3Z",fill:"currentColor"})))},aD=(0,p.forwardRef)(iD);n.p;function sD(...e){const t=e.filter(Boolean);return t.length<=1?t[0]:e=>{t.forEach((t=>{"function"==typeof t?t(e):t.current=e}))}}const lD=["ref","actionRef","onChange","onInput","onSubmit","value","autoSize","rows","maxRows","className"],cD=e=>{let{ref:t,actionRef:n,onChange:r,onInput:o,onSubmit:i,value:a,autoSize:s=!0,rows:l=1,maxRows:c=4,className:d}=e,u=(0,Yn.A)(e,lD);const h=!!i,g=[(0,Ze.cn)("textarea").mod({inline:h,autosize:s}),d].join(" ").trim(),m=(0,p.useRef)({rows:l,maxRows:Math.max(c-1,1),lineHeight:24,maxHeight:Number.POSITIVE_INFINITY}),f=(0,p.useRef)(null),v=(0,p.useCallback)((0,KC.debounce)((()=>{const e=f.current;if(!e||!m.current||!f.current)return;if(m.current.maxHeight===Number.POSITIVE_INFINITY){e.style.height="auto";const t=f.current.value;f.current.value="",m.current.lineHeight=f.current.scrollHeight/m.current.rows,m.current.maxHeight=m.current.lineHeight*m.current.maxRows,f.current.value=t}let t;e.scrollHeight>m.current.maxHeight?(e.style.overflowY="scroll",t=m.current.maxHeight):(e.style.overflowY="hidden",e.style.height="auto",t=e.scrollHeight);const n=e.value.length,r=e.selectionStart;requestAnimationFrame((()=>{e.style.height=`${t}px`,n===r&&(e.scrollTop=e.scrollHeight)}))}),10,{leading:!0}),[]);n&&(n.current={update:(e="")=>{f.current&&(f.current.value=e,v())},el:f});const y=(0,p.useCallback)((e=>{null==o||o(e.target.value),v()}),[o]),b=(0,p.useCallback)((e=>{null==r||r(e.target.value),v()}),[r]);return(0,p.useEffect)((()=>{const e=new ResizeObserver(v);return e.observe(f.current),()=>{f.current&&e.unobserve(f.current)}}),[]),(0,p.useEffect)((()=>{f.current&&(f.current.value=a||"",v())}),[a]),(0,p.useEffect)((()=>{if(!i)return;const e=e=>{f.current&&"Enter"===e.key&&(e.ctrlKey||(0,w.isMacOS)()&&e.metaKey)&&i(f.current.value)};return f.current&&f.current.addEventListener("keydown",e),()=>{f.current&&f.current.removeEventListener("keydown",e)}}),[i]),(0,_.jsx)("textarea",Object.assign({ref:sD(f,t),className:g,rows:m.current.rows,onChange:b,onInput:y},u))},dD=(0,y.PA)((({commentStore:e,annotationStore:t,inline:n=!0,onChange:r,rows:o=1,maxRows:i=4})=>{const a=(0,p.useRef)(null),s=(0,p.useRef)({}),l=()=>e.setTooltipMessage(""),c=(0,p.useCallback)((async t=>{if(null==t||null==t.preventDefault||t.preventDefault(),!a.current||"addComment"===e.loading)return;const n=new FormData(a.current).get("comment");if(n.trim())try{null==s.current.update||s.current.update(""),await e.addComment(n)}catch(e){null==s.current.update||s.current.update(n||""),console.error(e)}}),[e]),d=(0,p.useCallback)((t=>{e.setCurrentComment(t||"")}),[e]);(0,p.useEffect)((()=>((0,O.VS)(O.bA)||(e.setAddedCommentThisSession(!1),l()),()=>l())),[]),(0,p.useEffect)((()=>{var t;(0,O.VS)(O.bA)&&(e.tooltipMessage&&(null==(t=s.current)||null==(t=t.el)||null==(t=t.current)||t.focus({preventScroll:!0})))}),[e.tooltipMessage]),(0,p.useEffect)((()=>{e.setInputRef(s.current.el),e.setCommentFormSubmit((()=>c()))}),[s,e]);const u=e.currentComment[t.selected.id]||"";return(0,_.jsxs)(Ze.eB,{ref:a,tag:"form",name:"comment-form",mod:{inline:n},onSubmit:c,children:[(0,_.jsx)(cD,{actionRef:s,name:"comment",placeholder:"Add a comment",value:u,rows:o,maxRows:i,onChange:r,onInput:d,onSubmit:n?c:void 0,onBlur:l}),(0,_.jsx)(Ze.Sl,{tag:"div",name:"primary-action",children:(0,_.jsx)("button",{type:"submit",children:(0,_.jsx)(aD,{})})}),e.tooltipMessage&&(0,_.jsx)(Ze.Sl,{name:"tooltipMessage",children:e.tooltipMessage})]})})),uD=(0,y.PA)((({item:e})=>{const{type:t}=null!=e?e:{};if(!t)return"No Label";if(t.includes("label"))return e.value;if(t.includes("region")||t.includes("range")){const t=e.labelings.map((e=>e.selectedLabels||[])),n=[].concat(...t);return(0,_.jsx)(Ze.eB,{name:"labels-list",children:n.map(((e,t)=>{const n=e.background||"#000000";return[t?", ":null,(0,_.jsx)(Ze.Sl,{style:{color:n},children:e.value||"No label"},e.id)]}))})}return t.includes("tool")?e.value:void 0})),hD=({linking:e,region:t,result:n,onUnlink:r,interactive:o})=>{const i=e||t,a=(0,p.useMemo)((()=>e?{action:!0}:t?{display:!0}:void 0),[e,t]);return i?(0,_.jsxs)(Ze.eB,{tag:"div",name:"link-state",mod:a,children:[(0,_.jsx)(Ze.Sl,{tag:"div",name:"prefix",children:(0,_.jsx)(dC,{})}),(null==a?void 0:a.action)&&"Select an object to link it to this comment.",(null==a?void 0:a.display)&&(0,_.jsx)(gD,{region:t,result:n,onUnlink:r,interactive:o})]}):null},gD=(0,y.PA)((({region:e,result:t,interactive:n,onUnlink:r})=>{var o;const i=null!=(o=null==e?void 0:e.background)?o:null==e||null==e.getOneColor?void 0:e.getOneColor(),a=e.classification,{mouseEnterHandler:s,mouseLeaveHandler:l,clickHandler:c}=(0,p.useMemo)((()=>{if(!n)return{};return{mouseEnterHandler:()=>{null==e||null==e.setHighlight||e.setHighlight(!0)},mouseLeaveHandler:()=>{null==e||null==e.setHighlight||e.setHighlight(!1)},clickHandler:()=>{if(e.classification)return null;e.annotation.selectArea(e)}}}),[n,e]),d=(0,p.useMemo)((()=>{const e=pt()(null!=i?i:"#666").alpha(1);return{"--icon-color":e.css(),"--text-color":e.css()}}),[i]);return(0,_.jsxs)(Ze.eB,{name:"link-state-region",mod:{interactive:n},style:d,onMouseEnter:s,onMouseLeave:l,onClick:c,children:[!a&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(LO,{node:e})}),(0,_.jsx)(Ze.Sl,{name:"index",children:e.region_index})]}),t?(0,_.jsx)(Ze.Sl,{name:"title",children:(0,_.jsx)(mD,{result:t})}):(0,_.jsxs)(Ze.Sl,{name:"title",children:[(0,_.jsx)(Ze.Sl,{name:"label",children:(0,_.jsx)(uD,{item:e})}),(null==e?void 0:e.text)&&(0,_.jsx)(Ze.Sl,{name:"text",children:e.text.replace(/\\n/g,"\n")})]}),r&&(0,_.jsx)(Ze.Sl,{name:"close",children:(0,_.jsx)(jr.A,{size:"small",type:"text",icon:(0,_.jsx)(Zc,{}),onClick:r})})]})})),mD=(0,y.PA)((({result:e})=>{const{from_name:t,type:n,mainValue:r}=e,{name:o}=t;if("textarea"===n)return[o,r.join(" | ")].join(": ");if("choices"===n)return[o,r.join(", ")].join(": ");if("taxonomy"===n){return[o,r.map((e=>e.join("/"))).join(", ")].join(": ")}return[o,String(r)].join(": ")})),pD=({region:e,linking:t,onLinkTo:n})=>(0,_.jsx)(Ze.eB,{name:"comment-form-buttons",children:(0,_.jsxs)(Ze.Sl,{name:"buttons",children:[n&&!e&&(0,_.jsx)(ir,{title:"Link to...",mouseEnterDelay:.8,children:(0,_.jsx)(Ze.Sl,{name:"action",tag:"button",mod:{highlight:t},onClick:n,children:(0,_.jsx)(dC,{})})}),(0,_.jsx)(Ze.Sl,{name:"action",tag:"button",type:"submit",children:(0,_.jsx)(aD,{})})]})}),fD=(0,y.PA)((({commentStore:e,annotationStore:t,inline:n=!0})=>{var r;const o=(0,p.useRef)(null),i=(0,p.useRef)({}),a=()=>e.setTooltipMessage(""),s=t.selected&&t.selected.linkingMode===W,[l,c]=(0,p.useState)(),d=(0,p.useCallback)(((t=!0)=>{let n=e.commentInProgress;return!n&&t&&(n=iP.create({text:""},{annotationStore:e.annotationStore}),e.setCurrentComment(n)),n}),[e]),u=(0,p.useCallback)((e=>{d().setText(e)}),[e,t]),h=(0,p.useCallback)((e=>{null==e||null==e.preventDefault||e.preventDefault();if(t.selected&&t.selected.linkingMode===W)return void t.selected.stopLinkingMode();const n=d();c(n),t.selected.startLinkingMode(W,n)}),[e,t]),g=(0,p.useCallback)((async t=>{if(null==t||null==t.preventDefault||t.preventDefault(),!o.current||"addComment"===e.loading)return;const n=d(!1),r=null==n?void 0:n.text,i=null==n?void 0:n.regionRef,a=null==n?void 0:n.classifications;if(r.trim()||a)try{e.setCurrentComment(void 0);const t={text:r,regionRef:i,classifications:a};await e.addComment(t)}catch(t){e.setCurrentComment(n),console.error(t)}}),[e,t]);(0,p.useEffect)((()=>((0,O.VS)(O.bA)||(e.setAddedCommentThisSession(!1),a()),()=>a())),[]),(0,p.useEffect)((()=>{var t;(0,O.VS)(O.bA)&&(e.tooltipMessage&&(null==(t=i.current)||null==(t=t.el)||null==(t=t.current)||t.focus({preventScroll:!0})))}),[e.tooltipMessage]),(0,p.useEffect)((()=>{var t;e.setInputRef(null==(t=i.current)?void 0:t.el),e.setCommentFormSubmit((()=>g()))}),[i,e]);const m=null==(r=t.selected.currentLinkingMode)?void 0:r.comment,f=d(),{text:v="",regionRef:y,classifications:b}=f||{},{region:x,result:w}=y||{},C=!!l&&m===l&&s,S=C||x,j=(0,p.useMemo)((()=>{var e;return eP(null==b||null==(e=b.default)?void 0:e.values)}),[b]),k=e.commentClassificationsItems,R=(0,p.useCallback)((e=>{d().setClassifications(e)}),[d]),E=(0,p.useCallback)((async(e,t)=>{const n=t.length>0?{default:{type:"taxonomy",values:t}}:null;R(n)}),[R]);return(0,_.jsxs)(Ze.eB,{ref:o,tag:"form",name:"comment-form-new",mod:{inline:n,linked:!!x},onSubmit:g,children:[(0,_.jsxs)(Ze.Sl,{name:"text-row",children:[(0,_.jsx)(cD,{actionRef:i,name:"comment",placeholder:"Add a comment",value:v,rows:1,maxRows:4,onInput:u,onSubmit:n?g:void 0,onBlur:a}),0===k.length&&(0,_.jsx)(pD,{region:x,linking:C,onLinkTo:h})]}),k.length>0&&(0,_.jsxs)(Ze.Sl,{name:"classifications-row",children:[(0,_.jsx)(Ze.Sl,{name:"category-selector",children:(0,_.jsx)(jI,{selected:j,items:k,onChange:E,options:tP,defaultSearch:!1})}),(0,_.jsx)(pD,{region:x,linking:C,onLinkTo:h})]}),S&&(0,_.jsx)(Ze.Sl,{name:"link-state",children:(0,_.jsx)(hD,{linking:C,region:x,result:w,onUnlink:null==f?void 0:f.unsetLink})}),e.tooltipMessage&&(0,_.jsx)(Ze.Sl,{name:"tooltipMessage",children:e.tooltipMessage})]})})),vD=(0,y.PA)((({value:e="",inline:t=!0,onChange:n,onSubmit:r,onBlur:o,rows:i=1,maxRows:a=4,classifications:s})=>{const l=(0,p.useRef)(null),c=(0,p.useRef)({}),d=(0,p.useCallback)((async e=>{var t;if(null==e||null==e.preventDefault||e.preventDefault(),!l.current)return;const n=null==(t=new FormData(l.current).get("comment"))?void 0:t.trim();(n||s)&&(null==r||r(n))}),[r]),u=(0,p.useCallback)((e=>{null==n||n(e||"")}),[n]);return(0,_.jsxs)(Ze.eB,{ref:l,tag:"form",name:"comment-form",mod:{inline:t},onSubmit:d,children:[(0,_.jsx)(cD,{actionRef:c,name:"comment",placeholder:"Add a comment",value:e,rows:i,maxRows:a,onChange:n,onInput:u,onSubmit:e=>{t&&(e=e.trim())&&(null==r||r(e))},onBlur:e=>null==o?void 0:o(e)}),(0,_.jsx)(Ze.Sl,{tag:"div",name:"primary-action",children:(0,_.jsx)("button",{type:"submit",children:(0,_.jsx)(aD,{})})})]})})),yD=(0,y.PA)((({comment:{updatedAt:e,isEditMode:t,isConfirmDelete:n,createdAt:r,isPersisted:o,isDeleted:i,createdBy:a,text:s,isResolved:l,updateComment:c,deleteComment:d,setConfirmMode:u,setEditMode:h,toggleResolve:g,canResolveAny:m},listComments:f})=>{var v;const y=null==(v=window.APP_SETTINGS)?void 0:v.user,b=(null==y?void 0:y.id)===a.id,[x,C]=(0,p.useState)(s);if(i)return null;const S=()=>{const t=new Date(e),n=new Date(r);t.setMilliseconds(0),n.setMilliseconds(0);const i=t>n,a=i?e:r;return o&&a?(0,_.jsx)(Ze.Sl,{name:"date",children:(0,_.jsx)(zM.A,{placement:"topRight",title:new Date(a).toLocaleString(),children:`${i?"updated":""} ${(0,w.humanDateDiff)(a)}`})}):null};return(0,_.jsxs)(Ze.eB,{name:"comment-item",mod:{resolved:l},children:[(0,_.jsxs)(Fa,{spread:!0,size:"medium",truncated:!0,children:[(0,_.jsxs)(Fa,{size:"small",truncated:!0,children:[(0,_.jsx)(Ze.Sl,{tag:FM,user:a,name:"userpic",showUsername:!0,username:a}),(0,_.jsx)(Ze.Sl,{name:"name",tag:"span",children:(0,w.userDisplayName)(a)})]}),(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"resolved",component:cu}),(0,_.jsx)(Ze.Sl,{name:"saving",mod:{hide:o},children:(0,_.jsx)(Ze.Sl,{name:"dot"})}),(0,_.jsx)(S,{})]})]}),(0,_.jsxs)(Ze.Sl,{name:"content",children:[(0,_.jsx)(Ze.Sl,{name:"text",children:t?(0,_.jsx)(vD,{value:x,onSubmit:async e=>{await c(e),C(e),await f({suppressClearComments:!0})}}):n?(0,_.jsxs)(Ze.Sl,{name:"confirmForm",children:[(0,_.jsx)(Ze.Sl,{name:"question",children:"Are you sure?"}),(0,_.jsxs)(Ze.Sl,{name:"controls",children:[(0,_.jsx)(za,{onClick:()=>d(),size:"compact",look:"danger",autoFocus:!0,children:"Yes"}),(0,_.jsx)(za,{onClick:()=>u(!1),size:"compact",children:"No"})]})]}):(0,_.jsx)(_.Fragment,{children:x})}),(0,_.jsx)(Ze.Sl,{name:"actions",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:o&&(b||m)&&(0,_.jsx)(Q_.Trigger,{content:(0,_.jsxs)(wT,{size:"auto",children:[(0,_.jsx)(wT.Item,{onClick:g,children:l?"Unresolve":"Resolve"}),b&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(wT.Item,{onClick:()=>{const e=!t;h(e),e||C(s)},children:t?"Cancel edit":"Edit"}),!n&&(0,_.jsx)(wT.Item,{onClick:()=>{u(!0)},children:"Delete"})]})]}),children:(0,_.jsx)(za,{size:"small",type:"text",icon:(0,_.jsx)(Pd,{})})})})]})]})})),bD=(0,y.PA)((({commentStore:e})=>(0,_.jsx)(Ze.eB,{name:"comments-list",children:e.comments.map((t=>(0,_.jsx)(yD,{comment:t,listComments:e.listComments},t.id)))}))),xD=(0,y.PA)((({comment:e,listComments:t,classificationsItems:n})=>{var r,o,i;const{classifications:a,updatedAt:s,isEditMode:l,isConfirmDelete:c,createdAt:d,isPersisted:u,isDeleted:h,createdBy:g,text:m,regionRef:f,isResolved:v,updateComment:y,deleteComment:b,setConfirmMode:x,setClassifications:C,setEditMode:S,toggleResolve:j,canResolveAny:k,isHighlighted:O,setHighlighted:R,_commentRef:E}=e,{startLinkingMode:A,currentComment:T,globalLinking:P}=(0,p.useContext)(wD),I=null==(r=window.APP_SETTINGS)?void 0:r.user,L=(null==I?void 0:I.id)===g.id,[M,K]=(0,p.useState)(m),[D,N]=(0,p.useState)(),V=null==f?void 0:f.region,z=null==f?void 0:f.result,B=!(!D||T!==D||!P),H=B||V,F=(0,p.useCallback)((e=>{N(e),A(e)}),[A]),W=(0,p.useCallback)((()=>{null!=f&&f.region?e.unsetLink():F(e)}),[e,F,null==f?void 0:f.region]),$=(0,p.useCallback)((async(e,t)=>{const n=t.length>0?{default:{type:"taxonomy",values:t}}:null;C(n)}),[C]),U=(0,p.useMemo)((()=>{var e;return eP(null==a||null==(e=a.default)?void 0:e.values)}),[a]),Z=(0,p.useCallback)((async e=>{await y(e,a),K(e),await t({suppressClearComments:!0})}),[y,t,a]);if(h)return null;const G=()=>{const e=new Date(s),t=new Date(d);e.setMilliseconds(0),t.setMilliseconds(0);const n=e>t,r=n?s:d;return u&&r?(0,_.jsx)(Ze.Sl,{name:"date",children:(0,_.jsx)(zM.A,{placement:"topRight",title:new Date(r).toLocaleString(),children:`${n?"updated":""} ${(0,w.humanDateDiff)(r)}`})}):null};return(0,_.jsxs)(Ze.eB,{name:"comment-item",mod:{resolved:v,highlighted:O},onMouseEnter:()=>{R(!0)},onMouseLeave:()=>{R(!1)},ref:E,children:[(0,_.jsxs)(Fa,{spread:!0,size:"medium",truncated:!0,children:[(0,_.jsxs)(Fa,{size:"small",truncated:!0,children:[(0,_.jsx)(Ze.Sl,{tag:FM,user:g,name:"userpic",showUsername:!0,username:g}),(0,_.jsx)(Ze.Sl,{name:"name",tag:"span",children:(0,w.userDisplayName)(g)})]}),(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"resolved",component:cu}),(0,_.jsx)(Ze.Sl,{name:"saving",mod:{hide:u},children:(0,_.jsx)(Ze.Sl,{name:"dot"})}),(0,_.jsx)(G,{})]})]}),(0,_.jsxs)(Ze.Sl,{name:"content",children:[(0,_.jsx)(Ze.Sl,{name:"text",children:l?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(vD,{value:M,onSubmit:Z,classifications:a}),n.length>0&&(0,_.jsx)(Ze.Sl,{name:"classifications-row",children:(0,_.jsx)(jI,{selected:U,items:n,onChange:$,options:tP,defaultSearch:!1})})]}):c?(0,_.jsxs)(Ze.Sl,{name:"confirmForm",children:[(0,_.jsx)(Ze.Sl,{name:"question",children:"Are you sure?"}),(0,_.jsxs)(Ze.Sl,{name:"controls",children:[(0,_.jsx)(za,{onClick:()=>b(),size:"compact",look:"danger",autoFocus:!0,children:"Yes"}),(0,_.jsx)(za,{onClick:()=>x(!1),size:"compact",children:"No"})]})]}):(0,_.jsxs)(_.Fragment,{children:[(null==a||null==(o=a.default)||null==(o=o.values)?void 0:o.length)>0&&(0,_.jsx)(Ze.Sl,{name:"classifications",tag:"ul",children:null==a||null==(i=a.default)||null==(i=i.values)?void 0:i.map(((e,t)=>(0,_.jsx)("li",{children:e.join("/")},t)))}),M,H&&(0,_.jsx)(Ze.Sl,{name:"linkState",children:(0,_.jsx)(hD,{linking:B,region:V,result:z,interactive:!0})})]})}),(0,_.jsx)(Ze.Sl,{name:"actions",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:u&&(L||k)&&(0,_.jsx)(Q_.Trigger,{content:(0,_.jsxs)(wT,{size:"auto",children:[(0,_.jsx)(wT.Item,{onClick:j,children:v?"Unresolve":"Resolve"}),L&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(wT.Item,{onClick:()=>{const e=!l;S(e),e||K(m)},children:l?"Cancel edit":"Edit"}),(0,_.jsx)(wT.Item,{onClick:W,children:null!=f&&f.region?"Unlink":"Link to..."}),!c&&(0,_.jsx)(wT.Item,{onClick:()=>{x(!0)},children:"Delete"})]})]}),children:(0,_.jsx)(za,{size:"small",type:"text",icon:(0,_.jsx)(Pd,{})})})})]})]})})),wD=(0,p.createContext)({startLinkingMode:()=>{},globalLinking:!1,currentComment:null}),CD=(0,y.PA)((({commentStore:e})=>{var t,n;const r=(0,p.useCallback)((t=>{e.annotation.startLinkingMode(W,t)}),[e]),o=(null==(t=e.annotation)?void 0:t.linkingMode)===W,i=null==(n=e.annotation.currentLinkingMode)?void 0:n.comment,a=(0,p.useMemo)((()=>({startLinkingMode:r,currentComment:i,globalLinking:o})),[r,i,o]);return(0,_.jsx)(wD.Provider,{value:a,children:(0,_.jsx)(SD,{commentStore:e})})})),SD=(0,y.PA)((({commentStore:e})=>(0,_.jsx)(Ze.eB,{name:"comments-list",children:e.comments.map((t=>(0,_.jsx)(xD,{comment:t,listComments:e.listComments,classificationsItems:e.commentClassificationsItems},t.id)))}))),jD=(0,O.VS)(O.v1),kD=jD?fD:dD,OD=jD?CD:bD,RD=(0,y.PA)((({annotationStore:e,commentStore:t,cacheKey:n})=>{const r=N();return(0,p.useEffect)((()=>{(async()=>{const e={mounted:r};jD&&(e.suppressClearComments=t.isRelevantList),await t.listComments(e),(0,O.VS)(O.K3)||t.restoreCommentsFromCache(n)})()}),[t.annotation.id]),(0,p.useEffect)((()=>{const e=e=>(t.hasUnsaved&&(e.returnValue="You have unpersisted comments which will be lost if continuing."),e);return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[t.hasUnsaved]),(0,_.jsxs)(Ze.eB,{name:"comments",children:[(0,_.jsx)(kD,{commentStore:t,annotationStore:e,inline:!0}),(0,_.jsx)(OD,{commentStore:t})]})})),ED=(0,y.PA)((({store:e})=>{var t;const n=e.annotationStore,r=null!=(t=n.selectedHistory)?t:n.selected,{selectionSize:o}=r||{},i=e.hasSegmentation;return(0,_.jsxs)(_.Fragment,{children:[e.hasInterface("annotations:current")&&(0,_.jsx)(qM,{entity:n.selected,showControls:e.hasInterface("controls"),canDelete:e.hasInterface("annotations:delete"),showHistory:e.hasInterface("annotations:history"),showGroundTruth:e.hasInterface("ground-truth")}),o?(0,_.jsx)(BK,{store:e,annotation:r}):i?(0,_.jsx)("p",{style:{marginTop:12,marginBottom:0,paddingInline:15},children:"No Region selected"}):null,i&&(0,_.jsx)(jK,{store:e,annotation:r,regionStore:r.regionStore}),i&&(0,_.jsx)(eD,{store:e,item:r}),e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,_.jsxs)(Ze.eB,{name:"comments-section",children:[(0,_.jsx)(Ze.Sl,{name:"header",children:(0,_.jsx)(Ze.Sl,{name:"title",children:"Comments"})}),(0,_.jsx)(Ze.Sl,{name:"content",children:(0,_.jsx)(RD,{annotationStore:n,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})]})]})})),_D=(0,y.PA)((({entity:e})=>{const{history:t}=e;return(0,_.jsxs)(Ze.eB,{name:"history-buttons",children:[(0,_.jsx)(ir,{title:"Undo",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Undo",disabled:!(null!=t&&t.canUndo),onClick:()=>e.undo(),icon:(0,_.jsx)(Qa,{})})}),(0,_.jsx)(ir,{title:"Redo",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Redo",disabled:!(null!=t&&t.canRedo),onClick:()=>e.redo(),icon:(0,_.jsx)(as,{})})}),(0,_.jsx)(ir,{title:"Reset",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Reset",disabled:!(null!=t&&t.canUndo),onClick:()=>null==t?void 0:t.reset(),icon:(0,_.jsx)(hs,{})})})]})})),AD=(0,y.WQ)("store")((0,y.PA)((({store:e})=>{const t=e.hasInterface("auto-annotation")&&!e.forceAutoAnnotation;return(0,p.useEffect)((()=>{t||e.setAutoAnnotation(!1)}),[t]),t?(0,_.jsx)(Ze.eB,{name:"dynamic-preannotations",children:(0,_.jsx)(Ze.Sl,{name:"wrapper",children:(0,_.jsx)(Fa,{spread:!0,children:(0,_.jsx)(gA,{checked:e.autoAnnotation,onChange:t=>{const n=t.target.checked;e.setAutoAnnotation(n),n||RR.allInstances().forEach((e=>e.selectDefault()))},label:"Auto-Annotation",style:{color:"#7F64FF"}})})})}):null}))),TD=(0,y.WQ)((({store:e})=>{var t;const n=null==(t=e.annotationStore)?void 0:t.selected;return{store:e,annotation:n,suggestions:null==n?void 0:n.suggestions}})),PD=TD((0,y.PA)((({store:e,annotation:t,suggestions:n})=>{if(!e.autoAnnotation)return null;const r=t.hasSuggestionsSupport&&!e.forceAutoAcceptSuggestions,o=e.awaitingSuggestions;return(0,_.jsxs)(Ze.eB,{name:"auto-accept",children:[r&&(0,_.jsx)(Ze.Sl,{name:"wrapper",mod:{loading:o},children:(0,_.jsx)(Fa,{spread:!0,children:n.size>0?(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsxs)(Ze.Sl,{name:"info",children:[n.size," suggestion",n.size>0&&"s"]}),(0,_.jsx)(Ze.Sl,{name:"action",tag:za,mod:{type:"reject"},onClick:()=>t.rejectAllSuggestions(),children:(0,_.jsx)(pu,{})}),(0,_.jsx)(Ze.Sl,{name:"action",tag:za,mod:{type:"accept"},onClick:()=>t.acceptAllSuggestions(),children:(0,_.jsx)(cu,{})})]}):(0,_.jsx)(gA,{checked:e.autoAcceptSuggestions,onChange:t=>e.setAutoAcceptSuggestions(t.target.checked),label:"Auto-Accept Suggestions",style:{color:"#7F64FF"}})})}),o&&(0,_.jsx)(Ze.Sl,{name:"spinner"})]})}))),{Block:ID,Elem:LD}=(0,Ze.JE)(),MD=(0,y.PA)((({entity:e,disabled:t=!1,size:n="md"})=>{const r=e.ground_truth?"Unset this result as a ground truth":"Set this result as a ground truth";return!e.skipped&&!e.userGenerate&&"prediction"!==e.type&&(0,_.jsx)(ID,{name:"ground-truth",mod:{disabled:t,size:n},children:(0,_.jsx)(ir,{placement:"topLeft",title:r,children:(0,_.jsx)(LD,{tag:za,name:"toggle",size:"small",type:"link",onClick:t=>{t.preventDefault(),e.setGroundTruth(!e.ground_truth)},children:(0,_.jsx)(LD,{name:"indicator",tag:(0,O.VS)(O.bA)&&!e.ground_truth?Tl:kl,mod:{active:e.ground_truth,dark:(0,O.VS)(O.bA)}})})})})})),KD=({store:e})=>{const t=e.annotationStore,n=t.selected,r="prediction"===(null==n?void 0:n.type),o=!0===t.viewingAll;return(0,_.jsxs)(Ze.Sl,{name:"section",children:[!r&&!o&&e.hasInterface("edit-history")&&(0,_.jsx)(_D,{entity:n}),e.description&&e.hasInterface("instruction")&&(0,_.jsx)(ir,{placement:"topLeft",title:"Show instructions",children:(0,_.jsx)(za,{icon:(0,_.jsx)(mp,{style:{width:20,height:20}}),type:"text","aria-label":"Instructions",onClick:()=>e.toggleDescription(),style:{height:36,width:36,padding:0}})}),(0,_.jsx)(ir,{placement:"topLeft",title:"Settings",children:(0,_.jsx)(za,{icon:(0,_.jsx)(bl,{}),type:"text","aria-label":"Settings",onClick:()=>e.toggleSettings(),style:{height:36,width:36,padding:0}})}),e.hasInterface("ground-truth")&&(0,_.jsx)(MD,{entity:n}),!o&&(0,_.jsxs)(Ze.Sl,{name:"section",children:[(0,_.jsx)(AD,{}),(0,_.jsx)(PD,{})]})]})};function DD(e){const t=(0,y.WQ)((({store:e})=>{var t;return{store:e,history:null==e||null==(t=e.annotationStore)||null==(t=t.selected)?void 0:t.history}}))(e);return t}const ND=DD((0,y.PA)((({store:e,title:t,children:n})=>(0,_.jsx)(ir,{title:t,enabled:e.settings.enableTooltips,mouseEnterDelay:.8,children:n})))),VD=(0,p.memo)((0,y.PA)((({disabled:e,history:t,store:n})=>(0,_.jsx)(ND,{title:"Accept annotation: [ Ctrl+Enter ]",children:(0,_.jsx)(za,{"aria-label":"accept-annotation",disabled:e,look:"primary",onClick:async()=>{var e;const t=null==(e=n.annotationStore)?void 0:e.selected;null==t||t.submissionInProgress(),await n.commentStore.commentFormSubmit(),n.acceptAnnotation()},children:t.canUndo?"Fix + Accept":"Accept"})},"accept")))),zD={id:"reject",name:"reject",title:"Reject",look:void 0,ariaLabel:"reject-annotation",tooltip:"Reject annotation: [ Ctrl+Space ]",disabled:!1},BD=(0,p.memo)((0,y.PA)((({disabled:e,store:t,onSkipWithComment:n})=>(0,_.jsx)(ND,{title:"Cancel (skip) task: [ Ctrl+Space ]",children:(0,_.jsx)(za,{"aria-label":"skip-task",disabled:e,onClick:async e=>{var r,o;const i=()=>t.skipTask({}),a=null==(r=t.annotationStore)?void 0:r.selected;null==(o=t.hasInterface("comments:skip"))||o?n(e,i):(null==a||a.submissionInProgress(),await t.commentStore.commentFormSubmit(),t.skipTask({}))},children:"Skip"})},"skip")))),HD=(0,p.memo)((0,y.PA)((({disabled:e,store:t})=>(0,_.jsx)(ND,{title:"Cancel skip: []",children:(0,_.jsx)(za,{"aria-label":"cancel-skip",disabled:e,look:"primary",onClick:async()=>{var e;const n=null==(e=t.annotationStore)?void 0:e.selected;null==n||n.submissionInProgress(),await t.commentStore.commentFormSubmit(),t.unskipTask()},children:"Cancel skip"})},"cancel-skip")))),FD=(0,y.PA)((({button:e,disabled:t,onClick:n})=>{var r;const o=e.disabled||t?"disabled":e.look;return(0,_.jsx)(ND,{title:null!=(r=e.tooltip)?r:"",children:(0,_.jsx)(za,{"aria-label":e.ariaLabel,disabled:e.disabled||t,look:o,onClick:n,children:e.title})})})),WD=DD((0,y.PA)((({store:e,history:t,annotation:n})=>{const r=e.hasInterface("review")||n.canBeReviewed,o=e.hasInterface("topbar:prevnext"),i=(0,w.isDefined)(e.annotationStore.selectedHistory),{userGenerate:a,sentUserGenerate:s,versions:l,results:c,editable:d}=n,u=(0,Ze.cn)("dropdown").elem("trigger").toClassName(),h=e.customButtons,g=[],[m,f]=(0,p.useState)(!1),v=!d||e.isSubmitting||i||m,y=e.hasInterface("annotations:deny-empty")&&0===c.length,b=(0,p.useCallback)((async(t,r,o)=>{var i,a,s;const{addedCommentThisSession:l,currentComment:c,commentFormSubmit:d}=e.commentStore,u=c[n.id],h=null==(i=null!=(a=null==u?void 0:u.text)?a:u)?void 0:i.trim();if(m)return;f(!0);const g=null==(s=e.annotationStore)?void 0:s.selected;l?(null==g||g.submissionInProgress(),r()):h?(t.preventDefault(),null==g||g.submissionInProgress(),await d(),r()):e.commentStore.setTooltipMessage(o),f(!1)}),[e.rejectAnnotation,e.skipTask,e.commentStore.currentComment,e.commentStore.commentFormSubmit,e.commentStore.addedCommentThisSession,m]),x=h.get("_before"),C=h.get("_replace"),S=null!=C?C:x;if(S){const n=(0,w.toArray)(S);for(const r of n)"string"==typeof r?"accept"===r&&g.push((0,_.jsx)(VD,{disabled:v,history:t,store:e})):g.push((0,_.jsx)(FD,{disabled:v,button:r,onClick:()=>null==e.handleCustomButton?void 0:e.handleCustomButton(r.name)},r.name))}if(C);else if(r){const n=(0,w.toArray)(h.get("reject")),r=n.length>0,o=zD;(r?n.filter((e=>"string"!=typeof e)):[o]).forEach((t=>{const n=r?()=>null==e.handleCustomButton?void 0:e.handleCustomButton(t.name):()=>e.rejectAnnotation({});g.push((0,_.jsx)(FD,{button:t,disabled:v,onClick:async t=>{var r;const o=null==(r=e.annotationStore)?void 0:r.selected;e.hasInterface("comments:reject")?b(t,n,"Please enter a comment before rejecting"):(null==o||o.submissionInProgress(),await e.commentStore.commentFormSubmit(),n())}}))})),g.push((0,_.jsx)(VD,{disabled:v,history:t,store:e}))}else if(n.skipped)g.push((0,_.jsxs)(Ze.Sl,{name:"skipped-info",children:[(0,_.jsx)(Vl,{color:"#d00"})," Was skipped"]},"skipped")),g.push((0,_.jsx)(HD,{disabled:v,store:e}));else{if(e.hasInterface("skip")){const t=(e,t)=>{b(e,t,"Please enter a comment before skipping")};g.push((0,_.jsx)(BD,{disabled:v,store:e,onSkipWithComment:t}))}const r=v||y,i=r?"disabled":"primary",c=!r&&o,d=({isUpdate:t,onClickMethod:n})=>(0,_.jsx)(za,{name:"submit-option",look:"primary",onClick:async t=>{var r;t.preventDefault();const o=null==(r=e.annotationStore)?void 0:r.selected;if(null==o||o.submissionInProgress(),"URLSearchParams"in window){const e=new URLSearchParams(window.location.search);e.set("exitStream","true");const t=`${window.location.pathname}?${e.toString()}`;window.history.pushState(null,"",t)}await e.commentStore.commentFormSubmit(),n()},children:(t?"Update":"Submit")+" and exit"});if(a||e.explore&&!a&&e.hasInterface("submit")){const t=y?"Empty annotations denied in this project":"Save results: [ Ctrl+Enter ]";g.push((0,_.jsx)(ND,{title:t,children:(0,_.jsx)(Ze.Sl,{name:"tooltip-wrapper",children:(0,_.jsx)(za,{"aria-label":"submit",name:"submit",disabled:r,look:i,mod:{has_icon:c,disabled:r},onClick:async t=>{var n;if(t.target.classList.contains(u))return;const r=null==(n=e.annotationStore)?void 0:n.selected;null==r||r.submissionInProgress(),await e.commentStore.commentFormSubmit(),e.submitAnnotation()},icon:c?(0,_.jsx)(Q_.Trigger,{alignment:"top-right",content:(0,_.jsx)(d,{onClickMethod:e.submitAnnotation,isUpdate:!1}),children:(0,_.jsx)("div",{children:(0,_.jsx)(lc,{})})}):void 0,children:"Submit"})})},"submit"))}if(a&&s||!a&&e.hasInterface("update")){const o=Boolean((0,O.VS)(O.I8)||s||l.result),a=(0,O.VS)(O.I8)&&!t.canUndo&&!n.draftId,h=r||a,m=(0,_.jsx)(ND,{title:a?"No changes were made":"Update this task: [ Ctrl+Enter ]",children:(0,_.jsx)(za,{"aria-label":"submit",name:"submit",disabled:h,look:i,mod:{has_icon:c,disabled:h},onClick:async t=>{var n;if(t.target.classList.contains(u))return;const r=null==(n=e.annotationStore)?void 0:n.selected;null==r||r.submissionInProgress(),await e.commentStore.commentFormSubmit(),e.updateAnnotation()},icon:c?(0,_.jsx)(Q_.Trigger,{alignment:"top-right",content:(0,_.jsx)(d,{onClickMethod:e.updateAnnotation,isUpdate:o}),children:(0,_.jsx)("div",{children:(0,_.jsx)(lc,{})})}):void 0,children:o?"Update":"Submit"})},"update");g.push(m)}}return(0,_.jsx)(Ze.eB,{name:"controls",children:g})}))),$D=(0,y.PA)((({store:e})=>{const t=e.annotationStore,n=null==t?void 0:t.selected,r="prediction"===(null==n?void 0:n.type),o=!0===(null==t?void 0:t.viewingAll);return e&&!o?(0,_.jsxs)(Ze.eB,{name:"bottombar",style:{borderTop:(0,O.VS)(O.bA)&&"1px solid rgba(0,0,0,0.1)"},children:[(0,_.jsx)(Ze.Sl,{name:"group",children:(0,_.jsx)(KD,{store:e})}),(0,_.jsx)(Ze.Sl,{name:"group",children:e.hasInterface("controls")&&(e.hasInterface("review")||!r)&&(0,_.jsx)(Ze.Sl,{name:"section",mod:{flat:!0},children:(0,_.jsx)(WD,{annotation:n})})})]}):null})),UD=e=>{const t=e.pk||e.id,n=e.serializeAnnotation(),r=e.versions.draft,o={id:t,result:n};return r&&(o.draft=r),o},ZD=(0,y.PA)((({store:e})=>{const t=(0,p.useRef)(),n=(0,p.useRef)(),r=(0,p.useRef)(),o=(0,p.useCallback)((()=>{var o,i,a;const s=null==(o=t.current)?void 0:o.value,l=JSON.parse((null==(i=r.current)?void 0:i.value)||'[{ "result": [] }]'),c=JSON.parse(null==(a=n.current)?void 0:a.value);e.resetState(),e.assignConfig(s),e.assignTask({data:c}),e.initializeStore({annotations:l,predictions:[]});const d=e.annotationStore;d.annotations.length&&d.selectAnnotation(d.annotations[0].id)}),[]),i=(0,p.useCallback)((()=>{const t=r.current;if(!t)return;const n=e.annotationStore.selected,o=[UD(n)];t.value=JSON.stringify(o,null,2)}),[]),a=(0,p.useCallback)((()=>{const t=r.current;if(!t)return;const{annotations:n,predictions:o}=e.annotationStore,i=[...n,...o].map(UD);t.value=JSON.stringify(i,null,2)}),[]);return(0,_.jsxs)("div",{style:{width:"100%"},children:[(0,_.jsx)("br",{}),(0,_.jsx)("h2",{children:"Debug"}),(0,_.jsxs)("div",{children:[(0,_.jsx)(jr.A,{onClick:a,children:"↓ Serialize All Annotations"}),(0,_.jsx)(jr.A,{onClick:i,children:"↓ Serialize Current Annotation"}),(0,_.jsx)(jr.A,{onClick:o,children:"↑ Simulate Loading Task"})]}),(0,_.jsx)(kK.A,{children:(0,_.jsxs)("div",{style:{display:"flex"},children:[(0,_.jsxs)("div",{style:{flexBasis:"50%"},children:[(0,_.jsx)("p",{children:"Data"}),(0,_.jsx)("textarea",{style:{width:"100%"},ref:n,rows:4,defaultValue:e.task.data,className:"is-search"}),(0,_.jsx)("p",{children:"Config"}),(0,_.jsx)("textarea",{style:{width:"100%"},ref:t,rows:16,defaultValue:e.config,className:"is-search"})]}),(0,_.jsxs)("div",{style:{flexBasis:"50%"},children:[(0,_.jsx)("p",{children:"Annotations"}),(0,_.jsx)("textarea",{style:{width:"100%"},ref:r,rows:22,className:"is-search"})]})]})})]})}));var GD=n(18869),YD=n(83764);const XD="grid--e4IWo",qD="container--CXRH5",JD="left--_1fAk",QD="right--LGT3p",eN=(0,y.PA)((0,p.forwardRef)((({entity:e,selected:t,style:n,onClick:r,bordered:o=!0,prediction:i=!1,displayGroundTruth:a=!1},s)=>{var l,c;const d=e.userGenerate&&!e.sentUserGenerate||e.draftSelected;return(0,_.jsx)(Ze.eB,{name:"entity-tab",ref:s,mod:{selected:t,bordered:o},style:n,onClick:t=>{t.preventDefault(),t.stopPropagation(),null==r||r(e,i)},children:(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"userpic",tag:FM,showUsername:!0,username:i?e.createdBy:null,user:null!=(l=e.user)?l:{email:e.createdBy},mod:{prediction:i},children:i&&(0,_.jsx)(Ps,{style:{width:16,height:16}})}),(0,_.jsxs)(Ze.Sl,{name:"identifier",children:["ID ",null!=(c=e.pk)?c:e.id," ",d&&"*"]}),a&&e.ground_truth&&(0,_.jsx)(Ze.Sl,{name:"ground-truth",tag:kl}),e.skipped&&(0,_.jsx)(Ze.Sl,{name:"skipped",tag:Vl})]})})})));class tN extends p.Component{componentDidMount(){Promise.all(this.props.annotation.objects.map((e=>"image"===e.type?Promise.resolve():e.isReady?Promise.resolve(e.isReady):new Promise((t=>{const n=(0,u.lB)(e,"isReady",(()=>{n(),t()}))}))))).then((()=>{setTimeout(this.props.onFinish,32)}))}render(){return(0,_.jsx)(DM,{root:this.props.root,annotation:this.props.annotation})}}class nN extends p.Component{constructor(...e){super(...e),this.state={item:0,loaded:new Set},this.container=p.createRef(),this.onFinish=()=>{const e=this.container.current;if(!e)return;const t=e.children[e.children.length-1],n=t.children[t.children.length-1],r=n.cloneNode(!0);e.children[this.state.item].appendChild(r),yt.A.stages.map((e=>e.draw()));const o=n.querySelectorAll("canvas");r.querySelectorAll("canvas").forEach(((e,t)=>{e.getContext("2d").drawImage(o[t],0,0)}));const i=n.querySelectorAll("iframe");r.querySelectorAll("iframe").forEach(((e,t)=>{e.contentWindow.document.open(),e.contentWindow.document.write(i[t].contentDocument.documentElement.outerHTML),(0,je.moveStylesBetweenHeadTags)(i[t].contentDocument.head,e.contentDocument.head)})),this.setState((e=>Object.assign({},e,{loaded:new Set([...e.loaded,this.props.store.selected.id])}))),this.renderNext()},this.shift=e=>{const t=this.container.current,n=t.children,r=Array.from(n).findIndex((e=>t.scrollLeft<=e.offsetLeft));if(!t)return;const o=this.props.annotations.length,i=r+e;if(i<0||i>o-1)return;const a=n[i].offsetLeft;t.scrollTo({left:a,top:0,behavior:"smooth"})},this.left=()=>{this.shift(-1)},this.right=()=>{this.shift(1)},this.select=e=>{const{store:t}=this.props;"annotation"===e.type?t.selectAnnotation(e.id):t.selectPrediction(e.id)}}shouldComponentUpdate(e,t){return!e.store.selected.selected||t.item>=e.annotations.length||e.annotations[t.item]===e.store.selected}componentDidMount(){(0,O.VS)(O.cE)||this.props.annotations[0]===this.props.store.selected||this.startRenderCycle()}startRenderCycle(){this.renderNext(0)}renderNext(e){this.setState({item:(0,w.isDefined)(e)?e:this.state.item+1},(()=>{this.state.item!e.hidden)).map((e=>(0,_.jsxs)("div",{id:`c-${e.id}`,style:{position:"relative"},children:[(0,_.jsx)(eN,{entity:e,onClick:()=>this.select(e),prediction:"prediction"===e.type,bordered:!1,style:{height:44}}),(0,O.VS)(O.cE)?(0,_.jsx)(DM,{root:this.props.root,annotation:e}):!this.state.loaded.has(e.id)&&(0,_.jsx)("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,_.jsx)(v.A,{size:"large"})})]},`anno-${e.id}`))),r&&(0,_.jsxs)("div",{id:"c-tmp",style:{opacity:0,position:"relative",right:99999},children:[(0,_.jsx)(eN,{entity:n,prediction:"prediction"===n.type,bordered:!1,style:{height:44}}),(0,_.jsx)(tN,{root:this.props.root,onFinish:this.onFinish,annotation:n},e)]},"anno-tmp")]}),(0,_.jsx)(jr.A,{type:"text",onClick:this.left,className:JD,icon:(0,_.jsx)(GD.A,{})}),(0,_.jsx)(jr.A,{type:"text",onClick:this.right,className:QD,icon:(0,_.jsx)(YD.A,{})})]})}}const rN=({title:e,children:t,visible:n,onCancel:r})=>{const o={padding:"0 24px 24px",whiteSpace:"pre-wrap"};return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(mn.A,{title:"",visible:n,maskClosable:!0,footer:null,closable:!0,onCancel:()=>r(),width:"70%",style:{maxHeight:"calc(100vh - 250px)",minWidth:"400px",maxWidth:"800px",borderRadius:"8px",overflow:"hidden",padding:"0"},bodyStyle:{overflow:"auto",maxHeight:"calc(100vh - 250px)",padding:"0px"},children:[(0,_.jsx)("h2",{style:{position:"sticky",top:"0px",background:"white",padding:"24px 24px 20px",margin:"0px",fontWeight:"400",fontSize:"24"},children:e}),"string"==typeof t?(0,_.jsx)("p",{style:o,dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(t)}}):(0,_.jsx)("p",{style:o,children:t})]})})};var oN=n(19686);const iN=["relation","startNode","endNode","visible"],aN=["tags","taskData"],sN=({id:e,color:t})=>(0,_.jsx)("marker",{id:`arrow-${e}`,viewBox:"0 0 10 10",refX:8,refY:5,markerWidth:4,markerHeight:4,orient:"auto-start-reverse",children:(0,_.jsx)("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:t})}),lN=({x:e,y:t,width:n,height:r})=>(0,_.jsx)("rect",{x:e,y:t,width:n,height:r,fill:"none"}),cN=({id:e,command:t,color:n,direction:r,highlight:o})=>{const i=o?"#fa541c":n,a={d:t,stroke:i,fill:"none",strokeLinecap:"round"},s={};return"bi"!==r&&"right"!==r||(s.markerEnd=`url(#arrow-${e})`),"bi"!==r&&"left"!==r||(s.markerStart=`url(#arrow-${e})`),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("defs",{children:(0,_.jsx)(sN,{id:e,color:i})}),o&&(0,_.jsx)("path",Object.assign({},a,{stroke:n,opacity:.1,strokeWidth:6})),(0,_.jsx)("path",Object.assign({},a,{opacity:o?1:.6,strokeWidth:2},s))]})},dN=({label:e,position:t})=>{const[n,r]=t,o=(0,p.useRef)(),[i,a]=(0,p.useState)({width:0,height:0,x:0,y:0}),s={transform:`translate(${n}, ${r})`,textAnchor:"middle",dominantBaseline:"middle"};return(0,p.useEffect)((()=>{const e=o.current.getBBox();a({x:e.x-5,y:e.y-3,width:e.width+10,height:e.height+6})}),[e]),(0,_.jsxs)("g",Object.assign({},s,{children:[(0,_.jsx)("rect",Object.assign({},i,{stroke:"#fff",strokeWidth:2,fill:"#a0a",rx:"3"})),(0,_.jsx)("text",Object.assign({ref:o},{fill:"white",style:{fontSize:12,fontFamily:"arial"}},{children:e}))]}))},uN=({id:e,startNode:t,endNode:n,direction:r,rootRef:o,highlight:i,dimm:a,labels:s,visible:l})=>{const c=o.current,d=!0===t.hidden||!0===n.hidden||!l,[,u]=(0,p.useState)(),h=de({id:e,startNode:t,endNode:n,direction:r,labels:s},c),{start:g,end:m}=ue(Object.assign({root:c},h)),[f,v]=he(g,m);return(0,p.useEffect)((()=>(h.onChange((()=>u({}))),()=>h.destroy())),[]),g.width<1||g.height<1||m.width<1||m.height<1?null:(0,_.jsxs)("g",{opacity:a&&!i?.5:1,visibility:d?"hidden":"visible",children:[(0,_.jsx)(lN,Object.assign({},g)),(0,_.jsx)(lN,Object.assign({},m)),(0,_.jsx)(cN,{id:h.id,command:f,color:h.color,direction:h.direction,highlight:i}),h.label&&(0,_.jsx)(dN,{label:h.label,position:v})]})},hN=(0,y.PA)((e=>{let{relation:t,startNode:n,endNode:r,visible:o}=e,i=(0,Yn.A)(e,iN);const a=[n.getRegionElement?n.getRegionElement():n,r.getRegionElement?r.getRegionElement():r],[s,l]=(0,p.useState)(a[0]&&a[1]);(0,p.useEffect)((()=>{let e;const t=()=>{const n=(0,w.isDefined)(a[0])&&(0,w.isDefined)(a[1]);s!==n?l(n):!1===s&&(e=setTimeout(t,30))};return e=setTimeout(t,30),()=>clearTimeout(e)}),[a,s]);const c=o&&t.visible;return s&&t.shouldRender?(0,_.jsx)(uN,Object.assign({id:t.id,startNode:n,endNode:r,direction:t.direction,visible:c,labels:t.selectedValues},i)):null}));class gN extends p.PureComponent{constructor(...e){super(...e),this.rootNode=(0,p.createRef)(),this.timer=null,this.state={shouldRender:!1,shouldRenderConnections:Math.random()},this.onResize=()=>{this.setState({shouldRenderConnections:Math.random()})}}componentDidUpdate(){this.rootNode.current&&!this.state.shouldRender&&this.setState({shouldRender:!0})}render(){const{relations:e,visible:t,highlighted:n}=this.props,r=!!n,o={top:0,left:0,width:"100%",height:"100%",position:"absolute",pointerEvents:"none",zIndex:100};return(0,_.jsx)(oN.Ay,{onResize:this.onResize,children:()=>(0,_.jsxs)("svg",{className:"relations-overlay",ref:this.rootNode,xmlns:"http://www.w3.org/2000/svg",style:o,children:[(0,_.jsx)("title",{children:this.state.shouldRender?"Arrow Marker":""}),this.state.shouldRender&&this.renderRelations(e,t,r,n)]})})}renderRelations(e,t,n,r){return e.map((e=>{const o=r===e;return(0,_.jsx)(hN,{relation:e,rootRef:this.rootNode,startNode:e.node1,endNode:e.node2,dimm:n&&!o,highlight:o,visible:o||t,shouldUpdate:this.state.shouldRenderConnections},e.id)}))}}const mN=(0,y.PA)(gN),pN=(0,y.PA)((0,p.forwardRef)((({store:e,tags:t},n)=>{var r;const{relations:o,showConnections:i,highlighted:a}=e;return(0,_.jsx)(mN,{ref:n,relations:Array.from(o),visible:i,highlighted:a,tags:Array.from(null!=(r=null==t||null==t.values?void 0:t.values())?r:[])})})));let fN=null;const vN=(e,t)=>{if(clearTimeout(fN),(0,O.VS)(O.cE)){if(![...e.values()].every(h._n))return!1}else if(!(0,h._n)(e))return;const n=Array.from(e.values()).reduce(((e,t)=>{var n;return e&&(null==(n=null==t?void 0:t.isReady)||n)}),!0);t(n),n||(fN=setTimeout((()=>{vN(e,t)}),100))},yN=(0,y.PA)((0,p.forwardRef)(((e,t)=>{let{tags:n,taskData:r}=e,o=(0,Yn.A)(e,aN);const[i,a]=(0,p.useState)(!1);return(0,p.useEffect)((()=>(vN(n,(e=>{a(e)})),()=>clearTimeout(fN))),[r,n]),i&&(0,_.jsx)(pN,Object.assign({ref:t},o))}))),bN="block--sSl0y";class xN extends p.Component{componentDidMount(){const{annotation:e}=this.props;e&&e.updateObjects()}render(){let e=bN;return this.props.className&&(e=`${e} ${this.props.className}`),(0,_.jsx)("div",{className:e,children:this.props.children})}}xN.propTypes={children:Ce.PropTypes.array.isRequired};var wN=n(23091),CN=n(54710);const SN={enableHotkeys:{newUI:{title:"Labeling hotkeys",description:"Enables quick selection of labels using hotkeys"},description:"Enable labeling hotkeys",onChangeEvent:"toggleHotkeys",defaultValue:!0},enableTooltips:{newUI:{title:"Show hotkeys on tooltips",description:"Displays keybindings on tools and actions tooltips"},description:"Show hotkey tooltips",onChangeEvent:"toggleTooltips",checked:"",defaultValue:!1},enableLabelTooltips:{newUI:{title:"Show hotkeys on labels",description:"Displays keybindings on labels"},description:"Show labels hotkey tooltips",onChangeEvent:"toggleLabelTooltips",defaultValue:!0},showLabels:{newUI:{title:"Show region labels",description:"Display region label names"},description:"Show labels inside the regions",onChangeEvent:"toggleShowLabels",defaultValue:!1},continuousLabeling:{newUI:{title:"Keep label selected after creating a region",description:"Allows continuous region creation using the selected label"},description:"Keep label selected after creating a region",onChangeEvent:"toggleContinuousLabeling",defaultValue:!1},selectAfterCreate:{newUI:{title:"Select region after creating it",description:"Automatically selects newly created regions"},description:"Select regions after creating",onChangeEvent:"toggleSelectAfterCreate",defaultValue:!1},showLineNumbers:{newUI:{tags:"Text Tag",title:"Show line numbers",description:"Identify and reference specific lines of text in your document"},description:"Show line numbers for Text",onChangeEvent:"toggleShowLineNumbers",defaultValue:!1},preserveSelectedTool:{newUI:{tags:"Image Tag",title:"Keep selected tool",description:"Persists the selected tool across tasks"},description:"Remember Selected Tool",onChangeEvent:"togglepreserveSelectedTool",defaultValue:!0},enableSmoothing:{newUI:{tags:"Image Tag",title:"Pixel smoothing on zoom",description:"Smooth image pixels when zoomed in"},description:"Enable image smoothing when zoom",onChangeEvent:"toggleSmoothing",defaultValue:!0}},jN={videoDrawOutside:{description:"Allow drawing outside of video boundaries",defaultValue:!1,type:"boolean",ff:O.PR},videoHopSize:{description:"Video hop size",defaultValue:10,type:"number"}},kN=(0,y.PA)((({store:e,name:t,value:n})=>{const r={onChange:r=>{if(n.onChangeEvent)n.onChangeEvent(r);else if("boolean"===n.type)e.settings.toggleProperty(t);else{const o="number"===n.type?Number(r.target.value):r.target.value;e.settings.setProperty(t,o)}}};return"boolean"===n.type&&(r.checked=e.settings[t]),"boolean"!==n.type&&(r.type=n.type,r.value=e.settings[t],r.placeholder=n.description),"number"===n.type&&(r.step=n.step,r.min=n.min,r.max=n.max),(0,_.jsx)(Ze.Sl,{name:"field",children:"boolean"===n.type?(0,_.jsx)(CN.S,Object.assign({},r,{children:n.description})):(0,_.jsxs)("label",{children:[n.description,(0,_.jsx)(RM.A,Object.assign({},r))]})},t)})),ON=(0,y.PA)((({store:e,settings:t})=>(0,_.jsx)(Ze.eB,{name:"settings",children:Object.entries(t).map((([t,n])=>n.ff&&!(0,O.VS)(n.ff)?null:(0,_.jsx)(kN,{name:t,store:e,value:n},t)))}))),RN=({store:e})=>(0,_.jsx)(ON,{store:e,settings:jN});RN.displayName="VideoSettings",RN.tagName="Video",RN.title="Video";const EN=(0,Gj.PA)(RN),_N=(0,O.VS)(O.bA)?{newUI:!0}:{},AN=Object.keys(SN);if((0,O.VS)(O.bA)){const e=AN.findIndex((e=>"enableTooltips"===e)),t=AN.findIndex((e=>"enableLabelTooltips"===e)),n=AN[e];AN[e]=AN[t],AN[t]=n}const TN=({children:e})=>(0,_.jsx)(Ze.eB,{name:"settings-tag",children:e}),PN=(0,y.PA)((({store:e})=>(0,_.jsx)(Ze.eB,{name:"settings",mod:_N,children:AN.map(((t,n)=>{var r;return(0,_.jsx)(Ze.Sl,{name:"field",tag:"label",children:(0,O.VS)(O.bA)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(Ze.eB,{name:"settings__label",children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[SN[t].newUI.title,null==(r=SN[t].newUI.tags)?void 0:r.split(",").map((e=>(0,_.jsx)(TN,{children:e},e)))]}),(0,_.jsx)(Ze.eB,{name:"description",children:SN[t].newUI.description})]}),(0,_.jsx)(gA,{checked:e.settings[t],onChange:e.settings[SN[t].onChangeEvent],description:SN[t].description},n)]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(CN.S,{checked:e.settings[t],onChange:e.settings[SN[t].onChangeEvent],children:SN[t].description},n),(0,_.jsx)("br",{})]})},n)}))}))),IN=(0,y.PA)((({store:e})=>(0,_.jsxs)(Ze.eB,{name:"settings",mod:_N,children:[(0,_.jsx)(Ze.Sl,{name:"field",children:(0,_.jsx)(CN.S,{checked:e.settings.bottomSidePanel,onChange:()=>{e.settings.toggleBottomSP(),setTimeout(w.triggerResizeEvent)},children:"Move sidepanel to the bottom"})}),(0,_.jsx)(Ze.Sl,{name:"field",children:(0,_.jsx)(CN.S,{checked:e.settings.displayLabelsByDefault,onChange:e.settings.toggleSidepanelModel,children:"Display Labels by default in Results panel"})}),(0,_.jsx)(Ze.Sl,{name:"field",children:(0,_.jsx)(CN.S,{value:"Show Annotations panel",defaultChecked:e.settings.showAnnotationsPanel,onChange:()=>{e.settings.toggleAnnotationsPanel()},children:"Show Annotations panel"})}),(0,_.jsx)(Ze.Sl,{name:"field",children:(0,_.jsx)(CN.S,{value:"Show Predictions panel",defaultChecked:e.settings.showPredictionsPanel,onChange:()=>{e.settings.togglePredictionsPanel()},children:"Show Predictions panel"})})]}))),LN={General:{name:"General",component:PN},Hotkeys:{name:"Hotkeys",component:()=>{const e=[{title:"Shortcut",dataIndex:"combo",key:"combo"},{title:"Description",dataIndex:"descr",key:"descr"}],t=yr.namespaces();return(0,_.jsx)(Ze.eB,{name:"keys",children:(0,_.jsx)(wN.A,{size:"small",children:Object.entries(t).map((([t,n])=>{var r,o;return 0===Object.keys(n.descriptions).length?null:(0,_.jsx)(wN.A.TabPane,{tab:null!=(r=n.description)?r:t,children:(0,_.jsx)(BA.A,{columns:e,dataSource:(o=n.descriptions,Object.keys(o).filter((e=>o[e])).map((e=>({key:e,combo:e.split(",").map((e=>(0,_.jsx)(Ze.Sl,{name:"key-group",children:e.trim().split("+").map((e=>(0,_.jsx)(Ze.Sl,{tag:"kbd",name:"key",children:e},e)))},e))),descr:o[e]})))),size:"small"})},t)}))})})}}};(0,O.VS)(O.bA)||(LN.Layout={name:"Layout",component:IN});const MN=Object.keys(LN)[0],KN=(0,O.VS)(O.bA)?{name:"settings-modal",title:"Labeling Interface Settings",closeIcon:(0,_.jsx)(Zc,{})}:{name:"settings-modal-old",title:"Settings",bodyStyle:{paddingTop:"0"}},DN=(0,y.PA)((({store:e})=>{const t=(0,p.useMemo)((()=>{const t=Object.values(e.annotationStore.names.toJSON()),n=Object.values(c);return t.reduce(((t,r)=>{const o=e.annotationStore.names.get(r).type,i=n.find((({tagName:e})=>e.toLowerCase()===o.toLowerCase()));return i&&t.push(i),t}),[])}),[]);return(0,_.jsx)(Ze.eB,Object.assign({tag:mn.A,visible:e.showingSettings,onCancel:e.toggleSettings,footer:""},KN,{children:(0,_.jsxs)(wN.A,{defaultActiveKey:MN,children:[Object.entries(LN).map((([t,{name:n,component:r}])=>(0,_.jsx)(wN.A.TabPane,{tab:n,children:p.createElement(r,{store:e})},t))),t.map((t=>(0,_.jsx)(wN.A.TabPane,{tab:t.title,children:(0,_.jsx)(t,{store:e})},t.tagName)))]})}))})),NN=({children:e})=>(0,_.jsx)(Ze.eB,{name:"sidebar-tabs",children:(0,_.jsx)(Ze.Sl,{name:"content",children:e})}),VN=(e,t=[])=>{(0,p.useEffect)((()=>{const t={capture:e.capture,passive:e.passive},n=e.elementRef.current,r=n=>{if(e.disabled)return;if(n.defaultPrevented)return;const r=null==e.onMouseDown?void 0:e.onMouseDown(n),o=t=>{null==e.onMouseMove||e.onMouseMove(t,r)},i=n=>{document.removeEventListener("mousemove",o,t),document.removeEventListener("mouseup",i),null==e.onMouseUp||e.onMouseUp(n,r)};document.addEventListener("mousemove",o,t),document.addEventListener("mouseup",i)};return null==n||n.addEventListener("mousedown",r),()=>{null==e.onUnmount||e.onUnmount(),null==n||n.removeEventListener("mousedown",r)}}),t)},zN=320,BN=300,HN=500,FN=24,WN=["top-left","top-right","bottom-left","bottom-right","top","bottom","right","left"],$N=({name:e,mix:t,root:n,title:r,width:o,maxWidth:i,height:a,visible:s,detached:l,alignment:c,expanded:d,top:u,left:h,relativeTop:g,relativeLeft:m,zIndex:f,tooltip:v,locked:y=!1,positioning:b=!1,onSnap:x,onResize:C,onResizeStart:S,onResizeEnd:j,onVisibilityChange:k,onPositionChange:O,onPositionChangeBegin:R,children:E})=>{const A=(0,p.useRef)(),T=(0,p.useRef)(),P=(0,p.useRef)(),I=(0,p.useRef)({onResize:C,onResizeStart:S,onResizeEnd:j,onPositionChange:O,onPositionChangeBegin:R,onVisibilityChange:k,onSnap:x}),[L,M]=(0,p.useState)(),K=(0,p.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),null==k||k(e,!1)}),[k]),D=(0,p.useCallback)((()=>{null==k||k(e,!0)}),[k]),N=(0,p.useMemo)((()=>{const e=s?{height:l&&null!=a?a:"100%",width:d?"100%":null!=o?o:zN}:{width:l?null!=o?o:zN:"100%",height:l?26:void 0};return Object.assign({},e,{zIndex:f})}),[o,a,s,l,d,f]),V=(0,p.useMemo)((()=>l&&!y?{top:`${g}%`,left:`${m}%`}:{}),[l,g,m,y]),z=(0,p.useMemo)((()=>({detached:!y&&l,resizing:(0,w.isDefined)(L),hidden:!s,alignment:l?"left":null!=c?c:"left",disabled:y})),[c,s,l,L,y]),B=(0,p.useMemo)((()=>l?s?(0,_.jsx)(yw,{}):(0,_.jsx)(jw,{}):"left"===c?s?(0,_.jsx)(by,{}):(0,_.jsx)(Ty,{}):"right"===c?s?(0,_.jsx)(Ty,{}):(0,_.jsx)(by,{}):null),[l,s,c]),H=(0,p.useMemo)((()=>`${s?"Collapse":"Expand"} ${v}`),[s,v]);return(0,p.useEffect)((()=>{Object.assign(I.current,{onResize:C,onResizeStart:S,onResizeEnd:j,onPositionChangeBegin:R,onPositionChange:O,onVisibilityChange:k,onSnap:x})}),[C,S,j,O,k,R,x]),VN({elementRef:A,disabled:y||!l&&!s,onMouseDown(t){const r=t.target,o="[class*=__toggle]";if(r.matches(o)||r.closest(o))return;const i=l,a=T.current,s=n.current.getBoundingClientRect(),c=a.getBoundingClientRect(),[d,g]=[t.pageX,t.pageY],[m,p]=[c.left-s.left,c.top-s.top];return null==I.current.onPositionChangeBegin||I.current.onPositionChangeBegin(e,u,h,l),{x:d,y:g,oX:m,oY:p,allowDrag:i}},onMouseMove(t,n){if(n){const{x:s,y:l,oX:c,oY:d}=n;let{allowDrag:u}=n;const[h,g]=[t.pageX,t.pageY];if((r=s,o=h,i=l,a=g,Math.sqrt((o-r)**2+(a-i)**2))>30&&(u=!0),!u)return;const[m,p]=[c+(h-s),d+(g-l)];null==I.current.onPositionChange||I.current.onPositionChange(e,p,m,!0)}var r,o,i,a},onMouseUp(){null==I.current.onSnap||I.current.onSnap(e)}},[A,l,s,y]),VN({elementRef:P,disabled:y||b,capture:!0,passive:!0,onMouseDown(e){const t=e.target.dataset.resize,n=(()=>{switch(t){case"top-left":return"top-left";case"top":case"top-right":return"top";case"left":case"bottom-left":return"left"}})(),r={x:null!==(null==t?void 0:t.match(/left|right/i)),y:null!==(null==t?void 0:t.match(/top|bottom/i))};return M(t),null==I.current.onResizeStart||I.current.onResizeStart(),{pos:[e.pageX,e.pageY],type:t,width:o,maxWidth:i,height:a,top:u,left:h,resizeDirections:r,shift:n}},onMouseMove(t,n){if(n){const{pos:r,width:o,height:i,maxWidth:a,top:s,left:l,resizeDirections:c,shift:d}=n,[u,h]=r,g=c.x?t.pageX-u:0,m=c.y?t.pageY-h:0,p=(0,w.isDefined)(d)&&["left","top-left"].includes(d),f=(0,w.isDefined)(d)&&["top","top-left"].includes(d),v=(0,w.clamp)(p?o-g:o+g,zN,a),y=(0,w.clamp)(f?i-m:i+m,BN,s+i),b=f?s+(i-y):s,x=p?l+(o-v):l;I.current.onResize(e,v,y,b,x)}},onMouseUp(){null==I.current.onResizeEnd||I.current.onResizeEnd(),M(void 0)}},[I,l,o,i,a,u,h,s,y,b]),(0,_.jsxs)(Ze.eB,{ref:T,name:"panel",mix:e,mod:z,style:Object.assign({},N,V),children:[(0,_.jsxs)(Ze.Sl,{name:"content",children:[!y&&(0,_.jsxs)(Ze.Sl,{ref:A,name:"header",onClick:l?void 0:D,children:[(s||l)&&(0,_.jsx)(Ze.Sl,{name:"title",children:r}),(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{enabled:s},onClick:l&&!s?D:K,"data-tooltip":H,children:B})]}),s&&(0,_.jsx)(Ze.Sl,{name:"body",children:(0,_.jsx)(Ze.eB,{name:e,mix:t,children:E})})]}),s&&!b&&!y&&(0,_.jsx)(Ze.Sl,{name:"resizers",ref:P,mod:{locked:b||y},children:WN.map((e=>("left"===e||"right"===e)&&c!==e||l||l?(0,_.jsx)(Ze.Sl,{name:"resizer",mod:{drag:e===L},"data-resize":e},e):null))})]})},UN=["onChange","type","value","step"],ZN=e=>{const t=(e=>{if((0,h.fn)(e)){const t=e.getSubTypes();return(0,h.Cb)(t)?t.name:null}return(0,h.Cb)(e)?e.name:null})(e);return"number"===t?"number":"text"},GN={angle:pb},YN=({property:e,label:t,region:n})=>{const r=(0,Ze.KE)(),[o,i]=(0,p.useState)(n.getProperty(e)),a=(0,p.useMemo)((()=>(0,h.Pw)(n).properties[e]),[n,e]),s=(0,p.useMemo)((()=>(0,h.Cb)(a)),[a]),l=(0,p.useMemo)((()=>{if(s)return null;let e=null;if((0,h.CK)(a)){const t=(0,h.fn)(a)?a.getSubTypes().getSubTypes():a.getSubTypes();e=t.some((e=>(0,h.aw)(e)||(0,h.Cb)(e)))?t.map((e=>e.value)):null}return e}),[a,s]),c=(0,p.useMemo)((()=>{if(!s)return!1;return((0,h.fn)(a)?a.getSubTypes():a)===h.gK.boolean}),[a,s]),d=(0,p.useCallback)((t=>{if(t!==n.getProperty(e))try{n.setProperty(e,t)}catch(e){console.error(e)}}),[a,c]);return(0,p.useEffect)((()=>{const t=(0,u.lB)(n,e,(({newValue:e,oldValue:t})=>{t.storedValue!==e.storedValue&&i(e.storedValue)}));return()=>t()}),[n]),(0,_.jsxs)(Ze.Sl,{name:"property",tag:"label",children:[c?(0,_.jsx)(CN.S,{className:null==r?void 0:r.elem("input").toClassName(),checked:o,onChange:e=>d(e.target.checked)}):s?(0,_.jsx)(XN,{type:ZN(a),step:"0.01",value:o,onChange:e=>d(Number(e))}):l?(0,_.jsx)("select",{value:o,onChange:e=>d(e.target.value),className:null==r?void 0:r.elem("select").toClassName(),children:l.map(((e,t)=>(0,_.jsx)("option",{value:e,children:e},`${e}-${t}`)))}):null,(0,_.jsx)(qN,{label:t})]})},XN=e=>{let{onChange:t,type:n,value:r,step:o}=e,i=(0,Yn.A)(e,UN);const a=(0,Ze.KE)(),[s,l]=(0,p.useState)(r),c=(0,p.useCallback)(((e,n=!0)=>{const r=e;l(r),n&&(null==t||t(r))}),[t,n]),d=(0,p.useCallback)((e=>{let t=e.target.value,r=!0;"number"===n&&(t.match(/^([0-9,.]+)$/gi)||(r=!1),t.match(/(,|\.)$/)&&(t=t.replace(/,/,"."),r=!1),r&&(t=Number.parseFloat(t))),c(t,r)}),[c,n]),u=(0,p.useCallback)((e=>{if("number"===n&&("ArrowUp"===e.key||"ArrowDown"===e.key)){e.preventDefault();const t=e.altKey&&e.shiftKey?.01:e.shiftKey?10:e.altKey?.1:1;let n=Number(s);"ArrowUp"===e.key?n+=t:n-=t,c(n)}}),[s,n,o]);return(0,p.useEffect)((()=>{c(r)}),[r]),(0,_.jsx)("input",Object.assign({},i,{className:null==a?void 0:a.elem("input").toClassName(),type:"text",step:o,onChange:d,onKeyDown:u,value:s}))},qN=({label:e})=>{const t=(0,p.useMemo)((()=>{if(e.startsWith("icon:")){var t;const n=e.split(":")[1];return null!=(t=GN[n])?t:null}return null}),[e]);return(0,_.jsx)(Ze.Sl,{name:"text",tag:"span",children:t?(0,_.jsx)(t,{}):e})},JN=(0,y.PA)((({region:e})=>{var t;const n=null!=(t=e.editableFields)?t:[],r="AudioRegionModel"===(0,h.Pw)(e).name,o=t=>{e.setProperty("start",t)},i=t=>{e.setProperty("end",t)};return(0,_.jsx)(Ze.eB,{name:"region-editor",mod:{disabled:e.isReadOnly()},children:r&&(0,O.VS)(O.vS)?(0,_.jsx)(Ze.Sl,{name:"wrapper-time-control",children:(0,_.jsx)(OC,{startTime:e.start,endTime:e.end,minTime:0,maxTime:null==e||null==(a=e._ws_region)?void 0:a.duration,isSidepanel:!0,onChangeStartTime:o,onChangeEndTime:i,showLabels:!0,showDuration:!0})}):(0,_.jsx)(Ze.Sl,{name:"wrapper",children:e.editorEnabled&&n.map(((t,n)=>(0,_.jsx)(YN,{property:t.property,label:t.label,region:e},`${t.property}-${n}`)))})});var a})),{Text:QN}=TE.A,eV=(0,y.PA)((({mainValue:e})=>(0,_.jsx)(QN,{mark:!0,children:e.map(((e,t)=>(0,_.jsx)("p",{"data-counter":t+1,children:e},`${e}-${t}`)))}))),tV=(0,y.PA)((({mainValue:e})=>(0,_.jsx)(QN,{mark:!0,children:e.join(", ")}))),nV=(0,y.PA)((({mainValue:e})=>(0,_.jsx)("span",{children:e}))),rV=(0,y.PA)((({result:e})=>{const{type:t,mainValue:n}=e,r=(0,p.useMemo)((()=>"rating"===t?(0,_.jsxs)(Ze.Sl,{name:"result",children:[(0,_.jsx)(QN,{children:"Rating: "}),(0,_.jsx)(Ze.Sl,{name:"value",children:(0,_.jsx)(nV,{mainValue:n})})]}):"textarea"===t?(0,_.jsxs)(Ze.Sl,{name:"result",children:[(0,_.jsx)(QN,{children:"Text: "}),(0,_.jsx)(Ze.Sl,{name:"value",children:(0,_.jsx)(eV,{mainValue:n})})]}):"choices"===t?(0,_.jsxs)(Ze.Sl,{name:"result",children:[(0,_.jsx)(QN,{children:"Choices: "}),(0,_.jsx)(Ze.Sl,{name:"value",children:(0,_.jsx)(tV,{mainValue:n})})]}):"taxonomy"===t?(0,_.jsxs)(Ze.Sl,{name:"result",children:[(0,_.jsx)(QN,{children:"Taxonomy: "}),(0,_.jsx)(Ze.Sl,{name:"value",children:(0,_.jsx)(tV,{mainValue:n.map((e=>e.join("/")))})})]}):void 0),[t,n]);return r?(0,_.jsx)(Ze.eB,{name:"region-meta",children:r}):null})),oV=(0,y.PA)((({region:e})=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(Ze.Sl,{name:"result",children:[(null==e?void 0:e.results).map((e=>(0,_.jsx)(rV,{result:e},e.pid))),null!=e&&e.text?(0,_.jsx)(Ze.eB,{name:"region-meta",children:(0,_.jsx)(Ze.Sl,{name:"item",children:(0,_.jsx)(Ze.Sl,{name:"content",mod:{type:"text"},children:e.text.replace(/\\n/g,"\n")})})}):null]}),(0,_.jsx)(JN,{region:e})]}))),iV=(0,y.PA)((({region:e,editMode:t,cancelEditMode:n,enterEditMode:r})=>{var o,i;const a=(0,Ze.KE)(),s=(0,p.useRef)(),l=t=>{e.setMetaText(t),e.setNormInput(t)};return(0,p.useEffect)((()=>{if(t&&s.current){const{current:e}=s;e.focus(),e.setSelectionRange(e.value.length,e.value.length)}}),[t]),(0,_.jsx)(_.Fragment,{children:t?(0,_.jsx)("textarea",{ref:e=>s.current=e,placeholder:"Meta",className:a.elem("meta-text").toClassName(),value:e.normInput,onChange:e=>l(e.target.value),onBlur:()=>{l(e.normInput),null==n||n()},onKeyDown:t=>{"Enter"!==t.key||t.shiftKey||(t.preventDefault(),l(e.normInput),null==n||n())}}):(null==(o=e.meta)?void 0:o.text)&&(0,_.jsx)(Ze.Sl,{name:"meta-text",onClick:()=>null==r?void 0:r(),children:null==(i=e.meta)?void 0:i.text})})})),aV=["children","onClick"],sV=e=>{var t;let{children:n,onClick:r}=e,o=(0,Yn.A)(e,aV);return(0,_.jsx)(za,Object.assign({},o,{onClick:e=>{e.stopPropagation(),null==r||r(e)},type:"text",style:Object.assign({padding:0,width:24,height:24},null!=(t=o.style)?t:{}),children:n}))},lV=(0,y.PA)((({item:e,annotation:t,hovered:n,locked:r,hotkey:o,look:i,style:a,onClick:s})=>{if(!e)return null;const l=r||e.isReadOnly()||t.isReadOnly(),c=e.isReadOnly()&&!r;if((0,O.VS)(O.bA)){const t=Object.assign({},a,{display:e.isReadOnly()||r?void 0:"none"});return(0,_.jsx)(sV,{disabled:c,onClick:s,hotkey:o,look:i,style:t,children:l?(0,_.jsx)(Hf,{}):(0,_.jsx)(Gf,{})})}return e&&(n||e.isReadOnly()||r)&&(0,_.jsx)(sV,{disabled:c,onClick:s,hotkey:o,look:i,style:a,children:l?(0,_.jsx)(Hf,{}):(0,_.jsx)(Gf,{})})})),cV=(0,y.PA)((({region:e})=>{const t=e.labelings.map((e=>e.selectedLabels||[])),n=[].concat(...t);return n.length?(0,_.jsx)(Ze.eB,{name:"labels-list",children:n.map(((e,t)=>{const n=e.background||"#000000";return[t?", ":null,(0,_.jsx)("span",{style:{color:n},children:e.value},e.id)]}))}):(0,_.jsx)(Ze.eB,{name:"labels-list",children:"No label"})})),dV=["children"],uV=(0,y.PA)((({region:e,compact:t=!1,withActions:n=!0,withIds:r=!0,mainDetails:o,metaDetails:i})=>{var a,s;const{annotation:l}=e,{selectedRegions:c}=l,[d,u]=(0,p.useState)(!1),h=(0,p.useMemo)((()=>!!c.find((e=>!e.isReadOnly()&&!e.classification))),[c]),g=(0,p.useMemo)((()=>{var t,n;const r=null!=(t=null!=(n=e.background)?n:e.getOneColor())?t:"#666";return pt()(r).alpha(1)}),[e.background,e.style]);return(0,_.jsxs)(Ze.eB,{name:"detailed-region",mod:{compact:t},children:[(0,_.jsxs)(Ze.Sl,{name:"head",style:{color:g.css()},children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(LO,{node:e})}),(0,_.jsx)(cV,{region:e})]}),r&&(0,_.jsx)("span",{children:e.cleanId})]}),o&&(0,_.jsx)(Ze.Sl,{name:"content",children:(0,_.jsx)(o,{region:e})}),e.isDrawing&&(0,_.jsxs)(Ze.Sl,{name:"warning",children:[(0,_.jsx)(Nd,{}),(0,_.jsxs)(Ze.Sl,{name:"warning-text",children:["Incomplete ",null!=(a=null==(s=e.type)?void 0:s.replace("region",""))?a:"region"]})]}),n&&(0,_.jsx)(hV,{region:e,editMode:d,annotation:l,hasEditableRegions:h,onEditModeChange:u}),i&&(0,_.jsx)(Ze.Sl,{name:"content",children:(0,_.jsx)(i,{region:e,editMode:d,enterEditMode:()=>u(!0),cancelEditMode:()=>u(!1)})})]})})),hV=(0,y.PA)((({region:e,annotation:t,editMode:n,onEditModeChange:r})=>{const o=[];return o.push((0,_.jsx)(gV,{icon:(0,_.jsx)(Gp,{}),primary:t.isLinkingMode,onClick:(n,r)=>{r||(t.isLinkingMode?t.stopLinkingMode():t.startLinkingMode(F,e))},hotkey:"region:relation","aria-label":"Create Relation"},"relation")),o.push((0,_.jsx)(gV,{icon:(0,_.jsx)(ef,{}),primary:n,onClick:()=>r(!n),hotkey:"region:meta","aria-label":"Edit region's meta"},"meta")),(0,_.jsxs)(Ze.eB,{name:"region-actions",children:[(0,_.jsx)(Ze.Sl,{name:"group",mod:{align:"left"},children:!e.isReadOnly()&&o}),(0,_.jsxs)(Ze.Sl,{name:"group",mod:{align:"right"},children:[(0,_.jsx)(lV,{item:e,annotation:null==e?void 0:e.annotation,hovered:!0,locked:null==e?void 0:e.locked,onClick:()=>e.setLocked(!e.locked),hotkey:"region:lock",look:"alt",style:{width:36,height:32}}),(0,_.jsx)(gV,{icon:e.hidden?(0,_.jsx)(Ki,{}):(0,_.jsx)(Ai,{}),onClick:e.toggleHidden}),(0,_.jsx)(gV,{danger:!0,disabled:e.isReadOnly(),icon:(0,_.jsx)(bs,{}),onClick:()=>t.deleteRegion(e)})]})]})})),gV=e=>{let{children:t}=e,n=(0,Yn.A)(e,dV);return(0,_.jsx)(za,Object.assign({},n,{look:"alt",style:{padding:0},children:t}))},mV=(0,y.PA)((({relations:e})=>(0,_.jsx)(_.Fragment,{children:e.map(((e,t)=>(0,_.jsx)(pV,{relation:e},t)))}))),pV=(0,y.PA)((({relation:e})=>{const[t,n]=(0,p.useState)(!1),r=(0,p.useCallback)((()=>{e.node1&&e.node2&&(n(!0),e.toggleHighlight(),e.setSelfHighlight(!0))}),[]),o=(0,p.useCallback)((()=>{e.node1&&e.node2&&(n(!1),e.toggleHighlight(),e.setSelfHighlight(!1))}),[]),i=(0,p.useMemo)((()=>{const{direction:t}=e;switch(t){case"left":return(0,_.jsx)(Qy,{"data-direction":e.direction});case"right":return(0,_.jsx)($y,{"data-direction":e.direction});case"bi":return(0,_.jsx)(sb,{"data-direction":e.direction});default:return null}}),[e.direction]);return(0,_.jsxs)(Ze.Sl,{name:"item",mod:{hidden:!e.visible},onMouseEnter:r,onMouseLeave:o,children:[(0,_.jsxs)(Ze.Sl,{name:"content",children:[(0,_.jsx)(Ze.Sl,{name:"icon",onClick:e.rotateDirection,children:(0,_.jsx)(Ze.Sl,{name:"direction",children:i})}),(0,_.jsxs)(Ze.Sl,{name:"nodes",children:[(0,_.jsx)(uV,{compact:!0,withActions:!1,withIds:!1,region:e.node1}),(0,_.jsx)(uV,{compact:!0,withActions:!1,withIds:!1,region:e.node2})]}),(0,_.jsxs)(Ze.Sl,{name:"actions",children:[(0,_.jsx)(Ze.Sl,{name:"action",children:(t||e.showMeta)&&e.hasRelations&&(0,_.jsx)(za,{primary:e.showMeta,"aria-label":(e.showMeta?"Hide":"Show")+" Relation Labels",type:e.showMeta?void 0:"text",onClick:e.toggleMeta,style:{padding:0},children:(0,_.jsx)(wf,{})})}),(0,_.jsx)(Ze.Sl,{name:"action",children:(t||!e.visible)&&(0,_.jsx)(za,{type:"text",onClick:e.toggleVisibility,"aria-label":(e.visible?"Hide":"Show")+" Relation",children:e.visible?(0,_.jsx)(Ai,{}):(0,_.jsx)(Ki,{})})}),(0,_.jsx)(Ze.Sl,{name:"action",children:t&&(0,_.jsx)(za,{type:"text",danger:!0,"aria-label":"Delete Relation",onClick:()=>{e.node1.setHighlight(!1),e.node2.setHighlight(!1),e.parent.deleteRelation(e)},children:(0,_.jsx)(bs,{})})})]})]}),e.showMeta&&(0,_.jsx)(fV,{relation:e})]})})),fV=(0,y.PA)((({relation:e})=>{const{selectedValues:t,control:n}=e,{children:r,choice:o}=n,i=(0,p.useMemo)((()=>"multiple"===o?"multiple":void 0),[o]),a=(0,p.useCallback)((t=>{const n=(0,w.wrapArray)(t);e.setRelations(n)}),[e]);return(0,_.jsx)(Ze.eB,{name:"relation-meta",children:(0,_.jsx)(Zn.A,{mode:i,style:{width:"100%"},placeholder:"Select labels",value:t,onChange:a,children:r.map((e=>(0,_.jsx)(Zn.A.Option,{value:e.value,style:{background:e.background},children:e.value},e.value)))})})})),vV=(0,y.PA)((({relationStore:e})=>{const t=e.orderedRelations;return(0,_.jsx)(Ze.eB,{name:"relations",children:(0,_.jsx)(mV,{relations:t})})})),yV=(0,y.PA)((({relationStore:e})=>{var t;const n=(0,p.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleAllVisibility()}),[e]),r=!(null!=e&&null!=(t=e.relations)&&t.length),o=!(!r&&e.isAllHidden);return(0,_.jsx)(Ze.Sl,{tag:za,type:"text",disabled:r,onClick:n,mod:{hidden:o},"aria-label":o?"Show all":"Hide all",icon:o?(0,_.jsx)(Qw,{}):(0,_.jsx)(Hw,{}),tooltip:o?"Show all":"Hide all",tooltipTheme:"dark"})})),bV=(0,y.PA)((({relationStore:e})=>{var t;const n=(0,p.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleOrder()}),[e]),r=!(null!=e&&null!=(t=e.relations)&&t.length),o="asc"===e.order;return(0,_.jsx)(Ze.Sl,{tag:za,type:"text",onClick:n,disabled:r,mod:{order:e.order},"aria-label":o?"Order by oldest":"Order by newest",icon:o?(0,_.jsx)(Lv,{}):(0,_.jsx)(Zv,{}),tooltip:o?"Order by oldest":"Order by newest",tooltipTheme:"dark"})})),xV=(0,y.PA)((({relationStore:e})=>(0,_.jsxs)(Ze.eB,{name:"relation-controls",children:[(0,_.jsx)(yV,{relationStore:e}),(0,_.jsx)(bV,{relationStore:e})]}))),wV=["currentEntity","regions"],CV=(0,y.PA)((({selection:e,currentEntity:t})=>(0,_.jsx)(_.Fragment,{children:e.size?(0,_.jsx)(EV,{regions:e}):(0,_.jsx)(RV,{currentEntity:t})}))),SV=(0,y.WQ)("store")((0,y.PA)((({store:e})=>(0,_.jsx)(_.Fragment,{children:e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,_.jsx)(Ze.eB,{name:"comments-panel",children:(0,_.jsx)(Ze.Sl,{name:"section-tab",children:(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(RD,{annotationStore:e.annotationStore,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})})})})))),jV=(0,y.WQ)("store")((0,y.PA)((({currentEntity:e})=>{const{relationStore:t}=e;return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(Ze.eB,{name:"relations",children:(0,_.jsxs)(Ze.Sl,{name:"section-tab",children:[(0,_.jsxs)(Ze.Sl,{name:"view-control",children:[(0,_.jsxs)(Ze.Sl,{name:"section-head",children:["Relations (",t.size,")"]}),(0,_.jsx)(xV,{relationStore:t})]}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(vV,{relationStore:t})})]})})})}))),kV=(0,y.WQ)("store")((0,y.PA)((({store:e,currentEntity:t})=>{var n;const r=e.hasInterface("annotations:history"),o=(0,O.VS)(O.Lk);return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(Ze.eB,{name:"history",children:o?(0,_.jsxs)(Ze.Sl,{name:"section-tab",children:[(0,_.jsxs)(Ze.Sl,{name:"section-head",children:["Annotation History",(0,_.jsxs)("span",{children:["#",null!=(n=t.pk)?n:t.id]})]}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(YM,{inline:!0,showDraft:o,enabled:r})})]}):(0,_.jsx)(VM,{item:t})})})}))),OV=(0,y.WQ)("store")((0,y.PA)((({selection:e})=>(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(Ze.eB,{name:"info",children:(0,_.jsxs)(Ze.Sl,{name:"section-tab",children:[(0,_.jsx)(Ze.Sl,{name:"section-head",children:"Selection Details"}),(0,_.jsx)(EV,{regions:e})]})})})))),RV=(0,y.WQ)("store")((0,y.PA)((({store:e,currentEntity:t})=>{var n;const{relationStore:r}=t,o=e.hasInterface("annotations:history"),i=(0,O.VS)(O.Lk);return(0,_.jsxs)(_.Fragment,{children:[i?(0,_.jsxs)(Ze.Sl,{name:"section",children:[(0,_.jsxs)(Ze.Sl,{name:"section-head",children:["Annotation History",(0,_.jsxs)("span",{children:["#",null!=(n=t.pk)?n:t.id]})]}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(YM,{inline:!0,showDraft:i,enabled:o})})]}):(0,_.jsx)(VM,{item:t}),(0,_.jsxs)(Ze.Sl,{name:"section",children:[(0,_.jsxs)(Ze.Sl,{name:"view-control",children:[(0,_.jsxs)(Ze.Sl,{name:"section-head",children:["Relations (",r.size,")"]}),(0,_.jsx)(xV,{relationStore:r})]}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(vV,{relationStore:r})})]}),e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,_.jsxs)(Ze.Sl,{name:"section",children:[(0,_.jsx)(Ze.Sl,{name:"section-head",children:"Comments"}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(RD,{annotationStore:e.annotationStore,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})]})]})})));RV.displayName="GeneralPanel";const EV=(0,y.PA)((({regions:e})=>(0,_.jsx)("div",{children:e.list.map((e=>(0,_.jsx)(_V,{region:e},e.id)))}))),_V=(0,y.PA)((({region:e})=>(0,_.jsx)(uV,{region:e,mainDetails:oV,metaDetails:iV}))),AV=SV,TV=kV,PV=jV,IV=OV,LV=((0,y.PA)((({currentEntity:e,regions:t})=>{const n=t.selection;return(0,_.jsx)(Ze.eB,{name:"details-tab",children:(0,_.jsx)(CV,{selection:n,currentEntity:e})})})),(0,y.PA)((e=>{let{currentEntity:t,regions:n}=e,r=(0,Yn.A)(e,wV);const o=n.selection;return(0,_.jsx)($N,Object.assign({},r,{currentEntity:t,name:"details",title:"Details",children:(0,_.jsx)(CV,{selection:o,currentEntity:t})}))})));var MV,KV=n(99305),DV=["title","titleId"];function NV(){return NV=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zV=function(e,t){var n=e.title,r=e.titleId,o=VV(e,DV);return p.createElement("svg",NV({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,MV||(MV=p.createElement("path",{d:"M10.2678 15C11.0376 16.3333 11.4225 17 11.9999 17C12.5772 17 12.9621 16.3333 13.7319 15L15.464 12C16.2338 10.6667 16.6187 10 16.33 9.5C16.0413 9 15.2715 9 13.7319 9H10.2678C8.72821 9 7.95841 9 7.66974 9.5C7.38106 10 7.76596 10.6667 8.53576 12L10.2678 15Z",fill:"currentColor"})))},BV=(0,p.forwardRef)(zV);n.p;const HV=["item","label","isArea"],{localStorage:FV}=window,WV="collapsed-label-pos",$V=(0,p.createContext)({regions:null}),UV=({entity:e})=>(0,_.jsx)(JV,{node:e}),ZV=({isLeaf:e})=>(0,_.jsx)(qV,{isLeaf:e}),GV=(0,y.PA)((({regions:e,regionsTree:t})=>{const n=(0,p.useRef)(),[r,o]=(0,p.useState)(0);let i=(0,p.useMemo)((()=>{let e=0;return new G((t=>{requestAnimationFrame((()=>{var r,i,a;null!=t&&null!=(r=t[0])&&r.contentRect&&(null==t||null==(i=t[0])||null==(i=i.contentRect)?void 0:i.height)!==e&&(e=(null==t||null==(a=t[0])||null==(a=a.contentRect)?void 0:a.height)||1,n.current&&o(e))}))}))}),[]);(0,p.useEffect)((()=>()=>{var e;null==(e=i)||e.disconnect(),i=null}),[]);const a=(0,p.useCallback)((e=>{var t;if(e)null==(t=i)||t.observe(e);else if(n.current){var r;null==(r=i)||r.unobserve(n.current)}n.current=e,o((null==e?void 0:e.clientHeight)||1)}),[]),s=XV(),l=e.selection.keys,c=(0,Ze.cn)("tree");let d,u;const h=(0,O.VS)(O.TU)&&"label"===e.group;if((0,O.VS)(O.TU)){var g,m,f;const[e,n]=(0,p.useState)(null!=(g=null==(m=FV.getItem(WV))||null==m.split||null==(m=m.split(","))?void 0:m.filter((e=>!!e)))?g:[]),r=e=>{FV.setItem(WV,e.join(","))},o=t=>{const o=[...e,t];n(o),r(o)},i=t=>{const o=e.filter((e=>e!==t));n(o),r(o)};d=null!=(f=t.filter((t=>!e.includes(t.pos))).map((e=>e.key)))?f:[],u=(n,{node:r})=>{const a=t.find((e=>e.key===r.key)).pos;e.includes(a)?i(a):o(a)}}return(0,_.jsx)(Ze.eB,Object.assign({name:"outliner-tree"},(0,O.VS)(O.sI)?{ref:a}:{},{children:(!!r||!(0,O.VS)(O.sI))&&(0,_.jsx)(KV.A,Object.assign({draggable:"manual"===e.group,multiple:!0,defaultExpandAll:!0,defaultExpandParent:!h,autoExpandParent:!0,checkable:!1,prefixCls:c.toClassName(),className:c.toClassName(),treeData:t,selectedKeys:l,icon:UV,switcherIcon:ZV},(0,O.VS)(O.sI)?{virtual:!0,itemHeight:34,height:r}:{},s,h?{expandedKeys:d,onExpand:u}:{}),e.group)}))})),YV=({regions:e,rootClass:t,footer:n})=>{const r=(0,p.useCallback)(((e,n,r,o,i)=>{var a;const{id:s,type:l,hidden:c,isDrawing:d}=null!=e?e:{},u=null!=(a=null==e?void 0:e.background)?a:null==e||null==e.getOneColor?void 0:e.getOneColor(),h=pt()(null!=u?u:"#666").alpha(1),g={hidden:c,type:l,isDrawing:d},m=(0,_.jsx)(uD,{item:e});return null==e||null==e.setRegionIndex||e.setRegionIndex(n+1),{idx:n,key:s,type:l,label:m,hidden:c,entity:e,color:h.css(),style:{"--icon-color":h.css(),"--text-color":h.css(),"--selection-color":h.alpha(.1).css()},className:t.elem("node").mod(g).toClassName(),title:e=>(0,_.jsx)(QV,Object.assign({},e))}}),[]),o=e.getRegionsTree(r);return n&&o.push({key:"__footer__",disabled:!0,className:t.elem("node").mod({type:"footer"}).toClassName(),title:n}),o},XV=()=>{const e=(0,p.useCallback)(((e,t)=>{const n=t.nativeEvent.ctrlKey||(0,w.isMacOS)()&&t.nativeEvent.metaKey,{node:r}=t,o=null==r?void 0:r.item;if(null==o||!o.annotation)return;const i=o.annotation;if(n)return void i.toggleRegionSelection(o);if((0,O.VS)(O.v1)&&!o.isReadOnly()&&i.isLinkingMode)return i.addLinkedRegion(o),i.stopLinkingMode(),void i.regionStore.unselectAll();const a=!o.selected;a?(i.selectArea(o),null==o.onSelectInOutliner||o.onSelectInOutliner(a)):i.unselectAll()}),[]),t=(0,p.useRef)(),n=(0,p.useCallback)((({node:e})=>{var n,r;t.current&&(null==(r=t.current)||r.setHighlight(!1));null==(n=e.item)||n.setHighlight(!0),t.current=e.item}),[]),r=(0,p.useCallback)((({node:e})=>{var n,r;(null==e||null==(n=e.item)||n.setHighlight(!1),t.current!==(null==e?void 0:e.item))&&(null==(r=t.current)||r.setHighlight(!1));t.current=void 0}),[]),o=r,i=(0,p.useCallback)((e=>{if(!e)return 0;const t=e.item.annotation.regionStore.filterByParentID(e.pid).map((e=>i(e)));return t.length?1+Math.max(...t):0}),[]);return{onSelect:e,onMouseEnter:n,onMouseLeave:r,onDrop:(0,p.useCallback)((({node:e,dragNode:t,dropPosition:n,dropToGap:r})=>{if(e.classification)return!1;const o=e.props.eventKey,a=t.props.eventKey,s=e.props.pos.split("-"),l=e.item.annotation.regionStore;n-=Number.parseInt(s[s.length-1]);const c=s.length,d=l.findRegionID(a),u=l.findRegionID(o);if(l.unhighlightAll(),2===c&&r&&-1===n)d.setParentID("");else if(-1!==n){var h,g;const e=((null==(h=u.labeling)?void 0:h.selectedLabels)||[]).filter((e=>e.groupcancontain));if(e.length){const t=d.labeling.selectedLabels,n=(0,w.flatten)(e.map((e=>e.groupcancontain.split(",")))),r=(0,w.flatten)(t.map((e=>e.alias?[e.alias,e.value]:[e.value])));if(0===n.filter((e=>-1!==r.indexOf(e))).length)return}if(null!=(g=u.labeling)&&null!=(g=g.from_name)&&g.groupdepth){let e=Number(u.labeling.from_name.groupdepth);if(e>=0){e-=i(d);let t=u;for(;t;)t=l.findRegion(t.parentID),e-=1;if(e<0)return}}d.setParentID(u.id)}}),[]),onScroll:o}},qV=(0,y.PA)((({isLeaf:e})=>e?null:(0,_.jsx)(BV,{}))),JV=(0,y.PA)((({node:e})=>e?(0,_.jsx)(LO,{node:e}):null)),QV=(0,y.PA)((e=>{var t,n;let{item:r,label:o,isArea:i}=e,a=(0,Yn.A)(e,HV);const s=null==r?void 0:r.highlighted,[l,c]=(0,p.useState)(!1),d=(0,p.useMemo)((()=>{var e;return i&&null!=(e=r.perRegionDescControls)?e:[]}),[null==r?void 0:r.perRegionDescControls,i]),u=(0,p.useMemo)((()=>d.length>0),[d.length]),h=(0,p.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c(!l)}),[l]);return(0,_.jsxs)(Ze.eB,{name:"outliner-item",children:[(0,_.jsxs)(Ze.Sl,{name:"content",children:[!a.isGroup&&(0,_.jsx)(Ze.Sl,{name:"index",children:a.idx+1}),(0,_.jsxs)(Ze.Sl,{name:"title",children:[o,(null==r?void 0:r.text)&&(0,_.jsx)(Ze.Sl,{name:"text",children:r.text.replace(/\\n/g,"\n")}),(null==r?void 0:r.isDrawing)&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"incomplete",children:(0,_.jsx)(ir,{title:`Incomplete ${null!=(t=null==(n=r.type)?void 0:n.replace("region",""))?t:"region"}`,children:(0,_.jsx)(Nd,{})})})]}),(0,_.jsx)(ez,{hovered:s,item:r,entity:a.entity,regions:a.children,type:a.type,collapsed:l,hasControls:u&&i,toggleCollapsed:h})]}),u&&i&&(0,_.jsx)(Ze.Sl,{name:"ocr",children:(0,_.jsx)(tz,{item:r,controls:d,collapsed:l,setCollapsed:c,selected:a.selected})})]})})),ez=(0,y.PA)((({hovered:e,item:t,entity:n,collapsed:r,regions:o,hasControls:i,type:a,toggleCollapsed:s})=>{const{regions:l}=(0,p.useContext)($V),c=(0,p.useMemo)((()=>null!=a&&a.includes("region")||null!=a&&a.includes("range")?n.hidden:!(!(!a||a.includes("label")||null!=a&&a.includes("tool"))||!o)&&Object.values(o).every((({hidden:e})=>e))),[n,a,o]),d=(0,p.useCallback)((()=>{null!=a&&a.includes("region")||null!=a&&a.includes("range")?n.toggleHidden():!a||a.includes("label")?l.setHiddenByLabel(!c,n):null!=a&&a.includes("tool")&&l.setHiddenByTool(!c,n)}),[t,null==t?void 0:t.toggleHidden,c]),u=(0,p.useCallback)((e=>{s(e)}),[s]),h=(0,p.useCallback)((()=>{t.setLocked((e=>!e))}),[]);return(0,_.jsxs)(Ze.Sl,{name:"controls",mod:{withControls:i,newUI:(0,O.VS)(O.bA)},children:[(0,O.VS)(O.bA)?(0,_.jsx)(ir,{title:"Confidence Score",children:(0,_.jsxs)(Ze.Sl,{name:"control-wrapper",children:[(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"predict"},children:"prediction"===(null==t?void 0:t.origin)&&(0,_.jsx)(Ps,{style:{width:18,height:18}})}),(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"score"},children:(0,w.isDefined)(null==t?void 0:t.score)&&t.score.toFixed(2)})]})}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"score"},children:(0,w.isDefined)(null==t?void 0:t.score)&&t.score.toFixed(2)}),(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"dirty"}}),(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"predict"},children:"prediction"===(null==t?void 0:t.origin)&&(0,_.jsx)(Ps,{style:{width:18,height:18}})})]}),(0,_.jsxs)(Ze.Sl,{name:"wrapper",children:[(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"lock"},children:(0,_.jsx)(lV,{item:t,annotation:null==t?void 0:t.annotation,hovered:e,locked:null==t?void 0:t.locked,onClick:h})}),(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"visibility"},children:(0,O.VS)(O.bA)?(0,_.jsx)(sV,{onClick:d,style:c?void 0:{display:"none"},children:c?(0,_.jsx)(Ki,{}):(0,_.jsx)(Ai,{})}):(0,_.jsx)(sV,{onClick:d,children:c?(0,_.jsx)(Ki,{}):(0,_.jsx)(Ai,{})})}),i&&(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"visibility"},children:(0,_.jsx)(sV,{onClick:u,children:(0,_.jsx)(Dr,{style:{transform:`rotate(${r?-90:90}deg)`}})})})]})]})})),tz=(0,y.PA)((({item:e,collapsed:t,setCollapsed:n,selected:r})=>{const o=e.perRegionDescControls||[],i=(0,p.useCallback)((t=>{t.stopPropagation(),r||e.annotation.selectArea(e)}),[e,r,t]);return(0,_.jsx)(Ze.eB,{name:"ocr",mod:{collapsed:t,empty:!((null==o?void 0:o.length)>0)},onClick:i,onDragStart:e=>e.stopPropagation(),children:(0,_.jsx)(Ze.Sl,{name:"controls",children:o.map(((r,o)=>{const i=x.getPerRegionView(r.type,lt.REGION_LIST),a=e.getOneColor(),s=a?pt()(a).alpha(.2).css():void 0;return i?(0,_.jsx)(i,{item:r,area:e,collapsed:t,setCollapsed:n,color:s,outliner:!0},o):null}))})})})),nz=(0,y.PA)((({regions:e,footer:t})=>{const n=(0,Ze.cn)("tree"),r=YV({regions:e,rootClass:n,footer:t,grouping:e.group});return(0,_.jsx)($V.Provider,{value:{regions:e},children:(0,_.jsx)(GV,{regions:e,regionsTree:r})})})),rz=(0,p.createContext)({locked:!1}),oz=(e,t)=>{var n;const r=null!=(n=e.key)?n:e.label,o=t;return(0,_.jsx)(oA.Option,{value:r,style:{fontSize:12},title:r,children:e.label},`${o}`)},iz=({placeholder:e,defaultValue:t,items:n,style:r,dataTestid:o,value:i,onChange:a})=>(0,_.jsx)(oA,{placeholder:e,defaultValue:t,dataTestid:o,value:i,style:Object.assign({fontSize:12,width:"100%",backgroundColor:"#fafafa"},null!=r?r:{}),onChange:e=>a(e),size:"small",children:n.map(oz)}),az=[{key:"equal",label:"is",valueType:"single",input:(0,y.PA)((e=>(0,_.jsx)(iz,{onChange:t=>{e.onChange(!t)},items:[{label:"true",key:!0},{label:"false",key:!1}]})))}],sz=[{key:"empty",label:"is empty",input:(0,y.PA)((e=>(0,_.jsx)(iz,{onChange:t=>e.onChange(t),items:[{label:"yes"},{label:"no"}]})))}],lz=["label","className","required","labelProps","ghost","waiting"],cz=(0,p.forwardRef)(((e,t)=>{let{label:n,className:r,required:o,labelProps:i,ghost:a,waiting:s}=e,l=(0,Yn.A)(e,lz);const c=(0,Ze.cn)("input"),d=[c.mod({ghost:a}),r].join(" ").trim(),u=(0,p.useMemo)((()=>s?(0,_.jsx)("div",{className:c.elem("spinner")}):(0,_.jsx)("input",Object.assign({},l,{ref:t,className:d}))),[l,t,d,s]);return n?(0,_.jsx)(SC,Object.assign({},null!=i?i:{},{text:n,required:o,children:u})):u}));cz.displayName="Input";const dz=cz,uz=({value:e,type:t,onChange:n,placeholder:r,schema:o,style:i})=>{const a=p.useRef();return(0,_.jsx)(dz,Object.assign({size:"small",type:t,value:null!=e?e:"",ref:a,placeholder:r,"data-testid":"filter-input",onChange:()=>{var e,t,r;const o=null!=(e=null==(t=a.current)?void 0:t.value)?e:null==(r=a.current)||null==(r=r.input)?void 0:r.value;n(o)},style:i},null!=o?o:{}))},hz=(0,y.PA)((e=>(0,_.jsx)(uz,Object.assign({},e,{type:"number",value:e.value,pattern:"[0-9*]",onChange:e.onChange})))),gz=(0,y.PA)((e=>{var t,n,r,o;const i=null!=(t=null==(n=e.value)?void 0:n.min)?t:null,a=null!=(r=null==(o=e.value)?void 0:o.max)?r:null,s=t=>{console.log({newValue:t}),e.onChange(t)};return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(hz,{placeholder:"Min",value:i,onChange:e=>{s({min:Number(e),max:a})},schema:e.schema,style:{flex:1}}),(0,_.jsx)("span",{style:{padding:"0 10px"},children:"and"}),(0,_.jsx)(hz,{placeholder:"Max",value:a,onChange:e=>{s({min:i,max:Number(e)})},schema:e.schema,style:{flex:1}})]})})),mz=[{key:"equal",label:"=",valueType:"single",input:hz},{key:"not_equal",label:"≠",valueType:"single",input:hz},{key:"less",label:"<",valueType:"single",input:hz},{key:"greater",label:">",valueType:"single",input:hz},{key:"less_or_equal",label:"≤",valueType:"single",input:hz},{key:"greater_or_equal",label:"≥",valueType:"single",input:hz},{key:"in",label:"is between",valueType:"range",input:gz},{key:"not_in",label:"not between",valueType:"range",input:gz},...sz],pz=(0,y.PA)((e=>(0,_.jsx)(uz,Object.assign({},e,{type:"text",value:e.value,onChange:e.onChange,style:{fontSize:14},placeholder:e.placeholder})))),fz=[{key:"contains",label:"contains",valueType:"single",input:pz},{key:"not_contains",label:"not contains",valueType:"single",input:pz},{key:"regex",label:"regex",valueType:"single",input:pz},{key:"equal",label:"equal",valueType:"single",input:pz},{key:"not_equal",label:"not equal",valueType:"single",input:pz},...sz];let vz=function(e){return e.and="And",e.or="Or",e}({});const yz=Object.entries(vz).map((([e,t])=>({key:e,label:t}))),bz=({field:e,operation:t,value:n,logic:r,availableFilters:o,index:i,onChange:a,onDelete:s})=>{const[l,c]=(0,p.useState)(0),[u,h]=(0,p.useState)(-1),[g,m]=(0,p.useState)(null);return(0,p.useEffect)((()=>{a(i,{field:o[l].label,path:o[l].path})}),[l]),(0,p.useEffect)((()=>{const e=(null==d?void 0:d[o[l].type]).findIndex((e=>{var t;return(null!=(t=e.key)?t:e.label)===u}));if(!(0,w.isDefined)(e)||e<0)return;const t=null==d?void 0:d[o[l].type][e];a(i,{operation:null==t?void 0:t.key}),m(null==t?void 0:t.input)}),[u,l]),(0,_.jsxs)(Ze.eB,{name:"filter-row","data-testid":"filter-row",children:[(0,_.jsx)(Ze.Sl,{name:"column",children:0===i?(0,_.jsx)(Ze.Sl,{name:"title-row",children:"Where"}):(0,_.jsx)(iz,{value:r,items:yz,dataTestid:"logic-dropdown",style:{width:"60px"},onChange:e=>{a(i,{logic:e})}})}),(0,_.jsx)(Ze.Sl,{name:"column",children:(0,_.jsx)(iz,{value:e,items:o,dataTestid:"field-dropdown",style:{width:"140px"},onChange:e=>{c(o.findIndex((t=>{var n;return(null!=(n=t.key)?n:t.label)===e}))),a(i,{value:null})}})}),(0,_.jsx)(Ze.Sl,{name:"column",children:(0,_.jsx)(iz,{value:t,items:null==d?void 0:d[o[l].type],dataTestid:"operation-dropdown",style:{width:"110px"},onChange:e=>{h(e)}})}),(0,_.jsx)(Ze.Sl,{name:"column",children:g&&"empty"!==t&&(0,_.jsx)(Ze.Sl,{tag:g,value:n,onChange:e=>{a(i,{value:e})}})}),(0,_.jsx)(Ze.Sl,{name:"column",children:(0,_.jsx)(Ze.Sl,{onClick:()=>{s(i)},"data-testid":`delete-row-${i}`,name:"delete",children:(0,_.jsx)(sy,{})})})]})},xz=(e,t)=>{if((!t.value||""===t.value)&&"empty"!==t.operation)return e;switch(t.operation){case"contains":return Cz(e,t);case"not_contains":return Sz(e,t);case"in":return Az(e,t);case"not_in":return Tz(e,t);case"regex":return Pz(e,t);case"empty":return Iz(e,t);case"greater":return jz(e,t);case"less":return Oz(e,t);case"less_or_equal":return Rz(e,t);case"greater_or_equal":return kz(e,t);case"equal":return Ez(e,t);case"not_equal":return _z(e,t);default:return e}},wz=(e,t)=>{const n=[[...e]];for(let r=0;re.includes(t)?e:[...e,t]),[])},Cz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{const n=Lz(t.path,e);return null==n?void 0:n.toLowerCase().includes(t.value.toLowerCase())})):e,Sz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{const n=Lz(t.path,e);return!(null!=n&&n.toLowerCase().includes(t.value.toLowerCase()))})):e,jz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>Lz(t.path,e)>t.value)):e,kz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>Lz(t.path,e)>=t.value)):e,Oz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>Lz(t.path,e)(0,w.isDefined)(t.value)?e.filter((e=>Lz(t.path,e)<=t.value)):e,Ez=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{var n;const r=Lz(t.path,e);return(null==r?void 0:r.toString().toLowerCase())===(null==(n=t.value)?void 0:n.toString().toLowerCase())})):e,_z=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{var n;const r=Lz(t.path,e);return(null==r?void 0:r.toString().toLowerCase())!==(null==(n=t.value)?void 0:n.toLowerCase())})):e,Az=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{const n=Lz(t.path,e);return t.value.min<=n&&n<=t.value.max})):e,Tz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{const n=Lz(t.path,e);return n<=t.value.min||t.value.max<=n})):e,Pz=(e,t)=>{try{return e.filter((e=>{const n=Lz(t.path,e),r=new RegExp(t.value,"g");return n.match(r)}))}catch(t){return e}},Iz=(e,t)=>e.filter((e=>{const n=Lz(t.path,e);return""===n||!n||null==n||"blank"===n})),Lz=(e,t,n=".")=>(Array.isArray(e)?e:e.split(n)).reduce(((e,t)=>null==e?void 0:e[t]),t),Mz=({availableFilters:e,filterData:t,onChange:n,animated:r=!0})=>{const[o,i]=(0,p.useState)([]),[a,s]=(0,p.useState)(!1);(0,p.useEffect)((()=>{n(wz(t,o))}),[t]);const l=(0,p.useCallback)((()=>{i((t=>{var n,r;return[...t,{field:null!=(n=null==(r=e[0])?void 0:r.label)?n:"",logic:"and",operation:"",value:"",path:""}]}))}),[i,e]),c=(0,p.useCallback)(((e,{field:r,operation:o,value:a,path:s,logic:l})=>{i((i=>{const c=[...i];return c[e]=Object.assign({},c[e],{field:null!=r?r:c[e].field,operation:null!=o?o:c[e].operation,logic:null!=l?l:c[e].logic,value:null!=a?a:c[e].value,path:null!=s?s:c[e].path}),n(wz(t,c)),c}))}),[i,t]),d=(0,p.useCallback)((e=>{i((r=>{const o=[...r];return o.splice(e,1),o[0]&&(o[0].logic="and"),n(wz(t,o)),o}))}),[i,t]),u=(0,p.useMemo)((()=>o.map((({field:t,operation:n,logic:r,value:o},i)=>(0,_.jsx)(Ze.eB,{name:"filter-item",children:(0,_.jsx)(bz,{index:i,availableFilters:e,field:t,logic:r,operation:n,value:o,onDelete:d,onChange:c})},i)))),[o,e,d,c]),h=(0,p.useMemo)((()=>(0,_.jsxs)(Ze.eB,{name:"filter",children:[o.length>0?u:(0,_.jsx)(Ze.Sl,{name:"empty",children:"No filters applied"}),(0,_.jsxs)(za,{look:"alt",size:"small",type:"text",onClick:l,children:["Add ",o.length?"Another Filter":"Filter"]})]})),[o,u,l]),g=(0,p.useCallback)((e=>{s(e)}),[]);return(0,_.jsx)(Q_.Trigger,{content:h,dataTestId:"dropdown",animated:r,onToggle:g,children:(0,_.jsxs)(Ze.eB,{"data-testid":"filter-button",name:"filter-button",mod:{active:a},children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(ty,{})}),(0,_.jsx)(Ze.Sl,{name:"text",style:{fontSize:(0,O.VS)(O.bA)&&12,fontWeight:(0,O.VS)(O.bA)&&500,lineHeight:(0,O.VS)(O.bA)&&"24px"},children:"Filter"}),o.length>0&&(0,_.jsx)(Ze.Sl,{name:"filter-length","data-testid":"filter-length",children:o.length})]})})},{Block:Kz,Elem:Dz}=(0,Ze.JE)(),Nz=(0,y.PA)((({ordering:e,regions:t,orderingDirection:n,onOrderingChange:r,onGroupingChange:o,onFilterChange:i})=>{const a=t.group,s=(0,p.useContext)(rz),l=(0,p.useCallback)((e=>{switch(e){case"manual":return{label:"Group Manually",selectedLabel:(0,O.VS)(O.bA)?"Manual":"Manual Grouping",icon:(0,_.jsx)(lv,{}),tooltip:"Manually Grouped"};case"label":return{label:"Group by Label",selectedLabel:(0,O.VS)(O.bA)?(0,O.VS)(O.CZ)?"By Label":"Label":"Grouped by Label",icon:(0,_.jsx)(wv,{}),tooltip:"Grouped by Label"};case"type":return{label:"Group by Tool",selectedLabel:(0,O.VS)(O.bA)?(0,O.VS)(O.CZ)?"By Tool":"Tool":"Grouped by Tool",icon:(0,_.jsx)(ev,{}),tooltip:"Grouped by Tool"}}}),[]),c=(0,p.useCallback)((e=>{switch(e){case"date":return{label:"Order by Time",selectedLabel:"By Time",icon:(0,_.jsx)(Kf,{})};case"score":return{label:"Order by Score",selectedLabel:"By Score",icon:(0,_.jsx)(mv,{})}}}),[]),d="asc"===n?(0,_.jsx)(Lv,{style:{color:"#898098"}}):(0,_.jsx)(Zv,{style:{color:"#898098"}});return(0,_.jsxs)(Kz,{name:"view-controls",mod:{collapsed:s.locked,FF_LSDV_4992:(0,O.VS)(O.CZ)},children:[(0,_.jsx)(Vz,{value:a,options:["manual","type","label"],onChange:e=>o(e),readableValueForKey:l}),"manual"===a&&(0,_.jsx)(Dz,{name:"sort",children:(0,_.jsx)(Vz,{value:e,direction:n,options:["score","date"],onChange:e=>r(e),readableValueForKey:c,allowClickSelected:!0,extraIcon:d})}),(0,O.VS)(O.oh)&&(0,_.jsx)(Mz,{onChange:i,filterData:null==t?void 0:t.regions,availableFilters:[{label:"Annotation results",path:"labelName",type:"String"},{label:"Confidence score",path:"score",type:"Number"}]}),(0,O.VS)(O.CZ)?(0,_.jsx)(Hz,{regions:t}):null]})})),Vz=({value:e,options:t,direction:n,allowClickSelected:r,onChange:o,readableValueForKey:i,extraIcon:a})=>{const s=(0,p.useMemo)((()=>i(e)),[e]),l=(0,p.useMemo)((()=>t.map((e=>[e,i(e)]))),[]),c=(0,p.useMemo)((()=>(0,_.jsx)(wT,{size:"medium",style:{width:200,minWidth:200,borderRadius:(0,O.VS)(O.bA)&&4},selectedKeys:[e],allowClickSelected:r,children:l.map((([t,r])=>(0,_.jsx)(zz,{name:t,value:e,direction:n,label:r,onChange:e=>o(e)},t)))})),[e,l,s,n,o]),d=(0,O.VS)(O.bA)?{mod:{newUI:!0}}:void 0,u=(0,O.VS)(O.CZ)?{}:{padding:"0",whiteSpace:"nowrap"};return(0,O.VS)(O.bA)&&(u.padding="0 12px 0 2px"),(0,_.jsx)(Q_.Trigger,{content:c,style:{width:200},children:(0,_.jsx)(za,Object.assign({type:"text","data-testid":`grouping-${e}`},d,{icon:s.icon,style:u,extra:(0,O.VS)(O.bA)?a:(0,_.jsx)(Bz,{direction:n,name:e,value:e,wrap:!1}),tooltip:(0,O.VS)(O.CZ)&&s.tooltip||void 0,tooltipTheme:"dark",children:s.selectedLabel}))})},zz=({value:e,name:t,label:n,direction:r,onChange:o})=>(0,_.jsx)(wT.Item,{name:t,onClick:()=>o(t),children:(0,_.jsxs)(Dz,{name:"label",children:[n.label,(0,_.jsx)(Bz,{direction:r,name:t,value:e})]})}),Bz=({direction:e,value:t,name:n,wrap:r=!0})=>{const o="asc"===e?(0,_.jsx)(Ev,{}):(0,_.jsx)(Bv,{});return!e||t!==n||(0,O.VS)(O.bA)?null:r?(0,_.jsx)("span",{children:o}):o},Hz=(0,y.PA)((({regions:e})=>{var t;const n=(0,p.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleVisibility()}),[e]),r=!(null!=e&&null!=(t=e.regions)&&t.length),o=!r&&e.isAllHidden;return(0,_.jsx)(Dz,{tag:za,type:"text",disabled:r,onClick:n,mod:{hidden:o},"aria-label":o?"Show all regions":"Hide all regions",icon:o?(0,_.jsx)(Qw,{}):(0,_.jsx)(Hw,{}),tooltip:o?"Show all regions":"Hide all regions",tooltipTheme:"dark"})})),Fz=["regions"],Wz=[];(0,O.VS)(O.CZ)&&Wz.push("ff_hide_all_regions"),(0,O.VS)(O.sI)&&Wz.push("ff_outliner_optim");const $z=(0,y.PA)((({regions:e})=>{var t,n,r,o,i;const a=(null==e||null==(t=e.regions)?void 0:t.length)>0&&0===(null==e||null==(n=e.filter)?void 0:n.length),s=(0,p.useMemo)((()=>{var t,n,r,o;return null!=e&&null!=(t=e.regions)&&t.length&&null!=(n=e.filter)&&n.length?(null==e||null==(r=e.regions)?void 0:r.length)-(null==e||null==(o=e.filter)?void 0:o.length):0}),[null==e||null==(r=e.regions)?void 0:r.length,null==e||null==(o=e.filter)?void 0:o.length]);return(0,_.jsx)(_.Fragment,{children:a?(0,_.jsxs)(Ze.eB,{name:"filters-info",children:[(0,_.jsx)(Kw,{width:21,height:20}),(0,_.jsx)(Ze.Sl,{name:"filters-title",children:"All regions hidden"}),(0,_.jsx)(Ze.Sl,{name:"filters-description",children:"Adjust or remove the filters to view"})]}):(null==e||null==(i=e.regions)?void 0:i.length)>0?(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(nz,{regions:e,footer:s>0&&(0,_.jsxs)(Ze.eB,{name:"filters-info",children:[(0,_.jsx)(Kw,{width:21,height:20}),(0,_.jsxs)(Ze.Sl,{name:"filters-title",children:["There ",1===s?"is":"are"," ",s," hidden region",s>1&&"s"]}),(0,_.jsx)(Ze.Sl,{name:"filters-description",children:"Adjust or remove filters to view"})]})})}):(0,_.jsx)(Ze.Sl,{name:"empty",children:"Regions not added"})})})),Uz=(0,y.PA)((({regions:e})=>{const t=(0,p.useCallback)((t=>{e.setSort(t)}),[e]),n=(0,p.useCallback)((t=>{e.setGrouping(t)}),[e]),r=(0,p.useCallback)((t=>{e.setFilteredRegions(t)}),[e]);return(0,_.jsxs)(Ze.eB,{name:"outliner",mix:Wz,children:[(0,_.jsx)(Nz,{ordering:e.sort,regions:e,orderingDirection:e.sortOrder,onOrderingChange:t,onGroupingChange:n,onFilterChange:r}),(0,_.jsx)($z,{regions:e})]})})),Zz=(0,y.PA)((e=>{let{regions:t}=e,n=(0,Yn.A)(e,Fz);const[r,o]=(0,p.useState)(),i=(0,p.useCallback)((e=>{t.setSort(e)}),[t]),a=(0,p.useCallback)((e=>{t.setGrouping(e),o(e)}),[t]),s=(0,p.useCallback)((e=>{t.setFilteredRegions(e)}),[t]);return(0,p.useEffect)((()=>{o(t.group)}),[]),t.setGrouping(r),(0,_.jsxs)($N,Object.assign({},n,{name:"outliner",mix:Wz,title:"Outliner",children:[(0,_.jsx)(Nz,{ordering:t.sort,regions:t,orderingDirection:t.sortOrder,onOrderingChange:i,onGroupingChange:a,onFilterChange:s}),(0,_.jsx)($z,{regions:t})]}))})),Gz=e=>{const[t,n]=(0,p.useState)(window.matchMedia(e));return(0,p.useEffect)((()=>{const t=()=>{n(window.matchMedia(e))};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[]),(0,p.useEffect)((()=>{n(window.matchMedia(e))}),[e]),t},Yz=980,Xz=(e,t)=>{const n=window.localStorage.getItem(`panel:${e}`);return n?Object.assign({},t,JSON.parse(n)):t},qz=(e,t)=>{window.localStorage.setItem(`panel:${e}`,JSON.stringify(t))},Jz={outliner:{title:"Outliner",component:Zz,icon:_f},details:{title:"Details",component:LV,icon:Kf}},Qz=(0,y.PA)((({currentEntity:e,panelsHidden:t,children:n})=>{const r=e.regionStore,o=(0,p.useRef)({width:0,height:0}),i=Gz("screen and (max-width: 980px)"),[a,s]=(0,p.useState)(500),[l,c]=(0,p.useState)(!1),[d,u]=(0,p.useState)(!1),[h,g]=(0,p.useState)(!1),[m,f]=(0,p.useState)(!1),v=(0,p.useRef)(),[y,b]=(0,p.useState)(),x=(0,p.useRef)(y),[C,S]=(0,p.useState)({outliner:Xz("outliner",{top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:zN,height:BN,visible:!0,detached:!1,alignment:"left",maxHeight:HN}),details:Xz("details",{top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:zN,height:BN,visible:!0,detached:!1,alignment:"right",maxHeight:HN})});XM(e);const j=(0,p.useMemo)((()=>l||i.matches),[l,i.matches]),k=(0,p.useCallback)(((e,t)=>{S((n=>{const r=Object.assign({},n[e],t);return qz(e,r),Object.assign({},n,{[e]:r})}))}),[C]),R=(0,p.useCallback)(((e,t)=>{const n=C[e],r=T(e,n.top,n.left,t);k(e,{visible:t,storedTop:r.top/o.current.height*100,storedLeft:r.left/o.current.width*100})}),[k]),E=(0,p.useCallback)((e=>(0,O.VS)(O.bA)||void 0===Object.values(C).find((t=>t.alignment===e&&!t.detached))),[C]),A=(0,p.useCallback)(((e,t,n)=>{const r=e+n,o=t-5;e>=0&&e<=5&&E("left")?b("left"):r<=t&&r>=o&&E("right")?b("right"):b(void 0)}),[E]),T=(e,t,n,r)=>{var o,i,a,s;const l=C[e],c=null!=(o=null==(i=v.current)?void 0:i.clientWidth)?o:0,d=l.detached?(null!=r?r:l.visible)?l.height:26:l.height;return{left:(0,w.clamp)(n,0,c-l.width),top:(0,w.clamp)(t,0,(null!=(a=null==(s=v.current)?void 0:s.clientHeight)?a:0)-d)}},P=(0,p.useCallback)((e=>{const t=Object.entries(C).reduce(((e,[t,n])=>{const r=Object.assign({},n,{zIndex:1});return g(!0),qz(t,r),Object.assign({},e,{[t]:r})}),Object.assign({},C));t[e]=Object.assign({},t[e],{zIndex:15}),qz(e,t[e]),S(t)}),[C]),I=(0,p.useCallback)(((e,t,n,r)=>{var i,a;const s=C[e],l=null!=(i=null==(a=v.current)?void 0:a.clientWidth)?i:0,{left:c,top:d}=T(e,t,n,s.visible),u=o.current.height-d;A(c,l,s.width),requestAnimationFrame((()=>{k(e,{top:d,left:c,relativeTop:d/o.current.height*100,relativeLeft:c/o.current.width*100,storedLeft:void 0,storedTop:void 0,detached:r,maxHeight:u,alignment:r?void 0:s.alignment})}))}),[k,A,C]),L=(0,p.useCallback)((()=>{u((()=>!0))}),[]),M=(0,p.useCallback)((()=>{u((()=>!1))}),[]),K=(0,p.useCallback)((e=>Object.keys(C).filter((t=>{var n;return(null==(n=C[t])?void 0:n.alignment)===e}))),[C]),D=(0,p.useCallback)(((e,t,n,r,i)=>{const{left:s,top:l}=T(e,r,i),c=o.current.height-l;requestAnimationFrame((()=>{if((0,O.VS)(O.bA)){var r;K(null==(r=C[e])?void 0:r.alignment).forEach((e=>{k(e,{top:l,left:s,relativeTop:l/o.current.height*100,relativeLeft:s/o.current.width*100,storedLeft:void 0,storedTop:void 0,maxHeight:c,width:(0,w.clamp)(t,zN,a),height:(0,w.clamp)(n,BN,c)})}))}else k(e,{top:l,left:s,relativeTop:l/o.current.height*100,relativeLeft:s/o.current.width*100,storedLeft:void 0,storedTop:void 0,maxHeight:c,width:(0,w.clamp)(t,zN,a),height:(0,w.clamp)(n,BN,c)})}))}),[k,a,C]),N=(0,p.useCallback)((e=>{if(g(!1),!x.current)return;const t={alignment:x.current,detached:!1};if((0,O.VS)(O.bA)){var n;const o=null==(n=K(x.current).filter((t=>t!==e)))?void 0:n[0];var r;if(o)t.width=(0,w.clamp)(null==(r=C[o])?void 0:r.width,zN,a)}k(e,t),b(void 0)}),[k]),V=(0,p.useMemo)((()=>({onResize:D,onResizeStart:L,onResizeEnd:M,onPositionChange:I,onVisibilityChange:R,onPositionChangeBegin:P,onSnap:N})),[D,L,M,I,R,N]),z=(0,p.useMemo)((()=>Object.assign({},V,{root:v,regions:r,selection:r.selection,currentEntity:e})),[V,v,r,r.selectio,e]),B=(0,p.useMemo)((()=>{if(t&&(0,O.VS)(O.bA))return{};const e={paddingLeft:0,paddingRight:0};return j?e:Object.values(C).reduce(((e,n)=>{const r=(0,O.VS)(O.bA)||!t&&!n.detached&&n.visible?n.width:FN,o="left"===n.alignment?"paddingLeft":"paddingRight";return n.detached?e:Object.assign({},e,{[o]:r})}),e)}),[t,C,j]),H=(0,p.useMemo)((()=>{if(t)return{};const e={detached:[],left:[],right:[]},n=Object.entries(C);for(const[t,i]of n){var r,o;const{alignment:n,detached:s}=i,l=Jz[t],c=l.component,d=l.icon,u={props:Object.assign({},i,z,{top:null!=(r=i.storedTop)?r:i.top,left:null!=(o=i.storedLeft)?o:i.left,tooltip:l.title,icon:(0,_.jsx)(d,{}),positioning:h,maxWidth:a,zIndex:i.zIndex,expanded:j,alignment:j?"left":i.alignment,locked:j}),Component:c};s?e.detached.push(u):"left"===n?e.left.push(u):"right"===n&&e.right.push(u)}return e}),[C,z,t,j,h,a]);(0,p.useEffect)((()=>{x.current=y}),[y]),(0,p.useEffect)((()=>{const e=v.current;if(!e)return;const t=()=>{var e,t;return(null!=(e=null==(t=v.current)?void 0:t.clientWidth)?e:0){requestAnimationFrame((()=>{if(!v.current)return;const{clientWidth:e,clientHeight:n}=v.current;e<=Yz||(o.current.width=null!=e?e:0,o.current.height=null!=n?n:0,c(t()),s(.4*v.current.clientWidth))}))}));return e&&(n.observe(e),c(t()),s(.4*e.clientWidth),f(!0)),()=>{e&&n.unobserve(e),n.disconnect()}}),[]);const F=(0,p.useMemo)((()=>({locked:j})),[j]);return(0,_.jsx)(rz.Provider,{value:F,children:(0,_.jsx)(Ze.eB,{ref:e=>{e&&(v.current=e,c(e.clientWidth<=Yz))},name:"sidepanels",style:Object.assign({},B),mod:{collapsed:j,newLabelingUI:(0,O.VS)(O.bA)},children:m&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"content",mod:{resizing:d||h},children:n}),!0!==t&&(0,_.jsx)(_.Fragment,{children:Object.entries(H).map((([e,t])=>{const n=t.map((({props:e,Component:t},n)=>(0,_.jsx)(t,Object.assign({},e),n)));return"detached"===e?(0,_.jsx)(p.Fragment,{children:n},e):(0,_.jsx)(Ze.Sl,{name:"wrapper",mod:{align:e,snap:y===e},children:n},e)}))})]})})})}));let eB=function(e){return e.left="left",e.right="right",e}({}),tB=function(e){return e.left="left",e.right="right",e.topRight="right-top",e.topLeft="left-top",e.bottomRight="right-bottom",e.bottomLeft="left-bottom",e}({}),nB=function(e){return e.top="top",e.bottom="bottom",e}({});const rB={order:0,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:zN,height:BN,visible:!0,detached:!0,alignment:eB.left,maxHeight:HN,panelViews:[]},oB=(e,t)=>{const n=t||e.target,r=n.clientWidth;return e.pageX-n.getBoundingClientRect().left>r/2?eB.right:eB.left},iB=(e,t,n)=>{const r=Object.assign({},e);return r[t]?Object.assign({},r,{[t]:Object.assign({},r[t],{panelViews:r[t].panelViews.filter(((e,t)=>t!==n))})}):r},aB=(e,t,n)=>{const r=Object.assign({},e,{[t]:Object.assign({},e[t],{panelViews:e[t].panelViews.map(((e,t)=>(e.active=t===n,e)))})});return r},sB=e=>{const t=Object.assign({},e);return Object.values(t).forEach((e=>{const t=!e.panelViews.find((e=>e.active));t&&(e.panelViews[0].active=!0)})),t},lB=e=>{const t={};return Object.keys(e).forEach((n=>{const r=`${e[n].panelViews.map((e=>e.name)).join("-")}`,o=Object.assign({},e[n]);Object.assign(t,{[r]:o})})),t},cB=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{0===t[e].panelViews.length&&delete t[e]})),t},dB={regions:Uz,history:TV,relations:PV,comments:AV,info:IV},uB=[{name:"regions",title:"Regions",component:dB.regions,active:!0},{name:"history",title:"History",component:dB.history,active:!1},{name:"relations",title:"Relations",component:dB.relations,active:!1},{name:"info",title:"Info",component:dB.info,active:!0},{name:"comments",title:"Comments",component:dB.comments,active:!1}],hB={"info-comments-history":{order:1,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:zN,height:BN,visible:!0,detached:!1,alignment:eB.right,maxHeight:HN,panelViews:[uB[3],uB[4],uB[1]]},"regions-relations":{order:2,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:zN,height:BN,visible:!0,detached:!1,alignment:eB.right,maxHeight:HN,panelViews:[uB[0],uB[2]]}},gB={"info-history":{order:1,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:zN,height:BN,visible:!0,detached:!1,alignment:eB.right,maxHeight:HN,panelViews:[uB[3],uB[1]]},"regions-relations":{order:2,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:zN,height:BN,visible:!0,detached:!1,alignment:eB.right,maxHeight:HN,panelViews:[uB[0],uB[2]]}},mB=Object.assign({},rB,{name:"breakpointCollapsed",positioning:!1,height:BN,maxHeight:BN,detached:!1,maxWidth:500,zIndex:10,expanded:!0,locked:!0,alignment:eB.left,lockPanelContents:!1,attachedKeys:[],sidePanelCollapsed:{[eB.left]:!1,[eB.right]:!1},setSidePanelCollapsed:()=>{},dragTop:!1,dragBottom:!1,panelViews:[uB[0],uB[1],uB[2],uB[3],uB[4]]}),pB=["top-left","top-right","bottom-left","bottom-right","top","bottom","right","left"],fB=e=>{var t;const n=window.localStorage.getItem("panelState"),r=n&&JSON.parse(n),o=r&&r.panelData,i={[eB.left]:!1,[eB.right]:!1},a=null!=(t=null==r?void 0:r.collapsedSide)?t:i,s=o&&Object.values(o).flatMap((e=>e.panelViews)),l=uB.length-(e?0:1);if(!s||s.length!==l){return{panelData:e?hB:gB,collapsedSide:i}}const c=cB(o),d=sB(c),u=((e,t)=>{const n=Object.assign({},e);return Object.keys(n).filter((e=>n[e])).forEach((e=>{const r=Object.keys(t).some((n=>t[n].alignment===e&&!t[n].detached));r||(n[e]=!1)})),n})(a,d);return{panelData:vB(d),collapsedSide:u}},vB=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{t[e].panelViews.forEach((e=>{e.component=dB[e.name]}))})),t},yB=e=>Object.keys(e).filter((t=>!e[t].detached&&e[t].alignment===eB.left)),bB=e=>Object.keys(e).filter((t=>!e[t].detached&&e[t].alignment===eB.right)),xB=(e,t)=>t===eB.left?yB(e).sort(((t,n)=>e[t].order-e[n].order)):t===eB.right?bB(e).sort(((t,n)=>e[t].order-e[n].order)):void 0,wB=(e,t)=>{const n=Object.assign({},e);return[yB(n),bB(n)].forEach((r=>{const o=r.filter((t=>!e[t].visible)).length,i=r.filter((t=>e[t].visible)),a=FN*o,s=i.reduce(((e,t)=>e+n[t].height),0),l=t-a-s,c=l<0,d=Math.abs(l)/(i.length||1);let u=0;i.forEach((e=>{const t=c?n[e].height-d:n[e].height+d;n[e].visible?(n[e].height=t,n[e].top=u,u+=t):u+=FN}))})),n},CB=(e,t,n)=>{const r=Object.assign({},e),o=xB(r,n);if(null==o||!o.length)return e;const i=o.filter((e=>r[e].visible)),a=o.filter((e=>!r[e].visible)).length,s=(t-FN*a)/i.length||1;return i.forEach((e=>{let t=0;r[e].visible?(r[e].height=s,r[e].top=t,t+=s):t+=FN})),r},SB=(e,t,n,r,o,i=nB.bottom)=>{const a=Object.assign({},e),s=xB(a,n),l=s?s.reduce(((t,n)=>t{const o=Object.assign({},e);o[t].order=r===nB.top?0:n.length;let i=r===nB.bottom?0:1;return n.forEach((e=>{t!==e&&(o[e].order=i,i+=1)})),o})(c,t,xB(c,n),i),u=kB(d,t);return CB(u,o,n)},jB=(e,t,n,r,o,i,a)=>{const s=((e,t,n,r,o,i,a)=>Object.assign({},rB,{name:t,panelViews:[Object.assign({},e[n].panelViews[r],{active:!0})],top:i,left:o,relativeTop:i/a.current.height*100,relativeLeft:o/a.current.width*100,visible:!0,detached:!0,zIndex:12}))(e,t,n,r,o,i,a),l=iB(e,n,r),c=cB(l),d=Object.assign({},c,{[`${s.name}`]:s}),u=lB(d),h=sB(u),g=kB(h,s.name);return wB(g,a.current.height)},kB=(e,t)=>{const n=Object.assign({},e),[r,o]=(e=>Object.keys(e).reduce(((t,n)=>(e[n].detached?t[0].push({zIndex:e[n].zIndex,panelKey:n}):t[1].push({zIndex:e[n].zIndex,panelKey:n}),t)),[[],[]]))(n);let i=12;return o.forEach((e=>n[e.panelKey].zIndex=10)),r.sort(((e,t)=>e.zIndex-t.zIndex)).forEach((e=>{n[e.panelKey].zIndex=i,i++})),n[t].detached&&(n[t].zIndex=r.length+12),n},OB=({name:e,root:t,width:n,maxWidth:r,height:o,visible:i,detached:a,alignment:s,top:l,left:c,relativeTop:d,relativeLeft:u,zIndex:h,locked:g=!1,positioning:m=!1,onSnap:f,onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:x,onVisibilityChange:C,onPositionChange:S,onPositionChangeBegin:j,children:k,panelViews:O,attachedKeys:R,sidePanelCollapsed:E,setSidePanelCollapsed:A,dragTop:T,dragBottom:P,lockPanelContents:I})=>{const L=(0,p.useRef)(),M=(0,p.useRef)(),K=(0,p.useRef)(),D=(0,p.useRef)(),N=(0,p.useRef)({onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:x,onPositionChange:S,onPositionChangeBegin:j,onVisibilityChange:C,onSnap:f}),[V,z]=(0,p.useState)(),B=(0,p.useRef)(e),H=E[s]&&!a,F=R&&R[0]===e,W=R&&R.includes(e)&&R[0]!==e,$=!(H&&!F),U=i&&!H?"Collapse":"Expand";N.current={onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:x,onPositionChange:S,onPositionChangeBegin:j,onVisibilityChange:C,onSnap:f},B.current=e;const Z=(0,p.useMemo)((()=>{const e=i?{height:g?BN:H?"100%":null!=o?o:"100%",width:g?"100%":H?FN:null!=n?n:"100%"}:{width:H?"100%":null!=n?n:zN,height:H?"100%":FN};return Object.assign({},e,{zIndex:h})}),[n,o,i,g,H,h]),G=(0,p.useMemo)((()=>a&&!g?{top:`${d}%`,left:`${u}%`}:{}),[a,d,u,g]),Y=(0,p.useMemo)((()=>({detached:!g&&a,hidden:!i,alignment:a?"left":null!=s?s:"left",disabled:g,collapsed:H,dragTop:T&&R&&R[0]===e,dragBottom:P&&R&&R[R.length-1]===e})),[s,i,a,V,g,H,T,P]);VN({elementRef:L,disabled:g,onMouseDown(e){var n;const r=e.target,o="[class*=__toggle]";if(r.matches(o)||r.closest(o)||H)return;const i=M.current,l=t.current.getBoundingClientRect(),c=i.getBoundingClientRect(),d=null==(n=e.target)?void 0:n.getBoundingClientRect(),u=e.clientX-d.left,h=e.clientY-d.top,[g,m]=[e.pageX,e.pageY],[p,f]=[c.left-l.left,c.top-l.top],{current:v}=B,[y,b]=[g-u,m-h];return null==N.current.onPositionChangeBegin||N.current.onPositionChangeBegin(v,y,b,s,a),{x:g,y:m,oX:p,oY:f,allowDrag:!0,alignment:s,key:v}},onMouseMove(e,t){if(!t)return;const{x:n,y:r,oX:o,oY:i,key:a}=t,[l,c]=[e.pageX,e.pageY];var d,u,h,g;if((d=n,u=l,h=r,g=c,Math.sqrt((u-d)**2+(g-h)**2))<30)return;const[m,p]=[o+(l-n),i+(c-r)];null==N.current.onPositionChange||N.current.onPositionChange(a,p,m,!0,s)},onMouseUp(e,t){if(!t)return;const{key:n}=t;null==N.current.onSnap||N.current.onSnap(n)}},[a,i,g,s,e,H,L.current]),VN({elementRef:K,disabled:g||m,capture:!0,passive:!0,onMouseDown(e){const t=e.target.dataset.resize,i=(()=>{switch(t){case"top-left":return"top-left";case"top":case"top-right":return"top";case"left":case"bottom-left":return"left"}})(),a={x:null!==(null==t?void 0:t.match(/left|right/i)),y:null!==(null==t?void 0:t.match(/top|bottom/i))};return z(t),null==N.current.onResizeStart||N.current.onResizeStart(),{pos:[e.pageX,e.pageY],type:t,width:n,maxWidth:r,height:o,top:l,left:c,resizeDirections:a,shift:i}},onMouseMove(e,t){if(t){const{pos:n,width:r,height:o,maxWidth:i,top:a,left:s,resizeDirections:l,shift:c}=t,[d,u]=n,h=l.x?e.pageX-d:0,g=l.y?e.pageY-u:0,m=(0,w.isDefined)(c)&&["left","top-left"].includes(c),p=(0,w.isDefined)(c)&&["top","top-left"].includes(c),f=(0,w.clamp)(m?r-h:r+h,zN,i),v=(0,w.clamp)(p?o-g:o+g,55,a+o),y=p?a+(o-v):a,b=m?s+(r-f):s,{current:x}=B;N.current.onResize(x,f,v,y,b)}},onMouseUp(){null==N.current.onResizeEnd||N.current.onResizeEnd(),z(void 0)}},[N,a,n,r,o,l,c,i,g,m]),VN({elementRef:D,disabled:g||m,capture:!0,passive:!0,onMouseDown:e=>(z("grouped-top"),null==N.current.onResizeStart||N.current.onResizeStart(),{sY:e.pageY,h:o}),onMouseMove(e,t){if(!t)return;const{sY:n,h:r}=t,o=e.pageY-n,i=r-o,{current:a}=B;null==N.current.onGroupHeightResize||N.current.onGroupHeightResize(a,i,o)},onMouseUp(){null==N.current.onResizeEnd||N.current.onResizeEnd(),z(void 0)}},[N,n,o,l,c,g,m,D.current]);const X=()=>{A(Object.assign({},E,{[s]:!E[s]}))},q=(0,p.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),null==C||C(e,!i)}),[C,e,i]);return(0,_.jsxs)(Ze.eB,{ref:M,name:"tabs-panel",mod:Y,style:Object.assign({},Z,G),children:[(0,_.jsxs)(Ze.Sl,{name:"content",children:[!g&&$&&(0,_.jsxs)(_.Fragment,{children:[W&&i&&(0,_.jsx)(Ze.Sl,{name:"grouped-top",ref:D,mod:{drag:"grouped-top"===V},"data-resize":"grouped-top"}),(0,_.jsxs)(Ze.Sl,{ref:L,onClick:()=>{H&&X()},id:e,mod:{collapsed:H},name:"header",children:[(0,_.jsxs)(Ze.Sl,{name:"header-left",children:[!H&&(0,_.jsx)(Ze.Sl,{name:"icon",style:{pointerEvents:"none"},tag:Aw,width:8}),!i&&!H&&(0,_.jsx)(Ze.Sl,{name:"title",children:O.map((e=>e.title)).join(" ")})]}),(0,_.jsxs)(Ze.Sl,{name:"header-right",children:[(!a||H)&&(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{detached:a,collapsed:H,alignment:s},onClick:X,"data-tooltip":`${U} Group`,children:eB.left===s?(0,_.jsx)(ky,{}):(0,_.jsx)(Dy,{})}),!H&&(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{detached:a,collapsed:H,alignment:s},onClick:q,"data-tooltip":U,children:i?(0,_.jsx)(Lc,{}):(0,_.jsx)(wc,{})})]})]})]}),i&&!H&&(0,_.jsxs)(Ze.Sl,{name:"body",children:[I&&(0,_.jsx)(Ze.Sl,{name:"shield"}),k]})]}),i&&!m&&!g&&(0,_.jsx)(Ze.Sl,{name:"resizers",ref:K,mod:{locked:m||g},children:pB.map((e=>!H&&(("left"===e||"right"===e)&&s!==e||a)?(0,_.jsx)(Ze.Sl,{name:"resizer",mod:{drag:e===V},"data-resize":e},e):null))})]})},RB=[];var EB=function(e){return e.tabLeft="lsf-drag_over_tab_left",e.tabRight="lsf-drag_over_tab_right",e.emptyTabSpace="lsf-drag_over_empty_tab_space",e}(EB||{});const _B=()=>{RB.forEach((e=>{null==e||e.classList.remove(EB.tabLeft),null==e||e.classList.remove(EB.tabRight),null==e||e.classList.remove(EB.emptyTabSpace)}))},AB=({name:e,rootRef:t,tabTitle:n,tabIndex:r,panelKey:o,viewLength:i,children:a,active:s,panelWidth:l,locked:c,breakPointActiveTab:d,setBreakPointActiveTab:u,transferTab:h,createNewPanel:g,setActiveTab:m,checkSnap:f})=>{const v=(0,p.useRef)(),y=(0,p.useRef)(),b=(0,p.useRef)(!1),x=(0,p.useRef)({panelKey:o,tabIndex:r}),[w,C]=(0,p.useState)(!1);x.current={panelKey:o,tabIndex:r},VN({elementRef:v,onMouseDown(e){var n;if(c)return void(u&&u(x.current.tabIndex));if(2===e.buttons)return;const{panelKey:r,tabIndex:o}=Object.assign({},x.current);m(r,o),null==(n=t.current)||n.append(y.current),y.current.style.pointerEvents="all";const i=v.current,a=t.current.getBoundingClientRect(),s=i.getBoundingClientRect(),[l,d]=[e.pageX,e.pageY],[h,g]=[s.left-a.left,s.top-a.top];return{x:l,y:d,oX:h,oY:g,panelKey:r,tabIndex:o}},onMouseMove(e,t){var n,i;if(!t)return;document.body.style.cursor="grabbing",null==(n=window.getSelection())||n.removeAllRanges(),b.current=!0;const{x:a,y:s,oX:c,oY:d}=t,u=e.pageY-(s-d),h=e.pageX-(a-c);y.current&&(C(!0),y.current.style.display="block",y.current.style.top=`${u}px`,y.current.style.left=`${h}px`);const g=document.elementsFromPoint(e.clientX,e.clientY).find(((e,t)=>e.id.includes("droppable")&&t>0));let m=oB(e,g);const p=null==(i=y.current)?void 0:i.getBoundingClientRect().height;p&&f(h,l,u,p),_B(),(null==g?void 0:g.id)!==`${o}_${r}_droppable`&&(null!=g&&g.id.includes("droppable-space")&&(m=void 0),((e,t)=>{let n;RB.push(t),e===eB.left&&(n=EB.tabLeft),e===eB.right&&(n=EB.tabRight),void 0===e&&(n=EB.emptyTabSpace),n&&(null==t||t.classList.add(n))})(m,g))},onMouseUp(t,n){var r,o;if(_B(),RB.length=0,null==(r=v.current)||r.append(y.current),null!=(o=y.current)&&o.style&&(y.current.style.display="none",C(!1)),document.body.style.cursor="auto",!n||!b.current)return;b.current=!1;const{x:a,y:s,oX:l,oY:c,panelKey:d,tabIndex:u}=n,[m,p]=[t.pageX-(a-l),t.pageY-(s-c)],f=m<0?0:m,x=p-32,w=x<0?0:x,S=document.elementFromPoint(t.clientX,t.clientY);var j,k;if(null==(j=S)||null==(k=j.id)?void 0:k.includes("droppable")){const e=document.elementFromPoint(t.clientX,t.clientY),n=null==e?void 0:e.id;if(!n||null==n||!n.includes("droppable"))return;const r=n.split("_"),o=r[0],a=Number.parseInt(r[1]),s=oB(t,e);if(u===a&&d===o||1===i&&d===o)return;s&&h(u,d,o,a,s)}else g(e,d,u,f,w)}},[]);const S=()=>(0,_.jsxs)(Ze.Sl,{id:`${o}_${r}_droppable`,name:"tab",mod:{active:c?r===d:s},children:[!c&&(0,_.jsx)(Ze.Sl,{name:"icon",tag:Aw,width:8}),n]});return(0,_.jsxs)(Ze.eB,{name:"panel-tabs",children:[(0,_.jsx)(Ze.Sl,{name:"draggable-tab",id:`${n}-draggable`,ref:v,children:(0,_.jsx)(S,{})}),(0,_.jsxs)(Ze.Sl,{ref:y,name:"ghost-tab",style:{width:`${l}px`,height:"fit-content",maxHeight:"300px",overflow:"hidden"},children:[(0,_.jsx)(S,{}),w&&(0,_.jsx)(Ze.Sl,{name:"contents",children:a})]})]})},TB=e=>{var t;const n=e.locked?e.panelViews[e.breakPointActiveTab].component:null==(t=e.panelViews)||null==(t=t.find((e=>e.active)))?void 0:t.component;return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(Ze.eB,{name:"tabs",mix:(0,O.VS)(O.sI)?"ff_outliner_optim":void 0,children:[(0,_.jsxs)(Ze.Sl,{name:"tabs-row",children:[e.panelViews.map(((t,n)=>{const{component:r}=t;return(0,_.jsx)(Ze.Sl,{name:"tab-container",mod:{active:t.active},children:(0,_.jsx)(AB,{name:t.name,rootRef:e.root,panelKey:e.name,tabIndex:n,active:t.active,tabTitle:t.title,panelWidth:e.width,viewLength:e.panelViews.length,locked:e.locked,transferTab:e.transferTab,createNewPanel:e.createNewPanel,setActiveTab:e.setActiveTab,checkSnap:e.checkSnap,breakPointActiveTab:e.breakPointActiveTab,setBreakPointActiveTab:e.setBreakPointActiveTab,children:(0,_.jsx)(Ze.Sl,{name:"content",children:(0,_.jsx)(r,Object.assign({},e,{name:"outliner"}),`${t.title}-${n}-ghost`)})},`${t.title}-tab`)},`${t.title}-${n}-tab`)})),(0,_.jsx)(Ze.Sl,{id:`${e.name}_${e.panelViews.length}-droppable-space`,name:"drop-space-after"})]}),(0,_.jsx)(Ze.Sl,{name:"contents",children:n&&(0,_.jsx)(n,Object.assign({},e))})]})})},PB=980,IB=(0,y.PA)((({currentEntity:e,panelsHidden:t,children:n,showComments:r,focusTab:o})=>{const i=e.regionStore,a=(0,p.useRef)({width:0,height:0}),s=Gz("screen and (max-width: 980px)"),[l,c]=(0,p.useState)(500),[d,u]=(0,p.useState)(!1),[h,g]=(0,p.useState)(!1),[m,f]=(0,p.useState)(!1),[v,y]=(0,p.useState)(!1),b=(0,p.useRef)(),[x,C]=(0,p.useState)(),S=(0,p.useMemo)((()=>fB(r)),[r]),[j,k]=(0,p.useState)(S.panelData),[O,R]=(0,p.useState)(S.collapsedSide),[E,A]=(0,p.useState)(0),T=(0,p.useRef)(x),P=(0,p.useRef)(O);P.current=O,T.current=x,XM(e);const I=(0,p.useMemo)((()=>d||s.matches),[d,s.matches]),L=(0,p.useCallback)(((e,t)=>{k((n=>{const r=Object.assign({},n[e],t);return Object.assign({},n,{[e]:r})}))}),[j]),M=(0,p.useCallback)(((e,t,n,r,o)=>{k((i=>{const s=i[t].panelViews[e];s&&(s.active=!0);const l=iB(i,t,e),c=((e,t,n,r,o,i)=>{const a=Object.assign({},e),s=a[n];s.panelViews=a[n].panelViews.map((e=>(e.active=!1,e)));let l=o+(i===eB.right?1:0);return t===n&&l>0&&(l-=1),s.panelViews.splice(l,0,r),a})(cB(l),t,n,s,r,o),d=kB(c,n),u=lB(d),h=sB(u);return wB(h,a.current.height)})),C(void 0)}),[j]),K=(0,p.useCallback)(((e,t,n,r,o)=>{if(T.current){var i;const s=T.current.split("-"),l=s[0];if(null!=(i=P.current)&&i[l])return;const c="top"===s[1]?nB.top:nB.bottom,d=a.current.height;k((i=>{const s=jB(i,e,t,n,r,o,a);return SB(s,e,l,zN,d,c)}))}else k((i=>jB(i,e,t,n,r,o,a)));C(void 0)}),[j,O,O[eB.left],O[eB.right]]),D=(0,p.useCallback)(((e,t)=>k((n=>aB(n,e,t)))),[j]),N=(0,p.useCallback)(((e,t)=>{k((n=>{const r=j[e],o=z(e,r.top,r.left,t),i=Object.assign({},n,{[e]:Object.assign({},r,{visible:t,storedTop:o.top/a.current.height*100,storedLeft:o.left/a.current.width*100})});return CB(i,a.current.height,r.alignment)}))}),[k,j]),V=(0,p.useCallback)(((e,t,n,r)=>{var o,i,s,l,c,d;const u=e+t,h=n+r,g=null!=(o=a.current.width)?o:0,m=null!=(i=a.current.height)?i:0,p=u>=g-((null==(s=Object.entries(j).find((([e,t])=>t.alignment===eB.right)))?void 0:s[1].width)||0),f=e<=((null==(l=Object.entries(j).find((([e,t])=>t.alignment===eB.left)))?void 0:l[1].width)||0),v=n<=5,y=h>=m-5;let b;null!=(c=P.current)&&c[eB.left]||!f||(e<=5&&(b=tB.left),v&&(b=tB.topLeft),y&&(b=tB.bottomLeft)),null!=(d=P.current)&&d[eB.right]||!p||(u>=g-5&&(b=tB.right),v&&(b=tB.topRight),y&&(b=tB.bottomRight)),C(b)}),[j]),z=(0,p.useCallback)(((e,t,n,r)=>{var o,i,a,s,l;const c=j[e],d=null!=(o=null==(i=b.current)?void 0:i.clientWidth)?o:0,u=(null!=r?r:c.visible)?c.height:FN,h=c.detached?u:c.height,g=c.height!==(null==(a=b.current)?void 0:a.clientHeight)&&c.detached?h:BN;return{left:(0,w.clamp)(n,0,d-c.width),top:(0,w.clamp)(t,0,(null!=(s=null==(l=b.current)?void 0:l.clientHeight)?s:0)-g)||1}}),[j]),B=(0,p.useCallback)((e=>{g((()=>!0)),k((t=>kB(t,e)))}),[j]),H=(0,p.useCallback)(((e,t,n,r)=>{const o=j[e],{left:i,top:s}=z(e,t,n,o.visible),l=a.current.height-s;m||j[e].detached||(f(!0),k((t=>((e,t,n)=>{const r=Object.assign({},e),o=r[t].alignment,i={width:zN,detached:!0,height:BN},a=Object.assign({},r,{[t]:Object.assign({},r[t],i)}),s=xB(r,o);return null==s||s.forEach(((e,t)=>{r[e].order=t})),CB(a,n,o)})(t,e,a.current.height)))),V(i,o.width,s,BN),requestAnimationFrame((()=>{L(e,{top:s,left:i,relativeTop:s/a.current.height*100,relativeLeft:i/a.current.width*100,storedLeft:void 0,storedTop:void 0,detached:r,zIndex:Object.keys(j).length+12,maxHeight:l,alignment:r?void 0:o.alignment})}))}),[L,V,j,m]),F=(0,p.useCallback)((()=>{g((()=>!0))}),[]),W=(0,p.useCallback)((()=>{g((()=>!1))}),[]),$=(0,p.useCallback)(((e,t,n)=>{requestAnimationFrame((()=>{k((r=>((e,t,n,r,o)=>{var i;const a=Object.assign({},e),s=xB(a,null==(i=a[t])?void 0:i.alignment),l=o;if(!s)return e;const c=n-a[t].height,d=s.filter((e=>a[e].visible)),u=(null==d?void 0:d.findIndex((e=>e===t)))-1;if(void 0===u)return e;const h=d[u];s.forEach((e=>{let i=a[e].height;e===t&&(i=n),e===h&&(i-=c),n<=55&&(n=55),a[e].visible&&(a[e]=Object.assign({},a[e],{relativeTop:r/o*100,storedLeft:void 0,storedTop:void 0,maxHeight:l,height:(0,w.clamp)(i,55,o)}))}));const g=s.filter((e=>!a[e].visible)).length*FN,m=s.filter((e=>a[e].visible)).reduce(((e,t)=>e+a[t].height),0);return wB(m+g>o?e:a,o)})(r,e,t,n,a.current.height)))}))}),[k]),U=(0,p.useCallback)((e=>Object.keys(j).filter((t=>{var n;return(null==(n=j[t])?void 0:n.alignment)===e}))),[j]),Z=(0,p.useCallback)(((e,t,n,r,o)=>{const{left:i,top:s}=z(e,r,o),c=a.current.height-s;requestAnimationFrame((()=>{var r;(j[e].detached?[e]:U(null==(r=j[e])?void 0:r.alignment)).forEach((e=>{L(e,{top:s,left:i,relativeTop:s/a.current.height*100,relativeLeft:i/a.current.width*100,storedLeft:void 0,storedTop:void 0,maxHeight:c,width:(0,w.clamp)(t,zN,l),height:j[e].detached?(0,w.clamp)(n,BN,HN):j[e].height})}))}))}),[L,l,j]),Y=(0,p.useCallback)((e=>{var t;if(f(!1),g((()=>!1)),!T.current)return;const n=T.current.split("-"),r=n[0],o="top"===n[1]?nB.top:nB.bottom,i=null==(t=xB(j,r))?void 0:t.filter((t=>t!==e));i&&i.length>0?k((t=>SB(t,e,r,zN,a.current.height,o))):L(e,{height:a.current.height,alignment:r,detached:!1}),C(void 0)}),[L,j]),X=(0,p.useMemo)((()=>({onResize:Z,onGroupHeightResize:$,onResizeStart:F,onResizeEnd:W,onPositionChange:H,onVisibilityChange:N,onPositionChangeBegin:B,onSnap:Y,transferTab:M,createNewPanel:K,setActiveTab:D,checkSnap:V,setBreakPointActiveTab:A})),[Z,$,F,W,H,N,Y,M,K,D]),q=(0,p.useMemo)((()=>Object.assign({},X,{root:b,regions:i,selection:i.selection,currentEntity:e})),[X,i,i.selection,e]),J=(0,p.useMemo)((()=>{const e=yB(j),n=bB(j),r=e.every((e=>!j[e].visible)),o=n.every((e=>!j[e].visible)),{left:i,right:a}=O,s=e.length&&j[e[0]].width||0,l=n.length&&j[n[0]].width||0;return{paddingLeft:I||t?0:i?FN:r?0:s,paddingRight:I||t?0:a?FN:o?0:l}}),[t,j,O,I]),Q=(0,p.useMemo)((()=>{if(t)return{};const e={detached:[],left:[],right:[]},n=Object.entries(j);for(const[t,i]of n){var r,o;const{alignment:n,detached:a}=i,s=xB(j,n),c=Object.assign({},i,q,{name:t,top:null!=(r=i.storedTop)?r:i.top,left:null!=(o=i.storedLeft)?o:i.left,positioning:m,maxWidth:l,zIndex:i.zIndex,expanded:O[n],alignment:i.alignment,locked:I,attachedKeys:s,lockPanelContents:h,breakPointActiveTab:E,sidePanelCollapsed:O,setSidePanelCollapsed:R,dragTop:n===eB.left?x===tB.topLeft:x===tB.topRight,dragBottom:n===eB.left?x===tB.bottomLeft:x===tB.bottomRight});a?e.detached.push(c):"left"===n?e.left.push(c):"right"===n&&e.right.push(c)}return e}),[j,q,h,t,I,m,l,O,x]);(0,p.useEffect)((()=>{Object.keys(j).length&&((e,t)=>{window.localStorage.setItem("panelState",JSON.stringify({panelData:e,collapsedSide:t}))})(j,O)}),[j,O]),(0,p.useEffect)((()=>{if(o){const e=Object.assign({},j),t=((e,t)=>{var n;const r=Object.keys(e).find((e=>e.includes(t)))||"",o=null==(n=e[r])?void 0:n.panelViews.findIndex((e=>e.name===t));return o>=0?{panelName:r,tab:e[r].panelViews[o],panelViewIndex:o}:void 0})(e,o);if(!t)return;const{panelName:n,tab:r,panelViewIndex:i}=t,{alignment:a,detached:s,visible:l}=e[n];r.active||k(aB(e,n,i)),!s&&O[a]&&R(Object.assign({},O,{[a]:!1})),l||N(n,!0)}}),[o]),(0,p.useEffect)((()=>{const e=b.current;if(!e)return;const t=()=>{var e,t;return(null!=(e=null==(t=b.current)?void 0:t.clientWidth)?e:0){requestAnimationFrame((()=>{if(!b.current)return;const{clientWidth:e,clientHeight:n}=b.current;e<=PB||(a.current.height!==n&&k(wB(j,n)),a.current.width=null!=e?e:0,a.current.height=null!=n?n:0,u(t()),c(.4*b.current.clientWidth))}))}));return e&&(n.observe(e),u(t()),c(.4*e.clientWidth),y(!0)),()=>{e&&n.unobserve(e),n.disconnect()}}),[j]);const ee=(0,p.useMemo)((()=>({locked:I})),[]),te=(0,p.useMemo)((()=>{const e=Object.assign({},mB);return e.panelViews=mB.panelViews.filter((e=>"comments"!==e.name||r)),e}),[mB,r]),ne=Object.assign({},te,q,{breakPointActiveTab:E,setBreakPointActiveTab:A});return(0,_.jsx)(rz.Provider,{value:ee,children:(0,_.jsx)(Ze.eB,{ref:e=>{e&&(b.current=e,u(e.clientWidth<=PB))},name:"sidepanels",mod:{collapsed:I},style:Object.assign({},J),children:v&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"content",mod:{resizing:h||m},children:n}),!0!==t&&I?(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(Ze.Sl,{name:"wrapper",children:(0,_.jsx)(OB,Object.assign({},ne,{children:(0,_.jsx)(TB,Object.assign({},ne))}))})}):(0,_.jsx)(_.Fragment,{children:Object.entries(Q).map((([e,t],n)=>{const r=t.sort(((e,t)=>e.order-t.order)).map(((t,r)=>(0,_.jsx)(OB,Object.assign({},t,{children:(0,_.jsx)(TB,Object.assign({},t))}),`${e}-${r}-${n}`)));return"detached"===e?(0,_.jsx)(p.Fragment,{children:r},e):(0,_.jsx)(Ze.Sl,{name:"wrapper",mod:{align:e,snap:x===e},children:r},e)}))})]})})})}));var LB=n(57958),MB=n(8593);const KB=["date"],DB=6e4,NB=[[3e4,3e4],[267e4,DB],[Number.MAX_SAFE_INTEGER,18e5]];const VB=e=>{let{date:t}=e,n=(0,Yn.A)(e,KB);const[r,o]=(0,p.useState)(Date.now()),i=(0,p.useMemo)((()=>new Date(t).valueOf()),[t]),a=(0,p.useRef)(),s=(0,p.useCallback)((()=>{const e=Date.now()-i,t=function(e=0){const t=NB.findIndex((([t],n)=>t>e||n===NB.length-1)),n=t>0?NB[t-1][0]:0,r=NB[t][1];return Math.ceil((e-n+1)/r)*r+n}(e);a.current=window.setTimeout((()=>{o(Date.now())}),t-e)}),[t]);(0,p.useEffect)((()=>(s(),()=>{clearTimeout(a.current)})),[t,r]);const l="less than a minute ago"===(0,LB.A)(i,{addSuffix:!0})?"seconds ago":(0,LB.A)(i,{addSuffix:!0});return(0,_.jsx)("time",Object.assign({dateTime:(0,MB.default)(i,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),title:(0,MB.default)(i,"PPpp")},n,{children:l}))},zB=e=>e.unresolved_comment_count>0?"Unresolved Comments":e.comment_count>0?"All Comments Resolved":"",BB=(0,y.PA)((({entity:e,capabilities:t,annotationStore:n,onAnnotationChange:r})=>{var o,i,a;const s="prediction"===e.type,l=(0,w.userDisplayName)(null!=(o=e.user)?o:{firstName:e.createdBy||"Admin"}),[c,d]=(0,p.useState)(),[u,h]=(0,p.useState)(!1),g=(m=e).unresolved_comment_count>0?ol:m.comment_count>0?qs:null;var m;(0,p.useEffect)((()=>{d(e.ground_truth)}),[e,e.ground_truth]);const f=(0,p.useCallback)((()=>{const{selected:t,id:r,type:o}=e;t||("prediction"===o?n.selectPrediction(r):n.selectAnnotation(r))}),[e]),v=({entity:e,capabilities:t})=>{const o=J_(),i=()=>{null==r||r(),null==o||o.close()},a=(0,p.useCallback)((()=>{e.setGroundTruth(!c),i()}),[e]),s=(0,p.useCallback)((()=>{const t=n.addAnnotationFromPrediction(e);window.setTimeout((()=>{n.selectAnnotation(t.id),i()}))}),[e]),l=(0,p.useCallback)((()=>{i(),SK({title:"Delete annotation?",body:(0,_.jsxs)(_.Fragment,{children:["This will ",(0,_.jsx)("strong",{children:"delete all existing regions"}),". Are you sure you want to delete them?",(0,_.jsx)("br",{}),"This action cannot be undone."]}),buttonLook:"destructive",okText:"Delete",onOk:()=>{e.list.deleteAnnotation(e)}})}),[e]),d="prediction"===e.type,u=!(0,w.isDefined)(e.pk),h=t.groundTruthEnabled&&!d&&!u,g=t.enableCreateAnnotation&&!u;return(0,_.jsxs)(Ze.eB,{name:"AnnotationButtonContextMenu",children:[h&&(0,_.jsxs)(Ze.Sl,{name:"option",mod:{groundTruth:!0},onClick:a,children:[c?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(kl,{color:"#FFC53D",width:37,height:37})," ","Unset "]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Tl,{width:37,height:37}),"Set "]}),"as Ground Truth"]}),g&&(0,_.jsxs)(Ze.Sl,{name:"option",mod:{duplicate:!0},onClick:s,children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(Od,{width:20,height:24})}),"Duplicate Annotation"]}),t.enableAnnotationDelete&&!d&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"seperator"}),(0,_.jsxs)(Ze.Sl,{name:"option",mod:{delete:!0},onClick:l,children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(gf,{width:14,height:18})})," ","Delete Annotation"]})]})]})};return(0,_.jsxs)(Ze.eB,{name:"annotation-button",mod:{selected:e.selected,contextMenuOpen:u},children:[(0,_.jsxs)(Ze.Sl,{name:"mainSection",onClick:f,children:[(0,_.jsx)(Ze.Sl,{name:"picSection",children:(0,_.jsx)(Ze.Sl,{name:"userpic",tag:FM,showUsername:!0,username:s?e.createdBy:null,user:null!=(i=e.user)?i:{email:e.createdBy},mod:{prediction:s},size:24,children:s&&(0,_.jsx)(Ps,{style:{width:18,height:18}})})}),(0,_.jsxs)(Ze.Sl,{name:"main",children:[(0,_.jsxs)(Ze.Sl,{name:"user",children:[(0,_.jsx)(Ze.Sl,{tag:"span",name:"name",children:l}),(0,_.jsxs)(Ze.Sl,{tag:"span",name:"entity-id",children:["#",null!=(a=e.pk)?a:e.id]})]}),(0,_.jsx)(Ze.Sl,{name:"created",children:(0,_.jsx)(Ze.Sl,{name:"date",component:VB,date:e.createdDate})})]}),!s&&(0,_.jsxs)(Ze.Sl,{name:"icons",children:[e.draftId>0&&(0,_.jsx)(ir,{title:"Draft",children:(0,_.jsx)(Ze.Sl,{name:"icon",mod:{draft:!0},children:(0,_.jsx)(cx,{color:"#617ADA"})})}),e.skipped&&(0,_.jsx)(ir,{title:"Skipped",children:(0,_.jsx)(Ze.Sl,{name:"icon",mod:{skipped:!0},children:(0,_.jsx)(hw,{color:"#DD0000"})})}),c&&(0,_.jsx)(ir,{title:"Ground-truth",children:(0,_.jsx)(Ze.Sl,{name:"icon",mod:{groundTruth:!0},children:(0,_.jsx)(rw,{})})}),g&&(0,_.jsx)(ir,{title:zB(e),children:(0,_.jsx)(Ze.Sl,{name:"icon",mod:{comments:!0},children:(0,_.jsx)(g,{})})})]})]}),(0,_.jsx)(Ze.Sl,{name:"contextMenu",children:(0,_.jsx)(Q_.Trigger,{content:(0,_.jsx)(v,{entity:e,capabilities:t,annotationStore:n}),onToggle:e=>h(e),children:(0,_.jsx)(Ze.Sl,{name:"ellipsisIcon",children:(0,_.jsx)(Pd,{width:28,height:28})})})})]})})),HB=(0,y.PA)((({store:e,annotationStore:t})=>{const[n,r]=(0,p.useState)([]),o=e.hasInterface("annotations:tabs"),i=e.hasInterface("predictions:tabs"),a=e.hasInterface("annotations:add-new"),s=e.hasInterface("ground-truth"),l=e.hasInterface("annotations:delete"),c=(0,p.useRef)(),d=(0,p.useRef)(),[u,h]=(0,p.useState)(0),[g,m]=(0,p.useState)(!1),[f,v]=(0,p.useState)(!1),y=(0,p.useCallback)(((e,t=!0)=>{if(d.current&&c.current){const e=d.current.clientWidth,n=c.current.clientWidth,r=(0,w.clamp)(t?u-e:u+e,0,n-e);h(r)}}),[d,c,u]);return(0,p.useEffect)((()=>{var e,t,n,r;m(u<=0),v(u>=(null!=(e=null==(t=c.current)?void 0:t.clientWidth)?e:0)-(null!=(n=null==(r=d.current)?void 0:r.clientWidth)?n:0))}),[n.length,d.current,c.current,u,window.innerWidth,window.innerHeight]),(0,p.useEffect)((()=>{const e=[];i&&e.push(...t.predictions),o&&e.push(...t.annotations),r(e)}),[t,JSON.stringify(t.predictions),JSON.stringify(t.annotations)]),o||i||a?(0,_.jsxs)(Ze.eB,{name:"annotations-carousel",style:{"--carousel-left":`${u}px`},children:[(0,_.jsx)(Ze.Sl,{ref:d,name:"container",children:(0,_.jsx)(Ze.Sl,{ref:c,name:"carosel",children:(0,w.sortAnnotations)(n).map((e=>(0,_.jsx)(BB,{entity:e,capabilities:{enablePredictions:i,enableCreateAnnotation:a,groundTruthEnabled:s,enableAnnotations:o,enableAnnotationDelete:l},annotationStore:t},null==e?void 0:e.id)))})}),(!g||!f)&&(0,_.jsxs)(Ze.Sl,{name:"carousel-controls",children:[(0,_.jsx)(Ze.Sl,{tag:za,name:"nav",disabled:g,mod:{left:!0,disabled:g},"aria-label":"Carousel left",onClick:e=>!g&&y(e,!0),children:(0,_.jsx)(Ze.Sl,{name:"arrow",mod:{left:!0},tag:lc})}),(0,_.jsx)(Ze.Sl,{tag:za,name:"nav",disabled:f,mod:{right:!0,disabled:f},"aria-label":"Carousel right",onClick:e=>!f&&y(e,!1),children:(0,_.jsx)(Ze.Sl,{name:"arrow",mod:{right:!0},tag:lc})})]})]}):null})),FB=(0,y.PA)((({entity:e})=>{const{history:t}=e;return(0,_.jsxs)(Ze.eB,{name:"history-buttons",children:[(0,_.jsx)(ir,{title:"Undo",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Undo",disabled:!(null!=t&&t.canUndo),onClick:()=>e.undo(),icon:(0,_.jsx)(Qa,{})})}),(0,_.jsx)(ir,{title:"Redo",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Redo",disabled:!(null!=t&&t.canRedo),onClick:()=>e.redo(),icon:(0,_.jsx)(as,{})})}),(0,_.jsx)(ir,{title:"Reset",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",look:"danger",type:"text","aria-label":"Reset",disabled:!(null!=t&&t.canUndo),onClick:()=>null==t?void 0:t.reset(),icon:(0,_.jsx)(hs,{})})})]})})),WB=({store:e})=>{const t=e.annotationStore,n=t.selected,r=!n.userGenerate||n.sentUserGenerate,o="prediction"===(null==n?void 0:n.type),i=t.viewingAll,a=(0,p.useCallback)((()=>{t.toggleViewingAllAnnotations()}),[t]);return(0,_.jsxs)(Ze.Sl,{name:"section",children:[e.hasInterface("annotations:view-all")&&(0,_.jsx)(ir,{title:"View all annotations",children:(0,_.jsx)(za,{icon:(0,_.jsx)(Hp,{}),type:"text","aria-label":"View All",onClick:()=>a(),primary:i,style:{height:36,width:36,padding:0}})}),!i&&e.hasInterface("ground-truth")&&(0,_.jsx)(MD,{entity:n}),!o&&!i&&e.hasInterface("edit-history")&&(0,_.jsx)(FB,{entity:n}),!i&&e.hasInterface("annotations:delete")&&(0,_.jsx)(ir,{title:"Delete annotation",children:(0,_.jsx)(za,{icon:(0,_.jsx)(bs,{}),look:"danger",type:"text","aria-label":"Delete",onClick:()=>{SK({title:"Delete annotation",body:"This action cannot be undone",buttonLook:"destructive",okText:"Proceed",onOk:()=>n.list.deleteAnnotation(n)})},style:{height:36,width:36,padding:0}})}),!i&&e.hasInterface("annotations:add-new")&&r&&(0,_.jsx)(ir,{title:`Create copy of current ${n.type}`,children:(0,_.jsx)(za,{icon:(0,_.jsx)(Rp,{style:{width:36,height:36}}),size:"small",look:"ghost",type:"text","aria-label":"Copy Annotation",onClick:t=>{t.preventDefault();const r=e.annotationStore.addAnnotationFromPrediction(n);window.setTimeout((()=>{e.annotationStore.selectAnnotation(r.id)}),50)},style:{height:36,width:36,padding:0}})}),(0,_.jsx)(za,{icon:(0,_.jsx)(gl,{}),type:"text","aria-label":"Settings",onClick:()=>e.toggleSettings(),style:{height:36,width:36,padding:0}}),e.description&&e.hasInterface("instruction")&&(0,_.jsx)(za,{icon:(0,_.jsx)(xp,{style:{width:16,height:16}}),primary:e.showingDescription,type:"text","aria-label":"Instructions",onClick:()=>e.toggleDescription(),style:{height:36,width:36,padding:0}})]})},$B=["entity","selected","onClick","extra"],UB=(0,y.PA)((({store:e,annotationStore:t,commentStore:n})=>{const r=(0,p.useRef)(),[o,i]=(0,p.useState)(!1),a=e.hasInterface("annotations:tabs"),s=e.hasInterface("predictions:tabs"),l=e.hasInterface("annotations:add-new"),c=e.hasInterface("ground-truth"),d=[];s&&d.push(...t.predictions),a&&d.push(...t.annotations);const h=(0,p.useCallback)(((e,n)=>{e.selected||(n?t.selectPrediction(e.id):t.selectAnnotation(e.id))}),[t]);(0,p.useEffect)((()=>{const e=e=>{const t=e.target,n=r.current;t===n||null!=n&&n.contains(t)||i(!1)};document.addEventListener("click",e);const t=(0,u.mJ)((()=>[...n.comments.map((e=>e.isResolved))]),(e=>{let t=0,r=0;e.forEach((e=>{r++,e||t++})),n.annotation.setUnresolvedCommentCount(t),n.annotation.setCommentCount(r)}));return()=>{document.removeEventListener("click",e),t()}}),[]);const g=e=>e.unresolved_comment_count>0?(0,_.jsx)(Ws,{}):e.comment_count>0?(0,_.jsx)(Ns,{}):null,m=(e,n)=>{var r;return(0,_.jsx)(GB,{entity:e,"aria-label":`${e.type} ${n+1}`,selected:e===t.selected,onClick:t=>{t.preventDefault(),t.stopPropagation(),i(!1),null==h||h(e,"prediction"===e.type)},extra:(0,_.jsxs)(Ze.Sl,{name:"icons",children:[(0,_.jsx)(Ze.Sl,{name:"icon-column",children:g(e)}),(0,_.jsx)(Ze.Sl,{name:"icon-column",children:c&&(0,_.jsx)(MD,{entity:e,disabled:!0})})]})},`${null!=(r=e.pk)?r:e.id}${e.type}`)};return a||s||l?(0,_.jsx)(Ze.Sl,{name:"section",mod:{flat:!0},children:(0,_.jsxs)(Ze.eB,{name:"annotations-list",ref:r,children:[(0,_.jsx)(Ze.Sl,{name:"selected",children:(0,_.jsx)(GB,{"aria-label":"Annotations List Toggle",entity:t.selected,onClick:e=>{e.stopPropagation(),i(!o)},extra:d.length>0?(0,_.jsxs)(Fa,{size:"none",style:{marginRight:-8,marginLeft:8},children:[(0,_.jsxs)(Ze.Sl,{name:"counter",children:[d.indexOf(t.selected)+1,"/",d.length]}),(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{opened:o}})]}):null})}),o&&(0,_.jsxs)(Ze.Sl,{name:"list",children:[e.hasInterface("annotations:add-new")&&(0,_.jsx)(ZB,{annotationStore:t,onClick:()=>i(!1)}),(e=>{const t=[],n=[];return e.forEach(((e,r)=>{e.pk?n.push(m(e,r)):t.push(m(e,r))})),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"draft",children:t}),(0,_.jsx)(Ze.Sl,{name:"annotation",children:n})]})})(d)]})]})}):null})),ZB=(0,y.PA)((({annotationStore:e,onClick:t})=>{const n=(0,p.useCallback)((()=>{const n=e.createAnnotation();e.selectAnnotation(n.id),t()}),[e,t]);return(0,_.jsx)(Ze.Sl,{name:"create","aria-label":"Create Annotation",onClick:n,children:(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"userpic",tag:FM,mod:{prediction:!0},children:(0,_.jsx)(ed,{})}),"Create Annotation"]})})})),GB=(0,y.PA)((e=>{var t,n,r;let{entity:o,selected:i,onClick:a,extra:s}=e,l=(0,Yn.A)(e,$B);const c="prediction"===o.type,d=(0,w.userDisplayName)(null!=(t=o.user)?t:{firstName:o.createdBy||"Admin"});return(0,_.jsx)(Ze.Sl,Object.assign({},l,{name:"entity",mod:{selected:i},onClick:a,children:(0,_.jsxs)(Fa,{spread:!0,children:[(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"userpic",tag:FM,showUsername:!0,username:c?o.createdBy:null,user:null!=(n=o.user)?n:{username:d},mod:{prediction:c},children:c&&(0,_.jsx)(Ps,{color:"#944BFF",style:{width:18,height:18}})}),(0,_.jsxs)(Fa,{direction:"vertical",size:"none",children:[(0,_.jsxs)(Ze.Sl,{name:"user",children:[(0,_.jsx)(Ze.Sl,{tag:"span",name:"name",children:d}),(0,_.jsxs)(Ze.Sl,{tag:"span",name:"entity-id",children:["#",null!=(r=o.pk)?r:o.id]})]}),(0,w.isDefined)(o.acceptedState)?(0,_.jsx)(Ze.Sl,{name:"review",mod:{state:o.acceptedState},children:o.acceptedState}):(0,_.jsxs)(Ze.Sl,{name:"created",children:["created, ",(0,_.jsx)(Ze.Sl,{name:"date",component:VB,date:o.createdDate})]})]})]}),s]})}))})),YB=(0,y.WQ)("store")((0,y.PA)((({store:e,title:t,children:n})=>(0,_.jsx)(ir,{title:t,enabled:e.settings.enableTooltips,mouseEnterDelay:.8,children:n})))),XB=(0,y.WQ)((({store:e})=>{var t;return{store:e,history:null==e||null==(t=e.annotationStore)||null==(t=t.selected)?void 0:t.history}})),qB=XB((0,y.PA)((({store:e,history:t,annotation:n})=>{const r=e.hasInterface("review"),o=(0,w.isDefined)(e.annotationStore.selectedHistory),{userGenerate:i,sentUserGenerate:a,versions:s,results:l,editable:c}=n,d=[],[u,h]=(0,p.useState)(!1),g=!c||e.isSubmitting||o||u,m=e.hasInterface("annotations:deny-empty")&&0===l.length,f=(0,p.useCallback)((async(t,n,r)=>{const{addedCommentThisSession:o,currentComment:i,commentFormSubmit:a,inputRef:s}=e.commentStore;if(!u){if(h(!0),!s.current||o)n();else if((null!=i?i:"").trim())t.preventDefault(),await a(),n();else{const t=s.current;e.commentStore.setTooltipMessage(r),t.scrollIntoView({behavior:"smooth"}),t.focus({preventScroll:!0})}h(!1)}}),[e.rejectAnnotation,e.skipTask,e.commentStore.currentComment,e.commentStore.inputRef,e.commentStore.commentFormSubmit,e.commentStore.addedCommentThisSession,u]),v=(0,p.useMemo)((()=>(0,_.jsx)(YB,{title:"Reject annotation: [ Ctrl+Space ]",children:(0,_.jsx)(za,{"aria-label":"reject-annotation",disabled:g,look:"danger",onClick:async t=>{var n;null==(n=e.hasInterface("comments:reject"))||n?f(t,(()=>e.rejectAnnotation({})),"Please enter a comment before rejecting"):(console.log("rejecting"),await e.commentStore.commentFormSubmit(),e.rejectAnnotation({}))},children:"Reject"})},"reject")),[g,e]);if(r)d.push(v),d.push((0,_.jsx)(YB,{title:"Accept annotation: [ Ctrl+Enter ]",children:(0,_.jsx)(za,{"aria-label":"accept-annotation",disabled:g,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.acceptAnnotation()},children:t.canUndo?"Fix + Accept":"Accept"})},"accept"));else if(n.skipped)d.push((0,_.jsxs)(Ze.Sl,{name:"skipped-info",children:[(0,_.jsx)(Vl,{color:"#d00"})," Was skipped"]},"skipped")),d.push((0,_.jsx)(YB,{title:"Cancel skip: []",children:(0,_.jsx)(za,{"aria-label":"cancel-skip",disabled:g,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.unskipTask()},children:"Cancel skip"})},"cancel-skip"));else{if(e.hasInterface("skip")&&d.push((0,_.jsx)(YB,{title:"Cancel (skip) task: [ Ctrl+Space ]",children:(0,_.jsx)(za,{"aria-label":"skip-task",disabled:g,look:"danger",onClick:async t=>{var n;null==(n=e.hasInterface("comments:skip"))||n?f(t,(()=>e.skipTask({})),"Please enter a comment before skipping"):(await e.commentStore.commentFormSubmit(),e.skipTask({}))},children:"Skip"})},"skip")),i&&!a||e.explore&&!i&&e.hasInterface("submit")){const t=m?"Empty annotations denied in this project":"Save results: [ Ctrl+Enter ]";d.push((0,_.jsx)(YB,{title:t,children:(0,_.jsx)(Ze.Sl,{name:"tooltip-wrapper",children:(0,_.jsx)(za,{"aria-label":"submit",disabled:g||m,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.submitAnnotation()},children:"Submit"})})},"submit"))}if(i&&a||!i&&e.hasInterface("update")){const t=a||s.result,n=(0,_.jsx)(YB,{title:"Update this task: [ Alt+Enter ]",children:(0,_.jsx)(za,{"aria-label":"submit",disabled:g||m,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.updateAnnotation()},children:t?"Update":"Submit"})},"update");d.push(n)}}return(0,_.jsx)(Ze.eB,{name:"controls",children:d})}))),JB=(0,y.PA)((({store:e})=>{var t;const n=(0,p.useMemo)((()=>e.taskHistory.findIndex((t=>t.taskId===e.task.id))+1),[e.taskHistory]),[r,o]=(0,p.useState)(0),[i,a]=(0,p.useState)(0);(0,p.useEffect)((()=>{e.commentStore.setAddedCommentThisSession(!1);const t=(0,u.mJ)((()=>e.commentStore.comments.map((e=>e.isDeleted))),(e=>{a(e.filter((e=>!e)).length)}));return()=>{null==t||t()}}),[]),(0,p.useEffect)((()=>{e.commentStore.addedCommentThisSession&&o(i)}),[e.commentStore.addedCommentThisSession]);const s=e.hasInterface("topbar:prevnext"),l=e.hasInterface("topbar:task-counter");let c=!(0,w.isDefined)(e.annotationStore.selected.pk)&&(!(0,O.VS)(O.JO)||e.hasInterface("skip"))&&!e.canGoNextTask&&!e.hasInterface("review")&&e.hasInterface("postpone");return e.hasInterface("annotations:comments")&&(0,O.VS)(O.ow)&&(c=c&&e.commentStore.addedCommentThisSession&&i>=r),(0,_.jsx)(Ze.Sl,{name:"section",children:(0,_.jsxs)(Ze.eB,{name:"current-task",mod:{"with-history":s},style:{padding:(0,O.VS)(O.bA)&&0,width:(0,O.VS)(O.bA)&&"auto"},children:[(0,_.jsxs)(Ze.Sl,{name:"task-id",style:{fontSize:(0,O.VS)(O.bA)?12:14},children:[null!=(t=e.task.id)?t:E(),s&&l&&((0,O.VS)(O.P2)?(0,_.jsxs)(Ze.Sl,{name:"task-count",children:[e.queuePosition," of ",e.queueTotal]}):(0,_.jsxs)(Ze.Sl,{name:"task-count",children:[n," of ",e.taskHistory.length]}))]}),s&&(0,_.jsxs)(Ze.Sl,{name:"history-controls",mod:{newui:(0,O.VS)(O.bA)},children:[(0,_.jsx)(Ze.Sl,{tag:za,name:"prevnext",mod:{prev:!0,disabled:!e.canGoPrevTask,newui:(0,O.VS)(O.bA)},type:"link",disabled:!s||!e.canGoPrevTask,onClick:e.prevTask,style:{background:!(0,O.VS)(O.bA)&&"none",backgroundColor:(0,O.VS)(O.bA)&&"none"}}),(0,_.jsx)(Ze.Sl,{tag:za,name:"prevnext","data-testid":"next-task",mod:{next:!0,disabled:!e.canGoNextTask&&!c,postpone:!e.canGoNextTask&&c,newui:(0,O.VS)(O.bA)},type:"link",disabled:!e.canGoNextTask&&!c,onClick:e.canGoNextTask?e.nextTask:e.postponeTask,style:{background:!(0,O.VS)(O.bA)&&"none",backgroundColor:(0,O.VS)(O.bA)&&"none"}})]})]})})})),QB=(0,y.PA)((({store:e})=>{const t=e.annotationStore,n=null==t?void 0:t.selected,r="prediction"===(null==n?void 0:n.type),o=!0===(null==t?void 0:t.viewingAll);return e?(0,_.jsx)(Ze.eB,{name:"topbar",mod:{newLabelingUI:(0,O.VS)(O.bA)},children:(0,O.VS)(O.bA)?(0,_.jsxs)(Ze.Sl,{name:"group",children:[(0,_.jsx)(JB,{store:e}),e.hasInterface("annotations:view-all")&&(0,_.jsx)(ir,{title:"View all annotations",children:(0,_.jsx)(za,{className:"topbar__button",icon:(0,_.jsx)(Hp,{}),type:"text","aria-label":"View All",onClick:t.toggleViewingAllAnnotations,primary:o,style:{height:36,width:36,padding:0,marginRight:(0,O.VS)(O.bA)&&8}})}),e.hasInterface("annotations:add-new")&&(0,_.jsx)(ir,{placement:"topLeft",title:"Create a new annotation",children:(0,_.jsx)(za,{icon:(0,_.jsx)(ks,{}),className:"topbar__button",type:"text","aria-label":"View All",onClick:t=>{t.preventDefault();const n=e.annotationStore.createAnnotation();e.annotationStore.selectAnnotation(n.id)},style:{height:36,width:36,padding:0,marginRight:4}})}),!o&&(0,_.jsx)(HB,{store:e,annotationStore:e.annotationStore,commentStore:e.commentStore})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(Ze.Sl,{name:"group",children:[(0,_.jsx)(JB,{store:e}),!o&&(0,_.jsx)(UB,{store:e,annotationStore:e.annotationStore,commentStore:e.commentStore}),(0,_.jsx)(WB,{store:e})]}),(0,_.jsxs)(Ze.Sl,{name:"group",children:[!o&&(0,_.jsx)(Ze.Sl,{name:"section",children:(0,_.jsx)(AD,{})}),!o&&e.hasInterface("controls")&&(e.hasInterface("review")||!r)&&(0,_.jsx)(Ze.Sl,{name:"section",mod:{flat:!0},style:{width:320,boxSizing:"border-box"},children:(0,_.jsx)(qB,{annotation:n})})]})]})}):null}));class eH extends p.Component{constructor(...e){super(...e),this.relationsRef=p.createRef(),this._notifyScroll=()=>{this.relationsRef.current&&this.relationsRef.current.onResize()}}componentDidMount(){window.blur(),document.body.focus()}renderSuccess(){return(0,_.jsx)(Ze.eB,{name:"editor",children:(0,_.jsx)(f.Ay,{status:"success",title:(0,h._$)(this.props.store).messages.DONE})})}renderNoAnnotation(){return(0,_.jsx)(Ze.eB,{name:"editor",children:(0,_.jsx)(f.Ay,{status:"success",title:(0,h._$)(this.props.store).messages.NO_COMP_LEFT})})}renderNothingToLabel(e){return(0,_.jsxs)(Ze.eB,{name:"editor",style:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",paddingBottom:"30vh"},children:[(0,_.jsx)(f.Ay,{status:"success",title:(0,h._$)(this.props.store).messages.NO_NEXT_TASK}),(0,_.jsx)(Ze.eB,{name:"sub__result",children:"You have completed all tasks in the queue!"}),(0,_.jsx)(za,{onClick:t=>e.prevTask(t,!0),look:"outlined",style:{margin:"16px 0"},children:"Go to Previous Task"})]})}renderNoAccess(){return(0,_.jsx)(Ze.eB,{name:"editor",children:(0,_.jsx)(f.Ay,{status:"warning",title:(0,h._$)(this.props.store).messages.NO_ACCESS})})}renderConfigValidationException(e){return(0,_.jsxs)(Ze.eB,{name:"main-view",children:[(0,_.jsx)(Ze.Sl,{name:"annotation",children:(0,_.jsx)(Oe,{errors:this.props.store.annotationStore.validation})}),!(0,O.VS)(O.bA)&&e.hasInterface("infobar")&&(0,_.jsxs)(Ze.Sl,{name:"infobar",children:["Task #",e.task.id]})]})}renderLoader(){return(0,_.jsx)(f.Ay,{icon:(0,_.jsx)(v.A,{size:"large"})})}_renderAll(e){if(1===e.length)return(0,_.jsx)(xN,{annotation:e[0],children:[D.renderItem(e[0].root)]});const t=(0,Ze.cn)("renderall").toClassName(),n=(0,Ze.cn)("fade").toClassName();return(0,_.jsx)("div",{className:t,children:e.map(((e,t)=>(0,_.jsx)("div",{className:n,children:(0,_.jsx)(xN,{annotation:e,children:[D.renderItem(e.root)]})},`all-${t}`)))})}_renderUI(e,t){var n,r;return t.viewingAll?this.renderAllAnnotations():(0,_.jsxs)(Ze.eB,{name:"main-view",onScrollCapture:this._notifyScroll,children:[(0,_.jsxs)(Ze.Sl,{name:"annotation",children:[(0,_.jsx)(DM,{root:e,annotation:t.selected}),this.renderRelations(t.selected),(0,O.VS)(O.v1)&&this.renderCommentsOverlay(t.selected)]}),!(0,O.VS)(O.bA)&&(0,h.Zn)(t).hasInterface("infobar")&&this._renderInfobar(t)]},null==(n=null!=(r=t.selectedHistory)?r:t.selected)?void 0:n.id)}_renderInfobar(e){const{id:t,queue:n}=(0,h.Zn)(e).task;return(0,_.jsxs)(Ze.Sl,{name:"infobar",tag:Fa,size:"small",children:[(0,_.jsxs)("span",{children:["Task #",t]}),n&&(0,_.jsx)("span",{children:n})]})}renderAllAnnotations(){const e=this.props.store.annotationStore,t=[...e.annotations,...e.predictions];return(0,O.VS)(O.F5)&&(0,w.sortAnnotations)(t),(0,_.jsx)(nN,{store:e,annotations:t,root:e.root})}renderRelations(e){var t;const n=e.relationStore,r=null==(t=this.props.store.task)?void 0:t.data;return(0,_.jsx)(yN,{store:n,ref:this.relationsRef,tags:e.names,taskData:r},E())}renderCommentsOverlay(e){const{store:t}=this.props,{commentStore:n}=t;return t.hasInterface("annotations:comments")&&n.isCommentable?(0,_.jsx)(we,{commentStore:n,annotation:e}):null}render(){var e,t,n,r;const{store:o}=this.props,i=o.annotationStore,a=i.selected&&i.selected.root,{settings:s}=o;if(o.isLoading)return this.renderLoader();if(o.noTask)return this.renderNothingToLabel(o);if(o.noAccess)return this.renderNoAccess();if(o.labeledSuccess)return this.renderSuccess();if(!a)return this.renderNoAnnotation();const l=i.viewingAll,c=(0,_.jsx)(Ze.eB,{name:"main-content",mix:o.awaitingSuggestions?["requesting"]:[],children:null===i.validation?this._renderUI(null!=(e=null==(t=i.selectedHistory)?void 0:t.root)?e:a,i):this.renderConfigValidationException(o)}),d=(0,O.VS)(O.LE),u=(0,O.VS)(O.bA);return(0,_.jsxs)(Ze.eB,{name:"editor",mod:{fullscreen:s.fullscreen,_auto_height:!d},ref:(0,O.VS)(O.SM)?KM(this):null,children:[(0,_.jsx)(DN,{store:o}),(0,_.jsxs)(y.Kq,{store:o,children:[u?(0,_.jsx)(rN,{visible:o.showingDescription,onCancel:()=>o.toggleDescription(),title:o.hasInterface("review")?"Review Instructions":"Labeling Instructions",children:o.description}):(0,_.jsx)(_.Fragment,{children:o.showingDescription&&(0,_.jsx)(xN,{children:(0,_.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(o.description)}})})}),(0,w.isDefined)(o)&&o.hasInterface("topbar")&&(0,_.jsx)(QB,{store:o}),(0,_.jsx)(Ze.eB,{name:"wrapper",mod:{viewAll:l,bsp:s.bottomSidePanel,outliner:d,showingBottomBar:u},children:d?u?(0,_.jsxs)(IB,{panelsHidden:l,currentEntity:null!=(n=i.selectedHistory)?n:i.selected,regions:i.selected.regionStore,showComments:o.hasInterface("annotations:comments"),focusTab:o.commentStore.tooltipMessage?"comments":null,children:[c,o.hasInterface("topbar")&&(0,_.jsx)($D,{store:o})]}):(0,_.jsx)(Qz,{panelsHidden:l,currentEntity:null!=(r=i.selectedHistory)?r:i.selected,regions:i.selected.regionStore,children:c}):(0,_.jsxs)(_.Fragment,{children:[c,!1===l&&(0,_.jsx)(Ze.eB,{name:"menu",mod:{bsp:s.bottomSidePanel},children:o.hasInterface("side-column")&&(0,_.jsx)(NN,{children:(0,_.jsx)(ED,{store:o})})}),u&&o.hasInterface("topbar")&&(0,_.jsx)($D,{store:o})]})})]}),o.hasInterface("debug")&&(0,_.jsx)(ZD,{store:o})]})}}const tH=(0,y.PA)(eH),nH={CONFIG:class{static validate(e){const t=[];Dj(e,null,[],t);const n=["id","children","name","toname","controlledTags","parentTypes"],r=[];for(const e of t)try{const o=x.getModelByTag(e.type),i=Nj(e,o);null!==i&&r.push(i);const a=Vj(e,o,t);null!==a&&r.push(a);const s=zj(e,o);null!==s&&r.push(s),r.push(...Hj(e)),r.push(...Bj(e,o,n))}catch(t){r.push(Kj.unknownTag(e.type,e.name,e.type))}return r.length?r.map((e=>{return Object.assign({},e,{validType:(t=e.validType,t?((e,t=!0)=>{const n=e.describe().match(/([a-z0-9?|]+)/gi).join("").split("|");if(!1===t){const e=n.indexOf("null?");e>=0&&n.splice(e,1)}return n})(t,!1):null)});var t})):[]}},RESULT:{validate:()=>[]}},rH=Object.keys(nH).reduce(((e,t)=>Object.assign({},e,{[t]:t})),{}),oH=h.gK.union(h.gK.string,h.gK.array(h.gK.string)),iH=h.gK.model({modelName:h.gK.string,field:h.gK.string,error:h.gK.string,value:h.gK.maybeNull(h.gK.string),validType:h.gK.maybeNull(oH)}).views((e=>({get identifier(){return[e.modelName,e.field,e.error,e.value].concat(e.validType).filter((e=>null!==e)).join("-")}})));class aH{constructor(){this.callbacks=new Set}addErrorCallback(e){return!this.callbacks.has(e)&&(this.callbacks.add(e),!0)}removeErrorCallback(e){return!!this.callbacks.has(e)&&(this.callbacks.delete(e),!0)}validate(e,t){const n=nH[e];let r=[];var o;n?r=(null!=(o=n.validate(t))?o:[]).map((e=>{try{return iH.create(e)}catch(t){throw console.log({compiledError:e}),t}})):console.error(`Unknown validator: ${e}`);setTimeout((()=>{if(r.length)for(const e of this.callbacks)e(r)}),0)}}const sH=h.gK.model("StoreExtender",{sharedStores:h.gK.optional(h.gK.map(kI),{})}).actions((e=>({addSharedStore(t){e.sharedStores.set(t.id,t)},beforeReset(){e.sharedStores.forEach((e=>{(0,h.Yo)(e)})),e.sharedStores.clear()},afterReset(){OI.forEach((t=>{e.addSharedStore(t)}))},beforeDestroy(){e.sharedStores.forEach((e=>{(0,h.Yo)(e),(0,h.zr)(e)})),e.sharedStores.clear()}}))),lH=h.gK.compose("HistoryItem",EP,h.gK.model({comment:h.gK.optional(h.gK.maybeNull(h.gK.string),null),actionType:h.gK.optional(h.gK.maybeNull(h.gK.string),null)})).preProcessSnapshot((e=>{var t,n;return Object.assign({},e,{pk:E(),user:e.created_by,createdDate:e.created_at,actionType:null!=(t=null!=(n=e.action)?n:e.action_type)?t:e.actionType,readonly:!0,editable:!1})})),cH=h.gK.union(EP,lH),dH=h.gK.model("AnnotationStore",{selected:h.gK.maybeNull(h.gK.reference(cH)),selectedHistory:h.gK.maybeNull(h.gK.safeReference(cH)),root:Te.allModelsTypes(),names:h.gK.map(h.gK.reference(Te.allModelsTypes())),toNames:h.gK.map(h.gK.array(h.gK.reference(Te.allModelsTypes()))),annotations:h.gK.array(EP),predictions:h.gK.array(EP),history:h.gK.array(lH),viewingAllAnnotations:h.gK.optional(h.gK.boolean,!1),validation:h.gK.maybeNull(h.gK.array(iH))}).volatile((()=>({initialized:!1}))).views((e=>({get store(){return(0,h.Zn)(e)},get viewingAll(){return e.viewingAllAnnotations}}))).actions((e=>{function t(t,n,r=!0){e.viewingAllAnnotations=!1,e._unselectAll();const o=n.find((e=>e.id===t||e.pk===String(t)))||n[0];return o?(o.selected=!0,r&&(e.selectedHistory=null,e.history=[]),e.selected=o,o.updateObjects(),"annotation"===o.type&&o.setInitialValues(),o):null}function n(n,r={}){if(!e.annotations.length)return null;const{selected:o}=e,i=t(n,e.annotations,!r.retainHistory);return i.editable=!0,i.setupHotKeys(),(0,h._$)(e).events.invoke("selectAnnotation",i,o,null!=r?r:{}),i.pk&&(0,h.PA)(e).addAnnotationToTaskHistory(i.pk),i}function r(t){return t&&e.addErrors([Kj.generalError(t)]),e.root=CM.create({id:"error"})}function o(t){if(e.root)return;if(!t)return e.root=CM.create({id:"empty"});let n;try{n=D.treeToModel(t,e.store)}catch(e){return console.error(e),r(e)}const o=x.getModelByTag(n.type),i=x.objectTypes().map((e=>e.name.replace("Model","").toLowerCase())),a=[];e.validate(rH.CONFIG,n);try{e.root=o.create(n)}catch(e){return console.error(e),r(e)}if((0,O.VS)(O.cE)){const{names:t,toNames:n}=D.extractNames(e.root);return t.forEach((t=>e.names.put(t))),n.forEach(((t,n)=>e.toNames.set(n,t))),D.traverseTree(e.root,(t=>{e.store.task&&t.updateValue&&t.updateValue(e.store)})),e.initialized=!0,e.root}return D.traverseTree(e.root,(t=>{null!=t&&t.name&&(e.addName(t),i.includes(t.type)&&a.push(t.name));t.name&&!i.includes(t.type)&&!t.toname&&1===a.length&&(t.toname=a[0]),t&&t.toname&&e.upsertToName(t),e.store.task&&t.updateValue&&t.updateValue(e.store)})),e.initialized=!0,e.root}function i(t){const{user:n,config:r}=e.store;e.root||o(r);let i=t.pk||t.id;var a;"annotation"===t.type&&i&&isNaN(i)&&(i=null==(a=e.annotations)||null==(a=a[e.annotations.length-1])||null==(a=a.storedValue)?void 0:a.pk);const s=Object.assign({userGenerate:!1,createdDate:rn.UDate.currentISODate()},t,{id:E(5),pk:i&&String(i),root:e.root});return n&&!("createdBy"in s)&&(s.createdBy=n.displayName),t.user&&(s.user=t.user),s}const a=t=>{e.addErrors(t)};return{afterCreate:()=>{e._validator=new aH,e._validator.addErrorCallback(a)},beforeDestroy:()=>{e._validator.removeErrorCallback(a)},toggleViewingAllAnnotations:function(){e.viewingAllAnnotations=!e.viewingAllAnnotations,e.viewingAllAnnotations?(e.selected&&("annotation"===e.selected.type&&e.selected.saveDraftImmediately(),e.selected.unselectAll(),e.selected.selected=!1),e.annotations.forEach((e=>{e.editable=!1}))):n(e.annotations.at((0,O.VS)(O.F5)?-1:0).id,{fromViewAll:!0})},initRoot:o,addToName:function(t){e.toNames.set(t.toname,[t.name])},addName:function(t){e.names.put(t)},upsertToName:function(t){const n=e.toNames.get(t.toname);n?n.push(t.name):e.addToName(t)},addPrediction:function(t={}){t.editable=!1,t.type="prediction";const n=i(t);return(0,O.VS)(O.F5)?(e.predictions.push(n),e.predictions.at(-1)):(e.predictions.unshift(n),e.predictions[0])},addAnnotation:function(t={}){t.type="annotation";const n=i(t);if(n.userGenerate){var r,o,a;let t;if((0,O.VS)(O.K3)){const r=(0,w.emailFromCreatedBy)(n.createdBy),o=r&&e.store.users.find((e=>e.email===r));o&&(t=o.id)}n.completed_by=null!=(r=null!=(o=t)?o:null==(a=(0,h.Zn)(e).user)?void 0:a.id)?r:void 0}(0,O.VS)(O.F5)?e.annotations.push(n):e.annotations.unshift(n);const s=e.annotations.at((0,O.VS)(O.F5)?-1:0);return s.addVersions({result:t.result,draft:t.draft}),s},createAnnotation:function(t={userGenerate:!0}){const r=e.predictions.reduce(((e,t)=>[...e,...t._initialAnnotationObj.filter((e=>!1===e.interactive_mode)).map((e=>Object.assign({},e)))]),[]),o=e.addAnnotation(Object.assign({},t,{result:r}));if(r&&r.length){const e={};r.forEach((t=>{if("id"in t){const n=t.id.replace(/#.*$/,`#${o.id}`);e[t.id]=n,t.id=n}})),r.forEach((t=>{t.parent_id&&(e[t.parent_id]?t.parent_id=e[t.parent_id]:t.parent_id=null)})),n(o.id),o.deserializeAnnotation(r),o.reinitHistory()}else o.setDefaultValues();return o},addAnnotationFromPrediction:function(t){const r=t._initialAnnotationObj.map((e=>Object.assign({},e))),o=e.addAnnotation({userGenerate:!0,result:r}),i={};return r.forEach((e=>{if("id"in e){const t=e.id.replace(/#.*$/,`#${o.id}`);i[e.id]=t,e.id=t}})),r.forEach((e=>{e.parent_id&&(i[e.parent_id]?e.parent_id=i[e.parent_id]:e.parent_id=null)})),n(o.id),o.deserializeAnnotation(r),o.reinitHistory(),t.pk&&("prediction"===t.type?o.parent_prediction=Number.parseInt(t.pk):"annotation"===t.type&&(o.parent_annotation=Number.parseInt(t.pk))),o},addHistory:function(t={}){t.type="history";const n=i(t);return e.history.push(n),e.history[e.history.length-1]},clearHistory:function(){e.history.forEach((e=>(0,h.zr)(e))),e.history.length=0},selectHistory:function(t){e.selectedHistory=t,setTimeout((()=>{const n=null!=t?t:e.selected;Array.from(n.names.values()).filter((e=>e.isClassificationTag)).forEach((e=>e.updateFromResult([]))),null==n||n.results.filter((e=>e.area.classification)).forEach((e=>null==e.from_name.updateFromResult?void 0:e.from_name.updateFromResult(e.mainValue)))})),(0,h._$)(e).events.invoke("selectHistory",e.store,e.selected,e.selectedHistory)},addErrors:t=>{var n;const r=[],o=[...null!=(n=e.validation)?n:[],...t].reduce(((e,t)=>{const n=t.identifier;return r.indexOf(n)<0&&(r.push(n),e.push(t)),e}),[]);e.validation=o},validate:(t,n)=>e._validator.validate(t,n),selectAnnotation:n,selectPrediction:function(n){return t(n,e.predictions)},_selectItem:function(t){e._unselectAll(),t.editable=!1,t.selected=!0,e.selected=t,t.updateObjects()},_unselectAll:function(){e.selected&&(e.selected.unselectAll(),e.selected.selected=!1)},deleteAnnotation:function(t){(0,h._$)(e).events.invoke("deleteAnnotation",e.store,t),(0,h.zr)(t),e.clearDeletedParents(t),e.selected=null,e.annotations.length>0&&e.selectAnnotation(e.annotations[0].id)},clearDeletedParents:function(t){null!=t&&t.pk&&e.annotations.forEach((e=>{e.parent_annotation&&+e.parent_annotation==+t.pk&&(e.parent_annotation=null)}))},resetAnnotations:()=>{e.selected=null,e.selectedHistory=null,e.annotations=[],e.predictions=[],e.history=[]}}})),uH=h.gK.compose("AnnotationStore",dH,...(0,O.VS)(O.Ls)?[sH]:[]),hH=h.gK.model("Project",{id:h.gK.identifierNumber}).views((e=>({get app(){return(0,h.PA)(e)}}))),gH="SIDEPANEL_MODE_REGIONS",mH="SIDEPANEL_MODE_LABELS",pH=h.gK.model("SettingsModel",{enableHotkeys:h.gK.optional(h.gK.boolean,!0),enablePanelHotkeys:h.gK.optional(h.gK.boolean,!0),enableTooltips:h.gK.optional(h.gK.boolean,!1),enableLabelTooltips:h.gK.optional(h.gK.boolean,!0),continuousLabeling:!1,selectAfterCreate:!1,fullscreen:h.gK.optional(h.gK.boolean,!1),bottomSidePanel:h.gK.optional(h.gK.boolean,!1),sidePanelMode:h.gK.optional(h.gK.enumeration([gH,mH]),gH),imageFullSize:h.gK.optional(h.gK.boolean,!1),enableAutoSave:h.gK.optional(h.gK.boolean,!1),showLabels:h.gK.optional(h.gK.boolean,!1),showLineNumbers:!1,showAnnotationsPanel:h.gK.optional(h.gK.boolean,!0),showPredictionsPanel:h.gK.optional(h.gK.boolean,!0),preserveSelectedTool:h.gK.optional(h.gK.boolean,!0),enableSmoothing:h.gK.optional(h.gK.boolean,!0),videoHopSize:h.gK.optional(h.gK.number,10),isDestroying:h.gK.optional(h.gK.boolean,!1)}).views((e=>({get annotation(){return(0,h.Zn)(e).annotationStore.selected},get displayLabelsByDefault(){return e.sidePanelMode===mH}}))).actions((e=>({beforeDestroy(){e.isDestroying=!0},afterCreate(){try{const{localStorage:e}=window;if(!e)return}catch(e){return}const t="labelStudio:settings",n=localStorage.getItem(t);if(n){const t=JSON.parse(n);"object"==typeof t&&null!==t&&Object.keys(t).forEach((n=>{n in e&&(e[n]=t[n])}))}else{const t=(0,h._$)(e);Object.keys(SN).map((n=>{"boolean"==typeof t.settings[n]?e[n]=t.settings[n]:e[n]=SN[n].defaultValue}))}(0,h.aQ)(e,(n=>{setTimeout((()=>{e.isDestroying||localStorage.setItem(t,JSON.stringify(n))}))}))},toggleShowLabels(){e.showLabels=!e.showLabels,rn.HTML.toggleLabelsAndScores(e.showLabels)},toggleShowLineNumbers(){e.showLineNumbers=!e.showLineNumbers},toggleContinuousLabeling(){e.continuousLabeling=!e.continuousLabeling},toggleSelectAfterCreate(){e.selectAfterCreate=!e.selectAfterCreate},toggleSidepanelModel(){e.sidePanelMode=e.sidePanelMode===mH?gH:mH,e.annotation.regionStore.setView(e.displayLabelsByDefault?"labels":"regions")},toggleAutoSave(){e.enableAutoSave=!e.enableAutoSave},togglepreserveSelectedTool(){e.preserveSelectedTool=!e.preserveSelectedTool},toggleHotkeys(){e.enableHotkeys=!e.enableHotkeys,e.enableHotkeys?yr.setScope(yr.DEFAULT_SCOPE):yr.setScope("__none__")},togglePanelHotkeys(){e.enablePanelHotkeys=!e.enablePanelHotkeys},toggleTooltips(){e.enableTooltips=!e.enableTooltips},toggleFullscreen(){e.fullscreen=!e.fullscreen},toggleBottomSP(){e.bottomSidePanel=!e.bottomSidePanel},toggleImageFS(){e.imageFullSize=!e.imageFullSize},toggleLabelTooltips(){e.enableLabelTooltips=!e.enableLabelTooltips},toggleAnnotationsPanel(){e.showAnnotationsPanel=!e.showAnnotationsPanel},togglePredictionsPanel(){e.showPredictionsPanel=!e.showPredictionsPanel},toggleSmoothing(){e.enableSmoothing=!e.enableSmoothing},setSmoothing(t){e.enableSmoothing=t},setVideoHopSize(t){e.videoHopSize=t},setProperty(t,n){e[t]=n}}))),fH=h.gK.model({enable:h.gK.optional(h.gK.boolean,!1),username:h.gK.string,password:h.gK.string,to:h.gK.string}),vH=h.gK.model("Task",{id:h.gK.maybeNull(h.gK.number),load:h.gK.optional(h.gK.boolean,!1),auth:h.gK.maybeNull(fH),data:h.gK.maybeNull(h.gK.string),queue:h.gK.optional(h.gK.maybeNull(h.gK.string),null)}).views((e=>({get app(){return(0,h.PA)(e)},get dataObj(){return rn.Checkers.isStringJSON(e.data)?JSON.parse(e.data):"object"==typeof e.data?e.data:null}}))),yH=h.gK.model({controls:h.gK.frozen({})}).actions((e=>({addLabel(t,n){var r;const o={path:n,origin:"session"},i=[...null!=(r=e.controls[t])?r:[],o];e.controls=Object.assign({},e.controls,{[t]:i})},deleteLabel(t,n){if(!e.controls[t])return;const r=e.controls[t].filter((e=>e.path.length!==n.length||!e.path.every(((e,t)=>e===n[t]))));e.controls=Object.assign({},e.controls,{[t]:r})},init(t){const n={};for(const e in t)n[e]=t[e].map((e=>({origin:"user",path:e})));e.controls=n}}))),bH=h.gK.model("CustomButton",{id:h.gK.optional(h.gK.identifier,E),name:h.gK.string,title:h.gK.string,look:h.gK.maybe(h.gK.enumeration(["primary","danger","destructive","alt","outlined","active","disabled"])),tooltip:h.gK.maybe(h.gK.string),ariaLabel:h.gK.maybe(h.gK.string),disabled:h.gK.maybe(h.gK.boolean)}),xH=yr("AppStore","Global Hotkeys"),wH=h.gK.model("AppStore",{config:h.gK.string,task:h.gK.maybeNull(vH),project:h.gK.maybeNull(hH),taskHistory:h.gK.array(h.gK.model({taskId:h.gK.number,annotationId:h.gK.maybeNull(h.gK.string)}),[]),interfaces:h.gK.array(h.gK.string),explore:h.gK.optional(h.gK.boolean,!1),annotationStore:h.gK.optional(uH,{annotations:[],predictions:[],history:[]}),commentStore:h.gK.optional(sP,{comments:[]}),user:h.gK.optional(h.gK.maybeNull(h.gK.safeReference(nP)),null),debug:!0===window.HTX_DEBUG,settings:h.gK.optional(pH,{}),description:h.gK.maybeNull(h.gK.string),showingSettings:h.gK.optional(h.gK.boolean,!1),showingDescription:h.gK.optional(h.gK.boolean,!1),isLoading:h.gK.optional(h.gK.boolean,!1),isSubmitting:!1,noTask:h.gK.optional(h.gK.boolean,!1),noAccess:h.gK.optional(h.gK.boolean,!1),labeledSuccess:h.gK.optional(h.gK.boolean,!1),showComments:!1,_autoAnnotation:!1,_autoAcceptSuggestions:!1,awaitingSuggestions:!1,users:h.gK.optional(h.gK.array(nP),[]),userLabels:(0,O.VS)(O.RI)?h.gK.optional(yH,{controls:{}}):h.gK.undefined,queueTotal:h.gK.optional(h.gK.number,0),queuePosition:h.gK.optional(h.gK.number,0),commentClassificationConfig:h.gK.maybeNull(h.gK.string),customButtons:h.gK.map(h.gK.union(h.gK.string,bH,h.gK.array(h.gK.union(h.gK.string,bH))))}).preProcessSnapshot((e=>{if("number"!=typeof e.user){var t,n,r;const i=null!=(t=null!=(n=e.user)?n:null==(r=window.APP_SETTINGS)?void 0:r.user)?t:null;var o;if(i)e.user=i.id,e.users=null!=(o=e.users)&&o.length?[i,...e.users.filter((({id:e})=>e!==i.id))]:[i]}return Array.isArray(e.customButtons)&&(e.customButtons={_replace:e.customButtons}),Object.assign({},e,{_autoAnnotation:"true"===localStorage.getItem("autoAnnotation"),_autoAcceptSuggestions:"true"===localStorage.getItem("autoAcceptSuggestions")})})).volatile((()=>({version:"string"==typeof LSF_VERSION?LSF_VERSION:"0.0.0",initialized:!1,hydrated:!1,suggestionsRequest:null,simpleInit:(0,O.VS)(O.F5)}))).views((e=>({get events(){return(0,h._$)(e).events},get hasSegmentation(){return Array.from(e.annotationStore.names.values()).some((e=>!e.getAvailableStates&&!e.perRegionVisible))},get canGoNextTask(){if(e.task&&e.taskHistory&&e.taskHistory.length>1){const t=e.taskHistory[e.taskHistory.length-1].taskId;return e.task.id!==t}return!1},get canGoPrevTask(){if(e.task&&e.taskHistory&&e.taskHistory.length>1){const t=e.taskHistory[0].taskId;return e.task.id!==t}return!1},get forceAutoAnnotation(){return(0,h._$)(e).forceAutoAnnotation},get forceAutoAcceptSuggestions(){return(0,h._$)(e).forceAutoAcceptSuggestions},get autoAnnotation(){return e.forceAutoAnnotation||e._autoAnnotation},get autoAcceptSuggestions(){return e.forceAutoAcceptSuggestions||e._autoAcceptSuggestions}}))).actions((e=>{let t;function n(e,t="warning"){fn[t](e)}function r(t,r="Error during submit"){if(e.isSubmitting)return;e.setFlags({isSubmitting:!0});const o=t();e.commentStore.setAddedCommentThisSession(!1),Promise.race([Promise.all([o,(0,w.delay)(200)]),(0,w.delay)(5e3)]).catch((e=>{n((null==e?void 0:e.message)||e||r),console.error(e)})).then((()=>e.setFlags({isSubmitting:!1})))}return{setFlags:function(t){const n=["showingSettings","showingDescription","isLoading","isSubmitting","noTask","noAccess","labeledSuccess","awaitingSuggestions"];for(const r of n)r in t&&(e[r]=t[r])},addInterface:function(t){return e.interfaces.push(t)},hasInterface:function(...t){return void 0!==e.interfaces.find((e=>t.includes(e)))},toggleInterface:function(t,n){const r=e.interfaces.indexOf(t);if(null!=n?n:r<0)r<0&&e.interfaces.push(t);else{if(r<0)return;e.interfaces.splice(r,1)}},afterCreate:function(){RR.setRoot(e),window.Htx=e,e.attachHotkeys(),(0,h._$)(e).events.invoke("labelStudioLoad",e)},assignTask:function(t){t&&!rn.Checkers.isString(t.data)&&(t=Object.assign({},t,{data:JSON.stringify(t.data)})),e.task=vH.create(t),e.taskHistory.some((t=>t.taskId===e.task.id))||e.taskHistory.push({taskId:e.task.id,annotationId:null})},assignConfig:function(t){const n=e.annotationStore;e.config=t,n.initRoot(e.config)},resetState:function(){RR.removeAllTools(),yr.unbindAll(),e.attachHotkeys();const t=e.annotationStore;t&&(null==t.beforeReset||t.beforeReset(),(0,O.VS)(O.C8)&&TI(),(0,h.Yo)(t),(0,h.zr)(t)),e.annotationStore=uH.create({annotations:[]}),e.initialized=!1},resetAnnotationStore:function(){const t=e.annotationStore;t&&(null==t.beforeReset||t.beforeReset(),null==t.resetAnnotations||t.resetAnnotations())},initializeStore:function({annotations:n=[],completions:r=[],predictions:o=[],annotationHistory:i}){const a=e.annotationStore;var s,l;if(null==a.afterReset||a.afterReset(),a.initialized||(a.initRoot(e.config),!(0,O.VS)(O.SM)||null!=(s=t)&&s.isRendered()||null==(l=t)||l.render()),e.simpleInit){window.STORE_INIT_OK=!1,o.forEach((e=>{const t=a.addPrediction(e),n=e.result.map((e=>Object.assign({},e,{origin:"prediction"})));t.deserializeResults(n,{hidden:!0})})),[...r,...n].forEach((e=>{a.addAnnotation(e).deserializeResults(e.draft||e.result,{hidden:!0})})),window.STORE_INIT_OK=!0,console.log("LSF: deserialization is finished");const e=a.annotations.at(-1),t=!e&&a.predictions.at(-1);e?(a.selectAnnotation(e.id),e.reinitHistory()):t&&a.selectPrediction(t.id)}else{var c;(null!=o?o:[]).forEach((e=>{const t=a.addPrediction(e);a.selectPrediction(t.id),t.deserializeResults(e.result.map((e=>Object.assign({},e,{origin:"prediction"}))))})),null==(c=[...null!=r?r:[],...null!=n?n:[]])||c.forEach((e=>{const t=a.addAnnotation(e);a.selectAnnotation(t.id),t.deserializeResults(e.draft||e.result),t.reinitHistory()}));const t=a.annotations.at(-1);t&&t.setInitialValues(),e.setHistory(i)}e.initialized||(e.initialized=!0,(0,h._$)(e).events.invoke("storageInitialized",e))},setHistory:function(t=[]){var n;const r=e.annotationStore;r.clearHistory(),t.length&&null!=(n=r.selected)&&n.pk&&Number(r.selected.pk)===Number(t[0].annotation_id)&&(null!=t?t:[]).forEach((e=>{var t;r.addHistory(e).deserializeResults(null!=(t=e.result)?t:[],{hidden:!0})}))},attachHotkeys:function(){xH.unbindAll(),e.hasInterface("submit","update","review")&&xH.addNamed("annotation:submit",(()=>{const t=e.annotationStore,n=e.hasInterface("annotations:deny-empty"),r=t.selected,o=0===r.results.length,i=e.hasInterface("review")||r.canBeReviewed,a=!i&&(0,w.isDefined)(r.pk),s=!r.history.canUndo&&!r.draftId,l=(0,O.VS)(O.I8)&&a&&s;n&&o||t.viewingAll||l||(null==r||r.submissionInProgress(),i?e.acceptAnnotation():!a&&e.hasInterface("submit")?e.submitAnnotation():e.hasInterface("update")&&e.updateAnnotation())})),e.hasInterface("skip","review")&&xH.addNamed("annotation:skip",(()=>{if(e.annotationStore.viewingAll)return;const t=e.annotationStore.selected;null==t||t.submissionInProgress(),e.hasInterface("review")?e.rejectAnnotation():e.skipTask()})),xH.addNamed("region:delete-all",(()=>{const{selected:t}=e.annotationStore;window.confirm((0,h._$)(e).messages.CONFIRM_TO_DELETE_ALL_REGIONS)&&t.deleteAllRegions()})),xH.addNamed("region:relation",(()=>{const t=e.annotationStore.selected;t&&t.highlightedNode&&!t.isLinkingMode&&t.startLinkingMode(F,t.highlightedNode)})),xH.addNamed("region:focus",(t=>{t.preventDefault();const n=e.annotationStore.selected;n&&n.highlightedNode&&!n.isLinkingMode&&n.highlightedNode.requestPerRegionFocus()})),xH.addNamed("region:unselect",(()=>{const t=e.annotationStore.selected;!t||t.isLinkingMode||t.isDrawing||(e.annotationStore.history.forEach((e=>{e.unselectAll()})),t.unselectAll())})),xH.addNamed("region:visibility",(()=>{const t=e.annotationStore.selected;t&&!t.isLinkingMode&&t.hideSelectedRegions()})),xH.addNamed("region:visibility-all",(()=>{const{selected:t}=e.annotationStore;t.regionStore.toggleVisibility()})),xH.addNamed("annotation:undo",(()=>{const t=e.annotationStore.selected;t.isDrawing||t.undo()})),xH.addNamed("annotation:redo",(()=>{const t=e.annotationStore.selected;t.isDrawing||t.redo()})),xH.addNamed("region:exit",(()=>{const t=e.annotationStore.selected;t&&t.isLinkingMode?t.stopLinkingMode():t.isDrawing||t.unselectAll()})),xH.addNamed("region:delete",(()=>{const t=e.annotationStore.selected;t&&t.deleteSelectedRegions()})),xH.addNamed("region:cycle",(()=>{const t=e.annotationStore.selected;t&&t.regionStore.selectNext()})),xH.addNamed("region:duplicate",(t=>{const{selected:n}=e.annotationStore,{serializedSelection:r}=n||{};if(null==r||!r.length)return;t.preventDefault();const o=n.appendResults(r);n.selectAreas(o)}))},skipTask:function(t){e.isSubmitting||r((()=>{(0,h._$)(e).events.invoke("skipTask",e,t),e.incrementQueuePosition()}),"Error during skip, try again")},unskipTask:function(){e.isSubmitting||r((()=>{(0,h._$)(e).events.invoke("unskipTask",e)}),"Error during cancel skipping task, try again")},setTaskHistory:function(t){e.taskHistory=t},submitDraft:function(t,n={}){return new Promise((r=>{const o=(0,h._$)(e).events;if(!o.hasEvent("submitDraft"))return r();const i=o.invokeFirst("submitDraft",e,t,n);i&&i.then?i.then(r):r(i)}))},waitForDraftSubmission:function(){return new Promise((t=>{e.annotationStore.selected.isDraftSaving||t();const n=setInterval((()=>{e.annotationStore.selected.isDraftSaving||(clearInterval(n),t())}),100)}))},submitAnnotation:function(){if(e.isSubmitting)return;const t=e.annotationStore.selected,n=t.exists?"updateAnnotation":"submitAnnotation";t.beforeSend(),t.validate()&&((0,O.VS)(O.Bg)||t.sendUserGenerate(),r((async()=>{if((0,O.VS)(O.Bg)){await e.waitForDraftSubmission();const r=await(0,h._$)(e).events.invoke("beforeSaveAnnotation",e,t,{event:n});if(r&&r.some((e=>!1===e)))return;t.sendUserGenerate()}await(0,h._$)(e).events.invoke(n,e,t),e.incrementQueuePosition(),(0,O.VS)(O.Bg)&&t.dropDraft()})),(0,O.VS)(O.Bg)||t.dropDraft())},updateAnnotation:function(t){if(e.isSubmitting)return;const n=e.annotationStore.selected;n.beforeSend(),n.validate()&&(r((async()=>{if((0,O.VS)(O.Bg)){const t=await(0,h._$)(e).events.invoke("beforeSaveAnnotation",e,n,{event:"updateAnnotation"});if(t&&t.some((e=>!1===e)))return}await(0,h._$)(e).events.invoke("updateAnnotation",e,n,t),e.incrementQueuePosition(),(0,O.VS)(O.Bg)&&(n.dropDraft(),!n.sentUserGenerate&&n.sendUserGenerate())})),(0,O.VS)(O.Bg)||(n.dropDraft(),!n.sentUserGenerate&&n.sendUserGenerate()))},acceptAnnotation:function(){e.isSubmitting||r((async()=>{const t=e.annotationStore.selected;if(t.beforeSend(),!t.validate())return;if((0,O.VS)(O.Bg)){const n=await(0,h._$)(e).events.invoke("beforeSaveAnnotation",e,t,{event:"acceptAnnotation"});if(n&&n.some((e=>!1===e)))return}const n=t.history.canUndo;t.dropDraft(),await(0,h._$)(e).events.invoke("acceptAnnotation",e,{isDirty:n,entity:t}),e.incrementQueuePosition()}),"Error during accept, try again")},rejectAnnotation:function({comment:t=null}){e.isSubmitting||r((async()=>{const n=e.annotationStore.selected;if(n.beforeSend(),!n.validate())return;if((0,O.VS)(O.Bg)){const t=await(0,h._$)(e).events.invoke("beforeSaveAnnotation",e,n,{event:"rejectAnnotation"});if(t&&t.some((e=>!1===e)))return}const r=n.history.canUndo;n.dropDraft(),await(0,h._$)(e).events.invoke("rejectAnnotation",e,{isDirty:r,entity:n,comment:t}),e.incrementQueuePosition(-1)}),"Error during reject, try again")},handleCustomButton:function(t){e.isSubmitting||r((async()=>{const n=e.annotationStore.selected;n.beforeSend();const r=n.history.canUndo;await(0,h._$)(e).events.invoke("customButton",e,t,{isDirty:r,entity:n}),e.incrementQueuePosition(),n.dropDraft()}),`Error during handling ${t} button, try again`)},presignUrlForProject:async function(t){const n=await e.events.invoke("presignUrlForProject",e,t);return null==n?void 0:n[0]},setUsers:function(t){e.users.replace(t)},mergeUsers:function(t){e.setUsers(QT()([...(0,h.dV)(e.users),...t],"id"))},enrichUsers:function(t){const n=(0,h.dV)(e.users),r={};n.forEach((e=>{r[e.id]=e}));const o=t.map((e=>Object.assign({},r[e.id],e)));e.setUsers(QT()([...o,...n],"id"))},showModal:n,toggleComments:function(t){return e.showComments=t},toggleSettings:function(){e.showingSettings=!e.showingSettings},toggleDescription:function(){e.showingDescription=!e.showingDescription},setAutoAnnotation:t=>{e._autoAnnotation=t,localStorage.setItem("autoAnnotation",t)},setAutoAcceptSuggestions:t=>{e._autoAcceptSuggestions=t,localStorage.setItem("autoAcceptSuggestions",t)},loadSuggestions:(0,h.L3)((function*(t,n){const r=E();e.suggestionsRequest=r,e.setFlags({awaitingSuggestions:!0});try{const o=yield t;r===e.suggestionsRequest&&(e.annotationStore.selected.setSuggestions(n(o)),e.setFlags({awaitingSuggestions:!1}))}catch(t){e.setFlags({awaitingSuggestions:!1})}})),addAnnotationToTaskHistory:function(t){const n=e.taskHistory.findIndex((({taskId:t})=>t===e.task.id));n>=0&&(e.taskHistory[n].annotationId=t)},nextTask:function(){if(e.canGoNextTask){const{taskId:t,annotationId:n}=e.taskHistory[e.taskHistory.findIndex((t=>t.taskId===e.task.id))+1];(0,h._$)(e).events.invoke("nextTask",t,n),e.incrementQueuePosition()}},prevTask:function(t,n=!1){const r=n?e.taskHistory.length-1:e.taskHistory.findIndex((t=>t.taskId===e.task.id))-1;if(e.canGoPrevTask||n){const{taskId:t,annotationId:n}=e.taskHistory[r];(0,h._$)(e).events.invoke("prevTask",t,n),e.incrementQueuePosition(-1)}},postponeTask:async function(){const t=e.annotationStore.selected;await t.saveDraft({was_postponed:!0}),await(0,h._$)(e).events.invoke("nextTask"),e.incrementQueuePosition()},incrementQueuePosition:function(t=1){e.queuePosition=(0,w.clamp)(e.queuePosition+t,1,e.queueTotal)},beforeDestroy(){RR.removeAllTools(),t=null},setAppControls:function(e){t=e},clearApp:function(){var e;null==(e=t)||e.clear()},renderApp:function(){var e;null==(e=t)||e.render()},selfDestroy(){const t=[];let n;for((0,h.GG)(e,(n=>{(0,h.jX)(n)||(0,h.PA)(n)!==e||t.push(n)}));n=t.shift();)try{(0,h.zr)(n)}catch(e){console.log("Problem: ",e)}}}})),CH=async(e,t)=>{var r,o,i,a,s,l,c,d,u;null!=(r=e.options)&&r.secureMode&&(window.LS_SECURE_MODE=!0);const h=await(async()=>(await n.e(99).then(n.bind(n,64099))).default)();if(null!=(o=e=Object.assign({},e))&&o.config||!h.getExample)null!=(i=e)&&i.task&&(e.task=h.getData(e.task));else{const{task:t,config:n}=await h.getExample();e.config=n,e.task=t}null!=(a=e.task)&&a.id&&(e.taskHistory=[{taskId:e.task.id,annotationId:null}]);const g=wH.create(e,Object.assign({},h.configureApplication(e),{events:t}));return g.initializeStore(Object.assign({},null!=(s=e.task)?s:{},{hydrated:null==(l=null==(c=e)?void 0:c.hydrated)||l,users:null!=(d=e.users)?d:[],annotationHistory:null!=(u=e.history)?u:[]})),{store:g,getRoot:h.rootElement}};class SH extends p.Component{constructor(...e){super(...e),this.state={initialized:!1}}componentDidMount(){CH(this.props).then((({store:e})=>{this.store=e,window.Htx=this.store,this.setState({initialized:!0})}))}componentDidUpdate(e){this.props.task!==e.task&&(this.store.resetState(),this.store.assignTask(this.props.task),this.store.initializeStore(this.props.task))}render(){return this.state.initialized?(0,_.jsx)(tH,{store:this.store}):null}}var jH=n(30997);const kH={interfaces:["panel","update","submit","skip","controls","infobar","topbar","instruction","side-column","annotations:history","annotations:tabs","annotations:menu","annotations:current","annotations:add-new","annotations:delete","annotations:view-all","predictions:tabs","predictions:menu","auto-annotation","edit-history"]};class OH{constructor(){this.events=new Map}on(e,t){const n=this.getEventMap(e);n.has(t)||n.add(t)}off(e,t){const n=this.getEventMap(e);n.has(t)&&n.delete(t)}removeAll(e){this.getEventMap(e).clear()}invoke(e,...t){const n=this.getEventMap(e);if(n.size>0)return Promise.all([...n].map((e=>e(...t))))}invokeFirst(e,...t){const n=this.getEventMap(e);if(n.size>0){return Array.from(n)[0](...t)}}hasEvent(e){return this.getEventMap(e).size>0}getEventMap(e){let t;return this.events.has(e)?t=this.events.get(e):(t=new Set,this.events.set(e,t)),t}}(0,u.jK)({isolateGlobalState:!0});class RH{static destroyAll(){RH.instances.forEach((e=>null==e.destroy?void 0:e.destroy())),RH.instances.clear()}getRootElement(e){let t=null;if(t="string"==typeof e?document.getElementById(e):e,!t)throw new Error(`Root element not found (selector: ${e})`);return t}constructor(e,t={}){this.options=void 0,this.root=void 0,this.store=void 0,this.destroy=()=>{},this.events=new OH;const n=Object.assign({},kH,t);n.keymap&&yr.setKeymap(n.keymap),this.root=e,this.options=n,this.supportLegacyEvents(),this.createApp(),RH.instances.add(this)}on(e,t){this.events.on(e,t)}off(e,t){(0,w.isDefined)(t)?this.events.off(e,t):this.events.removeAll(e)}async createApp(){const{store:e}=await CH(this.options,this.events),t=this.getRootElement(this.root);this.store=e,window.Htx=this.store;const n=!1,r=()=>{(0,g.render)((0,_.jsx)(tH,{store:this.store}),t)},o=()=>{var e;if(null==(e=t.childNodes)||!e.length)return;const n=[...t.childNodes],r=IM(n[0]);(0,g.unmountComponentAtNode)(t),LM(n,r),LM([t],r)};r(),e.setAppControls({isRendered:()=>n,render:r,clear:o}),this.destroy=()=>{(0,O.VS)(O.SM)&&o(),TI(),(0,O.VS)(O.SM)&&this.store.selfDestroy(),(0,h.zr)(this.store),yr.unbindAll(),(0,O.VS)(O.SM)&&(this.store=null,this.destroy=null,RH.instances.delete(this))}}supportLegacyEvents(){Object.keys(jH.A).forEach((e=>{const t=this.options[e];if((0,w.isDefined)(t)){const n=(0,m.toCamelCase)(e.replace(/^on/,""));this.events.on(n,t)}}))}}RH.Component=SH,RH.instances=new Set,window.LabelStudio=RH;const EH=RH},50494:(e,t,n)=>{"use strict";n.d(t,{JE:()=>d,KE:()=>g,Sl:()=>h,cn:()=>c,eB:()=>u});var r=n(73033),o=n(14041);const i=["tag","name","mod","mix"],a=["tag","component","block","name","mod","mix"];const s=null!="lsf-"?"lsf-":"dm-",l=(0,o.createContext)(null),c=(e,t={})=>{const{elem:n,mix:r,mod:o}=null!=t?t:{},i=e,a={block:e=>c(e,{elem:n,mix:r,mod:o}),elem:t=>c(e,{elem:t,mix:r,mod:o}),mod(t={}){const a=Object.assign({},null!=o?o:{},t);return c(null!=e?e:i,{elem:n,mix:r,mod:a})},mix:(...t)=>c(e,{elem:n,mix:t,mod:o}),select(e=document){return e.querySelector(this.toCSSSelector())},selectAll(e=document){return e.querySelectorAll(this.toCSSSelector())},closest(e){return e.closest(this.toCSSSelector())},toString:()=>((e,t,n,r)=>{const o=e,i=t?`${o}__${t}`:null,a=Object.entries(null!=r?r:{}).reduce(((e,[t,n])=>{const r=[null!=i?i:o];return null==n||!1!==n&&(r.push(t),!0!==n&&r.push(n),e.push(r.join("_"))),e}),[]),l=[];if(l.push(null!=i?i:o),l.push(...a),n){const e=Array.isArray(n)?n:[n],t=[].concat(...e).filter((e=>"string"==typeof e?""!==e.trim():null!=e)).map((e=>"string"==typeof e?e:null==e||null==e.toClassName?void 0:e.toClassName())).reduce(((e,t)=>[...e,...t.split(/\s+/)]),[]);l.push(...Array.from(new Set(t)))}return l.map((e=>("string"!=typeof e&&console.error("Non-string classname: ",e),String(e).startsWith(s)?e:`${s}${e}`))).join(" ")})(e,n,r,o),toClassName(){return this.toString()},toCSSSelector(){return`.${this.toClassName().replace(/(\s+)/g,".")}`}};return Object.defineProperty(a,"Block",{value:u}),Object.defineProperty(a,"Elem",{value:h}),Object.defineProperty(a,"__class",{value:{block:e,elem:n,mix:r,mod:o}}),a},d=e=>{const t=null!=e?e:(0,o.createContext)(null),n=(0,o.forwardRef)(((e,n)=>{let{tag:a="div",name:s,mod:l,mix:d}=e,u=(0,r.A)(e,i);const h=c(s),g=[].concat(d).filter((e=>!!e)),m=h.mod(l).mix(...g,u.className).toClassName(),p=Object.assign({},u,{ref:n,className:m});return(0,o.createElement)(t.Provider,{value:h},(0,o.createElement)(a,p))})),s=(0,o.forwardRef)(((e,n)=>{let{tag:i="div",component:s,block:l,name:d,mod:u,mix:h}=e,g=(0,r.A)(e,a);const m=(0,o.useContext)(t),p=[].concat(h).filter((e=>!!e)),f=(l?c(l):m).elem(d).mod(u).mix(...p,g.className).toClassName(),v=Object.assign({},g,{ref:n,className:f});return"string"!=typeof i&&(v.block=m),s&&(v.tag=i),(0,o.createElement)(null!=s?s:i,v)}));return n.displayName="Block",s.displayName="Elem",{Block:n,Elem:s,Context:t}},{Block:u,Elem:h}=d(l),g=()=>(0,o.useContext)(l)},78438:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(83960),o=n(75696),i=n.n(o),a=n(47895),s=n(72902),l=n(84826);function c(e,t,n,r,o,a){const[s,l,c]=i()(o).rgb(),d=e.getImageData(0,0,n,r),u=new ArrayBuffer(n*r*4),h=new Uint32Array(u),g=new Uint8ClampedArray(u),m=function(){const e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=170,t[1]=187,48042===n[0])return"little endian";if(43707===n[0])return"big endian";return console.error("Can not determine platform endianness, assuming little endian"),"little endian"}();let p,f,v;"little endian"===m?p=255<<24|c<<16|l<<8|s:"big endian"===m?p=s<<24|l<<16|c<<8|255:(console.error(`Unknown platform endianness (${m}), assuming little endian`),p=255<<24|c<<16|l<<8|s);const y=a;for(v=0;v<=r;v++)for(f=0;f<=n;f++){const e=v*n+f;t[e*y]&&(h[e]=p)}d.data.set(g),e.putImageData(d,0,0)}const d={Region2RLE:function(e){var t;if((0,l.VS)(l.gF))return function(e){const{naturalWidth:t,naturalHeight:n}=e.currentImageEntity,o=document.createElement("canvas");o.width=t,o.height=n,o.style.setProperty("position","absolute"),o.style.setProperty("bottom","200%"),o.style.setProperty("right","200%"),o.style.setProperty("opacity","0");const i=o.getContext("2d");if(document.body.appendChild(o),e.rle&&e.rle.length>0){const o=i.createImageData(t,n);o.data.set((0,r.D)(e.rle)),i.putImageData(o,0,0)}const a=null==e.getMaskImage?void 0:e.getMaskImage();a&&i.drawImage(a,0,0),e.touches.length>0&&e.touches.forEach((e=>{const{relativePoints:r}=e.toJSON(),o=(e,r)=>[t*(e/100),n*(r/100)];i.save(),i.beginPath(),i.moveTo(...o(r[0],r[1]));for(let e=0;e{const o=document.createElement("img");o.onload=()=>{const e=document.createElement("canvas"),r=o.width,i=o.height;e.width=r,e.height=i;const a=e.getContext("2d");a.drawImage(o,0,0);const s=a.getImageData(0,0,r,i);c(a,s.data,r,i,t,4),o.src=e.toDataURL(),n(o)},o.src=e}))},brushSizeCircle:function(e){const t=document.createElement("canvas"),n=t.getContext("2d"),r=4*e+8,o=e/2+4,i=e/2;return t.width=r,t.height=r,n.beginPath(),n.arc(o,o,i,0,2*Math.PI,!1),n.lineWidth=3,n.strokeStyle="black",n.stroke(),n.beginPath(),n.arc(o,o,i,0,2*Math.PI,!1),n.lineWidth=2,n.strokeStyle="white",n.stroke(),t.toDataURL()},labelToSVG:(()=>{const e={};return({label:t,score:n})=>{let r=t;if(null!==n&&(r+=n),r in e)return e[r];let o=0;const i=[];if(null!=n){const e=s.getScaleGradient(n);i.push(``),i.push(`${n.toFixed(2)}`),o+=26}t&&(i.push(`${t}`),o=o+function(e){const t=document.createElement("svg"),n=document.createElement("text");n.style="font-size: 9.5px; font-weight: bold; color: red; fill: red; font-family: var(--font-mono);",n.innerHTML=e,t.appendChild(n),document.body.appendChild(t);const r=n.getBoundingClientRect().width;return t.remove(),r}(t)+2);const a=`${i.join("")}`,l=`'data:image/svg+xml,${a.replace(/\s{2,}/g," ").replace(/[\r\n%#()<>?[\\\]^`{|}]/g,encodeURIComponent)}'`;return e[r]=l,l}})(),trim:e=>{var t,n;let r,o=e.width,i=e.height;const a=e.getContext("2d"),s={top:null,left:null,right:null,bottom:null};try{r=document.createElement("canvas").getContext("2d");const t=a.getImageData(0,0,e.width,e.height),n=t.data.length;let l,c,d;for(l=0;l{"use strict";n.r(t),n.d(t,{colorToRGBA:()=>u,colorToRGBAArray:()=>y,contrastColor:()=>v,convertToRGBA:()=>h,getScaleGradient:()=>p,hexToRGBA:()=>d,over:()=>w,removeAlpha:()=>f,rgbArrayToHex:()=>b,rgbaArrayToRGBA:()=>x,rgbaChangeAlpha:()=>m,stringToColor:()=>g});var r=n(75696),o=n.n(r);const i=["#c22525","#c13025","#bf3b24","#be4624","#bc5124","#bb5b23","#ba6623","#b87023","#b77a22","#b58422","#b48d22","#b39722","#b1a021","#b0aa21","#aaae21","#9ead20","#93ab20","#87aa20","#7ca91f","#71a71f","#66a61f","#5ba41e","#51a31e","#46a21e","#3ca01e","#329f1d","#289d1d","#1e9c1d","#1c9a24","#1c992d","#1c992d"],a={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},s=/^rgba\((25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*(?:,\s*([01]\.?\d*?))\)$/,l=/^rgb\((25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*\)$/;function c(e){const t=[0,0,0];return e&&4===e.length?(t[0]=`0x${e[1]}${e[1]}`,t[1]=`0x${e[2]}${e[2]}`,t[2]=`0x${e[3]}${e[3]}`):e&&7===e.length&&(t[0]=`0x${e[1]}${e[2]}`,t[1]=`0x${e[3]}${e[4]}`,t[2]=`0x${e[5]}${e[6]}`),t.map((e=>+e))}function d(e,t){const n=c(e);let r=.3;return"number"==typeof Number.parseInt(t)&&(r=t),`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${r})`}function u(e,t){if("string"==typeof e){return d(a[e.toLowerCase()],t)}return e}function h(e,t){const n=y(e);return n[3]=Number(t)===t?t:n[3],x(n)}function g(e){let t=0;for(let n=0;n>8*e&255).toString(16)}`.substr(-2)}return n}function m(e,t){return e.replace(/[\d\.]+\)$/g,`${t})`)}function p(e){return i[Math.ceil(30*e)]}const f=(e,t,n,r,o=[255,255,255,1])=>{const i=[];return i[3]=1-(1-r)*(1-o[3]),i[0]=Math.round(e*r/i[3]+o[0]*o[3]*(1-r)/i[3]),i[1]=Math.round(t*r/i[3]+o[1]*o[3]*(1-r)/i[3]),i[2]=Math.round(n*r/i[3]+o[2]*o[3]*(1-r)/i[3]),i},v=e=>{const[t,n,r]=f(...e.match(/([0-9.]{1,3})/g).map(Number));return(299*t+587*n+114*r)/1e3>=128?"rgb(0,0,0)":"rgb(255,255,255)"};function y(e){if(e){if("#"===e.charAt(0)){const t=c(e);return t.push(1),t}let t;if(t=s.exec(e))return t.slice(1,5).map((e=>+e));if(t=l.exec(e)){const e=t.slice(1,4);return e.push(1),e.map((e=>+e))}if("string"==typeof e){const t=c(a[e.toLowerCase()]);return t.push(1),t}}return[0,0,0,1]}function b(e){const t=e.slice(0,3).map((e=>(256|e).toString(16).slice(1)));return t.unshift("#"),t.join("")}function x(e){return`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${e[3]})`}function w(e,t="white"){e=o()(e),t=o()(t);const n=e.alpha(),r=t.alpha()*(1-n),i=n+r,a=t.rgb()||[];return o()([...e.rgb().map(((e,t)=>(n*e+r*a[t])/i)),i])}},84826:(e,t,n)=>{"use strict";var r,o,i,a;n.d(t,{$b:()=>l,Bg:()=>he,C8:()=>J,CZ:()=>q,Cw:()=>m,Er:()=>F,F2:()=>V,F5:()=>se,Fk:()=>ae,Gd:()=>x,H:()=>C,I8:()=>ue,JO:()=>ge,K3:()=>w,Kg:()=>ee,LE:()=>s,LG:()=>M,Lk:()=>g,Ls:()=>O,M3:()=>D,MV:()=>T,P2:()=>oe,PR:()=>S,RI:()=>d,SM:()=>W,TJ:()=>Y,TU:()=>b,VS:()=>fe,Zr:()=>R,_m:()=>ne,aT:()=>j,bA:()=>E,bP:()=>I,bT:()=>h,c0:()=>P,cE:()=>k,dY:()=>G,eB:()=>H,fw:()=>f,gF:()=>N,id:()=>v,jS:()=>K,oh:()=>_,ow:()=>L,pG:()=>le,pN:()=>ce,q$:()=>X,q_:()=>Z,sI:()=>$,sg:()=>u,tz:()=>A,um:()=>re,up:()=>Q,v1:()=>me,vS:()=>y,vz:()=>p,x0:()=>c,xB:()=>de,xD:()=>ie,xS:()=>U,y8:()=>B,yD:()=>te,yP:()=>z});const s="ff_front_1170_outliner_030222_short",l="fflag_fix_front_dev_1284_auto_detect_undo_281022_short",c="ff_front_dev_1442_unselect_shape_on_click_outside_080622_short",d="ff_front_dev_1536_taxonomy_user_labels_150222_long",u="ff_front_DEV_1713_audio_ui_150222_short",h="ff_dev_2128_html_in_labels_150422_short",g="ff_front_dev_2290_draft_in_annotation_history_short",m="ff_front_dev_2431_delete_polygon_points_080622_short",p="ff_front_dev_2432_auto_save_polygon_draft_210622_short",f="ff_front_dev_2669_paragraph_author_filter_210622_short",v="ff_front_dev_2671_anchor_rotate_bbox_010722_short",y="ff_front_dev_2715_audio_3_280722_short",b="fflag_feat_dev_2755_regions_list_grouped_by_labels_with_ordered_collapse_short",x="fflag_fix_front_dev_2918_labeling_filtered_paragraphs_250822_short",w="fflag-feat-dev-3034-comments-with-drafts-short",C="fflag_feat_front_dev_3077_repeater_tag_loading_performance_short",S="fflag_fix_front_dev_3350_restrict_drawing_area_short",j="fflag_fix_front_dev_3377_image_regions_shift_on_resize_280922_short",k="fflag_fix_front_dev_3391_interactive_view_all",O="fflag_fix_front_dev_3617_taxonomy_memory_leaks_fix",R="fflag_fix_front_dev_3666_max_usages_on_region_creation_171122_short",E="fflag_feat_front_dev_3873_labeling_ui_improvements_short",_="fflag_feat_front_lsdv_3025_outliner_filter_short",A="fflag_fix_front_dev_3730_shortcuts_initial_input_22122022_short",T="fflag_fix_front_dev_3793_relative_coords_short",P="fflag_fix_front_dev_4075_taxonomy_overlap_281222_short",I="fflag_feat_front_dev_4081_magic_wand_tool",L="fflag_fix_back_dev_4174_overlap_issue_experiments_10012023_short",M="fflag_feat_front_lsdv_e_278_contextual_scrolling_short",K="fflag_feat_all_lsdv_e_294_llm_annotations_180723_long",D="fflag_fix_font_lsdv_1148_hotkeys_namespaces_01022023_short",N="fflag_feat_front_lsdv_4583_multi_image_segmentation_short",V="fflag_feat_front_lsdv_4583_6_images_preloading_short",z="fflag_fix_font_lsdv_3009_draft_saving_stuck_130223_short",B="fflag_fix_front_lsdv_4600_lead_time_27072023_short",H="fflag_feat_front_lsdv_4659_skipduplicates_060323_short",F="fflag_feat_front_lsdv_4620_richtext_opimization_060423_short",W="fflag_fix_front_lsdv_4620_memory_leaks_100723_short",$="fflag_feat_front_lsdv_4620_outliner_optimization_310723_short",U="fflag_fix_all_lsdv_4711_cors_errors_accessing_task_data_short",Z="fflag_feat_front_lsdv_4712_skipduplicates_editing_110423_short",G="fflag_fix_front_lsdv_4881_timeseries_points_missing_140423_short",Y="fflag_fix_front_lsdv_4988_dynamic_no_label_120523_short",X="fflag_fix_front_lsdv_4930_selection_tool_fixes_240423_short",q="fflag_fix_front_lsdv_4992_hide_all_regions_04052023_short",J="fflag_fix_front_lsdv_4998_missed_dynamic_children_030523_short",Q="fflag_feat_front_prod_309_choice_hint_080523_short",ee="fflag_fix_front_lsdv_5248_double_click_delay_280823_short",te="fflag_feat_front_lsdv_5451_async_taxonomy_110823_short",ne="fflag_fix_front_leap_218_improve_performance_of_taxonomy_search_short",re="fflag_feat_front_lsdv_5452_taxonomy_labeling_110823_short",oe="fflag_fix_all_optic_79_task_count_is_wrong_short",ie="fflag_fix_front_leap_149_taxonomy_selected_true_short",ae="fflag_feat_front_leap_187_video_seek_on_select_short",se="fflag_fix_front_leap_443_select_annotation_once",le="fflag_fix_front_leap_32_zoom_perf_190923_short",ce="fflag_fix_leap_466_text_sanitization",de="fflag_fix_leap_246_multi_object_hotkeys_160124_short",ue="fflag_feat_all_leap_1081_reviewer_flow_updates",he="fflag_feat_all_leap_883_custom_script_270524_short",ge="fflag_feat_front_leap_1173_disable_postpone_skip_short",me="fflag_feat_all_leap_1430_per_field_comments_100924_short";function pe(){var e,t;return Object.assign({},null!=(e=null==(t=window.APP_SETTINGS)?void 0:t.feature_flags)?e:{})}function fe(e){var t;const n=pe(),r={fflag_fix_front_lsdv_4620_memory_leaks_100723_short:!1};return e in r?r[e]:e in n?!0===n[e]:!0===(null==(t=window.APP_SETTINGS)?void 0:t.feature_flags_default_value)}Object.assign(window,{APP_SETTINGS:Object.assign({},null!=(r=window.APP_SETTINGS)?r:{},{feature_flags:Object.assign({},null!=(o=null==(i=window.APP_SETTINGS)?void 0:i.feature_flags)?o:{},null!=(a=window.FEATURE_FLAGS)?a:{})})}),Object.assign(window,{getFeatureFlags:pe,isFF:fe})},84411:(e,t,n)=>{"use strict";n.r(t),n.d(t,{applyHighlightStylesToDoc:()=>_,createClass:()=>h,findByXpath:()=>T,findIdxContainer:()=>O,findNodeAt:()=>I,getNodesInRange:()=>y,getTextNodesInRange:()=>b,highlightRange:()=>C,htmlEscape:()=>P,isValidTreeNode:()=>v,labelWithCSS:()=>u,mainOffsets:()=>k,matchesSelector:()=>A,moveStylesBetweenHeadTags:()=>E,normalizeBoundaries:()=>w,removeSpans:()=>R,sanitizeHtml:()=>L,splitBoundaries:()=>S,toGlobalOffset:()=>j,toggleLabelsAndScores:()=>d});var r=n(72829),o=n.n(r),i=n(48862),a=n(47521),s=n.n(a),l=n(78438),c=n(50494);function d(e){const t=t=>{const n=t.getElementsByClassName("htx-highlight");Array.from(n).forEach((t=>{t.classList.contains("htx-manual-label")||(e?t.classList.remove("htx-no-label"):t.classList.add("htx-no-label"))}))},n=(0,c.cn)("htx-richtext").toClassName();t(document),document.querySelectorAll(`iframe.${n}`).forEach((e=>t(e.contentWindow.document)))}const u=(()=>{const e={};return(t,{index:n,labels:r,score:o})=>{const a=r?r.join(","):"",s=[n,a].filter(Boolean).join(":"),c=i.hashCode(s+o);let d=`htx-label-${c}`;if(d=d.toLowerCase(),d in e)return e[d];t.setAttribute("data-labels",a);return h(`.${d}:after`,`content:${`url(${l.A.labelToSVG({label:s,score:o})})`}`),e[c]=!0,d}})();function h(e,t){const n=document.createElement("style");n.type="text/css",document.getElementsByTagName("head")[0].appendChild(n),(n.sheet||{}).insertRule?n.sheet.insertRule(`${e}{${t}}`,0):(n.styleSheet||n.sheet).addRule(e,t)}function g(e){return e.nodeType===Node.TEXT_NODE}function m(e){for(;e.hasChildNodes();)e=e.firstChild;return e}function p(e){for(;e.hasChildNodes();)e=e.lastChild;return e}function f(e){if(e.firstChild)return e.firstChild;for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function v(e,t){for(;e;){if(t&&e===t)return!0;if(e.nodeType===Node.ELEMENT_NODE&&"true"===e.dataset.skipNode)return!1;e=e.parentNode}return!0}function y(e){const t=e.startContainer,n=e.endContainer,r=e.commonAncestorContainer,o=[];let i;for(i=t.parentNode;i&&(v(i,r)&&o.push(i),i!==r);i=i.parentNode);for(o.reverse(),i=t;i&&(v(i,r)&&o.push(i),i!==n);i=f(i));return o}function b(e){return y(e).filter((e=>g(e)))}function x(e,t){const n=e.cloneNode(!1);return n.deleteData(0,t),e.deleteData(t,e.length-t),o()(n,e)}function w(e){let t,n,r,{startContainer:o,startOffset:i,endContainer:a,endOffset:s}=e;function l(e){return!!g(e)&&(!(e===o&&i>0)&&(e!==a||0!==s))}for(o.childNodes.length&&i>0&&(o=p(o.childNodes[i-1]),i=o.length||o.childNodes.length),se===r?null:function(e){if(e.firstChild)return e.firstChild;for(;!e.nextSibling;)if(!(e=e.parentNode))return null;return e.nextSibling}(e),r=p(a);t&&!l(t);)t=n(t);const c=t;for(t=a,n=e=>e===r?null:function(e){if(e.lastChild)return e.lastChild;for(;!e.previousSibling;)if(!(e=e.parentNode))return null;return e.previousSibling}(e),r=m(o);t&&!l(t);)t=n(t);const d=t;e.setStart(c,0),e.setEnd(d,d.length)}function C(e,t,n){null==t&&(t="htx-annotation");const r=/^\s*$/,o=b(e._range);let i=0;e._range.startOffset===o[i].length&&i++;let a=o.length;a>1&&o[o.length-1].length!==e._range.endOffset&&(a-=1);const s=[];for(let e=i,l=a;e0&&o0&&r{let r=0;const o=e=>{if(e===t)return r;"#text"===e.nodeName&&(r+=e.length),"BR"===e.nodeName&&(r+=1);for(let t=0;t<=e.childNodes.length;t++){const n=e.childNodes[t];if(n){const e=o(n);if(void 0!==e)return e}}};return n+o(e)},k=e=>{const t=window.getSelection().getRangeAt(0).cloneRange();let n=t.startOffset,r=t.endOffset,o=!1,i=!1;const a=e=>{if("#text"===e.nodeName&&(e===t.startContainer||o||(n+=e.length),e===t.startContainer&&(o=!0),e===t.endContainer||i||(r+=e.length),e===t.endContainer&&(i=!0)),"BR"===e.nodeName&&(o||(n+=1),i||(r+=1)),e.childNodes.length>0)for(let t=0;t<=e.childNodes.length;t++){const n=e.childNodes[t];if(n){const e=a(n);if(e)return e}}};return a(e),{start:n,end:r}},O=(e,t)=>{let n=t;const r=e=>{if(e)if("#text"===e.nodeName){if(n-e.length<=0)return e;n-=e.length}else if("BR"===e.nodeName)n-=1;else if(e.childNodes.length>0)for(let t=0;t<=e.childNodes.length;t++){const n=e.childNodes[t];if(n){const e=r(n);if(e)return e}}};return{node:r(e),len:n}};function R(e){const t=[];e&&e.forEach((e=>{for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);t.push(e.parentNode),e.parentNode.removeChild(e)})),t.forEach((e=>e.normalize()))}function E(e,t){const n={},r=document.createDocumentFragment();for(let t=0;te.matches(t)||null!==e.closest(t),T=(e,t=document)=>(t!==document&&"."!==e[0]&&(e=`.${e}`),document.evaluate(e,t,null,XPathResult.ANY_TYPE,null).iterateNext()),P=e=>{const t=`${e}`,n=/["'&<>]/.exec(t);if(!n)return t;let r,o="",i=0,a=0;for(i=n.index;i=t){if(!n.firstChild)return[n,t-r];n=n.firstChild}else r+=n.textContent.length,n=n.nextSibling}function L(e=[]){if(!e)return"";const t=["onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],n={script:!0,iframe:!0};return s()(e,{allowedTags:!1,allowedAttributes:!1,disallowedTagsMode:"discard",allowVulnerableTags:!0,exclusiveFilter:e=>n[e.tag],nonTextTags:["script","textarea","option","noscript"],transformTags:{"*":(e,n)=>(Object.keys(n).forEach((e=>{t.includes(e)&&delete n[e]})),{tagName:e,attribs:n})}})}},18094:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(14041);var r=n(84411),o=n(31085);const i={DONE:"Done!",NO_COMP_LEFT:"No more annotations",NO_NEXT_TASK:"No More Tasks Left in Queue",NO_ACCESS:"You don't have access to this task",CONFIRM_TO_DELETE_ALL_REGIONS:"Please confirm you want to delete all labeled regions",ERR_REQUIRED:({modelName:e,field:t})=>`Attribute ${t} is required for ${e}`,ERR_UNKNOWN_TAG:({modelName:e,field:t,value:n})=>`Tag with name ${n} is not registered. Referenced by ${e}#${t}.`,ERR_TAG_NOT_FOUND:({modelName:e,field:t,value:n})=>`Tag with name ${n} does not exist in the config. Referenced by ${e}#${t}.`,ERR_TAG_UNSUPPORTED:({modelName:e,field:t,value:n,validType:r})=>`Invalid attribute ${t} for ${e}: referenced tag is ${n}, but ${e} can only control ${[].concat(r).join(", ")}`,ERR_PARENT_TAG_UNEXPECTED:({validType:e,value:t})=>`Tag ${t} must be a child of one of the tags ${[].concat(e).join(", ")}.`,ERR_BAD_TYPE:({modelName:e,field:t,validType:n})=>`Attribute ${t} of tag ${e} has invalid type. Valid types are: ${n}.`,ERR_INTERNAL:({value:e})=>`Internal error. See browser console for more info. Try again or contact developers.
${e}`,ERR_GENERAL:({value:e})=>e,URL_CORS_DOCS:"https://labelstud.io/guide/storage.html#Troubleshoot-CORS-and-access-problems",URL_TAGS_DOCS:"https://labelstud.io/tags",ERR_LOADING_AUDIO:({attr:e,url:t,error:n})=>(0,o.jsxs)("div",{"data-testid":"error:audio",children:[(0,o.jsxs)("p",{children:["Error while loading audio. Check ",(0,o.jsx)("code",{children:e})," field in task."]}),(0,o.jsxs)("p",{children:["Technical description: ",n]}),(0,o.jsxs)("p",{children:["URL: ",(0,r.htmlEscape)(t)]})]}),ERR_LOADING_S3:({attr:e,url:t})=>`\n
\n

\n There was an issue loading URL from ${e} value.\n The request parameters are invalid.\n If you are using S3, make sure you’ve specified the right bucket region name.\n

\n

URL: ${(0,r.htmlEscape)(t)}

\n
`,ERR_LOADING_CORS({attr:e,url:t}){return`\n
\n

\n There was an issue loading URL from ${e} value.\n Most likely that's because static server has wide-open CORS.\n Read more on that here.\n

\n

\n Also check that:\n

    \n
  • URL is valid
  • \n
  • Network is reachable
  • \n
\n

\n

URL: ${(0,r.htmlEscape)(t)}

\n
`},ERR_LOADING_HTTP({attr:e,url:t,error:n}){return`\n
\n

\n There was an issue loading URL from ${e} value\n

\n

\n Things to look out for:\n

    \n
  • URL is valid
  • \n
  • URL scheme matches the service scheme, i.e. https and https
  • \n
  • \n The static server has wide-open CORS,\n more on that here\n
  • \n
\n

\n

\n Technical description: ${n}\n
\n URL: ${(0,r.htmlEscape)(t)}\n

\n
`}}},48862:(e,t,n)=>{"use strict";n.r(t),n.d(t,{atobUnicode:()=>m,camelizeKeys:()=>O,chunks:()=>S,clamp:()=>C,delay:()=>b,destroyMSTObject:()=>P,emailFromCreatedBy:()=>k,escapeHtml:()=>p,findClosestParent:()=>w,fixMobxObserve:()=>I,flatten:()=>h,getUrl:()=>c,hashCode:()=>g,humanDateDiff:()=>T,isArraysEqual:()=>f,isDefined:()=>x,isMacOS:()=>_,isString:()=>a,isStringEmpty:()=>s,isStringJSON:()=>l,isValidObjectURL:()=>d,minMax:()=>E,snakeizeKeys:()=>R,sortAnnotations:()=>L,toArray:()=>y,toTimeString:()=>u,triggerResizeEvent:()=>A,userDisplayName:()=>j,wrapArray:()=>v});var r=n(57958),o=n(77099),i=n(83126);const a=e=>"string"==typeof e||e instanceof String,s=e=>!!a(e)&&0===e.length,l=e=>{if(a(e)){try{JSON.parse(e)}catch(e){return!1}return!0}return!1};function c(e,t){const n=t.slice(e),r=/^(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g.exec(n);return r&&r.length?r[1]:""}function d(e,t=!1){return"string"==typeof e&&(!(!t||!e.startsWith("/"))||/^https?:\/\//.test(e))}function u(e){var t;if("number"==typeof e)return null==(t=new Date(e).toUTCString().match(/(\d\d:\d\d:\d\d)/))?void 0:t[0]}function h(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?h(t):t)),[])}function g(e){let t=0;if(0===e.length)return`${t}`;for(let n=0;n`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}function p(e){return(null!=e?e:"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function f(e,t){return e.length===t.length&&e.every(((e,n)=>t[n]===e))}function v(e){return[].concat(e)}function y(e){return(Array.isArray(e)?e:[e]).filter((e=>void 0!==e))}function b(e=0){return new Promise((t=>setTimeout(t,e)))}const x=e=>null!=e;function w(e,t=()=>!0,n=e=>e.parent){for(;e=n(e);)if(t(e))return e;return null}function C(e,t,n){return Math.min(n,Math.max(t,e))}const S=(e,t)=>{const n=[];let r,o;for(r=0,o=e.length;r{const{firstName:t,lastName:n}=e;return t||n?[t,n].filter((e=>!!e)).join(" ").trim():e.username||e.email},k=e=>{var t;return null==e||null==(t=e.match(/([^@,\s]+@[^@,\s]+)(,\s*\d+)?$/))?void 0:t[1]},O=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>"[object Object]"===Object.prototype.toString.call(t)?[(0,i.toCamelCase)(e),O(t)]:[(0,i.toCamelCase)(e),t]))),R=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>"[object Object]"===Object.prototype.toString.call(t)?[(0,i.toSnakeCase)(e),R(t)]:[(0,i.toSnakeCase)(e),t])));function E(e){return e.reduce(((e,t)=>(e[0]=void 0===e[0]||te[1]?t:e[1],e)),[])}function _(){return navigator.platform.indexOf("Mac")>-1}const A=()=>{const e=new Event("resize");e.initEvent("resize",!1,!1),window.dispatchEvent(e)},T=e=>{const t=(0,r.A)(new Date(e),{addSuffix:!0});return"less than a minute ago"===t?"just now":t},P=e=>{e&&((0,o.Yo)(e),(0,o.zr)(e))},I=(...e)=>{},L=e=>e.sort(((e,t)=>new Date(t.createdDate).getTime()-new Date(e.createdDate).getTime()))},13346:()=>{},49264:()=>{},35296:()=>{}}]); +(self.webpackChunklabelstudio=self.webpackChunklabelstudio||[]).push([[82],{47895:(e,t,n)=>{"use strict";n.d(t,{A:()=>o,l:()=>r});const r={fillcolor:"#666",opacity:.2,strokecolor:"#666",strokewidth:1},o={FILL_COLOR:"",STROKE_COLOR:"",STROKE_WIDTH:1,LABEL_BACKGROUND:"#36B37E",EMPTY_LABEL:"blank",RELATION_BACKGROUND:"#fff",SHOW_LABEL_FILL:"white",SHOW_LABEL_BACKGROUND:"black",HIGHLIGHTED_STROKE_COLOR:"red",HIGHLIGHTED_STROKE_WIDTH:2,HIGHLIGHTED_CSS_BORDER:"1px dashed #00aeff",SUGGESTION_STROKE_WIDTH:4,DEFAULT_CURSOR:"default",CHOOSE_CURSOR:"pointer",POINTER_CURSOR:"pointer",MOVE_CURSOR:"hand",LINKING_MODE_CURSOR:"crosshair",BRIGHTNESS_VALUE:100,BRIGHTNESS_MAX:400,CONTRAST_VALUE:100,CONTRAST_MAX:400}},30997:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r={onDeleteAnnotation:function(){},onEntityCreate:function(){},onEntityDelete:function(){},onGroundTruth:function(){},onLabelStudioLoad:function(){},onSkipTask:function(){},onUnskipTask:function(){},onSubmitAnnotation:function(){},onSubmitDraft:function(e){},onTaskLoad:function(){},onUpdateAnnotation:function(){},onSelectAnnotation:function(e,t){},onAcceptAnnotation:function(e,t){},onRejectAnnotation:function(e,t){},onStorageInitialized:function(e){},onNextTask:function(e){},onPrevTask:function(e){}}},81117:()=>{0},2517:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LabelStudio:()=>RH,default:()=>EH});var r={};n.r(r),n.d(r,{drawMask:()=>vt});var o={};n.r(o),n.d(o,{canvasToBinaryMatrix:()=>xt,createDragBoundFunc:()=>jt,fixRectToFit:()=>St,getActualZoomingPosition:()=>Ot,getBoundingBoxAfterChanges:()=>Ct,getBoundingBoxAfterTransform:()=>wt,getTransformedImageData:()=>kt,reverseCoordinates:()=>bt});var i={};n.r(i),n.d(i,{currentISODate:()=>At,msToHMS:()=>Rt,prettyDate:()=>Et,toISODateString:()=>_t});var a={};n.r(a),n.d(a,{applySpanStyles:()=>Wt,captureSelection:()=>Dt,charsToCodePoints:()=>Xt,codePointsToChars:()=>Yt,findNodesBetween:()=>$t,findOnPosition:()=>Jt,findRange:()=>Zt,findRangeNative:()=>Gt,fixCodePointsInRange:()=>qt,highlightRange:()=>Bt,highlightRangePart:()=>Ht,isSelectionContainsSpan:()=>tn,isTextNode:()=>Tt,rangeToGlobalOffset:()=>Qt,removeRange:()=>Ut,wrapWithSpan:()=>Ft});var s={};n.r(s),n.d(s,{AudioVolumeControl:()=>pC,FramesControl:()=>Wa});var l={};n.r(l),n.d(l,{Brightness:()=>pR,Brush:()=>BO,Contrast:()=>yR,Ellipse:()=>nR,Erase:()=>$O,KeyPoint:()=>ZO,MagicWand:()=>wR,Polygon:()=>YO,Rect:()=>QO,Rect3Point:()=>eR,Rotate:()=>hR,Selection:()=>SR,Zoom:()=>cR});var c={};n.r(c),n.d(c,{VideoSettings:()=>EN});var d={};n.r(d),n.d(d,{Boolean:()=>az,Common:()=>sz,Image:()=>fz,Number:()=>mz,String:()=>fz});n(81117);var u=n(57896),h=n(77099),g=n(43144),m=n(83126),p=n(14041),f=n(56036),v=n(69447),y=n(56351);const b=new class{constructor(){this.tags=[],this.models={},this.views={},this.regions=[],this.objects=[],this.areas=new Map,this.views_models={},this.tools={},this.perRegionViews={}}addTag(e,t,n){this.tags.push(e),this.models[e]=t,this.views[e]=n,this.views_models[t.name]=n}addRegionType(e,t,n){this.regions.push(e),n&&(e.detectByValue=n);const r=this.areas.get(t);r?r.push(e):this.areas.set(t,[e])}regionTypes(){return this.regions}addObjectType(e){this.objects.push(e)}objectTypes(){return this.objects}modelsArr(){return Object.values(this.models)}getViewByModel(e){const t=this.views_models[e];if(!t)throw new Error(`No view for model: ${e}`);return t}getViewByTag(e){return this.views[e]}getAvailableAreas(e,t){const n=this.areas.get(e);if(!n)return[];if(t)for(const e of n)if(e.detectByValue&&e.detectByValue(t))return[e];return n.filter((e=>!e.detectByValue))}getTool(e){const t=this.tools[e];if(!t){const t=Object.keys(this.tools);throw new Error(`No model registered for tool: ${e}\nAvailable models:\n\t${t.join("\n\t")}`)}return t}getModelByTag(e){const t=this.models[e];if(!t){const t=Object.keys(this.models);throw new Error(`No model registered for tag: ${e}\nAvailable models:\n\t${t.join("\n\t")}`)}return t}addPerRegionView(e,t,n){const r=this.perRegionViews[e]||{};r[t]=n,this.perRegionViews[e]=r}getPerRegionView(e,t){var n;return null==(n=this.perRegionViews[e])?void 0:n[t]}};b.getTool=b.getTool.bind(b),b.getModelByTag=b.getModelByTag.bind(b);const x=b;var w=n(48862),C=n(5157),S=n.n(C);const j=(e,t)=>{var n;const r=/\$[\w[\].{}]+/gi;return e?(null==(n=e.match(r))?void 0:n[0])===e?null!=(o=S()(t,e.slice(1)))?o:"":e.replace(r,(e=>{var n;return S()(t,null!=(n=e.slice(1))?n:"")})):"";var o},k=e=>{var t;const[,n,r]=null!=(t=e.match(/^(\w+)(.)?/))?t:[],o={};if(r){e.split(r).slice(1).forEach((e=>{const[t,n]=e.split("=",2);o[t]=null==n||n}))}return{type:n,sep:r,options:o}};var O=n(84826),R=n(74331);const E=(e=10)=>(0,R.Ak)(e);var _=n(31085);const A="skip",T="stop";const P=(e,t,n)=>{!function e(r){if(void 0===r.attributes)return;const o=Array.from(r.attributes).map((e=>e.name));for(const e of o){var i;const o=r.getAttribute(e);r.setAttribute(e,null!=(i=null==o||null==o.replace?void 0:o.replace(n,`${t}`))?i:"")}r.childNodes.forEach((t=>e(t)))}(e)};function I(e,t,n){var r,o;const i=function(e,t){const n={};if(!e)return n;for(const r of e.attributes){const{name:e,value:o}=r;if("value"!==e&&["true","false"].includes(o))n[e.toLowerCase()]="true"===o;else if(t){let r=o;for(const[e,n]of Object.entries(t))r=r.replace(e,n);n[e.toLowerCase()]=r}else n[e.toLowerCase()]=o}return n}(e,n),a=e.tagName.toLowerCase(),s=null!=(r=i.indexflag)?r:"{{idx}}",l=(0,O.VS)(O.cE)&&null!=(o=e.getAttribute("name"))?o:E(),c=Object.assign({},i,{id:l,tagName:e.tagName,type:a});if("repeater"===a){const r=j(i.on,t)||[],o=[];for(let i=0;i{const n=e.cloneNode(!0);return P(n,i,s),I(n,t,r)}))};o.push(a)}c.tagName="View","pagination"===i.mode?c.type="pagedview":c.type="view",c.children=o}else if(!e.childNodes.length||e.children.length&&"hypertext"!==a)e.children.length&&(c.children=[...e.children].map((e=>I(e,t))));else{var d;c.value=(null==(d=e.innerHTML)?void 0:d.trim())||c.value||""}return c}function L(e,t,n=!0){let r=e;if((0,O.VS)(O.cE)){var o;if(!t)return null;r=t.ids.get(K(null!=(o=e.id)?o:e.name))}var i;if(!r)return console.error(`Can't find element ${null!=(i=e.id)?i:e.name} in annotation ${null==t?void 0:t.id}`),null;const a=(0,h.Pw)(r),s=a.identifierAttribute,l=a.name,c=x.getViewByModel(l);if(!c)throw new Error(`No view for model: ${l}`);const d=s&&r[s]||E();return(0,_.jsx)(c,{item:r},n?d:void 0)}function M(e,t){const n=e=>{const r=t(e);if(r!==A){if(r===T)return T;if(e.children)for(const t of e.children){if(n(t)===T)return T}}};n(e)}const K=e=>e.replace(/@.*/,"");const D={renderItem:L,renderChildren:function(e,t){return e&&e.children&&e.children.length?e.children.map((e=>L(e,t))):null},treeToModel:function(e,t){var n,r,o;const i=(new DOMParser).parseFromString(e,"application/xml"),a=null==i||null==(n=i.children)?void 0:n[0],s=function(e){var t;let n=null==e||null==(t=e.children)?void 0:t[0];for(let e=0;e<3;e++){var r,o;if("parsererror"===(null==(r=n)?void 0:r.tagName))return n.textContent;n=null==(o=n)||null==(o=o.children)?void 0:o[0]}}(i);if(s)throw new Error(s);return I(a,null!=(r=null==(o=t.task)?void 0:o.dataObj)?r:{})},findParentOfType:function(e,t){for(const n of t)try{const t=(0,h.k2)(e,n);if(t)return t}catch(e){console.error(e)}return null},filterChildrenOfType:function(e,t){const n=[],r=Array.isArray(t)?t:[t];return M(e,(e=>{for(const t of r)(0,h.Pw)(e).name===t&&n.push(e)})),n},cssConverter:function(e){if(!e)return null;const t={},n=e.split(";");let r,o,i,a;for(o=0;oe[1].toUpperCase()))]=a}return t},traverseTree:M,extractNames:function(e){const t=[],n=new Map,r=new Map,o=x.objectTypes().map((e=>e.name.replace("Model","").toLowerCase()));return M(e,(e=>{e.name&&(n.set(K(e.name),e),o.includes(e.type)&&t.push(K(e.name)))})),M(e,(e=>{if(e.name&&!o.includes(e.type)&&!e.toname&&1===t.length&&(e.toname=t[0]),e&&e.toname){const t=r.get(e.toname);t?t.push(n.get(K(e.name))):r.set(e.toname,[n.get(K(e.name))])}})),{names:n,toNames:r}},cleanUpId:K},N=()=>{const e=(0,p.useRef)(!0);return(0,p.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e};var V=n(47895);const z=h.gK.model("CommentMode",{}).volatile((()=>({comment:null}))).views((e=>({get annotation(){return(0,h.PA)(e,2)},get regionStore(){return e.annotation.regionStore}}))).actions((e=>({start(t){e.comment=t},stop(){e.comment=null,e.regionStore.unhighlightAll()},addLinkedRegion(t){e.comment.setRegionLink(t),e.stop()},addLinkedResult(t){e.comment.setResultLink(t),e.stop()}}))),B={key:"link_to_comment",model:z},H={key:"create_relation",model:h.gK.model("RelationsMode",{}).volatile((()=>({region:null}))).views((e=>({get annotation(){return(0,h.PA)(e,2)},get regionStore(){return e.annotation.regionStore},get relationStore(){return e.annotation.relationStore}}))).actions((e=>({start(t){e.region=t},stop(){e.region=null,e.regionStore.unhighlightAll()},addLinkedRegion(t){e.relationStore.addRelation(e.region,t),e.stop()}})))},F=H.key,W=B.key,$=h.gK.union(B.model,H.model),U=h.gK.model("LinkingModes",{linkingModes:h.gK.optional(h.gK.map($),(()=>({[H.key]:H.model.create({}),[B.key]:B.model.create({})})))}).volatile((e=>({linkingMode:!1}))).views((e=>({get currentLinkingMode(){return e.linkingMode&&e.linkingModes.has(e.linkingMode)?e.linkingModes.get(e.linkingMode):null},get isLinkingMode(){return!!e.linkingMode},get relationMode(){return console.warn("`relationMode` is deprecated. Use `isLinkingMode` instead."),e.isLinkingMode}}))).actions((e=>({startLinkingMode(t,n){e.isLinkingMode&&e.stopLinkingMode(),e.linkingMode=t,e.currentLinkingMode?(e.currentLinkingMode.start(n),document.body.style.cursor=V.A.CHOOSE_CURSOR):e.linkingMode=!1},stopLinkingMode(){document.body.style.cursor=V.A.DEFAULT_CURSOR,e.currentLinkingMode&&e.currentLinkingMode.stop(),e.linkingMode=!1},addLinkedRegion(t){e.currentLinkingMode&&(null==e.currentLinkingMode.addLinkedRegion||e.currentLinkingMode.addLinkedRegion(t))},addLinkedResult(t){e.currentLinkingMode&&(null==e.currentLinkingMode.addLinkedResult||e.currentLinkingMode.addLinkedResult(t))},startRelationMode(t){console.warn("`startRelationMode` is deprecated. Use `startLinkingMode(CREATE_RELATION_MODE, obj)` instead."),e.startLinkingMode(H.key,t)},stopRelationMode(){console.warn("`stopRelationMode` is deprecated. Use `stopLinkingMode` instead."),e.stopLinkingMode()}})));var Z;const G=null!=(Z=window.ResizeObserver)?Z:class{observe(){}unobserve(){}disconnect(){}};function Y(e,t,n=!1){let r;return function(...o){const i=n&&!r;clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t),i&&e.apply(this,o)}}class X{static normalizeAngle(e){return(e+360)%360*(Math.PI/180)}static getPointsBBox(e){const t=[null,null,null,null];return e.forEach(((e,n)=>{const r=2*Math.round(n/2)-n;0===r?((null===t[0]||t[0]>=e)&&(t[0]=e),(null===t[2]||t[2]<=e)&&(t[2]=e)):1===r&&((null===t[1]||t[1]>=e)&&(t[1]=e),(null===t[3]||t[3]<=e)&&(t[3]=e))})),t}static distance(e,t){const[n,r]=e,[o,i]=t;return Math.sqrt((o-n)**2+(i-r)**2)}static toRectCoordinates(e){const{x:t,y:n,width:r,height:o}=e,[i,a]=[t+r,n],[s,l]=[t+r,n+o],[c,d]=[t,n+o];return{x1:t,x2:i,x3:s,x4:c,y1:n,y2:a,y3:l,y4:d}}static convertToRectBBox(e){return{x:e.x1,y:e.y1,width:e.x2-e.x1,height:e.y3-e.y1}}static closestRects(e,t){return e.reduce(((e,n)=>{const r=X.toRectCoordinates(n);return t.forEach((t=>{const n=X.toRectCoordinates(t),o=[X.distance([r.x1,r.y1],[n.x1,r.y1]),X.distance([r.x2,r.y2],[n.x2,r.y2]),X.distance([r.x3,r.y3],[n.x3,r.y3]),X.distance([r.x4,r.y4],[n.x4,n.y4])].reduce(((e,t)=>e+t))/4;e.push({distance:o,bbox:[X.convertToRectBBox(r),X.convertToRectBBox(n)]})})),e}),[]).sort(((e,t)=>e.distance-t.distance))[0].bbox}static scaleBBox(e,t=1){return Object.assign({},e,{x:e.x*t,y:e.y*t,width:e.width*t,height:e.height*t})}static modifyBBoxCoords(e,t=e=>e){const n=t([e.x,e.y]),r=t([e.width+e.x,e.height+e.y]);return Object.assign({},e,{x:Math.min(n[0],r[0]),y:Math.min(n[1],r[1]),width:Math.abs(r[0]-n[0]),height:Math.abs(r[1]-n[1])})}static padding(e,t=0){const n=e.width<1?0:t,r=e.height<1?0:t;return Object.assign({},e,{x:e.x-n,y:e.y-r,width:e.width+2*n,height:e.height+2*r})}static getEllipseBBox(e,t,n,r,o){const i=X.normalizeAngle(o),a=2*Math.max(n,r),s=2*Math.min(n,r),[l,c]=(()=>{const t=Math.atan(-s/2*Math.tan(i)/(a/2));return[t,t+Math.PI].map((t=>e+a/2*Math.cos(t)*Math.cos(i)-s/2*Math.sin(t)*Math.sin(i))).sort(((e,t)=>t-e))})(),[d,u]=(()=>{const e=Math.atan(s/2*1/Math.tan(i)/(a/2));return[e,e+Math.PI].map((e=>t+s/2*Math.sin(e)*Math.cos(i)+a/2*Math.cos(e)*Math.sin(i))).sort(((e,t)=>t-e))})();return{x:c,y:u,width:l-c,height:d-u}}static getRectBBox(e,t,n,r,o){const i=X.normalizeAngle(o),a=(n,r)=>[(n-e)*Math.cos(i)-(r-t)*Math.sin(i)+e,(n-e)*Math.sin(i)+(r-t)*Math.cos(i)+t],[s,l,c,d]=X.getPointsBBox([e,t,...a(e+n,t),...a(e+n,t+r),...a(e,t+r)]);return{x:s,y:l,width:c-s,height:d-l}}static getPolygonBBox(e){const t=e.reduce(((e,t)=>[...e,t.x,t.y]),[]),[n,r,o,i]=X.getPointsBBox(t);return{x:n,y:r,width:o-n,height:i-r}}static getBrushBBox(e){const[t,n,r,o]=X.getPointsBBox(e);return{x:t,y:n,width:r-t,height:o-n}}static getImageDataBBox(e,t,n){if(e.length!==t*n*4)return null;const r={x:t,y:n},o={x:0,y:0};for(let i=0;in&&(r.x=n),r.y>i&&(r.y=i),o.x(t&&t.x&&t.y&&(e.push(t.x),e.push(t.y),e.push(t.x+t.width),e.push(t.y+t.height)),e)),[]));return{x:t,y:n,width:r-t,height:o-n}}static clampBBox(e,t,n){const r=[(0,w.clamp)(e.x,t.x,n.x),(0,w.clamp)(e.y,t.y,n.y)],o=[(0,w.clamp)(e.width+e.x,t.x,n.x),(0,w.clamp)(e.height+e.y,t.y,n.y)];return{x:r[0],y:r[1],width:o[0]-r[0],height:o[1]-r[1]}}static getDOMBBox(e,t=!1){if(!e)return null;const n=e.getClientRects();if(0===n.length)return null;const r=e=>({x:e.x,y:e.y,width:e.width,height:e.height});return t?r(n[0]):Array.from(e.getClientRects()).map(r)}}const q={x:0,y:0,width:0,height:0};class J{static bbox(e){const t=Q(e);return(0,w.wrapArray)(t).map((e=>Object.assign(Object.assign({},q),e)))}constructor(e){this.options={},Object.assign(this.options,e)}get _source(){return this.options.source}get x(){return this.options.getX(this._source)}get y(){return this.options.getY(this._source)}get width(){return this.options.getWidth(this._source)}get height(){return this.options.getHeight(this._source)}}const Q=e=>{var t;if(!!e.from_name)return X.getDOMBBox(null==(t=e.from_name.elementRef)?void 0:t.current);let n=e.type;switch("audioregion"===n&&(n=(0,O.VS)(O.vS)?"audioregion::ultra":"audioregion::old"),n){case"textrange":case"richtextregion":case"textarearegion":case"audioregion::old":case"paragraphs":case"timeseriesregion":{var r;const t=X.getDOMBBox(e.getRegionElement()),n=null==(r=e.parent)||null==(r=r.visibleNodeRef)?void 0:r.current;if("IFRAME"===(null==n?void 0:n.tagName)){const e=X.getDOMBBox(n,!0);return(null==t?void 0:t.map((t=>Object.assign({},t,{x:t.x+e.x,y:t.y+e.y}))))||null}return t}case"audioregion::ultra":{var o;const t=e.bboxCoordsCanvas,n=null==(o=e.parent)||null==(o=o.stageRef)?void 0:o.current,r=X.getDOMBBox(n,!0);return t?r?{x:r.x+t.left,y:r.y+t.top,width:t.right-t.left,height:t.bottom-t.top}:t:q}case"rectangleregion":case"ellipseregion":case"polygonregion":case"keypointregion":case"brushregion":{const t=e.bboxCoordsCanvas;return t?((e,t)=>{var n;if(null==(n=e.parent)||!n.stageRef)return null;const r=X.getDOMBBox(e.parent.stageRef.content,!0),o=X.clampBBox(X.modifyBBoxCoords(t,e.parent.zoomOriginalCoords),{x:0,y:0},{x:e.parent.canvasSize.width,y:e.parent.canvasSize.height});return Object.assign({},o,{x:r.x+o.x,y:r.y+o.y})})(e,{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}):q}default:return console.warn(`Unknown region type: ${e.type}`),Object.assign({},q)}};class ee{constructor(e){this.params={},this._onUpdated=null,this.onChanged=()=>{var e;null==(e=this.onUpdated)||e.call(this)},Object.assign(this.params,e),this.params.watcher&&(this._watcher=new this.params.watcher(this.params.root,this.params.element,this.onChanged))}boundingBox(){return J.bbox(this.params.element)}onUpdate(e){this.onUpdated=e}destroy(){this.onUpdated=null}}class te{constructor(e,t,n){this.onUpdate=()=>{this.callback()},this.root=e,this.element=t.getRegionElement(),this.callback=n,this.handleUpdate()}handleResize(){window.addEventListener("resize",this.onUpdate)}handleUpdate(){this.observer=new MutationObserver(this.onUpdate),this.observer.observe(this.element,{attributes:!0})}destroy(){window.removeEventListener("resize",this.onUpdate),this.observer.disconnect()}}const ne=e=>class{constructor(e,t,n){this.onUpdate=Y((()=>{this.callback()}),10),this.root=e,this.element=t,this.callback=n,this.handleUpdate()}handleUpdate(){this.disposers=this._watchProperties(this.element,e,[])}destroy(){this.disposers.forEach((e=>e()))}_watchProperties(e,t,n){return t.reduce(((r,o)=>("string"!=typeof o?Object.keys(o).forEach((t=>{this._watchProperties(e[t],o[t],n)})):Array.isArray(e)?e.forEach((e=>this._watchProperties(e,t,n))):r.push((0,u.lB)(e,o,this.onUpdate,!0)),r)),n)}},re={parent:["zoomScale","zoomingPositionX","zoomingPositionY","rotation","currentImage",...(0,O.VS)(O.v1)?["containerWidth","containerHeight","canvasSize"]:[]]},oe=e=>{switch(e.type){case"richtextregion":case"paragraphs":return te;case"audioregion":return(0,O.VS)(O.vS)?ne(["bboxTriggers"]):e.getRegionElement?te:null;case"rectangleregion":return ne(["x","y","width","height","hidden",re]);case"ellipseregion":return ne(["x","y","radiusX","radiusY","rotation","hidden",re]);case"polygonregion":return ne(["hidden",{points:["x","y"]},re]);case"keypointregion":return ne(["x","y","hidden",re]);case"brushregion":return ne(["needsUpdate","hidden","touchesLength",re]);case"timeseriesregion":return ne(["start","end",{parent:["zoomedRange"]}]);default:return null}},ie=(e,t)=>new ee({root:t,element:e,watcher:oe(e)}),ae=(e,t)=>{var n;const{x:r,y:o}=null!=(n=X.getDOMBBox(t,!0))?n:{x:0,y:0};return e.boundingBox().map((e=>{const t=X.padding(e,3);return Object.assign({},t,{x:t.x-r,y:t.y-o})}))},se=({x1:e,y1:t,w1:n,x2:r,y2:o,w2:i,limit:a})=>{const s=e+.5*n,l=r+.5*i,c=Math.min(t,o)-a;return{x1:s,x2:l,y1:t,y2:o,l1:Math.min(c,t-a),l2:Math.min(c,o-a),toEnd:s{let c,d,u,h,g,m,p="left";if(Math.min(e,o)-l<0&&(p="right"),"left"===p){c=e,u=t+.5*r,d=o,h=i+.5*s;const n=Math.min(c,d)-l;g=Math.min(n,c-l),m=Math.min(n,d-l)}else{c=e+n,u=t+.5*r,d=o+a,h=i+.5*s;const p=Math.max(c,d)+l;g=Math.max(p,c+l),m=Math.max(p,d+l)}return{x1:c,x2:d,y1:u,y2:h,l1:g,l2:m,toEnd:u{var n;return{id:e.id,label:(0,w.wrapArray)(null!=(n=e.labels)?n:[]).join(", "),color:"#fa541c",direction:e.direction,start:ie(e.startNode,t),end:ie(e.endNode,t),onChange(e){const t=Y(e,50);this.start.onUpdate(t),this.end.onUpdate(t)},destroy(){this.start.destroy(),this.end.destroy()}}},ue=({start:e,end:t,root:n})=>{const[r,o]=X.closestRects(ae(e,n),ae(t,n));return{start:r,end:o}},he=(e,t)=>{const{x:n,y:r,width:o,height:i}=e,{x:a,y:s,width:l,height:c}=t,d=(({x1:e,y1:t,w1:n,x2:r,y2:o,w2:i})=>t!==o&&(e<=r&&r<=e+n||e<=r+i&&r+i<=e+n))({x1:n,y1:r,w1:o,x2:a,y2:s,w2:l}),u=(({x1:e,y1:t,x2:n,y2:r,l1:o,l2:i,toEnd:a,renderingSide:s},l)=>{const c="vertical"===l;let d,u,h,g,m,p,f,v,y,b,x,w,C;return c?(d=e,u=t,h=e,g=o+5,m=n+5*(a?-1:1),p=i,f=n,v=r,y=a?1:0,b=a?"5 -5":"-5 -5",x=a?"5 5":"-5 5",w=Math.min(e,n)+Math.abs(n-e)/2,C=o):c||"right"!==s?c||"left"!==s||(d=e,u=t,h=o+5,g=t,m=i,p=r+5*(a?-1:1),f=n,v=r,y=a?0:1,b=a?"-5 5":"-5 -5",x=a?"5 5":"5 -5",w=o,C=Math.min(t,r)+Math.abs(r-t)/2):(d=e,u=t,h=o-5,g=t,m=i,p=r+5*(a?-1:1),f=n,v=r,y=a?1:0,b=a?"5 5":"5 -5",x=a?"-5 5":"-5 -5",w=o,C=Math.min(t,r)+Math.abs(r-t)/2),[[`M ${d} ${u}`,`${h} ${g}`,`a 5 5 0 0 ${y} ${b}`,`L ${m} ${p}`,`a 5 5 0 0 ${y} ${x}`,`L ${f} ${v}`].join(" "),[w,C]]})((d?le:se)({x1:n,y1:r,w1:o,h1:i,x2:a,y2:s,w2:l,h2:c,limit:15}),d?"horizontal":"vertical");return u},ge=ae,me={container:"container--gJBc5",commentItem:"commentItem--aJS6d",commentIconBackground:"commentIconBackground--EofOZ",commentIconLines:"commentIconLines--uQaUg",_highlighting:"_highlighting--qltMP",_highlighted:"_highlighted--Ksg1R"},pe=()=>(0,_.jsxs)("g",{className:me.commentIcon,children:[(0,_.jsx)("path",{className:me.commentIconBackground,d:"M0 12C0 5.3726 5.3726 0 12 0C18.6274 0 24 5.3726 24 12C24 18.6274 18.6274 24 12 24H0V12Z"}),(0,_.jsx)("path",{className:me.commentIconLines,d:"M18 8V9.3333H6V8H18ZM6 16H12V14.6667H6V16ZM6 12.6667H18V11.3333H6V12.6667Z"})]}),fe=(0,y.PA)((({comment:e,rootRef:t})=>{var n;const r=t.current,o=null==(n=e.regionRef)?void 0:n.overlayNode,i=(null==o?void 0:o.area)&&!o.area.selected&&!o.area.classification,a=!o||o.hidden||i,[s,l]=(0,p.useState)({}),c=(0,p.useCallback)((()=>{e.setHighlighted(!0)}),[e]),d=(0,p.useCallback)((()=>{e.setHighlighted(!1)}),[e]),u=(0,p.useMemo)((()=>o&&r?ce(o,r):null),[o,r]),{shapeBBox:h,positionStyle:g}=(0,p.useMemo)((()=>{const e=u&&r?ge(u,r)[0]:{x:0,y:0,width:0,height:0};return{shapeBBox:e,positionStyle:{transform:`translate(${e.x+e.width-3-4}px, ${e.y-24+3+4}px)`}}}),[u,r,s]);if((0,p.useEffect)((()=>(null==u||u.onUpdate((()=>{l({})})),()=>{null==u||u.destroy()})),[u]),!r||!o||a)return null;if(h.width<1||h.height<1)return null;const m=[me.commentItem];return e.isHighlighted&&m.push(me._highlighted),(0,_.jsx)("g",{className:m.join(" "),style:g,onMouseEnter:c,onMouseLeave:d,onClick:e.scrollIntoView,children:(0,_.jsx)(pe,{})})})),ve=e=>{const{isClassificationTag:t}=e.from_name,n=e.area.classification,r=e.area.selected;return t&&(n||r)},ye=(0,y.PA)((({result:e,rootRef:t})=>{const n=t.current,r=e.area,o=!r||r.hidden,[i,a]=(0,p.useState)({}),[s,l]=(0,p.useState)(!1),c=(0,p.useMemo)((()=>e&&n?ce(e,n):null),[e,n]),d=(0,p.useMemo)((()=>c&&n?ge(c,n)[0]:{x:0,y:0,width:0,height:0}),[c,n,i]);if((0,p.useEffect)((()=>(null==c||c.onUpdate((()=>{a({})})),()=>{null==c||c.destroy()})),[c]),!n||!r||o)return null;if(d.width<1||d.height<1)return null;const u={pointerEvents:"all",stroke:"var(--grape_600)",strokeDasharray:s?void 0:"4 2",cursor:"crosshair"};return(0,_.jsx)("rect",Object.assign({},d,{rx:3,ry:3,style:u,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),stroke:"red",strokeWidth:1,fill:"none",onClick:()=>{e.annotation.addLinkedResult(e),e.annotation.stopLinkingMode()}}))})),be=(0,y.PA)((({annotation:e,commentStore:t})=>{var n;const{overlayComments:r}=t||{},o=(0,p.useRef)(),[i,a]=(0,p.useState)(E()),s=N();(0,p.useEffect)((()=>{(async()=>{await t.listComments({mounted:s,suppressClearComments:t.isRelevantList})})()}),[null==(n=t.annotation)?void 0:n.id]);const l=(0,p.useMemo)((()=>{let e;return new G((t=>{cancelAnimationFrame(e),e=requestAnimationFrame((()=>{a(E())}))}))}),[]);(0,p.useEffect)((()=>()=>{null==l||l.disconnect()}),[]);const c=(0,p.useCallback)((e=>{const t=e||void 0;e?(null==l||l.observe(e),null==l||l.observe(document.body)):o.current&&(null==l||l.unobserve(o.current),null==l||l.unobserve(document.body)),o.current=t}),[]);if(!r)return null;const d=[me.container];return null!=t&&t.isHighlighting&&d.push(me._highlighting),(0,_.jsx)("svg",{className:d.join(" "),ref:c,xmlns:"http://www.w3.org/2000/svg",children:(0,_.jsxs)("g",{children:[e.linkingMode===W&&e.results.filter(ve).map((e=>(0,_.jsx)(ye,{result:e,rootRef:o},e.id))),r.map((e=>{const{id:t}=e;return(0,_.jsx)(fe,{comment:e,rootRef:o},t)}))]},i)})})),xe=(0,p.memo)((0,y.PA)((({tags:e,children:t})=>Array.from(e.values()).every((e=>{var t;return!!(0,h._n)(e)&&(null==(t=null==e?void 0:e.isReady)||t)}),!0)?(0,_.jsx)(_.Fragment,{children:t}):null))),we=(0,y.PA)((e=>{const{annotation:t}=e;return(0,_.jsx)(xe,{tags:t.names,children:(0,_.jsx)(be,Object.assign({},e))})}));var Ce=n(39067);const Se="error--SXGAh";var je=n(84411);const ke=({error:e})=>{if("string"==typeof e)return(0,_.jsx)("div",{className:Se,dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(e)}});const t=e instanceof Error?e.message:e;return(0,_.jsx)("div",{className:Se,children:t})},Oe=(0,y.WQ)("store")((0,y.PA)((({store:e,errors:t})=>(0,_.jsx)("div",{className:"lsf-errors",children:t.map(((t,n)=>(0,_.jsx)(ke,{error:(0,h._$)(e).messages[t.error](t)},`error-${n}`)))}))));Oe.propTypes={errors:Ce.PropTypes.array.isRequired};const Re={range:(e=0,t=1)=>h.gK.custom({name:`Range(${e}..${t})`,fromSnapshot:e=>Number.parseFloat(e),toSnapshot:e=>e.toString(),isTargetType(n){const r=Number.parseFloat(n);return e<=r&&r<=t},getValidationMessage(n){return this.isTargetType(n)?"":`Value ${n} is outside of range ${e}..${t}.`}}),color:h.gK.custom({name:"CSSColor",fromSnapshot:e=>String(e),toSnapshot:e=>e.toString(),isTargetType(e){const t=(new Option).style;return t.color=e,""!==t.color},getValidationMessage(e){return this.isTargetType(e)?"":`Value ${e} doesn't appear to be a valid HEX color.`}})};function Ee(e){return t=>h.gK.maybeNull(h.gK.array(e(t)))}function _e(e,t){return n=>h.gK.union({dispatcher:r=>{if(n.find((e=>r.type===e)))return e(r.type);throw Error(t+r.type)}})}const Ae=_e(x.getModelByTag,"Not expecting tag: ");const Te={unionArray:function(e){const t=h.gK.maybeNull(h.gK.array(Ae(e)));return t.value=e,t},allModelsTypes:function(){const e=[{dispatcher:e=>{if(!e)return h.gK.literal(void 0);if(x.tags.includes(e.type))return x.getModelByTag(e.type);throw Error(`Not expecting tag: ${e.type}`)}},x.modelsArr()],t=[].concat.apply([],e);return h.gK.union.apply(null,t)},unionTag:function(e){return h.gK.maybeNull(h.gK.enumeration("unionTag",e))},tagsTypes:function(e){const t=h.gK.frozen(e.map((e=>e.toLowerCase())));return t.describe=()=>`(${e.join("|")})`,t.value=e,t},isType:function(e,t){const n=(0,h.Pw)(e);for(const e of t)if(n===e)return!0;return!1},getParentOfTypeString:function(e,t){let n=(0,h.PA)(e);for(Array.isArray(t)||(t=[t]);n;){const e=(0,h.Pw)(n).name;if(t.find((t=>t===e)))return n;n=(0,h.jX)(n)?null:(0,h.PA)(n)}return null},getParentTagOfTypeString:function(e,t){let n=(0,h.PA)(e);for(Array.isArray(t)||(t=[t]);n;){const e=n.type;if(t.find((t=>t===e)))return n;n=(0,h.jX)(n)?null:(0,h.PA)(n)}return null},tagsArray:Ee(Ae),toolsArray:Ee(_e(x.getTool,"Not expecting tool: "))},Pe=h.gK.model("AnnotationMixin",{}).views((e=>({get annotation(){var t;if((0,O.VS)(O.F5)&&!window.STORE_INIT_OK&&console.error("LSF: annotation accessed before store is initialized",e),!(0,h._n)(e))return null;if((0,O.VS)(O.cE)){var n;const t=(0,h.Zn)(e);return t===e?e.control?e.control.annotation:e.obj?e.obj.annotation:null:null!=(n=t.annotationStore)&&n.selectedHistory?t.annotationStore.selectedHistory:Te.getParentOfTypeString(e,"Annotation")}const r=e.annotationStore;return null!=(t=null==r?void 0:r.selectedHistory)?t:null==r?void 0:r.selected},get annotationStore(){const t=(0,h.Zn)(e);return t===e?e.control?(0,h.Zn)(e.control).annotationStore:e.obj?(0,h.Zn)(e.obj).annotationStore:null:t.annotationStore}}))),Ie=h.gK.model({}).volatile((()=>({_isReady:!0}))).views((e=>({get isReady(){return e._isReady}}))).actions((e=>({setReady(t){e._isReady=t}}))),Le=Ie,Me=Ie.views((e=>({get isReady(){var t;return e._isReady&&!(null!=(t=e.regs)&&t.filter((e=>!e.isReady)).length)}})));var Ke=n(41880),De=n.n(Ke);const Ne={csv(e,t={}){var n;const r=!t.headless,{data:o,meta:{fields:i}}=De().parse(e,{delimiter:t.separator,header:r}),{column:a=(r?i[0]:0)}=t,s=o[0];let l=s[a];var c;void 0===l&&(l=s[null!=(c=i[a])?c:i[0]]);return String(null!=(n=l)?n:"")}},Ve=h.gK.model({resolver:h.gK.maybeNull(h.gK.string)}).actions((e=>({updateLocalValue(t){e._value=t},updateValue(t){var n,r;e._value=j(e.value,null!=(n=null==t||null==(r=t.task)?void 0:r.dataObj)?n:{})},resolveValue:(0,h.L3)((function*(t){if(!e.resolver)return t;const{type:n,options:r}=k(e.resolver);if(!Object.prototype.hasOwnProperty.call(Ne,n))return console.error(`Resolver "${null!=n?n:e.resolver}" looks unfamiliar`),t;const o=yield fetch(t),i=yield o.text();return Ne[n](i,r)}))}))),ze=Ve;class Be{constructor(){this.syncTargets=new Map,this.locked=null,this.audioTags=0}register(e){this.syncTargets.set(e.name,e),"audio"===e.type&&(this.audioTags+=1)}unregister(e){this.syncTargets.delete(e.name),"audio"===e.type&&(this.audioTags-=1)}sync(e,t,n){if(this.locked&&this.locked!==n||console.log("SYNC",{event:t,locked:this.locked,data:e,origin:n}),this.locked&&this.locked!==n)return!1;this.locked||setTimeout((()=>this.locked=null),100),this.locked=n;for(const r of this.syncTargets.values())n!==r.name&&r.syncReceive(e,t);return!0}}const He={managers:new Map,get(e,t){let n=this.managers.get(e);return!n&&t&&(n=this.managers.get(t)),n||(n=new Be,this.managers.set(e,n)),n}},Fe=h.gK.model("SyncableMixin",{name:h.gK.string,type:h.gK.string,sync:h.gK.optional(h.gK.string,"")}).volatile((()=>({syncHandlers:new Map,syncManager:null}))).actions((()=>({syncMuted(e){}}))).actions((e=>({afterCreate(){e.sync&&(e.syncManager=He.get(e.sync,e.name),e.syncManager.register(e),e.registerSyncHandlers())},registerSyncHandlers(){},syncSend(t,n){if(!e.sync)return;e.syncManager.sync(t,n,e.name)&&"play"===n&&e.syncMuted("audio"!==e.type&&e.syncManager.audioTags>0)},syncReceive(t,n){const r=e.syncHandlers.get(n);"play"===n&&e.syncMuted("audio"!==e.type),r&&r(t,n)},destroy(){e.syncManager.unregister(e)}}))),We=h.gK.model({meta:h.gK.frozen({}),normInput:h.gK.maybeNull(h.gK.string)}).preProcessSnapshot((e=>{var t,n;return e.meta?Object.assign({},e,{normInput:null!=(t=null==(n=e.meta)||null==(n=n.text)?void 0:n[0])?t:null}):e})).actions((e=>({setMetaValue(t,n){e.meta=Object.assign({},e.meta,{[t]:n})},setMetaText(t){if(t)e.meta=Object.assign({},e.meta,{text:[t]});else{const t=Object.assign({},e.meta);delete t.text,e.meta=t}},setNormInput(t){e.normInput=t}}))).actions((e=>({deleteMetaText(){e.setMetaText("")}}))),$e=h.gK.model("ReadOnlyControlMixin",{}).views((e=>({isReadOnly(){var t,n;return(null==(t=e.result)?void 0:t.isReadOnly())||(null==(n=e.annotation)?void 0:n.isReadOnly())}}))),Ue=h.gK.model("ReadOnlyRegionMixin",{readonly:h.gK.optional(h.gK.boolean,!1)}).views((e=>({isReadOnly(){var t;return!!(0,h._n)(e)&&(e.locked||e.readonly||e.annotation.isReadOnly()||e.parent&&((null==e.parent.isReadOnly?void 0:e.parent.isReadOnly())||(null==(t=e.parent.result)||null==t.isReadOnly?void 0:t.isReadOnly())))}})));var Ze=n(50494),Ge=n(18094);const Ye=100,Xe=100,qe="edge",Je="center",Qe=(0,y.PA)((0,p.forwardRef)((({imageEntity:e,imageTransform:t,updateImageSize:n,usedValue:r,size:o,overlay:i},a)=>{const s=(0,p.useMemo)((()=>({width:1===o.width?"100%":o.width,height:1===o.height?"auto":o.height})),[o]),l=(0,p.useCallback)((t=>{n(t),e.setImageLoaded(!0)}),[n,e]);return(0,_.jsxs)(Ze.eB,{name:"image",style:s,children:[i,(0,_.jsx)(et,{downloading:e.downloading,progress:e.progress,error:e.error,src:e.src,usedValue:r}),e.downloaded?(0,_.jsx)(nt,{alt:"image",ref:a,src:e.currentSrc,onLoad:l,isLoaded:e.imageLoaded,imageTransform:t}):null]})}))),et=(0,y.PA)((({downloading:e,progress:t,error:n,src:r,usedValue:o})=>e?(0,_.jsxs)(Ze.eB,{name:"image-progress",children:[(0,_.jsx)(Ze.Sl,{name:"message",children:"Downloading image"}),(0,_.jsx)(Ze.Sl,{tag:"progress",name:"bar",value:t,min:"0",max:1,step:1e-4})]}):n?(0,_.jsx)(rt,{src:r,value:o}):null)),tt={};(0,O.VS)(O.xS)&&(tt.crossOrigin="anonymous");const nt=(0,y.PA)((0,p.forwardRef)((({src:e,onLoad:t,imageTransform:n,isLoaded:r},o)=>{const i=(0,p.useMemo)((()=>{const e=null!=n?n:{};return Object.assign({},e,{visibility:r?"visible":"hidden"})}),[n,r]);return(0,_.jsx)("img",Object.assign({},tt,{ref:o,alt:"image",src:e,onLoad:t,style:i}))}))),rt=({src:e,value:t})=>{const n=(0,p.useMemo)((()=>Ge.A.ERR_LOADING_HTTP({url:e,error:"",attr:t})),[e]);return(0,_.jsx)(ke,{error:n})},ot=h.gK.model({pid:h.gK.optional(h.gK.string,E),score:h.gK.maybeNull(h.gK.number),filtered:h.gK.optional(h.gK.boolean,!1),parentID:h.gK.optional(h.gK.string,""),fromSuggestion:!1,dynamic:!1,origin:h.gK.optional(h.gK.enumeration(["prediction","prediction-changed","manual"]),"manual"),item_index:h.gK.maybeNull(h.gK.number)}).volatile((()=>({_highlighted:!1,hidden:!1,locked:!1,isDrawing:!1,perRegionFocusRequest:null,shapeRef:null,drawingTimeout:null}))).views((e=>({get perRegionStates(){const t=e.states;return t&&t.filter((e=>!0===e.perregion))},get store(){return(0,h.Zn)(e)},get parent(){return(0,h.PA)(e)},get editable(){throw new Error("Not implemented")},get isCompleted(){return!e.isDrawing},get highlighted(){return e._highlighted},get inSelection(){var t;return null==(t=e.annotation)?void 0:t.regionStore.isSelected(e)},get isReady(){return!0},get currentImageEntity(){var t;return e.parent.findImageEntity(null!=(t=e.item_index)?t:0)},getConnectedDynamicRegions(t){var n;const{regions:r=[]}=(null==(n=(0,h.Zn)(e).annotationStore)?void 0:n.selected)||{},{type:o,labelName:i}=e;return r.filter((n=>{var r,a;if(t&&n===e)return!1;return(!e.supportSuggestions||e.dynamic)&&n.type===o&&n.labelName===i&&(null==(r=n.results)||null==(r=r[0])?void 0:r.to_name)===(null==(a=e.results)||null==(a=a[0])?void 0:a.to_name)}))},get isRealRegion(){var t;return null==(t=e.annotation)||null==(t=t.areas)?void 0:t.has(e.id)},get shouldNotifyDrawingFinished(){if(!e.isRealRegion)return!1;if(e.annotation.isSuggestionsAccepting)return!1;const t=!e.supportSuggestions||e.dynamic&&!e.fromSuggestion;return e.results.some((e=>e.from_name.smartEnabled))&&t}}))).actions((e=>({setParentID(t){e.parentID=t},setDrawing(t){e.isDrawing=t},setShapeRef(t){t&&(e.shapeRef=t)},setItemIndex(t){if(!(0,w.isDefined)(t))throw new Error("Index must be provided for",e);e.item_index=t},beforeDestroy(){if(e.isRealRegion)return e.beforeDestroyArea()},beforeDestroyArea(){e.notifyDrawingFinished({destroy:!0})},setLocked(t){e.locked=t instanceof Function?t(e.locked):t},makeDynamic(){e.dynamic=!0},convertXToPerc:t=>t*Ye/e.currentImageEntity.stageWidth,convertYToPerc:t=>t*Xe/e.currentImageEntity.stageHeight,convertHDimensionToPerc:t=>t*(e.scaleX||1)*Ye/e.currentImageEntity.stageWidth,convertVDimensionToPerc:t=>t*(e.scaleY||1)*Xe/e.currentImageEntity.stageHeight,updateAppearenceFromState(){},serialize(){console.error("Region class needs to implement serialize")},selectRegion(){},unselectRegion(e=!1){console.log("UNSELECT REGION","you should not be here")},afterUnselectRegion(){},onClickRegion(t){const n=e.annotation;(e.isReadOnly()||!e.isDrawing&&!n.isDrawing)&&(!e.isReadOnly()&&n.isLinkingMode?(n.addLinkedRegion(e),n.stopLinkingMode(),n.regionStore.unselectAll()):e._selectArea((null==t?void 0:t.ctrlKey)||(null==t?void 0:t.metaKey)))},_selectArea(t=!1){this.cancelPerRegionFocus();const n=e.annotation;if(t)n.toggleRegionSelection(e);else{!e.selected?n.selectArea(e):n.unselectAll()}},requestPerRegionFocus(){e.perRegionFocusRequest=Date.now()},cancelPerRegionFocus(){e.perRegionFocusRequest=null},setHighlight(t){e._highlighted=t},toggleHighlight(){e.setHighlight(!e._highlighted)},toggleFiltered(t){e.filtered=!e.filtered,e.toggleHidden(t,!0),t&&t.stopPropagation()},toggleHidden(t,n=!1){n||(e.filtered=!1),e.hidden=!e.hidden,t&&t.stopPropagation()},notifyDrawingFinished({destroy:t=!1}={}){if("prediction"===e.origin&&(e.origin="prediction-changed"),e.shouldNotifyDrawingFinished&&(clearTimeout(e.drawingTimeout),!1===e.isDrawing)){const n=(0,h.Pw)(e).name.match(/brush/i)?1200:0,r=(0,h._$)(e);e.drawingTimeout=setTimeout((()=>{const n=e.getConnectedDynamicRegions(t);r.events.invoke("regionFinishedDrawing",e,n)}),n)}}}))),it=h.gK.compose(ot,Ue,Pe),at=h.gK.model("Result",{id:h.gK.optional(h.gK.identifier,E),score:h.gK.maybeNull(h.gK.number),readonly:h.gK.optional(h.gK.boolean,!1),from_name:h.gK.late((()=>h.gK.reference(h.gK.union(...x.modelsArr())))),to_name:h.gK.late((()=>h.gK.reference(h.gK.union(...x.objectTypes())))),type:h.gK.enumeration(["labels","hypertextlabels","paragraphlabels","rectangle","keypoint","polygon","brush","ellipse","magicwand","rectanglelabels","keypointlabels","polygonlabels","brushlabels","ellipselabels","timeserieslabels","timelinelabels","choices","datetime","number","taxonomy","textarea","rating","pairwise","videorectangle","ranker"]),value:h.gK.model({ranker:h.gK.union(h.gK.array(h.gK.string),h.gK.frozen(),h.gK.null),datetime:h.gK.maybe(h.gK.string),number:h.gK.maybe(h.gK.number),rating:h.gK.maybe(h.gK.number),item_index:h.gK.maybeNull(h.gK.number),text:h.gK.maybe(h.gK.union(h.gK.string,h.gK.array(h.gK.string))),choices:h.gK.maybe(h.gK.array(h.gK.union(h.gK.string,h.gK.array(h.gK.string)))),selected:h.gK.maybe(h.gK.enumeration(["left","right"])),labels:h.gK.maybe(h.gK.array(h.gK.string)),htmllabels:h.gK.maybe(h.gK.array(h.gK.string)),hypertextlabels:h.gK.maybe(h.gK.array(h.gK.string)),paragraphlabels:h.gK.maybe(h.gK.array(h.gK.string)),rectanglelabels:h.gK.maybe(h.gK.array(h.gK.string)),keypointlabels:h.gK.maybe(h.gK.array(h.gK.string)),polygonlabels:h.gK.maybe(h.gK.array(h.gK.string)),ellipselabels:h.gK.maybe(h.gK.array(h.gK.string)),brushlabels:h.gK.maybe(h.gK.array(h.gK.string)),timeserieslabels:h.gK.maybe(h.gK.array(h.gK.string)),timelinelabels:h.gK.maybe(h.gK.array(h.gK.string)),taxonomy:h.gK.frozen(),sequence:h.gK.frozen()}),meta:h.gK.frozen()}).views((e=>({get perRegionStates(){const t=e.states;return t&&t.filter((e=>!0===e.perregion))},get store(){return(0,h.Zn)(e)},get area(){return(0,h.PA)(e,2)},get mainValue(){return e.value[e.from_name.valueType]},mergeMainValue(t){var n,r,o;t=null!=(n=t)&&n.toJSON?t.toJSON():t;const i=null!=(r=e.mainValue)&&null!=r.toJSON&&r.toJSON()?null==(o=e.mainValue)||null==o.toJSON?void 0:o.toJSON():e.mainValue;return typeof t!=typeof i?null:e.type.endsWith("labels")?t.filter((e=>i.includes(e))):t===i?t:null},get hasValue(){const t=e.mainValue;return!!(0,w.isDefined)(t)&&(!Array.isArray(t)||t.length>0)},get editable(){throw new Error("Not implemented")},isReadOnly:()=>e.readonly||e.area.isReadOnly(),isSelfReadOnly:()=>e.readonly,getSelectedString(t=" "){var n;return(null==(n=e.mainValue)?void 0:n.join(t))||""},get selectedLabels(){var t,n,r;return 0===(null==(t=e.mainValue)?void 0:t.length)&&e.from_name.allowempty?e.from_name.findLabel(null):null!=(n=null==(r=e.mainValue)?void 0:r.map((t=>e.from_name.findLabel(t))).filter(Boolean))?n:[]},get canBeSubmitted(){const t=e.from_name;if(t.perregion){const n=t.whenlabelvalue;if(n&&!e.area.hasLabel(n))return!1}const n=e=>e.map((e=>Array.isArray(e)?e.at(-1):e)),r=()=>{var r,o;const i=t.whentagname,a=null!=(r=null==(o=t.whenchoicevalue)?void 0:o.split(","))?r:null,s=e.annotation.results.filter((t=>["choices","taxonomy"].includes(t.type)&&t!==e));if(i){const t=s.find((t=>t.from_name.name===i&&(!t.from_name.perregion||t.area===e.area)));if(!t)return!1;if(a&&!a.some((e=>n(t.mainValue).some((n=>t.from_name.selectedChoicesMatch(e,n))))))return!1}else{if(!s.length)return!1;if(a&&!s.some((e=>a.some((t=>n(e.mainValue).some((n=>e.from_name.selectedChoicesMatch(t,n))))))))return!1}return!0};return"choice-selected"===t.visiblewhen?r():"choice-unselected"!==t.visiblewhen||!r()},get tag(){const t=e.mainValue;return t&&t.length&&e.from_name.findLabel?e.from_name.findLabel(t[0]):null},get style(){var t;if(!e.tag)return null;const n=e.tag.background||(null==(t=e.tag.parent)?void 0:t.fillcolor);if(!n)return null;const r=e.tag.background||e.tag.parent.strokecolor,{strokewidth:o,fillopacity:i,opacity:a}=e.tag.parent;return{strokecolor:r,strokewidth:o,fillcolor:n,fillopacity:i,opacity:a}},get emptyStyle(){const t=e.from_name.emptyLabel;if(!t)return null;const n=t.background||t.parent.fillcolor;if(!n)return null;const r=t.background||t.parent.strokecolor,{strokewidth:o,fillopacity:i,opacity:a}=t.parent;return{strokecolor:r,strokewidth:o,fillcolor:n,fillopacity:i,opacity:a}},get controlStyle(){if(!e.from_name)return null;const{fillcolor:t,strokecolor:n,strokewidth:r,fillopacity:o,opacity:i}=e.from_name;return{strokecolor:n,strokewidth:r,fillcolor:t,fillopacity:o,opacity:i}}}))).volatile((()=>({pid:"",selected:!1}))).actions((e=>({setValue(t){e.value[e.from_name.valueType]=t},afterCreate(){e.pid=e.id},afterAttach(){},setParentID(t){e.parentID=t},setMetaValue(t,n){e.meta=Object.assign({},e.meta,{[t]:n})},updateAppearenceFromState(){},serialize(t){var n;const r=(0,h.dV)(e),{type:o,score:i,value:a,meta:s}=r,{valueType:l}=e.from_name,c=e.area?e.area.serialize(t):{},d=null==(n=e.area)?void 0:n.cleanId,u=D.cleanUpId(r.from_name),g=D.cleanUpId(r.to_name);if(!c)return null;if(!e.canBeSubmitted)return null;if((0,w.isDefined)(c.value)||(c.value={}),e.to_name.mergeLabelsAndResults){var m;if("labels"===o)return null;o.endsWith("labels")||null==(m=e.area)||null==(m=m.labels)||!m.length||e.from_name.perregion||(c.value.labels=e.area.labels)}const p=e.from_name.metaValue;p&&(c.meta=Object.assign({},c.meta,p));const f=e.area.meta;return f&&Object.keys(f).length&&(c.meta=Object.assign({},c.meta,f)),s&&(c.meta=Object.assign({},c.meta,s)),e.area.parentID&&(c.parentID=e.area.parentID.replace(/#.*/,"")),Object.assign(c,{id:d,from_name:u,to_name:g,type:o,origin:e.area.origin}),(0,w.isDefined)(a[l])&&Object.assign(c.value,{[l]:a[l]}),"number"==typeof i&&(c.score=i),e.isSelfReadOnly()&&(c.readonly=!0),(0,O.VS)(O.gF)&&(0,w.isDefined)(e.area.item_index)&&(c.item_index=e.area.item_index),c},deleteRegion(){e.annotation.isReadOnly()||(e.unselectRegion(),e.annotation.relationStore.deleteNodeRelation(e),"polygonregion"===e.type&&e.destroyRegion(),e.annotation.regionStore.deleteRegion(e),e.annotation.deleteRegion(e))},setHighlight(t){e._highlighted=t},toggleHighlight(){e.setHighlight(!e._highlighted)},toggleHidden(){e.hidden=!e.hidden}}))),st=h.gK.compose("Result",at,Pe),lt={TAG:"tag",REGION_LIST:"region-list"},ct=h.gK.model({perregion:h.gK.optional(h.gK.boolean,!1),whenlabelvalue:h.gK.maybeNull(h.gK.string),displaymode:h.gK.optional(h.gK.enumeration(Object.values(lt)),lt.TAG)}).extend((e=>{if(!0!==e.isClassificationTag)throw new Error("The PerRegionMixin mixin should be used only for classification control-tags");return{}})).volatile((()=>({focusable:!1}))).views((e=>({get perRegionArea(){return e.perregion?e.annotation.highlightedNode:null},get _perRegionResult(){const t=e.perRegionArea;return t?e.annotation.results.find((n=>n.from_name===e&&n.area===t)):null},perRegionVisible(){if(!e.perregion)return!0;const t=e.perRegionArea;return!!t&&(t.parent.name===e.toname&&(null===e.whenlabelvalue||void 0===e.whenlabelvalue||t.hasLabel(e.whenlabelvalue)))}}))).actions((e=>({_validatePerRegion(){const t=e.toNameTag;for(const r of t.allRegs){var n;const t=null==(n=r.results.find((t=>t.from_name===e)))?void 0:n.mainValue;if(!e.validateValue(t))return e.annotation.selectArea(r),!1}return!0},createPerRegionResult(){var t;null==(t=e.perRegionArea)||t.setValue(e)}})));let dt=1;const ut=h.gK.model({id:h.gK.optional(h.gK.identifier,E),ouid:h.gK.optional(h.gK.number,(()=>dt++)),results:h.gK.array(st),parentID:h.gK.maybeNull(h.gK.string)}).views((e=>({get cleanId(){return e.id.replace(/#.*/,"")},get labelings(){return e.results.filter((e=>e.from_name.isLabeling))},get labeling(){if((0,h._n)(e))return e.results.find((e=>e.from_name.isLabeling&&e.hasValue))},get emptyLabel(){var t;return null==(t=e.results.find((e=>{var t;return null==(t=e.from_name)?void 0:t.emptyLabel})))||null==(t=t.from_name)?void 0:t.emptyLabel},get texting(){return(0,h._n)(e)&&e.results.find((e=>"textarea"===e.type&&e.hasValue))},get tag(){var t;return null==(t=e.labeling)?void 0:t.from_name},hasLabel(t){var n;const r=null==(n=e.labeling)?void 0:n.mainValue;return!(!r||!t)&&(!!r.includes(t)||!!t.includes(",")&&t.split(",").some((e=>r.includes(e))))},get perRegionTags(){var t;return(null==(t=e.annotation.toNames.get(e.object.name))?void 0:t.filter((e=>e.perregion)))||[]},get labelingTags(){var t;return(0,O.VS)(O.um)&&(null==(t=e.annotation.toNames.get(e.object.name))?void 0:t.filter((e=>e.classification&&e.isLabeling)))||[]},get perRegionDescControls(){return e.perRegionTags.filter((e=>e.displaymode===lt.REGION_LIST))},get perRegionFocusTarget(){return e.perRegionTags.find((e=>!1!==e.isVisible&&e.focusable))},get labelName(){var t,n;if((0,h._n)(e))return(null==(t=e.labeling)||null==(t=t.mainValue)?void 0:t[0])||(null==(n=e.emptyLabel)?void 0:n._value)},get labels(){var t,n;return Array.from(null!=(t=null==(n=e.labeling)?void 0:n.mainValue)?t:[])},getLabelText(t){var n;const r=e.region_index,o=e.labeling,i=null==(n=e.texting)||null==(n=n.mainValue)||null==(n=n[0])?void 0:n.replace(/\n\r|\n/," "),a=null==o?void 0:o.getSelectedString(t),s=[];return r&&s.push(String(r)),a&&s.push(a),i&&s.push(i),s.join(": ")},get parent(){if((0,h._n)(e))return e.object},get style(){if(!(0,h._n)(e))return;const t=e.results.find((e=>e.style));if(t&&t.style)return t.style;const n=e.results.find((e=>e.emptyStyle));if(n&&n.emptyStyle)return n.emptyStyle;const r=e.results.find((t=>e.type.startsWith(t.type)));return r&&r.controlStyle},get selected(){var t;return(null==(t=e.annotation)?void 0:t.highlightedNode)===e},getOneColor:()=>(e.style||V.l).fillcolor,get highlighted(){var t;return null!=(t=e.parent)&&null!=(t=t.selectionArea)&&t.isActive?e.isInSelectionArea:e._highlighted},get isInSelectionArea(){var t;return!((0,O.VS)(O.q$)&&e.hidden||null==(t=e.parent)||null==(t=t.selectionArea)||!t.isActive)&&e.parent.selectionArea.intersectsBbox(e.bboxCoords)},get supportSuggestions(){return e.object.supportSuggestions}}))).volatile((()=>({region_index:null}))).actions((e=>({setRegionIndex(t){e.region_index!==t&&(e.region_index=t,null==e.updateAppearenceFromState||e.updateAppearenceFromState())},beforeDestroy(){e.results.forEach((e=>(0,h.zr)(e)))},setSelected(t){e.selected=t},deleteRegion(){e.annotation.isReadOnly()||e.isReadOnly()||(e.selected&&e.annotation.unselectAll(!0),e.destroyRegion&&e.destroyRegion(),e.annotation.deleteRegion(e))},addResult(t){e.results.push(t)},applyAdditionalDataFromResult(e){},removeResult(t){const n=e.results.indexOf(t);n<0||(e.results.splice(n,1),(0,h.zr)(t),e.results.length||e.annotation.deleteArea(e))},setValue(t){const n=e.results.find((e=>e.from_name===t)),r=t.selectedValues();n?t.holdsState?n.setValue(r):e.removeResult(n):e.results.push({area:e,from_name:t,to_name:e.object,type:t.resultType,value:{[t.valueType]:r}}),e.updateAppearenceFromState&&e.updateAppearenceFromState()}}))),ht=h.gK.compose("AreaMixin",ut,Ue);var gt=n(72902),mt=n(75696),pt=n.n(mt);const ft=(()=>{const e={};return e.floodFill=(e,t,n,r,o)=>{let i,a,s,l,c,d,u,h,g,m;const p=e.data,f=e.width,v=e.height,y=e.bytes;let b=-1,x=f+1,w=-1,C=v+1,S=n*f+t;const j=new Uint8Array(f*v),k=new Uint8Array(o||f*v);if(1===k[S])return null;S*=y;const O=[p[S],p[S+1],p[S+2],p[S+3]],R=[{y:n,left:t-1,right:t+1,dir:1}];do{for(l=R.shift(),m=!1,a=l.left+1;ar||i<-r||(i=p[S+1]-O[1],i>r||i<-r||(i=p[S+2]-O[2],i>r||i<-r))))){for(m=!0,j[u+a]=1,k[u+a]=1,d=a-1;!(!(d>-1&&(h=u+d,S=h*y,1!==k[h]))||(i=p[S]-O[0],i>r||i<-r)||(i=p[S+1]-O[1],i>r||i<-r)||(i=p[S+2]-O[2],i>r||i<-r));)j[h]=1,k[h]=1,d--;for(c=a+1;!(!(cr||i<-r)||(i=p[S+1]-O[1],i>r||i<-r)||(i=p[S+2]-O[2],i>r||i<-r));)j[g]=1,k[g]=1,c++;db&&(b=c-1),s=l.y-l.dir,s>=0&&s=0&&sw&&(w=l.y))}while(R.length>0);return{data:j,width:e.width,height:e.height,bounds:{minX:x,minY:C,maxX:b,maxY:w}}},e.gaussBlur=(e,t)=>{let n,r,o,i,a,s,l,c;const d=2*t+1,u=t*t,h=new Float32Array(d);let g=0;const m=e.width,p=e.height,f=e.data,v=e.bounds.minX,y=e.bounds.maxX,b=e.bounds.minY,x=e.bounds.maxY;for(n=0;n0?t-i:0,c=C-i0?t-a:0,c=S-a.5?1:0}return{data:w,width:m,height:p,bounds:{minX:v,minY:b,maxX:y,maxY:x}}},e.gaussBlurOnlyBorder=(e,t,n)=>{const r=function(e,t,n){let r,o,i,a,s,l,c;const d=e.width,u=e.height,h=e.data,g=new Uint8Array(h),m=e.bounds.minX,p=e.bounds.maxX,f=e.bounds.minY,v=e.bounds.maxY;let y=d*u;const b=new Uint8Array(y),x=[],w=Math.max(m,1),C=Math.min(p,d-2),S=Math.max(f,1),j=Math.min(v,u-2);if(n&&n.length>0)for(s=0;s0?t-r:0,R=E-r0?t-a:0,R=_-a0?t-d:0,m=E-d.5)R[l]=1,dS&&(S=d),uk&&(k=u);else{for(g=t-u>0?t-u:0,m=_-u.5?(R[l]=1,dS&&(S=d),uk&&(k=u)):R[l]=0}}return{data:R,width:b,height:x,bounds:{minX:C,minY:j,maxX:S,maxY:k}}},e.createBorderMask=e=>{let t,n,r,o,i;const a=e.width,s=e.height,l=e.data,c=e.bounds.minX,d=e.bounds.maxX,u=e.bounds.minY,h=e.bounds.maxY,g=d-c+1,m=h-u+1,p=new Uint8Array(g*m),f=Math.max(c,1),v=Math.min(d,a-2),y=Math.max(u,1),b=Math.min(h,s-2);for(n=y;n{let t,n,r,o,i;const a=e.width,s=e.height,l=e.data,c=[],d=a-1,u=s-1;for(n=1;n{const t=function(e){let t,n;const r=e.width,o=e.data,i=e.bounds.minX,a=e.bounds.maxX,s=e.bounds.minY,l=e.bounds.maxY,c=a-i+3,d=l-s+3,u=new Uint8Array(c*d);for(n=s;n{const r=e.length,o=[];let i,a,s,l,c,d,u,h,g,m,p,f,v,y,b,x,w,C,S,j,k;for(a=0;a=Math.sqrt(b*b+x*x)?b:b>=Math.sqrt(y*y+x*x)?y:Math.abs((C*S.x-w*S.y+j.x*k.y-k.x*j.y)/x),v>p&&(f=i,p=v);p>t&&(h.push(f),g.push({first:m.first,last:f}),g.push({first:f,last:m.last}))}}while(g.length>0);for(u=[],d=h.length,h.sort(((e,t)=>e-t)),s=0;si&&(n=Math.abs(r-i),r=i,i=r+n),o>a&&(n=Math.abs(o-a),o=a,a=o+n),{x1:r,y1:o,x2:i,y2:a}}function xt(e,t){const n=e.stageRef.getLayers().filter((e=>e.attrs.id===t.id))[0].canvas.context,r=n.getImageData(0,0,n.canvas.width,n.canvas.height),o=[];for(let t=0;t0||n>0||i>0||a>0?o.push(1):o.push(0)}return o}function wt(e,t){let n,r,o,i;return[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}].forEach((e=>{const a=t.point(e);void 0===n&&(n=o=a.x,r=i=a.y),n=Math.min(n,a.x),r=Math.min(r,a.y),o=Math.max(o,a.x),i=Math.max(i,a.y)})),{x:n,y:r,width:o-n,height:i-r}}function Ct(e,t,n=0){const r=new yt.A.Transform;return r.translate(t.x,t.y),r.rotate(n),wt(e,r)}function St(e,t,n){let{x:r,y:o,width:i,height:a}=e;return r<0?(i+=r,r=0):r+i>t&&(i=t-r),o<0?(a+=o,o=0):o+a>n&&(a=n-o),Object.assign({},e,{x:r,y:o,width:i,height:a})}function jt(e,t={x:0,y:0}){const{parent:n}=e;return r=>n.fixForZoomWrapper(r,(r=>{let{x:o,y:i}=r;(0,O.VS)(O.MV)&&(o=n.canvasToInternalX(o),i=n.canvasToInternalY(i)),o-=t.x,i-=t.y;const a=e.selected||!e.inSelection,{top:s,left:l,right:c,bottom:d}=e.bboxCoords,{top:u,left:h,right:g,bottom:m}=(null==n?void 0:n.selectedRegionsBBox)||{},p=a?{x:o,y:i,width:c-l,height:d-s}:{x:h-l+o,y:u-s+i,width:g-h,height:m-u},f=(0,O.VS)(O.MV)?St(p,100,100):St(p,n.stageWidth,n.stageHeight);return f.width!==p.width&&(o+=(f.width-p.width)*(f.x!==p.x?-1:1)),f.height!==p.height&&(i+=(f.height-p.height)*(f.y!==p.y?-1:1)),o+=t.x,i+=t.y,(0,O.VS)(O.MV)?{x:n.internalToCanvasX(o),y:n.internalToCanvasY(i)}:{x:o,y:i}}))}function kt(e,t,n,r,o,i,a,s,l,c,d){let u,h;d?(u=Math.min(i,r),h=Math.min(a,o)):(u=i,h=a);const g=document.createElement("canvas");g.width=u,g.height=h;const m=g.getContext("2d"),[p,f]=Ot(t,n,r,o,l,c);let v,y;d?(v=t,y=n):(v=Math.ceil(i/r*t),y=Math.ceil(a/o*n));const b=p,x=f,w=v,C=y,S=u,j=h;let k;m.drawImage(e,b,x,w,C,0,0,S,j);try{k=m.getImageData(0,0,g.width,g.height)}catch(e){const t="Please configure CORS cross-domain headers correctly for getting image labeling data";throw alert(t),console.error(t),t}return[k,g]}function Ot(e,t,n,r,o,i){const a=Math.abs(o)/n,s=Math.abs(i)/r;return[Math.floor(a*e),Math.floor(s*t)]}function Rt(e){let t=e/1e3;const n=Number.parseInt(t/3600);t%=3600;const r=Number.parseInt(t/60);return t=Math.floor(t),`${n}:${r}:${t}`}function Et(e){if(!("string"==typeof e||e instanceof Date||(t=e,/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/.test(t))))return;var t;const n=new Date(e),r=((new Date).getTime()-n.getTime())/1e3,o=Math.floor(r/86400);return isNaN(o)||o<0?void 0:0===o&&((r<60?"just now":r<120&&"1 minute ago")||r<3600&&`${Math.floor(r/60)} minutes ago`||r<7200&&"1 hour ago"||r<86400&&`${Math.floor(r/3600)} hours ago`)||1===o&&"Yesterday"||o<7&&`${o} days ago`||o<31&&`${Math.ceil(o/7)} weeks ago`||`${o} days ago`}function _t(e){const t=6e4*(e=e||new Date).getTimezoneOffset();return new Date(e.getTime()-t).toISOString().slice(0,-1)}function At(){return _t()}const Tt=e=>e&&e.nodeType===Node.TEXT_NODE,Pt=e=>e&&/[\w']/i.test(e),It=e=>e&&/[\s\t]/i.test(e),Lt=e=>{const t=e.getRangeAt(0),{startOffset:n,startContainer:r,endOffset:o,endContainer:i}=t;return{selection:e,range:t,startOffset:n,startContainer:r,endOffset:o,endContainer:i,firstSymbol:r.textContent[n],prevSymbol:r.textContent[n-1],lastSymbol:i.textContent[o-1],nextSymbol:i.textContent[o]}},Mt=e=>{(e=>{const t=e.getRangeAt(0);e.removeAllRanges(),e.collapse(t.startContainer,t.startOffset);let n=e.getRangeAt(0);do{e.collapse(n.endContainer,n.endOffset),e.modify("extend","forward","character"),n=e.getRangeAt(0)}while(!Tt(n.startContainer)||It(n.startContainer.textContent[n.startOffset]));t.setStart(n.startContainer,n.startOffset),e.removeAllRanges(),e.addRange(t)})(e),(e=>{const t=e.getRangeAt(0);e.removeAllRanges(),e.collapse(t.endContainer,t.endOffset);let n=e.getRangeAt(0);do{e.collapse(n.startContainer,n.startOffset),e.modify("extend","backward","character"),n=e.getRangeAt(0)}while(!Tt(n.startContainer)||It(n.startContainer.textContent[n.startOffset]));t.setEnd(n.endContainer,n.endOffset),e.removeAllRanges(),e.addRange(t)})(e)},Kt=(e,t)=>{const n="symbol"!==t,{startOffset:r,startContainer:o,endOffset:i,endContainer:a,firstSymbol:s,prevSymbol:l,lastSymbol:c,nextSymbol:d}=Lt(e);if(n)t.endsWith("boundary")?((e,t)=>{const{range:n,startOffset:r,startContainer:o,endOffset:i,endContainer:a}=Lt(e),s={};let l;e.collapse(o,r),e.modify("move","forward","character"),e.modify("move","backward",t),1===e.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START,n)&&(e.collapse(o,r),e.modify("move","backward",t)),l=e.getRangeAt(0),Object.assign(s,{startContainer:l.startContainer,startOffset:l.startOffset}),e.collapse(a,i),e.modify("move","backward","character"),e.modify("move","forward",t),-1===e.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START,n)&&(e.collapse(a,i),e.modify("move","forward",t)),l=e.getRangeAt(0),Object.assign(s,{endContainer:l.endContainer,endOffset:l.endOffset}),e.removeAllRanges();const c=new Range;c.setStart(s.startContainer,s.startOffset),c.setEnd(s.endContainer,s.endOffset),e.addRange(c)})(e,t):((e,t)=>{const{range:n,startOffset:r,startContainer:o,endOffset:i,endContainer:a}=Lt(e),s={};let l;for(e.collapse(a,i);1===e.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START,n);)e.modify("move","backward",t);for(;e.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START,n)<1;)l=e.getRangeAt(0),Object.assign(s,{startContainer:l.startContainer,startOffset:l.startOffset}),e.modify("move","forward",t);for(e.collapse(o,r);-1===e.getRangeAt(0).compareBoundaryPoints(Range.END_TO_END,n);)e.modify("move","forward",t);for(;e.getRangeAt(0).compareBoundaryPoints(Range.END_TO_END,n)>-1;)l=e.getRangeAt(0),Object.assign(s,{endContainer:l.endContainer,endOffset:l.endOffset}),e.modify("move","backward",t);e.removeAllRanges();const c=new Range;c.setStart(s.startContainer,s.startOffset),c.setEnd(s.endContainer,s.endOffset),e.addRange(c),Mt(e)})(e,t);else{if(!Pt(s)||Pt(l)){e.getRangeAt(0).setEnd(o,r),e.modify("move","backward",t)}if(!Pt(c)||Pt(d)){e.getRangeAt(0).setEnd(a,i),e.modify("extend","forward",t)}}},Dt=(e,{granularity:t,beforeCleanup:n,window:r}={granularity:"symbol"})=>{const o=r.getSelection();if(o.isCollapsed)return;if("symbol"!==t&&Mt(o),o.isCollapsed)return;Nt(o,t);const i=o.toString().replace(/[\n\r]/g,"\\n");for(let t=0;t{if(e.modify&&t&&"symbol"!==t)try{switch(t){case"word":Kt(e,"word");break;case"sentence":Kt(e,"sentenceboundary");break;case"paragraph":Kt(e,"paragraphboundary")}}catch(e){console.warn("Probably, you're using browser that doesn't support granularity.")}},Vt=(e,t,n,r="forward")=>{const o=t===e?t.childNodes[n]:t;if(Tt(o)&&!r.endsWith("next"))return o;const i=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ALL);let a,s=i.nextNode();for(;s&&s!==o;)Tt(s)&&(a=s),s=i.nextNode();if(s&&r.startsWith("backward"))return a;for("forward-next"===r&&(s=i.nextNode());s;){if(Tt(s))return s;s=i.nextNode()}},zt=e=>{const{endOffset:t,commonAncestorContainer:n}=e;let{startOffset:r,startContainer:o,endContainer:i}=e;if(!Tt(o)){if(o=Vt(n,o,r,"forward"),!o)return null;e.setStart(o,0),r=0}const a=e=>/^\s*$/.test(e.wholeText);if(o.wholeText.length===r||a(o)){do{if(o=Vt(n,o,r,"forward-next"),!o)return null}while(a(o));e.setStart(o,0),r=0}if(!Tt(i)){if(i=Vt(n,i,t,"backward"),!i)return null;for(;/^\s*$/.test(i.wholeText);)if(i=Vt(n,i,t,"backward-next"),!i)return null;e.setEnd(i,i.length)}return e},Bt=(e,{index:t,label:n,classNames:r})=>{const{startContainer:o,endContainer:i,commonAncestorContainer:a}=e,{startOffset:s,endOffset:l}=e,c=[],d=(...e)=>Ht(...e,r);if(o===i)c.push(d(o,s,l));else{$t(o,i,a).forEach((e=>{let t=s,n=l;e!==o&&(t=0),e!==i&&(n=e.length),c.push(d(e,t,n))}))}const u=c[c.length-1];return u&&(u.setAttribute("data-label",null!=n?n:""),u.setAttribute("data-index",t?String(t):"")),c},Ht=(e,t,n,r)=>{let o;const i=e.textContent,a=e.parentNode;if(0!==t||e.length!==n||!a.classList.contains(r[0])||(0,O.VS)(O.Er)&&a.innerText!==i){const s=i.substring(t,n),l=e.ownerDocument.createTextNode(s),c=e.cloneNode(),d=e.cloneNode();c.textContent=i.substring(0,t),d.textContent=i.substring(n,i.length);const u=e.ownerDocument.createDocumentFragment();o=Ft(l,r),c.length&&u.appendChild(c),u.appendChild(o),d.length&&u.appendChild(d),a.replaceChild(u,e)}else{const t=e.ownerDocument.createElement("span"),n=a.parentNode;n.replaceChild(t,a),o=Ft(a,r),n.replaceChild(o,t)}return o},Ft=(e,t,n)=>{const r=e.ownerDocument.createElement("span");return r.appendChild(e),Wt(r,{classNames:t,label:n}),r},Wt=(e,{classNames:t,index:n,label:r})=>{t&&(e.className="",e.classList.add(...t)),null!=r&&r.length?e.setAttribute("data-label",r):e.removeAttribute("data-label"),e.setAttribute("data-index",n?String(n):"")},$t=(e,t,n)=>{const r=n.ownerDocument.createTreeWalker(n,NodeFilter.SHOW_ALL);let o=!1;const i=[];let{currentNode:a}=r;for(;a&&(a===e&&(o=!0),o&&a.nodeType===Node.TEXT_NODE&&i.push(a),!o||a!==t);)a=r.nextNode();return i},Ut=e=>{e&&e.forEach((e=>{const t=e.ownerDocument.createDocumentFragment(),n=e.parentNode;Array.from(e.childNodes).forEach((e=>{e.remove(),t.appendChild(e)})),n.replaceChild(t,e),Array.from(n.childNodes).forEach((e=>{const t=e.previousSibling;Tt(t)&&Tt(e)&&(t.data+=e.data,e.remove())}))}))},Zt=(e,t,n)=>({startContainer:Yt(Jt(n,e,"right")),endContainer:Yt(Jt(n,t,"left"))}),Gt=(e,t,n)=>{var r;const{startContainer:o,endContainer:i}=Zt(e,t,n),a=(null!=(r=n.contentDocument)?r:n.ownerDocument).createRange();if(o&&i)return a.setStart(o.node,o.position),a.setEnd(i.node,i.position),a},Yt=({node:e,position:t}={})=>{if(!e)return;return{node:e,position:[...e.textContent].slice(0,t).join("").length}},Xt=({node:e,position:t})=>{const n=e.textContent.substr(0,t);return{node:e,position:[...n].length}},qt=e=>{const t=Xt({node:e.startContainer,position:e.startOffset}),n=Xt({node:e.endContainer,position:e.endOffset});return e.setStart(e.startContainer,t.position),e.setEnd(e.endContainer,n.position),e},Jt=(e,t,n="left")=>{var r;const o=(null!=(r=e.contentDocument)?r:e.ownerDocument).createTreeWalker(e,NodeFilter.SHOW_ALL);let i=0,a=o.nextNode(),s=o.nextNode(),l=!1;for(;a;){const e=a.nodeType===Node.TEXT_NODE,r="BR"===a.nodeName;if(r&&i++,e&&l)return{node:a,position:0};if(e){const e=[...a.textContent].length;if(e+i>=t||!s){if("right"!==n||e+i!==t||!s)return{node:a,position:r?0:(0,w.clamp)(t-i,0,e)};l=!0}i+=e}a=s,s=o.nextNode()}},Qt=(e,t)=>[en(e.startContainer,e.startOffset,t),en(e.endContainer,e.endOffset,t)],en=(e,t,n)=>{var r;const o=(null!=(r=n.contentDocument)?r:n.ownerDocument).createTreeWalker(n,NodeFilter.SHOW_ALL);let i=0,a=!1,s=o.nextNode();for(;s;){a=a||e===s;const n=e===s||s.contains(e),r=s.nodeType===Node.TEXT_NODE,l="BR"===s.nodeName;if(a&&!1===n)break;if(r||l){let e=(0,w.isDefined)(s.length)?[...s.textContent].length:1;n&&(e=Math.min(t,e)),i+=e}s=o.nextNode()}return i},tn=e=>{const t=window.getSelection(),n=document.createRange(),r=e.childNodes[0];n.setStart(r,0),n.setEnd(r,r.length);for(let e=t.rangeCount;e--;){const r=t.getRangeAt(e);if(r.compareBoundaryPoints(Range.START_TO_START,n)<1&&r.compareBoundaryPoints(Range.END_TO_END,n)>-1)return!0}return!1};function nn(e){return e?Object.entries(e).reduce(((e,[t,n])=>(e[`--${t}`]=n,e)),{}):null}const rn={Image:o,HTML:je,Checkers:w,Colors:gt,UDate:i,guidGenerator:E,debounce:Y,styleToProp:function(e){return e?e.split(";").filter((e=>e.split(":")[0]&&e.split(":")[1])).map((e=>[e.split(":")[0].trim().replace(/-./g,(e=>e.substr(1).toUpperCase())),e.split(":").slice(1).join(":").trim()])).reduce(((e,t)=>Object.assign({},e,{[t[0]]:t[1]})),{}):null},Magicwand:r,Selection:a},on=h.gK.model("AudioUltraRegionModel",{type:"audioregion",object:h.gK.late((()=>h.gK.reference(mj))),start:h.gK.number,end:h.gK.number,channel:h.gK.optional(h.gK.number,0),selectedregionbg:h.gK.optional(h.gK.string,"rgba(0, 0, 0, 0.5)")}).volatile((()=>({hideable:!0,_ws_region:null}))).views((e=>({get bboxTriggers(){var t,n;return[e.start,e.end,e._ws_region,null==(t=e.object)?void 0:t._ws,null==(n=e.object)?void 0:n._wfFrame]},get bboxCoordsCanvas(){if(!e.bboxTriggers)return null;const{_ws_region:t}=e;if(!t)return null;if(!t.inViewport)return null;const{xStart:n,xEnd:r,yStart:o,yEnd:i,visualizer:a}=t;return{left:(0,w.clamp)(n,0,a.width),top:o,right:(0,w.clamp)(r,0,a.width),bottom:i}},wsRegionOptions(){var t;return{id:e.id,start:e.start,end:e.end,color:e.getColor(),visible:!e.hidden,updateable:!e.readonly,deletable:!e.readonly,channel:null!=(t=e.channel)?t:0}}}))).actions((e=>{const t={setProperty:e.setProperty,setLocked:e.setLocked};return{serialize(){var t;return{original_length:null==(t=e.object._ws)?void 0:t.duration,value:{start:e.start,end:e.end,channel:e.channel}}},getColor:(t=1)=>rn.Colors.convertToRGBA(e.getOneColor(),t),updateColor(t=1){var n;const r=e.getColor(t);null==(n=e._ws_region)||n.updateColor(r)},updatePosition(t,n){var r;null==(r=e._ws_region)||r.updatePosition(null!=t?t:e.start,null!=n?n:e.end)},selectRegion(){e._ws_region&&(e._ws_region.handleSelected(!0),e._ws_region.bringToFront(),e._ws_region.scrollToRegion())},deleteRegion(){e.annotation.deleteRegion(e)},afterUnselectRegion(){e._ws_region&&e._ws_region.handleSelected(!1)},setHighlight(t){e._highlighted=t,e._ws_region&&e._ws_region.handleHighlighted(t)},beforeDestroy(){e._ws_region&&e._ws_region.remove()},setLocked(n){t.setLocked(n),e._ws_region&&e._ws_region.setLocked(e.locked)},onMouseOver(){e.annotation.isLinkingMode&&(e.setHighlight(!0),e._ws_region.switchCursor(V.A.LINKING_MODE_CURSOR))},onMouseLeave(){e.annotation.isLinkingMode&&(e.setHighlight(!1),e._ws_region.switchCursor(V.A.MOVE_CURSOR))},onUpdateEnd(){e.start=e._ws_region.start,e.end=e._ws_region.end,e.notifyDrawingFinished()},toggleHidden(t){null==t||t.stopPropagation(),e.hidden=!e.hidden,e._ws_region&&e._ws_region.setVisibility(!e.hidden)},setProperty(n,r){t.setProperty(n,r),["start","end"].includes(n)&&e.updatePosition()},setWSRegion(t){e._ws_region=t,t&&(t.on("mouseOver",e.onMouseOver),t.on("mouseLeave",e.onMouseLeave))}}})),an=h.gK.model("AudioRegionModel",{type:"audioregion",object:h.gK.late((()=>h.gK.reference(mj))),start:h.gK.number,end:h.gK.number,channel:h.gK.optional(h.gK.number,0),selectedregionbg:h.gK.optional(h.gK.string,"rgba(0, 0, 0, 0.5)")}).volatile((()=>({hideable:!0}))).views((e=>({getRegionElement:()=>e.wsRegionElement(e._ws_region),wsRegionElement(e){if(!e)return null;const t=e.id;return document.querySelector(`[data-id="${t}"]`)},get wsRegionOptions(){const t={id:e.id,start:e.start,end:e.end,channel:e.channel,color:"orange"};return e.readonly&&(t.drag=!1,t.resize=!1),t}}))).actions((e=>({serialize(){var t;return{original_length:null==(t=e.object._ws)?void 0:t.getDuration(),value:{start:e.start,end:e.end,channel:e.channel}}},updateColor(t=1){const n=rn.Colors.convertToRGBA(e.getOneColor(),t);try{var r;null==(r=e._ws_region)||r.update({color:n})}catch(e){}},updateAppearenceFromState(){var t;null!=(t=e._ws_region)&&t.update&&(e._ws_region.start=e.start,e._ws_region.end=e.end,e.applyCSSClass(e._ws_region))},applyCSSClass(t){e.updateColor(.3);const n=(0,h.Zn)(e).settings,r=e.wsRegionElement(t);if(!r)return;const o=r.className.split(" ");for(const e in o)o[e].indexOf("htx-label")>=0&&o.splice(e,1);const i=[...new Set([...o,"htx-highlight","htx-highlight-last"])];if(e.parent.showlabels||n.showLabels){var a;const t=rn.HTML.labelWithCSS(r,{labels:null==(a=e.labeling)?void 0:a.mainValue,score:e.score});i.push(t)}else i.push("htx-no-label");r.className=i.filter(Boolean).join(" ")},selectRegion(){e.updateColor(.8);const t=e.wsRegionElement(e._ws_region);if(t){const e=window.document.scrollingElement,n=e.scrollTop,r=e.scrollLeft;t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView(),window.document.scrollingElement.scrollTo(r,n)}},afterUnselectRegion(){e.updateColor(.3)},setHighlight(t){e._highlighted=t,e._ws_region&&(t?(e.updateColor(.8),e._ws_region.element.style.border=V.A.HIGHLIGHTED_CSS_BORDER):(e.updateColor(.3),e._ws_region.element.style.border="none"))},beforeDestroy(){e._ws_region&&e._ws_region.remove()},setLocked(t){e.locked=t instanceof Function?t(e.locked):t,e._ws_region&&(e._ws_region.drag=!e.locked,e._ws_region.resize=!e.locked)},onClick(t,n){e.annotation.isLinkingMode||e._ws_region.update({color:rn.Colors.rgbaChangeAlpha(e.selectedregionbg,.8)}),e.onClickRegion(n)},onMouseOver(){e.annotation.isLinkingMode&&(e.setHighlight(!0),e._ws_region.element.style.cursor=V.A.LINKING_MODE_CURSOR)},onMouseLeave(){e.annotation.isLinkingMode&&(e.setHighlight(!1),e._ws_region.element.style.cursor=V.A.MOVE_CURSOR)},onUpdateEnd(){var t;e.start=e._ws_region.start,e.end=e._ws_region.end,e.channel=null!=(t=e._ws_region.channelIdx)?t:0,e.updateColor(e.selected?.8:.3),e.notifyDrawingFinished()},toggleHidden(t){e.hidden=!e.hidden,e._ws_region.element.style.display=e.hidden?"none":"block",null==t||t.stopPropagation()}}))),sn=h.gK.model("EditableRegion").volatile((()=>({editorEnabled:!0,editableFields:[]}))).views((e=>({getProperty:t=>e[t],isPropertyEditable:t=>e.editableFields.some((e=>e.property===t)),get hasEditableFields(){return e.editableFields.length>0}}))).actions((e=>({setProperty(t,n){if(!e.isPropertyEditable(t))throw new Error(`Property ${t} of model ${e.type} is not editable`);e[t]=n}}))),ln=h.gK.model("EditableAudioModel",{}).volatile((()=>({editableFields:[{property:"start",label:"Start"},{property:"end",label:"End"}]}))),cn=h.gK.compose("AudioRegionModel",it,ht,We,sn,ln,an),dn=h.gK.compose("AudioRegionModel",it,ht,We,sn,ln,on);let un=cn;(0,O.VS)(O.vS)&&(un=dn),x.addRegionType(un,"audioplus"),x.addRegionType(un,"audio");var hn=n(8392),gn=n.n(hn),mn=n(26324);const pn=(e,t,n)=>{const r={type:"",title:""};switch(e){case"error":r.type=mn.A.error,r.title="Error";break;case"warning":r.type=mn.A.warning,r.title="Warning";break;case"success":r.type=mn.A.success,r.title="Success";break;default:r.type=mn.A.info,r.title="Info"}return r.type({title:n||r.title,content:t})},fn={error:(e,t)=>pn("error",e,t),warning:(e,t)=>pn("warning",e,t),success:(e,t)=>pn("success",e,t),info:(e,t)=>pn("info",e,t)},vn=h.gK.model("BaseTag"),yn=h.gK.model(Object.assign({},(0,O.VS)(O.cE)?{id:h.gK.identifier,name:h.gK.string}:{name:h.gK.identifier},{_needsUpdate:h.gK.optional(h.gK.number,0)})).volatile((()=>({isObjectTag:!0,supportSuggestions:!1}))).views((e=>({get allRegs(){var t;return(null==(t=e.annotation)?void 0:t.regionStore.regions.filter((t=>t.object===e)))||[]},get regs(){return e.allRegs},findRegion(t){let n=null;return e._regionsCache&&e._regionsCache.length&&(n=e._regionsCache.find((({region:e})=>gn()(e,t)))),n||e.regions.find((e=>gn()(e,t)))},get isReady(){return!0}}))).actions((e=>{const t={};return{addProp:function(n,r){t[n]=r,e._needsUpdate=e._needsUpdate+1},getProps:function(){return t},getAvailableStates:function(){const t=(e,t)=>t.checkMaxUsages?e.concat(t.checkMaxUsages()):e,n=e.states()||[];let r;(0,O.VS)(O.Zr)?(r=n.reduce(t,[]).filter((e=>e.selected)),r.forEach((e=>e.setSelected(!1)))):r=n.reduce(t,[]);const o=e.activeStates()||[];if(0===o.length){if(r.length){const e=r[0];fn.warning(`You can't use ${e.value} more than ${e.maxUsages} time(s)`)}e.annotation.unselectAll()}return o}}})),bn=h.gK.compose(yn,vn,Pe),xn={min:1,max:1500,step:10,default:1},wn={min:.5,max:2,step:.01,default:1},Cn={min:0,max:1,step:.01,default:1},Sn=h.gK.model({value:h.gK.maybeNull(h.gK.string),muted:h.gK.optional(h.gK.boolean,!1),zoom:h.gK.optional(h.gK.boolean,!0),defaultzoom:h.gK.optional(h.gK.string,xn.default.toString()),volume:h.gK.optional(h.gK.boolean,!0),defaultvolume:h.gK.optional(h.gK.string,Cn.default.toString()),speed:h.gK.optional(h.gK.boolean,!0),defaultspeed:h.gK.optional(h.gK.string,wn.default.toString()),hotkey:h.gK.maybeNull(h.gK.string),showlabels:h.gK.optional(h.gK.boolean,!1),showscores:h.gK.optional(h.gK.boolean,!1),height:h.gK.optional(h.gK.string,"88"),cursorwidth:h.gK.optional(h.gK.string,"2"),cursorcolor:h.gK.optional(Re.color,"#333"),defaultscale:h.gK.optional(h.gK.string,"1"),autocenter:h.gK.optional(h.gK.boolean,!0),scrollparent:h.gK.optional(h.gK.boolean,!0)}),jn=h.gK.compose("AudioModel",Sn,Fe,ze,bn,Pe,Le,h.gK.model("AudioModel",{type:"audio",_value:h.gK.optional(h.gK.string,""),playing:h.gK.optional(h.gK.boolean,!1),regions:h.gK.array(un)}).volatile((()=>({errors:[]}))).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,h.Zn)(e)},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,h.Pw)(e).name&&e.isSelected))}}))).actions((e=>({triggerSync(t,n){var r;e._ws&&e.syncSend(Object.assign({playing:e._ws.isPlaying(),time:e._ws.getCurrentTime(),speed:null!=(r=e._ws.rate)?r:1},n),t)},triggerSyncPlay(){e.triggerSync("play")},triggerSyncPause(){e.triggerSync("pause")},handleSyncPlay(t){var n;e._ws&&(e.handleSyncSeek(t),e._ws.isPlaying()||null==(n=e._ws)||n.play())},handleSyncPause(t){var n;e._ws&&(e.handleSyncSeek(t),e._ws.isPlaying()&&(null==(n=e._ws)||n.pause()))},handleSyncSpeed(){},handleSyncSeek({time:t}){try{e._ws&&t!==e._ws.getCurrentTime()&&e._ws.setCurrentTime(t)}catch(e){console.log(e)}},registerSyncHandlers(){e.syncHandlers.set("play",e.handleSyncPlay),e.syncHandlers.set("pause",e.handleSyncPause),e.syncHandlers.set("seek",e.handleSyncSeek),e.syncHandlers.set("speed",e.handleSyncSpeed)}}))).actions((e=>({needsUpdate(){e.handleNewRegions()},onReady(){e.setReady(!0)},handleNewRegions(){var t;null!=(t=e._ws)&&t.isReady&&e.regs.map((t=>{t._ws_region||e.createWsRegion(t)}))},onHotKey:t=>(t&&t.preventDefault(),e._ws.playPause(),!1),setRangeValue(t){e.rangeValue=t},setPlaybackRate(t){e.playBackRate=t},createRegion(t,n){let r=e.selectedregionbg;const o=n.find((e=>"labels"===e.type));o&&(r=rn.Colors.convertToRGBA(o.getSelectedColor(),.3));const i=un.create({id:t.id?t.id:E(),pid:t.pid?t.pid:E(),parentID:null===t.parent_id?"":t.parent_id,start:t.start,end:t.end,score:t.score,readonly:t.readonly,regionbg:e.regionbg,selectedregionbg:r,normalization:t.normalization,states:n});return i._ws_region=t,e.regions.push(i),e.annotation.addRegion(i),i},selectRange(t,n){const r=e.regs.filter((e=>e.start>=n.start&&e.end<=n.end));n.remove&&n.remove(),r.length&&e.annotation.selectAreas(r)},addRegion(t){const n=e.annotation.areas.get(t.id);if(n)return n.applyCSSClass(t),n._ws_region=t,n;if(0===e.getAvailableStates().length)return void t.on("update-end",(n=>e.selectRange(n,t)));const r=e.activeStates()[0],o={[r.valueType]:r.selectedValues()},i=e.annotation.createResult(t,o,r,e);return i._ws_region=t,i.updateAppearenceFromState(),i},handlePlay(){e._ws&&(e.playing=!e.playing,e._ws.isPlaying()?e.triggerSync("play"):e.triggerSync("pause"))},handleSeek(){e.triggerSync("seek")},handleSpeed(t){e.triggerSync("speed",{speed:t})},createWsRegion(t){const n=t.wsRegionOptions;t.annotation.isReadOnly()&&(n.drag=!1,n.resize=!1);const r=e._ws.addRegion(t.wsRegionOptions);t._ws_region=r,t.updateAppearenceFromState()},onLoad(t){e._ws=t;const n=e.annotation.history;e.regs.forEach((t=>{e.createWsRegion(t)})),setTimeout((()=>n.setSkipNextUndoState(!1)),0)},onError(t){e.errors=[t]},wsCreated(t){e._ws=t},beforeDestroy(){try{(0,w.isDefined)(e._ws)&&(e._ws.destroy(),e._ws=null)}catch(t){e._ws=null,console.warn("Already destroyed")}}})))),kn=h.gK.model({name:h.gK.identifier,value:h.gK.maybeNull(h.gK.string),muted:h.gK.optional(h.gK.boolean,!1),zoom:h.gK.optional(h.gK.boolean,!0),defaultzoom:h.gK.optional(h.gK.string,1..toString()),volume:h.gK.optional(h.gK.boolean,!0),defaultvolume:h.gK.optional(h.gK.string,1..toString()),speed:h.gK.optional(h.gK.boolean,!0),defaultspeed:h.gK.optional(h.gK.string,1..toString()),hotkey:h.gK.maybeNull(h.gK.string),showlabels:h.gK.optional(h.gK.boolean,!1),showscores:h.gK.optional(h.gK.boolean,!1),height:h.gK.optional(h.gK.string,"96"),waveheight:h.gK.optional(h.gK.string,"32"),cursorwidth:h.gK.optional(h.gK.string,"2"),cursorcolor:h.gK.optional(Re.color,"#333"),defaultscale:h.gK.optional(h.gK.string,"1"),autocenter:h.gK.optional(h.gK.boolean,!0),scrollparent:h.gK.optional(h.gK.boolean,!0),splitchannels:h.gK.optional(h.gK.boolean,!1),decoder:h.gK.optional(h.gK.enumeration(["ffmpeg","webaudio"]),"webaudio"),player:h.gK.optional(h.gK.enumeration(["html5","webaudio"]),"html5")}),On=h.gK.compose("AudioModel",kn,Fe,ze,bn,Pe,Le,h.gK.model("AudioModel",{type:"audio",_value:h.gK.optional(h.gK.string,""),regions:h.gK.array(un)}).volatile((()=>({errors:[],stageRef:(0,p.createRef)(),_ws:null,_wfFrame:null}))).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,h.Zn)(e)},states(){var t;return(null==(t=e.annotation)?void 0:t.toNames.get(e.name))||[]},activeStates(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,h.Pw)(e).name&&e.isSelected))},get activeState(){const t=e.states();return t&&t.filter((e=>"LabelsModel"===(0,h.Pw)(e).name&&e.isSelected))[0]},get activeLabel(){var t;const n=e.activeState;return null==n||null==(t=n.selectedValues())?void 0:t[0]}}))).actions((e=>({triggerSync(t,n){e._ws&&e.syncSend(Object.assign({playing:e._ws.playing,time:e._ws.currentTime,speed:e._ws.rate},n),t)},triggerSyncSpeed(t){e.triggerSync("speed",{speed:t})},triggerSyncPlay(){e.handleSyncPlay(),e.triggerSync("play",{playing:!0})},triggerSyncPause(){e.handleSyncPause(),e.triggerSync("pause",{playing:!1})},triggerSyncSeek(t){e.triggerSync("seek",{time:t})},registerSyncHandlers(){["play","pause","seek"].forEach((t=>{e.syncHandlers.set(t,e.handleSync)})),e.syncHandlers.set("speed",e.handleSyncSpeed)},handleSync(t){var n,r,o;null!=(n=e._ws)&&n.loaded&&(e.handleSyncSeek(t),t.playing?e._ws.playing||null==(r=e._ws)||r.play():e._ws.playing&&(null==(o=e._ws)||o.pause()))},handleSyncPlay(){var t,n;null!=(t=e._ws)&&t.playing||null==(n=e._ws)||n.play()},handleSyncPause(){var t,n;null!=(t=e._ws)&&t.playing&&(null==(n=e._ws)||n.pause())},handleSyncSeek({time:t}){var n;if(null!=(n=e._ws)&&n.loaded&&(0,w.isDefined)(t))try{e._ws.setCurrentTime(t,!0),e._ws.syncCursor()}catch(e){console.log(e)}},handleSyncSpeed({speed:t}){e._ws&&(e._ws.rate=t)},syncMuted(t){e._ws&&(e._ws.muted=t)}}))).actions((e=>{let t,n=null;return{afterCreate(){t=(0,u.lB)(e,"activeLabel",(()=>{var t;const n=null==(t=e._ws)||null==(t=t.regions)?void 0:t.selected;if(!n||0===n.length)return;const r=e.activeState,o=null==r?void 0:r.selectedColor,i=null==r?void 0:r.selectedValues();n.forEach((t=>{t.update({color:o,labels:null!=i?i:[]});const n=t.isRegion?e.updateRegion(t):e.addRegion(t);e.annotation.selectArea(n)})),n.length&&e.requestWSUpdate()}),!1)},needsUpdate(){e.handleNewRegions(),e.requestWSUpdate()},requestWSUpdate(){e._ws&&(n&&clearTimeout(n),n=setTimeout((()=>{e._ws.regions.redraw()}),33))},onReady(){e.setReady(!0)},onRateChange(t){e.triggerSyncSpeed(t)},loadSyncedParagraphs(){if(!e.syncManager)return;Array.from(e.syncManager.syncTargets,(([,e])=>e)).filter((e=>"paragraphs"===e.type&&e.contextscroll)).forEach((t=>{const n=Object.values(t.regionsStartEnd).map((({start:e,end:t})=>({start:e,end:t,showInTimeline:!0,external:!0,locked:!0})));e._ws.addRegions(n)}))},handleNewRegions(){e._ws&&e.regs.map((t=>{t._ws_region?e.updateWsRegion(t):e.createWsRegion(t)}))},findRegionByWsRegion:t=>e.regs.find((e=>{var n;return(null==(n=e._ws_region)?void 0:n.id)===(null==t?void 0:t.id)})),getRegionColor(){const t=e.activeState;return t?t.selectedColor:null},onHotKey:t=>(t&&t.preventDefault(),e._ws.togglePlay(),!1),setRangeValue(t){e.rangeValue=t},setPlaybackRate(t){e.playBackRate=t},createRegion(t,n){let r=e.selectedregionbg;const o=n.find((e=>"labels"===e.type));o&&(r=rn.Colors.convertToRGBA(o.getSelectedColor(),.3));const i=un.create({id:t.id?t.id:E(),pid:t.pid?t.pid:E(),parentID:null===t.parent_id?"":t.parent_id,start:t.start,end:t.end,score:t.score,readonly:t.readonly,regionbg:e.regionbg,selectedregionbg:r,normalization:t.normalization,states:n});return i.setWSRegion(t),e.regions.push(i),e.annotation.addRegion(i),i},addRegion(t){const n=e.annotation.areas.get(t.id);if(n)return n.setWSRegion(t),n.updateColor(),n;if(0===e.getAvailableStates().length)return void(t.isRegion&&t.convertToSegment().handleSelected());const r=e.activeState,o={[r.valueType]:r.selectedValues()},i=e.annotation.createResult(t,o,r,e),a=t.convertToRegion(o.labels);return i.setWSRegion(a),i.updateColor(),i},updateRegion(t){const n=e.findRegionByWsRegion(t);if(n)return n.onUpdateEnd(),n},createWsRegion(t){var n;if(!e._ws)return;const r=t.wsRegionOptions();r.labels=null!=(n=t.labels)&&n.length?t.labels:void 0;const o=e._ws.addRegion(r,!1);t.setWSRegion(o)},updateWsRegion(t){var n;if(!e._ws)return;const r=t.wsRegionOptions();r.labels=null!=(n=t.labels)&&n.length?t.labels:void 0,e._ws.updateRegion(r,!1)},clearRegionMappings(){e.regs.forEach((e=>{e.setWSRegion(null)}))},onLoad(t){e.clearRegionMappings(),e._ws=t,e.onReady(),e.needsUpdate(),(0,O.VS)(O.LG)&&e.loadSyncedParagraphs()},onSeek(t){e.triggerSyncSeek(t)},onPlaying(t){t?e.triggerSyncPlay():e.triggerSyncPause()},onError(t){let n;n="HTTPError"===t.name?"ERR_LOADING_HTTP":"ERR_LOADING_AUDIO";const r=(0,h._$)(e.store).messages[n]({attr:e.value,url:e._value,error:t.message});e.errors=[r]},beforeDestroy(){try{n&&clearTimeout(n),t&&t(),(0,w.isDefined)(e._ws)&&(e._ws.destroy(),e._ws=null)}catch(t){e._ws=null,console.warn("Already destroyed")}},setWFFrame(t){e._wfFrame=t}}}))),Rn=({item:e,style:t,className:n,children:r})=>{const o=e.getProps&&e.getProps(),i=(0,Ze.cn)("object").toClassName();return(0,_.jsx)("div",Object.assign({className:[i,n].join(" "),"data-needs-update":e._needsUpdate,style:t},o,{children:r}))},En=(0,y.PA)(Rn),_n=(0,y.PA)(Rn);var An=n(92006),Tn=n.n(An),Pn=n(53871),In=n.n(Pn),Ln=n(1474),Mn=n(17022),Kn=n(64381),Dn=n.n(Kn),Nn=n(38573),Vn=n.n(Nn),zn=n(57290),Bn=n.n(zn);const Hn="wave--XFK_Q",Fn="link--MtZ3P";var Wn=n(82149),$n=n(61747),Un=n(35455),Zn=n(34595),Gn=n(27078),Yn=n(73033),Xn=n(37442),qn=n.n(Xn);const Jn=(e,{init:t,transition:n,onStart:r,beforeTransition:o,afterTransition:i}={})=>new Promise((async a=>{null==t||t(e);const s=()=>{null==r||r(e)},l=async()=>{await(null==i?void 0:i(e)),e.removeEventListener("transitionstart",s),e.removeEventListener("transitionend",l),a(!0)};e.addEventListener("transitionstart",s),e.addEventListener("transitionend",l),await(null==o?void 0:o(e)),setTimeout((()=>null==n?void 0:n(e)),0)})),Qn=e=>{const t=e.getBoundingClientRect(),n=document.body,r=document.documentElement,o=window.pageYOffset||r.scrollTop||n.scrollTop,i=window.pageXOffset||r.scrollLeft||n.scrollLeft,a=r.clientTop||n.clientTop||0,s=r.clientLeft||n.clientLeft||0,l=t.top+o-a,c=t.left+i-s,d=e.getBoundingClientRect();return{width:d.width,height:d.height,top:Math.round(l),left:Math.round(c)}},er=(e,t,n,r=0)=>{let o=0,i=0;const a=((e,t)=>{const n=Qn(e),r=Qn(t);return{source:n,target:r,get top(){return n.top-r.height},get bottom(){return n.top+n.height},get horizontalCenter(){return n.left+n.width/2-r.width/2},get horizontalLeft(){return n.left},get horizontalRight(){return n.left+n.width-r.width}}})(e,t),s=n.split("-");switch(n){case"top-center":i=a.top-r,o=a.horizontalCenter;break;case"top-left":i=a.top-r,o=a.horizontalLeft;break;case"top-right":i=a.top-r,o=a.horizontalRight;break;case"bottom-center":i=a.bottom+r,o=a.horizontalCenter;break;case"bottom-left":i=a.bottom+r,o=a.horizontalLeft;break;case"bottom-right":i=a.bottom+r,o=a.horizontalRight}return iwindow.scrollX+window.innerHeight&&(i=a.top-r,s[0]="top"),o<0?(o=a.horizontalLeft,s[1]="left"):o+a.target.width>window.innerWidth&&(o=a.horizontalRight,s[1]="right"),{top:i,left:o,pos:a,align:s.join("-")}},tr=e=>{"webkitRequestFullscreen"in e?e.webkitRequestFullscreen():e.requestFullscreen()},nr=()=>{"webkitCancelFullScreen"in document?document.webkitCancelFullScreen():document.exitFullscreen()},rr=()=>{var e;return null!=(e=document.webkitCurrentFullScreenElement)?e:document.fullscreenElement},or=(e={},t)=>{const n=(0,p.useRef)(e);return(0,p.useEffect)((()=>{n.current=e}),[e,...null!=t?t:[]]),(0,p.useEffect)((()=>{const e=()=>{rr()?null==n.current.onEnterFullscreen||n.current.onEnterFullscreen():null==n.current.onExitFullscreen||n.current.onExitFullscreen()},t="onwebkitfullscreenchange"in document?"webkitfullscreenchange":"fullscreenchange";return document.addEventListener(t,e),()=>{document.removeEventListener(t,e)}}),[]),{getElement:rr,enter:tr,exit:nr,setHandlers(e={}){n.current=e}}},ir=(0,p.forwardRef)((({title:e,children:t,defaultVisible:n,mouseEnterDelay:r=0,enabled:o=!0,theme:i="dark",style:a,triggerElementGetter:s=e=>e},l)=>{if(!t||Array.isArray(t))throw new Error("Tooltip does accept a single child only");const c=!!l&&Object.hasOwnProperty.call(l,"current"),d=l instanceof Function,u=c?l:(0,p.useRef)(),h=d?e=>{l(e),u.current=e}:u,m=(0,p.useRef)(),[f,v]=(0,p.useState)({}),[y,b]=(0,p.useState)(n?"visible":null),[x,w]=(0,p.useState)(!1),[C,S]=(0,p.useState)("top-center"),j=(0,p.useRef)(),k=(0,p.useCallback)((()=>{const{left:e,top:t,align:n}=er(s(u.current),m.current,C,10);v({left:e,top:t}),S(n)}),[u.current,m.current]),O=(0,p.useCallback)(((e,t)=>{if(m.current){if(t)return void w(!1);Jn(m.current,{beforeTransition(){b(e?"before-appear":"before-disappear")},transition(){e&&k(),b(e?"appear":"disappear")},afterTransition(){b(e?"visible":null),!1===e&&w(!1)}})}}),[k,m]),R=(0,p.useMemo)((()=>{switch(y){case"before-appear":return"before-appear";case"appear":return"appear before-appear";case"before-disappear":return"before-disappear";case"disappear":return"disappear before-disappear";case"visible":return"visible";default:return y?"visible":null}}),[y]),E=(0,p.useMemo)((()=>x?(0,_.jsx)(Ze.eB,{ref:m,name:"tooltip",mod:{align:C,theme:i},mix:R,style:Object.assign({},f,null!=a?a:{}),children:(0,_.jsx)(Ze.Sl,{name:"body",children:e})}):null),[x,f,e,R,m]),A=p.Children.only(t),T=(0,p.cloneElement)(A,Object.assign({},A.props,{ref:h}));return(0,p.useEffect)((()=>{x&&O(!0)}),[x]),(0,p.useEffect)((()=>{const e=s(u.current),t=()=>{!1!==o&&(j.current=window.setTimeout((()=>{j.current=void 0,w(!0)}),r))},n=()=>{!1!==o&&(j.current&&(j.current=window.clearTimeout(j.current)),O(!1))};return e&&(e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",n),window.addEventListener("scroll",n)),()=>{e&&(e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",n),window.removeEventListener("scroll",n))}}),[o,r]),or({onEnterFullscreen:()=>O(!1,!0),onExitFullscreen:()=>O(!1,!0)},[]),(0,_.jsxs)(_.Fragment,{children:[T,(0,g.createPortal)(E,document.body)]})}));ir.displayName="Tooltip";const ar=e=>(0,_.jsx)(Ze.eB,{name:"hint",tag:"sup",className:e.className,"data-copy":e.copy,style:e.style,children:e.children}),sr=JSON.parse('{"audio:back":{"key":"ctrl+b","mac":"command+b","description":"Back for one second"},"audio:playpause":{},"ts:grow-left":{"key":"left","description":"Increase region to the left"},"ts:grow-right":{"key":"right","description":"Increase region to the right"},"ts:shrink-left":{"key":"alt+left","description":"Decrease region on the left"},"ts:shrink-right":{"key":"alt+right","description":"Decrease region on the right"},"ts:grow-left-largre":{"key":"shift+left"},"ts:grow-right-largre":{"key":"shift+right"},"ts:shrink-left-largre":{"key":"shift+alt+left"},"ts:shrink-right-largre":{"key":"shift+alt+right"},"annotation:submit":{"key":"ctrl+enter","mac":"command+enter","description":"Submit annotation"},"annotation:skip":{"key":"ctrl+space","mac":"alt+enter","description":"Skip task"},"annotation:undo":{"key":"ctrl+z","mac":"command+z","description":"Undo"},"annotation:redo":{"key":"ctrl+shift+z","mac":"command+shift+z","description":"Redo"},"polygon:undo":{"key":"ctrl+z","mac":"command+z","description":"Undo"},"polygon:redo":{"key":"ctrl+shift+z","mac":"command+shift+z","description":"Redo"},"region:delete-all":{"key":"ctrl+backspace","mac":"command+backspace","description":"Delete all regions"},"region:focus":{"key":"enter","description":"Focus first focusable region"},"region:relation":{"key":"alt+r","description":"Create relation between regions"},"region:visibility":{"key":"alt+h","description":"Toggle selected region visibility"},"region:visibility-all":{"key":"ctrl+h","mac":"ctrl+h","description":"Toggle all regions visibility"},"region:lock":{"key":"alt+l","description":"Lock selected region"},"region:meta":{"key":"alt+m","description":"Edit selected region meta"},"region:unselect":{"key":"u","description":"Unselect region"},"region:exit":{"key":"escape","description":"Exit relation mode, unselect region"},"region:delete":{"key":"backspace","description":"Delete selected region"},"region:cycle":{"key":"alt+.","description":"Cycle through regions"},"region:duplicate":{"key":"ctrl+d","mac":"command+d","description":"Duplicate selected region"},"segment:delete":{"key":"delete","description":"Delete selected region"},"media:playpause":{"key":"alt+space","description":"Play/pause"},"media:step-backward":{"key":"alt+left","description":"Go one step back"},"media:step-forward":{"key":"alt+right","description":"Go one step forward"},"video:keyframe-backward":{"key":"ctrl+alt+left","description":"Go to previous keyframe"},"video:keyframe-forward":{"key":"ctrl+alt+right","description":"Go to next keyframe"},"video:backward":{"key":"alt+left","description":"Go back"},"video:rewind":{"key":"shift+ctrl+alt+left","description":"Go to first frame"},"video:forward":{"key":"shift+alt+right","description":"Go forward"},"video:fastforward":{"key":"shift+ctrl+alt+right","description":"Go to last frame"},"video:hop-backward":{"key":"shift+alt+left","description":"Hop Backward"},"video:hop-forward":{"key":"shift+alt+right","description":"Hop Forward"},"repeater:next-page":{"key":"alt+right","description":"Next Page"},"repeater:previous-page":{"key":"alt+left","description":"Previous Page"},"image:prev":{"key":"ctrl+left","mac":"command+left","description":"Previous Image"},"image:next":{"key":"ctrl+right","mac":"command+right","description":"Next Image"}}'),lr=["store","name","children"];if(!(0,O.VS)(O.xB)){const e=sr["image:prev"],t=sr["image:next"];e&&(e.key=e.mac="ctrl+a"),t&&(t.key=t.mac="ctrl+d")}const cr=["key","mac","description","modifier","modifierDescription"],dr=e=>{Object.entries(e).forEach((([e,t])=>{Object.keys(t).forEach((t=>{if(!cr.includes(t))throw new Error(`Unknown keymap property ${t} for key ${e}`)}))}))};dr(sr);const ur="__main__",hr="__input__",gr={},mr={},pr=[],fr={[ur]:{},[hr]:{}};qn().filter=e=>{var t;if("__none__"===qn().getScope())return!1;const n=null==(t=e.target||e.srcElement)?void 0:t.tagName;return e.keyCode>=96&&e.keyCode<=105&&(e=>{const t=e.keyCode-48;document.dispatchEvent(new KeyboardEvent("keydown",{keyCode:t}))})(e),n&&qn().setScope(/^(INPUT|TEXTAREA|SELECT)$/.test(n)?hr:ur),!0};const vr={plus:"=",minus:"-",",":"¼"},yr=(e="global",t="Hotkeys")=>{var n;let r={};mr[e]=null!=(n=mr[e])?n:{description:t,get keys(){return r},get descriptions(){const e=Object.keys(this.keys).reduce(((e,t)=>(gr[t]&&e.push([t,gr[t]]),e)),[]);return Object.fromEntries(e)}};const o=(t,n)=>{const r=fr[t];r&&r[n]&&(r[n]=r[n].filter((t=>t.namespace!==e)))},i=(e,t)=>{const n=fr[e];n&&n[t]&&n[t].forEach((n=>{qn()(t,e,n.func)}))},a=e=>[...e.replace(/\s/,"").matchAll(/((?:\w+\+)*(?:[^,]+|,)),?/g)].map((e=>e[1])),s=()=>{for(const e of[ur,hr])for(const t of Object.keys(r)){const n=a(t);for(const t of n)(0,O.VS)(O.M3)?(o(e,t),qn().unbind(t,e),i(e,t)):qn().unbind(t,e),delete gr[t]}r={}};return pr.push(s),{applyAliases:e=>a(e).map((e=>e.split("+").map((e=>{var t;return null!=(t=vr[e.trim()])?t:e})).join("+"))).join(","),addKey(t,n,o,i=ur){if(!(0,w.isDefined)(t))return;r[t]&&console.warn(`Key already added: ${t}. It's possibly a bug.`);const a=this.applyAliases(t.toLowerCase());r[a]=n,o&&(gr[a]=o),i.split(",").map((e=>e.trim())).filter(Boolean).forEach((t=>{const r=(...e)=>{const t=e[0];t.stopPropagation(),t.preventDefault(),n(...e)};(0,O.VS)(O.M3)&&((t,n,r)=>{(0,w.isDefined)(fr[t])||(fr[t]={});const o=fr[t];(0,w.isDefined)(o[n])||(o[n]=[]),o[n].push({namespace:e,func:r})})(t,a,r),qn()(a,t,r)}))},overwriteKey(e,t,n,r=ur){(0,w.isDefined)(e)&&(this.hasKey(e)&&this.removeKey(e,r),this.addKey(e,t,n,r))},removeKey(e,t=ur){if(!(0,w.isDefined)(e))return;const n=e.toLowerCase();this.hasKey(n)&&(t.split(",").map((e=>e.trim())).filter(Boolean).forEach((t=>{(0,O.VS)(O.M3)?(o(t,e),qn().unbind(n,t),i(t,e)):qn().unbind(n,t)})),delete r[n],delete gr[n])},addNamed(e,t,n){const r=yr.keymap[e];if(!(0,w.isDefined)(r))throw new Error(`Unknown named hotkey ${r}`);{var o;const e=(0,w.isMacOS)()&&null!=(o=r.mac)?o:r.key;this.addKey(e,t,r.description,n),r.modifier&&this.addKey(`${r.modifier}+${e}`,t,r.modifierDescription,n)}},removeNamed(e,t){const n=yr.keymap[e];if(!(0,w.isDefined)(n))throw new Error(`Unknown named hotkey ${n}`);{var r;const e=(0,w.isMacOS)()&&null!=(r=n.mac)?r:n.key;this.removeKey(e,t),n.modifier&&this.removeKey(`${n.modifier}+${e}`)}},overwriteNamed(e,t,n){const r=yr.keymap[e];if(!(0,w.isDefined)(r))throw new Error(`Unknown named hotkey ${e}`);{var o;const e=(0,w.isMacOS)()&&null!=(o=r.mac)?o:r.key;this.overwriteKey(e,t,r.description,n),r.modifier&&this.overwriteKey(`${r.modifier}+${e}`,t,r.modifierDescription,n)}},hasKey(e){if(!(0,w.isDefined)(e))return;const t=e.toLowerCase();return(0,w.isDefined)(r[t])},getKeys:()=>Object.keys(r),getNamespace:()=>mr[e],addDescription(e,t){r[e]||(gr[e]=t)},removeDescription(e){r||gr[e]},unbindAll(){s()},makeComb(){const e="1234567890qwetasdfgzxcvbyiopjklnm".split("");for(let t=0;t<=e.length;t++){let n;if(n=e[t],!{}.hasOwnProperty.call(r,n))return n}return null}}};yr.DEFAULT_SCOPE=ur,yr.INPUT_SCOPE=hr,yr.keymap=Object.assign({},sr),yr.setKeymap=e=>{dr(e),Object.assign(yr.keymap,e)},yr.keysDescipritions=()=>gr,yr.namespaces=()=>mr,yr.unbindAll=()=>{pr.forEach((e=>e()))},yr.setScope=e=>{qn().setScope(e)},yr.Tooltip=(0,y.WQ)("store")((0,y.PA)((e=>{let{store:t,name:n,children:r}=e,o=(0,Yn.A)(e,lr);const i=yr.keymap[n],a=t.settings.enableTooltips&&t.settings.enableHotkeys;if((0,w.isDefined)(i)){var s,l;const e=(0,w.isMacOS)()&&null!=(s=i.mac)?s:i.key,t=null!=(l=o.title)?l:i.description,n=[];return a&&e.split(",").forEach((e=>{const t=e.split("+").map((e=>(0,p.createElement)(Ze.Sl,{tag:"kbd",name:"key"},e)));n.push((0,p.createElement)(Ze.eB,{name:"key-group",tag:"span",style:{marginLeft:5}},...t))})),(0,p.createElement)(ir,Object.assign({},o,{theme:"light",title:(0,p.createElement)(p.Fragment,{},t,...n)}),r)}return r}))),yr.Hint=(0,y.WQ)("store")((0,y.PA)((({store:e,name:t})=>{const n=yr.keymap[t],r=e.settings.enableTooltips&&e.settings.enableHotkeys;if((0,w.isDefined)(n)&&r){var o;const e=(0,w.isMacOS)()&&null!=(o=n.mac)?o:n.key;return(0,p.createElement)(ar,{},[e])}return null})));function br(e,t){e=Number(e);const n=Math.floor(e/60);e%=60;let r=Math.round(e).toString();return t>=250?r=e.toFixed(2):t>=25&&(r=e.toFixed(1)),n>0?(e<10&&(r=`0${r}`),`${n}:${r}`):r}function xr(e){let t=1;return t=e>=2500?.01:e>=1e3?.025:e>=250?.1:e>=100?.25:e>=25?1:5*e>=25?5:15*e>=25?15:60*Math.ceil(.5/e),t}function wr(e){let t=1;return t=e>=2500?10:e>=1e3?4:e>=250?10:e>=100?4:e>=25?1:5*e>=25?5:15*e>=25?15:60*Math.ceil(.5/e),t}function Cr(e){return Math.floor(10/xr(e))}class Sr extends p.Component{constructor(e){super(e),this.onChangeZoom=e=>{this.setState(Object.assign({},this.state,{zoom:e})),this.wavesurfer.zoom(e)},this.onChangeZoomY=e=>{this.setState(Object.assign({},this.state,{zoomY:e}),this.updateZoomY)},this.updateZoomY=In()((()=>{this.wavesurfer.params.barHeight=this.state.zoomY,this.wavesurfer.drawBuffer()}),100),this.onChangeVolume=e=>{this.setState(Object.assign({},this.state,{volume:e})),this.wavesurfer.setVolume(e)},this.onChangeSpeed=e=>{this.setState(Object.assign({},this.state,{speed:e})),this.wavesurfer.setPlaybackRate(e)},this.onZoomPlus=(e,t=10)=>{let n=this.state.zoom;return n+=t,n>700&&(n=700),this.onChangeZoom(n),e&&e.preventDefault(),!1},this.onZoomMinus=(e,t=10)=>{let n=this.state.zoom;return n-=t,n<0&&(n=0),this.onChangeZoom(n),e.preventDefault(),!1},this.onZoomYPlus=(e,t=1)=>{let n=this.state.zoomY;return n+=t,n>50&&(n=50),this.onChangeZoomY(n),e.preventDefault(),!1},this.onZoomYMinus=(e,t=1)=>{let n=this.state.zoomY;return n-=t,n<1&&(n=1),this.onChangeZoomY(n),e&&e.preventDefault(),!1},this.onWheel=e=>{if(e&&!e.shiftKey)return;e&&e.shiftKey&&e.preventDefault();const t=e.deltaY>0?5:-5;this.onZoomPlus(e,t)},this.onBack=()=>{let e=this.wavesurfer.getCurrentTime();return!!e&&(e--,this.wavesurfer.setCurrentTime(e>0?e:0),!1)},this.setWaveformRef=e=>{this.$waveform=e},this.hotkeys=yr("Audio","Audio Segmentation"),this.state={src:this.props.src,pos:0,colors:{waveColor:"#97A0AF",progressColor:"#52c41a"},zoom:0,zoomY:1,speed:1,volume:e.muted?0:1}}componentDidMount(){const e=this.props.messages||Ge.A;let t={container:this.$waveform,waveColor:this.state.colors.waveColor,height:this.props.height,backend:"MediaElement",progressColor:this.state.colors.progressColor,splitChannels:!0,cursorWidth:this.props.cursorWidth,cursorColor:this.props.cursorColor,barHeight:1};this.props.regions&&(t=Object.assign({},t,{plugins:[Dn().create({dragSelection:{slop:5}}),Vn().create({container:"#timeline",formatTimeCallback:br,timeInterval:xr,primaryLabelInterval:wr,secondaryLabelInterval:Cr,primaryColor:"blue",secondaryColor:"blue",primaryFontColor:"#000",secondaryFontColor:"#000"}),Tn().create({wrapper:this.$waveform,showTime:!0,opacity:1})]})),this.wavesurfer=Bn().create(Object.assign({},t)),this.props.defaultVolume&&this.wavesurfer.setVolume(this.props.defaultVolume),this.props.muted&&this.wavesurfer.setVolume(0),this.props.defaultSpeed&&this.wavesurfer.setPlaybackRate(this.props.defaultSpeed),this.props.defaultZoom&&this.wavesurfer.zoom(this.props.defaultZoom),this.wavesurfer.on("error",(t=>{const n=String(t.message||t||""),r=this.props.src;let o=e.ERR_LOADING_AUDIO({attr:this.props.dataField,error:n,url:r});if(null!=n&&n.includes("HTTP")||null!=n&&n.includes("fetch"))this.wavesurfer.hadNetworkError=!0,o=e.ERR_LOADING_HTTP({attr:this.props.dataField,error:n,url:r});else if("string"==typeof t&&t.includes("media element")){if(this.wavesurfer.hadNetworkError)return;o="Error while processing audio. Check media format and availability."}this.props.onError&&this.props.onError(o)})),this.wavesurfer.load(this.props.src),this.wavesurfer.setPlaybackRate(this.state.speed);const n=this;this.props.regions&&(this.wavesurfer.on("region-mouseenter",(e=>{var t;null==(t=e._region)||t.onMouseOver()})),this.wavesurfer.on("region-mouseleave",(e=>{var t;null==(t=e._region)||t.onMouseLeave()})),this.wavesurfer.on("region-created",(e=>{n.props.item.annotation.history.setSkipNextUndoState();const t=n.props.addRegion(e);t&&(e._region=t,e.color=t.selectedregionbg,-1===e.channelIdx&&(e.channelIdx=t.channel),e.on("click",(e=>t.onClick(n.wavesurfer,e))),e.on("update-end",(()=>t.onUpdateEnd(n.wavesurfer))),e.on("dblclick",(()=>{window.setTimeout((()=>{e.play()}),0)})),e.on("out",(()=>{})))})));const r=document.querySelector("#slider");r&&(r.oninput=function(){n.wavesurfer.zoom(Number(this.value))}),this.wavesurfer.on("ready",(()=>{n.props.onCreate(this.wavesurfer),this.wavesurfer.container.onwheel=In()(this.onWheel,100)})),this.wavesurfer.on("waveform-ready",(()=>{var e,t;null==(e=(t=this.props).onReady)||e.call(t,this.wavesurfer)})),this.wavesurfer.on("pause",n.props.handlePlay),this.wavesurfer.on("play",n.props.handlePlay),this.wavesurfer.on("seek",n.props.handleSeek),this.props.regions&&this.props.onLoad(this.wavesurfer),this.hotkeys.addNamed("audio:back",this.onBack,`${yr.DEFAULT_SCOPE},${yr.INPUT_SCOPE}`)}componentWillUnmount(){this.hotkeys.unbindAll(),this.wavesurfer.unAll()}render(){return(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{id:"wave",ref:this.setWaveformRef,className:Hn}),(0,_.jsx)("div",{id:"timeline"}),this.props.zoom&&(0,_.jsxs)(Wn.A,{gutter:16,style:{marginTop:"1em"},children:[(0,_.jsx)($n.A,{flex:8,style:{textAlign:"right",marginTop:"6px"},children:(0,_.jsxs)("div",{style:{display:"flex"},children:[(0,_.jsx)("div",{style:{marginTop:"6px",marginRight:"5px"},children:(0,_.jsx)(ir,{placement:"topLeft",title:"Horizontal zoom out",children:(0,_.jsx)(Ln.A,{onClick:this.onZoomMinus,className:Fn})})}),(0,_.jsx)("div",{style:{width:"100%"},children:(0,_.jsx)(Un.A,{min:0,step:10,max:500,value:"number"==typeof this.state.zoom?this.state.zoom:0,onChange:e=>{this.onChangeZoom(e)}})}),(0,_.jsx)("div",{style:{marginTop:"6px",marginLeft:"5px"},children:(0,_.jsx)(ir,{placement:"topLeft",title:"Horizontal zoom in",children:(0,_.jsx)(Mn.A,{onClick:this.onZoomPlus,className:Fn})})})]})}),(0,_.jsx)($n.A,{flex:4,style:{textAlign:"right",marginTop:"6px"},children:(0,_.jsxs)("div",{style:{display:"flex"},children:[(0,_.jsx)("div",{style:{marginTop:"6px",marginRight:"5px"},children:(0,_.jsx)(ir,{placement:"topLeft",title:"Vertical zoom out",children:(0,_.jsx)(Ln.A,{onClick:this.onZoomYMinus,className:Fn})})}),(0,_.jsx)("div",{style:{width:"100%"},children:(0,_.jsx)(Un.A,{min:1,step:.1,max:50,value:"number"==typeof this.state.zoomY?this.state.zoomY:1,onChange:e=>{this.onChangeZoomY(e)}})}),(0,_.jsx)("div",{style:{marginTop:"6px",marginLeft:"5px"},children:(0,_.jsx)(ir,{placement:"topLeft",title:"Vertical zoom in",children:(0,_.jsx)(Mn.A,{onClick:this.onZoomYPlus,className:Fn})})})]})}),(0,_.jsx)($n.A,{flex:3,children:this.props.volume&&(0,_.jsxs)("div",{style:{display:"flex",marginTop:"6.5px"},children:[(0,_.jsx)("div",{style:{width:"100%"},children:(0,_.jsx)(Un.A,{min:0,max:1,step:.1,value:"number"==typeof this.state.volume?this.state.volume:1,onChange:e=>{this.onChangeVolume(e)}})}),(0,_.jsx)("div",{style:{marginLeft:"10px",marginTop:"5px"},children:(0,_.jsx)(Gn.A,{})})]})}),(0,_.jsx)($n.A,{flex:1,style:{marginTop:"6px"},children:this.props.speed&&(0,_.jsx)(Zn.A,{placeholder:"Speed",style:{width:"100%"},defaultValue:this.state.speed,onChange:this.onChangeSpeed,children:["0.5","0.75","1.0","1.25","1.5","2.0"].map((e=>(0,_.jsxs)(Zn.A.Option,{value:+e,children:["Speed ",e]},e)))})})]})]})}}var jr=n(76363),kr=n(52345),Or=n(53567);const Rr=(0,y.PA)((({item:e,store:t})=>(0,_.jsx)("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"1em"},children:(0,_.jsxs)(jr.A,{type:"primary",onClick:()=>{e._ws.playPause()},children:[e.playing&&(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(kr.A,{})," ",(0,_.jsx)("span",{children:"Pause"}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)(ar,{children:["[",e.hotkey,"]"]})]}),!e.playing&&(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(Or.A,{})," ",(0,_.jsx)("span",{children:"Play"}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)(ar,{children:["[",e.hotkey,"]"]})]})]})}))),Er=(0,y.WQ)("store")((0,y.PA)((({store:e,item:t})=>{var n;if(!t._value)return null;const r=(0,h._$)(e).messages;return(0,_.jsx)(_n,{item:t,children:(0,_.jsxs)(p.Fragment,{children:[null==(n=t.errors)?void 0:n.map(((e,t)=>(0,_.jsx)(ke,{error:e},`err-${t}`))),(0,_.jsx)(Sr,{dataField:t.value,src:t._value,muted:t.muted,item:t,selectRegion:t.selectRegion,handlePlay:t.handlePlay,handleSeek:t.handleSeek,onCreate:t.wsCreated,addRegion:t.addRegion,onLoad:t.onLoad,onReady:t.onReady,onError:t.onError,speed:t.speed,zoom:t.zoom,defaultVolume:Number(t.defaultvolume),defaultSpeed:Number(t.defaultspeed),defaultZoom:Number(t.defaultzoom),volume:t.volume,regions:!0,height:t.height,cursorColor:t.cursorcolor,cursorWidth:t.cursorwidth,messages:r}),(0,_.jsx)(Rr,{item:t,store:e}),(0,_.jsx)("div",{style:{marginBottom:"4px"}})]})})}))),_r=e=>{const t=(0,p.useRef)(e);return(0,p.useEffect)((()=>{Object.assign(t.current,e)}),[e]),t.current},Ar=(0,p.createContext)({position:0,length:0,regions:[],step:10,playing:!1,settings:{},visibleWidth:0,seekOffset:0,data:void 0}),Tr=Ar.Provider;var Pr,Ir=["title","titleId"];function Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Kr=function(e,t){var n=e.title,r=e.titleId,o=Mr(e,Ir);return p.createElement("svg",Lr({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Pr||(Pr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.7071 6.29289C15.0976 6.68342 15.0976 7.31658 14.7071 7.70711L10.4142 12L14.7071 16.2929C15.0976 16.6834 15.0976 17.3166 14.7071 17.7071C14.3166 18.0976 13.6834 18.0976 13.2929 17.7071L8.29289 12.7071C7.90237 12.3166 7.90237 11.6834 8.29289 11.2929L13.2929 6.29289C13.6834 5.90237 14.3166 5.90237 14.7071 6.29289Z",fill:"black"})))},Dr=(0,p.forwardRef)(Kr);n.p;var Nr,Vr=["title","titleId"];function zr(){return zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hr=function(e,t){var n=e.title,r=e.titleId,o=Br(e,Vr);return p.createElement("svg",zr({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Nr||(Nr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.29289 6.29289C9.68342 5.90237 10.3166 5.90237 10.7071 6.29289L15.7071 11.2929C16.0976 11.6834 16.0976 12.3166 15.7071 12.7071L10.7071 17.7071C10.3166 18.0976 9.68342 18.0976 9.29289 17.7071C8.90237 17.3166 8.90237 16.6834 9.29289 16.2929L13.5858 12L9.29289 7.70711C8.90237 7.31658 8.90237 6.68342 9.29289 6.29289Z",fill:"black"})))},Fr=(0,p.forwardRef)(Hr);n.p;var Wr,$r,Ur=["title","titleId"];function Zr(){return Zr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Yr=function(e,t){var n=e.title,r=e.titleId,o=Gr(e,Ur);return p.createElement("svg",Zr({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Wr||(Wr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.2929 6.29289C12.6834 5.90237 13.3166 5.90237 13.7071 6.29289L18.7071 11.2929C19.0976 11.6834 19.0976 12.3166 18.7071 12.7071L13.7071 17.7071C13.3166 18.0976 12.6834 18.0976 12.2929 17.7071C11.9024 17.3166 11.9024 16.6834 12.2929 16.2929L16.5858 12L12.2929 7.70711C11.9024 7.31658 11.9024 6.68342 12.2929 6.29289Z",fill:"black"})),$r||($r=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L12.7071 11.2929C13.0976 11.6834 13.0976 12.3166 12.7071 12.7071L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L10.5858 12L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289Z",fill:"black"})))},Xr=(0,p.forwardRef)(Yr);n.p;var qr,Jr,Qr=["title","titleId"];function eo(){return eo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var no=function(e,t){var n=e.title,r=e.titleId,o=to(e,Qr);return p.createElement("svg",eo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,qr||(qr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L13.4142 12L17.7071 16.2929C18.0976 16.6834 18.0976 17.3166 17.7071 17.7071C17.3166 18.0976 16.6834 18.0976 16.2929 17.7071L11.2929 12.7071C10.9024 12.3166 10.9024 11.6834 11.2929 11.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",fill:"black"})),Jr||(Jr=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.7071 6.29289C12.0976 6.68342 12.0976 7.31658 11.7071 7.70711L7.41421 12L11.7071 16.2929C12.0976 16.6834 12.0976 17.3166 11.7071 17.7071C11.3166 18.0976 10.6834 18.0976 10.2929 17.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929L10.2929 6.29289C10.6834 5.90237 11.3166 5.90237 11.7071 6.29289Z",fill:"black"})))},ro=(0,p.forwardRef)(no);n.p;var oo,io,ao=["title","titleId"];function so(){return so=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var co=function(e,t){var n=e.title,r=e.titleId,o=lo(e,ao);return p.createElement("svg",so({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,oo||(oo=p.createElement("rect",{x:15,y:5,width:2,height:14,rx:1,fill:"black"})),io||(io=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.29289 6.29289C6.68342 5.90237 7.31658 5.90237 7.70711 6.29289L12.7071 11.2929C13.0976 11.6834 13.0976 12.3166 12.7071 12.7071L7.70711 17.7071C7.31658 18.0976 6.68342 18.0976 6.29289 17.7071C5.90237 17.3166 5.90237 16.6834 6.29289 16.2929L10.5858 12L6.29289 7.70711C5.90237 7.31658 5.90237 6.68342 6.29289 6.29289Z",fill:"black"})))},uo=(0,p.forwardRef)(co);n.p;n.p;var ho,go,mo,po,fo=["title","titleId"];function vo(){return vo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var bo=function(e,t){var n=e.title,r=e.titleId,o=yo(e,fo);return p.createElement("svg",vo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ho||(ho=p.createElement("path",{d:"M6 11.9998C6 11.4475 6.44772 10.9998 7 10.9998H23C23.5523 10.9998 24 11.4475 24 11.9998C24 12.552 23.5523 12.9998 23 12.9998H7C6.44772 12.9998 6 12.552 6 11.9998Z",fill:"black",fillOpacity:.3})),go||(go=p.createElement("path",{d:"M14 12C14 11.4477 14.4477 11 15 11H23C23.5523 11 24 11.4477 24 12C24 12.5523 23.5523 13 23 13H15C14.4477 13 14 12.5523 14 12Z",fill:"black"})),mo||(mo=p.createElement("path",{d:"M18 8C18 7.44772 18.4477 7 19 7C19.5523 7 20 7.44772 20 8V16C20 16.5523 19.5523 17 19 17C18.4477 17 18 16.5523 18 16V8Z",fill:"black"})),po||(po=p.createElement("path",{d:"M2.82843 14.8284C1.49509 13.4951 0.828427 12.8284 0.828427 12C0.828427 11.1716 1.49509 10.5049 2.82843 9.17157L3.17157 8.82843C4.50491 7.49509 5.17157 6.82843 6 6.82843C6.82843 6.82843 7.49509 7.49509 8.82843 8.82843L9.17157 9.17157C10.5049 10.5049 11.1716 11.1716 11.1716 12C11.1716 12.8284 10.5049 13.4951 9.17157 14.8284L8.82843 15.1716C7.49509 16.5049 6.82843 17.1716 6 17.1716C5.17157 17.1716 4.50491 16.5049 3.17157 15.1716L2.82843 14.8284Z",fill:"black"})))},xo=(0,p.forwardRef)(bo);n.p;var wo,Co,So,jo=["title","titleId"];function ko(){return ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ro=function(e,t){var n=e.title,r=e.titleId,o=Oo(e,jo);return p.createElement("svg",ko({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,wo||(wo=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7348 12.9998H23C23.5523 12.9998 24 12.552 24 11.9998C24 11.4475 23.5523 10.9998 23 10.9998H18.7348L19.7348 12.9998ZM14.2627 10.9998H7C6.44772 10.9998 6 11.4475 6 11.9998C6 12.552 6.44772 12.9998 7 12.9998H15.2627L14.2627 10.9998Z",fill:"black"})),Co||(Co=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.553 5.10558C14.047 4.85859 14.6477 5.05881 14.8946 5.55279L20.8946 17.5528C21.1416 18.0468 20.9414 18.6474 20.4474 18.8944C19.9535 19.1414 19.3528 18.9412 19.1058 18.4472L13.1058 6.44722C12.8588 5.95324 13.059 5.35257 13.553 5.10558Z",fill:"#DD0000"})),So||(So=p.createElement("path",{d:"M2.82843 14.8284C1.49509 13.4951 0.828427 12.8284 0.828427 12C0.828427 11.1716 1.49509 10.5049 2.82843 9.17157L3.17157 8.82843C4.50491 7.49509 5.17157 6.82843 6 6.82843C6.82843 6.82843 7.49509 7.49509 8.82843 8.82843L9.17157 9.17157C10.5049 10.5049 11.1716 11.1716 11.1716 12C11.1716 12.8284 10.5049 13.4951 9.17157 14.8284L8.82843 15.1716C7.49509 16.5049 6.82843 17.1716 6 17.1716C5.17157 17.1716 4.50491 16.5049 3.17157 15.1716L2.82843 14.8284Z",fill:"black"})))},Eo=(0,p.forwardRef)(Ro);n.p;var _o,Ao=["title","titleId"];function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Io=function(e,t){var n=e.title,r=e.titleId,o=Po(e,Ao);return p.createElement("svg",To({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,_o||(_o=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.74268 16.2426C3.74268 14.2426 2.74268 13.2426 2.74268 12C2.74268 10.7574 3.74268 9.75736 5.74268 7.75736L7.75739 5.74265C9.75739 3.74265 10.7574 2.74265 12 2.74265C13.2427 2.74265 14.2427 3.74265 16.2427 5.74265L18.2574 7.75736C20.2574 9.75736 21.2574 10.7574 21.2574 12C21.2574 13.2426 20.2574 14.2426 18.2574 16.2426L16.2427 18.2574C14.2427 20.2574 13.2427 21.2574 12 21.2574C10.7574 21.2574 9.75739 20.2574 7.75739 18.2574L5.74268 16.2426ZM12 17C11.4477 17 11 16.5523 11 16V13H8C7.44771 13 7 12.5523 7 12C7 11.4477 7.44771 11 8 11H11V8C11 7.44772 11.4477 7 12 7C12.5523 7 13 7.44772 13 8V11H16C16.5523 11 17 11.4477 17 12C17 12.5523 16.5523 13 16 13H13V16C13 16.5523 12.5523 17 12 17Z",fill:"black"})))},Lo=(0,p.forwardRef)(Io);n.p;var Mo,Ko=["title","titleId"];function Do(){return Do=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vo=function(e,t){var n=e.title,r=e.titleId,o=No(e,Ko);return p.createElement("svg",Do({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Mo||(Mo=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.74268 12C2.74268 13.2426 3.74268 14.2426 5.74268 16.2426L7.75739 18.2574C9.75739 20.2574 10.7574 21.2574 12 21.2574C13.2427 21.2574 14.2427 20.2574 16.2427 18.2574L18.2574 16.2426C20.2574 14.2426 21.2574 13.2426 21.2574 12C21.2574 10.7574 20.2574 9.75736 18.2574 7.75736L16.2427 5.74265C14.2427 3.74265 13.2427 2.74265 12 2.74265C10.7574 2.74265 9.75739 3.74265 7.75739 5.74265L5.74268 7.75736C3.74268 9.75736 2.74268 10.7574 2.74268 12ZM8 11C7.44771 11 7 11.4477 7 12C7 12.5523 7.44771 13 8 13H16C16.5523 13 17 12.5523 17 12C17 11.4477 16.5523 11 16 11H8Z",fill:"#DD0000"})))},zo=(0,p.forwardRef)(Vo);n.p;n.p;var Bo,Ho=["title","titleId"];function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var $o=function(e,t){var n=e.title,r=e.titleId,o=Wo(e,Ho);return p.createElement("svg",Fo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Bo||(Bo=p.createElement("path",{d:"M6 8.12954C6 5.84608 6 4.70434 6.74273 4.26996C7.48546 3.83557 8.48057 4.39532 10.4708 5.51482L17.3516 9.38527C19.4108 10.5436 20.4404 11.1227 20.4404 12C20.4404 12.8773 19.4108 13.4564 17.3516 14.6147L10.4708 18.4852C8.48057 19.6047 7.48546 20.1644 6.74273 19.73C6 19.2957 6 18.1539 6 15.8705V8.12954Z",fill:"black"})))},Uo=(0,p.forwardRef)($o);n.p;var Zo,Go,Yo=["title","titleId"];function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jo=function(e,t){var n=e.title,r=e.titleId,o=qo(e,Yo);return p.createElement("svg",Xo({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Zo||(Zo=p.createElement("rect",{x:14,y:4,width:5,height:16,rx:1.5,fill:"black"})),Go||(Go=p.createElement("rect",{x:5,y:4,width:5,height:16,rx:1.5,fill:"black"})))},Qo=(0,p.forwardRef)(Jo);n.p;var ei,ti,ni=["title","titleId"];function ri(){return ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ii=function(e,t){var n=e.title,r=e.titleId,o=oi(e,ni);return p.createElement("svg",ri({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ei||(ei=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.7071 6.29289C18.0976 6.68342 18.0976 7.31658 17.7071 7.70711L13.4142 12L17.7071 16.2929C18.0976 16.6834 18.0976 17.3166 17.7071 17.7071C17.3166 18.0976 16.6834 18.0976 16.2929 17.7071L11.2929 12.7071C10.9024 12.3166 10.9024 11.6834 11.2929 11.2929L16.2929 6.29289C16.6834 5.90237 17.3166 5.90237 17.7071 6.29289Z",fill:"black"})),ti||(ti=p.createElement("rect",{x:7,y:5,width:2,height:14,rx:1,fill:"black"})))},ai=(0,p.forwardRef)(ii);n.p;n.p;var si,li,ci,di,ui=["title","titleId"];function hi(){return hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mi=function(e,t){var n=e.title,r=e.titleId,o=gi(e,ui);return p.createElement("svg",hi({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,si||(si=p.createElement("path",{d:"M9 5C9 4.44772 8.55228 4 8 4H6C5.05719 4 4.58579 4 4.29289 4.29289C4 4.58579 4 5.05719 4 6V8C4 8.55228 4.44772 9 5 9C5.55228 9 6 8.55228 6 8V6H8C8.55228 6 9 5.55228 9 5Z",fill:"black"})),li||(li=p.createElement("path",{d:"M16 6C15.4477 6 15 5.55228 15 5C15 4.44772 15.4477 4 16 4H18C18.9428 4 19.4142 4 19.7071 4.29289C20 4.58579 20 5.05719 20 6V8C20 8.55228 19.5523 9 19 9C18.4477 9 18 8.55228 18 8V6H16Z",fill:"black"})),ci||(ci=p.createElement("path",{d:"M15 19C15 18.4477 15.4477 18 16 18H18V16C18 15.4477 18.4477 15 19 15C19.5523 15 20 15.4477 20 16V18C20 18.9428 20 19.4142 19.7071 19.7071C19.4142 20 18.9428 20 18 20H16C15.4477 20 15 19.5523 15 19Z",fill:"black"})),di||(di=p.createElement("path",{d:"M5 15C5.55228 15 6 15.4477 6 16V18H8C8.55228 18 9 18.4477 9 19C9 19.5523 8.55228 20 8 20H6C5.05719 20 4.58579 20 4.29289 19.7071C4 19.4142 4 18.9428 4 18V16C4 15.4477 4.44772 15 5 15Z",fill:"black"})))},pi=(0,p.forwardRef)(mi);n.p;var fi,vi,yi,bi,xi=["title","titleId"];function wi(){return wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Si=function(e,t){var n=e.title,r=e.titleId,o=Ci(e,xi);return p.createElement("svg",wi({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fi||(fi=p.createElement("path",{d:"M20 16C20 15.4477 19.5523 15 19 15H17C16.0572 15 15.5858 15 15.2929 15.2929C15 15.5858 15 16.0572 15 17V19C15 19.5523 15.4477 20 16 20C16.5523 20 17 19.5523 17 19V17H19C19.5523 17 20 16.5523 20 16Z",fill:"black"})),vi||(vi=p.createElement("path",{d:"M5 17C4.44772 17 4 16.5523 4 16C4 15.4477 4.44772 15 5 15H7C7.94281 15 8.41421 15 8.70711 15.2929C9 15.5858 9 16.0572 9 17V19C9 19.5523 8.55228 20 8 20C7.44772 20 7 19.5523 7 19V17H5Z",fill:"black"})),yi||(yi=p.createElement("path",{d:"M4 8C4 7.44772 4.44772 7 5 7H7V5C7 4.44772 7.44772 4 8 4C8.55228 4 9 4.44772 9 5V7C9 7.94281 9 8.41421 8.70711 8.70711C8.41421 9 7.94281 9 7 9H5C4.44772 9 4 8.55228 4 8Z",fill:"black"})),bi||(bi=p.createElement("path",{d:"M16 4C16.5523 4 17 4.44772 17 5V7H19C19.5523 7 20 7.44772 20 8C20 8.55228 19.5523 9 19 9H17C16.0572 9 15.5858 9 15.2929 8.70711C15 8.41421 15 7.94281 15 7V5C15 4.44772 15.4477 4 16 4Z",fill:"black"})))},ji=(0,p.forwardRef)(Si);n.p;var ki,Oi=["title","titleId"];function Ri(){return Ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _i=function(e,t){var n=e.title,r=e.titleId,o=Ei(e,Oi);return p.createElement("svg",Ri({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ki||(ki=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.89441 8.94725C6.52587 5.68422 11.4741 5.68428 13.1055 8.94726C13.3525 9.44124 13.9532 9.64147 14.4472 9.39448C14.9412 9.14749 15.1414 8.54681 14.8944 8.05284C12.5259 3.31582 5.47408 3.31562 3.10554 8.05285C2.85856 8.54683 3.05879 9.1475 3.55277 9.39448C4.04675 9.64147 4.64743 9.44123 4.89441 8.94725ZM8.99998 8C7.61926 8 6.49997 9.11929 6.49997 10.5C6.49997 11.8807 7.61926 13 8.99998 13C10.3807 13 11.5 11.8807 11.5 10.5C11.5 9.11929 10.3807 8 8.99998 8Z",fill:"currentColor"})))},Ai=(0,p.forwardRef)(_i);n.p;var Ti,Pi=["title","titleId"];function Ii(){return Ii=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mi=function(e,t){var n=e.title,r=e.titleId,o=Li(e,Pi);return p.createElement("svg",Ii({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ti||(Ti=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.89445 6.55277C6.52591 9.81581 11.4741 9.81575 13.1056 6.55276C13.3526 6.05878 13.9532 5.85856 14.4472 6.10555C14.9412 6.35254 15.1414 6.95321 14.8944 7.44719C14.6733 7.88947 14.4113 8.29047 14.1162 8.65016L14.9106 9.34931C15.3252 9.71417 15.3656 10.346 15.0007 10.7607C14.6359 11.1753 14.004 11.2156 13.5894 10.8507L12.6023 9.98207C12.4772 10.0606 12.3497 10.1346 12.22 10.204L12.6444 11.0528C12.8914 11.5468 12.6912 12.1475 12.1972 12.3945C11.7032 12.6414 11.1026 12.4412 10.8556 11.9472L10.3193 10.8747C10.2125 10.8952 10.1052 10.9132 9.99751 10.9287C9.99917 10.9523 10 10.9761 10 11V12C10 12.5523 9.5523 13 9.00001 13C8.44773 13 8.00001 12.5523 8.00001 12V11C8.00001 10.9761 8.00086 10.9523 8.00252 10.9287C7.89486 10.9133 7.78755 10.8952 7.68071 10.8747L7.14444 11.9472C6.89745 12.4412 6.29678 12.6414 5.8028 12.3945C5.30882 12.1475 5.1086 11.5468 5.35559 11.0528L5.77996 10.2041C5.65033 10.1346 5.52283 10.0606 5.39773 9.9821L4.41064 10.8507C3.99603 11.2156 3.36415 11.1753 2.9993 10.7607C2.63444 10.346 2.67478 9.71417 3.08938 9.34931L3.88386 8.65018C3.58869 8.29047 3.32672 7.88947 3.10558 7.44718C2.8586 6.95319 3.05883 6.35252 3.55281 6.10554C4.04679 5.85856 4.64746 6.05879 4.89445 6.55277Z",fill:"currentColor"})))},Ki=(0,p.forwardRef)(Mi);n.p;n.p;var Di,Ni,Vi,zi=["title","titleId"];function Bi(){return Bi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fi=function(e,t){var n=e.title,r=e.titleId,o=Hi(e,zi);return p.createElement("svg",Bi({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Di||(Di=p.createElement("rect",{x:2,y:5,width:20,height:14,rx:1.5,fill:"white",stroke:"black",strokeWidth:2})),Ni||(Ni=p.createElement("path",{d:"M1 11H23V18H1V11Z",fill:"black",fillOpacity:.15})),Vi||(Vi=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7071 10.2928C16.0976 10.6834 16.0976 11.3165 15.7071 11.707L12.7072 14.7069C12.3166 15.0975 11.6835 15.0975 11.293 14.7069L8.29296 11.7071C7.90243 11.3165 7.90242 10.6834 8.29294 10.2928C8.68345 9.90232 9.31662 9.9023 9.70715 10.2928L12 12.5856L14.2928 10.2928C14.6834 9.90231 15.3165 9.90231 15.7071 10.2928Z",fill:"black"})))},Wi=(0,p.forwardRef)(Fi);n.p;var $i,Ui,Zi,Gi=["title","titleId"];function Yi(){return Yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qi=function(e,t){var n=e.title,r=e.titleId,o=Xi(e,Gi);return p.createElement("svg",Yi({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,$i||($i=p.createElement("rect",{x:2,y:5,width:20,height:14,rx:1.5,fill:"white",stroke:"black",strokeWidth:2})),Ui||(Ui=p.createElement("path",{d:"M1 11H23V18H1V11Z",fill:"black",fillOpacity:.15})),Zi||(Zi=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 8.99988C12.2652 8.99988 12.5196 9.10525 12.7071 9.2928L15.707 12.2929C16.0975 12.6835 16.0975 13.3166 15.707 13.7071C15.3164 14.0976 14.6833 14.0976 14.2927 13.7071L12 11.4141L9.70712 13.7071C9.3166 14.0976 8.68343 14.0976 8.2929 13.7071C7.90237 13.3166 7.90236 12.6834 8.29288 12.2929L11.2929 9.29278C11.4804 9.10524 11.7348 8.99987 12 8.99988Z",fill:"black"})))},Ji=(0,p.forwardRef)(qi);n.p;var Qi,ea,ta=["title","titleId"];function na(){return na=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var oa=function(e,t){var n=e.title,r=e.titleId,o=ra(e,ta);return p.createElement("svg",na({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Qi||(Qi=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.7071 6.29289C20.0976 6.68342 20.0976 7.31658 19.7071 7.70711L15.4142 12L19.7071 16.2929C20.0976 16.6834 20.0976 17.3166 19.7071 17.7071C19.3166 18.0976 18.6834 18.0976 18.2929 17.7071L13.2929 12.7071C12.9024 12.3166 12.9024 11.6834 13.2929 11.2929L18.2929 6.29289C18.6834 5.90237 19.3166 5.90237 19.7071 6.29289Z",fill:"black"})),ea||(ea=p.createElement("path",{d:"M5 14C4.11744 13.1174 3.67615 12.6762 3.62737 12.1346C3.6193 12.045 3.6193 11.955 3.62737 11.8654C3.67615 11.3238 4.11744 10.8826 5 10C5.88256 9.11744 6.32385 8.67615 6.86543 8.62737C6.95496 8.6193 7.04504 8.6193 7.13457 8.62737C7.67615 8.67615 8.11744 9.11744 9 10C9.88256 10.8826 10.3238 11.3238 10.3726 11.8654C10.3807 11.955 10.3807 12.045 10.3726 12.1346C10.3238 12.6762 9.88256 13.1174 9 14C8.11744 14.8826 7.67615 15.3238 7.13457 15.3726C7.04504 15.3807 6.95496 15.3807 6.86543 15.3726C6.32385 15.3238 5.88256 14.8826 5 14Z",fill:"black"})))},ia=(0,p.forwardRef)(oa);n.p;var aa,sa,la=["title","titleId"];function ca(){return ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ua=function(e,t){var n=e.title,r=e.titleId,o=da(e,la);return p.createElement("svg",ca({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,aa||(aa=p.createElement("path",{d:"M15 14C14.1174 13.1174 13.6762 12.6762 13.6274 12.1346C13.6193 12.045 13.6193 11.955 13.6274 11.8654C13.6762 11.3238 14.1174 10.8826 15 10C15.8826 9.11744 16.3238 8.67615 16.8654 8.62737C16.955 8.6193 17.045 8.6193 17.1346 8.62737C17.6762 8.67615 18.1174 9.11744 19 10C19.8826 10.8826 20.3238 11.3238 20.3726 11.8654C20.3807 11.955 20.3807 12.045 20.3726 12.1346C20.3238 12.6762 19.8826 13.1174 19 14C18.1174 14.8826 17.6762 15.3238 17.1346 15.3726C17.045 15.3807 16.955 15.3807 16.8654 15.3726C16.3238 15.3238 15.8826 14.8826 15 14Z",fill:"black"})),sa||(sa=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.29289 6.29289C4.68342 5.90237 5.31658 5.90237 5.70711 6.29289L10.7071 11.2929C11.0976 11.6834 11.0976 12.3166 10.7071 12.7071L5.70711 17.7071C5.31658 18.0976 4.68342 18.0976 4.29289 17.7071C3.90237 17.3166 3.90237 16.6834 4.29289 16.2929L8.58579 12L4.29289 7.70711C3.90237 7.31658 3.90237 6.68342 4.29289 6.29289Z",fill:"black"})))},ha=(0,p.forwardRef)(ua);n.p;var ga,ma=["title","titleId"];function pa(){return pa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var va=function(e,t){var n=e.title,r=e.titleId,o=fa(e,ma);return p.createElement("svg",pa({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ga||(ga=p.createElement("path",{d:"M11.76 7.62664C11.7867 7.42664 11.8 7.21998 11.8 6.99998C11.8 6.78664 11.7867 6.57331 11.7533 6.37331L13.1067 5.31998C13.2267 5.22664 13.26 5.04664 13.1867 4.91331L11.9067 2.69998C11.8267 2.55331 11.66 2.50664 11.5133 2.55331L9.91999 3.19331C9.58666 2.93998 9.23333 2.72664 8.83999 2.56664L8.59999 0.873309C8.57333 0.713309 8.43999 0.599976 8.27999 0.599976H5.71999C5.55999 0.599976 5.43332 0.713309 5.40666 0.873309L5.16666 2.56664C4.77333 2.72664 4.41333 2.94664 4.08666 3.19331L2.49332 2.55331C2.34666 2.49998 2.17999 2.55331 2.09999 2.69998L0.826658 4.91331C0.746658 5.05331 0.773325 5.22664 0.906658 5.31998L2.25999 6.37331C2.22666 6.57331 2.19999 6.79331 2.19999 6.99998C2.19999 7.20664 2.21333 7.42664 2.24666 7.62664L0.893325 8.67998C0.773325 8.77331 0.739992 8.95331 0.813325 9.08664L2.09333 11.3C2.17333 11.4466 2.33999 11.4933 2.48666 11.4466L4.07999 10.8066C4.41333 11.06 4.76666 11.2733 5.15999 11.4333L5.39999 13.1266C5.43333 13.2866 5.55999 13.4 5.71999 13.4H8.27999C8.43999 13.4 8.57333 13.2866 8.59333 13.1266L8.83333 11.4333C9.22666 11.2733 9.58666 11.06 9.91333 10.8066L11.5067 11.4466C11.6533 11.5 11.82 11.4466 11.9 11.3L13.18 9.08664C13.26 8.93998 13.2267 8.77331 13.1 8.67998L11.76 7.62664ZM6.99999 9.39998C5.67999 9.39998 4.59999 8.31998 4.59999 6.99998C4.59999 5.67998 5.67999 4.59998 6.99999 4.59998C8.31999 4.59998 9.39999 5.67998 9.39999 6.99998C9.39999 8.31998 8.31999 9.39998 6.99999 9.39998Z",fill:"currentColor",fillOpacity:.8})))},ya=(0,p.forwardRef)(va);n.p;var ba,xa=["title","titleId"];function wa(){return wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sa=function(e,t){var n=e.title,r=e.titleId,o=Ca(e,xa);return p.createElement("svg",wa({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ba||(ba=p.createElement("path",{d:"M0 3.99999V7.99999H2.66667L6 11.3333V0.666654L2.66667 3.99999H0ZM9 5.99999C9 4.81999 8.32 3.80665 7.33333 3.31332V8.67999C8.32 8.19332 9 7.17999 9 5.99999ZM7.33333 0.15332V1.52665C9.26 2.09999 10.6667 3.88665 10.6667 5.99999C10.6667 8.11332 9.26 9.89999 7.33333 10.4733V11.8467C10.0067 11.24 12 8.85332 12 5.99999C12 3.14665 10.0067 0.759987 7.33333 0.15332Z",fill:"currentColor",fillOpacity:.8})))},ja=(0,p.forwardRef)(Sa);n.p;var ka,Oa=["title","titleId"];function Ra(){return Ra=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _a=function(e,t){var n=e.title,r=e.titleId,o=Ea(e,Oa);return p.createElement("svg",Ra({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ka||(ka=p.createElement("path",{d:"M9 6C9 4.82 8.32 3.80667 7.33333 3.31333V4.78667L8.96667 6.42C8.98667 6.28667 9 6.14667 9 6ZM10.6667 6C10.6667 6.62667 10.5333 7.21333 10.3067 7.76L11.3133 8.76667C11.7533 7.94 12 7 12 6C12 3.14667 10.0067 0.76 7.33333 0.153333V1.52667C9.26 2.1 10.6667 3.88667 10.6667 6ZM0.846667 0L0 0.846667L3.15333 4H0V8H2.66667L6 11.3333V6.84667L8.83333 9.68C8.38667 10.0267 7.88667 10.3 7.33333 10.4667V11.84C8.25333 11.6333 9.08667 11.2067 9.79333 10.6333L11.1533 12L12 11.1533L0.846667 0ZM6 0.666667L4.60667 2.06L6 3.45333V0.666667Z",fill:"currentColor",fillOpacity:.8})))},Aa=(0,p.forwardRef)(_a);n.p;var Ta,Pa=["title","titleId"];function Ia(){return Ia=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ma=function(e,t){var n=e.title,r=e.titleId,o=La(e,Pa);return p.createElement("svg",Ia({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ta||(Ta=p.createElement("path",{d:"M6.33325 3.66671H7.66659V5.00004H6.33325V3.66671ZM6.33325 6.33337H7.66659V10.3334H6.33325V6.33337ZM6.99992 0.333374C3.31992 0.333374 0.333252 3.32004 0.333252 7.00004C0.333252 10.68 3.31992 13.6667 6.99992 13.6667C10.6799 13.6667 13.6666 10.68 13.6666 7.00004C13.6666 3.32004 10.6799 0.333374 6.99992 0.333374ZM6.99992 12.3334C4.05992 12.3334 1.66659 9.94004 1.66659 7.00004C1.66659 4.06004 4.05992 1.66671 6.99992 1.66671C9.93992 1.66671 12.3333 4.06004 12.3333 7.00004C12.3333 9.94004 9.93992 12.3334 6.99992 12.3334Z",fill:"currentColor",fillOpacity:.8})))},Ka=(0,p.forwardRef)(Ma);n.p;const Da=yr(),Na=(e,t)=>{const n=(0,p.useRef)(null),r=(0,p.useRef)(t),o=(0,p.useRef)(((e,t)=>{null==r.current||r.current(e,t)}));(0,p.useEffect)((()=>{var t;e!==n.current&&(e?(((e,t)=>{yr.keymap[e]?Da.overwriteNamed(e,t):Da.overwriteKey(e,t)})(e,o.current),n.current=e):n.current&&!e&&(t=n.current,yr.keymap[t]?Da.removeNamed(t):Da.removeKey(t),n.current=null))}),[e]),(0,p.useEffect)((()=>{r.current=t}),[t])},Va=["children","type","extra","className","size","waiting","icon","tag","look","primary","danger","hotkey","tooltip","tooltipTheme","nopadding"],za=(0,p.forwardRef)(((e,t)=>{let{children:n,type:r,extra:o,className:i,size:a,waiting:s,icon:l,tag:c,look:d,primary:u,danger:h,hotkey:g,tooltip:m,tooltipTheme:f="light",nopadding:v}=e,y=(0,Yn.A)(e,Va);const b=null!=c?c:y.href?"a":"button",x={size:a,waiting:s,type:r,danger:h,nopadding:v,look:null!=d?d:[],withIcon:!!l,withExtra:!!o};u&&(x.look="primary");const C=(0,p.useMemo)((()=>{if(!l)return null;if((0,w.isDefined)(l.props.size))return l;switch(a){case"small":return(0,p.cloneElement)(l,Object.assign({},l.props,{size:12,width:12,height:12}));case"compact":return(0,p.cloneElement)(l,Object.assign({},l.props,{size:14,width:14,height:14}));default:return l}}),[l,a]);Na(g,y.onClick);const S=(0,_.jsx)(Ze.eB,Object.assign({name:"button",mod:x,mix:i,ref:t,tag:b,type:r},y,{children:(0,_.jsxs)(_.Fragment,{children:[C&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"icon",children:C}),C&&n?(0,_.jsx)("span",{children:n}):n,void 0!==o?(0,_.jsx)(Ze.Sl,{name:"extra",children:o}):null]})}));return g&&(0,w.isDefined)(yr.keymap[g])?(0,_.jsx)(yr.Tooltip,{name:g,title:m,children:S}):m?(0,_.jsx)(ir,{title:m,theme:f,ref:t,children:S}):S}));za.displayName="Button";za.Group=({className:e,children:t,collapsed:n})=>(0,_.jsx)(Ze.eB,{name:"button-group",mod:{collapsed:n},mix:e,children:t});const Ba=["direction","size","className","style","children","spread","stretch","align","collapsed","truncated"],{Block:Ha}=(0,Ze.JE)(),Fa=e=>{let{direction:t="horizontal",size:n,className:r,style:o,children:i,spread:a,stretch:s,align:l,collapsed:c,truncated:d}=e,u=(0,Yn.A)(e,Ba);return(0,_.jsx)(Ha,Object.assign({name:"space",mod:{direction:t,size:n,spread:a,stretch:s,align:l,collapsed:c,truncated:d},mix:r,style:o},u,{children:i}))},Wa=({position:e=0,length:t=0,onPositionChange:n})=>{const[r,o]=(0,p.useState)(!1),i=(0,p.useMemo)((()=>t-1),[t]);return(0,_.jsx)(Ze.eB,{name:"frames-control",onClick:()=>o(!0),children:r?(0,_.jsx)(Ua,{length:i,position:e,onChange:e=>{null==n||n((0,w.clamp)(e,0,t))},onFinishEditing:()=>{o(!1)}}):(0,_.jsxs)(_.Fragment,{children:[(0,w.clamp)(Math.round(e+1),1,i+1)," ",(0,_.jsxs)("span",{children:["of ",i+1]})]})})},$a=["ArrowUp","ArrowDown","Backspace","Delete","Enter",/[0-9]/],Ua=({length:e,position:t,onChange:n,onFinishEditing:r})=>{const o=(0,p.useRef)(),i=t=>{null==n||n((0,w.clamp)(t,1,e))};return(0,_.jsx)("input",{type:"text",ref:o,defaultValue:t+1,autoFocus:!0,onFocus:()=>{var e;return null==(e=o.current)?void 0:e.select()},onKeyDown:t=>{const n=$a.find((e=>e instanceof RegExp?e.test(t.key):e===t.key));n||t.metaKey||t.preventDefault();const a=Number.parseInt(o.current.value),s=t.shiftKey?10:1;"Enter"===t.key?(null==i||i(a),null==r||r()):"Escape"===t.key?null==r||r():"ArrowUp"===n?(o.current.value=(0,w.clamp)(a+s,1,e).toString(),t.preventDefault()):"ArrowDown"===n&&(o.current.value=(0,w.clamp)(a-s,1,e).toString(),t.preventDefault())},onBlur:()=>null==r?void 0:r()})};var Za,Ga,Ya=["title","titleId"];function Xa(){return Xa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ja=function(e,t){var n=e.title,r=e.titleId,o=qa(e,Ya);return p.createElement("svg",Xa({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Za||(Za=p.createElement("path",{d:"M15 24H19C21.7614 24 24 21.7614 24 19V19C24 16.2386 21.7614 14 19 14H13",stroke:"currentColor",strokeWidth:2})),Ga||(Ga=p.createElement("path",{d:"M16 10L12 14L16 18",stroke:"currentColor",strokeWidth:2})))},Qa=(0,p.forwardRef)(Ja);n.p;var es,ts,ns=["title","titleId"];function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var is=function(e,t){var n=e.title,r=e.titleId,o=os(e,ns);return p.createElement("svg",rs({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,es||(es=p.createElement("path",{d:"M21 24H17C14.2386 24 12 21.7614 12 19V19C12 16.2386 14.2386 14 17 14H23",stroke:"currentColor",strokeWidth:2})),ts||(ts=p.createElement("path",{d:"M20 10L24 14L20 18",stroke:"currentColor",strokeWidth:2})))},as=(0,p.forwardRef)(is);n.p;var ss,ls=["title","titleId"];function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var us=function(e,t){var n=e.title,r=e.titleId,o=ds(e,ls);return p.createElement("svg",cs({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ss||(ss=p.createElement("path",{opacity:.9,d:"M12.4644 12.4645C12.333 12.5959 12.2673 12.6616 12.2235 12.7271C12.0437 12.9962 12.0437 13.347 12.2235 13.616C12.2673 13.6816 12.333 13.7473 12.4644 13.8787L16.5857 18L12.4644 22.1213C12.3329 22.2528 12.2672 22.3185 12.2234 22.384C12.0437 22.653 12.0437 23.0039 12.2234 23.2729C12.2672 23.3384 12.3329 23.4041 12.4644 23.5356C12.5958 23.667 12.6615 23.7327 12.727 23.7765C12.996 23.9562 13.3469 23.9562 13.6159 23.7765C13.6814 23.7327 13.7471 23.667 13.8786 23.5356L17.9999 19.4142L22.1213 23.5355C22.2527 23.667 22.3184 23.7327 22.3839 23.7765C22.6529 23.9562 23.0038 23.9562 23.2728 23.7765C23.3383 23.7327 23.404 23.667 23.5355 23.5355C23.6669 23.4041 23.7326 23.3384 23.7764 23.2729C23.9561 23.0039 23.9561 22.653 23.7764 22.384C23.7326 22.3185 23.6669 22.2528 23.5355 22.1213L19.4141 18L23.5354 13.8787C23.6669 13.7473 23.7326 13.6816 23.7763 13.6161C23.9561 13.347 23.9561 12.9962 23.7763 12.7271C23.7326 12.6616 23.6669 12.5959 23.5354 12.4645C23.404 12.3331 23.3383 12.2674 23.2728 12.2236C23.0037 12.0438 22.6529 12.0438 22.3839 12.2236C22.3184 12.2674 22.2526 12.3331 22.1212 12.4645L17.9999 16.5858L13.8786 12.4645C13.7472 12.3331 13.6815 12.2673 13.616 12.2236C13.3469 12.0438 12.9961 12.0438 12.727 12.2236C12.6615 12.2673 12.5958 12.3331 12.4644 12.4645Z",fill:"currentColor"})))},hs=(0,p.forwardRef)(us);n.p;var gs,ms,ps=["title","titleId"];function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ys=function(e,t){var n=e.title,r=e.titleId,o=vs(e,ps);return p.createElement("svg",fs({width:14,height:16,viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,gs||(gs=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.99995 -2.91129e-06L6.90627 -6.32312e-05C6.46527 -0.000491789 6.08025 -0.000865988 5.72266 0.0873838C4.97062 0.272981 4.31952 0.74227 3.90563 1.39703C3.70883 1.70836 3.58743 2.07374 3.44838 2.49225L3.27919 3H0V5H14V3H10.7207L10.5515 2.49224C10.4125 2.07374 10.2911 1.70835 10.0943 1.39703C9.68039 0.74227 9.02928 0.272981 8.27724 0.0873838C7.91965 -0.000865988 7.53463 -0.000491789 7.09363 -6.32312e-05L6.99995 -2.91129e-06ZM8.61205 3C8.48477 2.62409 8.44589 2.53239 8.40372 2.46567C8.26575 2.24742 8.04872 2.09099 7.79804 2.02913C7.7086 2.00705 7.58828 2 6.99995 2C6.41162 2 6.29131 2.00705 6.20187 2.02913C5.95119 2.09099 5.73415 2.24742 5.59619 2.46567C5.55402 2.53239 5.51514 2.62409 5.38786 3H8.61205Z",fill:"currentColor"})),ms||(ms=p.createElement("path",{d:"M2.99314 6.38315L3.57753 11.3505C3.67952 12.2174 3.7468 12.7729 3.84826 13.18C3.94285 13.5595 4.03799 13.6797 4.11397 13.7473C4.18995 13.8148 4.32041 13.8953 4.70839 13.9449C5.12455 13.9981 5.68415 14 6.55698 14H7.44299C8.31582 14 8.87543 13.9981 9.29158 13.9449C9.67956 13.8953 9.81002 13.8148 9.886 13.7473C9.96198 13.6797 10.0571 13.5595 10.1517 13.18C10.2532 12.7729 10.3205 12.2174 10.4224 11.3505L11.0068 6.38315L12.9931 6.61683L12.4016 11.6448C12.3089 12.4335 12.2284 13.1178 12.0924 13.6637C11.946 14.2511 11.7074 14.8039 11.215 15.2418C10.7226 15.6797 10.1457 15.852 9.54519 15.9287C8.98711 16.0001 8.29817 16 7.50402 16H6.49595C5.7018 16 5.01286 16.0001 4.45478 15.9287C3.85429 15.852 3.27736 15.6797 2.78494 15.2418C2.29252 14.8039 2.05402 14.2511 1.90762 13.6637C1.77156 13.1178 1.6911 12.4335 1.59836 11.6448L1.00684 6.61683L2.99314 6.38315Z",fill:"currentColor"})))},bs=(0,p.forwardRef)(ys);n.p;var xs,ws=["title","titleId"];function Cs(){return Cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var js=function(e,t){var n=e.title,r=e.titleId,o=Ss(e,ws);return p.createElement("svg",Cs({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,xs||(xs=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 0V6H14V8H8V14H6V8H0V6H6V0H8Z",fill:"currentColor"})))},ks=(0,p.forwardRef)(js);n.p;var Os,Rs,Es=["title","titleId"];function _s(){return _s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ts=function(e,t){var n=e.title,r=e.titleId,o=As(e,Es);return p.createElement("svg",_s({viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Os||(Os=p.createElement("path",{d:"M11.3471 8.26019C11.4701 7.64517 11.5316 7.33766 11.6015 7.24589C11.8016 6.98314 12.197 6.98314 12.3971 7.24589C12.467 7.33766 12.5285 7.64517 12.6515 8.26019C12.7345 8.6753 12.776 8.88285 12.8503 9.06287C13.0534 9.55465 13.444 9.94526 13.9358 10.1483C14.1158 10.2226 14.3233 10.2641 14.7384 10.3471C15.3535 10.4701 15.661 10.5316 15.7527 10.6015C16.0155 10.8016 16.0155 11.197 15.7527 11.3971C15.661 11.467 15.3535 11.5285 14.7384 11.6515C14.3233 11.7345 14.1158 11.776 13.9358 11.8503C13.444 12.0534 13.0534 12.444 12.8503 12.9358C12.776 13.1158 12.7345 13.3233 12.6515 13.7384C12.5285 14.3535 12.467 14.661 12.3971 14.7527C12.197 15.0155 11.8016 15.0155 11.6015 14.7527C11.5316 14.661 11.4701 14.3535 11.3471 13.7384C11.2641 13.3233 11.2226 13.1158 11.1483 12.9358C10.9453 12.444 10.5546 12.0534 10.0629 11.8503C9.88285 11.776 9.6753 11.7345 9.26019 11.6515C8.64517 11.5285 8.33766 11.467 8.24589 11.3971C7.98314 11.197 7.98314 10.8016 8.24589 10.6015C8.33766 10.5316 8.64517 10.4701 9.26019 10.3471C9.6753 10.2641 9.88285 10.2226 10.0629 10.1483C10.5546 9.94526 10.9453 9.55465 11.1483 9.06287C11.2226 8.88285 11.2641 8.6753 11.3471 8.26019Z",fill:"currentColor"})),Rs||(Rs=p.createElement("path",{d:"M5.34714 4.26019C5.47015 3.64517 5.53165 3.33766 5.60154 3.24589C5.80164 2.98314 6.197 2.98314 6.3971 3.24589C6.46699 3.33766 6.52849 3.64517 6.65149 4.26019C6.73451 4.6753 6.77603 4.88285 6.85035 5.06287C7.05338 5.55465 7.44399 5.94526 7.93576 6.14829C8.11578 6.22261 8.32334 6.26412 8.73845 6.34714C9.35347 6.47015 9.66098 6.53165 9.75275 6.60154C10.0155 6.80164 10.0155 7.197 9.75275 7.3971C9.66098 7.46699 9.35347 7.52849 8.73845 7.65149C8.32334 7.73451 8.11578 7.77603 7.93576 7.85035C7.44399 8.05338 7.05338 8.44399 6.85035 8.93576C6.77603 9.11578 6.73451 9.32334 6.65149 9.73845C6.52849 10.3535 6.46699 10.661 6.3971 10.7527C6.197 11.0155 5.80164 11.0155 5.60154 10.7527C5.53165 10.661 5.47015 10.3535 5.34714 9.73845C5.26412 9.32334 5.22261 9.11578 5.14829 8.93576C4.94526 8.44399 4.55465 8.05338 4.06287 7.85035C3.88285 7.77603 3.6753 7.73451 3.26019 7.65149C2.64517 7.52849 2.33766 7.46699 2.24589 7.3971C1.98314 7.197 1.98314 6.80164 2.24589 6.60154C2.33766 6.53165 2.64517 6.47015 3.26019 6.34714C3.6753 6.26412 3.88285 6.22261 4.06287 6.14829C4.55465 5.94526 4.94526 5.55465 5.14829 5.06287C5.22261 4.88285 5.26412 4.6753 5.34714 4.26019Z",fill:"currentColor"})))},Ps=(0,p.forwardRef)(Ts);n.p;var Is,Ls=["title","titleId"];function Ms(){return Ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ds=function(e,t){var n=e.title,r=e.titleId,o=Ks(e,Ls);return p.createElement("svg",Ms({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Is||(Is=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.2 4.5H14.8C15.46 4.5 16 5.04 16 5.7V15.2929C16 15.7383 15.4614 15.9614 15.1464 15.6464L13.8929 14.3929C13.7054 14.2054 13.451 14.1 13.1858 14.1H5.2C4.54 14.1 4 13.56 4 12.9V5.7C4 5.04 4.54 4.5 5.2 4.5ZM13.1381 8.13807C13.3984 7.87772 13.3984 7.45561 13.1381 7.19526C12.8777 6.93491 12.4556 6.93491 12.1953 7.19526L9.66667 9.72386L8.13807 8.19526C7.87772 7.93491 7.45561 7.93491 7.19526 8.19526C6.93491 8.45561 6.93491 8.87772 7.19526 9.13807L9.19526 11.1381C9.45561 11.3984 9.87772 11.3984 10.1381 11.1381L13.1381 8.13807Z",fill:"#5CDBD3"})))},Ns=(0,p.forwardRef)(Ds);n.p;var Vs,zs=["title","titleId"];function Bs(){return Bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fs=function(e,t){var n=e.title,r=e.titleId,o=Hs(e,zs);return p.createElement("svg",Bs({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Vs||(Vs=p.createElement("path",{d:"M14.8 4.5H5.2C4.54 4.5 4 5.04 4 5.7V12.9C4 13.56 4.54 14.1 5.2 14.1H13.1858C13.451 14.1 13.7054 14.2054 13.8929 14.3929L15.1464 15.6464C15.4614 15.9614 16 15.7383 16 15.2929V5.7C16 5.04 15.46 4.5 14.8 4.5Z",fill:"#FF85C0"})))},Ws=(0,p.forwardRef)(Fs);n.p;var $s,Us,Zs=["title","titleId"];function Gs(){return Gs=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xs=function(e,t){var n=e.title,r=e.titleId,o=Ys(e,Zs);return p.createElement("svg",Gs({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,$s||($s=p.createElement("rect",{width:20,height:20,rx:4,fill:"#5CDBD3",fillOpacity:.18})),Us||(Us=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.2 5H14.8C15.46 5 16 5.52595 16 6.16877V15.512C16 15.9459 15.4614 16.1632 15.1464 15.8564L13.8929 14.6355C13.7054 14.4528 13.451 14.3502 13.1858 14.3502H5.2C4.54 14.3502 4 13.8242 4 13.1814V6.16877C4 5.52595 4.54 5 5.2 5ZM13.1381 8.5434C13.3984 8.28982 13.3984 7.8787 13.1381 7.62512C12.8777 7.37155 12.4556 7.37155 12.1953 7.62512L9.66667 10.0879L8.13807 8.5991C7.87772 8.34553 7.45561 8.34553 7.19526 8.5991C6.93491 8.85268 6.93491 9.2638 7.19526 9.51738L9.19526 11.4653C9.45561 11.7189 9.87772 11.7189 10.1381 11.4653L13.1381 8.5434Z",fill:"#5CDBD3"})))},qs=(0,p.forwardRef)(Xs);n.p;var Js,Qs,el=["title","titleId"];function tl(){return tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var rl=function(e,t){var n=e.title,r=e.titleId,o=nl(e,el);return p.createElement("svg",tl({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Js||(Js=p.createElement("rect",{width:20,height:20,rx:4,fill:"#FF85C0",fillOpacity:.18})),Qs||(Qs=p.createElement("path",{d:"M14.8 4H5.2C4.54 4 4 4.54 4 5.2V12.4C4 13.06 4.54 13.6 5.2 13.6H13.1858C13.451 13.6 13.7054 13.7054 13.8929 13.8929L15.1464 15.1464C15.4614 15.4614 16 15.2383 16 14.7929V5.2C16 4.54 15.46 4 14.8 4Z",fill:"#FF85C0"})))},ol=(0,p.forwardRef)(rl);n.p;n.p;n.p;n.p;var il,al,sl,ll,cl=["title","titleId"];function dl(){return dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hl=function(e,t){var n=e.title,r=e.titleId,o=ul(e,cl);return p.createElement("svg",dl({width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,il||(il=p.createElement("path",{d:"M13 21H25V23H13V21Z",fill:"currentColor"})),al||(al=p.createElement("path",{d:"M11 13H23V15H11V13Z",fill:"currentColor"})),sl||(sl=p.createElement("rect",{x:10.5,y:19.5,width:5,height:5,rx:2.5,fill:"currentColor"})),ll||(ll=p.createElement("rect",{x:20.5,y:11.5,width:5,height:5,rx:2.5,fill:"currentColor"})))},gl=(0,p.forwardRef)(hl);n.p;var ml,pl=["title","titleId"];function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var yl=function(e,t){var n=e.title,r=e.titleId,o=vl(e,pl);return p.createElement("svg",fl({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ml||(ml=p.createElement("path",{d:"M0 14V16H6V14H0ZM0 2V4H10V2H0ZM10 18V16H18V14H10V12H8V18H10ZM4 6V8H0V10H4V12H6V6H4ZM18 10V8H8V10H18ZM12 6H14V4H18V2H14V0H12V6Z",fill:"currentColor"})))},bl=(0,p.forwardRef)(yl);n.p;var xl,wl=["title","titleId"];function Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var jl=function(e,t){var n=e.title,r=e.titleId,o=Sl(e,wl);return p.createElement("svg",Cl({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,xl||(xl=p.createElement("path",{d:"M16.1024 11.7014C16.8868 9.34449 17.279 8.16602 18.0001 8.16602C18.7212 8.16602 19.1134 9.34449 19.8978 11.7014L20.3775 13.143C20.5973 13.8034 20.7072 14.1337 20.9691 14.3226C21.2311 14.5115 21.5791 14.5115 22.2752 14.5115H23.7239C26.3032 14.5115 27.5929 14.5115 27.8148 15.2078C28.0367 15.9042 26.9848 16.6504 24.8811 18.1427L23.792 18.9153C23.2098 19.3283 22.9187 19.5348 22.816 19.8484C22.7134 20.1621 22.8261 20.5007 23.0515 21.178L23.4868 22.4861C24.2826 24.8776 24.6806 26.0733 24.098 26.5048C23.5155 26.9363 22.4877 26.2072 20.432 24.7489L19.1573 23.8447C18.5983 23.4482 18.3188 23.2499 18.0001 23.2499C17.6814 23.2499 17.4019 23.4482 16.8429 23.8447L15.5682 24.7489C13.5125 26.2072 12.4847 26.9363 11.9022 26.5048C11.3196 26.0733 11.7176 24.8776 12.5134 22.4861L12.9487 21.178C13.1741 20.5007 13.2868 20.1621 13.1842 19.8484C13.0815 19.5348 12.7904 19.3283 12.2082 18.9153L11.1191 18.1427C9.01536 16.6504 7.96348 15.9042 8.18539 15.2078C8.40731 14.5115 9.69696 14.5115 12.2763 14.5115H13.725C14.4211 14.5115 14.7691 14.5115 15.0311 14.3226C15.293 14.1337 15.4029 13.8034 15.6227 13.143L16.1024 11.7014Z",fill:"currentColor"})))},kl=(0,p.forwardRef)(jl);n.p;var Ol,Rl=["title","titleId"];function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Al=function(e,t){var n=e.title,r=e.titleId,o=_l(e,Rl);return p.createElement("svg",El({width:32,height:32,viewBox:"-6 -6 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ol||(Ol=p.createElement("path",{d:"M20 7.74L12.81 7.12L10 0.5L7.19 7.13L0 7.74L5.46 12.47L3.82 19.5L10 15.77L16.18 19.5L14.55 12.47L20 7.74ZM10 13.9L6.24 16.17L7.24 11.89L3.92 9.01L8.3 8.63L10 4.6L11.71 8.64L16.09 9.02L12.77 11.9L13.77 16.18L10 13.9Z",fill:"currentColor"})))},Tl=(0,p.forwardRef)(Al);n.p;var Pl,Il,Ll,Ml=["title","titleId"];function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Nl=function(e,t){var n=e.title,r=e.titleId,o=Dl(e,Ml);return p.createElement("svg",Kl({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Pl||(Pl=p.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Il||(Il=p.createElement("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:3,y:3,width:14,height:14},p.createElement("rect",{x:3.5,y:3.5,width:13,height:13,rx:6.5,fill:"#fff"}))),Ll||(Ll=p.createElement("g",{mask:"url(#mask0)"},p.createElement("rect",{x:3.5,y:3.5,width:13,height:13,rx:6.5,fill:"currentColor",fillOpacity:.3}),p.createElement("rect",{x:4.5,y:4.5,width:11,height:11,rx:5.5,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2}),p.createElement("path",{d:"M5 5L15 15",stroke:"currentColor",strokeWidth:2}))))},Vl=(0,p.forwardRef)(Nl);n.p;var zl,Bl=["title","titleId"];function Hl(){return Hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wl=function(e,t){var n=e.title,r=e.titleId,o=Fl(e,Bl);return p.createElement("svg",Hl({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,zl||(zl=p.createElement("g",{opacity:.25},p.createElement("circle",{cx:12,cy:13,r:3,stroke:"black",strokeWidth:2}),p.createElement("path",{d:"M4 12C4 12 7 7 12 7C17 7 20 12 20 12",stroke:"black",strokeWidth:2,strokeLinecap:"square"}))))},$l=(0,p.forwardRef)(Wl);n.p;var Ul,Zl,Gl,Yl,Xl,ql,Jl=["title","titleId"];function Ql(){return Ql=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var tc=function(e,t){var n=e.title,r=e.titleId,o=ec(e,Jl);return p.createElement("svg",Ql({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ul||(Ul=p.createElement("path",{d:"M20.5 12.5L18 10",stroke:"black",strokeWidth:2})),Zl||(Zl=p.createElement("path",{d:"M17 15L15.5 12",stroke:"black",strokeWidth:2})),Gl||(Gl=p.createElement("path",{d:"M12 16V13",stroke:"black",strokeWidth:2})),Yl||(Yl=p.createElement("path",{d:"M7 15L8.5 12",stroke:"black",strokeWidth:2})),Xl||(Xl=p.createElement("path",{d:"M3.5 12.5L6 10",stroke:"black",strokeWidth:2})),ql||(ql=p.createElement("path",{d:"M4 8C4 8 7 13 12 13C17 13 20 8 20 8",stroke:"black",strokeWidth:2,strokeLinecap:"square"})))},nc=(0,p.forwardRef)(tc);n.p;var rc,oc=["title","titleId"];function ic(){return ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sc=function(e,t){var n=e.title,r=e.titleId,o=ac(e,oc);return p.createElement("svg",ic({width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,rc||(rc=p.createElement("path",{d:"M7 15L12 10L17 15",strokeWidth:2})))},lc=(0,p.forwardRef)(sc);n.p;var cc,dc,uc=["title","titleId"];function hc(){return hc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mc=function(e,t){var n=e.title,r=e.titleId,o=gc(e,uc);return p.createElement("svg",hc({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,cc||(cc=p.createElement("path",{d:"M8 14L12 18L16 14",stroke:"black",strokeWidth:2})),dc||(dc=p.createElement("path",{d:"M8 10L12 6L16 10",stroke:"black",strokeWidth:2})))},pc=(0,p.forwardRef)(mc);n.p;var fc,vc=["title","titleId"];function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xc=function(e,t){var n=e.title,r=e.titleId,o=bc(e,vc);return p.createElement("svg",yc({width:8,height:12,viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fc||(fc=p.createElement("path",{d:"M3.99994 1.88667L6.11328 4L7.05328 3.06L3.99994 0L0.939941 3.06L1.88661 4L3.99994 1.88667ZM3.99994 10.1133L1.88661 8L0.946608 8.94L3.99994 12L7.05994 8.94L6.11328 8L3.99994 10.1133Z",fill:"currentColor"})))},wc=(0,p.forwardRef)(xc);n.p;n.p;var Cc,Sc,jc=["title","titleId"];function kc(){return kc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Rc=function(e,t){var n=e.title,r=e.titleId,o=Oc(e,jc);return p.createElement("svg",kc({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Cc||(Cc=p.createElement("path",{d:"M8 18L12 14L16 18",stroke:"black",strokeWidth:2})),Sc||(Sc=p.createElement("path",{d:"M8 6L12 10L16 6",stroke:"black",strokeWidth:2})))},Ec=(0,p.forwardRef)(Rc);n.p;var _c,Ac=["title","titleId"];function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ic=function(e,t){var n=e.title,r=e.titleId,o=Pc(e,Ac);return p.createElement("svg",Tc({width:8,height:12,viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,_c||(_c=p.createElement("path",{d:"M0.939941 10.3927L1.88661 11.3327L3.99994 9.21935L6.11328 11.3327L7.05327 10.3927L3.99994 7.33268L0.939941 10.3927ZM7.05994 1.60602L6.11328 0.666016L3.99994 2.77935L1.88661 0.666016L0.939941 1.60602L3.99994 4.66602L7.05994 1.60602Z",fill:"currentColor"})))},Lc=(0,p.forwardRef)(Ic);n.p;var Mc,Kc,Dc=["title","titleId"];function Nc(){return Nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zc=function(e,t){var n=e.title,r=e.titleId,o=Vc(e,Dc);return p.createElement("svg",Nc({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Mc||(Mc=p.createElement("rect",{x:6,y:6,width:12,height:12,rx:2,stroke:"currentColor",strokeWidth:2})),Kc||(Kc=p.createElement("rect",{x:9,y:8,width:6,height:2,rx:1,fill:"currentColor"})))},Bc=(0,p.forwardRef)(zc);n.p;var Hc,Fc=["title","titleId"];function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Uc=function(e,t){var n=e.title,r=e.titleId,o=$c(e,Fc);return p.createElement("svg",Wc({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Hc||(Hc=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.24505 5.99985L12.2451 10.9998L17.2451 5.99985L18.6593 7.41406L13.6593 12.4141L18.6593 17.4141L17.2451 18.8283L12.2451 13.8283L7.24505 18.8283L5.83084 17.4141L10.8308 12.4141L5.83084 7.41406L7.24505 5.99985Z",fill:"currentColor"})))},Zc=(0,p.forwardRef)(Uc);n.p;var Gc,Yc,Xc=["title","titleId"];function qc(){return qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Qc=function(e,t){var n=e.title,r=e.titleId,o=Jc(e,Xc);return p.createElement("svg",qc({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Gc||(Gc=p.createElement("g",{opacity:.4},p.createElement("rect",{width:28,height:28,rx:14,fill:"white"}),p.createElement("rect",{x:.5,y:.5,width:27,height:27,rx:13.5,stroke:"currentColor",strokeOpacity:.5,strokeDasharray:"2 2"}))),Yc||(Yc=p.createElement("g",{opacity:.6},p.createElement("path",{d:"M13 6H15V22H13V6Z",fill:"currentColor"}),p.createElement("path",{d:"M6 13H22V15H6V13Z",fill:"currentColor"}))))},ed=(0,p.forwardRef)(Qc);n.p;var td,nd,rd,od,id,ad=["title","titleId"];function sd(){return sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cd=function(e,t){var n=e.title,r=e.titleId,o=ld(e,ad);return p.createElement("svg",sd({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,td||(td=p.createElement("path",{d:"M8 16L6.71884 15.1459C6.58185 15.0546 6.40867 15.0365 6.2558 15.0977L4 16C4 17.1824 4.34954 18.0153 4.63531 18.4987C4.83778 18.8411 5.2235 19 5.62132 19H8.125C8.72563 19 8.98051 18.2354 8.5 17.875C8.18524 17.6389 8 17.2684 8 16.875V16Z",fill:"currentColor"})),nd||(nd=p.createElement("path",{d:"M18 16L15.7442 15.0977C15.5913 15.0365 15.4182 15.0546 15.2812 15.1459L14 16C14 17.1824 14.3495 18.0153 14.6353 18.4987C14.8378 18.8411 15.2235 19 15.6213 19H18.125C18.7256 19 18.9805 18.2354 18.5 17.875C18.1852 17.6389 18 17.2684 18 16.875V16Z",fill:"currentColor"})),rd||(rd=p.createElement("path",{d:"M3.25 12.5C2.88257 14.0747 1.45441 15.0432 0.180299 15.6081C-0.0431404 15.7072 0.048034 16.3 0.292449 16.3H4L3.25 12.5Z",fill:"currentColor"})),od||(od=p.createElement("path",{d:"M18 14C18 14 18 7 10.5 7C3 7 3 14 3 14V16C3 16 5.5 17 10.5 17C15.5 17 18 16 18 16V14Z",fill:"currentColor"})),id||(id=p.createElement("path",{d:"M20.6908 7.79364C19.4723 7.54994 18.287 8.34017 18.0433 9.55868C17.9823 9.8636 17.6667 10.3007 16.9045 10.7581C16.5042 10.9982 16.0732 11.2002 15.6266 11.3378L17.6315 15.397L19.2197 14.6168C20.3324 13.9492 22.0169 12.6363 22.4559 10.4412C22.6996 9.2227 21.9093 8.03734 20.6908 7.79364Z",fill:"currentColor"})))},dd=(0,p.forwardRef)(cd);n.p;var ud,hd,gd,md,pd,fd=["title","titleId"];function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var bd=function(e,t){var n=e.title,r=e.titleId,o=yd(e,fd);return p.createElement("svg",vd({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ud||(ud=p.createElement("path",{d:"M17 20H13V18H15C16.1046 18 17 18.8954 17 20Z",fill:"currentColor"})),hd||(hd=p.createElement("circle",{cx:6.5,cy:18,r:2,fill:"currentColor"})),gd||(gd=p.createElement("path",{d:"M6.08663 15.8898C5.45448 13.0452 6.9145 10.1491 9.57738 8.96561L14 7L16 8C16.4846 9.33277 16.727 9.99915 16.848 10.6566C17.175 12.433 16.8912 14.2678 16.0428 15.8624C15.7288 16.4526 15.2964 17.0147 14.4318 18.1387L13 20H11.2104C8.75033 20 6.6203 18.2913 6.08663 15.8898Z",fill:"currentColor"})),md||(md=p.createElement("path",{d:"M20 6.5C21.5 8 17.6569 10 16 10C14.3432 10 13 8.65685 13 7C13 5.34315 7.34317 4 15 4C17.4 4 18.5 5 20 6.5Z",fill:"currentColor"})),pd||(pd=p.createElement("path",{d:"M8.38013 2.5L16.2189 4.09782L15.6198 7.03737L10.7205 6.03874C9.09703 5.70782 8.04921 4.12347 8.38013 2.5Z",fill:"currentColor"})))},xd=(0,p.forwardRef)(bd);n.p;var wd,Cd=["title","titleId"];function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kd=function(e,t){var n=e.title,r=e.titleId,o=jd(e,Cd);return p.createElement("svg",Sd({viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,wd||(wd=p.createElement("path",{d:"M14.5 0H2.5C1.4 0 0.5 0.9 0.5 2V16H2.5V2H14.5V0ZM17.5 4H6.5C5.4 4 4.5 4.9 4.5 6V20C4.5 21.1 5.4 22 6.5 22H17.5C18.6 22 19.5 21.1 19.5 20V6C19.5 4.9 18.6 4 17.5 4ZM17.5 20H6.5V6H17.5V20Z",fill:"currentcolor"})))},Od=(0,p.forwardRef)(kd);n.p;var Rd,Ed=["title","titleId"];function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Td=function(e,t){var n=e.title,r=e.titleId,o=Ad(e,Ed);return p.createElement("svg",_d({viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Rd||(Rd=p.createElement("path",{d:"M3.99996 6.6665C3.26663 6.6665 2.66663 7.2665 2.66663 7.99984C2.66663 8.73317 3.26663 9.33317 3.99996 9.33317C4.73329 9.33317 5.33329 8.73317 5.33329 7.99984C5.33329 7.2665 4.73329 6.6665 3.99996 6.6665ZM12 6.6665C11.2666 6.6665 10.6666 7.2665 10.6666 7.99984C10.6666 8.73317 11.2666 9.33317 12 9.33317C12.7333 9.33317 13.3333 8.73317 13.3333 7.99984C13.3333 7.2665 12.7333 6.6665 12 6.6665ZM7.99996 6.6665C7.26663 6.6665 6.66663 7.2665 6.66663 7.99984C6.66663 8.73317 7.26663 9.33317 7.99996 9.33317C8.73329 9.33317 9.33329 8.73317 9.33329 7.99984C9.33329 7.2665 8.73329 6.6665 7.99996 6.6665Z",fill:"currentcolor"})))},Pd=(0,p.forwardRef)(Td);n.p;var Id,Ld=["title","titleId"];function Md(){return Md=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Dd=function(e,t){var n=e.title,r=e.titleId,o=Kd(e,Ld);return p.createElement("svg",Md({viewBox:"0 0 20 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Id||(Id=p.createElement("path",{d:"M0.833313 16.5H19.1666L9.99998 0.666672L0.833313 16.5ZM3.72498 14.8333L9.99998 3.99167L16.275 14.8333H3.72498V14.8333ZM9.16665 12.3333H10.8333V14H9.16665V12.3333ZM9.16665 7.33334H10.8333V10.6667H9.16665V7.33334Z"})))},Nd=(0,p.forwardRef)(Dd);n.p;var Vd,zd=["title","titleId"];function Bd(){return Bd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fd=function(e,t){var n=e.title,r=e.titleId,o=Hd(e,zd);return p.createElement("svg",Bd({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Vd||(Vd=p.createElement("path",{d:"M8 10.1295C8 7.84608 8 6.70434 8.74273 6.26996C9.48546 5.83557 10.4806 6.39532 12.4708 7.51482L19.3516 11.3853C21.4108 12.5436 22.4404 13.1227 22.4404 14C22.4404 14.8773 21.4108 15.4564 19.3516 16.6147L12.4708 20.4852C10.4806 21.6047 9.48546 22.1644 8.74273 21.73C8 21.2957 8 20.1539 8 17.8705V10.1295Z",fill:"#898098"})))},Wd=(0,p.forwardRef)(Fd);n.p;var $d,Ud,Zd=["title","titleId"];function Gd(){return Gd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xd=function(e,t){var n=e.title,r=e.titleId,o=Yd(e,Zd);return p.createElement("svg",Gd({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,$d||($d=p.createElement("path",{d:"M14 6.5C14 5.56538 14 5.09808 14.201 4.75C14.3326 4.52197 14.522 4.33261 14.75 4.20096C15.0981 4 15.5654 4 16.5 4C17.4346 4 17.9019 4 18.25 4.20096C18.478 4.33261 18.6674 4.52197 18.799 4.75C19 5.09808 19 5.56538 19 6.5V17.5C19 18.4346 19 18.9019 18.799 19.25C18.6674 19.478 18.478 19.6674 18.25 19.799C17.9019 20 17.4346 20 16.5 20C15.5654 20 15.0981 20 14.75 19.799C14.522 19.6674 14.3326 19.478 14.201 19.25C14 18.9019 14 18.4346 14 17.5V6.5Z",fill:"#413C4A"})),Ud||(Ud=p.createElement("path",{d:"M5 6.5C5 5.56538 5 5.09808 5.20096 4.75C5.33261 4.52197 5.52197 4.33261 5.75 4.20096C6.09808 4 6.56538 4 7.5 4C8.43462 4 8.90192 4 9.25 4.20096C9.47803 4.33261 9.66739 4.52197 9.79904 4.75C10 5.09808 10 5.56538 10 6.5V17.5C10 18.4346 10 18.9019 9.79904 19.25C9.66739 19.478 9.47803 19.6674 9.25 19.799C8.90192 20 8.43462 20 7.5 20C6.56538 20 6.09808 20 5.75 19.799C5.52197 19.6674 5.33261 19.478 5.20096 19.25C5 18.9019 5 18.4346 5 17.5V6.5Z",fill:"#413C4A"})))},qd=(0,p.forwardRef)(Xd);n.p;var Jd,Qd=["title","titleId"];function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nu=function(e,t){var n=e.title,r=e.titleId,o=tu(e,Qd);return p.createElement("svg",eu({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Jd||(Jd=p.createElement("path",{d:"M9.16663 14.9993H10.8333V13.3327H9.16663V14.9993ZM9.99996 1.66602C8.90561 1.66602 7.82198 1.88156 6.81093 2.30035C5.79988 2.71914 4.88122 3.33297 4.1074 4.10679C2.5446 5.6696 1.66663 7.78921 1.66663 9.99935C1.66663 12.2095 2.5446 14.3291 4.1074 15.8919C4.88122 16.6657 5.79988 17.2796 6.81093 17.6983C7.82198 18.1171 8.90561 18.3327 9.99996 18.3327C12.2101 18.3327 14.3297 17.4547 15.8925 15.8919C17.4553 14.3291 18.3333 12.2095 18.3333 9.99935C18.3333 8.905 18.1177 7.82137 17.699 6.81032C17.2802 5.79927 16.6663 4.88061 15.8925 4.10679C15.1187 3.33297 14.2 2.71914 13.189 2.30035C12.1779 1.88156 11.0943 1.66602 9.99996 1.66602M9.99996 16.666C6.32496 16.666 3.33329 13.6743 3.33329 9.99935C3.33329 6.32435 6.32496 3.33268 9.99996 3.33268C13.675 3.33268 16.6666 6.32435 16.6666 9.99935C16.6666 13.6743 13.675 16.666 9.99996 16.666ZM9.99996 4.99935C9.1159 4.99935 8.26806 5.35054 7.64294 5.97566C7.01782 6.60078 6.66663 7.44863 6.66663 8.33268H8.33329C8.33329 7.89066 8.50889 7.46673 8.82145 7.15417C9.13401 6.84161 9.55793 6.66602 9.99996 6.66602C10.442 6.66602 10.8659 6.84161 11.1785 7.15417C11.491 7.46673 11.6666 7.89066 11.6666 8.33268C11.6666 9.99935 9.16663 9.79102 9.16663 12.4993H10.8333C10.8333 10.6243 13.3333 10.416 13.3333 8.33268C13.3333 7.44863 12.9821 6.60078 12.357 5.97566C11.7319 5.35054 10.884 4.99935 9.99996 4.99935Z",fill:"#BEB9C5"})))},ru=(0,p.forwardRef)(nu);n.p;var ou,iu=["title","titleId"];function au(){return au=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lu=function(e,t){var n=e.title,r=e.titleId,o=su(e,iu);return p.createElement("svg",au({viewBox:"0 0 16 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ou||(ou=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.3839 1.11612C15.872 1.60427 15.872 2.39573 15.3839 2.88388L7.38388 10.8839C6.89573 11.372 6.10427 11.372 5.61612 10.8839L1.11612 6.38388C0.627961 5.89573 0.627961 5.10427 1.11612 4.61612C1.60427 4.12796 2.39573 4.12796 2.88388 4.61612L6.5 8.23223L13.6161 1.11612C14.1043 0.627961 14.8957 0.627961 15.3839 1.11612Z",fill:"currentColor",fillOpacity:.6})))},cu=(0,p.forwardRef)(lu);n.p;n.p;var du,uu=["title","titleId"];function hu(){return hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mu=function(e,t){var n=e.title,r=e.titleId,o=gu(e,uu);return p.createElement("svg",hu({viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,du||(du=p.createElement("path",{d:"M11.1162 12.8839C11.6044 13.372 12.3958 13.372 12.884 12.8839C13.3721 12.3957 13.3721 11.6043 12.884 11.1161L8.76785 7.00002L12.8839 2.88389C13.3721 2.39574 13.3721 1.60428 12.8839 1.11613C12.3958 0.627973 11.6043 0.627977 11.1162 1.11613L7.00007 5.23226L2.88388 1.11611C2.39572 0.627959 1.60427 0.627963 1.11611 1.11612C0.627959 1.60428 0.627963 2.39573 1.11612 2.88389L5.23231 7.00004L1.11625 11.1161C0.628101 11.6043 0.628105 12.3957 1.11626 12.8839C1.60442 13.3721 2.39588 13.3721 2.88403 12.8839L7.00009 8.7678L11.1162 12.8839Z",fill:"currentColor",fillOpacity:.6})))},pu=(0,p.forwardRef)(mu);n.p;n.p;n.p;n.p;n.p;var fu,vu,yu=["title","titleId"];function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wu=function(e,t){var n=e.title,r=e.titleId,o=xu(e,yu);return p.createElement("svg",bu({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fu||(fu=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.07782 9.4751C3 9.8192 3 10.2766 3 11.0292V12.9708C3 13.9301 3 14.4098 3.16115 14.7865C3.3635 15.2596 3.74039 15.6365 4.21347 15.8388C4.59023 16 5.0699 16 6.02924 16C6.35575 16 6.51901 16 6.67691 16.0254C6.87544 16.0574 7.06801 16.1191 7.24814 16.2085C7.3914 16.2796 7.52425 16.3745 7.78994 16.5642L10.8375 18.7411C12.2226 19.7304 12.9152 20.2251 13.4576 19.946C13.9993 19.6672 14 18.8181 14 17.1206L3.07782 9.4751ZM4.54786 8.06282L14 14.6793V6.88638C14 5.18423 14 4.33316 13.4576 4.05402C12.9152 3.77488 12.2226 4.26956 10.8375 5.25891L7.78994 7.43575L7.78993 7.43576C7.52425 7.62554 7.3914 7.72043 7.24814 7.79152C7.06801 7.88091 6.87544 7.94263 6.67691 7.97458C6.51901 8 6.35575 8 6.02924 8C5.32843 8 4.88359 8 4.54786 8.06282Z",fill:"currentColor"})),vu||(vu=p.createElement("path",{d:"M2 5.5L17 16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})))},Cu=(0,p.forwardRef)(wu);n.p;var Su,ju,ku=["title","titleId"];function Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Eu=function(e,t){var n=e.title,r=e.titleId,o=Ru(e,ku);return p.createElement("svg",Ou({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Su||(Su=p.createElement("path",{d:"M17 7C17 7 19.5 8.5 19.5 12C19.5 15.5 17 17 17 17",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),ju||(ju=p.createElement("path",{d:"M3 11.0292C3 10.0699 3 9.59023 3.16115 9.21347C3.3635 8.74039 3.74039 8.3635 4.21347 8.16115C4.59023 8 5.0699 8 6.02924 8C6.35575 8 6.51901 8 6.67691 7.97458C6.87544 7.94263 7.06801 7.88091 7.24814 7.79152C7.3914 7.72043 7.52425 7.62554 7.78994 7.43575L10.8375 5.25891C12.2226 4.26956 12.9152 3.77488 13.4576 4.05402C14 4.33316 14 5.18423 14 6.88638V17.1136C14 18.8158 14 19.6668 13.4576 19.946C12.9152 20.2251 12.2226 19.7304 10.8375 18.7411L7.78994 16.5642C7.52425 16.3745 7.3914 16.2796 7.24814 16.2085C7.06801 16.1191 6.87544 16.0574 6.67691 16.0254C6.51901 16 6.35575 16 6.02924 16C5.0699 16 4.59023 16 4.21347 15.8389C3.74039 15.6365 3.3635 15.2596 3.16115 14.7865C3 14.4098 3 13.9301 3 12.9708V11.0292Z",fill:"currentColor"})))},_u=(0,p.forwardRef)(Eu);n.p;var Au,Tu,Pu,Iu=["title","titleId"];function Lu(){return Lu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ku=function(e,t){var n=e.title,r=e.titleId,o=Mu(e,Iu);return p.createElement("svg",Lu({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Au||(Au=p.createElement("path",{d:"M18 6C18 6 21 8 21 12C21 16 18 18 18 18",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Tu||(Tu=p.createElement("path",{d:"M16 8C16 8 18 9.5 18 12C18 14.5 16 16 16 16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"})),Pu||(Pu=p.createElement("path",{d:"M3 11.0292C3 10.0699 3 9.59023 3.16115 9.21347C3.3635 8.74039 3.74039 8.3635 4.21347 8.16115C4.59023 8 5.0699 8 6.02924 8C6.35575 8 6.51901 8 6.67691 7.97458C6.87544 7.94263 7.06801 7.88091 7.24814 7.79152C7.3914 7.72043 7.52425 7.62554 7.78994 7.43575L10.8375 5.25891C12.2226 4.26956 12.9152 3.77488 13.4576 4.05402C14 4.33316 14 5.18423 14 6.88638V17.1136C14 18.8158 14 19.6668 13.4576 19.946C12.9152 20.2251 12.2226 19.7304 10.8375 18.7411L7.78994 16.5642C7.52425 16.3745 7.3914 16.2796 7.24814 16.2085C7.06801 16.1191 6.87544 16.0574 6.67691 16.0254C6.51901 16 6.35575 16 6.02924 16C5.0699 16 4.59023 16 4.21347 15.8389C3.74039 15.6365 3.3635 15.2596 3.16115 14.7865C3 14.4098 3 13.9301 3 12.9708V11.0292Z",fill:"currentColor"})))},Du=(0,p.forwardRef)(Ku);n.p;var Nu,Vu,zu=["title","titleId"];function Bu(){return Bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Fu=function(e,t){var n=e.title,r=e.titleId,o=Hu(e,zu);return p.createElement("svg",Bu({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Nu||(Nu=p.createElement("defs",null,p.createElement("linearGradient",{id:"paint0_linear",x1:10.4999,y1:10,x2:28.9999,y2:27,gradientUnits:"userSpaceOnUse"},p.createElement("stop",{stopOpacity:.8,stopColor:"var(--text-color-hover)"}),p.createElement("stop",{offset:1,stopOpacity:.4,stopColor:"var(--text-color-hover)"})))),Vu||(Vu=p.createElement("g",{opacity:.5},p.createElement("path",{d:"M22.9999 5.5C17.4999 -0.5 5.99989 15.5 3.99989 17.5C1.9999 19.5 4.9999 22.5 6.9999 20.5C8.99989 18.5 17.9444 6.97226 19.9999 8C22.9999 9.5 7.99989 20.5 12.9999 25C17.9999 29.5 24.2259 17.3173 25.9999 18.5C27.7739 19.6827 20.4999 24 23.9999 26.5C26.8821 28.5587 29.4999 24 28.9999 23.5C28.4999 23 26.2499 26.25 25.2499 25.25C23.7499 23.75 31.4999 19.5 27.4999 16.5C23.4999 13.5 16.9999 25 14.9999 23C12.9999 21 27.778 10.7125 22.9999 5.5Z",fill:"url(#paint0_linear)"}))))},Wu=(0,p.forwardRef)(Fu);n.p;var $u,Uu,Zu,Gu=["title","titleId"];function Yu(){return Yu=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qu=function(e,t){var n=e.title,r=e.titleId,o=Xu(e,Gu);return p.createElement("svg",Yu({viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,$u||($u=p.createElement("path",{d:"M15.9999 23C13.9999 21 28.778 10.7125 23.9999 5.5C19.8625 0.986458 12.3298 8.92251 7.99995 13.9831L7.5 17.5291L11.0001 17.075C14.4595 13.0395 19.5186 7.25934 20.9999 8C23.9999 9.5 8.99995 20.5 13.9999 25C18.9999 29.5 25.2259 17.3173 26.9999 18.5C28.774 19.6827 21.4999 24 24.9999 26.5C27.8821 28.5587 30.5 24 29.9999 23.5C29.4999 23 27.2499 26.25 26.2499 25.25C24.7499 23.75 32.5 19.5 28.4999 16.5C24.4999 13.5 17.9999 25 15.9999 23Z",fill:"url(#paint0_linear)"})),Uu||(Uu=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M7.32234 14.0646C7.45988 13.2393 7.52865 12.8267 7.6142 12.7231C7.81418 12.4809 8.18533 12.4809 8.38532 12.7231C8.47086 12.8267 8.53963 13.2393 8.67718 14.0646C8.76116 14.5685 8.80316 14.8205 8.89311 15.0351C9.0959 15.5191 9.48076 15.9039 9.9647 16.1067C10.1793 16.1967 10.4313 16.2387 10.9352 16.3226C11.7605 16.4602 12.1731 16.529 12.2767 16.6145C12.5189 16.8145 12.5189 17.1856 12.2767 17.3856C12.1731 17.4712 11.7605 17.5399 10.9352 17.6775C10.4313 17.7615 10.1793 17.8035 9.9647 17.8934C9.48076 18.0962 9.0959 18.4811 8.89311 18.965C8.80316 19.1796 8.76116 19.4316 8.67718 19.9355C8.53963 20.7608 8.47086 21.1734 8.38532 21.277C8.18533 21.5192 7.81418 21.5192 7.6142 21.277C7.52865 21.1734 7.45988 20.7608 7.32234 19.9355C7.23835 19.4316 7.19635 19.1796 7.10641 18.965C6.90361 18.4811 6.51875 18.0962 6.03481 17.8934C5.82018 17.8035 5.56821 17.7615 5.06427 17.6775C4.23903 17.5399 3.8264 17.4712 3.72279 17.3856C3.48059 17.1856 3.48059 16.8145 3.72279 16.6145C3.8264 16.529 4.23903 16.4602 5.06427 16.3226C5.56821 16.2387 5.82018 16.1967 6.03481 16.1067C6.51875 15.9039 6.90361 15.5191 7.10641 15.0351C7.19635 14.8205 7.23835 14.5685 7.32234 14.0646Z",fill:"#5531FF"}))),Zu||(Zu=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:.541016,y:10.5414,width:14.9172,height:14.9172,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("linearGradient",{id:"paint0_linear",x1:11.4999,y1:10,x2:29.9999,y2:27,gradientUnits:"userSpaceOnUse"},p.createElement("stop",{stopColor:"#7F64FF",stopOpacity:.8}),p.createElement("stop",{offset:1,stopColor:"#7F64FF",stopOpacity:.4})))))},Ju=(0,p.forwardRef)(qu);n.p;var Qu,eh,th,nh=["title","titleId"];function rh(){return rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ih=function(e,t){var n=e.title,r=e.titleId,o=oh(e,nh);return p.createElement("svg",rh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Qu||(Qu=p.createElement("rect",{opacity:.4,x:5,y:5,width:22,height:22,rx:11,fill:"currentColor"})),eh||(eh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("rect",{x:13.5,y:13.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),th||(th=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:10.5,y:11.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},ah=(0,p.forwardRef)(ih);n.p;var sh,lh,ch,dh=["title","titleId"];function uh(){return uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gh=function(e,t){var n=e.title,r=e.titleId,o=hh(e,dh);return p.createElement("svg",uh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,sh||(sh=p.createElement("rect",{opacity:.6,x:5,y:5,width:22,height:22,rx:11,fill:"#7F64FF"})),lh||(lh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M15.3223 13.0646C15.4599 12.2393 15.5286 11.8267 15.6142 11.7231C15.8142 11.4809 16.1853 11.4809 16.3853 11.7231C16.4709 11.8267 16.5396 12.2393 16.6772 13.0646C16.7612 13.5685 16.8032 13.8205 16.8931 14.0351C17.0959 14.5191 17.4808 14.9039 17.9647 15.1067C18.1793 15.1967 18.4313 15.2387 18.9352 15.3226C19.7605 15.4602 20.1731 15.529 20.2767 15.6145C20.5189 15.8145 20.5189 16.1856 20.2767 16.3856C20.1731 16.4712 19.7605 16.5399 18.9352 16.6775C18.4313 16.7615 18.1793 16.8035 17.9647 16.8934C17.4808 17.0962 17.0959 17.4811 16.8931 17.965C16.8032 18.1796 16.7612 18.4316 16.6772 18.9355C16.5396 19.7608 16.4709 20.1734 16.3853 20.277C16.1853 20.5192 15.8142 20.5192 15.6142 20.277C15.5286 20.1734 15.4599 19.7608 15.3223 18.9355C15.2383 18.4316 15.1964 18.1796 15.1064 17.965C14.9036 17.4811 14.5188 17.0962 14.0348 16.8934C13.8202 16.8035 13.5682 16.7615 13.0643 16.6775C12.239 16.5399 11.8264 16.4712 11.7228 16.3856C11.4806 16.1856 11.4806 15.8145 11.7228 15.6145C11.8264 15.529 12.239 15.4602 13.0643 15.3226C13.5682 15.2387 13.8202 15.1967 14.0348 15.1067C14.5188 14.9039 14.9036 14.5191 15.1064 14.0351C15.1964 13.8205 15.2383 13.5685 15.3223 13.0646Z",fill:"#5531FF"}))),ch||(ch=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:8.54102,y:9.54144,width:14.9172,height:14.9172,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},mh=(0,p.forwardRef)(gh);n.p;var ph,fh,vh,yh=["title","titleId"];function bh(){return bh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wh=function(e,t){var n=e.title,r=e.titleId,o=xh(e,yh);return p.createElement("svg",bh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ph||(ph=p.createElement("path",{opacity:.4,fillRule:"evenodd",clipRule:"evenodd",d:"M21 3.5C17.9624 3.5 15.5 5.96243 15.5 9C15.5 12.0376 17.9624 14.5 21 14.5C24.0376 14.5 26.5 12.0376 26.5 9C26.5 5.96243 24.0376 3.5 21 3.5ZM3.5 16C3.5 12.9624 5.96243 10.5 9 10.5C12.0376 10.5 14.5 12.9624 14.5 16C14.5 19.0376 12.0376 21.5 9 21.5C5.96243 21.5 3.5 19.0376 3.5 16ZM15.5 23C15.5 19.9624 17.9624 17.5 21 17.5C24.0376 17.5 26.5 19.9624 26.5 23C26.5 26.0376 24.0376 28.5 21 28.5C17.9624 28.5 15.5 26.0376 15.5 23Z",fill:"currentColor"})),fh||(fh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 6.5C19.6193 6.5 18.5 7.61929 18.5 9C18.5 10.3807 19.6193 11.5 21 11.5C22.3807 11.5 23.5 10.3807 23.5 9C23.5 7.61929 22.3807 6.5 21 6.5ZM6.5 16C6.5 14.6193 7.61929 13.5 9 13.5C10.3807 13.5 11.5 14.6193 11.5 16C11.5 17.3807 10.3807 18.5 9 18.5C7.61929 18.5 6.5 17.3807 6.5 16ZM18.5 23C18.5 21.6193 19.6193 20.5 21 20.5C22.3807 20.5 23.5 21.6193 23.5 23C23.5 24.3807 22.3807 25.5 21 25.5C19.6193 25.5 18.5 24.3807 18.5 23Z",fill:"currentColor"}))),vh||(vh=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:3.5,y:4.5,width:23,height:25,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Ch=(0,p.forwardRef)(wh);n.p;var Sh,jh,kh,Oh,Rh,Eh=["title","titleId"];function _h(){return _h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Th=function(e,t){var n=e.title,r=e.titleId,o=Ah(e,Eh);return p.createElement("svg",_h({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Sh||(Sh=p.createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M21 3.5C17.9624 3.5 15.5 5.96243 15.5 9C15.5 12.0376 17.9624 14.5 21 14.5C24.0376 14.5 26.5 12.0376 26.5 9C26.5 5.96243 24.0376 3.5 21 3.5ZM3.5 16C3.5 12.9624 5.96243 10.5 9 10.5C12.0376 10.5 14.5 12.9624 14.5 16C14.5 19.0376 12.0376 21.5 9 21.5C5.96243 21.5 3.5 19.0376 3.5 16ZM15.5 23C15.5 19.9624 17.9624 17.5 21 17.5C24.0376 17.5 26.5 19.9624 26.5 23C26.5 26.0376 24.0376 28.5 21 28.5C17.9624 28.5 15.5 26.0376 15.5 23Z",fill:"#7F64FF"})),jh||(jh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M20.2756 20.6208C20.3042 20.4777 20.3185 20.4062 20.3257 20.3807C20.5165 19.6989 21.483 19.6989 21.6739 20.3807C21.681 20.4062 21.6953 20.4777 21.7239 20.6208C21.7377 20.6898 21.7446 20.7243 21.752 20.7558C21.9252 21.4964 22.5034 22.0747 23.244 22.2478C23.2755 22.2552 23.31 22.2621 23.3791 22.2759C23.5221 22.3045 23.5936 22.3188 23.6191 22.326C24.3009 22.5168 24.3009 23.4833 23.6191 23.6742C23.5936 23.6813 23.5221 23.6956 23.3791 23.7242C23.31 23.738 23.2755 23.7449 23.244 23.7523C22.5034 23.9255 21.9252 24.5037 21.752 25.2443C21.7446 25.2758 21.7377 25.3103 21.7239 25.3794C21.6953 25.5224 21.681 25.594 21.6739 25.6194C21.483 26.3012 20.5165 26.3012 20.3257 25.6194C20.3185 25.594 20.3042 25.5224 20.2756 25.3794C20.2618 25.3103 20.2549 25.2758 20.2475 25.2443C20.0744 24.5037 19.4961 23.9255 18.7555 23.7523C18.724 23.7449 18.6895 23.738 18.6204 23.7242C18.4774 23.6956 18.4059 23.6813 18.3804 23.6742C17.6986 23.4833 17.6986 22.5168 18.3804 22.326C18.4059 22.3188 18.4774 22.3045 18.6204 22.2759C18.6895 22.2621 18.724 22.2552 18.7555 22.2478C19.4961 22.0747 20.0744 21.4964 20.2475 20.7558C20.2549 20.7243 20.2618 20.6898 20.2756 20.6208Z",fill:"#5531FF"}))),kh||(kh=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("path",{d:"M20.2756 6.62075C20.3042 6.4777 20.3185 6.40617 20.3257 6.38071C20.5165 5.69893 21.483 5.69893 21.6739 6.38071C21.681 6.40617 21.6953 6.4777 21.7239 6.62075C21.7377 6.6898 21.7446 6.72432 21.752 6.75579C21.9252 7.49639 22.5034 8.07466 23.244 8.24785C23.2755 8.25521 23.31 8.26211 23.3791 8.27592C23.5221 8.30453 23.5936 8.31884 23.6191 8.32596C24.3009 8.51678 24.3009 9.48335 23.6191 9.67416C23.5936 9.68128 23.5221 9.69559 23.3791 9.7242C23.31 9.73801 23.2755 9.74491 23.244 9.75227C22.5034 9.92546 21.9252 10.5037 21.752 11.2443C21.7446 11.2758 21.7377 11.3103 21.7239 11.3794C21.6953 11.5224 21.681 11.594 21.6739 11.6194C21.483 12.3012 20.5165 12.3012 20.3257 11.6194C20.3185 11.594 20.3042 11.5224 20.2756 11.3794C20.2618 11.3103 20.2549 11.2758 20.2475 11.2443C20.0744 10.5037 19.4961 9.92546 18.7555 9.75227C18.724 9.74491 18.6895 9.73801 18.6204 9.7242C18.4774 9.69559 18.4059 9.68128 18.3804 9.67416C17.6986 9.48335 17.6986 8.51678 18.3804 8.32596C18.4059 8.31884 18.4774 8.30453 18.6204 8.27592C18.6895 8.26211 18.724 8.25521 18.7555 8.24785C19.4961 8.07466 20.0744 7.49639 20.2475 6.75579C20.2549 6.72432 20.2618 6.6898 20.2756 6.62075Z",fill:"#5531FF"}))),Oh||(Oh=p.createElement("g",{filter:"url(#filter2_d)"},p.createElement("path",{d:"M8.27562 13.6208C8.30423 13.4777 8.31853 13.4062 8.32566 13.3807C8.51647 12.6989 9.48304 12.6989 9.67385 13.3807C9.68098 13.4062 9.69528 13.4777 9.72389 13.6208C9.7377 13.6898 9.74461 13.7243 9.75197 13.7558C9.92515 14.4964 10.5034 15.0747 11.244 15.2478C11.2755 15.2552 11.31 15.2621 11.3791 15.2759C11.5221 15.3045 11.5936 15.3188 11.6191 15.326C12.3009 15.5168 12.3009 16.4833 11.6191 16.6742C11.5936 16.6813 11.5221 16.6956 11.3791 16.7242C11.31 16.738 11.2755 16.7449 11.244 16.7523C10.5034 16.9255 9.92515 17.5037 9.75197 18.2443C9.74461 18.2758 9.7377 18.3103 9.72389 18.3794C9.69528 18.5224 9.68098 18.594 9.67385 18.6194C9.48304 19.3012 8.51647 19.3012 8.32566 18.6194C8.31853 18.594 8.30423 18.5224 8.27562 18.3794C8.26181 18.3103 8.2549 18.2758 8.24754 18.2443C8.07436 17.5037 7.49609 16.9255 6.75549 16.7523C6.72401 16.7449 6.68949 16.738 6.62045 16.7242C6.47739 16.6956 6.40587 16.6813 6.38041 16.6742C5.69862 16.4833 5.69862 15.5168 6.38041 15.326C6.40587 15.3188 6.47739 15.3045 6.62045 15.2759C6.68949 15.2621 6.72401 15.2552 6.75549 15.2478C7.49609 15.0747 8.07436 14.4964 8.24754 13.7558C8.2549 13.7243 8.26181 13.6898 8.27562 13.6208Z",fill:"#5531FF"}))),Rh||(Rh=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:14.8691,y:17.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:14.8691,y:3.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter2_d",x:2.86914,y:10.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Ph=(0,p.forwardRef)(Th);n.p;var Ih,Lh,Mh,Kh,Dh,Nh=["title","titleId"];function Vh(){return Vh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bh=function(e,t){var n=e.title,r=e.titleId,o=zh(e,Nh);return p.createElement("svg",Vh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ih||(Ih=p.createElement("path",{opacity:.4,fillRule:"evenodd",clipRule:"evenodd",d:"M7 8C7 7.44772 7.44772 7 8 7H24C24.5523 7 25 7.44772 25 8C25 8.47669 24.6665 8.87548 24.22 8.97572C24.2831 9.22777 24.2486 9.50407 24.1017 9.74285L19.9523 16.4855C21.2075 17.5853 22 19.2001 22 21C22 24.3137 19.3137 27 16 27C12.6863 27 10 24.3137 10 21C10 17.6863 12.6863 15 16 15C16.7956 15 17.555 15.1548 18.2498 15.4361L22.2104 9H8C7.44772 9 7 8.55228 7 8Z",fill:"currentColor"})),Lh||(Lh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("rect",{x:21.5,y:5.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),Mh||(Mh=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("rect",{x:5.5,y:5.5,width:5,height:5,rx:2.5,fill:"currentColor"}))),Kh||(Kh=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.1464 17.6464C15 17.7929 15 18.0286 15 18.5V20H13.5C13.0286 20 12.7929 20 12.6464 20.1464C12.5 20.2929 12.5 20.5286 12.5 21C12.5 21.4714 12.5 21.7071 12.6464 21.8536C12.7929 22 13.0286 22 13.5 22H15V23.5C15 23.9714 15 24.2071 15.1464 24.3536C15.2929 24.5 15.5286 24.5 16 24.5C16.4714 24.5 16.7071 24.5 16.8536 24.3536C17 24.2071 17 23.9714 17 23.5V22H18.5C18.9714 22 19.2071 22 19.3536 21.8536C19.5 21.7071 19.5 21.4714 19.5 21C19.5 20.5286 19.5 20.2929 19.3536 20.1464C19.2071 20 18.9714 20 18.5 20H17V18.5C17 18.0286 17 17.7929 16.8536 17.6464C16.7071 17.5 16.4714 17.5 16 17.5C15.5286 17.5 15.2929 17.5 15.1464 17.6464Z",fill:"white"})),Dh||(Dh=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:18.5,y:3.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:2.5,y:3.5,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Hh=(0,p.forwardRef)(Bh);n.p;var Fh,Wh,$h,Uh,Zh,Gh=["title","titleId"];function Yh(){return Yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var qh=function(e,t){var n=e.title,r=e.titleId,o=Xh(e,Gh);return p.createElement("svg",Yh({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Fh||(Fh=p.createElement("path",{opacity:.6,fillRule:"evenodd",clipRule:"evenodd",d:"M7 8C7 7.44772 7.44772 7 8 7H24C24.5523 7 25 7.44772 25 8C25 8.47669 24.6665 8.87548 24.22 8.97572C24.2831 9.22777 24.2486 9.50407 24.1017 9.74285L19.9523 16.4855C21.2075 17.5853 22 19.2001 22 21C22 24.3137 19.3137 27 16 27C12.6863 27 10 24.3137 10 21C10 17.6863 12.6863 15 16 15C16.7956 15 17.555 15.1548 18.2498 15.4361L22.2104 9H8C7.44772 9 7 8.55228 7 8Z",fill:"#7F64FF"})),Wh||(Wh=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M23.2756 5.62075C23.3042 5.4777 23.3185 5.40617 23.3257 5.38071C23.5165 4.69893 24.483 4.69893 24.6739 5.38071C24.681 5.40617 24.6953 5.4777 24.7239 5.62075C24.7377 5.6898 24.7446 5.72432 24.752 5.75579C24.9252 6.49639 25.5034 7.07466 26.244 7.24785C26.2755 7.25521 26.31 7.26211 26.3791 7.27592C26.5221 7.30453 26.5936 7.31884 26.6191 7.32596C27.3009 7.51678 27.3009 8.48335 26.6191 8.67416C26.5936 8.68128 26.5221 8.69559 26.3791 8.7242C26.31 8.73801 26.2755 8.74491 26.244 8.75227C25.5034 8.92546 24.9252 9.50373 24.752 10.2443C24.7446 10.2758 24.7377 10.3103 24.7239 10.3794C24.6953 10.5224 24.681 10.594 24.6739 10.6194C24.483 11.3012 23.5165 11.3012 23.3257 10.6194C23.3185 10.594 23.3042 10.5224 23.2756 10.3794C23.2618 10.3103 23.2549 10.2758 23.2475 10.2443C23.0744 9.50373 22.4961 8.92546 21.7555 8.75227C21.724 8.74491 21.6895 8.73801 21.6204 8.7242C21.4774 8.69559 21.4059 8.68128 21.3804 8.67416C20.6986 8.48335 20.6986 7.51678 21.3804 7.32596C21.4059 7.31884 21.4774 7.30453 21.6204 7.27592C21.6895 7.26211 21.724 7.25521 21.7555 7.24785C22.4961 7.07466 23.0744 6.49639 23.2475 5.75579C23.2549 5.72432 23.2618 5.6898 23.2756 5.62075Z",fill:"#5531FF"}))),$h||($h=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("path",{d:"M7.27562 5.62075C7.30423 5.4777 7.31853 5.40617 7.32566 5.38071C7.51647 4.69893 8.48304 4.69893 8.67385 5.38071C8.68098 5.40617 8.69528 5.4777 8.72389 5.62075C8.7377 5.6898 8.74461 5.72432 8.75197 5.75579C8.92515 6.49639 9.50342 7.07466 10.244 7.24785C10.2755 7.25521 10.31 7.26211 10.3791 7.27592C10.5221 7.30453 10.5936 7.31884 10.6191 7.32596C11.3009 7.51678 11.3009 8.48335 10.6191 8.67416C10.5936 8.68128 10.5221 8.69559 10.3791 8.7242C10.31 8.73801 10.2755 8.74491 10.244 8.75227C9.50342 8.92546 8.92515 9.50373 8.75197 10.2443C8.74461 10.2758 8.7377 10.3103 8.72389 10.3794C8.69528 10.5224 8.68098 10.594 8.67385 10.6194C8.48304 11.3012 7.51647 11.3012 7.32566 10.6194C7.31853 10.594 7.30423 10.5224 7.27562 10.3794C7.26181 10.3103 7.2549 10.2758 7.24754 10.2443C7.07436 9.50373 6.49609 8.92546 5.75549 8.75227C5.72401 8.74491 5.68949 8.73801 5.62045 8.7242C5.47739 8.69559 5.40587 8.68128 5.38041 8.67416C4.69862 8.48335 4.69862 7.51678 5.38041 7.32596C5.40587 7.31884 5.47739 7.30453 5.62045 7.27592C5.68949 7.26211 5.72401 7.25521 5.75549 7.24785C6.49609 7.07466 7.07436 6.49639 7.24754 5.75579C7.2549 5.72432 7.26181 5.6898 7.27562 5.62075Z",fill:"#5531FF"}))),Uh||(Uh=p.createElement("path",{d:"M15.3476 18.2609C15.4706 17.6459 15.5321 17.3384 15.602 17.2466C15.8021 16.9839 16.1974 16.9839 16.3975 17.2466C16.4674 17.3384 16.5289 17.6459 16.6519 18.2609C16.735 18.676 16.7765 18.8836 16.8508 19.0636C17.0538 19.5554 17.4444 19.946 17.9362 20.149C18.1162 20.2234 18.3238 20.2649 18.7389 20.3479C19.3539 20.4709 19.6614 20.5324 19.7532 20.6023C20.0159 20.8024 20.0159 21.1977 19.7532 21.3978C19.6614 21.4677 19.3539 21.5292 18.7389 21.6522C18.3238 21.7353 18.1162 21.7768 17.9362 21.8511C17.4444 22.0541 17.0538 22.4447 16.8508 22.9365C16.7765 23.1165 16.735 23.3241 16.6519 23.7392C16.5289 24.3542 16.4674 24.6617 16.3975 24.7535C16.1974 25.0162 15.8021 25.0162 15.602 24.7535C15.5321 24.6617 15.4706 24.3542 15.3476 23.7392C15.2646 23.3241 15.223 23.1165 15.1487 22.9365C14.9457 22.4447 14.5551 22.0541 14.0633 21.8511C13.8833 21.7768 13.6757 21.7353 13.2606 21.6522C12.6456 21.5292 12.3381 21.4677 12.2463 21.3978C11.9836 21.1977 11.9836 20.8024 12.2463 20.6023C12.3381 20.5324 12.6456 20.4709 13.2606 20.3479C13.6757 20.2649 13.8833 20.2234 14.0633 20.149C14.5551 19.946 14.9457 19.5554 15.1487 19.0636C15.223 18.8836 15.2646 18.676 15.3476 18.2609Z",fill:"white"})),Zh||(Zh=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:17.8691,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:1.86914,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Jh=(0,p.forwardRef)(qh);n.p;var Qh,eg,tg,ng,rg=["title","titleId"];function og(){return og=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ag=function(e,t){var n=e.title,r=e.titleId,o=ig(e,rg);return p.createElement("svg",og({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Qh||(Qh=p.createElement("path",{opacity:.4,d:"M5 7H21C23.8284 7 25.2426 7 26.1213 7.87868C27 8.75736 27 10.1716 27 13V25H11C8.17157 25 6.75736 25 5.87868 24.1213C5 23.2426 5 21.8284 5 19V7Z",fill:"currentColor"})),eg||(eg=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("rect",{x:23,y:21,width:5,height:5,rx:2.5,fill:"currentColor"}))),tg||(tg=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("rect",{x:4,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),ng||(ng=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:20,y:19,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:1,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},sg=(0,p.forwardRef)(ag);n.p;var lg,cg,dg,ug,hg=["title","titleId"];function gg(){return gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var pg=function(e,t){var n=e.title,r=e.titleId,o=mg(e,hg);return p.createElement("svg",gg({viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,lg||(lg=p.createElement("path",{opacity:.6,d:"M6 7H22C24.8284 7 26.2426 7 27.1213 7.87868C28 8.75736 28 10.1716 28 13V25H12C9.17157 25 7.75736 25 6.87868 24.1213C6 23.2426 6 21.8284 6 19V7Z",fill:"#7F64FF"})),cg||(cg=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M26.2756 21.6208C26.3042 21.4777 26.3185 21.4062 26.3257 21.3807C26.5165 20.6989 27.483 20.6989 27.6739 21.3807C27.681 21.4062 27.6953 21.4777 27.7239 21.6208C27.7377 21.6898 27.7446 21.7243 27.752 21.7558C27.9252 22.4964 28.5034 23.0747 29.244 23.2478C29.2755 23.2552 29.31 23.2621 29.3791 23.2759C29.5221 23.3045 29.5936 23.3188 29.6191 23.326C30.3009 23.5168 30.3009 24.4833 29.6191 24.6742C29.5936 24.6813 29.5221 24.6956 29.3791 24.7242C29.31 24.738 29.2755 24.7449 29.244 24.7523C28.5034 24.9255 27.9252 25.5037 27.752 26.2443C27.7446 26.2758 27.7377 26.3103 27.7239 26.3794C27.6953 26.5224 27.681 26.594 27.6739 26.6194C27.483 27.3012 26.5165 27.3012 26.3257 26.6194C26.3185 26.594 26.3042 26.5224 26.2756 26.3794C26.2618 26.3103 26.2549 26.2758 26.2475 26.2443C26.0744 25.5037 25.4961 24.9255 24.7555 24.7523C24.724 24.7449 24.6895 24.738 24.6204 24.7242C24.4774 24.6956 24.4059 24.6813 24.3804 24.6742C23.6986 24.4833 23.6986 23.5168 24.3804 23.326C24.4059 23.3188 24.4774 23.3045 24.6204 23.2759C24.6895 23.2621 24.724 23.2552 24.7555 23.2478C25.4961 23.0747 26.0744 22.4964 26.2475 21.7558C26.2549 21.7243 26.2618 21.6898 26.2756 21.6208Z",fill:"#5531FF"}))),dg||(dg=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("path",{d:"M6.27562 5.62075C6.30423 5.4777 6.31853 5.40617 6.32566 5.38071C6.51647 4.69893 7.48304 4.69893 7.67385 5.38071C7.68098 5.40617 7.69528 5.4777 7.72389 5.62075C7.7377 5.6898 7.74461 5.72432 7.75197 5.75579C7.92515 6.49639 8.50342 7.07466 9.24402 7.24785C9.2755 7.25521 9.31002 7.26211 9.37907 7.27592C9.52212 7.30453 9.59365 7.31884 9.6191 7.32596C10.3009 7.51678 10.3009 8.48335 9.6191 8.67416C9.59365 8.68128 9.52212 8.69559 9.37907 8.7242C9.31002 8.73801 9.2755 8.74491 9.24402 8.75227C8.50342 8.92546 7.92515 9.50373 7.75197 10.2443C7.74461 10.2758 7.7377 10.3103 7.72389 10.3794C7.69528 10.5224 7.68098 10.594 7.67385 10.6194C7.48304 11.3012 6.51647 11.3012 6.32566 10.6194C6.31853 10.594 6.30423 10.5224 6.27562 10.3794C6.26181 10.3103 6.2549 10.2758 6.24754 10.2443C6.07436 9.50373 5.49609 8.92546 4.75549 8.75227C4.72401 8.74491 4.68949 8.73801 4.62045 8.7242C4.47739 8.69559 4.40587 8.68128 4.38041 8.67416C3.69862 8.48335 3.69862 7.51678 4.38041 7.32596C4.40587 7.31884 4.47739 7.30453 4.62045 7.27592C4.68949 7.26211 4.72401 7.25521 4.75549 7.24785C5.49609 7.07466 6.07436 6.49639 6.24754 5.75579C6.2549 5.72432 6.26181 5.6898 6.27562 5.62075Z",fill:"#5531FF"}))),ug||(ug=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:20.8691,y:18.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},fg=(0,p.forwardRef)(pg);n.p;var vg,yg,bg,xg,wg,Cg=["title","titleId"];function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var kg=function(e,t){var n=e.title,r=e.titleId,o=jg(e,Cg);return p.createElement("svg",Sg({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,vg||(vg=p.createElement("path",{opacity:.4,d:"M5 7H21C23.8284 7 25.2426 7 26.1213 7.87868C27 8.75736 27 10.1716 27 13V25H11C8.17157 25 6.75736 25 5.87868 24.1213C5 23.2426 5 21.8284 5 19V7Z",fill:"currentColor"})),yg||(yg=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("rect",{x:23,y:21,width:5,height:5,rx:2.5,fill:"currentColor"}))),bg||(bg=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("rect",{x:4,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),xg||(xg=p.createElement("g",{filter:"url(#filter2_d)"},p.createElement("rect",{x:23,y:6,width:5,height:5,rx:2.5,fill:"currentColor"}))),wg||(wg=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:20,y:19,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:1,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter2_d",x:20,y:4,width:11,height:11,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Og=(0,p.forwardRef)(kg);n.p;var Rg,Eg,_g,Ag,Tg,Pg=["title","titleId"];function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mg=function(e,t){var n=e.title,r=e.titleId,o=Lg(e,Pg);return p.createElement("svg",Ig({viewBox:"0 0 34 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Rg||(Rg=p.createElement("path",{opacity:.6,d:"M6 7H22C24.8284 7 26.2426 7 27.1213 7.87868C28 8.75736 28 10.1716 28 13V25H12C9.17157 25 7.75736 25 6.87868 24.1213C6 23.2426 6 21.8284 6 19V7Z",fill:"#7F64FF"})),Eg||(Eg=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M26.2756 21.6208C26.3042 21.4777 26.3185 21.4062 26.3257 21.3807C26.5165 20.6989 27.483 20.6989 27.6739 21.3807C27.681 21.4062 27.6953 21.4777 27.7239 21.6208C27.7377 21.6898 27.7446 21.7243 27.752 21.7558C27.9252 22.4964 28.5034 23.0747 29.244 23.2478C29.2755 23.2552 29.31 23.2621 29.3791 23.2759C29.5221 23.3045 29.5936 23.3188 29.6191 23.326C30.3009 23.5168 30.3009 24.4833 29.6191 24.6742C29.5936 24.6813 29.5221 24.6956 29.3791 24.7242C29.31 24.738 29.2755 24.7449 29.244 24.7523C28.5034 24.9255 27.9252 25.5037 27.752 26.2443C27.7446 26.2758 27.7377 26.3103 27.7239 26.3794C27.6953 26.5224 27.681 26.594 27.6739 26.6194C27.483 27.3012 26.5165 27.3012 26.3257 26.6194C26.3185 26.594 26.3042 26.5224 26.2756 26.3794C26.2618 26.3103 26.2549 26.2758 26.2475 26.2443C26.0744 25.5037 25.4961 24.9255 24.7555 24.7523C24.724 24.7449 24.6895 24.738 24.6204 24.7242C24.4774 24.6956 24.4059 24.6813 24.3804 24.6742C23.6986 24.4833 23.6986 23.5168 24.3804 23.326C24.4059 23.3188 24.4774 23.3045 24.6204 23.2759C24.6895 23.2621 24.724 23.2552 24.7555 23.2478C25.4961 23.0747 26.0744 22.4964 26.2475 21.7558C26.2549 21.7243 26.2618 21.6898 26.2756 21.6208Z",fill:"#5531FF"}))),_g||(_g=p.createElement("g",{filter:"url(#filter1_d)"},p.createElement("path",{d:"M6.27562 5.62075C6.30423 5.4777 6.31853 5.40617 6.32566 5.38071C6.51647 4.69893 7.48304 4.69893 7.67385 5.38071C7.68098 5.40617 7.69528 5.4777 7.72389 5.62075C7.7377 5.6898 7.74461 5.72432 7.75197 5.75579C7.92515 6.49639 8.50342 7.07466 9.24402 7.24785C9.2755 7.25521 9.31002 7.26211 9.37907 7.27592C9.52212 7.30453 9.59365 7.31884 9.6191 7.32596C10.3009 7.51678 10.3009 8.48335 9.6191 8.67416C9.59365 8.68128 9.52212 8.69559 9.37907 8.7242C9.31002 8.73801 9.2755 8.74491 9.24402 8.75227C8.50342 8.92546 7.92515 9.50373 7.75197 10.2443C7.74461 10.2758 7.7377 10.3103 7.72389 10.3794C7.69528 10.5224 7.68098 10.594 7.67385 10.6194C7.48304 11.3012 6.51647 11.3012 6.32566 10.6194C6.31853 10.594 6.30423 10.5224 6.27562 10.3794C6.26181 10.3103 6.2549 10.2758 6.24754 10.2443C6.07436 9.50373 5.49609 8.92546 4.75549 8.75227C4.72401 8.74491 4.68949 8.73801 4.62045 8.7242C4.47739 8.69559 4.40587 8.68128 4.38041 8.67416C3.69862 8.48335 3.69862 7.51678 4.38041 7.32596C4.40587 7.31884 4.47739 7.30453 4.62045 7.27592C4.68949 7.26211 4.72401 7.25521 4.75549 7.24785C5.49609 7.07466 6.07436 6.49639 6.24754 5.75579C6.2549 5.72432 6.26181 5.6898 6.27562 5.62075Z",fill:"#5531FF"}))),Ag||(Ag=p.createElement("g",{filter:"url(#filter2_d)"},p.createElement("path",{transform:"translate(20)",d:"M6.27562 5.62075C6.30423 5.4777 6.31853 5.40617 6.32566 5.38071C6.51647 4.69893 7.48304 4.69893 7.67385 5.38071C7.68098 5.40617 7.69528 5.4777 7.72389 5.62075C7.7377 5.6898 7.74461 5.72432 7.75197 5.75579C7.92515 6.49639 8.50342 7.07466 9.24402 7.24785C9.2755 7.25521 9.31002 7.26211 9.37907 7.27592C9.52212 7.30453 9.59365 7.31884 9.6191 7.32596C10.3009 7.51678 10.3009 8.48335 9.6191 8.67416C9.59365 8.68128 9.52212 8.69559 9.37907 8.7242C9.31002 8.73801 9.2755 8.74491 9.24402 8.75227C8.50342 8.92546 7.92515 9.50373 7.75197 10.2443C7.74461 10.2758 7.7377 10.3103 7.72389 10.3794C7.69528 10.5224 7.68098 10.594 7.67385 10.6194C7.48304 11.3012 6.51647 11.3012 6.32566 10.6194C6.31853 10.594 6.30423 10.5224 6.27562 10.3794C6.26181 10.3103 6.2549 10.2758 6.24754 10.2443C6.07436 9.50373 5.49609 8.92546 4.75549 8.75227C4.72401 8.74491 4.68949 8.73801 4.62045 8.7242C4.47739 8.69559 4.40587 8.68128 4.38041 8.67416C3.69862 8.48335 3.69862 7.51678 4.38041 7.32596C4.40587 7.31884 4.47739 7.30453 4.62045 7.27592C4.68949 7.26211 4.72401 7.25521 4.75549 7.24785C5.49609 7.07466 6.07436 6.49639 6.24754 5.75579C6.2549 5.72432 6.26181 5.6898 6.27562 5.62075Z",fill:"#5531FF"}))),Tg||(Tg=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:20.8691,y:18.8694,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter1_d",x:.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("filter",{id:"filter2_d",x:20.869141,y:2.86938,width:12.2614,height:12.2614,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.333333 0 0 0 0 0.192157 0 0 0 0 1 0 0 0 0.6 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Kg=(0,p.forwardRef)(Mg);n.p;var Dg,Ng,Vg=["title","titleId"];function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hg=function(e,t){var n=e.title,r=e.titleId,o=Bg(e,Vg);return p.createElement("svg",zg({viewBox:"0 0 489.059 489.059",fill:"none",width:"32px",height:"32px",style:{padding:6},xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Dg||(Dg=p.createElement("defs",null,p.createElement("linearGradient",{id:"paint0_linear",x1:10.4999,y1:10,x2:28.9999,y2:27,gradientUnits:"userSpaceOnUse"},p.createElement("stop",{stopOpacity:.8,stopColor:"var(--text-color-hover)"}),p.createElement("stop",{offset:1,stopOpacity:.4,stopColor:"var(--text-color-hover)"})))),Ng||(Ng=p.createElement("g",{opacity:.5},p.createElement("path",{d:"M481.211,443.368L224.809,186.946l55.817-17.364c3.88-1.196,6.736-4.509,7.38-8.528c0.642-4.018-1.058-8.051-4.383-10.385 l-56.798-40.165c-9.814-6.913-15.56-18.2-15.417-30.172l0.916-69.519c0.051-4.06-2.23-7.796-5.837-9.647 c-3.608-1.844-7.976-1.483-11.225,0.962l-55.73,41.584c-9.588,7.163-22.117,9.136-33.439,5.294L40.246,26.678 c-3.848-1.315-8.118-0.322-11.007,2.55c-2.868,2.872-3.847,7.138-2.563,10.987l22.376,65.862c3.8,11.343,1.828,23.837-5.325,33.438 L2.131,195.245c-2.418,3.272-2.819,7.628-0.977,11.236c1.859,3.633,5.599,5.887,9.688,5.84l69.502-0.898 c11.971-0.153,23.244,5.582,30.174,15.366l40.149,56.807c2.373,3.32,6.401,5.021,10.412,4.387c4.025-0.632,7.314-3.497,8.518-7.378 l17.375-55.805l256.389,256.422c5.243,5.221,12.094,7.836,18.908,7.836c6.885,0,13.73-2.615,18.943-7.836 C491.671,470.772,491.671,453.826,481.211,443.368z",fill:"url(#paint0_linear)"}))))},Fg=(0,p.forwardRef)(Hg);n.p;var Wg,$g,Ug,Zg=["title","titleId"];function Gg(){return Gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Xg=function(e,t){var n=e.title,r=e.titleId,o=Yg(e,Zg);return p.createElement("svg",Gg({viewBox:"0 0 33 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Wg||(Wg=p.createElement("rect",{x:20.1183,y:3.64455,width:13.354,height:23.2808,rx:2,transform:"rotate(45 20.1183 3.64455)",fill:"url(#paint0_linear)"})),$g||($g=p.createElement("rect",{x:11.0722,y:12.6907,width:13.354,height:1.94005,transform:"rotate(45 11.0722 12.6907)",fill:"white"})),Ug||(Ug=p.createElement("defs",null,p.createElement("linearGradient",{id:"paint0_linear",x1:26.7953,y1:3.64455,x2:26.7953,y2:26.9253,gradientUnits:"userSpaceOnUse"},p.createElement("stop",{stopColor:"#617ADA"}),p.createElement("stop",{offset:.572917,stopColor:"#617ADA"}),p.createElement("stop",{offset:.625,stopColor:"#FF2A2A"}),p.createElement("stop",{offset:1,stopColor:"#FF2A2A"})))))},qg=(0,p.forwardRef)(Xg);n.p;var Jg,Qg=["title","titleId"];function em(){return em=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nm=function(e,t){var n=e.title,r=e.titleId,o=tm(e,Qg);return p.createElement("svg",em({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Jg||(Jg=p.createElement("g",{opacity:.4},p.createElement("path",{d:"M10 14H13V14.5C13 14.7761 13.2239 15 13.5 15C13.7761 15 14 14.7761 14 14.5V14H17V14.5C17 14.7761 17.2239 15 17.5 15C17.7761 15 18 14.7761 18 14.5V14H20C20.5523 14 21 14.4477 21 15V15.5C21 15.7761 21.2239 16 21.5 16C21.7761 16 22 15.7761 22 15.5V15C22 14.4477 22.4477 14 23 14H25C25 22 23 27 17 27C16.0712 27 15.6067 27 15.2168 26.9487C12.5244 26.5942 10.4058 24.4756 10.0513 21.7832C10 21.3933 10 20.9288 10 20V14Z",fill:"currentColor"}),p.createElement("path",{d:"M22 10C22 9.17157 22.6716 8.5 23.5 8.5C24.3284 8.5 25 9.17157 25 10V15.5C25 16.3284 24.3284 17 23.5 17C22.6716 17 22 16.3284 22 15.5V10Z",fill:"currentColor"}),p.createElement("path",{d:"M18 7C18 6.17157 18.6716 5.5 19.5 5.5C20.3284 5.5 21 6.17157 21 7V15.5C21 16.3284 20.3284 17 19.5 17C18.6716 17 18 16.3284 18 15.5V7Z",fill:"currentColor"}),p.createElement("path",{d:"M14 6.5C14 5.67157 14.6716 5 15.5 5C16.3284 5 17 5.67157 17 6.5V15.5C17 16.3284 16.3284 17 15.5 17C14.6716 17 14 16.3284 14 15.5V6.5Z",fill:"currentColor"}),p.createElement("path",{d:"M10 8.5C10 7.67157 10.6716 7 11.5 7C12.3284 7 13 7.67157 13 8.5V15.5C13 16.3284 12.3284 17 11.5 17C10.6716 17 10 16.3284 10 15.5V8.5Z",fill:"currentColor"}),p.createElement("path",{d:"M7.0002 15.0001C9.50018 17.5 10.5002 25 15.4289 25.4",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round"}))))},rm=(0,p.forwardRef)(nm);n.p;var om,im=["title","titleId"];function am(){return am=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lm=function(e,t){var n=e.title,r=e.titleId,o=sm(e,im);return p.createElement("svg",am({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,om||(om=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15 6C15 5.44772 15.4477 5 16 5C16.5523 5 17 5.44772 17 6V9.07089C17.5568 9.15054 18.0926 9.29573 18.5991 9.49838L20.134 6.83972C20.4102 6.36143 21.0218 6.19755 21.5001 6.47369C21.9784 6.74984 22.1422 7.36143 21.8661 7.83972L20.3303 10.4998C20.7648 10.8423 21.1577 11.2353 21.5003 11.6698L24.1603 10.134C24.6386 9.85783 25.2502 10.0217 25.5264 10.5C25.8025 10.9783 25.6386 11.5899 25.1603 11.866L22.5016 13.401C22.7043 13.9075 22.8495 14.4432 22.9291 15H26C26.5523 15 27 15.4477 27 16C27 16.5523 26.5523 17 26 17H22.9291C22.8495 17.5568 22.7043 18.0926 22.5016 18.5991L25.1602 20.134C25.6385 20.4101 25.8023 21.0217 25.5262 21.5C25.25 21.9783 24.6385 22.1422 24.1602 21.866L21.5002 20.3303C21.1577 20.7648 20.7648 21.1577 20.3303 21.5002L21.8661 24.1602C22.1422 24.6385 21.9784 25.2501 21.5001 25.5263C21.0218 25.8024 20.4102 25.6385 20.134 25.1602L18.5991 22.5016C18.0926 22.7043 17.5569 22.8495 17 22.9291V26C17 26.5523 16.5523 27 16 27C15.4477 27 15 26.5523 15 26V22.9291C14.4432 22.8495 13.9075 22.7043 13.401 22.5016L11.8661 25.1602C11.5899 25.6385 10.9784 25.8024 10.5001 25.5263C10.0218 25.2501 9.85789 24.6385 10.134 24.1602L11.6698 21.5003C11.2353 21.1577 10.8423 20.7648 10.4998 20.3303L7.83983 21.866C7.36154 22.1422 6.74995 21.9783 6.47381 21.5C6.19767 21.0217 6.36154 20.4101 6.83983 20.134L9.49839 18.5991C9.29573 18.0926 9.15054 17.5568 9.07089 17H6C5.44772 17 5 16.5523 5 16C5 15.4477 5.44772 15 6 15H9.07089C9.15054 14.4432 9.29571 13.9075 9.49835 13.401L6.83966 11.866C6.36137 11.5899 6.19749 10.9783 6.47363 10.5C6.74977 10.0217 7.36137 9.85783 7.83966 10.134L10.4997 11.6698C10.8423 11.2352 11.2352 10.8423 11.6698 10.4997L10.134 7.83972C9.85789 7.36143 10.0218 6.74984 10.5001 6.47369C10.9784 6.19755 11.5899 6.36143 11.8661 6.83972L13.401 9.49835C13.9075 9.29571 14.4432 9.15053 15 9.07089V6ZM16 11C18.7614 11 21 13.2386 21 16C21 18.7614 18.7614 21 16 21C13.2386 21 11 18.7614 11 16C11 13.2386 13.2386 11 16 11Z",fill:"currentColor",fillOpacity:.4})))},cm=(0,p.forwardRef)(lm);n.p;var dm,um=["title","titleId"];function hm(){return hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mm=function(e,t){var n=e.title,r=e.titleId,o=gm(e,um);return p.createElement("svg",hm({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,dm||(dm=p.createElement("g",{opacity:.4},p.createElement("mask",{id:"path-1-inside-1",fill:"white"},p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 6C10.4772 6 6 10.4772 6 16C6 21.5228 10.4772 26 16 26C21.5228 26 26 21.5228 26 16C26 10.4772 21.5228 6 16 6ZM16 8C11.5817 8 8 11.5817 8 16C8 20.4183 11.5817 24 16 24V8Z"})),p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16 6C10.4772 6 6 10.4772 6 16C6 21.5228 10.4772 26 16 26C21.5228 26 26 21.5228 26 16C26 10.4772 21.5228 6 16 6ZM16 8C11.5817 8 8 11.5817 8 16C8 20.4183 11.5817 24 16 24V8Z",fill:"currentColor"}),p.createElement("path",{d:"M16 8V6H18V8H16ZM16 24H18V26H16V24ZM4 16C4 9.37258 9.37258 4 16 4V8C11.5817 8 8 11.5817 8 16H4ZM16 28C9.37258 28 4 22.6274 4 16H8C8 20.4183 11.5817 24 16 24V28ZM28 16C28 22.6274 22.6274 28 16 28V24C20.4183 24 24 20.4183 24 16H28ZM16 4C22.6274 4 28 9.37258 28 16H24C24 11.5817 20.4183 8 16 8V4ZM6 16C6 10.4772 10.4772 6 16 6V10C12.6863 10 10 12.6863 10 16H6ZM16 26C10.4772 26 6 21.5228 6 16H10C10 19.3137 12.6863 22 16 22V26ZM18 8V24H14V8H18Z",fill:"currentColor",mask:"url(#path-1-inside-1)"}))))},pm=(0,p.forwardRef)(mm);n.p;var fm,vm,ym,bm=["title","titleId"];function xm(){return xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Cm=function(e,t){var n=e.title,r=e.titleId,o=wm(e,bm);return p.createElement("svg",xm({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fm||(fm=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 13C21 15.4553 19.7359 17.6154 17.823 18.8648L18.9285 21.6286C19.1336 22.1414 18.8842 22.7234 18.3714 22.9285C17.8586 23.1336 17.2766 22.8842 17.0715 22.3714L16.0063 19.7083C15.3707 19.8981 14.6973 20 14 20C10.134 20 7 16.866 7 13C7 9.13401 10.134 6 14 6C17.866 6 21 9.13401 21 13ZM14 18C16.7614 18 19 15.7614 19 13C19 10.2386 16.7614 8 14 8C11.2386 8 9 10.2386 9 13C9 15.7614 11.2386 18 14 18Z",fill:"currentColor"})),vm||(vm=p.createElement("rect",{x:11,y:12,width:6,height:2,rx:.5,fill:"currentColor"})),ym||(ym=p.createElement("rect",{x:13,y:10,width:2,height:6,rx:.5,fill:"currentColor"})))},Sm=(0,p.forwardRef)(Cm);n.p;var jm,km,Om=["title","titleId"];function Rm(){return Rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _m=function(e,t){var n=e.title,r=e.titleId,o=Em(e,Om);return p.createElement("svg",Rm({width:28,height:28,viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,jm||(jm=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 13C21 15.4553 19.7359 17.6154 17.823 18.8648L18.9285 21.6286C19.1336 22.1414 18.8842 22.7234 18.3714 22.9285C17.8586 23.1336 17.2766 22.8842 17.0715 22.3714L16.0063 19.7083C15.3707 19.8981 14.6973 20 14 20C10.134 20 7 16.866 7 13C7 9.13401 10.134 6 14 6C17.866 6 21 9.13401 21 13ZM14 18C16.7614 18 19 15.7614 19 13C19 10.2386 16.7614 8 14 8C11.2386 8 9 10.2386 9 13C9 15.7614 11.2386 18 14 18Z",fill:"currentColor"})),km||(km=p.createElement("rect",{x:11,y:12,width:6,height:2,rx:.5,fill:"currentColor"})))},Am=(0,p.forwardRef)(_m);n.p;var Tm,Pm,Im,Lm,Mm,Km=["title","titleId"];function Dm(){return Dm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Vm=function(e,t){var n=e.title,r=e.titleId,o=Nm(e,Km);return p.createElement("svg",Dm({width:32,height:32,viewBox:"-4 -4 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Tm||(Tm=p.createElement("path",{d:"M10.6242 8.5C10.3726 8.5 10.2328 8.20902 10.3899 8.01259L11.7657 6.29283C11.8858 6.1427 12.1142 6.1427 12.2343 6.29283L13.6101 8.01259C13.7672 8.20902 13.6274 8.5 13.3758 8.5H10.6242Z",fill:"currentColor"})),Pm||(Pm=p.createElement("path",{d:"M19.7072 11.7657C19.8573 11.8858 19.8573 12.1142 19.7072 12.2343L17.9874 13.6101C17.791 13.7672 17.5 13.6274 17.5 13.3758V10.6242C17.5 10.3726 17.791 10.2328 17.9874 10.3899L19.7072 11.7657Z",fill:"currentColor"})),Im||(Im=p.createElement("path",{d:"M4.29283 12.2343C4.1427 12.1142 4.1427 11.8858 4.29283 11.7657L6.01259 10.3899C6.20902 10.2328 6.5 10.3726 6.5 10.6242V13.3758C6.5 13.6274 6.20902 13.7672 6.01259 13.6101L4.29283 12.2343Z",fill:"currentColor"})),Lm||(Lm=p.createElement("path",{d:"M12.2343 17.7072C12.1142 17.8573 11.8858 17.8573 11.7657 17.7072L10.3899 15.9874C10.2328 15.791 10.3726 15.5 10.6242 15.5H13.3758C13.6274 15.5 13.7672 15.791 13.6101 15.9874L12.2343 17.7072Z",fill:"currentColor"})),Mm||(Mm=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 3H21C22.1 3 23 3.9 23 5V19C23 20.1 22.1 21 21 21H3C1.9 21 1 20.1 1 19V5C1 3.9 1.9 3 3 3ZM21 5H3V19H21V5Z",fill:"currentColor",fillOpacity:.4})))},zm=(0,p.forwardRef)(Vm);n.p;var Bm,Hm,Fm,Wm=["title","titleId"];function $m(){return $m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Zm=function(e,t){var n=e.title,r=e.titleId,o=Um(e,Wm);return p.createElement("svg",$m({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Bm||(Bm=p.createElement("path",{opacity:.4,d:"M12.5 9.5L19.4 24",stroke:"currentColor",strokeWidth:2.5,strokeLinecap:"round"})),Hm||(Hm=p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M11 8.16549V21.0032C11 21.7436 11.9996 21.9771 12.3276 21.3133L14.8549 16.1985C15.0578 15.7878 15.5138 15.5675 15.9617 15.6638L21.7844 16.916C22.4955 17.0689 22.9392 16.1704 22.3855 15.6988L12.6485 7.40425C11.9992 6.85116 11 7.31258 11 8.16549Z",fill:"currentColor"}))),Fm||(Fm=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:8,y:5.16357,width:17.6347,height:20.5406,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})))))},Gm=(0,p.forwardRef)(Zm);n.p;var Ym,Xm,qm=["title","titleId"];function Jm(){return Jm=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ep=function(e,t){var n=e.title,r=e.titleId,o=Qm(e,qm);return p.createElement("svg",Jm({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ym||(Ym=p.createElement("g",{clipPath:"url(#clip0)"},p.createElement("rect",{opacity:.4,x:10.686,y:8.79004,width:17,height:15,rx:3,transform:"rotate(5 10.686 8.79004)",fill:"currentColor"}),p.createElement("path",{opacity:.4,d:"M6.00007 14C5.00007 9 9.00007 4 15.0001 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M6.26297 12H5.73703C4.09201 12 3.2695 12 2.98684 12.5281C2.70419 13.0563 3.16044 13.7407 4.07293 15.1094L4.3359 15.5038C5.08851 16.6328 5.46482 17.1972 6 17.1972C6.53518 17.1972 6.91149 16.6328 7.6641 15.5038L7.92707 15.1094C8.83956 13.7407 9.29581 13.0563 9.01316 12.5281C8.7305 12 7.90799 12 6.26297 12Z",fill:"currentColor"})))),Xm||(Xm=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:-.0964355,y:10,width:12.1927,height:11.1972,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("clipPath",{id:"clip0"},p.createElement("rect",{width:32,height:32,fill:"white"})))))},tp=(0,p.forwardRef)(ep);n.p;var np,rp,op=["title","titleId"];function ip(){return ip=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sp=function(e,t){var n=e.title,r=e.titleId,o=ap(e,op);return p.createElement("svg",ip({viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,np||(np=p.createElement("g",{clipPath:"url(#clip0)"},p.createElement("rect",{opacity:.4,width:17,height:15,rx:3,transform:"matrix(-0.996195 0.0871557 0.0871557 0.996195 21.314 8.79004)",fill:"currentColor"}),p.createElement("path",{opacity:.4,d:"M25.9999 14C26.9999 9 22.9999 4 16.9999 6",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round"}),p.createElement("g",{filter:"url(#filter0_d)"},p.createElement("path",{d:"M25.737 12H26.263C27.908 12 28.7305 12 29.0132 12.5281C29.2958 13.0563 28.8396 13.7407 27.9271 15.1094L27.6641 15.5038C26.9115 16.6328 26.5352 17.1972 26 17.1972C25.4648 17.1972 25.0885 16.6328 24.3359 15.5038L24.0729 15.1094C23.1604 13.7407 22.7042 13.0563 22.9868 12.5281C23.2695 12 24.092 12 25.737 12Z",fill:"currentColor"})))),rp||(rp=p.createElement("defs",null,p.createElement("filter",{id:"filter0_d",x:19.9036,y:10,width:12.1927,height:11.1972,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},p.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),p.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),p.createElement("feOffset",{dy:1}),p.createElement("feGaussianBlur",{stdDeviation:1.5}),p.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),p.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),p.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow",result:"shape"})),p.createElement("clipPath",{id:"clip0"},p.createElement("rect",{width:32,height:32,fill:"white",transform:"matrix(-1 0 0 1 32 0)"})))))},lp=(0,p.forwardRef)(sp);n.p;var cp,dp=["title","titleId"];function up(){return up=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gp=function(e,t){var n=e.title,r=e.titleId,o=hp(e,dp);return p.createElement("svg",up({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,cp||(cp=p.createElement("path",{d:"M9 5H11V7H9V5ZM9 9H11V15H9V9ZM10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18Z",fill:"#413C4A"})))},mp=(0,p.forwardRef)(gp);n.p;var pp,fp=["title","titleId"];function vp(){return vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var bp=function(e,t){var n=e.title,r=e.titleId,o=yp(e,fp);return p.createElement("svg",vp({viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,pp||(pp=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.2322 1.82833C19.1582 0.654906 16.7019 0 14 0C11.2981 0 8.84185 0.654906 6.76777 1.82833C4.6937 3.00176 3.00176 4.6937 1.82833 6.76777C0.654906 8.84185 0 11.2981 0 14C0 16.7019 0.654906 19.1582 1.82833 21.2322C3.00176 23.3063 4.6937 24.9982 6.76777 26.1717C8.84185 27.3451 11.2981 28 14 28C16.7019 28 19.1582 27.3451 21.2322 26.1717C23.3063 24.9982 24.9982 23.3063 26.1717 21.2322C27.3451 19.1582 28 16.7019 28 14C28 11.2981 27.3451 8.84185 26.1717 6.76777C24.9982 4.6937 23.3063 3.00176 21.2322 1.82833ZM15.4582 11.5025C15.481 10.9558 15.0528 10.5 14.501 10.5H11.0015C10.7296 10.5 10.5 10.7239 10.5 11V11.1502C10.5 11.3438 10.6374 11.5661 10.8069 11.6476L12.1287 12.283C12.373 12.4005 12.5904 12.7218 12.6031 12.9954L12.9582 21.4975C12.981 22.0442 13.4477 22.5 14 22.5L14.1176 22.4933C14.62 22.4353 15.0203 22.0116 15.0418 21.4975L15.4582 11.5025ZM15.5 7C15.5 6.17157 14.8284 5.5 14 5.5C13.1716 5.5 12.5 6.17157 12.5 7C12.5 7.82843 13.1716 8.5 14 8.5C14.8284 8.5 15.5 7.82843 15.5 7Z",fill:"currentColor"})))},xp=(0,p.forwardRef)(bp);n.p;var wp,Cp,Sp=["title","titleId"];function jp(){return jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Op=function(e,t){var n=e.title,r=e.titleId,o=kp(e,Sp);return p.createElement("svg",jp({viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,wp||(wp=p.createElement("rect",{x:14,y:14,width:12,height:12,rx:2,fill:"white",stroke:"currentColor",strokeWidth:2})),Cp||(Cp=p.createElement("rect",{x:10,y:10,width:12,height:12,rx:2,fill:"white",stroke:"currentColor",strokeWidth:2})))},Rp=(0,p.forwardRef)(Op);n.p;var Ep,_p=["title","titleId"];function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Pp=function(e,t){var n=e.title,r=e.titleId,o=Tp(e,_p);return p.createElement("svg",Ap({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ep||(Ep=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 5H15C16.2351 5 16.9601 5.00425 17.4767 5.07369C17.6839 5.10156 17.7946 5.13283 17.8474 5.15255C17.8672 5.20541 17.8984 5.31609 17.9263 5.52332C17.9958 6.03986 18 6.76495 18 8V16C18 17.2351 17.9958 17.9601 17.9263 18.4767C17.8984 18.6839 17.8672 18.7946 17.8474 18.8474C17.7946 18.8672 17.6839 18.8984 17.4767 18.9263C16.9601 18.9958 16.2351 19 15 19H9C7.76495 19 7.03986 18.9958 6.52332 18.9263C6.31609 18.8984 6.20542 18.8672 6.15256 18.8474C6.13284 18.7946 6.10156 18.6839 6.07369 18.4767C6.00425 17.9601 6 17.2351 6 16V8C6 6.76495 6.00425 6.03986 6.07369 5.52332C6.10156 5.31608 6.13283 5.20541 6.15256 5.15256C6.20541 5.13283 6.31608 5.10156 6.52332 5.07369C7.03986 5.00425 7.76495 5 9 5ZM17.8886 5.17233C17.8878 5.17265 17.8814 5.16973 17.872 5.16266C17.8847 5.16848 17.8894 5.17202 17.8886 5.17233ZM17.8373 5.12796C17.8303 5.11857 17.8274 5.11225 17.8277 5.11144C17.828 5.11062 17.8315 5.11532 17.8373 5.12796ZM17.8277 18.8886C17.8274 18.8878 17.8303 18.8814 17.8373 18.872C17.8315 18.8847 17.828 18.8894 17.8277 18.8886ZM17.872 18.8373C17.8814 18.8303 17.8878 18.8273 17.8886 18.8277C17.8894 18.828 17.8847 18.8315 17.872 18.8373ZM6.11144 18.8277C6.11225 18.8274 6.11857 18.8303 6.12796 18.8373C6.11532 18.8315 6.11062 18.828 6.11144 18.8277ZM6.16266 18.872C6.16973 18.8814 6.17265 18.8878 6.17233 18.8886C6.17202 18.8894 6.16848 18.8847 6.16266 18.872ZM6.17233 5.11144C6.17265 5.11225 6.16973 5.11857 6.16266 5.12796C6.16848 5.11532 6.17202 5.11062 6.17233 5.11144ZM6.12796 5.16266C6.11857 5.16973 6.11225 5.17265 6.11144 5.17233C6.11062 5.17202 6.11532 5.16848 6.12796 5.16266ZM4 8C4 5.64298 4 4.46447 4.73223 3.73223C5.46447 3 6.64298 3 9 3H15C17.357 3 18.5355 3 19.2678 3.73223C20 4.46447 20 5.64298 20 8V16C20 18.357 20 19.5355 19.2678 20.2678C18.5355 21 17.357 21 15 21H9C6.64298 21 5.46447 21 4.73223 20.2678C4 19.5355 4 18.357 4 16V8ZM8.01537 15.6439C8 15.7212 8 15.8141 8 16C8 16.1859 8 16.2788 8.01537 16.3561C8.0785 16.6734 8.32658 16.9215 8.64393 16.9846C8.72121 17 8.81414 17 9 17H15C15.1859 17 15.2788 17 15.3561 16.9846C15.6734 16.9215 15.9215 16.6734 15.9846 16.3561C16 16.2788 16 16.1859 16 16C16 15.8141 16 15.7212 15.9846 15.6439C15.9215 15.3266 15.6734 15.0785 15.3561 15.0154C15.2788 15 15.1859 15 15 15H9C8.81414 15 8.72121 15 8.64393 15.0154C8.32658 15.0785 8.0785 15.3266 8.01537 15.6439ZM8 12C8 11.8141 8 11.7212 8.01537 11.6439C8.0785 11.3266 8.32658 11.0785 8.64393 11.0154C8.72121 11 8.81414 11 9 11H15C15.1859 11 15.2788 11 15.3561 11.0154C15.6734 11.0785 15.9215 11.3266 15.9846 11.6439C16 11.7212 16 11.8141 16 12C16 12.1859 16 12.2788 15.9846 12.3561C15.9215 12.6734 15.6734 12.9215 15.3561 12.9846C15.2788 13 15.1859 13 15 13H9C8.81414 13 8.72121 13 8.64393 12.9846C8.32658 12.9215 8.0785 12.6734 8.01537 12.3561C8 12.2788 8 12.1859 8 12ZM8.01537 7.64393C8 7.72121 8 7.81414 8 8C8 8.18586 8 8.27879 8.01537 8.35607C8.0785 8.67342 8.32658 8.9215 8.64393 8.98463C8.72121 9 8.81414 9 9 9H15C15.1859 9 15.2788 9 15.3561 8.98463C15.6734 8.9215 15.9215 8.67342 15.9846 8.35607C16 8.27879 16 8.18586 16 8C16 7.81414 16 7.72121 15.9846 7.64393C15.9215 7.32658 15.6734 7.0785 15.3561 7.01537C15.2788 7 15.1859 7 15 7H9C8.81414 7 8.72121 7 8.64393 7.01537C8.32658 7.0785 8.0785 7.32658 8.01537 7.64393Z",fill:"currentColor"})))},Ip=(0,p.forwardRef)(Pp);n.p;var Lp,Mp,Kp,Dp,Np=["title","titleId"];function Vp(){return Vp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bp=function(e,t){var n=e.title,r=e.titleId,o=zp(e,Np);return p.createElement("svg",Vp({width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Lp||(Lp=p.createElement("rect",{x:9,y:9,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Mp||(Mp=p.createElement("rect",{x:9,y:18.3334,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Kp||(Kp=p.createElement("rect",{x:18.333,y:9,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})),Dp||(Dp=p.createElement("rect",{x:18.333,y:18.3334,width:4.66667,height:4.66667,stroke:"currentColor",strokeWidth:2})))},Hp=(0,p.forwardRef)(Bp);n.p;var Fp,Wp=["title","titleId"];function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Zp=function(e,t){var n=e.title,r=e.titleId,o=Up(e,Wp);return p.createElement("svg",$p({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Fp||(Fp=p.createElement("path",{d:"M8.93032 5.06881C10.564 6.70421 10.5416 9.32618 8.94016 10.9365C8.93716 10.9398 8.9336 10.9433 8.93032 10.9466L7.09282 12.7841C5.47216 14.4048 2.83543 14.4046 1.21501 12.7841C-0.405654 11.1637 -0.405654 8.5267 1.21501 6.90631L2.22963 5.89169C2.49869 5.62263 2.96206 5.80146 2.97595 6.1817C2.99367 6.66629 3.08056 7.15314 3.24091 7.62329C3.29521 7.78249 3.25641 7.95858 3.13747 8.07753L2.77962 8.43537C2.01328 9.20171 1.98925 10.4495 2.74804 11.2233C3.51432 12.0048 4.77383 12.0094 5.54599 11.2373L7.38349 9.40006C8.15433 8.62921 8.15111 7.38327 7.38349 6.61565C7.28229 6.51464 7.18035 6.43616 7.10072 6.38134C7.04439 6.34266 6.99788 6.29135 6.9649 6.2315C6.93192 6.17165 6.91338 6.10493 6.91077 6.03664C6.89994 5.7477 7.00231 5.44996 7.23063 5.22163L7.80633 4.64591C7.95729 4.49495 8.19412 4.47641 8.36917 4.59858C8.56965 4.73857 8.75742 4.89592 8.93032 5.06881V5.06881ZM12.784 1.21493C11.1636 -0.405518 8.52686 -0.405736 6.9062 1.21493L5.0687 3.05243C5.06542 3.05571 5.06186 3.05926 5.05886 3.06254C3.45744 4.67287 3.43499 7.29484 5.0687 8.93024C5.24159 9.10313 5.42935 9.26047 5.62982 9.40044C5.80488 9.52261 6.04173 9.50405 6.19267 9.35311L6.76836 8.77739C6.99668 8.54907 7.09906 8.25132 7.08823 7.96238C7.08561 7.8941 7.06707 7.82737 7.03409 7.76752C7.00111 7.70768 6.9546 7.65637 6.89827 7.61769C6.81865 7.56286 6.71671 7.48438 6.61551 7.38338C5.84789 6.61576 5.84466 5.36981 6.61551 4.59896L8.45301 2.76174C9.22517 1.98958 10.4846 1.99422 11.251 2.77568C12.0097 3.54951 11.9857 4.79731 11.2194 5.56365L10.8615 5.9215C10.7426 6.04044 10.7038 6.21654 10.7581 6.37573C10.9184 6.84588 11.0053 7.33274 11.023 7.81732C11.037 8.19756 11.5003 8.37639 11.7694 8.10733L12.784 7.09271C14.4047 5.47235 14.4047 2.83532 12.784 1.21493V1.21493Z",fill:"currentColor"})))},Gp=(0,p.forwardRef)(Zp);n.p;var Yp,Xp=["title","titleId"];function qp(){return qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Qp=function(e,t){var n=e.title,r=e.titleId,o=Jp(e,Xp);return p.createElement("svg",qp({width:13,height:14,viewBox:"0 0 13 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Yp||(Yp=p.createElement("path",{d:"M11.375 5.6875H7.4375V1.75C7.4375 1.26684 7.04566 0.875 6.5625 0.875H5.6875C5.20434 0.875 4.8125 1.26684 4.8125 1.75V5.6875H0.875C0.391836 5.6875 0 6.07934 0 6.5625V7.4375C0 7.92066 0.391836 8.3125 0.875 8.3125H4.8125V12.25C4.8125 12.7332 5.20434 13.125 5.6875 13.125H6.5625C7.04566 13.125 7.4375 12.7332 7.4375 12.25V8.3125H11.375C11.8582 8.3125 12.25 7.92066 12.25 7.4375V6.5625C12.25 6.07934 11.8582 5.6875 11.375 5.6875Z",fill:"currentColor"})))},ef=(0,p.forwardRef)(Qp);n.p;var tf,nf=["title","titleId"];function rf(){return rf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var af=function(e,t){var n=e.title,r=e.titleId,o=of(e,nf);return p.createElement("svg",rf({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,tf||(tf=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9063 4.00006L12 4.00012L12.0936 4.00006C12.5346 3.99963 12.9197 3.99926 13.2772 4.08751C14.0293 4.2731 14.6804 4.74239 15.0943 5.39715C15.2911 5.70848 15.4125 6.07386 15.5515 6.49236L15.5811 6.58126L15.7207 7.00012H19V9.00012H5V7.00012H8.27919L8.41881 6.58126L8.44838 6.49237C8.58743 6.07386 8.70883 5.70848 8.90563 5.39715C9.31952 4.74239 9.97062 4.2731 10.7227 4.08751C11.0803 3.99926 11.4653 3.99963 11.9063 4.00006ZM13.4037 6.4658C13.4459 6.53251 13.4848 6.62421 13.612 7.00012H10.3879C10.5151 6.62421 10.554 6.53251 10.5962 6.4658C10.7342 6.24754 10.9512 6.09111 11.2019 6.02925C11.2913 6.00718 11.4116 6.00012 12 6.00012C12.5883 6.00012 12.7086 6.00718 12.798 6.02925C13.0487 6.09111 13.2658 6.24754 13.4037 6.4658ZM8.57753 15.3506L7.99314 10.3833L6.00684 10.617L6.59123 15.5843L6.59836 15.6449C6.6911 16.4336 6.77156 17.1179 6.90762 17.6638C7.05402 18.2512 7.29252 18.8041 7.78494 19.2419C8.27736 19.6798 8.85429 19.8521 9.45478 19.9289C10.0129 20.0002 10.7018 20.0002 11.4959 20.0001H12.504C13.2982 20.0002 13.9871 20.0002 14.5452 19.9289C15.1457 19.8521 15.7226 19.6798 16.215 19.2419C16.7074 18.8041 16.946 18.2512 17.0924 17.6638C17.2284 17.1179 17.3089 16.4337 17.4016 15.6449V15.6449L17.9931 10.617L16.0068 10.3833L15.4224 15.3506C15.3205 16.2175 15.2532 16.773 15.1517 17.1801C15.0571 17.5597 14.962 17.6798 14.886 17.7474C14.81 17.815 14.6796 17.8954 14.2916 17.945C13.8754 17.9982 13.3158 18.0001 12.443 18.0001H11.557C10.6842 18.0001 10.1245 17.9982 9.70839 17.945C9.32041 17.8954 9.18995 17.815 9.11397 17.7474C9.03799 17.6798 8.94285 17.5597 8.84826 17.1801C8.7468 16.773 8.67952 16.2175 8.57753 15.3506Z",fill:"currentColor"})))},sf=(0,p.forwardRef)(af);n.p;var lf,cf=["title","titleId"];function df(){return df=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hf=function(e,t){var n=e.title,r=e.titleId,o=uf(e,cf);return p.createElement("svg",df({viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,lf||(lf=p.createElement("path",{d:"M11 6V16H3V6H11ZM9.5 0H4.5L3.5 1H0V3H14V1H10.5L9.5 0ZM13 4H1V16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4Z",fill:"currentcolor"})))},gf=(0,p.forwardRef)(hf);n.p;var mf,pf,ff,vf=["title","titleId"];function yf(){return yf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xf=function(e,t){var n=e.title,r=e.titleId,o=bf(e,vf);return p.createElement("svg",yf({width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,mf||(mf=p.createElement("circle",{cx:9,cy:9,r:1.5,fill:"currentColor"})),pf||(pf=p.createElement("circle",{cx:3.75,cy:9,r:1.5,fill:"currentColor"})),ff||(ff=p.createElement("circle",{cx:14.25,cy:9,r:1.5,fill:"currentColor"})))},wf=(0,p.forwardRef)(xf);n.p;n.p;var Cf,Sf,jf,kf=["title","titleId"];function Of(){return Of=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ef=function(e,t){var n=e.title,r=e.titleId,o=Rf(e,kf);return p.createElement("svg",Of({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Cf||(Cf=p.createElement("path",{d:"M7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9H17C17.5523 9 18 8.55228 18 8C18 7.44772 17.5523 7 17 7H7Z",fill:"currentColor"})),Sf||(Sf=p.createElement("path",{d:"M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z",fill:"currentColor"})),jf||(jf=p.createElement("path",{d:"M6 16C6 15.4477 6.44772 15 7 15H17C17.5523 15 18 15.4477 18 16C18 16.5523 17.5523 17 17 17H7C6.44772 17 6 16.5523 6 16Z",fill:"currentColor"})))},_f=(0,p.forwardRef)(Ef);n.p;var Af,Tf,Pf=["title","titleId"];function If(){return If=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mf=function(e,t){var n=e.title,r=e.titleId,o=Lf(e,Pf);return p.createElement("svg",If({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Af||(Af=p.createElement("path",{d:"M10 8C9.44772 8 9 8.44772 9 9C9 9.55228 9.44772 10 10 10H14C14.5523 10 15 9.55228 15 9C15 8.44772 14.5523 8 14 8H10Z",fill:"black"})),Tf||(Tf=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 11C5 8.17157 5 6.75736 5.87868 5.87868C6.75736 5 8.17157 5 11 5H13C15.8284 5 17.2426 5 18.1213 5.87868C19 6.75736 19 8.17157 19 11V13C19 15.8284 19 17.2426 18.1213 18.1213C17.2426 19 15.8284 19 13 19H11C8.17157 19 6.75736 19 5.87868 18.1213C5 17.2426 5 15.8284 5 13V11ZM11 7H13C14.4708 7 15.3726 7.00425 16.0253 7.092C16.599 7.16913 16.6948 7.27883 16.7062 7.29185L16.7071 7.29289L16.7082 7.29383C16.7212 7.3052 16.8309 7.40098 16.908 7.97468C16.9958 8.62738 17 9.52925 17 11V13C17 14.4708 16.9958 15.3726 16.908 16.0253C16.8309 16.599 16.7212 16.6948 16.7082 16.7062L16.7071 16.7071L16.7062 16.7082C16.6948 16.7212 16.599 16.8309 16.0253 16.908C15.3726 16.9958 14.4708 17 13 17H11C9.52925 17 8.62738 16.9958 7.97468 16.908C7.40098 16.8309 7.3052 16.7212 7.29383 16.7082L7.29289 16.7071L7.29185 16.7062C7.27884 16.6948 7.16913 16.599 7.092 16.0253C7.00425 15.3726 7 14.4708 7 13V11C7 9.52925 7.00425 8.62738 7.092 7.97468C7.16913 7.40099 7.27883 7.3052 7.29185 7.29383L7.29289 7.29289L7.29383 7.29185C7.3052 7.27883 7.40099 7.16913 7.97468 7.092C8.62738 7.00425 9.52925 7 11 7Z",fill:"currentColor"})))},Kf=(0,p.forwardRef)(Mf);n.p;var Df,Nf=["title","titleId"];function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bf=function(e,t){var n=e.title,r=e.titleId,o=zf(e,Nf);return p.createElement("svg",Vf({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Df||(Df=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 10C10 9.52038 10.0005 9.21074 10.0167 8.97376C10.0323 8.74576 10.0589 8.65893 10.0761 8.61732C10.1776 8.37229 10.3723 8.17762 10.6173 8.07612C10.6589 8.05889 10.7458 8.03227 10.9738 8.01671C11.2107 8.00054 11.5204 8 12 8C12.4796 8 12.7893 8.00054 13.0262 8.01671C13.2542 8.03227 13.3411 8.05889 13.3827 8.07612C13.6277 8.17762 13.8224 8.37229 13.9239 8.61732C13.9411 8.65893 13.9677 8.74576 13.9833 8.97376C13.9995 9.21074 14 9.52038 14 10H10ZM9 12C8.99934 12 8.99869 12 8.99803 12C8.63798 12 8.35669 12.0001 8.11551 12.0062C8.07804 12.0072 8.04273 12.0082 8.00942 12.0094C8.00824 12.0427 8.00717 12.078 8.00623 12.1155C8.00013 12.3571 8 12.639 8 13C8 14.4708 8.00425 15.3726 8.092 16.0253C8.16913 16.599 8.27884 16.6948 8.29185 16.7062L8.29289 16.7071L8.29383 16.7082C8.3052 16.7212 8.40098 16.8309 8.97468 16.908C9.62738 16.9958 10.5292 17 12 17C13.4708 17 14.3726 16.9958 15.0253 16.908C15.599 16.8309 15.6948 16.7212 15.7062 16.7082L15.7071 16.7071L15.7082 16.7062C15.7212 16.6948 15.8309 16.599 15.908 16.0253C15.9958 15.3726 16 14.4708 16 13C16 12.639 15.9999 12.3571 15.9938 12.1155C15.9928 12.078 15.9918 12.0427 15.9906 12.0094C15.9573 12.0082 15.922 12.0072 15.8845 12.0062C15.6429 12.0001 15.361 12 15 12M14.998 12H9.00198C9.00132 12 9.00066 12 9 12M16 10.0087V9.96801C16 9.52936 16 9.15088 15.9787 8.83762C15.9561 8.50779 15.9066 8.17788 15.7716 7.85195C15.4672 7.11687 14.8831 6.53285 14.1481 6.22836C13.8221 6.09336 13.4922 6.04386 13.1624 6.02135C12.8491 5.99998 12.4707 5.99999 12.0321 6H12.032H11.968H11.9679C11.5293 5.99999 11.1509 5.99998 10.8376 6.02135C10.5078 6.04386 10.1779 6.09336 9.85195 6.22836C9.11687 6.53285 8.53284 7.11687 8.22836 7.85195C8.09336 8.17788 8.04385 8.50779 8.02135 8.83762C7.99998 9.15087 7.99999 9.52936 8 9.968V9.96802L8 10V10.0087C7.22328 10.0321 6.75999 10.1187 6.43934 10.4393C6 10.8787 6 11.5858 6 13C6 15.8284 6 17.2426 6.87868 18.1213C7.75736 19 9.17157 19 12 19C14.8284 19 16.2426 19 17.1213 18.1213C18 17.2426 18 15.8284 18 13C18 11.5858 18 10.8787 17.5607 10.4393C17.24 10.1187 16.7767 10.0321 16 10.0087ZM10.5 14.5C10.5 13.6716 11.1716 13 12 13C12.8284 13 13.5 13.6716 13.5 14.5C13.5 15.3284 12.8284 16 12 16C11.1716 16 10.5 15.3284 10.5 14.5Z",fill:"currentColor"})))},Hf=(0,p.forwardRef)(Bf);n.p;var Ff,Wf=["title","titleId"];function $f(){return $f=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Zf=function(e,t){var n=e.title,r=e.titleId,o=Uf(e,Wf);return p.createElement("svg",$f({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ff||(Ff=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.0014 7.85874C10.0032 7.93562 10.0073 8.11163 10.0167 7.97376C10.0323 7.74576 10.0589 7.65893 10.0761 7.61732C10.1776 7.37229 10.3723 7.17762 10.6173 7.07612C10.6589 7.05889 10.7458 7.03227 10.9738 7.01671C11.2107 7.00054 11.5204 7 12 7C12.4796 7 12.7893 7.00054 13.0262 7.01671C13.2542 7.03227 13.3411 7.05889 13.3827 7.07612C13.6277 7.17762 13.8224 7.37229 13.9239 7.61732C13.9411 7.65893 13.9677 7.74576 13.9833 7.97376C13.9995 8.21074 14 8.52038 14 9V10H9C7.58579 10 6.87868 10 6.43934 10.4393C6 10.8787 6 11.5858 6 13C6 15.8284 6 17.2426 6.87868 18.1213C7.75736 19 9.17157 19 12 19C14.8284 19 16.2426 19 17.1213 18.1213C18 17.2426 18 15.8284 18 13C18 11.5858 18 10.8787 17.5607 10.4393C17.24 10.1187 16.7767 10.0321 16 10.0087L16 8.96801C16 8.52936 16 8.15088 15.9787 7.83762C15.9561 7.50779 15.9066 7.17788 15.7716 6.85195C15.4672 6.11687 14.8831 5.53285 14.1481 5.22836C13.8221 5.09336 13.4922 5.04386 13.1624 5.02135C12.8491 4.99998 12.4707 4.99999 12.0321 5H12.032H11.968H11.9679C11.5293 4.99999 11.1509 4.99998 10.8376 5.02135C10.5078 5.04386 10.1779 5.09336 9.85195 5.22836C9.11687 5.53285 8.53284 6.11687 8.22836 6.85195C8.09336 7.17788 8.04385 7.50779 8.02135 7.83762C8.00599 8.06275 8.00167 7.80509 8.00047 7.80511C7.99999 7.80511 8 7.84461 8 7.96802L8 8C8 8.55229 8.44772 9 9 9C9.55229 9 10 8.55229 10 8C10 7.79942 10.0001 7.80347 10.0014 7.85874ZM14.998 12C14.9987 12 14.9993 12 15 12C15.361 12 15.6429 12.0001 15.8845 12.0062C15.922 12.0072 15.9573 12.0082 15.9906 12.0094C15.9918 12.0427 15.9928 12.078 15.9938 12.1155C15.9999 12.3571 16 12.639 16 13C16 14.4708 15.9958 15.3726 15.908 16.0253C15.8309 16.599 15.7212 16.6948 15.7082 16.7062L15.7071 16.7071L15.7062 16.7082C15.6948 16.7212 15.599 16.8309 15.0253 16.908C14.3726 16.9958 13.4708 17 12 17C10.5292 17 9.62738 16.9958 8.97468 16.908C8.40098 16.8309 8.3052 16.7212 8.29383 16.7082L8.29289 16.7071L8.29185 16.7062C8.27884 16.6948 8.16913 16.599 8.092 16.0253C8.00425 15.3726 8 14.4708 8 13C8 12.639 8.00013 12.3571 8.00623 12.1155C8.00717 12.078 8.00824 12.0427 8.00942 12.0094C8.04273 12.0082 8.07804 12.0072 8.11551 12.0062C8.35713 12.0001 8.63901 12 9 12H14.998ZM10.5 14.5C10.5 13.6716 11.1716 13 12 13C12.8284 13 13.5 13.6716 13.5 14.5C13.5 15.3284 12.8284 16 12 16C11.1716 16 10.5 15.3284 10.5 14.5Z",fill:"currentColor"})))},Gf=(0,p.forwardRef)(Zf);n.p;var Yf,Xf=["title","titleId"];function qf(){return qf=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Qf=function(e,t){var n=e.title,r=e.titleId,o=Jf(e,Xf);return p.createElement("svg",qf({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Yf||(Yf=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.24256 7.02988C7.90178 6.94468 7.54129 7.04453 7.29291 7.29291C7.04453 7.54129 6.94468 7.90178 7.02988 8.24256L9.02988 16.2426C9.11726 16.5921 9.38589 16.8676 9.73309 16.9637C10.0803 17.0599 10.4524 16.9619 10.7071 16.7071L13.0001 14.4142L16.293 17.7071C16.6835 18.0976 17.3166 18.0976 17.7072 17.7071C18.0977 17.3166 18.0977 16.6834 17.7072 16.2929L14.4143 13L16.7071 10.7071C16.9619 10.4524 17.0599 10.0803 16.9637 9.73309C16.8676 9.38589 16.5921 9.11726 16.2426 9.02988L8.24256 7.02988ZM10.5418 14.044L9.37439 9.37439L14.044 10.5418L10.5418 14.044Z",fill:"currentColor"})))},ev=(0,p.forwardRef)(Qf);n.p;var tv,nv,rv,ov=["title","titleId"];function iv(){return iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var sv=function(e,t){var n=e.title,r=e.titleId,o=av(e,ov);return p.createElement("svg",iv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,tv||(tv=p.createElement("path",{d:"M7 7C6.44772 7 6 7.44772 6 8C6 8.55228 6.44772 9 7 9H17C17.5523 9 18 8.55228 18 8C18 7.44772 17.5523 7 17 7H7Z",fill:"currentColor"})),nv||(nv=p.createElement("path",{d:"M9 12C9 11.4477 9.44772 11 10 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H10C9.44772 13 9 12.5523 9 12Z",fill:"currentColor"})),rv||(rv=p.createElement("path",{d:"M9 16C9 15.4477 9.44772 15 10 15H17C17.5523 15 18 15.4477 18 16C18 16.5523 17.5523 17 17 17H10C9.44772 17 9 16.5523 9 16Z",fill:"currentColor"})))},lv=(0,p.forwardRef)(sv);n.p;var cv,dv=["title","titleId"];function uv(){return uv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var gv=function(e,t){var n=e.title,r=e.titleId,o=hv(e,dv);return p.createElement("svg",uv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,cv||(cv=p.createElement("path",{d:"M16.8321 9.55463C17.1384 9.0951 17.0142 8.47423 16.5547 8.16788C16.0952 7.86153 15.4743 7.98572 15.168 8.44525L15.0119 8.67931C14.0996 8.24381 13.0783 8 12 8C8.13401 8 5 11.134 5 15C5 15.3385 5.02411 15.672 5.07084 15.9987C5.14904 16.5455 5.65564 16.9253 6.20236 16.8471C6.74908 16.7689 7.12889 16.2623 7.05069 15.7155C7.01733 15.4824 7 15.2435 7 15C7 12.2386 9.23858 10 12 10C12.6673 10 13.3041 10.1307 13.8862 10.368L11.168 14.4454C10.8616 14.9049 10.9858 15.5258 11.4453 15.8321C11.9049 16.1385 12.5257 16.0143 12.8321 15.5548L15.5495 11.4785C16.4461 12.3822 17 13.6264 17 15C17 15.2435 16.9827 15.4824 16.9493 15.7155C16.8711 16.2623 17.2509 16.7689 17.7976 16.8471C18.3444 16.9253 18.851 16.5455 18.9292 15.9987C18.9759 15.672 19 15.3385 19 15C19 12.9309 18.1023 11.0715 16.6751 9.79002L16.8321 9.55463Z",fill:"currentColor"})))},mv=(0,p.forwardRef)(gv);n.p;var pv,fv,vv=["title","titleId"];function yv(){return yv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xv=function(e,t){var n=e.title,r=e.titleId,o=bv(e,vv);return p.createElement("svg",yv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,pv||(pv=p.createElement("path",{d:"M14.5 8C13.6715 8 13 8.67157 13 9.5C13 10.3284 13.6715 11 14.5 11C15.3284 11 16 10.3284 16 9.5C16 8.67157 15.3284 8 14.5 8Z",fill:"currentColor"})),fv||(fv=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.6212 18.2072L17.2426 14.5859C17.2814 14.547 17.3216 14.5072 17.3628 14.4663C17.8123 14.0208 18.3841 13.454 18.6955 12.7024C19.0068 11.9508 19.0033 11.1456 19.0005 10.5128C19.0002 10.4548 19 10.3982 19 10.3432V8.00007L19 7.95314C19.0004 7.76632 19.0009 7.46081 18.9638 7.18495C18.9157 6.82701 18.7745 6.23907 18.2677 5.73231C17.761 5.22555 17.173 5.08434 16.8151 5.03622C16.5392 4.99913 16.2337 4.99968 16.0469 5.00002L16 5.00008H13.6568C13.6019 5.00008 13.5454 4.99983 13.4874 4.99957C12.8545 4.99678 12.0493 4.99322 11.2976 5.30455C10.546 5.61589 9.97923 6.1877 9.53372 6.63716C9.49291 6.67833 9.453 6.7186 9.41417 6.75742L5.79282 10.3788L5.7596 10.4119C5.62726 10.5438 5.41083 10.7594 5.24199 10.9807C5.02292 11.2678 4.70703 11.7834 4.70703 12.5001C4.70703 13.2167 5.02292 13.7323 5.24199 14.0195C5.41082 14.2407 5.62725 14.4564 5.75959 14.5882L5.79282 14.6214L9.37861 18.2072L9.41175 18.2404C9.54361 18.3727 9.75925 18.5892 9.98054 18.758C10.2677 18.9771 10.7833 19.293 11.4999 19.293C12.2166 19.293 12.7322 18.9771 13.0193 18.758C13.2406 18.5892 13.4562 18.3728 13.5881 18.2404L13.6212 18.2072ZM10.8284 8.17164C11.4064 7.59358 11.6955 7.30455 12.063 7.15231C12.4306 7.00008 12.8393 7.00007 13.6568 7.00007H16C16.4714 7.00007 16.7071 7.00008 16.8535 7.14652C17 7.29297 17 7.52867 17 8.00007V10.3432C17 11.1607 17 11.5695 16.8477 11.937C16.6955 12.3046 16.4064 12.5936 15.8284 13.1716L12.207 16.793C11.8737 17.1263 11.707 17.293 11.4999 17.293C11.2928 17.293 11.1262 17.1263 10.7928 16.793L7.20703 13.2072C6.8737 12.8738 6.70703 12.7072 6.70703 12.5001C6.70703 12.293 6.8737 12.1263 7.20703 11.793L10.8284 8.17164Z",fill:"currentColor"})))},wv=(0,p.forwardRef)(xv);n.p;var Cv,Sv,jv=["title","titleId"];function kv(){return kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Rv=function(e,t){var n=e.title,r=e.titleId,o=Ov(e,jv);return p.createElement("svg",kv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Cv||(Cv=p.createElement("path",{d:"M16 11L12 7L8 11",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})),Sv||(Sv=p.createElement("path",{d:"M12 17L12 8",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})))},Ev=(0,p.forwardRef)(Rv);n.p;var _v,Av=["title","titleId"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Iv=function(e,t){var n=e.title,r=e.titleId,o=Pv(e,Av);return p.createElement("svg",Tv({width:14,height:12,viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,_v||(_v=p.createElement("path",{d:"M11.6666 2.66667H13.6666L11 0L8.33331 2.66667H10.3333V12H11.6666M0.333313 9.33333H6.99998V10.6667H0.333313M2.99998 1.33333V2.66667H0.333313V1.33333M0.333313 5.33333H4.99998V6.66667H0.333313V5.33333Z",fill:"currentColor",fillOpacity:.9})))},Lv=(0,p.forwardRef)(Iv);n.p;var Mv,Kv,Dv=["title","titleId"];function Nv(){return Nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zv=function(e,t){var n=e.title,r=e.titleId,o=Vv(e,Dv);return p.createElement("svg",Nv({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Mv||(Mv=p.createElement("path",{d:"M8 13L12 17L16 13",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})),Kv||(Kv=p.createElement("path",{d:"M12 7V16",stroke:"currentColor",strokeWidth:2,strokeLinecap:"square"})))},Bv=(0,p.forwardRef)(zv);n.p;var Hv,Fv=["title","titleId"];function Wv(){return Wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Uv=function(e,t){var n=e.title,r=e.titleId,o=$v(e,Fv);return p.createElement("svg",Wv({width:14,height:12,viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Hv||(Hv=p.createElement("path",{d:"M11.6667 9.33333H13.6667L11 12L8.33337 9.33333H10.3334V0H11.6667M0.333374 9.33333H7.00004V10.6667H0.333374M3.00004 1.33333V2.66667H0.333374V1.33333M0.333374 5.33333H5.00004V6.66667H0.333374V5.33333Z",fill:"#898098"})))},Zv=(0,p.forwardRef)(Uv);n.p;var Gv,Yv,Xv,qv=["title","titleId"];function Jv(){return Jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ey=function(e,t){var n=e.title,r=e.titleId,o=Qv(e,qv);return p.createElement("svg",Jv({width:24,height:24,viewBox:"0 -7 12 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Gv||(Gv=p.createElement("path",{d:"M1 0C0.447715 0 0 0.447715 0 1C0 1.55228 0.447715 2 1 2H11C11.5523 2 12 1.55228 12 1C12 0.447715 11.5523 0 11 0H1Z",fill:"currentColor",fillOpacity:.8})),Yv||(Yv=p.createElement("path",{d:"M2 5C2 4.44772 2.44772 4 3 4H9C9.55229 4 10 4.44772 10 5C10 5.55228 9.55228 6 9 6H3C2.44772 6 2 5.55228 2 5Z",fill:"currentColor",fillOpacity:.8})),Xv||(Xv=p.createElement("path",{d:"M4 9C4 8.44771 4.44772 8 5 8H7C7.55229 8 8 8.44771 8 9C8 9.55229 7.55228 10 7 10H5C4.44772 10 4 9.55229 4 9Z",fill:"currentColor",fillOpacity:.8})))},ty=(0,p.forwardRef)(ey);n.p;var ny,ry=["title","titleId"];function oy(){return oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ay=function(e,t){var n=e.title,r=e.titleId,o=iy(e,ry);return p.createElement("svg",oy({width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ny||(ny=p.createElement("path",{d:"M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z",fill:"#CF1322"})))},sy=(0,p.forwardRef)(ay);n.p;n.p;var ly,cy=["title","titleId"];function dy(){return dy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hy=function(e,t){var n=e.title,r=e.titleId,o=uy(e,cy);return p.createElement("svg",dy({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ly||(ly=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.6483 3.86413C18.2729 3.23952 19.3217 3.48703 19.8345 3.99974C20.3472 4.51246 20.5947 5.56125 19.9701 6.18586L18.9589 7.1971L16.6371 4.87535L17.6483 3.86413ZM15.7848 5.7277L18.1065 8.04945L9.45883 16.6971L7.13708 14.3754L15.7848 5.7277ZM6.28474 15.2277L5.86442 15.648C5.86442 15.648 4.03775 18.771 4.55046 19.2837C5.06318 19.7964 8.18619 17.9698 8.18619 17.9698L8.60649 17.5495L6.28474 15.2277Z",fill:"currentColor"})))},gy=(0,p.forwardRef)(hy);n.p;var my,py=["title","titleId"];function fy(){return fy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var yy=function(e,t){var n=e.title,r=e.titleId,o=vy(e,py);return p.createElement("svg",fy({width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,my||(my=p.createElement("path",{d:"M9.41666 12.5522C8.08332 11.7824 7.41666 11.3975 7.41666 10.8202C7.41666 10.2428 8.08332 9.85792 9.41666 9.08812L11.6667 7.78909C13 7.01929 13.6667 6.63439 14.1667 6.92306C14.6667 7.21174 14.6667 7.98154 14.6667 9.52114V12.1192C14.6667 13.6588 14.6667 14.4286 14.1667 14.7173C13.6667 15.006 13 14.6211 11.6667 13.8513L9.41666 12.5522Z",fill:"currentColor"})))},by=(0,p.forwardRef)(yy);n.p;var xy,wy=["title","titleId"];function Cy(){return Cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var jy=function(e,t){var n=e.title,r=e.titleId,o=Sy(e,wy);return p.createElement("svg",Cy({width:8,height:10,viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,xy||(xy=p.createElement("path",{d:"M2.71359 6.696C1.49573 5.93483 0.886796 5.55425 0.886796 5C0.886796 4.44575 1.49573 4.06517 2.71359 3.304L4.94 1.9125C6.29303 1.06686 6.96954 0.644039 7.48477 0.929605C8 1.21517 8 2.01295 8 3.6085V6.3915C8 7.98705 8 8.78483 7.48477 9.07039C6.96954 9.35596 6.29303 8.93314 4.94 8.0875L2.71359 6.696Z",fill:"currentColor"})))},ky=(0,p.forwardRef)(jy);n.p;var Oy,Ry=["title","titleId"];function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ay=function(e,t){var n=e.title,r=e.titleId,o=_y(e,Ry);return p.createElement("svg",Ey({width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Oy||(Oy=p.createElement("path",{d:"M13.5 12.732C14.8333 11.9622 15.5 11.5773 15.5 10.9999C15.5 10.4226 14.8333 10.0377 13.5 9.26787L11.25 7.96883C9.91667 7.19903 9.25 6.81413 8.75 7.10281C8.25 7.39148 8.25 8.16128 8.25 9.70088V12.299C8.25 13.8386 8.25 14.6084 8.75 14.897C9.25 15.1857 9.91667 14.8008 11.25 14.031L13.5 12.732Z",fill:"currentColor"})))},Ty=(0,p.forwardRef)(Ay);n.p;var Py,Iy=["title","titleId"];function Ly(){return Ly=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ky=function(e,t){var n=e.title,r=e.titleId,o=My(e,Iy);return p.createElement("svg",Ly({width:8,height:10,viewBox:"0 0 8 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Py||(Py=p.createElement("path",{d:"M5.28641 6.696C6.50427 5.93483 7.1132 5.55425 7.1132 5C7.1132 4.44575 6.50427 4.06517 5.28641 3.304L3.06 1.9125C1.70697 1.06686 1.03046 0.644039 0.515232 0.929605C0 1.21517 0 2.01295 0 3.6085V6.3915C0 7.98705 0 8.78483 0.515232 9.07039C1.03046 9.35596 1.70697 8.93314 3.06 8.0875L5.28641 6.696Z",fill:"currentColor"})))},Dy=(0,p.forwardRef)(Ky);n.p;var Ny,Vy,zy,By=["title","titleId"];function Hy(){return Hy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wy=function(e,t){var n=e.title,r=e.titleId,o=Fy(e,By);return p.createElement("svg",Hy({width:24,height:50,viewBox:"0 0 24 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ny||(Ny=p.createElement("path",{d:"M11 36C11 37.6569 12.3431 39 14 39H21C21.5523 39 22 38.5523 22 38V38C22 37.4477 21.5523 37 21 37H14C13.4477 37 13 36.5523 13 36V14C13 13.4477 13.4477 13 14 13H21C21.5523 13 22 12.5523 22 12V12C22 11.4477 21.5523 11 21 11H14C12.3431 11 11 12.3431 11 14V36Z",fill:"currentColor"})),Vy||(Vy=p.createElement("circle",{r:2.69819,transform:"matrix(1 0 0 -1 21.3018 12)",fill:"currentColor"})),zy||(zy=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4095 36.5858L19.874 33.0503C19.4834 32.6597 18.8503 32.6597 18.4598 33.0503V33.0503C18.0692 33.4408 18.0692 34.0739 18.4597 34.4645L20.5811 36.5858C21.3621 37.3668 21.3621 38.6332 20.5811 39.4142L18.4598 41.5355C18.0692 41.9261 18.0692 42.5592 18.4598 42.9497V42.9497C18.8503 43.3403 19.4834 43.3403 19.874 42.9497L23.4095 39.4142V39.4142C24.1905 38.6332 24.1905 37.3668 23.4095 36.5858V36.5858Z",fill:"currentColor"})))},$y=(0,p.forwardRef)(Wy);n.p;var Uy,Zy,Gy,Yy=["title","titleId"];function Xy(){return Xy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jy=function(e,t){var n=e.title,r=e.titleId,o=qy(e,Yy);return p.createElement("svg",Xy({width:24,height:50,viewBox:"0 0 24 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Uy||(Uy=p.createElement("path",{d:"M11 14C11 12.3431 12.3431 11 14 11H21C21.5523 11 22 11.4477 22 12V12C22 12.5523 21.5523 13 21 13H14C13.4477 13 13 13.4477 13 14V36C13 36.5523 13.4477 37 14 37H21C21.5523 37 22 37.4477 22 38V38C22 38.5523 21.5523 39 21 39H14C12.3431 39 11 37.6569 11 36V14Z",fill:"currentColor"})),Zy||(Zy=p.createElement("circle",{cx:21.3018,cy:38,r:2.69819,fill:"currentColor"})),Gy||(Gy=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4095 13.4142L19.874 16.9497C19.4834 17.3403 18.8503 17.3403 18.4597 16.9497V16.9497C18.0692 16.5592 18.0692 15.9261 18.4597 15.5355L20.5811 13.4142C21.3621 12.6332 21.3621 11.3668 20.5811 10.5858L18.4597 8.46447C18.0692 8.07394 18.0692 7.44078 18.4597 7.05025V7.05025C18.8503 6.65973 19.4834 6.65973 19.874 7.05025L23.4095 10.5858V10.5858C24.1905 11.3668 24.1905 12.6332 23.4095 13.4142V13.4142Z",fill:"currentColor"})))},Qy=(0,p.forwardRef)(Jy);n.p;var eb,tb,nb,rb=["title","titleId"];function ob(){return ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ab=function(e,t){var n=e.title,r=e.titleId,o=ib(e,rb);return p.createElement("svg",ob({width:24,height:50,viewBox:"0 0 24 50",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,eb||(eb=p.createElement("path",{d:"M11 14C11 12.3431 12.3431 11 14 11H21C21.5523 11 22 11.4477 22 12V12C22 12.5523 21.5523 13 21 13H14C13.4477 13 13 13.4477 13 14V36C13 36.5523 13.4477 37 14 37H21C21.5523 37 22 37.4477 22 38V38C22 38.5523 21.5523 39 21 39H14C12.3431 39 11 37.6569 11 36V14Z",fill:"currentColor"})),tb||(tb=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4095 13.4142L19.874 16.9497C19.4834 17.3403 18.8503 17.3403 18.4597 16.9497V16.9497C18.0692 16.5592 18.0692 15.9261 18.4597 15.5355L20.5811 13.4142C21.3621 12.6332 21.3621 11.3668 20.5811 10.5858L18.4597 8.46447C18.0692 8.07394 18.0692 7.44078 18.4597 7.05025V7.05025C18.8503 6.65973 19.4834 6.65973 19.874 7.05025L23.4095 10.5858V10.5858C24.1905 11.3668 24.1905 12.6332 23.4095 13.4142V13.4142Z",fill:"currentColor"})),nb||(nb=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4095 39.4142L19.874 42.9497C19.4834 43.3403 18.8503 43.3403 18.4597 42.9497V42.9497C18.0692 42.5592 18.0692 41.9261 18.4597 41.5355L20.5811 39.4142C21.3621 38.6332 21.3621 37.3668 20.5811 36.5858L18.4597 34.4645C18.0692 34.0739 18.0692 33.4408 18.4597 33.0503V33.0503C18.8503 32.6597 19.4834 32.6597 19.874 33.0503L23.4095 36.5858V36.5858C24.1905 37.3668 24.1905 38.6332 23.4095 39.4142V39.4142Z",fill:"currentColor"})))},sb=(0,p.forwardRef)(ab);n.p;var lb,cb,db,ub=["title","titleId"];function hb(){return hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mb=function(e,t){var n=e.title,r=e.titleId,o=gb(e,ub);return p.createElement("svg",hb({width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,lb||(lb=p.createElement("path",{d:"M2 2H3V10H2V2Z",fill:"currentColor"})),cb||(cb=p.createElement("path",{d:"M2 9H10V10H2V9Z",fill:"currentColor"})),db||(db=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.97254 10C6.99068 9.83583 7 9.669 7 9.5C7 7.01472 4.98528 5 2.5 5C2.331 5 2.16417 5.00932 2 5.02746V6.03544C2.1633 6.01209 2.33024 6 2.5 6C4.433 6 6 7.567 6 9.5C6 9.66976 5.98791 9.8367 5.96456 10H6.97254Z",fill:"currentColor"})))},pb=(0,p.forwardRef)(mb);n.p;var fb,vb,yb,bb=["title","titleId"];function xb(){return xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Cb=function(e,t){var n=e.title,r=e.titleId,o=wb(e,bb);return p.createElement("svg",xb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,fb||(fb=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.3})),vb||(vb=p.createElement("path",{d:"M6.5 13C6.5 15.4853 8.51472 17 11 17H11.838C14.1635 17 15.3262 17 16.1769 16.2492C17.0275 15.4983 17.1555 14.4755 17.4114 12.43C17.4664 11.991 17.5 11.5853 17.5 11.25C17.5 9.42157 16.8284 9 15 9H11C8.51472 9 6.5 10.5147 6.5 13Z",fill:"currentColor"})),yb||(yb=p.createElement("path",{d:"M9.2 10.4L8.8344 9.46922C8.38712 9.64491 8.12806 10.1139 8.21746 10.586C8.30686 11.0582 8.71946 11.4 9.2 11.4V10.4ZM13.5 5.99999H14.5C14.5 5.51523 14.1523 5.10029 13.675 5.01543C13.1978 4.93058 12.7284 5.20026 12.5613 5.65531L13.5 5.99999ZM12.5 5.99999C12.5 6.60852 12.3312 7.49061 11.8427 8.18979C11.3927 8.83396 10.624 9.39999 9.2 9.39999V11.4C11.276 11.4 12.6573 10.516 13.4823 9.3352C14.2688 8.20938 14.5 6.89147 14.5 5.99999H12.5ZM13.5 5.99999C12.5613 5.65531 12.5614 5.65498 12.5615 5.65466C12.5616 5.65457 12.5617 5.65427 12.5617 5.65408C12.5619 5.65372 12.562 5.65341 12.5621 5.65314C12.5623 5.6526 12.5624 5.65225 12.5625 5.65209C12.5626 5.65175 12.5624 5.65216 12.562 5.65328C12.5612 5.65552 12.5592 5.66062 12.5561 5.66844C12.5499 5.68408 12.5393 5.71052 12.5239 5.74654C12.4932 5.81868 12.4439 5.92873 12.3747 6.06714C12.2359 6.34487 12.0196 6.73141 11.7155 7.15263C11.1032 8.00079 10.1681 8.94536 8.8344 9.46922L9.5656 11.3308C11.3687 10.6225 12.5836 9.36707 13.3371 8.32326C13.7159 7.7985 13.9864 7.31606 14.1637 6.96131C14.2526 6.78348 14.3187 6.63642 14.3639 6.5305C14.3865 6.4775 14.4038 6.43467 14.4162 6.4033C14.4224 6.38762 14.4274 6.37478 14.4311 6.36496C14.433 6.36005 14.4345 6.35589 14.4358 6.3525C14.4364 6.35081 14.437 6.34931 14.4375 6.348C14.4377 6.34735 14.438 6.34675 14.4382 6.34619C14.4383 6.34592 14.4384 6.34554 14.4385 6.3454C14.4386 6.34503 14.4387 6.34468 13.5 5.99999Z",fill:"currentColor"})))},Sb=(0,p.forwardRef)(Cb);n.p;var jb,kb,Ob,Rb=["title","titleId"];function Eb(){return Eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Ab=function(e,t){var n=e.title,r=e.titleId,o=_b(e,Rb);return p.createElement("svg",Eb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,jb||(jb=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),kb||(kb=p.createElement("path",{d:"M17.5 11C17.5 8.51472 15.4853 7 13 7H12.162C9.8365 7 8.67375 7 7.82311 7.75085C6.97246 8.5017 6.84449 9.52445 6.58856 11.57C6.53363 12.009 6.5 12.4147 6.5 12.75C6.5 14.5784 7.17157 15 9 15H13C15.4853 15 17.5 13.4853 17.5 11Z",fill:"currentColor"})),Ob||(Ob=p.createElement("path",{d:"M14.8 13.6L15.1656 14.5307C15.6129 14.3551 15.8719 13.8861 15.7825 13.4139C15.6931 12.9418 15.2805 12.6 14.8 12.6V13.6ZM10.5 18H9.5C9.5 18.4847 9.84768 18.8997 10.325 18.9845C10.8022 19.0694 11.2716 18.7997 11.4387 18.3447L10.5 18ZM11.5 18C11.5 17.3915 11.6688 16.5094 12.1573 15.8102C12.6073 15.166 13.376 14.6 14.8 14.6V12.6C12.724 12.6 11.3427 13.4839 10.5177 14.6648C9.73121 15.7906 9.5 17.1085 9.5 18H11.5ZM10.5 18C11.4387 18.3447 11.4386 18.345 11.4385 18.3453C11.4384 18.3454 11.4383 18.3457 11.4383 18.3459C11.4381 18.3462 11.438 18.3466 11.4379 18.3468C11.4377 18.3474 11.4376 18.3477 11.4375 18.3479C11.4374 18.3482 11.4376 18.3478 11.438 18.3467C11.4388 18.3445 11.4408 18.3393 11.4439 18.3315C11.4501 18.3159 11.4607 18.2895 11.4761 18.2534C11.5068 18.1813 11.5561 18.0712 11.6253 17.9328C11.7641 17.6551 11.9804 17.2686 12.2845 16.8473C12.8968 15.9992 13.8319 15.0546 15.1656 14.5307L14.4344 12.6692C12.6313 13.3775 11.4164 14.6329 10.6629 15.6767C10.2841 16.2015 10.0136 16.6839 9.83627 17.0387C9.74739 17.2165 9.68126 17.3635 9.63613 17.4695C9.61355 17.5225 9.59617 17.5653 9.58378 17.5967C9.57758 17.6124 9.57263 17.6252 9.56889 17.635C9.56702 17.6399 9.56545 17.6441 9.56418 17.6475C9.56355 17.6492 9.56299 17.6507 9.56251 17.652C9.56227 17.6526 9.56204 17.6532 9.56184 17.6538C9.56174 17.6541 9.5616 17.6544 9.56155 17.6546C9.56141 17.6549 9.56128 17.6553 10.5 18Z",fill:"currentColor"})))},Tb=(0,p.forwardRef)(Ab);n.p;var Pb,Ib,Lb,Mb,Kb,Db,Nb,Vb=["title","titleId"];function zb(){return zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Hb=function(e,t){var n=e.title,r=e.titleId,o=Bb(e,Vb);return p.createElement("svg",zb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Pb||(Pb=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Ib||(Ib=p.createElement("rect",{x:7,y:7,width:10,height:10,fill:"currentColor",fillOpacity:.3})),Lb||(Lb=p.createElement("rect",{x:8,y:8,width:8,height:8,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2})),Mb||(Mb=p.createElement("rect",{x:14,y:14,width:4,height:4,rx:2,fill:"currentColor"})),Kb||(Kb=p.createElement("rect",{x:6,y:14,width:4,height:4,rx:2,fill:"currentColor"})),Db||(Db=p.createElement("rect",{x:14,y:6,width:4,height:4,rx:2,fill:"currentColor"})),Nb||(Nb=p.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})))},Fb=(0,p.forwardRef)(Hb);n.p;var Wb,$b,Ub,Zb,Gb,Yb=["title","titleId"];function Xb(){return Xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jb=function(e,t){var n=e.title,r=e.titleId,o=qb(e,Yb);return p.createElement("svg",Xb({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Wb||(Wb=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),$b||($b=p.createElement("path",{d:"M7 7H17V9L16 14L15 9H9V15L14 16L9 17H7V7Z",fill:"currentColor",fillOpacity:.3})),Ub||(Ub=p.createElement("rect",{x:6.5,y:14.5,width:3,height:3,rx:1.5,fill:"currentColor"})),Zb||(Zb=p.createElement("rect",{x:14.5,y:6.5,width:3,height:3,rx:1.5,fill:"currentColor"})),Gb||(Gb=p.createElement("rect",{x:6,y:6,width:4,height:4,rx:2,fill:"currentColor"})))},Qb=(0,p.forwardRef)(Jb);n.p;var ex,tx,nx,rx,ox,ix=["title","titleId"];function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var lx=function(e,t){var n=e.title,r=e.titleId,o=sx(e,ix);return p.createElement("svg",ax({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ex||(ex=p.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),tx||(tx=p.createElement("path",{d:"M5 5H15V7L14 12L13 7H7V13L12 14L7 15H5V5Z",fill:"currentColor",fillOpacity:.3})),nx||(nx=p.createElement("path",{d:"M4.5 14C4.5 13.1716 5.17157 12.5 6 12.5C6.82843 12.5 7.5 13.1716 7.5 14C7.5 14.8284 6.82843 15.5 6 15.5C5.17157 15.5 4.5 14.8284 4.5 14Z",fill:"currentColor"})),rx||(rx=p.createElement("path",{d:"M12.5 6C12.5 5.17157 13.1716 4.5 14 4.5C14.8284 4.5 15.5 5.17157 15.5 6C15.5 6.82843 14.8284 7.5 14 7.5C13.1716 7.5 12.5 6.82843 12.5 6Z",fill:"currentColor"})),ox||(ox=p.createElement("path",{d:"M4 6C4 4.89543 4.89543 4 6 4C7.10457 4 8 4.89543 8 6C8 7.10457 7.10457 8 6 8C4.89543 8 4 7.10457 4 6Z",fill:"currentColor"})))},cx=(0,p.forwardRef)(lx);n.p;var dx,ux,hx,gx=["title","titleId"];function mx(){return mx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fx=function(e,t){var n=e.title,r=e.titleId,o=px(e,gx);return p.createElement("svg",mx({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,dx||(dx=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),ux||(ux=p.createElement("path",{d:"M14.3478 11.2609C14.4708 10.6459 14.5323 10.3383 14.6022 10.2466C14.8023 9.98382 15.1977 9.98382 15.3978 10.2466C15.4677 10.3383 15.5292 10.6459 15.6522 11.2609V11.2609C15.7352 11.676 15.7767 11.8835 15.851 12.0636C16.0541 12.5553 16.4447 12.9459 16.9364 13.149C17.1165 13.2233 17.324 13.2648 17.7391 13.3478V13.3478C18.3541 13.4708 18.6617 13.5323 18.7534 13.6022C19.0162 13.8023 19.0162 14.1977 18.7534 14.3978C18.6617 14.4677 18.3541 14.5292 17.7391 14.6522V14.6522C17.324 14.7352 17.1165 14.7767 16.9364 14.851C16.4447 15.0541 16.0541 15.4447 15.851 15.9364C15.7767 16.1165 15.7352 16.324 15.6522 16.7391V16.7391C15.5292 17.3541 15.4677 17.6617 15.3978 17.7534C15.1977 18.0162 14.8023 18.0162 14.6022 17.7534C14.5323 17.6617 14.4708 17.3541 14.3478 16.7391V16.7391C14.2648 16.324 14.2233 16.1165 14.149 15.9364C13.9459 15.4447 13.5553 15.0541 13.0636 14.851C12.8835 14.7767 12.676 14.7352 12.2609 14.6522V14.6522C11.6459 14.5292 11.3383 14.4677 11.2466 14.3978C10.9838 14.1977 10.9838 13.8023 11.2466 13.6022C11.3383 13.5323 11.6459 13.4708 12.2609 13.3478V13.3478C12.676 13.2648 12.8835 13.2233 13.0636 13.149C13.5553 12.9459 13.9459 12.5553 14.149 12.0636C14.2233 11.8835 14.2648 11.676 14.3478 11.2609V11.2609Z",fill:"currentColor"})),hx||(hx=p.createElement("path",{d:"M8.34783 7.26087C8.47083 6.64585 8.53233 6.33834 8.60222 6.24657C8.80232 5.98382 9.19768 5.98382 9.39778 6.24657C9.46767 6.33834 9.52917 6.64585 9.65217 7.26087V7.26087C9.7352 7.67598 9.77671 7.88354 9.85103 8.06355C10.0541 8.55533 10.4447 8.94594 10.9364 9.14897C11.1165 9.22329 11.324 9.2648 11.7391 9.34783V9.34783C12.3541 9.47083 12.6617 9.53233 12.7534 9.60222C13.0162 9.80232 13.0162 10.1977 12.7534 10.3978C12.6617 10.4677 12.3541 10.5292 11.7391 10.6522V10.6522C11.324 10.7352 11.1165 10.7767 10.9364 10.851C10.4447 11.0541 10.0541 11.4447 9.85103 11.9364C9.77671 12.1165 9.7352 12.324 9.65217 12.7391V12.7391C9.52917 13.3541 9.46767 13.6617 9.39778 13.7534C9.19768 14.0162 8.80232 14.0162 8.60222 13.7534C8.53233 13.6617 8.47083 13.3541 8.34783 12.7391V12.7391C8.2648 12.324 8.22329 12.1165 8.14897 11.9364C7.94594 11.4447 7.55533 11.0541 7.06355 10.851C6.88354 10.7767 6.67598 10.7352 6.26087 10.6522V10.6522C5.64585 10.5292 5.33834 10.4677 5.24657 10.3978C4.98382 10.1977 4.98382 9.80232 5.24657 9.60222C5.33834 9.53233 5.64585 9.47083 6.26087 9.34783V9.34783C6.67598 9.2648 6.88354 9.22329 7.06355 9.14897C7.55533 8.94594 7.94594 8.55533 8.14897 8.06355C8.22329 7.88354 8.2648 7.67598 8.34783 7.26087V7.26087Z",fill:"currentColor"})))},vx=(0,p.forwardRef)(fx);n.p;var yx,bx,xx,wx=["title","titleId"];function Cx(){return Cx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var jx=function(e,t){var n=e.title,r=e.titleId,o=Sx(e,wx);return p.createElement("svg",Cx({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,yx||(yx=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),p.createElement("mask",{id:"mask0_1972_16465",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:5,y:5,width:14,height:14},bx||(bx=p.createElement("rect",{x:5,y:5,width:14,height:14,rx:7,fill:"currentColor"}))),xx||(xx=p.createElement("g",{mask:"url(#mask0_1972_16465)"},p.createElement("rect",{x:5,y:5,width:14,height:14,rx:7,fill:"currentColor",fillOpacity:.3}),p.createElement("rect",{x:6,y:6,width:12,height:12,rx:6,stroke:"currentColor",strokeOpacity:.3,strokeWidth:2}),p.createElement("path",{d:"M7 7L17 17",stroke:"currentColor",strokeWidth:2}))))},kx=(0,p.forwardRef)(jx);n.p;var Ox,Rx,Ex,_x=["title","titleId"];function Ax(){return Ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Px=function(e,t){var n=e.title,r=e.titleId,o=Tx(e,_x);return p.createElement("svg",Ax({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Ox||(Ox=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.2})),Rx||(Rx=p.createElement("rect",{x:5,y:16,width:14,height:3,rx:1.5,fill:"currentColor"})),Ex||(Ex=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.9913 5C11.0792 5 10.3398 5.73939 10.3398 6.65147V9.9544C10.3398 10.0341 10.3455 10.1125 10.3564 10.1892L10.1927 10.0288C9.60953 9.45727 8.67632 9.45727 8.09313 10.0288C7.49305 10.6169 7.49304 11.5831 8.09313 12.1712L10.6002 14.6281C11.3778 15.3902 12.6222 15.3902 13.3999 14.6281L15.907 12.1712C16.5071 11.5831 16.5071 10.6169 15.907 10.0288C15.3238 9.45727 14.3906 9.45727 13.8074 10.0288L13.6232 10.2093C13.6361 10.1262 13.6428 10.0411 13.6428 9.9544V6.65147C13.6428 5.73939 12.9034 5 11.9913 5Z",fill:"currentColor"})))},Ix=(0,p.forwardRef)(Px);n.p;var Lx,Mx,Kx,Dx=["title","titleId"];function Nx(){return Nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zx=function(e,t){var n=e.title,r=e.titleId,o=Vx(e,Dx);return p.createElement("svg",Nx({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Lx||(Lx=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Mx||(Mx=p.createElement("rect",{x:7.75732,y:6.34314,width:14,height:2,rx:1,transform:"rotate(45 7.75732 6.34314)",fill:"#DD0000"})),Kx||(Kx=p.createElement("rect",{width:14,height:2,rx:1,transform:"matrix(-0.707107 0.707107 0.707107 0.707107 16.2427 6.34314)",fill:"#DD0000"})))},Bx=(0,p.forwardRef)(zx);n.p;var Hx,Fx,Wx,$x,Ux=["title","titleId"];function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Yx=function(e,t){var n=e.title,r=e.titleId,o=Gx(e,Ux);return p.createElement("svg",Zx({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Hx||(Hx=p.createElement("rect",{x:2,y:2,width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),Fx||(Fx=p.createElement("rect",{x:5,y:10.2441,width:12.3358,height:3.52451,rx:1.76226,fill:"currentColor"})),Wx||(Wx=p.createElement("rect",{x:19.8248,y:11.8992,width:8.35319,height:3.95735,rx:1.97868,transform:"rotate(135 19.8248 11.8992)",fill:"currentColor"})),$x||($x=p.createElement("rect",{x:19.8248,y:11.8992,width:4.1766,height:7.9147,rx:2,transform:"rotate(135 19.8248 11.8992)",fill:"currentColor"})))},Xx=(0,p.forwardRef)(Yx);n.p;var qx,Jx,Qx=["title","titleId"];function ew(){return ew=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var nw=function(e,t){var n=e.title,r=e.titleId,o=tw(e,Qx);return p.createElement("svg",ew({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,qx||(qx=p.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.3})),Jx||(Jx=p.createElement("path",{d:"M9.38887 4.44399C9.58125 3.852 10.4188 3.852 10.6111 4.44399L11.5871 7.44738C11.6731 7.71212 11.9199 7.89136 12.1982 7.89137L15.3562 7.89149C15.9787 7.89152 16.2375 8.68804 15.7339 9.05393L13.1791 10.9102C12.9539 11.0739 12.8597 11.3639 12.9457 11.6286L13.9214 14.6321C14.1138 15.2241 13.4362 15.7164 12.9326 15.3505L10.3777 13.4944C10.1525 13.3308 9.84753 13.3308 9.62232 13.4944L7.06738 15.3505C6.56378 15.7164 5.88623 15.2241 6.07855 14.6321L7.05431 11.6286C7.14032 11.3639 7.04609 11.0739 6.82089 10.9102L4.2661 9.05393C3.76253 8.68803 4.02133 7.89152 4.64379 7.89149L7.80178 7.89137C8.08015 7.89136 8.32686 7.71212 8.41289 7.44738L9.38887 4.44399Z",fill:"currentColor"})))},rw=(0,p.forwardRef)(nw);n.p;var ow,iw,aw,sw,lw=["title","titleId"];function cw(){return cw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var uw=function(e,t){var n=e.title,r=e.titleId,o=dw(e,lw);return p.createElement("svg",cw({width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,ow||(ow=p.createElement("rect",{width:20,height:20,rx:4,fill:"currentColor",fillOpacity:.18})),iw||(iw=p.createElement("path",{d:"M3.5 10C3.5 6.41015 6.41015 3.5 10 3.5V3.5C13.5899 3.5 16.5 6.41015 16.5 10V10C16.5 13.5899 13.5899 16.5 10 16.5V16.5C6.41015 16.5 3.5 13.5899 3.5 10V10Z",fill:"currentColor",fillOpacity:.3})),aw||(aw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.5 10C5.5 12.4853 7.51472 14.5 10 14.5C12.4853 14.5 14.5 12.4853 14.5 10C14.5 7.51472 12.4853 5.5 10 5.5C7.51472 5.5 5.5 7.51472 5.5 10ZM10 3.5C6.41015 3.5 3.5 6.41015 3.5 10C3.5 13.5899 6.41015 16.5 10 16.5C13.5899 16.5 16.5 13.5899 16.5 10C16.5 6.41015 13.5899 3.5 10 3.5Z",fill:"currentColor",fillOpacity:.3})),sw||(sw=p.createElement("path",{d:"M12.3957 13.8101L13.8346 15.249C14.3756 14.8532 14.853 14.3757 15.2489 13.8348L13.8099 12.3959L7.60422 6.19017L6.16527 4.75122C5.62436 5.14708 5.14691 5.62452 4.75107 6.16545L6.19002 7.6044L12.3957 13.8101Z",fill:"currentColor"})))},hw=(0,p.forwardRef)(uw);n.p;var gw,mw=["title","titleId"];function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var vw=function(e,t){var n=e.title,r=e.titleId,o=fw(e,mw);return p.createElement("svg",pw({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,gw||(gw=p.createElement("path",{d:"M7.41 18.59L8.83 20L12 16.83L15.17 20L16.58 18.59L12 14L7.41 18.59ZM16.59 5.41L15.17 4L12 7.17L8.83 4L7.41 5.41L12 10L16.59 5.41Z",fill:"currentColor"})))},yw=(0,p.forwardRef)(vw);n.p;var bw,xw=["title","titleId"];function ww(){return ww=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Sw=function(e,t){var n=e.title,r=e.titleId,o=Cw(e,xw);return p.createElement("svg",ww({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,bw||(bw=p.createElement("path",{d:"M12 5.83L15.17 9L16.58 7.59L12 3L7.41 7.59L8.83 9L12 5.83ZM12 18.17L8.83 15L7.42 16.41L12 21L16.59 16.41L15.17 15L12 18.17Z",fill:"currentColor"})))},jw=(0,p.forwardRef)(Sw);n.p;var kw,Ow=["title","titleId"];function Rw(){return Rw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var _w=function(e,t){var n=e.title,r=e.titleId,o=Ew(e,Ow);return p.createElement("svg",Rw({width:8,height:12,viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,kw||(kw=p.createElement("path",{d:"M3.33341 9.99935C3.33341 10.7327 2.73341 11.3327 2.00008 11.3327C1.26675 11.3327 0.666748 10.7327 0.666748 9.99935C0.666748 9.26602 1.26675 8.66602 2.00008 8.66602C2.73341 8.66602 3.33341 9.26602 3.33341 9.99935ZM2.00008 4.66602C1.26675 4.66602 0.666748 5.26602 0.666748 5.99935C0.666748 6.73268 1.26675 7.33268 2.00008 7.33268C2.73341 7.33268 3.33341 6.73268 3.33341 5.99935C3.33341 5.26602 2.73341 4.66602 2.00008 4.66602ZM2.00008 0.666016C1.26675 0.666016 0.666748 1.26602 0.666748 1.99935C0.666748 2.73268 1.26675 3.33268 2.00008 3.33268C2.73341 3.33268 3.33341 2.73268 3.33341 1.99935C3.33341 1.26602 2.73341 0.666016 2.00008 0.666016ZM6.00008 3.33268C6.73341 3.33268 7.33341 2.73268 7.33341 1.99935C7.33341 1.26602 6.73341 0.666016 6.00008 0.666016C5.26675 0.666016 4.66675 1.26602 4.66675 1.99935C4.66675 2.73268 5.26675 3.33268 6.00008 3.33268ZM6.00008 4.66602C5.26675 4.66602 4.66675 5.26602 4.66675 5.99935C4.66675 6.73268 5.26675 7.33268 6.00008 7.33268C6.73341 7.33268 7.33341 6.73268 7.33341 5.99935C7.33341 5.26602 6.73341 4.66602 6.00008 4.66602ZM6.00008 8.66602C5.26675 8.66602 4.66675 9.26602 4.66675 9.99935C4.66675 10.7327 5.26675 11.3327 6.00008 11.3327C6.73341 11.3327 7.33341 10.7327 7.33341 9.99935C7.33341 9.26602 6.73341 8.66602 6.00008 8.66602Z",fill:"currentColor"})))},Aw=(0,p.forwardRef)(_w);n.p;var Tw,Pw=["title","titleId"];function Iw(){return Iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Mw=function(e,t){var n=e.title,r=e.titleId,o=Lw(e,Pw);return p.createElement("svg",Iw({width:21,height:20,viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Tw||(Tw=p.createElement("path",{d:"M9.5 5H11.5V7H9.5V5ZM9.5 9H11.5V15H9.5V9ZM10.5 0C4.98 0 0.5 4.48 0.5 10C0.5 15.52 4.98 20 10.5 20C16.02 20 20.5 15.52 20.5 10C20.5 4.48 16.02 0 10.5 0ZM10.5 18C6.09 18 2.5 14.41 2.5 10C2.5 5.59 6.09 2 10.5 2C14.91 2 18.5 5.59 18.5 10C18.5 14.41 14.91 18 10.5 18Z",fill:"#898098"})))},Kw=(0,p.forwardRef)(Mw);n.p;var Dw,Nw=["title","titleId"];function Vw(){return Vw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Bw=function(e,t){var n=e.title,r=e.titleId,o=zw(e,Nw);return p.createElement("svg",Vw({width:12,height:9,viewBox:"0 0 12 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Dw||(Dw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.89429 4.70846C3.52617 1.25342 8.47383 1.25342 10.1047 4.70846C10.1634 4.83291 10.2447 4.9439 10.3439 5.03509C10.4431 5.12629 10.5583 5.19589 10.6829 5.23994C10.8075 5.28399 10.9391 5.30162 11.0701 5.29182C11.2012 5.28202 11.3291 5.24499 11.4466 5.18283C11.5641 5.12067 11.669 5.03461 11.7551 4.92956C11.8412 4.82451 11.9069 4.70253 11.9485 4.57058C11.9901 4.43863 12.0068 4.2993 11.9975 4.16053C11.9883 4.02177 11.9533 3.8863 11.8946 3.76185C9.52476 -1.25395 2.47525 -1.25395 0.105411 3.76185C-0.013133 4.01319 -0.0325336 4.3041 0.0514769 4.57058C0.135487 4.83707 0.316027 5.0573 0.553379 5.18283C0.790732 5.30836 1.06545 5.3289 1.31711 5.23994C1.56877 5.15098 1.77574 4.9598 1.89429 4.70846ZM6 3.70573C5.33701 3.70573 4.70116 3.98462 4.23236 4.48106C3.76355 4.97749 3.50017 5.6508 3.50017 6.35286C3.50017 7.05493 3.76355 7.72824 4.23236 8.22467C4.70116 8.72111 5.33701 9 6 9C6.663 9 7.29884 8.72111 7.76764 8.22467C8.23645 7.72824 8.49983 7.05493 8.49983 6.35286C8.49983 5.6508 8.23645 4.97749 7.76764 4.48106C7.29884 3.98462 6.663 3.70573 6 3.70573Z",fill:"currentColor"})))},Hw=(0,p.forwardRef)(Bw);n.p;var Fw,Ww,$w,Uw,Zw,Gw,Yw=["title","titleId"];function Xw(){return Xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Jw=function(e,t){var n=e.title,r=e.titleId,o=qw(e,Yw);return p.createElement("svg",Xw({width:16,height:9,viewBox:"0 0 18 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,Fw||(Fw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.72529 0.0387335C2.25633 -0.112991 2.80981 0.194501 2.96154 0.725536C4.68524 6.7585 13.3148 6.7585 15.0385 0.725536C15.1902 0.194501 15.7437 -0.112991 16.2747 0.0387335C16.8058 0.190458 17.1133 0.743944 16.9615 1.27498C14.6852 9.24202 3.31479 9.24202 1.03849 1.27498C0.886765 0.743944 1.19426 0.190458 1.72529 0.0387335Z",fill:"currentColor"})),Ww||(Ww=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.2493 3.33963C13.8844 3.75424 13.9248 4.38612 14.3394 4.75097L15.5894 5.85097C16.004 6.21583 16.6359 6.17549 17.0007 5.76089C17.3656 5.34628 17.3252 4.7144 16.9106 4.34954L15.6606 3.24954C15.246 2.88469 14.6142 2.92502 14.2493 3.33963Z",fill:"currentColor"})),$w||($w=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.4972 8.19473C13.0032 8.44172 12.4026 8.2415 12.1556 7.74752L11.4056 6.24752C11.1586 5.75354 11.3588 5.15287 11.8528 4.90588C12.3468 4.65889 12.9474 4.85911 13.1944 5.35309L13.9444 6.85309C14.1914 7.34707 13.9912 7.94774 13.4972 8.19473Z",fill:"currentColor"})),Uw||(Uw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.00001 6.00026C9.5523 6.00026 10 6.44797 10 7.00026V8.20026C10 8.75254 9.5523 9.20026 9.00001 9.20026C8.44773 9.20026 8.00001 8.75254 8.00001 8.20026V7.00026C8.00001 6.44797 8.44773 6.00026 9.00001 6.00026Z",fill:"currentColor"})),Zw||(Zw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.14724 4.90588C6.64122 5.15287 6.84144 5.75354 6.59445 6.24752L5.84445 7.74752C5.59746 8.2415 4.99679 8.44172 4.50281 8.19473C4.00883 7.94774 3.80861 7.34707 4.0556 6.85309L4.8056 5.35309C5.05259 4.85911 5.65326 4.65889 6.14724 4.90588Z",fill:"currentColor"})),Gw||(Gw=p.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.75073 3.33963C4.11558 3.75424 4.07525 4.38612 3.66064 4.75097L2.41064 5.85097C1.99603 6.21583 1.36415 6.17549 0.999299 5.76089C0.634444 5.34628 0.674777 4.7144 1.08938 4.34954L2.33938 3.24954C2.75399 2.88469 3.38587 2.92502 3.75073 3.33963Z",fill:"currentColor"})))},Qw=(0,p.forwardRef)(Jw);n.p;var eC,tC,nC,rC,oC,iC,aC=["title","titleId"];function sC(){return sC=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var cC=function(e,t){var n=e.title,r=e.titleId,o=lC(e,aC);return p.createElement("svg",sC({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,eC||(eC=p.createElement("path",{d:"M4 2C2.9 2 2 2.89 2 4V7H4V4H7V2H4Z",fill:"currentColor"})),tC||(tC=p.createElement("path",{d:"M22 7V4C22 2.89 21.1 2 20 2H17V4H20V7H22Z",fill:"currentColor"})),nC||(nC=p.createElement("path",{d:"M2 17V20C2 21.11 2.9 22 4 22H7V20H4V17H2Z",fill:"currentColor"})),rC||(rC=p.createElement("path",{d:"M14 2H10V4H14V2Z",fill:"currentColor"})),oC||(oC=p.createElement("path",{d:"M4 10H2V14H4V10Z",fill:"currentColor"})),iC||(iC=p.createElement("path",{d:"M10 16.5C10 12.9101 12.9101 10 16.5 10C20.0899 10 23 12.9101 23 16.5C23 20.0899 20.0899 23 16.5 23H10V16.5Z",fill:"currentColor"})))},dC=(0,p.forwardRef)(cC);n.p;const uC=(e,t=!1)=>t?[...e].reverse():e,hC=({value:e,defaultValue:t,multi:n=!1,reverse:r=!1,continuous:o=!1,min:i=0,max:a=100,step:s=1,size:l=120,align:c="horizontal",resetValue:d,minIcon:u,maxIcon:h,onChange:g,onMinIconClick:m,onMaxIconClick:f})=>{var v;const y=null!=(v=null!=e?e:t)?v:n?[0,100]:0,[b,x]=((e,t)=>{const n=(0,p.useMemo)((()=>{var n;return null!=(n=null!=e?e:t)?n:""}),[e,t]),[r,o]=(0,p.useState)(n);return(0,p.useEffect)((()=>{o(n)}),[n]),[r,e=>o(e)]})(y,null!=t?t:y);let C=b;const S=n&&Array.isArray(b),j=e=>(0,w.clamp)(Math.round(e/s)*s,i,a),k=(e,t=!0,r=!1)=>{const i=n&&Array.isArray(e)?e.map(j):j(e);(C!==i||r)&&(x(i),(t||o||r)&&(null==g||g(e)),C=i)},O=(0,p.useCallback)((e=>(e-i)/(a-i)*100),[i,a]),R=(0,p.useCallback)((e=>{const t=a-i;return(0,w.clamp)(t*(e/l)+i,i,a)}),[i,a,l]),E=(0,p.useCallback)((()=>{if(!n)return f?f(b):void k(b+s)}),[s,n,b]),A=(0,p.useCallback)((()=>{if(!n)return m?m(b):void k(b-s)}),[s,n,b]),T=(0,p.useCallback)((e=>{const t=e.currentTarget.getBoundingClientRect(),o="horizontal"===c,s=o?t.width:t.height,l=o?t.left:t.top,d=o?e.clientX:e.clientY,u=(0,w.clamp)(d-l,0,s)/s;let h=(a-i)*u+i;if(r&&(h=a-h),n&&Array.isArray(b)){const e=u>.5?1:0,t=[...b];t[e]=h,k(t,!0,!1)}else k(h,!0,!1)}),[c,i,a,r,b]),P="horizontal"===c?"minWidth":"minHeight";return(0,_.jsxs)(Ze.eB,{name:"range",mod:{align:c},style:{[P]:l},children:[r?h&&(0,_.jsx)(Ze.Sl,{name:"icon",onMouseDown:E,children:h}):u&&(0,_.jsx)(Ze.Sl,{name:"icon",onMouseDown:A,children:u}),(0,_.jsxs)(Ze.Sl,{name:"body",onClick:T,children:[(0,_.jsx)(Ze.Sl,{name:"line"}),(0,_.jsx)(mC,{align:c,reverse:r,value:b,valueConvert:O}),S?uC(b,r).map(((e,t)=>{const n=r?0===t?1:0:t,o=0===n?1:0,s=e=>{const t=[],r=b[o];return t[n]=0===n?(0,w.clamp)(e,i,r):(0,w.clamp)(e,r,a),t[o]=b[o],t};return(0,_.jsx)(gC,{align:c,value:e,bodySize:l,reverse:r,resetValue:d[n],valueConvert:O,offsetConvert:R,onChangePosition:e=>k(s(e),!1),onChange:e=>k(s(e),!0,!0)},`handle-${n}`)})):(0,_.jsx)(gC,{align:c,bodySize:l,reverse:r,value:b,valueConvert:O,offsetConvert:R,resetValue:d,onChangePosition:e=>k(e,!1),onChange:e=>k(e,!0,!0)})]}),r?u&&(0,_.jsx)(Ze.Sl,{name:"icon",onMouseDown:A,children:u}):h&&(0,_.jsx)(Ze.Sl,{name:"icon",onMouseDown:E,children:h})]})},gC=({value:e,valueConvert:t,offsetConvert:n,onChangePosition:r,onChange:o,resetValue:i,align:a,bodySize:s,reverse:l=!1})=>{const c=t(e),d="horizontal"===a?l?"right":"left":l?"bottom":"top",u="horizontal"===a?"pageX":"pageY";return(0,_.jsx)(Ze.Sl,{name:"range-handle",style:{[d]:`${t(e)}%`},onMouseDownCapture:e=>{e.stopPropagation();const t=e[u];let i;const a=e=>{const o=l?t-e[u]:e[u]-t,a=(0,w.clamp)(o+c/100*s,0,s);i=n(a),requestAnimationFrame((()=>{null==r||r(i)}))},d=e=>{e.stopPropagation(),(0,w.isDefined)(i)&&(null==o||o(i)),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",a),document.addEventListener("mouseup",d)},onDoubleClick:()=>{(0,w.isDefined)(i)&&(null==o||o(i))}})},mC=({value:e,valueConvert:t,align:n,reverse:r})=>{const o={},i=Array.isArray(e);return"horizontal"===n?(i?(o.left=`${t(e[0])}%`,o.right=100-t(e[1])+"%"):(o.left=0,o.right=100-t(e)+"%"),r&&!i&&([o.left,o.right]=[o.right,o.left])):"vertical"===n&&(i?(o.top=`${t(e[0])}%`,o.bottom=100-t(e[1])+"%"):(o.top=0,o.bottom=100-t(e)+"%"),r&&!i&&([o.top,o.bottom]=[o.bottom,o.top])),(0,_.jsx)(Ze.Sl,{name:"indicator",style:o})},pC=({volume:e=.5,onVolumeChange:t})=>{const n=(0,p.useRef)(e),r={color:"#99A0AE"},o=(0,p.useMemo)((()=>e>.5?(0,_.jsx)(Du,{style:r}):e>0?(0,_.jsx)(_u,{style:r}):(0,_.jsx)(Cu,{style:r})),[e]);return(0,_.jsx)(hC,{continuous:!0,min:Cn.min,max:Cn.max,step:Cn.step,value:e,minIcon:o,onChange:e=>null==t?void 0:t(Number(e)),onMinIconClick:()=>{0===e?null==t||t(n.current):(n.current=e,null==t||t(0))}})},fC=({text:e})=>(0,_.jsxs)(Ze.eB,{name:"control-info",children:[(0,_.jsx)(Ka,{}),(0,_.jsx)(Ze.Sl,{name:"tooltip",children:e})]}),vC=({description:e,info:t,max:n,min:r,value:o,step:i=1,onChange:a})=>{const s=(0,p.useRef)(),[l,c]=(0,p.useState)();(0,p.useEffect)((()=>{d()}),[o]);const d=()=>{s.current&&(s.current.style.backgroundSize=100*(o-r)/(n-r)+"% 100%")},u=e=>{c(void 0);if(e.currentTarget.value.match(/^[0-9]*\.$/))return void c(e.currentTarget.value);const t=e.currentTarget.value.match(/^\.[0-9]*$/)?`0${e.currentTarget.value}`:e.currentTarget.value,o=Number.parseFloat(t);isNaN(o)?c(e.currentTarget.value):o>n||on||l{const[o,i]=(0,p.useState)(!1);(0,p.useEffect)((()=>{i(e<=0)}),[e]);const a=e=>{const n=Number.parseInt(e.currentTarget.value);n?n>yC?null==t||t(1):n<0?null==t||t(0):null==t||t(n/yC):null==t||t(0)},s=()=>{i(!o),null==t||t(o?1:0)},l=()=>(0,_.jsx)(Ze.Sl,{name:"mute",children:(0,_.jsx)(Ze.Sl,{name:"mute-button",onClick:s,children:o?"Unmute":"Mute"})});return(0,_.jsxs)(Ze.eB,{name:"audio-control",onClick:e=>e.stopPropagation(),children:[(0,_.jsx)(TC,{look:r?"active":void 0,onClick:n,children:o?(0,_.jsx)(Aa,{}):(0,_.jsx)(ja,{})}),r&&(0,_.jsxs)(Ze.Sl,{name:"modal",children:[(0,_.jsx)(vC,{min:0,max:yC,value:Math.round(e*yC),onChange:a,description:"Volume",info:"Increase or decrease the volume of the audio"}),l()]})]})},xC=({configModal:e,speed:t,amp:n,onSpeedChange:r,onSetModal:o,onAmpChange:i,toggleVisibility:a,layerVisibility:s})=>{const l=null!=t?t:1,[c,d]=(0,p.useState)(!0),[u,h]=(0,p.useState)(!0);(0,p.useEffect)((()=>{if(s){var e,t;const n=!0;d(null!=(e=null==s||null==s.get?void 0:s.get("timeline"))?e:n),h(null!=(t=null==s||null==s.get?void 0:s.get("waveform"))?t:n)}}),[s]);const g=()=>{d(!c),null==a||a("timeline",!c)},m=()=>{h(!u),null==a||a("waveform",!u),null==a||a("regions",!u)},f=e=>{const t=Number.parseFloat(e.currentTarget.value);isNaN(t)||r(t)},v=e=>{const t=Number.parseFloat(e.currentTarget.value);i(t)};return(0,_.jsxs)(Ze.eB,{name:"audio-config",onClick:e=>e.stopPropagation(),children:[(0,_.jsx)(TC,{look:e?"active":void 0,onClick:o,children:(0,_.jsx)(ya,{})}),e&&(0,_.jsxs)(Ze.Sl,{name:"modal",children:[(0,_.jsx)(vC,{min:.5,max:2.5,step:.1,value:l,description:"Playback speed",info:"Increase or decrease the playback speed",onChange:f}),(0,_.jsx)(vC,{min:1,max:150,step:.1,value:n,description:"Audio zoom y-axis",info:"Increase or decrease the appearance of amplitude",onChange:v}),(0,_.jsxs)(Ze.Sl,{name:"buttons",children:[(0,_.jsxs)(Ze.Sl,{name:"menu-button",onClick:g,children:[c?"Hide":"Show"," timeline"]}),(0,_.jsxs)(Ze.Sl,{name:"menu-button",onClick:m,children:[u?"Hide":"Show"," audio wave"]})]})]})]})};class wC{constructor(e,t,n,r="_"){this.input=void 0,this.maskPattern=void 0,this.proxyChar=void 0,this.numValidate=void 0,this.stringValidate=void 0,this.mask=void 0,this.validators=void 0,this.placeholder=void 0,this.regExp=void 0,this.onChange=void 0,this.input=e,this.maskPattern=t,this.proxyChar=r,this.onChange=n,this.numValidate=/^\d$/,this.stringValidate=/^[a-zA-Z]$/,this.mask=t.split("").map((e=>{let t;return"A"===e?t=this.stringValidate:"1"===e&&(t=this.numValidate),{char:e,validator:t}})),this.validators=this.mask.filter((e=>e.validator)),this.placeholder=this.mask.map((e=>e.validator?this.proxyChar:e.char)).join("");const o="\\^$*+?.()|{}[]".split(""),i=this.mask.map((e=>{const{validator:t,char:n}=e;return t?t===this.numValidate?"\\d":"[a-zA-Z]":o.includes(n)?`\\${n}`:n})).join("");this.regExp=i,e.pattern=i,e.placeholder=e.placeholder||this.placeholder,e.addEventListener("keydown",this.__inputKeydownMask.bind(this)),e.addEventListener("paste",this.__inputPaste.bind(this)),e.addEventListener("focus",this.__inputFocus.bind(this)),e.addEventListener("blur",this.__inputBlur.bind(this))}parseRaw(e){const t=(e=e||"").replace(/\W/g,"");if(t.length===this.validators.length){if(!t.split("").map(((e,t)=>!!e.match(this.validators[t].validator))).reduce(((e,t)=>!1!==t&&e)))return!1;let e=-1;return this.mask.map((n=>n.validator?(e+=1,t[e]):n.char)).join("")}}disconnect(){this.input.addEventListener("keydown",this.__inputKeydownMask.bind(this)),this.input.addEventListener("paste",this.__inputPaste.bind(this)),this.input.addEventListener("focus",this.__inputFocus.bind(this)),this.input.addEventListener("blur",this.__inputBlur.bind(this))}get value(){return this.parseRaw(this.input.value)}parsePartial(e=""){const t=(e=e||"").replace(/\W/g,"");let n=-1;return this.mask.map((e=>e.validator?(n+=1,t[n]||this.proxyChar):e.char||this.proxyChar)).join("")||this.placeholder}splice(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}__inputBlur(e){e.target.value===this.placeholder&&this.onChange("")}__inputFocus(e){e.target.value||this.onChange(this.placeholder)}__inputKeydownMask(e){const{selectionStart:t,selectionEnd:n}=e.target,r=e.key;let o=t>this.mask.length-1?this.mask.length-1:t,i=this.mask[o];if(!["Tab","Enter","Escape","ArrowLeft","ArrowRight","Shift"].includes(r)&&!e.metaKey)if(t===n){e.preventDefault();let n=null;if("Backspace"===r?n=1:"Delete"===r&&(n=0),null!==n){const r=this.mask[t-n];if(r){const o=r.validator?this.proxyChar:r.char;this.onChange(this.splice(e.target.value,t-n,o)),e.target.setSelectionRange(t-n,t-n)}return}for(;i&&!i.validator&&r!==i.char;)this.onChange(this.splice(e.target.value,o,i.char)),e.target.setSelectionRange(o+1,o+1),i=this.mask[o+1],o+=1;if(i&&i.validator){if(!!!r.match(i.validator))return e.preventDefault(),!1}this.onChange(this.splice(e.target.value,o,r)),setTimeout((e=>e.setSelectionRange(o+1,o+1)),0,e.target)}else setTimeout((()=>{let o=e.target.value;const i="Backspace"===r||"Delete"===r?this.proxyChar:r,a="Backspace"===r||"Delete"===r?t:t+1;for(let e=t;e{this.onChange(n)}))}}const CC=(0,p.forwardRef)((({text:e,children:t,required:n,placement:r,description:o,size:i,large:a,style:s,simple:l,flat:c},d)=>{const u=l?"div":"label",h={size:i,large:a,flat:c,placement:r,withDescription:!!o,empty:!t};return(0,_.jsxs)(Ze.eB,{ref:d,name:"field-label",mod:h,tag:u,style:s,"data-required":n,children:[(0,_.jsx)(Ze.Sl,{name:"text",children:(0,_.jsxs)(Ze.Sl,{name:"content",children:[e,o&&(0,_.jsx)(Ze.Sl,{name:"description",children:o})]})}),(0,_.jsx)(Ze.Sl,{name:"field",children:t})]})})),SC=CC,jC=["sidepanel","value","readonly","onChange","label"],kC=e=>{let{sidepanel:t=!1,value:n,readonly:r=!1,onChange:o,label:i}=e,a=(0,Yn.A)(e,jC);const s=p.createRef(),[l,c]=(0,p.useState)(n);(0,p.useEffect)((()=>{s.current&&new wC(s.current,"11:11:11:111",(e=>{c(e)}))}),[]),(0,p.useEffect)((()=>{c(d(n||0,!0))}),[n]);const d=(0,p.useCallback)(((e,t=!1)=>{const n=new Date(1e3*e).toISOString();let r=e>3600?n.substr(11,8):`00:${n.substr(14,5)}`;if(t){const e="00"!==n.substr(11,2);r=n.substr(e?11:14,e?12:9).replace(".",":"),r=e?r:`00:${r}`}return r}),[]),u=e=>{const t=e.currentTarget.value.split(":");t[0]=1===t[0].toString().length?`0${t[0].toString()}`:`${t[0]}`,(e=>{const t=e.split(":").reverse();let n=0;if(e.indexOf("_")>=0)return;const r=[e=>e/1e3,e=>e,e=>60*e,e=>60*e*60];t.forEach(((e,t)=>{n+=r[t](Number.parseFloat(e))})),o(n)})(t.join(":")),c(d(n||0,!0))},h=e=>{var t;"Enter"===e.key&&(null==(t=e.currentTarget)||null==t.blur||t.blur())},g=(0,_.jsx)(Ze.eB,Object.assign({name:"time-box",mod:{sidepanel:t}},a,{children:(0,_.jsx)(Ze.Sl,{name:"input-time",maxLength:12,tag:"input",ref:s,type:"text",readOnly:r,value:l,onKeyDown:h,onChange:()=>{},onBlur:u})}));return i?(0,_.jsx)(SC,{size:"small",flat:!0,text:i,children:g}):g},OC=({isSidepanel:e=!1,startTime:t,endTime:n=0,minTime:r,maxTime:o=0,currentTime:i,startTimeReadonly:a=!1,endTimeReadonly:s=!1,onChangeStartTime:l,onChangeEndTime:c,showDuration:d=!1,showLabels:u=!1})=>{const h=i||t;return(0,_.jsxs)(Ze.eB,{name:"timer-duration-control",children:[(0,_.jsx)(kC,{sidepanel:e,readonly:a,value:h,onChange:e=>{e>=r&&e<=o&&e<=n&&(null==l||l(e))},label:u?"Start":void 0,"data-testid":"timebox-current-time"}),(0,_.jsx)(kC,{sidepanel:e,readonly:s,value:n,onChange:e=>{e>=r&&e<=o&&e>=h&&(null==c||c(e))},"data-testid":"timebox-end-time",label:u?"End":void 0}),d&&(0,_.jsx)(kC,{sidepanel:e,readonly:!0,value:n-t,onChange:()=>{},"data-testid":"timebox-duration-time",label:u?"Duration":void 0})]})},RC=["length","position","frameRate","playing","collapsed","duration","extraControls","fullscreen","altHopSize","disableFrames","allowFullscreen","allowViewCollapse","onRewind","onForward","onPlay","onPause","onFullScreenToggle","onStepBackward","onPositionChange","onStepForward","onSpeedChange","onToggleCollapsed","formatPosition","toggleVisibility","layerVisibility","mediaType"],EC=["children"],_C=({time:e,fps:t})=>{const n=Math.round(t).toString(),r=1e3/t,o=1e3*e%1e3;return Math.round(o/r).toString().padStart(n.length,"0")},AC=(0,p.memo)((e=>{let{length:t=1e3,position:n,frameRate:r=1024,playing:o,collapsed:i,duration:a,extraControls:l,fullscreen:c,altHopSize:d,disableFrames:u,allowFullscreen:h,allowViewCollapse:g,onRewind:m,onForward:f,onPlay:v,onPause:y,onFullScreenToggle:b,onStepBackward:x,onPositionChange:C,onStepForward:S,onSpeedChange:j,onToggleCollapsed:k,formatPosition:R,toggleVisibility:E,layerVisibility:A,mediaType:T}=e,P=(0,Yn.A)(e,RC);const{settings:I}=(0,p.useContext)(Ar),[L,M]=(0,p.useState)(!1),[K,D]=(0,p.useState)(!1),[N,V]=(0,p.useState)(!1),[z,B]=[1===n,n===t],H=(0,p.useMemo)((()=>Math.max((t-1)/r,0)),[t,r]),F=(0,p.useMemo)((()=>(n-1)/r),[n,r]),W=MC(P.customControls),$=(e,t)=>n=>{e(n,null!=t?t:void 0)},U=(0,p.useCallback)((()=>{o?null==y||y():null==v||v()}),[o,v,y]),Z=e=>{e.stopPropagation(),K&&D(!1),V(!N)},G=e=>{e.stopPropagation(),N&&V(!1),D(!K)},Y=()=>{D(!1),V(!1)};(0,p.useEffect)((()=>{const e=e=>{if(null==I||!I.stepSize)return;const t="Shift"===e.key;"keydown"===e.type&&t&&!L?M(!0):"keyup"===e.type&&t&&L&&M(!1)};return document.addEventListener("keydown",e),document.addEventListener("keyup",e),document.addEventListener("click",Y),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",e),document.removeEventListener("click",Y)}}),[L]);return(0,_.jsxs)(Ze.eB,{name:"timeline-controls",tag:Fa,spread:!0,style:{gridAutoColumns:"auto"},children:[(0,O.VS)(O.vS)&&"audio"===T?(0,_.jsxs)(Ze.Sl,{name:"group",tag:Fa,size:"small",style:{gridAutoColumns:"auto"},children:[(0,_.jsx)(xC,{onSetModal:G,onAmpChange:P.onAmpChange,configModal:K,onSpeedChange:e=>null==j?void 0:j(e),speed:P.speed||0,amp:P.amp||0,toggleVisibility:E,layerVisibility:A}),(0,_.jsx)(bC,{volume:P.volume||0,onVolumeChange:P.onVolumeChange,onSetModal:Z,audioModal:N})]}):(0,_.jsxs)(Ze.Sl,{name:"group",tag:Fa,size:"small",style:{gridAutoColumns:"auto"},children:[P.controls&&Object.entries(P.controls).map((([e,r])=>{if(!1===r)return;const o=s[e];return(0,w.isDefined)(o)&&(0,_.jsx)(o,{length:t,position:n-1,volume:P.volume,onPositionChange:C,onVolumeChange:P.onVolumeChange},e)})),null==W?void 0:W.left]}),(0,_.jsxs)(Ze.Sl,{name:"main-controls",children:[(0,_.jsx)(Ze.Sl,{name:"group",tag:Fa,collapsed:!0,children:l}),(0,_.jsxs)(Ze.Sl,{name:"group",tag:Fa,collapsed:!0,children:[null==W?void 0:W.leftCenter,(0,_.jsx)(LC,{showAlterantive:L&&!u,main:(0,_.jsxs)(_.Fragment,{children:[(null==I?void 0:I.stepSize)&&!u&&(0,_.jsx)(TC,{onClick:$(x,I.stepSize),hotkey:null==I?void 0:I.stepAltBack,disabled:z,children:(0,_.jsx)(ia,{})}),(0,_.jsx)(TC,{onClick:$(x),hotkey:null==I?void 0:I.stepBackHotkey,disabled:z,children:(0,_.jsx)(Dr,{})})]}),alt:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(TC,{onClick:()=>null==m?void 0:m(),disabled:z,hotkey:null==I?void 0:I.skipToBeginning,children:(0,_.jsx)(ai,{})}),(0,_.jsx)(TC,{onClick:()=>null==m?void 0:m(d),disabled:z,hotkey:null==I?void 0:I.hopBackward,children:(0,_.jsx)(ro,{})})]})}),(0,_.jsx)(TC,{"data-testid":"playback-button:"+(o?"pause":"play"),onClick:U,hotkey:null==I?void 0:I.playpauseHotkey,children:o?(0,_.jsx)(Qo,{}):(0,_.jsx)(Uo,{})}),(0,_.jsx)(LC,{showAlterantive:L&&!u,main:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(TC,{onClick:$(S),hotkey:null==I?void 0:I.stepForwardHotkey,disabled:B,children:(0,_.jsx)(Fr,{})}),(null==I?void 0:I.stepSize)&&!u&&(0,_.jsx)(TC,{disabled:B,onClick:$(S,I.stepSize),hotkey:null==I?void 0:I.stepAltForward,children:(0,_.jsx)(ha,{})})]}),alt:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(TC,{onClick:()=>null==f?void 0:f(d),disabled:B,hotkey:null==I?void 0:I.hopForward,children:(0,_.jsx)(Xr,{})}),(0,_.jsx)(TC,{onClick:()=>null==f?void 0:f(),disabled:B,hotkey:null==I?void 0:I.skipToEnd,children:(0,_.jsx)(uo,{})})]})}),null==W?void 0:W.rightCenter]}),(0,_.jsxs)(Ze.Sl,{name:"group",tag:Fa,collapsed:!0,children:[!u&&g&&(0,_.jsx)(TC,{tooltip:"Toggle Timeline",onClick:()=>null==k?void 0:k(!i),children:i?(0,_.jsx)(Ji,{}):(0,_.jsx)(Wi,{})}),h&&(0,_.jsx)(TC,{tooltip:"Fullscreen",onClick:()=>null==b?void 0:b(!1),children:c?(0,_.jsx)(ji,{}):(0,_.jsx)(pi,{})})]})]}),(0,_.jsx)(Ze.Sl,{name:"group",tag:Fa,size:"small",children:(0,O.VS)(O.vS)&&"audio"===T?(0,_.jsxs)(_.Fragment,{children:[null==W?void 0:W.right,(0,_.jsx)(OC,{startTime:0,endTime:a,minTime:0,maxTime:a,endTimeReadonly:!0,currentTime:n,onChangeStartTime:e=>{C(e)}})]}):(0,_.jsxs)(_.Fragment,{children:[null==W?void 0:W.right,(0,_.jsx)(PC,{currentTime:F,duration:H,length:t,position:n,framerate:r,formatPosition:R})]})})]})})),TC=e=>{let{children:t}=e,n=(0,Yn.A)(e,EC);return(0,_.jsx)(za,Object.assign({},n,{type:"text",style:{width:36,height:36,padding:0},children:t}))},PC=({currentTime:e,position:t,duration:n,framerate:r,length:o,formatPosition:i})=>{const a=null!=i?i:_C,s={position:t-1,fps:r,length:o},l=a(Object.assign({time:e},s)),c=a(Object.assign({time:n},s));return(0,_.jsxs)(Ze.Sl,{name:"time",children:[(0,_.jsx)(Ze.Sl,{name:"time-section",children:(0,_.jsx)(IC,{time:e,position:l})}),(0,_.jsx)(Ze.Sl,{name:"time-section",children:(0,_.jsx)(IC,{time:Math.max(n,0),position:c})})]})},IC=({time:e,position:t})=>{const n=new Date(1e3*e).toISOString(),r=e>3600?n.substr(11,8):n.substr(14,5);return(0,_.jsxs)(_.Fragment,{children:[r,t?(0,_.jsx)("span",{children:t}):null]})},LC=e=>e.hidden?null:e.showAlterantive?e.alt:e.main,MC=e=>{if(!e)return null;return null==e?void 0:e.reduce(((e,t)=>{var n;const r=null!=(n=e[t.position])?n:[],o=t.component instanceof Function?t.component():t.component;return r.push(o),e[t.position]=r,e}),{})};var KC=n(45250);const DC=["position","length","seekOffset","seekVisible","onIndicatorMove","onSeek","minimap","step"],NC=e=>{var t;let{position:n,length:r,seekOffset:o,seekVisible:i,onIndicatorMove:a,onSeek:s,minimap:l,step:c}=e;const d=(null!=(t=(0,Yn.A)(e,DC).leftOffset)?t:150)/c,u=(0,p.useRef)(),h=(0,p.useRef)(),g=(0,p.useRef)(),m=i>0,f=(Math.ceil(i)-Math.floor(d)+1.5)/r*100+"%",v=r-(i-d),y=Math.min(o,v)/r*100+"%",b=n/r*100,x=(0,p.useCallback)((e=>{const t=g.current,n=u.current.getBoundingClientRect(),o=t.clientWidth,i=e.pageX,s=i-n.left-o/2,l=n.width,c=l-o,d=(0,KC.clamp)(Math.ceil(r*(s/l)),0,c);null==a||a(d);const h=e=>{const t=(0,KC.clamp)(s+(e.pageX-i),0,c)/l;null==a||a(Math.ceil(r*t))},m=()=>{document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",m)};document.addEventListener("mousemove",h),document.addEventListener("mouseup",m)}),[r]),w=(0,p.useCallback)((e=>{const t=h.current,n=u.current.getBoundingClientRect(),o=t.clientWidth,i=e.pageX,a=i-n.left-o/2,l=n.width,c=e=>{const n=l-t.clientWidth,o=(0,KC.clamp)(a+(e.pageX-i),0,n)/l,c=Math.ceil(r*o);null==s||s(c)};c(e);const d=e=>{c(e)},g=()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",d),document.addEventListener("mouseup",g)}),[r]),C=(0,p.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),e.target===g.current?x(e):w(e)}),[x,w]);return(0,_.jsxs)(Ze.eB,{name:"seeker",ref:u,onMouseDown:C,children:[(0,_.jsx)(Ze.Sl,{name:"track"}),m&&(0,_.jsx)(Ze.Sl,{name:"indicator",ref:g,style:{left:y,width:f}}),(0,_.jsx)(Ze.Sl,{name:"position",ref:h,style:{left:`${b}%`}}),(0,_.jsx)(Ze.Sl,{name:"minimap",children:l})]})},VC=(e,t)=>{if(0===e.length)return[];const n=[],r=e[0].frame-1;for(let o=0,i=e.length;o{const{step:i,seekOffset:a,visibleWidth:s,length:l}=(0,p.useContext)(Ar),{label:c,color:d,visible:u,sequence:h,selected:g,timeline:m}=t,f=(0,p.useMemo)((()=>Math.round(s/2)),[s]),v=(0,p.useMemo)((()=>(0,w.clamp)(a-f,0,l)),[a,f,l]),y=(0,p.useMemo)((()=>(0,w.clamp)(a+s+f,0,l)),[a,s,f,l]),b=h[0],x=b?b.frame-1:0,C=b?x*i:n,S=(0,p.useMemo)((()=>({"--offset":`${n}px`,"--color":d,"--point-color":pt()(d).alpha(1).css(),"--lifespan-color":pt()(d).alpha(u?.4:1).css()})),[n,d,u]),j=(0,p.useMemo)((()=>r?VC(h,i).map((e=>(e.points=e.points.filter((({frame:e})=>e>=v&&e<=y)),e))):[]),[h,x,i,r,v,y]),k=(0,p.useCallback)(((e,n)=>{e.stopPropagation(),null==o||o(e,t.id,n)}),[t.id,o]);return(0,_.jsxs)(Ze.eB,{name:"keypoints",style:S,mod:{selected:g,timeline:m},"data-id":t.id,children:[(0,_.jsxs)(Ze.Sl,{name:"label",onClick:k,children:[(0,_.jsx)(Ze.Sl,{name:"name",children:c}),(0,_.jsx)(Ze.Sl,{name:"data",children:(0,_.jsx)(Ze.Sl,{name:"data-item",mod:{faded:!0},children:e})})]}),(0,_.jsx)(Ze.Sl,{name:"keypoints",onClick:e=>k(e,!0),children:(0,_.jsx)(HC,{lifespans:j,step:i,visible:u,offset:C})})]})},HC=({lifespans:e,step:t,offset:n,visible:r})=>(0,_.jsx)(_.Fragment,{children:e.map(((o,i)=>{const a=i+1===e.length,{points:s}=o,l=(0,Yn.A)(o,zC);return(0,_.jsx)(FC,Object.assign({mainOffset:n,step:t,isLast:a,visible:r,points:s.map((({frame:e})=>e))},l),`${i}-${s.length}-${a}-${r}`)}))}),FC=(0,p.memo)((({mainOffset:e,width:t,start:n,step:r,offset:o,enabled:i,visible:a,isLast:s,points:l})=>{const c=e+o+r/2,d=s&&i?0:"auto",u=s&&i?"auto":t,h=(0,p.useMemo)((()=>({left:c,width:u,right:d})),[c,d,u]);return(0,_.jsx)(Ze.Sl,{name:"lifespan",mod:{hidden:!a},style:h,children:l.map(((e,t)=>{const o=(e-n)*r;return(0,_.jsx)(Ze.Sl,{name:"point",style:{left:o}},t)}))})})),WC=["offset","position","length","step","regions","onScroll","onPositionChange","onResize","onSelectRegion"],$C=(e,t)=>Math.floor(e/t),UC=(e,t)=>$C(e,t)*t,ZC=({regions:e,startOffset:t,scrollTop:n,disabled:r,onSelectRegion:o})=>{const i=(0,p.useMemo)((()=>{const t=(0,KC.clamp)(Math.ceil(n/24)-1,0,e.length),r=(0,KC.clamp)(t+(Math.ceil(6.875)-1),0,e.length);return[(0,KC.clamp)(t-5,0,e.length),(0,KC.clamp)(r+5,0,e.length)]}),[n,e.length]);return(0,_.jsx)(Ze.Sl,{name:"keypoints",style:{height:24*e.length},children:e.map(((e,n)=>e.sequence.length>0||e.timeline?(0,_.jsx)(BC,{idx:e.index,region:e,startOffset:t,onSelectRegion:r?void 0:o,renderable:i[0]<=n&&n<=i[1]},e.id):null))})},GC={View:e=>{var t;let{offset:n=0,position:r=1,length:o=1024,step:i,regions:a,onScroll:s,onPositionChange:l,onResize:c,onSelectRegion:d}=e,u=(0,Yn.A)(e,WC);const h=null!=(t=u.leftOffset)?t:150,g=(0,p.useRef)(),m=(0,p.useRef)(0),f=(0,p.useRef)(r),[v,y]=(0,p.useState)(!0),[b,x]=(0,p.useState)(null),[C,S]=(0,p.useState)(n),j=(0,p.useRef)(C),[k,O]=(0,p.useState)(0),[R,E]=(0,p.useState)(!1);j.current=C;const A=(0,p.useMemo)((()=>o*i),[o,i]),T=(0,p.useMemo)((()=>{var e,t;return $C(UC((null!=(e=null==(t=g.current)?void 0:t.clientWidth)?e:0)-h,i),i)}),[g.current,i,h]),P=_r({onPositionChange:l}),I=(0,p.useMemo)((()=>[`repeating-linear-gradient(90deg, #fff 1px, #fff ${i-1}px, rgba(255,255,255,0) ${i-1}px, rgba(255,255,255,0) ${i+1}px)`,"linear-gradient(0deg, #FAFAFA, rgba(255,255,255,0) 50%)"].join(", ")),[i]),L=(0,p.useCallback)((({left:e,top:t})=>{if(o&&(x(null),(0,w.isDefined)(t)&&k!==t&&O(t),(0,w.isDefined)(e)&&C!==e)){S(e);const t=$C(UC(e,i),i);null==s||s((0,KC.clamp)(t,1,o))}}),[C,k,i,o]),M=(0,p.useCallback)((e=>{const t=$C(UC(e,i),i);null==P.onPositionChange||P.onPositionChange((0,KC.clamp)(t+1,1,o))}),[i,o,r]),K=(0,p.useCallback)((e=>{const t=g.current;if(Math.abs(e.deltaX)>Math.abs(e.deltaY)){const n=t.scrollWidth-t.clientWidth,r=(0,KC.clamp)(C+1.25*e.deltaX,0,n);L({left:r})}else{const n=t.scrollHeight-t.clientHeight,r=(0,KC.clamp)(k+1.25*e.deltaY,0,n);L({top:r})}}),[g,C,k,L]),D=(0,p.useMemo)((()=>UC(C,i)),[C,i,o]),N=(0,p.useMemo)((()=>k),[k]),V=(0,p.useCallback)((e=>{y(!1);const t=e.target,n=t.offsetLeft+D,r=e.pageX,o=g.current.scrollWidth-t.clientWidth;let a=0;const s=e=>{const t=UC(e.pageX-r,i),s=(0,KC.clamp)(n+t,0,o);s!==a&&(a=s,M(s))},l=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",l),y(!0)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",l)}),[D,M,i]),z=(0,p.useCallback)((e=>{if(g.current){const t=e.pageX-g.current.getBoundingClientRect().left-h;x(t>0?t:null)}}),[D,i]),B=(0,p.useCallback)((()=>{b&&(M(b+D),x(null))}),[b,D,i,M]),H=(0,p.useMemo)((()=>{const e=(0,KC.clamp)(r,0,o)*i;return UC(e-D,i)+h}),[r,D,i,o]),F=(0,p.useCallback)((e=>{var t;const n=g.current.getBoundingClientRect(),r=n.left,o=n.width-h,a=e.target.closest("[data-id]"),s=e.pageX-r>h&&(!a||"new"===(null==(t=a.dataset)?void 0:t.id));let l;const c=e=>e.pageX-r-h+D,d=c(e),m=$C(d,i)+1;M(d),s&&(l=null==u.onStartDrawing?void 0:u.onStartDrawing(m));const p=e=>{const t=c(e),n=$C(t,i)+1;if(t>=0&&t<=o&&(y(!1),E(!0),M(t)),l){const[e,t]=n>m?[m,n]:[n,m];l.setRanges([e,t])}},f=()=>{y(!0),E(!1),null==u.onFinishDrawing||u.onFinishDrawing(),document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",f)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",f)}),[D,M]);(0,p.useEffect)((()=>{g.current&&(g.current.scrollLeft=D,g.current.scrollTop=N)}),[D,N]),(0,p.useEffect)((()=>{const e=g.current,t=t=>{const n=e.scrollTop,r=e.scrollHeight-e.clientHeight,o=Math.abs(t.deltaX)>Math.abs(t.deltaY),{deltaY:i}=t;!o&&(0===n&&i<0||n===r&&i>0)||t.preventDefault()};return e.addEventListener("wheel",t),()=>e.removeEventListener("wheel",t)}),[]),(0,p.useEffect)((()=>{null==c||c($C(g.current.clientWidth,i))}),[A,i]),(0,p.useEffect)((()=>{const e=g.current;if((0,w.isDefined)(e)){const t=(0,KC.clamp)(n*i,0,e.scrollWidth-e.clientWidth);m.current=UC(t,i),S(t)}}),[n,i]),(0,p.useEffect)((()=>{const e=g.current;if(!(0,w.isDefined)(e)||T<1)return;const t=$C(UC(j.current,i),i)+1,n=t+T-1,o=Math.abs(r-f.current);if(f.current=r,1===o&&(rn)){if(rn){const t=(0,KC.clamp)(n*i,0,e.scrollWidth-e.clientWidth);m.current=UC(t,i),L({left:t})}return}const a=UC(r-1,T),s=(r-1)*i-m.current;(s>(T-1)*i||s<0)&&(L({left:a*i}),m.current=a*i)}),[r,T,i]);const W={"--view-height":u.height?`${u.height}px`:null,"--frame-size":`${i}px`,"--view-size":`${A}px`,"--offset":`${h}px`};return(0,_.jsxs)(Ze.eB,{name:"timeline-frames",style:W,children:[(0,_.jsxs)(Ze.Sl,{name:"controls",children:[(0,_.jsx)(Ze.Sl,{name:"indicator",onMouseDown:V,style:{left:(0,KC.clamp)(H-i,h-i,A)}}),(0,w.isDefined)(b)&&v&&(0,_.jsx)(Ze.Sl,{name:"hover",style:{left:UC(b,i),marginLeft:h},"data-frame":$C(D+b,i)+1})]}),(0,_.jsx)(Ze.Sl,{name:"labels-bg",style:{width:h}}),(0,_.jsx)(Ze.Sl,{name:"scroll",ref:g,onWheel:K,onMouseMove:z,onMouseLeave:()=>x(null),onClickCapture:B,onMouseDown:F,children:(0,_.jsx)(Ze.Sl,{name:"filler",children:(0,_.jsx)(ZC,{regions:a,scrollTop:N,startOffset:h,onSelectRegion:d,disabled:R})})}),(0,_.jsx)(Ze.Sl,{name:"background",style:{backgroundImage:I}})]})},Minimap:()=>{const{regions:e,length:t}=(0,p.useContext)(Ar),n=(0,p.useRef)(),[r,o]=(0,p.useState)(0),i=(0,p.useMemo)((()=>e.map((({id:e,color:t,sequence:n})=>({id:e,color:t,lifespans:VC(n,r)})))),[r,e]);return(0,p.useEffect)((()=>{(0,w.isDefined)(n.current)&&t>0&&o(n.current.clientWidth/t)}),[t]),(0,_.jsx)(Ze.eB,{ref:n,name:"minimap",children:i.slice(0,5).map((({id:e,color:t,lifespans:n})=>(0,_.jsx)(Ze.Sl,{name:"region",style:{"--color":t},children:n.map(((t,o)=>{const i=o+1===n.length,a=t.start*r,s=i&&t.enabled?"100%":t.width;return(0,_.jsx)(Ze.Sl,{name:"connection",style:{left:a,width:s}},`${e}${o}`)}))},e)))})},Controls:({onAction:e})=>{const{position:t,regions:n}=(0,p.useContext)(Ar),r=n.some((({selected:e,timeline:t})=>e&&!t)),o=(0,p.useMemo)((()=>{const e=n.find((e=>e.selected&&!e.timeline));return null==e?void 0:e.sequence.filter((({frame:e})=>e<=t)).slice(-1)[0]}),[n,t]),i=(null==o?void 0:o.frame)!==t,a=!1===(null==o?void 0:o.enabled),s=(0,p.useCallback)((n=>{i?null==e||e(n,"keypoint_add",{frame:t}):null==e||e(n,"keypoint_remove",{frame:o.frame})}),[e,i,t,null==o?void 0:o.frame]),l=(0,p.useCallback)((t=>{a?null==e||e(t,"lifespan_add",{frame:o.frame}):null==e||e(t,"lifespan_remove",{frame:o.frame})}),[e,a,null==o?void 0:o.frame]),c=(0,p.useMemo)((()=>i?(0,_.jsx)(Lo,{}):(0,_.jsx)(zo,{})),[i,o]),d=(0,p.useMemo)((()=>a?(0,_.jsx)(xo,{}):(0,_.jsx)(Eo,{})),[o,a]);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(TC,{onClick:s,disabled:!r,tooltip:"Toggle Keypoint",children:c}),(0,_.jsx)(TC,{onClick:l,disabled:!o,tooltip:"Toggle Interpolation",children:d})]})},settings:{stepSize:(e,t,n,r)=>((e,t,n)=>{const r=t.find((e=>e.selected));let o;return o=r?r.sequence.map((({frame:e})=>e)):Array.from(t.reduce(((e,{sequence:t})=>{const n=t.map((({frame:e})=>e));return new Set([...e,...n])}),new Set)).sort(((e,t)=>e-t)),((e,t,n)=>{var r;const o=e.filter((e=>-1===n?et));return null!=(r=o[-1===n?o.length-1:0])?r:t})(o,e,n)})(t,n,r),fastTravelSize:()=>10,playpauseHotkey:"media:playpause",stepBackHotkey:"media:step-backward",stepForwardHotkey:"media:step-forward",stepAltBack:"video:keyframe-backward",stepAltForward:"video:keyframe-forward",leftOffset:150,skipToBeginning:"video:rewind",skipToEnd:"video:fastforward",hopBackward:"video:hop-backward",hopForward:"video:hop-forward"}},YC=GC;var XC=n(35775),qC=n(41128);const JC=(e,t)=>{const n=t>=250?14:e>=3600?11:14,r=t>=250?23:19;return new Date(1e3*e).toISOString().substring(n,r)},QC=e=>{let t=1;return t=e>=2500?.01:e>=1e3?.025:e>=250?.1:e>=100?.25:e>=25?1:5*e>=25?5:15*e>=25?15:60*Math.ceil(.5/e),t},eS=e=>Math.floor(10/QC(e));var tS=n(25345);const nS=({containter:e,timelineContainer:t,regions:n,speed:r,data:o,params:i,onLoaded:a,onSeek:s,onPlay:l,onPause:c,onPlayFinished:d,onAddRegion:u,onReady:h,onScroll:g,onZoom:m})=>{const f=(0,p.useRef)();return(0,p.useEffect)((()=>{var p,v;const y=e.current,b=Bn().create(Object.assign({autoCenter:!0,scrollParent:!0},i,{barHeight:1,container:y,height:Number(null!=(p=null==e||null==(v=e.current)||null==(v=v.parentElement)?void 0:v.offsetHeight)?p:146),hideScrollbar:!0,maxCanvasWidth:8e3,waveColor:"#D5D5D5",progressColor:"#656F83",cursorWidth:0,backend:"MediaElement",loopSelection:!0,audioRate:r,pixelRatio:1,minPxPerSec:xn.default,plugins:[XC.A.create({slop:5,deferInit:!0,dragSelection:!0}),qC.A.create({deferInit:!0,container:t.current,formatTimeCallback:JC,timeInterval:QC,secondaryLabelInterval:eS,primaryColor:"rgba(0,0,0,0.1)",secondaryColor:"rgba(0,0,0,0.1)",primaryFontColor:"rgba(0,0,0,0.4)",secondaryFontColor:"#000",labelPadding:5,unlabeledNotchColor:"#ccc",notchPercentHeight:50}),tS.A.create({wrapper:t.current,color:"#000",showTime:!0,followCursorY:"true",opacity:"1",padding:"20px"})]}));Object.assign(window,{wsi:b}),b.setCurrentTime=e=>{const t=b.getDuration();isNaN(t)||e===b.getCurrentTime()||(e=(0,w.clamp)(e,0,t),b.seekTo(e/b.getDuration()))};const x=()=>{Object.values(b.regions.list).filter((e=>!(0,w.isDefined)(e._region))).forEach((e=>e.remove()))};b.on("ready",(()=>{a(!1),b.initPlugin("regions"),b.initPlugin("timeline"),n&&(b.on("region-mouseenter",(e=>{var t;null==(t=e._region)||t.onMouseOver()})),b.on("region-mouseleave",(e=>{var t;null==(t=e._region)||t.onMouseLeave()})),b.on("region-created",(e=>{var t;const n=null==(t=o.annotation)?void 0:t.history;null==n||n.setSkipNextUndoState();const r=null==u?void 0:u(e);if(!r)return x(),void e.on("update-end",(()=>{const t=b.addRegion({start:e.start,end:e.end,resize:!1});t.on("click",(()=>t.remove()));const n=()=>{b.setCurrentTime(e.start),t.play()};t.on("out",(()=>{b.setCurrentTime(e.end),n()})),n()}));e._region=r,e.color=r.selectedregionbg,e.on("click",(e=>{r.onClick(b,e)})),e.on("dblclick",(t=>{t.preventDefault(),t.stopPropagation(),setTimeout((()=>{e.playLoop()}),0)})),e.on("update-end",(()=>{r.onUpdateEnd(b)}))}))),null==h||h({duration:b.getDuration(),surfer:b})})),b.setPlaybackRate(r),b.zoom(xn.default),b.on("scroll",(e=>g(e.target.scrollLeft))),b.on("play",(()=>{const e=b.getCurrentTime();s(1e3*e),null==l||l()})),b.on("pause",(()=>null==c?void 0:c())),b.on("finish",(()=>{null==d||d()})),b.on("zoom",(e=>null==m?void 0:m(e))),b.on("seek",(()=>{const e=b.getCurrentTime();s(1e3*e)})),o._value&&b.load(o._value),f.current=b;const C=()=>{x()};return y.addEventListener("click",C),()=>{y.removeEventListener("click",C);try{Object.entries(b.getActivePlugins()).forEach((([e,t])=>{t&&b.destroyPlugin(e)})),b.destroy()}catch(e){console.error("Error:",e)}}}),[]),f},rS={frames:YC,wave:{View:({position:e,length:t,regions:n,volume:r=1,zoom:o=xn.default,speed:i=wn.default,onReady:a,onPositionChange:s,onSeek:l,onAddRegion:c,onZoom:d,onPlay:u,onPause:h,onSpeedChange:g})=>{const{data:m}=(0,p.useContext)(Ar),f=(0,p.useRef)(null),v=(0,p.useRef)(),y=(0,p.useRef)(),b=(0,p.useRef)(),x=(0,p.useRef)(),[C,S]=(0,p.useState)(o),[j,k]=(0,p.useState)(!0),[O,R]=(0,p.useState)(0),[E,A]=(0,p.useState)(0),[T,P]=(0,p.useState)(Number.parseInt(m.defaultscale,10)||1),I=(0,p.useRef)({zoom:C,scroll:O}),L=(0,p.useRef)(!1),M=(0,p.useCallback)((e=>{const t=(0,w.clamp)(e,xn.min,xn.max);I.current.zoom=t,S(t)}),[]),K=(0,p.useCallback)((()=>{L.current||(L.current=!0)}),[]),D=(0,p.useCallback)((()=>{L.current&&(L.current=!1)}),[]),N=(0,p.useRef)((()=>{const e=W.current;e&&(null==F.onPositionChange||F.onPositionChange(1e3*e.getCurrentTime()),e.getCurrentTime()!==e.getDuration()||L||K(),f.current=setTimeout(N.current))})),V=(0,p.useCallback)((()=>{const e=W.current;e&&!f.current&&(L.current&&(D(),e.setCurrentTime(0)),!0===e.isPlaying()&&(null==u||u()),N.current())}),[u,s]),z=(0,p.useCallback)((()=>{const e=W.current;!1===(null==e?void 0:e.isPlaying())&&(null==h||h()),f.current&&(clearTimeout(f.current),f.current=null)}),[h]),B=(0,p.useCallback)((e=>{var t;const n=null==(t=y.current)?void 0:t.querySelector("wave");I.current.scroll=e,n&&(n.scrollLeft=e)}),[]),H=(0,p.useCallback)((()=>{K(),z()}),[z,K]),F=_r({onZoom:d,onSeek:l,onPositionChange:s,onFinish:H,onPlay:V,onPause:z}),W=nS({containter:y,timelineContainer:b,speed:i,regions:n,data:m,params:{autoCenter:m.autocenter,scrollParent:m.scrollparent,autoCenterImmediately:!0},onLoaded:k,onPlay:()=>{D(),F.onPlay()},onPause:()=>F.onPause(),onPlayFinished:()=>F.onFinish(),onAddRegion:c,onReady:a,onScroll:e=>{I.current.scroll=e,R(e)},onSeek:e=>{D(),null==F.onSeek||F.onSeek(e)},onZoom:e=>null==F.onZoom?void 0:F.onZoom(e)}),$=(0,p.useCallback)((e=>{var t,n;const r=y.current.querySelector("wave"),o=r.getBoundingClientRect().left,i=null==(t=W.current)?void 0:t.getDuration(),a=(r.scrollLeft+(e.clientX-o))/r.scrollWidth*(null!=i?i:0);null==(n=W.current)||n.setCurrentTime(a)}),[]);(0,p.useEffect)((()=>{var n;let r=0;const o=null==(n=y.current)||null==n.querySelector?void 0:n.querySelector("wave");if(o&&t>0){const n=e/t;r=o.scrollWidth*n-o.scrollLeft}A(r)}),[e,t,o,C,O,j]),(0,p.useEffect)((()=>{(()=>{const t=W.current,n=null==t?void 0:t.getDuration(),r=null==t?void 0:t.getCurrentTime(),o=(0,w.clamp)(e/1e3,0,null!=n?n:0);t&&(t.isPlaying()||n&&!isNaN(n)&&o!==r&&t.setCurrentTime(o))})()}),[e]),(0,p.useEffect)((()=>{requestAnimationFrame((()=>{var e;const t=W.current;t&&t.params.minPxPerSec!==C&&(null==(e=W.current)||e.zoom(C)),B(I.current.scroll)}))}),[C,O]),(0,p.useEffect)((()=>{var e;null==(e=W.current)||e.setPlaybackRate(i)}),[i]),(0,p.useEffect)((()=>{B(O)}),[O]),(0,p.useEffect)((()=>{var e;null==(e=W.current)||e.setVolume(r)}),[r]),(0,p.useEffect)((()=>{const e=W.current;e&&(e.params.barHeight=T,e.drawBuffer())}),[T]),(0,p.useEffect)((()=>{const e=new G((()=>{const e=W.current;requestAnimationFrame((()=>{e&&e.drawBuffer(),B(I.current.scroll)}))}));return v.current&&e.observe(v.current),()=>{e.disconnect()}}),[]),(0,p.useEffect)((()=>{const e=x.current,t=e.querySelector("wave"),n=(0,w.isMacOS)(),r=e=>{const r=Math.abs(e.deltaY)>Math.abs(e.deltaX),o=Math.abs(e.deltaY){M(Math.round(C+1.2*-e.deltaY))}));(o&&n||r||e.shiftKey)&&e.preventDefault();R((()=>{const r=!n||e.shiftKey?e.deltaY:e.deltaX;return(0,w.clamp)(t.scrollLeft+1.25*r,0,t.scrollWidth)})())};return e.addEventListener("wheel",r),()=>e.removeEventListener("wheel",r)}),[C]);const U=(0,p.useMemo)((()=>{var e;return{left:E,width:Number(null!=(e=m.cursorwidth)?e:2),background:m.cursorcolor}}),[E]);return(0,_.jsxs)(Ze.eB,{name:"wave",ref:v,children:[(0,_.jsx)(Ze.Sl,{name:"controls",children:(0,_.jsxs)(Fa,{spread:!0,style:{gridAutoColumns:"auto"},children:[(0,_.jsx)(hC,{continuous:!0,value:i,resetValue:wn.default,step:wn.step,min:wn.min,max:wn.max,minIcon:(0,_.jsx)(dd,{style:{color:"#99A0AE"}}),maxIcon:(0,_.jsx)(xd,{style:{color:"#99A0AE"}}),onChange:e=>null==g?void 0:g(Number(e))}),(0,_.jsx)(hC,{continuous:!0,value:C,resetValue:xn.default,step:xn.step,min:xn.min,max:xn.max,minIcon:(0,_.jsx)(Am,{}),maxIcon:(0,_.jsx)(Sm,{}),onChange:e=>M(Number(e))})]})}),(0,_.jsxs)(Ze.Sl,{name:"wrapper",children:[(0,_.jsxs)(Ze.Sl,{name:"body",ref:x,onClick:$,children:[(0,_.jsx)(Ze.Sl,{name:"cursor",style:U}),(0,_.jsx)(Ze.Sl,{name:"surfer",ref:y,onClick:e=>e.stopPropagation()}),(0,_.jsx)(Ze.Sl,{name:"timeline",ref:b}),j&&(0,_.jsx)(Ze.Sl,{name:"loader",mod:{animated:!0}})]}),(0,_.jsx)(Ze.Sl,{name:"scale",children:(0,_.jsx)(hC,{min:1,max:50,step:.1,reverse:!0,continuous:!0,value:T,resetValue:1,align:"vertical",onChange:e=>P(Number(e))})})]})]})},settings:{playpauseHotkey:"media:playpause",stepBackHotkey:"media:step-backward",stepForwardHotkey:"media:step-forward"}}},oS=["regions","zoom","mode","length","position","framerate","hopSize","playing","fullscreen","disableView","defaultStepSize","allowSeek","allowFullscreen","allowViewCollapse","controlsOnTop","data","speed","className","formatPosition"],iS=(0,y.PA)((e=>{var t,n;let{regions:r,zoom:o=1,mode:i="frames",length:a=1024,position:s=1,framerate:l=24,hopSize:c=1,playing:d=!1,fullscreen:u=!1,disableView:h=!1,defaultStepSize:g=10,allowSeek:m=!0,allowFullscreen:f=!0,allowViewCollapse:v=!0,controlsOnTop:y=!0,data:b,speed:x,className:C,formatPosition:S}=e,j=(0,Yn.A)(e,oS);const k=rS[i],[O,R]=(0,p.useState)((0,w.clamp)(s,1,Number.POSITIVE_INFINITY)),[E,A]=(0,p.useState)(0),[T,P]=(0,p.useState)(0),[I,L]=((e,t,n={})=>{var r;const o=localStorage.getItem(e),i=o?null!=(r=null==n.fromString?void 0:n.fromString(o))?r:o:t,[a,s]=(0,p.useState)(i);return[a,t=>{var r;const o=null!=(r=null==n||null==n.toString?void 0:n.toString(t))?r:t.toString();localStorage.setItem(e,o),s(t)}]})("video-timeline",!1,{fromString:e=>"true"===e,toString:e=>String(e)}),M=(0,p.useRef)((()=>O)),K=(0,p.useMemo)((()=>g*o),[o,g]),D=_r({onReady:j.onReady,onPlay:j.onPlay,onPause:j.onPause,onSeek:j.onSeek,onPositionChange:j.onPositionChange,onToggleVisibility:j.onToggleVisibility,onAddRegion:j.onAddRegion,onDeleteRegion:j.onDeleteRegion,onSelectRegion:j.onSelectRegion,onStartDrawing:j.onStartDrawing,onFinishDrawing:j.onFinishDrawing,onAction:j.onAction,onFullscreenToggle:j.onFullscreenToggle,onSpeedChange:j.onSpeedChange}),N=e=>{R((t=>{const n=(0,w.clamp)(e,1,a);return n!==t?(null==D.onPositionChange||D.onPositionChange(n),n):t}))},V=(0,p.useMemo)((()=>({position:s,length:a,regions:r,step:K,data:b,playing:d,seekOffset:E,settings:k.settings,visibleWidth:T})),[s,E,T,a,r,K,d,k.settings,b]);(0,p.useEffect)((()=>{const e=M.current();s!==e&&R((0,w.clamp)(s,1,a))}),[s,a]);const z=(0,_.jsxs)(Ze.Sl,{name:"topbar",children:[(0,_.jsx)(AC,{length:a,position:O,frameRate:l,playing:d,volume:j.volume,controls:j.controls,altHopSize:j.altHopSize,customControls:j.customControls,collapsed:I,onPlay:()=>null==D.onPlay?void 0:D.onPlay(),onPause:()=>null==D.onPause?void 0:D.onPause(),fullscreen:u,disableFrames:h,allowFullscreen:f,allowViewCollapse:v,onFullScreenToggle:e=>null==D.onFullscreenToggle?void 0:D.onFullscreenToggle(e),onVolumeChange:j.onVolumeChange,onStepBackward:(e,t)=>{var n;const o=null!=(n=null==t?void 0:t(a,O,r,-1))?n:O-c;N(o)},onStepForward:(e,t)=>{var n;const o=null!=(n=null==t?void 0:t(a,O,r,1))?n:O+c;N(o)},onRewind:e=>N((0,w.isDefined)(e)?O-e:0),onForward:e=>N((0,w.isDefined)(e)?O+e:a),onPositionChange:N,onToggleCollapsed:L,formatPosition:S,extraControls:k.Controls&&!h?(0,_.jsx)(k.Controls,{onAction:(e,t,n)=>{null==D.onAction||D.onAction(e,t,n)}}):null,mediaType:"timeline"}),m&&(0,_.jsx)(NC,{length:a,step:K,leftOffset:null==(t=k.settings)?void 0:t.leftOffset,position:O,seekOffset:E,seekVisible:T,onIndicatorMove:A,onSeek:N,minimap:k.Minimap?(0,_.jsx)(k.Minimap,{}):null})]});r.map((e=>(0,w.fixMobxObserve)(e.sequence)));const B=!I&&!h&&(0,_.jsx)(Ze.Sl,{name:"view",children:(0,_.jsx)(k.View,{step:K,length:a,regions:r,playing:d,zoom:o,speed:x,volume:j.volume,controls:j.controls,height:j.height,position:O,offset:E,leftOffset:null==(n=k.settings)?void 0:n.leftOffset,onReady:e=>null==D.onReady?void 0:D.onReady(e),onScroll:A,onResize:P,onPositionChange:N,onPlay:()=>null==D.onPlay?void 0:D.onPlay(),onPause:()=>null==D.onPause?void 0:D.onPause(),onSeek:e=>null==D.onSeek?void 0:D.onSeek(e),onToggleVisibility:(e,t)=>null==D.onToggleVisibility?void 0:D.onToggleVisibility(e,t),onAddRegion:e=>null==D.onAddRegion?void 0:D.onAddRegion(e),onDeleteRegion:e=>null==D.onDeleteRegion?void 0:D.onDeleteRegion(e),onSelectRegion:(e,t,n)=>null==D.onSelectRegion?void 0:D.onSelectRegion(e,t,n),onStartDrawing:e=>null==D.onStartDrawing?void 0:D.onStartDrawing(e),onFinishDrawing:()=>null==D.onFinishDrawing?void 0:D.onFinishDrawing(),onSpeedChange:e=>null==D.onSpeedChange?void 0:D.onSpeedChange(e),onZoom:j.onZoom})});return(0,_.jsx)(Tr,{value:V,children:(0,_.jsx)(Ze.eB,{name:"timeline",className:C,children:y?(0,_.jsxs)(_.Fragment,{children:[z,B]}):(0,_.jsxs)(_.Fragment,{children:[B,z]})})})})),aS=(e,t)=>{const n=Number(e);return isNaN(e)?t.default:nt.max?t.max:n},sS=(0,y.PA)((({item:e})=>{const[t,n]=(0,p.useState)(!1),[r,o]=(0,p.useState)(1),[i,a]=(0,p.useState)(0),[s,l]=(0,p.useState)(aS(e.defaultzoom,xn)),[c,d]=(0,p.useState)(aS(e.defaultvolume,Cn)),[u,h]=(0,p.useState)(aS(e.defaultspeed,wn)),g=(0,p.useCallback)((t=>{a(1e3*t.duration),e.onLoad(t.surfer),e.onReady()}),[]),m=(0,p.useCallback)((e=>{o(e)}),[]),f=(0,p.useCallback)((t=>{o(t),e.handleSeek()}),[]),v=(0,p.useCallback)((t=>{h(t),e.handleSpeed(t)}),[]),y=(0,p.useCallback)((({time:e,fps:t})=>{const n=Math.floor(t),r=Math.floor(1e3*e%n);return Math.floor(e>=0?r:n).toString().padStart(3,"0")}),[]),b=(0,p.useCallback)((()=>{n((t=>!!e._ws&&(!1===e._ws.isPlaying()&&e._ws.play(),!1===t?(e.triggerSyncPlay(),!0):t)))}),[e,t]),x=(0,p.useCallback)((()=>{n((t=>{if(!e._ws)return!1;var n;!0===e._ws.isPlaying()&&(null==(n=e._ws)||null==n.pause||n.pause());return!0===t?(e.triggerSyncPause(),!1):t}))}),[e,t]);return(0,_.jsx)(En,{item:e,children:(0,_.jsx)(Ze.eB,{mode:"wave",name:"audio",tag:iS,framerate:1e3,hopSize:1e3,playing:t,regions:e.regions,data:e,zoom:s,speed:u,volume:c,controls:{AudioVolumeControl:e.volume,SpeedControl:e.speed,ZoomControl:e.zoom},defaultStepSize:16,length:i,position:r,allowSeek:!1,allowFullscreen:!1,allowViewCollapse:!1,controlsOnTop:!1,onReady:g,onAddRegion:e.addRegion,onSelectRegion:e.selectRegion,onPositionChange:m,onSeek:f,onPlay:b,onPause:x,onZoom:l,onVolumeChange:d,onSpeedChange:v,formatPosition:y})})})),lS=!1,cS="OffscreenCanvas"in globalThis;let dS=function(e){return e[e.timelineHeight=32]="timelineHeight",e.timelinePlacement="top",e}({});const uS=(e="log")=>(...e)=>{lS},hS=(uS("log"),uS("warn")),gS=(uS("error"),uS("info")),mS=(e,t,n)=>Math.max(t,Math.min(n,e)),pS=(e,t=2)=>{const n=10**t;return Math.round(e*n)/n},fS=(e,t,n)=>e>=t&&e<=n,vS=(e,t)=>Array.from({length:t}).map((()=>e)).join(""),yS=e=>{const[t,n]=(e=>{const t=e.length;if(t>0){let n,r,o=0;for(n=r=e[0];on?n=t:te.getBoundingClientRect().left,xS=e=>e.getBoundingClientRect().top,wS=(e,t)=>e.clientX-bS(t),CS=(e,t)=>e.clientY-xS(t),SS=(e,t,n)=>e/t*n,jS=(e,t,n)=>{const{zoomedWidth:r,container:o}=t,i=wS(e,o)+t.getScrollLeftPx();return SS(i,r,n)},kS=(e,t,n)=>((e,t)=>Math.abs(e-t)<1e-6)(e/n,t/n);class OS{constructor(){this.destroyed=!1}get isDestroyed(){return this.destroyed}destroy(){this.destroyed=!0,this.destroy=()=>null}}class RS extends OS{constructor(...e){super(...e),this.subscriptions=new Map}on(e,t){const n=this.getSubscriptions(e);!1===n.has(t)&&n.add(t)}off(e,t){const n=this.getSubscriptions(e);n.has(t)&&n.delete(t)}invoke(e,t){this.getSubscriptions(e).forEach((e=>e(...null!=t?t:[])))}removeAllListeners(){this.subscriptions.forEach((e=>e.clear())),this.subscriptions.clear()}destroy(){this.removeAllListeners(),this.on=()=>null,this.off=()=>null,this.invoke=()=>null,this.removeAllListeners=()=>null,super.destroy()}getSubscriptions(e){var t;const n=null!=(t=this.subscriptions.get(e))?t:new Set;return this.subscriptions.set(e,n),n}}class ES extends RS{constructor(e){super(),this.src=e,this.chunks=void 0,this.cancelled=!1,this.decodeId=0,this._dataLength=0,this._dataSize=0,this._channelCount=1,this._sampleRate=44100,this._duration=0,this.decodingResolve=void 0,this.decodingPromise=void 0,this.buffer=void 0,this.removalId=null}get channelCount(){return this._channelCount}get sampleRate(){return this._sampleRate}get duration(){return this._duration}get dataLength(){var e,t;this.chunks&&!this._dataLength&&(this._dataLength=(null!=(e=null==(t=this.chunks)?void 0:t.reduce(((e,t)=>e+t.reduce(((e,t)=>e+t.length),0)),0))?e:0)/this._channelCount);return this._dataLength}get dataSize(){var e,t;this.chunks&&!this._dataSize&&(this._dataSize=(null!=(e=null==(t=this.chunks)?void 0:t.reduce(((e,t)=>e+t.reduce(((e,t)=>e+t.byteLength),0)),0))?e:0)/this._channelCount);return this._dataSize}get sourceDecoded(){return void 0!==this.chunks}get sourceDecodeCancelled(){return this.cancelled&&0===this.decodeId}cancel(){this.cancelled||gS("decode:cancelled",this.src),this.cancelled=!0,this.decodeId=0,this.dispose()}renew(){this.cancelled=!1}destroy(){super.removeAllListeners(),this.cancel()}cleanupResolvers(){var e;null==(e=this.decodingResolve)||e.call(this),this.decodingResolve=void 0,this.decodingPromise=void 0,gS("decode:cleanup",this.src)}}class _S extends ES{constructor(...e){super(...e),this.arraybuffer=void 0,this.context=void 0}async init(e){this.arraybuffer=e,gS("decode:worker:ready",this.src)}async decode(e){if(this.sourceDecoded)gS("decode:cached",this.src);else{if(this.sourceDecodeCancelled)throw new Error("WebAudioDecoder decode cancelled and contains no data, did you call decoder.renew()?");if(this.decodingPromise)return gS("decode:inprogress",this.src),this.decodingPromise;if(!this.arraybuffer)throw new Error("WebAudioDecoder not initialized, did you call decoder.init()?");gS("decode:start",this.src),this.decodeId=Date.now(),this.decodingPromise=new Promise((e=>this.decodingResolve=e));try{const t=await new Promise(((e,t)=>{if(this.context||(this.context=this.createOfflineAudioContext()),!this.context||!this.arraybuffer)return t(new Error("WebAudioDecoder not initialized, did you call decoder.init()?"));var n,r;"webkitAudioContext"in window?null==(n=this.context)||n.decodeAudioData(this.arraybuffer,(t=>e(t)),(e=>t(e))):null==(r=this.context)||r.decodeAudioData(this.arraybuffer).then(e).catch(t)}));this._channelCount=null!=e&&e.multiChannel?t.numberOfChannels:1,this._sampleRate=t.sampleRate,this._duration=t.duration;const n=Array.from({length:this._channelCount}).map((()=>Array.from({length:1})));return n.forEach(((e,r)=>{n[r]=[t.getChannelData(r)]})),this.chunks=n,gS("decode:complete",this.src),null!=e&&e.captureAudioBuffer&&(this.buffer=t),t}finally{this.dispose()}}}dispose(){delete this.arraybuffer,delete this.context,this.cleanupResolvers()}createOfflineAudioContext(e){return window.WebAudioOfflineAudioContext||(window.WebAudioOfflineAudioContext=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,2,null!=e?e:this.sampleRate)),window.WebAudioOfflineAudioContext}}var AS=n(55961),TS=n(14280);class PS{constructor(e){this.worker=void 0,this.worker=e}async compute(e){var t;const n=await this.sendMessage(this.worker,{data:e,type:"compute"},!0);return null==n||null==(t=n.data)||null==(t=t.result)?void 0:t.data}async precompute(e){await this.sendMessage(this.worker,{data:e,type:"precompute"})}async store(e){await this.sendMessage(this.worker,{data:e,type:"store"})}async getStorage(){var e;const t=await this.sendMessage(this.worker,{type:"getStorage"},!0);return null==t||null==(e=t.data)?void 0:e.result}destroy(){this.worker.terminate()}sendMessage(e,t,n=!1){return new Promise((r=>{const o=Math.random().toString();if(n){const t=n=>{o===n.data.eventId&&(e.removeEventListener("message",t),r(n))};e.addEventListener("message",t)}e.postMessage(Object.assign({},t,{eventId:o})),n||r(void 0)}))}}PS.Messenger={receive({compute:e,precompute:t}){const n={};self.addEventListener("message",(r=>{if(!r.data)return;const{data:o,type:i,eventId:a}=r.data;switch(i){case"compute":((t,r)=>{e(t,n,(e=>{self.postMessage({result:e,eventId:r})}))})(o,a);break;case"precompute":(e=>{null==t||t(e,n,(e=>{Object.assign(n,e)}))})(o);break;case"store":(e=>{Object.assign(n,e.data.data)})(r);break;case"getStorage":(e=>{self.postMessage({result:n,eventId:e})})(a)}}))}};class IS extends OS{constructor(e){super(),this.channelCount=1,IS.usage++,IS.worker||(IS.worker=new PS(new Worker(new URL(n.p+n.u(559),n.b)))),this.channelCount=e}destroy(){var e;(IS.usage--,0===IS.usage)&&(null==(e=IS.worker)||e.destroy(),IS.worker=void 0);super.destroy()}async split(e){if(!IS.worker)throw new Error("AudioDecoder: worker not initialized");return IS.worker.compute({value:e,channelCount:this.channelCount})}}IS.usage=0,IS.worker=void 0;class LS extends ES{constructor(...e){super(...e),this.worker=void 0}getTotalChunks(){return Math.ceil(this._duration*this._channelCount/1800)}getChunkDuration(){return 1800/this._channelCount}async init(e){this.worker||(this.worker=await(0,AS.vy)(TS.A,e),gS("decode:worker:ready",this.src))}async decode(e){if(this.sourceDecoded)return void gS("decode:cached",this.src);if(this.sourceDecodeCancelled)throw new Error("AudioDecoder: Worker decode cancelled and contains no data, did you call decoder.renew()?");if(this.decodingPromise)return gS("decode:inprogress",this.src),this.decodingPromise;if(!this.worker)throw new Error("AudioDecoder: Worker not initialized, did you call decoder.init()?");let t;gS("decode:start",this.src),this.decodeId=Date.now(),this.decodingPromise=new Promise((e=>this.decodingResolve=e));try{this._channelCount=null!=e&&e.multiChannel?this.worker.channelCount:1,this._sampleRate=this.worker.sampleRate,this._duration=this.worker.duration;let n=0;const r=this.getTotalChunks(),o=this.chunkDecoder(e);t=this._channelCount>1?new IS(this._channelCount):void 0;const i=Array.from({length:this._channelCount}).map((()=>Array.from({length:r})));for(gS("decode:chunk:start",this.src,n,r),this.invoke("progress",[0,r]);n{i[t][n]=e}))}this.invoke("progress",[n+1,r]),gS("decode:chunk:process",this.src,n,r),n++}if(e.done)break}this.chunks=i,gS("decode:complete",this.src)}finally{var n;null==(n=t)||n.destroy(),this.dispose()}}dispose(){this.worker&&(this.worker.dispose(),this.worker=void 0,gS("decode:worker:disposed",this.src)),this.cleanupResolvers()}*chunkDecoder(e){if(!this.worker||this.sourceDecodeCancelled)return null;const t=this.worker.duration;let n=-1;for(;;)yield new Promise(((r,o)=>{var i;if(!this.worker||this.sourceDecodeCancelled)return r(null);const a=mS(t-n,0,this.getChunkDuration()),s=n;n+=a,this.worker.decodeAudioData(s,a,Object.assign({multiChannel:null!=(i=null==e?void 0:e.multiChannel)&&i},e)).then(r).catch(o)}))}}class MS{getDecoder(e,t,n="ffmpeg"){const r=function(e,t,n,r="ffmpeg"){var o;const i=`${t}:${n}:${r}`,a=null!=(o=e.get(i))?o:"ffmpeg"===r?new LS(t):new _S(t);return a.renew(),e.set(i,a),new Proxy(a,{get(t,n){if(n in t){const t=e.get(i);null!=t&&t.removalId&&(clearTimeout(t.removalId),gS("decode:renew",i),t.removalId=null,t.renew(),e.set(i,t));const r=t[n];return"destroy"===n&&"function"==typeof r?(...n)=>(t.removalId=setTimeout((()=>{gS("decodepool:destroy",i),e.delete(i)}),5e3),e.set(i,t),r.bind(t)(...n)):r}}})}(MS.cache,e,t,n);return r}}MS.cache=new Map;const KS=new MS;class DS extends RS{constructor(e){var t,n,r;super(),this.decoder=void 0,this.decoderPromise=void 0,this.mediaPromise=void 0,this.mediaReject=void 0,this.el=void 0,this.buffer=void 0,this.splitChannels=!1,this.decoderType="ffmpeg",this.playerType="html5",this.src=void 0,this.mediaResolve=void 0,this.hasLoadedSource=!1,this.mediaError=()=>{var e,t;(0,O.VS)(O.xS)&&this.hasLoadedSource&&this.el?(this.hasLoadedSource=!1,this.invoke("resetSource")):null==(e=this.mediaReject)||e.call(this,null==(t=this.el)?void 0:t.error)},this.mediaReady=()=>{var e;this.mediaResolve&&(null==(e=this.mediaResolve)||e.call(this),this.mediaResolve=void 0);this.hasLoadedSource=!0,this.invoke("canplay")},this.splitChannels=null!=(t=e.splitChannels)&&t,this.decoderType=null!=(n=e.decoderType)?n:this.decoderType,this.playerType=null!=(r=e.playerType)?r:this.playerType,this.src=e.src,this.createAudioDecoder(),this.createMediaElement()}get channelCount(){var e;return(null==(e=this.decoder)?void 0:e.channelCount)||1}get duration(){var e,t,n,r;return this.el?null!=(e=null==(t=this.el)?void 0:t.duration)?e:0:null!=(n=null==(r=this.decoder)?void 0:r.duration)?n:0}get sampleRate(){var e;return(null==(e=this.decoder)?void 0:e.sampleRate)||44100}get dataLength(){var e;return(null==(e=this.decoder)?void 0:e.dataLength)||0}get dataSize(){var e;return(null==(e=this.decoder)?void 0:e.dataSize)||0}disconnect(){var e;try{this.el&&!this.el.paused&&this.el.pause()}catch(e){}null==(e=this.decoder)||e.cancel()}destroy(){var e,t,n,r;super.destroy(),this.disconnect(),delete this.mediaResolve,delete this.mediaReject,delete this.mediaPromise,delete this.decoderPromise,null==(e=this.decoder)||e.destroy(),delete this.decoder,null==(t=this.el)||t.removeEventListener("error",this.mediaReady),null==(n=this.el)||n.removeEventListener("canplaythrough",this.mediaReady),null==(r=this.el)||r.remove(),delete this.el,delete this.buffer}get chunks(){if(this.decoder)return this.decoder.chunks}async sourceDecoded(){if(!this.decoder)return!1;try{return this.mediaPromise&&await this.mediaPromise,this.decoderPromise&&await this.decoderPromise,"webaudio"===this.playerType&&this.decoder.buffer&&(this.buffer=this.decoder.buffer),this.decoder.sourceDecoded}catch(e){return console.error(e),!1}}async initDecoder(e){if(this.decoder)return!this.decoderPromise&&e&&(this.decoderPromise=this.decoder.init(e)),this.decoderPromise}async decodeAudioData(e={}){if(!this.decoder)return;e.captureAudioBuffer="webaudio"===this.playerType;const t=await this.decoder.decode(e);e.captureAudioBuffer&&t&&(this.buffer=t)}createMediaElement(){this.src&&!this.el&&"html5"===this.playerType&&(this.el=document.createElement("audio"),this.el.preload="auto",this.el.setAttribute("data-testid","waveform-audio"),this.el.style.display="none",(0,O.VS)(O.xS)&&(this.el.crossOrigin="anonymous"),document.body.appendChild(this.el),this.mediaPromise=new Promise(((e,t)=>{this.mediaResolve=e,this.mediaReject=t})),this.el.addEventListener("canplaythrough",this.mediaReady),this.el.addEventListener("error",this.mediaError),this.loadMedia())}loadMedia(){this.src&&this.el&&(this.el.src=this.src)}createAudioDecoder(){this.src&&!this.decoder&&(this.decoder=KS.getDecoder(this.src,this.splitChannels,this.decoderType),this.decoder.on("progress",((e,t)=>{this.invoke("decodingProgress",[e,t])})))}}class NS extends OS{constructor(e,t){super(),this.wf=void 0,this.audio=void 0,this.loaded=!1,this.options=void 0,this.cancel=void 0,this.decoderResolve=void 0,this._duration=0,this.decoderPromise=void 0,this.loadingProgressType=void 0,this.wf=e,this.options=t,this.cancel=()=>{},this.loadingProgressType="determinate"}get duration(){return this._duration}set duration(e){const t=this._duration!==e;this._duration=e,t&&this.wf.invoke("durationChanged",[e])}get sampleRate(){var e;return(null==(e=this.audio)?void 0:e.sampleRate)||0}reset(){this.cancel(),this.loaded=!1,this.loadingProgressType="determinate",this.decoderResolve=void 0,this.decoderPromise=void 0}async decodeAudioData(){return!this.audio||this.isDestroyed?null:await this.audio.decodeAudioData({multiChannel:this.wf.params.splitChannels})}async load(e){if(this.isDestroyed||this.loaded)return null;if(this.decoderPromise=new Promise((e=>{this.decoderResolve=e})),this.createAnalyzer(Object.assign({},e,{src:this.options.src,splitChannels:this.wf.params.splitChannels,decoderType:this.wf.params.decoderType,playerType:this.wf.params.playerType})),!this.audio)throw new Error("MediaLoader: Failed to allocate audio decoder");var t;if(await this.audio.sourceDecoded())return this.duration=this.audio.duration,null==(t=this.decoderResolve)||t.call(this),this.audio;const n=await this.performRequest(this.options.src).catch((e=>(console.error("An audio loading error occurred",e),null)));if(n)try{var r,o;return await this.audio.initDecoder(n),null==(r=this.decoderResolve)||r.call(this),this.audio?(this.duration=this.audio.duration,await this.decodeAudioData(),null!=(o=this.audio)?o:null):null}catch(e){this.wf.setError(`An error occurred while decoding the audio file. Please select another file or try again. ${e.message}`),console.error("An audio decoding error occurred",e)}return null}destroy(){this.isDestroyed||(super.destroy(),this.reset(),this.audio&&(this.audio.destroy(),this.audio=null))}async performRequest(e){var t=this;const n=new XMLHttpRequest;return this.cancel=()=>{null==n||n.abort(),this.cancel=()=>{}},new Promise(((r,o)=>{n.responseType="arraybuffer";const i=()=>{const e=new Error(`HTTP error status: ${n.status}`);e.name="HTTPError",this.wf.setError(`HTTP error status: ${n.status}`,e),o(n)};n.addEventListener("progress",(e=>{e.lengthComputable?(this.loadingProgressType="determinate",this.wf.setLoadingProgress(e.loaded,e.total)):(this.loadingProgressType="indeterminate",this.wf.setLoadingProgress(e.loaded,-1))})),n.addEventListener("load",(async function(){t.wf.setLoadingProgress(void 0,void 0,!0),r(n.response)})),n.addEventListener("error",(()=>{i()})),n.addEventListener("readystatechange",(()=>{4===n.readyState&&200!==n.status&&0!==n.status&&i()}));const a=new URL(e,/^https?/.exec(e)?void 0:window.location.href);["X-Goog-Signature","X-Amz-Signature","sig"].some((e=>a.searchParams.has(e)))||a.searchParams.set("lsref","1"),n.open("GET",a.toString(),!0),n.send()}))}createAnalyzer(e){return this.audio||(this.audio=new DS(e),this.audio.on("decodingProgress",((e,t)=>{this.wf.setDecodingProgress(e,t)}))),this.audio}}class VS extends OS{constructor(e){var t,n;super(),this.audio=void 0,this.wf=void 0,this.timer=void 0,this.loop=null,this.timestamp=0,this.time=0,this.connected=!1,this.bufferPromise=void 0,this.bufferResolve=void 0,this.ended=!1,this._rate=1,this._volume=1,this._savedVolume=1,this.playing=!1,this.hasPlayed=!1,this.handlePlayed=()=>{this.hasPlayed=!0},this.handlePaused=()=>{this.hasPlayed=!1},this.handleEnded=()=>{this.loop||this.updateCurrentTime(!0)},this.handleCanPlay=()=>{var e;null==(e=this.bufferResolve)||e.call(this)},this.watch=()=>{this.playing&&(this.updateCurrentTime(),this.updateLoop(this.time),this.timer=requestAnimationFrame(this.watch))},this.wf=e,this._rate=null!=(t=e.params.rate)?t:this._rate,this.volume=null!=(n=e.params.volume)?n:this._volume,this._savedVolume=this.volume,e.params.muted&&(this.muted=!0)}get currentTime(){return this.time}set currentTime(e){this.ended=!1,this.setCurrentTime(e,!0)}setCurrentTime(e,t=!1){const n=this.time!==e;this.time=e,this.updateCurrentSourceTime(n),t&&n&&this.wf.invoke("seek",[this.time])}canPause(){return this.hasPlayed}get volume(){var e;return null!=(e=this._volume)?e:1}set volume(e){this.volume!==e&&(0===e?this.muted=!0:this.muted?this.muted=!1:this._volume=e,this.adjustVolume(),this.wf.invoke("volumeChanged",[this.volume]))}get muted(){return 0===this._volume}set muted(e){this.muted!==e&&(e?this.mute():this.unmute(),this.wf.invoke("muted",[this.muted]))}mute(){this._savedVolume=this.volume||1,this._volume=0}unmute(){this._volume=this._savedVolume||1}get rate(){return this._rate}set rate(e){const t=this._rate!==e;this._rate=e,t&&this.wf.invoke("rateChanged",[e])}get duration(){var e,t;return null!=(e=null==(t=this.audio)?void 0:t.duration)?e:0}init(e){this.audio=e,this.audio.on("canplay",this.handleCanPlay)}seek(e){const t=mS(e,0,this.duration);this.currentTime=t,this.playing&&this.updatePlayback()}seekSilent(e){const t=mS(e,0,this.duration);this.ended=!1,this.setCurrentTime(t),this.playing&&this.updatePlayback()}play(e,t){if(this.isDestroyed||this.playing||!this.audio)return;this.ended&&(this.currentTime=null!=e?e:0);const{start:n,end:r}=this.playSelection(e,t);this.playRange(n,r)}playEnded(){this.ended=!0,this.pause(),this.wf.invoke("playend")}pause(){!this.isDestroyed&&this.playing&&this.audio&&(this.stopWatch(),this.disconnectSource(),this.playing=!1,this.loop=null,this.wf.invoke("pause"),this.wf.invoke("seek",[this.currentTime]))}stop(){this.isDestroyed||(this.stopWatch(),this.disconnectSource(),this.playing=!1,this.loop=null)}destroy(){this.stop(),this.cleanupSource(),this.bufferPromise=void 0,this.bufferResolve=void 0,super.destroy()}updatePlayback(){const{start:e,end:t}=this.playSelection();this.playSource(e,t)}playRange(e,t){e&&(this.currentTime=e),this.playSource(e,t),this.wf.invoke("play")}playSource(e,t){this.stopWatch(),this.connectSource(),this.audio&&(this.playing=!0,this.loop&&((this.currentTimethis.loop.end)&&(this.currentTime=this.loop.start),t=mS(this.loop.end,0,this.duration),e=mS(this.loop.start,0,t)),this.playAudio(e,t))}playSelection(e,t){const n=this.wf.regions.selected;if(n.length>0){const e=Math.min(...n.map((e=>e.start))),t=Math.max(...n.map((e=>e.end))),r=mS(this.currentTime,e,t);return this.loop={start:e,end:t},{start:r,end:t}}const r=null!=e?e:this.currentTime;return{start:r,end:void 0!==t?t-r:void 0}}connectSource(){this.isDestroyed||!this.audio||this.connected||(this.connected=!0,this.canPause()&&this.audio.disconnect())}disconnectSource(){return!(this.isDestroyed||!this.audio||!this.connected)&&(this.connected=!1,this.canPause()&&this.audio.disconnect(),!0)}cleanupSource(){!this.isDestroyed&&this.audio&&(this.disconnectSource(),this.audio.destroy(),delete this.audio)}updateLoop(e){!this.isDestroyed&&this.loop&&e>=this.loop.end&&(this.currentTime=this.loop.start,this.playing=!1,this.play())}updateCurrentTime(e=!1){var t,n;const r=performance.now(),o=(r-this.timestamp)/1e3*this.rate;this.timestamp=r;const i=null!=(t=null==(n=this.loop)?void 0:n.end)?t:this.duration,a=e?this.duration:mS(this.time+o,0,i);this.time=a,!this.loop&&this.time>=this.duration-o?(this.time=this.duration,this.wf.invoke("playing",[this.duration]),this.playEnded()):this.wf.invoke("playing",[this.time])}stopWatch(){cancelAnimationFrame(this.timer)}}class zS extends VS{constructor(...e){var t;super(...e),t=this,this.handleResetSource=async function(){var e;if(null==(e=t.audio)||!e.el)return;const n=t.playing;t.stop(),t.audio.el.load(),n&&t.play()}}mute(){var e;super.mute(),null!=(e=this.audio)&&e.el&&(this.audio.el.muted=!0)}unmute(){var e;super.unmute(),null!=(e=this.audio)&&e.el&&(this.audio.el.muted=!1)}get rate(){var e;return null!=(e=this.audio)&&e.el&&this.audio.el.playbackRate!==this._rate&&(this.audio.el.playbackRate=this._rate),this._rate}set rate(e){const t=this._rate!==e;var n;(this._rate=e,t)&&(null!=(n=this.audio)&&n.el&&(this.audio.el.playbackRate=e),this.wf.invoke("rateChanged",[e]))}init(e){super.init(e),this.audio&&this.audio.el&&(this.audio.on("resetSource",this.handleResetSource),this.audio.el.addEventListener("play",this.handlePlayed),this.audio.el.addEventListener("pause",this.handlePaused))}destroy(){var e;super.destroy(),null!=(e=this.audio)&&e.el&&(this.audio.el.removeEventListener("play",this.handlePlayed),this.audio.el.removeEventListener("pause",this.handlePaused))}adjustVolume(){var e;null!=(e=this.audio)&&e.el&&(this.audio.el.volume=this.volume)}playAudio(e,t){if(!this.audio||!this.audio.el)return;this.audio.el.currentTime=this.currentTime,this.audio.el.addEventListener("ended",this.handleEnded),this.bufferPromise=new Promise((e=>{this.bufferResolve=e}));const n=this.currentTime;Promise.all([this.audio.el.play(),this.bufferPromise]).then((()=>{var e;this.timestamp=performance.now(),null!=(e=this.audio)&&e.el&&(this.setCurrentTime(n),this.audio.el.currentTime=this.currentTime,this.watch())}))}updateCurrentSourceTime(e){var t;e&&null!=(t=this.audio)&&t.el&&(this.audio.el.currentTime=this.time)}canPause(){var e;return!(null==(e=this.audio)||!e.el||this.audio.el.paused||!this.hasPlayed)}disconnectSource(){var e;return!!super.disconnectSource()&&(null==(e=this.audio)||null==(e=e.el)||e.removeEventListener("ended",this.handleEnded),!0)}}class BS extends VS{constructor(e){super(e),this.audioContext=void 0,this.audioBufferSource=void 0,this.gainNode=void 0,this.audioContext=new AudioContext,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}async init(e){super.init(e),this.audioContext&&"suspended"===this.audioContext.state&&await this.audioContext.resume()}get rate(){var e;return null!=(e=this.audioBufferSource)&&e.playbackRate&&this._rate!==this.audioBufferSource.playbackRate.value&&(this.audioBufferSource.playbackRate.value=this._rate),this._rate}set rate(e){const t=this._rate!==e;var n;(this._rate=e,t)&&(null!=(n=this.audioBufferSource)&&n.playbackRate&&(this.audioBufferSource.playbackRate.value=this._rate),this.wf.invoke("rateChanged",[e]))}adjustVolume(){this.gainNode&&(this.gainNode.gain.value=this.volume)}destroy(){super.destroy(),this.audioContext&&this.audioContext.close().finally((()=>{delete this.audioContext}))}playAudio(e,t){if(this.audioBufferSource){try{e?this.audioBufferSource.start(0,e):this.audioBufferSource.start(0)}catch(e){if("InvalidStateError"!==e.name)throw e}this.timestamp=performance.now(),this.watch()}}connectSource(){var e;!this.isDestroyed&&this.audioContext&&null!=(e=this.audio)&&e.buffer&&this.gainNode&&!this.connected&&(this.connected=!0,this.audioBufferSource=this.audioContext.createBufferSource(),this.audioBufferSource.buffer=this.audio.buffer,this.audioBufferSource.connect(this.gainNode),this.audioBufferSource.onended=this.handleEnded)}disconnectSource(){if(this.isDestroyed||!this.connected||!this.audioBufferSource)return!1;this.connected=!1;try{this.audioBufferSource.stop()}catch(e){if("InvalidStateError"!==e.name)throw e}return this.audioBufferSource.disconnect(),this.audioBufferSource.onended=null,this.audioBufferSource=void 0,!0}playSource(e,t){this.disconnectSource(),super.playSource(e,t)}updateCurrentSourceTime(e){e&&this.audioBufferSource&&(this.disconnectSource(),this.connectSource(),this.audioBufferSource.start(0,this.time))}cleanupSource(){super.cleanupSource(),this.audioBufferSource=void 0}}const HS=e=>Number.parseInt(e.replace(/_/g,""),36),FS="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const n=HS(t.substring(0,3)),r=HS(t.substring(3)).toString(16);let o="";for(let e=0;e<6-r.length;e++)o+="0";return e[n]=`${o}${r}`,e}),{}),WS=new RegExp(`^#${vS("([a-f0-9])",3)}([a-f0-9])?$`,"i"),$S=new RegExp(`^#${vS("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),US=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${vS(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),ZS=/^[a-z]+$/i;class GS{constructor(e){this.base=void 0,this.rgba=void 0,this.base=e,this.rgba=e}update(e){const t=XS(e);return this.rgba=t.rgba,this.base=t.base,this}reset(){return this.rgba=this.base,this}clone(){return new GS(this.rgba)}opaque(e){const t=[this.r,this.g,this.b,mS(pS(this.a+this.a*e,1),0,1)];return this.rgba=t,this}translucent(e){const t=[this.r,this.g,this.b,mS(pS(this.a-this.a*e,1),0,1)];return this.rgba=t,this}darken(e){const t=[mS(Math.round(this.r-this.r*e),0,255),mS(Math.round(this.g-this.g*e),0,255),mS(Math.round(this.b-this.b*e),0,255),this.a];return this.rgba=t,this}lighten(e){const t=[mS(Math.round(this.r+this.r*e),0,255),mS(Math.round(this.g+this.g*e),0,255),mS(Math.round(this.b+this.b*e),0,255),this.a];return this.rgba=t,this}get luminance(){const[e,t,n]=this.rgba.map((e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}));return.2126*e+.7152*t+.0722*n}get r(){return this.rgba[0]}set r(e){this.rgba[0]=e}get g(){return this.rgba[1]}set g(e){this.rgba[1]=e}get b(){return this.rgba[2]}set b(e){this.rgba[2]=e}get a(){return this.rgba[3]}set a(e){this.rgba[3]=e}toArray(){return this.rgba}toString(){return`rgba(${this.rgba.join(", ")})`}}const YS=new GS([0,0,0,0]),XS=e=>{if("string"!=typeof e&&!(e instanceof GS))throw new Error(`Color must be a string or an instanceof RgbaColorArray. Received ${JSON.stringify(e)}`);if(e instanceof GS)return e;if("transparent"===(e=e.toString()).trim().toLowerCase())return YS;let t=e.trim();t=ZS.test(e)?(e=>{const t=e.toLowerCase().trim(),n=FS[(e=>{let t=5381,n=e.length;for(;n;)t=33*t^e.charCodeAt(--n);return(t>>>0)%2341})(t)];if(!n)throw new Error(`Unknown color: ${e}`);return`#${n}`})(e):e;const n=WS.exec(t);if(n){const e=Array.from(n).slice(1);return new GS([...e.slice(0,3).map((e=>Number.parseInt(vS(e,2),16))),Number.parseInt(vS(e[3]||"f",2),16)/255])}const r=$S.exec(t);if(r){const e=Array.from(r).slice(1);return new GS([...e.slice(0,3).map((e=>Number.parseInt(e,16))),Number.parseInt(e[3]||"ff",16)/255])}const o=US.exec(t);if(o){const e=Array.from(o).slice(1);return new GS([...e.slice(0,3).map((e=>Number.parseInt(e,10))),Number.parseFloat(e[3]||"1")])}return YS};class qS{constructor(e){var t,n,r,o,i;this.id="tooltip",this.visible=!1,this.color=XS("#fff"),this.fontWeight="500",this.backgroundColor=XS("#000"),this.fontSize=16,this.paddingInline=8,this.paddingBlock=4,this.borderRadius=4,this.id=`tooltip-${(0,R.Ak)()}`,this.color=null!=e&&e.color?XS(e.color):this.color,this.backgroundColor=null!=e&&e.backgroundColor?XS(e.backgroundColor):this.backgroundColor,this.paddingInline=null!=(t=null==e?void 0:e.paddingInline)?t:this.paddingInline,this.paddingBlock=null!=(n=null==e?void 0:e.paddingBlock)?n:this.paddingBlock,this.borderRadius=null!=(r=null==e?void 0:e.borderRadius)?r:this.borderRadius,this.fontSize=null!=(o=null==e?void 0:e.fontSize)?o:this.fontSize,this.fontWeight=null!=(i=null==e?void 0:e.fontWeight)?i:this.fontWeight,this.initialize()}initialize(){if(document.getElementById(this.id))return;const e=document.createElement("span"),t=document.body;e.id=this.id,e.style.display="none",e.style.position="absolute",this.apply(e),null==t||t.appendChild(e)}update(e){var t,n,r,o;const i=document.getElementById(this.id);this.color=null!=e&&e.color?XS(e.color):this.color,this.backgroundColor=null!=e&&e.backgroundColor?XS(e.backgroundColor):this.backgroundColor,this.paddingInline=null!=(t=null==e?void 0:e.paddingInline)?t:this.paddingInline,this.paddingBlock=null!=(n=null==e?void 0:e.paddingBlock)?n:this.paddingBlock,this.borderRadius=null!=(r=null==e?void 0:e.borderRadius)?r:this.borderRadius,this.fontSize=null!=(o=null==e?void 0:e.fontSize)?o:this.fontSize,i&&this.apply(i)}apply(e){e.style.color=this.color.toString(),e.style.backgroundColor=this.backgroundColor.toString(),e.style.paddingInline=`${this.paddingInline}px`,e.style.paddingBlock=`${this.paddingBlock}px`,e.style.borderRadius=`${this.borderRadius}px`,e.style.fontSize=`${this.fontSize}px`,e.style.fontWeight=this.fontWeight,e.style.zIndex="9999",e.style.pointerEvents="none"}show(e,t,n,r=!0){const o=document.getElementById(this.id);this.visible=!0,o&&n&&(o.style.display="block",o.style.left=r?e-o.clientWidth/2+"px":`${e}px`,o.style.top=`${t}px`,o.innerText=n)}hide(){if(!this.visible)return;const e=document.getElementById(this.id);this.visible=!1,e&&(e.style.display="none")}destroy(){var e;null==(e=document.getElementById(this.id))||e.remove()}}let JS=function(e){return e.auto="auto",e.crosshair="crosshair",e.default="default",e.pointer="pointer",e.move="move",e.text="text",e.wait="wait",e.help="help",e.progress="progress",e.notAllowed="not-allowed",e.contextMenu="context-menu",e.cell="cell",e.verticalText="vertical-text",e.alias="alias",e.copy="copy",e.noDrop="no-drop",e.allScroll="all-scroll",e.colResize="col-resize",e.rowResize="row-resize",e.grab="grab",e.grabbing="grabbing",e.nResize="n-resize",e.neResize="ne-resize",e.nwResize="nw-resize",e.nsResize="ns-resize",e.neswResize="nesw-resize",e.nwseResize="nwse-resize",e.sResize="s-resize",e.seResize="se-resize",e.swResize="sw-resize",e.wResize="w-resize",e.ewResize="ew-resize",e.zoomIn="zoom-in",e.zoomOut="zoom-out",e}({});class QS extends RS{constructor(e,t){var n,r,o;super(),this.visualizer=void 0,this.symbol=JS.default,this.focusId="",this.id="cursor",this.color=XS("rgba(65, 60, 74, 0.16)"),this.x=void 0,this.y=void 0,this.offsetX=0,this.offsetY=0,this.width=2,this.handleMouseMove=e=>{const{container:t}=this.visualizer;this.offsetX=bS(t),this.offsetY=xS(t),this.x=wS(e,t),this.y=CS(e,t),this.invoke("mouseMove",[e,this]),this.visualizer.invoke("mouseMove",[e,this])},this.id=`cursor-${(0,R.Ak)()}`,this.visualizer=t,this.color=null!=e&&e.color?XS(e.color):this.color,this.x=null!=(n=e.x)?n:0,this.y=null!=(r=e.y)?r:0,this.width=null!=(o=e.width)?o:this.width,this.initialize()}initialize(){if(document.getElementById(this.id))return;const e=document.createElement("span"),t=document.body;e.id=this.id,e.style.display="none",e.style.position="absolute",this.apply(e),null==t||t.appendChild(e),this.set(this.symbol),document.addEventListener("mousemove",this.handleMouseMove)}apply(e){e.style.backgroundColor=this.color.toString(),e.style.width=`${this.width}px`,e.style.top="0px",e.style.zIndex="9998",e.style.pointerEvents="none"}show(){if(!this.shouldRender)return void this.hide();const e=document.getElementById(this.id);e&&(e.style.height=`${this.visualizer.height}px`,e.style.display="block",e.style.top=`${this.offsetY}px`,e.style.left=this.x+this.offsetX-e.clientWidth/2+"px")}hide(){const e=document.getElementById(this.id);e&&(e.style.display="none")}destroy(){var e;null==(e=document.getElementById(this.id))||e.remove(),document.removeEventListener("mousemove",this.handleMouseMove),super.destroy()}isOver(e,t,n,r){return!(this.x>e+n||this.y>t+r||this.x=o-i&&t-- >0;)s=e.substring(0,t),a=this.measureText(s).width;s+="..."}this.fillText(s,t,n,r)}measureText(e){if(!this.context)return{width:0};const t=this.context.measureText(e),n={};return ej.forEach((e=>{n[e]=t[e]})),n}save(){var e;null==(e=this.context)||e.save()}restore(){var e;null==(e=this.context)||e.restore()}beginPath(){var e;null==(e=this.context)||e.beginPath()}closePath(){var e;null==(e=this.context)||e.closePath()}stroke(){var e;null==(e=this.context)||e.stroke()}fill(){var e;null==(e=this.context)||e.fill()}copyToBuffer(){this.createBufferCanvas(),this._bufferContext.imageSmoothingEnabled=!1,this._bufferContext.clearRect(0,0,this._bufferCanvas.width,this._bufferCanvas.height),this._bufferContext.drawImage(this.canvas,0,0)}restoreFromBuffer(e=0,t=0){this.clear(),this.context.drawImage(this._bufferCanvas,e*this.pixelRatio,t*this.pixelRatio)}shift(e,t){this.copyToBuffer(),this.restoreFromBuffer(e,t)}set strokeStyle(e){this.context&&(this.context.strokeStyle=e)}get strokeStyle(){return this.context?this.context.strokeStyle:""}set fillStyle(e){this.context&&(this.context.fillStyle=e)}get fillStyle(){return this.context?this.context.fillStyle:""}set lineWidth(e){this.context&&(this.context.lineWidth=e*this.pixelRatio)}get lineWidth(){return this.context?this.context.lineWidth/this.pixelRatio:0}set font(e){this.context&&(this.context.font=e)}get font(){return this.context?this.context.font:""}clear(){this.context&&(this.context.globalAlpha=this.compositeAsGroup?mS(1.5*this.opacity,0,1):this.opacity,this.context.globalCompositeOperation=this.compositeOperation,this.context.imageSmoothingEnabled=!1,this.context.clearRect(0,0,this.width,this.height))}remove(){this.canvas instanceof HTMLCanvasElement&&this.canvas.remove()}appendTo(e){this.container=e,!this.offscreen&&this.canvas instanceof HTMLCanvasElement&&e.appendChild(this.canvas)}transferTo(e){try{if(!this.canvas)return;let t,n=1;if(e instanceof tj?(t=e.context,n=e.opacity):t=e.getContext("2d"),!t)return;this.compositeAsGroup&&(t.globalAlpha=this.opacity),this.height>0&&this.width>0&&t.drawImage(this.canvas,0,0,this.width,this.height),this.compositeAsGroup&&(t.globalAlpha=n)}catch(e){console.error(e)}}setSize(e,t){this.width=e,this.height=t}createCanvas(){if(this.group)return this.canvas=this.group.canvas,void(this._context=this.group.context);this.offscreen?this.canvas=this.createOffscreenCanvas():this.canvas=this.createVisibleCanvas(),this.offscreen&&this.canvas instanceof HTMLCanvasElement&&document.body.appendChild(this.canvas)}createVisibleCanvas(){var e,t;const n=document.createElement("canvas"),{pixelRatio:r}=this,o=this.container.clientWidth,i=null!=(e=this.options.height)?e:100;return n.id=`waveform-layer-${null!=(t=this.options.name)?t:"default"}`,n.width=o*r,n.height=this.isVisible?i*r:0,n.style.width=`${o}px`,n.style.height=`${i}px`,n.style.visibility=this.isVisible?"visible":"hidden",this._context=n.getContext("2d"),this._context.globalAlpha=this.compositeAsGroup?mS(1.5*this.opacity,0,1):this.opacity,this._context.globalCompositeOperation=this.compositeOperation,this._context.imageSmoothingEnabled=!1,n}createOffscreenCanvas(){let e;if(cS){var t;const{pixelRatio:n}=this,r=this.container.clientWidth,o=null!=(t=this.options.height)?t:100;e=new OffscreenCanvas(r*n,o*n),this._context=e.getContext("2d");const i=this.compositeAsGroup?mS(1.5*this.opacity,0,1):this.opacity;this._context.globalAlpha=i,this._context.globalCompositeOperation=this.compositeOperation,this._context.imageSmoothingEnabled=!1}else e=this.createVisibleCanvas(),Object.assign(e.style,{right:"100%",bottom:"100%",opacity:0,position:"absolute",visibility:this.isVisible?"visible":"hidden"});return e}createBufferCanvas(){if(this._bufferCanvas)return;let e;if(cS){const{pixelRatio:t}=this,n=this.canvas.width,r=this.canvas.height;e=new OffscreenCanvas(n*t,r*t),this._bufferContext=e.getContext("2d");const o=this.compositeAsGroup?mS(1.5*this.opacity,0,1):this.opacity;this._bufferContext.globalAlpha=o,this._bufferContext.globalCompositeOperation=this.compositeOperation,this._bufferContext.imageSmoothingEnabled=!1}else e=this.createVisibleCanvas(),Object.assign(e.style,{right:"100%",bottom:"100%",opacity:0,position:"absolute",visibility:"hidden"});this._bufferCanvas=e}}class nj extends tj{constructor(e){super(e),this.layers=void 0,this.layers=[]}get isGroup(){return!0}get length(){return this.layers.length}addLayer(e){const t=new tj(Object.assign({group:this},e));return this.layers.push(t),this.sortLayers(),t}removeLayer(e){this.layers=this.layers.filter((t=>t!==e))}remove(){this.layers.forEach((e=>{e.remove()})),this.layers=[],super.remove()}clear(){this.layers.forEach((e=>{e.clear()})),super.clear()}setSize(e,t){this.layers.forEach((n=>{n.setSize(e,t)})),super.setSize(e,t)}sortLayers(){this.layers.sort(((e,t)=>e.index-t.index))}}class rj extends RS{constructor(e,t,n){var r,o,i,a,s,l,c;if(super(),this.id=void 0,this.color=XS("#ccc"),this.fillColor=XS("#eee"),this.visualizer=void 0,this.layer=void 0,this.layerName=void 0,this.wf=void 0,this.capWidth=void 0,this.hoveredStrokeMultiplier=void 0,this._x=void 0,this.capHeight=void 0,this.capPadding=void 0,this.width=void 0,this.isHovered=!1,this.isDragging=!1,this.mouseDown=e=>{if(this.isVisible&&this.isHovered){e.preventDefault(),e.stopPropagation(),this.isDragging=!0,this.wf.cursor.set(JS.grabbing,"playhead");const t=e=>{if(this.isDragging){e.preventDefault(),e.stopPropagation();const t=this.visualizer.container.getBoundingClientRect(),n=e.clientX-t.left,r=mS(n,0,this.visualizer.width);r!==this._x&&(this.setX(r),this.wf.currentTime=jS(e,this.visualizer,this.wf.duration),this.render())}},n=e=>{this.isDragging&&(e.preventDefault(),e.stopPropagation(),this.isDragging=!1,document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n),this.render(),this.wf.cursor.set(JS.default))};document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),this.render()}},this.mouseEnter=()=>{this.isVisible&&!this.isDragging&&(this.wf.cursor.hasFocus()||this.wf.cursor.set(JS.grab,"playhead"),this.isHovered=!0,this.render())},this.mouseLeave=()=>{this.isVisible&&!this.isDragging&&(this.isHovered=!1,this.render(),this.wf.cursor.isFocused("playhead")&&this.wf.cursor.set(JS.default))},this.playing=(e,t=!0)=>{this.isDragging||this.updatePositionFromTime(e,!0,t)},this.onZoom=()=>{this.playing(this.time,!1)},this.onScroll=()=>{this.playing(this.time,!1)},this.toggleVisibility=()=>{this.isVisible?this.render():this.layer.clear()},(null!=(r=null==e?void 0:e.x)?r:0)<0)throw new Error("Playhead start must be greater than 0");this.id=(0,R.Ak)(5),this._x=null!=(o=e.x)?o:0,this.color=e.color?e.color:this.color,this.fillColor=e.fillColor?e.fillColor:this.fillColor,this.width=null!=(i=e.width)?i:1,this.visualizer=t,this.layerName="playhead",this.wf=n,this.capWidth=null!=(a=e.capWidth)?a:8,this.capHeight=null!=(s=e.capHeight)?s:5,this.capPadding=null!=(l=e.capPadding)?l:3,this.hoveredStrokeMultiplier=null!=(c=e.hoveredStrokeMultiplier)?c:2,this.initialize()}updatePositionFromTime(e,t=!1,n=!0){const r=(e/this.wf.duration-this.scroll)*this.fullWidth,o=n?mS(r,0,this.fullWidth):r;this.setX(o),this.isVisible&&t&&this.render()}initialize(){this.on("mouseDown",this.mouseDown),this.on("mouseEnter",this.mouseEnter),this.on("mouseLeave",this.mouseLeave),this.wf.on("playing",this.playing),this.wf.on("zoom",this.onZoom),this.wf.on("scroll",this.onScroll)}removeEvents(){this.off("mouseDown",this.mouseDown),this.off("mouseEnter",this.mouseEnter),this.off("mouseLeave",this.mouseLeave),this.wf.off("playing",this.playing),this.wf.off("zoom",this.onZoom),this.wf.off("scroll",this.onScroll),this.layer.off("layerUpdated",this.toggleVisibility)}get scroll(){return this.visualizer.getScrollLeft()}get zoom(){return this.wf.zoom}get isVisible(){var e,t;return null==(e=null==(t=this.layer)?void 0:t.isVisible)||e}get time(){return this.wf.currentTime}get x(){return this._x+this.scroll}get containerWidth(){return this.visualizer.container.clientWidth}get fullWidth(){return this.visualizer.fullWidth}render(){const{color:e,fillColor:t,layer:n,_x:r,isHovered:o,width:i,hoveredStrokeMultiplier:a}=this,{reservedSpace:s}=this.visualizer;null!=n&&n.isVisible&&(n.clear(),n.save(),n.fillStyle=t.toString(),n.strokeStyle=e.toString(),n.lineWidth=o?i*a:i,n.beginPath(),this.moveTo(r,s),n.closePath(),n.stroke(),n.fill(),n.restore())}moveTo(e,t){const{layer:n,capWidth:r,capHeight:o,capPadding:i,visualizer:a}=this,{height:s}=a,l=t-o-i,c=r/2;n.moveTo(e-c,l),n.lineTo(e+c,l),n.lineTo(e+c,l+o-1),n.lineTo(e,l+o),n.lineTo(e,s),n.lineTo(e,l+o),n.lineTo(e-c,l+o-1)}setX(e){this._x=e}setLayer(e){this.layer&&this.layer.off("layerUpdated",this.toggleVisibility),this.layer=e,this.layer.on("layerUpdated",this.toggleVisibility)}toJSON(){return{x:this.x,color:this.color.toString(),layerName:this.layerName,id:this.id}}destroy(){this.isDestroyed||(this.removeEvents(),super.destroy())}}class oj extends HTMLElement{constructor(){super(),this._loaded=void 0,this._total=void 0,this._initializing=!1,this._error="",this._loaded=0,this._total=0,this.attachShadow({mode:"open"}),this.shadowRoot&&(this.shadowRoot.innerHTML='\n \n
\n
\n
\n

Loading file...

\n
\n
\n 0.0 MB(0)%of?? MB\n
\n
\n
\n
\n ')}get error(){return this._error}set error(e){this._error=e}get loaded(){return this._loaded}set loaded(e){this._loaded=e}get total(){return this._total}set total(e){this._total=e}get value(){return Math.round(this.loaded/this.total*100)}convertBytesToMegabytes(e){return(e/1024/1024).toFixed(1)}update(){if(!this.shadowRoot)return;const e=this.shadowRoot.querySelector(".progress-bar"),t=this.shadowRoot.querySelector("#text"),n=this.shadowRoot.querySelector("#loaded"),r=this.shadowRoot.querySelector("#total"),o=this.shadowRoot.querySelector("#percentage");if(!e)return;const i=this.total;requestAnimationFrame((()=>{if(this._error)return t.classList.contains("error")||t.classList.add("error"),void(t.innerText=this._error);if(this._initializing)return n.innerText=`${this.loaded}`,r.innerText=`${this.total} chunks`,void(o.innerText=`(${this.value}%)`);if(i<0)return e.classList.contains("progress-bar-indeterminate")||e.classList.add("progress-bar-indeterminate"),void(this.loaded>0&&(n.innerText=`${this.convertBytesToMegabytes(this.loaded)} MB`));const a=this.value;if(100===a)return this._initializing=!0,this.total>0&&(n.innerText=`${this.convertBytesToMegabytes(this.loaded)} MB`,r.innerText=`${this.convertBytesToMegabytes(this.total)} MB`,o.innerText=`(${a}%)`),t.innerText="Initializing...",void e.classList.add("progress-bar-indeterminate");e.style.setProperty("--ls-loader-position",a-100+"%"),a>0&&(o.innerText=`(${a}%)`),this.loaded>0&&(n.innerText=`${this.convertBytesToMegabytes(this.loaded)} MB`),this.total>0&&(r.innerText=`${this.convertBytesToMegabytes(this.total)} MB`)}))}static get observedAttributes(){return["hidden"]}}customElements.define("loading-progress-bar",oj);class ij extends RS{constructor(e,t){var n,r,o,i,a,s,l,c,d,u,h,g,m,p,f,v;super(),n=this,this.wrapper=void 0,this.layers=new Map,this.observer=void 0,this.currentTime=0,this.audio=void 0,this.zoom=1,this.scrollLeft=0,this.drawing=!1,this.renderId=0,this.amp=1,this.seekLocked=!1,this.wf=void 0,this.waveContainer=void 0,this.playheadPadding=4,this.zoomToCursor=!1,this.autoCenter=!1,this.splitChannels=!1,this.padding={top:0,bottom:0,left:0,right:0},this.gridWidth=1,this.gridColor=XS("rgba(0, 0, 0, 0.1)"),this.backgroundColor=XS("#fff"),this.waveColor=XS("#000"),this.baseWaveHeight=96,this.originalWaveHeight=0,this.waveHeight=32,this.lastRenderedZoom=0,this.lastRenderedWidth=0,this.lastRenderedAmp=0,this.lastRenderedScrollLeftPx=0,this._container=void 0,this._loader=void 0,this.timelineHeight=dS.timelineHeight,this.timelinePlacement="top",this.maxZoom=1500,this.playhead=void 0,this.reservedSpace=0,this.samplesPerPx=0,this.invokeLayersUpdated=((e,t,{leading:n=!1}={})=>{let r;return(...o)=>{r&&clearTimeout(r),n&&e(...o),r=setTimeout((()=>e(...o)),t)}})((async function(){n.invoke("layersUpdated",[n.layers])}),150),this.playHeadMove=(e,t)=>{if(this.wf.loaded&&e.target&&this.container.contains(e.target)){const{x:n,y:r}=t,{playhead:o,playheadPadding:i,height:a}=this,s=this.reservedSpace-o.capHeight-o.capPadding;n>=o.x-i&&n<=o.x+o.width+i&&r>=s&&r<=a?(o.isHovered||o.invoke("mouseEnter",[e]),this.draw(!0)):o.isHovered&&(o.invoke("mouseLeave",[e]),this.draw(!0))}},this.handleSeek=e=>{var t;const n=this.getLayer("main");if(!this.wf.loaded||this.seekLocked||!e.target||null==n||null==(t=n.canvas)||!t.contains(e.target))return;const r=this.wrapper.getBoundingClientRect().left,o=e.clientX-r,i=this.wf.duration,a=this.scrollLeft+o/this.container.clientWidth/this.zoom,s=mS(o,0,this.width);this.playhead.setX(s),this.wf.currentTime=a*i},this.handleMouseDown=e=>{this.wf.loaded&&this.playhead.invoke("mouseDown",[e])},this.handlePlaying=e=>{this.wf.loaded&&(this.currentTime=e/this.wf.duration,this.draw(1===this.zoom))},this.handleScroll=e=>{if(this.wf.loaded)if(this.isZooming(e)){const t=this.zoom-.2*e.deltaY;this.setZoom(t),this.wf.invoke("zoom",[this.zoom])}else if(this.zoom>1){const t=this.scrollWidth,n=t/this.fullWidth*this.zoom,r=(0===Math.abs(e.deltaX)?e.deltaY:e.deltaX)*this.zoom*1.25,o=t*(this.scrollLeft*this.zoom),i=Math.max(0,o+r),a=mS(i/t,0,n)/this.zoom;a!==this.scrollLeft&&(this.wf.invoke("scroll",[a]),this.setScrollLeft(a))}},this.preventScrollX=e=>{const[t,n]=[Math.abs(e.deltaX),Math.abs(e.deltaY)];(t>=n||this.isZooming(e)&&n>=t)&&(e.preventDefault(),e.stopPropagation())},this.handleResize=()=>{this.wf.duration&&requestAnimationFrame((()=>{this.updateSize(),this.wf.renderTimeline(),this.resetWaveformRender(),this.draw(!1,!0)}))},this.wf=t,this.waveContainer=e.container,this.waveColor=e.waveColor?XS(e.waveColor):this.waveColor,this.padding=Object.assign({},this.padding,e.padding),this.playheadPadding=null!=(r=null==(o=e.playhead)?void 0:o.padding)?r:this.playheadPadding,this.zoomToCursor=null!=(i=e.zoomToCursor)?i:this.zoomToCursor,this.autoCenter=null!=(a=e.autoCenter)?a:this.autoCenter,this.splitChannels=null!=(s=e.splitChannels)?s:this.splitChannels,this.baseWaveHeight=null!=(l=e.height)?l:this.baseWaveHeight,this.originalWaveHeight=this.baseWaveHeight,this.timelineHeight=null!=(c=null==(d=e.timeline)?void 0:d.height)?c:this.timelineHeight,this.waveHeight=null!=(u=e.waveHeight)?u:this.waveHeight,this.timelinePlacement=null!=(h=null==e||null==(g=e.timeline)?void 0:g.placement)?h:this.timelinePlacement,this.gridColor=e.gridColor?XS(e.gridColor):this.gridColor,this.gridWidth=null!=(m=e.gridWidth)?m:this.gridWidth,this.backgroundColor=e.backgroundColor?XS(e.backgroundColor):this.backgroundColor,this.zoom=null!=(p=e.zoom)?p:this.zoom,this.amp=null!=(f=e.amp)?f:this.amp,this.playhead=new rj(Object.assign({},e.playhead,{x:0,color:XS("#000"),fillColor:XS("#BAE7FF"),width:null!=(v=e.cursorWidth)?v:1}),this,this.wf),this.initialRender(),this.attachEvents()}init(e){this.init=()=>hS("Visualizer is already initialized"),this.audio=e,this.setLoading(!1),this.setContainerHeight(),this.height===this.originalWaveHeight&&this.handleResize(),this.invoke("initialized",[this])}setLoading(e){e?(this._loader=document.createElement("loading-progress-bar"),this._container.appendChild(this._loader)):this._container.removeChild(this._loader)}setLoadingProgress(e,t,n){this._loader&&(n?this._loader.total=this._loader.loaded:(void 0!==e&&(this._loader.loaded=e),void 0!==t&&(this._loader.total=t)),this._loader.update())}setDecodingProgress(e,t){this._loader&&(void 0!==e&&(this._loader.loaded=e),void 0!==t&&(this._loader.total=t),this._loader.update())}setError(e){this._loader&&(this._loader.error=e,this._loader.update())}setZoom(e){this.zoom=mS(e,1,this.maxZoom),this.zoomToCursor?this.centerToCurrentTime():this.updatePosition(!1),this.getSamplesPerPx(),this.wf.invoke("zoom",[this.zoom]),this.draw()}getZoom(){return this.zoom}setScrollLeft(e,t=!0,n=!1){this.scrollLeft=e,t&&this.draw(!1,n)}getScrollLeft(){return this.scrollLeft}getScrollLeftPx(){return this.scrollLeft*this.fullWidth}lockSeek(){this.seekLocked=!0}unlockSeek(){this.seekLocked=!1}draw(e=!1,t=!1){var n=this;if(!this.isDestroyed){if(this.drawing&&!t)return hS("Concurrent render detected");this.drawing=!0,setTimeout((async function(){e||(n.drawMiddleLine(),n.wf.playing&&n.autoCenter&&n.centerToCurrentTime(),await n.renderAvailableChannels()),n.renderCursor(),n.invoke("draw",[n]),n.transferImage(),n.drawing=!1}))}}destroy(){this.isDestroyed||(this.invoke("destroy",[this]),this.clear(),this.playhead.destroy(),this.audio=null,this.removeEvents(),this.layers.forEach((e=>e.remove())),this.wrapper.remove(),super.destroy())}clear(){var e;null==(e=this.layers.get("main"))||e.clear(),this.transferImage()}getAmp(){return this.amp}setAmp(e){this.amp=mS(e,1,Number.POSITIVE_INFINITY),this.draw()}centerToCurrentTime(){if(1===this.zoom)return void(this.scrollLeft=0);const e=this.width/2/this.zoomedWidth;this.scrollLeft=mS(this.currentTime-e,0,1)}updateCursorToTime(e){this.playhead.updatePositionFromTime(e)}async renderAvailableChannels(){if(!this.audio)return;const e=this.getLayer("waveform");if(!e||!e.isVisible)return void(this.lastRenderedWidth=0);this.renderId=performance.now();const t=this.dataLength,n=this.getScrollLeftPx(),r=mS(n*this.samplesPerPx,0,t),o=mS(r+this.width*this.samplesPerPx,0,t),i=o-r,a=this.zoom,s=this.amp;if(this.width!==this.lastRenderedWidth||a!==this.lastRenderedZoom||s!==this.lastRenderedAmp||i<1e7)for(let t=0;t{if(this.isDestroyed||!this.audio)return o(!1);0===e&&t.clear();const i=this.renderSlice(t,s,n,r,e,0),u=()=>{if(this.renderId!==a)return o(!1);i.next().done?(this.lastRenderedWidth=this.width,this.lastRenderedZoom=c,this.lastRenderedAmp=d,this.lastRenderedScrollLeftPx=l,o(!0)):requestAnimationFrame(u)};u()}))}async renderPartialWave(e,t,n){var r,o;const i=this.renderId;let a=0;const s=null!=(r=null==(o=this.audio)?void 0:o.channelCount)?r:1,l=this.baseWaveHeight/s,c=this.getScrollLeftPx(),d=this.dataLength;let u=this.lastRenderedScrollLeftPx-c;if(u<1&&u>-1||!this.audio)return!1;u=Math.round(u);const h=u*this.samplesPerPx;this.lastRenderedScrollLeftPx=c,e.shift(u,0);for(let r=0;r{let s=t,c=n;u>0?(c=t+h,a=0):(s=n+h,a=mS(this.width+u-2,0,this.width)),c=mS(c+2*this.samplesPerPx,0,d);const g=this.renderSlice(e,l,s,c,r,a),m=()=>{if(this.renderId!==i)return o(!1);g.next().done?o(!0):requestAnimationFrame(m)};m()}))}*renderSlice(e,t,n,r,o,i=0){var a,s,l,c,d;const u=null==(a=this.audio)||null==(a=a.chunks)?void 0:a[o];if(!u)return;const h=u.length,g=null!=(s=null==(l=this.padding)?void 0:l.top)?s:0,m=null!=(c=null==(d=this.padding)?void 0:d.left)?c:0,p=t*o+(dS.timelinePlacement?this.reservedSpace:0),f=p+g+t/2;let v=0;e.save();const y=this.waveColor.toString();e.strokeStyle=y,e.fillStyle=y,e.lineWidth=1,e.beginPath(),e.moveTo(i,f);const b=performance.now();for(let o=0;o0;){const a=r-o,s=n.slice(a,a+this.samplesPerPx);b-performance.now()>10&&(yield),i>=0&&s.length>0&&this.renderChunk(s,e,t,i+m,p),i+=1,o=mS(o-this.samplesPerPx,0,r)}}catch(e){}}e.stroke(),e.restore()}renderChunk(e,t,n,r,o){t.save();yS(e).forEach((e=>{const i=n/2,a=e*this.amp*i;t.lineTo(r+1,o+i+a)})),t.restore()}renderCursor(){this.playhead.render()}drawMiddleLine(){this.useLayer("background",(e=>{if(e.clear(),e.isVisible){e.save(),e.fillStyle=this.backgroundColor.toString(),e.fillRect(0,0,this.width,this.height),e.restore(),e.lineWidth=this.gridWidth,e.strokeStyle=this.gridColor.toString();const t=(this.height+this.reservedSpace)/2;e.beginPath(),e.moveTo(0,t),e.lineTo(this.width,t),e.closePath(),e.stroke(),e.restore()}}))}get pixelRatio(){return window.devicePixelRatio}get width(){return this.container.clientWidth}get height(){var e,t;let n=0;const r=this.getLayer("timeline"),o=this.getLayer("waveform"),i=Math.max(this.originalWaveHeight,this.waveHeight*(this.splitChannels&&null!=(e=null==(t=this.audio)?void 0:t.channelCount)?e:1)+this.timelineHeight)-this.timelineHeight;return this.baseWaveHeight!==i&&(this.baseWaveHeight=i),n+=null!=r&&r.isVisible?this.timelineHeight:0,n+=null!=o&&o.isVisible?i:0,n}get scrollWidth(){return this.zoomedWidth-this.width}get fullWidth(){return this.zoomedWidth}get zoomedWidth(){return this.width*this.zoom}get container(){if(this._container)return this._container;let e=null;if(this.waveContainer instanceof HTMLElement?e=this.waveContainer:"string"==typeof this.waveContainer&&(e=document.querySelector(this.waveContainer)),!e)throw new Error("Container element does not exist.");return e.style.position="relative",this._container=e,e}initialRender(){this.container&&(this.container.style.height=`${this.baseWaveHeight}px`,this.createLayers()),this.drawMiddleLine(),this.transferImage()}createLayers(){var e;const{container:t}=this;this.wrapper=document.createElement("div"),this.wrapper.style.height="100%",this.createLayer({name:"main"}),this.createLayer({name:"background",offscreen:!0,zIndex:0,isVisible:!1}),this.createLayer({name:"waveform",offscreen:!0,zIndex:100}),this.createLayerGroup({name:"regions",offscreen:!0,zIndex:101,compositeOperation:"source-over"});const n=this.createLayer({name:"controls",offscreen:!0,zIndex:1e3});this.playhead.setLayer(n),null==(e=this.layers.get("main"))||e.appendTo(this.wrapper),t.appendChild(this.wrapper)}reserveSpace({height:e}){this.reservedSpace=e}createLayer(e){const{name:t,offscreen:n=!1,zIndex:r=1,opacity:o=1,compositeOperation:i="source-over",isVisible:a}=e;if(!e.groupName&&this.layers.has(t))throw new Error(`Layer ${t} already exists.`);const s={groupName:e.groupName,name:t,container:this.container,height:this.baseWaveHeight,pixelRatio:this.pixelRatio,index:r,offscreen:n,compositeOperation:i,opacity:o,isVisible:a};let l;if(e.groupName){const t=this.layers.get(e.groupName);if(!t||!t.isGroup)throw new Error(`LayerGroup ${e.groupName} does not exist.`);l=t.addLayer(s)}else l=new tj(s),this.layers.set(t,l);return this.invoke("layerAdded",[l]),l.on("layerUpdated",(()=>{const e=this.getLayer("main");this.setContainerHeight(),e&&(e.height=this.height),this.invokeLayersUpdated()})),l}createLayerGroup(e){const{name:t,offscreen:n=!1,zIndex:r=1,opacity:o=1,compositeOperation:i="source-over",compositeAsGroup:a=!0}=e;if(this.layers.has(t))throw new Error(`LayerGroup ${t} already exists.`);const s=new nj({name:t,container:this.container,height:this.baseWaveHeight,pixelRatio:this.pixelRatio,index:r,offscreen:n,compositeOperation:i,compositeAsGroup:a,opacity:o});return this.invoke("layerAdded",[s]),s.on("layerUpdated",(()=>{this.invokeLayersUpdated()})),this.layers.set(t,s),s}removeLayer(e){if(!this.layers.has(e))throw new Error(`Layer ${e} does not exist.`);const t=this.layers.get(e);t&&(this.invoke("layerRemoved",[t]),t.off("layerUpdated",this.invokeLayersUpdated),t.remove()),this.layers.delete(e)}getLayer(e){return this.layers.get(e)}getLayers(){return this.layers}useLayer(e,t){const n=this.layers.get(e);n&&t(n,n.context)}attachEvents(){this.observer=new ResizeObserver(this.handleResize),this.observer.observe(this.wrapper),this.wrapper.addEventListener("wheel",this.preventScrollX),this.wrapper.addEventListener("wheel",this.handleScroll,{passive:!0}),this.wrapper.addEventListener("click",this.handleSeek),this.wrapper.addEventListener("mousedown",this.handleMouseDown),this.on("mouseMove",this.playHeadMove),this.on("layerAdded",this.invokeLayersUpdated),this.on("layerRemoved",this.invokeLayersUpdated),this.wf.on("playing",this.handlePlaying),this.wf.on("seek",this.handlePlaying)}removeEvents(){this.observer.unobserve(this.wrapper),this.observer.disconnect(),this.wrapper.removeEventListener("wheel",this.preventScrollX),this.wrapper.removeEventListener("wheel",this.handleScroll),this.wrapper.removeEventListener("click",this.handleSeek),this.wrapper.removeEventListener("mousedown",this.handleMouseDown),this.off("mouseMove",this.playHeadMove),this.off("layerAdded",this.invokeLayersUpdated),this.off("layerRemoved",this.invokeLayersUpdated),this.wf.off("playing",this.handlePlaying),this.wf.off("seek",this.handlePlaying)}updatePosition(e=!0){if(!this.wf.loaded)return;const t=this.scrollWidth/this.fullWidth*this.zoom;this.setScrollLeft(mS(this.scrollLeft,0,t),e)}get dataLength(){var e,t;return null!=(e=null==(t=this.audio)?void 0:t.dataLength)?e:0}getSamplesPerPx(){const e=this.dataLength/this.fullWidth;return e!==this.samplesPerPx&&(this.samplesPerPx=e),this.samplesPerPx}isZooming(e){return e.ctrlKey||e.metaKey}setContainerHeight(){this.container.style.height=`${this.height}px`}updateSize(){const e=this.wrapper.clientWidth,t=this.height;this.getSamplesPerPx(),this.layers.forEach((n=>n.setSize(e,t)))}resetWaveformRender(){this.lastRenderedAmp=0,this.lastRenderedWidth=0,this.lastRenderedZoom=0,this.lastRenderedScrollLeftPx=0}transferImage(e=["background","waveform","regions","controls"]){const t=this.layers.get("main");if(t.clear(),e){Array.from(this.layers).sort(((e,t)=>e[1].index-t[1].index)).filter((([e,t])=>t.offscreen)).forEach((([e,n])=>{"main"!==e&&n.transferTo(t)}))}}}class aj extends RS{constructor(e,t,n,r){var o,i,a,s,l,c;if(super(),this.id=void 0,this.start=0,this.end=0,this.color=XS("#afafaf"),this.selected=!1,this.highlighted=!1,this.active=!1,this.updateable=!0,this.locked=!1,this.deleteable=!0,this.visible=!0,this.showInTimeline=!1,this.external=!1,this.waveform=void 0,this.visualizer=void 0,this.controller=void 0,this.layer=void 0,this.handleWidth=void 0,this.isDragging=void 0,this.draggingStartPosition=void 0,this.isGrabbingEdge=void 0,this.switchCursor=(e,t=!0)=>{this.waveform.cursor.set(e,t&&this.requiresCursorFocus(e)?this.layerName:"")},this.edgeGrabCheck=e=>{const{handleWidth:t,end:n,start:r,visualizer:o}=this,{zoomedWidth:i}=this.visualizer,{duration:a}=this.waveform,s=jS(e,o,a),l=SS(t,i,a);return{isRightEdge:s>n-l,isLeftEdge:s{if(!this.updateable||!this.controller.layerGroup.isVisible)return;const n=this.edgeGrabCheck(t);this.isDragging||(n.isRightEdge||n.isLeftEdge?this.switchCursor(JS.colResize):this.switchCursor(JS.grab))},this.handleMouseUp=e=>{this.updateable&&(this.isDragging&&(this.switchCursor(JS.grab),this.handleUpdateEnd()),this.handleSelected(),this.waveform.invoke("regionSelected",[this,e]),this.isDragging=!1,this.draggingStartPosition=null,this.isGrabbingEdge={isRightEdge:!1,isLeftEdge:!1},document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleMouseUp))},this.handleDrag=e=>{if(this.updateable&&!this.locked&&this.draggingStartPosition){e.preventDefault(),e.stopPropagation(),this.isDragging=!0;const{isRightEdge:t,isLeftEdge:n}=this.isGrabbingEdge,{grabPosition:r,start:o,end:i}=this.draggingStartPosition,a=t||n,{container:s,zoomedWidth:l}=this.visualizer,{duration:c}=this.waveform,d=this.visualizer.getScrollLeft();let u=wS(e,s)+d;u<0&&(u=0);const h=SS(u-r,l,c),g=i-o,m=n?o+h:mS(o+h,0,this.duration-g),p=t?o:m,f=n?i:mS(i+h,m+(a?0:g),this.duration);t||n?this.switchCursor(JS.colResize):this.switchCursor(JS.grabbing),this.updatePosition(mS(p,0,c),mS(f,0,c))}},this.mouseDown=(e,t)=>{if(!this.updateable||!this.controller.layerGroup.isVisible)return;if(this.controller.isOverrideKeyPressed(t)||this.controller.isLocked)return;const{container:n}=this.visualizer,r=this.visualizer.getScrollLeft(),o=wS(t,n)+r,{start:i,end:a}=this;this.bringToFront(),this.draggingStartPosition={grabPosition:o,start:i,end:a},this.isGrabbingEdge=this.edgeGrabCheck(t),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("mousemove",this.handleDrag)},this.handleSelected=e=>{!this.updateable||this.isDragging&&this.selected||(this.waveform.playing&&this.waveform.player.pause(),this.selected=null!=e?e:!this.selected,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this]))},this.handleHighlighted=e=>{!this.updateable||this.isDragging&&this.selected||(this.highlighted=null!=e?e:!this.highlighted,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this]))},e.start<0)throw new Error("Segment start must be greater than 0");if(e.end<0)throw new Error("Segment end must be greater than 0");this.id=null!=(o=e.id)?o:(0,R.Ak)(5),this.start=e.start,this.end=e.end,this.selected=!!e.selected,this.updateable=null!=(i=e.updateable)?i:this.updateable,this.locked=null!=(a=e.locked)?a:this.locked,this.visible=null!=(s=e.visible)?s:this.visible,this.waveform=t,this.visualizer=n,this.controller=r,this.handleWidth=2,this.isDragging=!1,this.draggingStartPosition=null,this.isGrabbingEdge={isRightEdge:!1,isLeftEdge:!1},this.showInTimeline=null!=(l=e.showInTimeline)?l:this.showInTimeline,this.external=null!=(c=e.external)?c:this.external,this.initialize()}get isRegion(){return!1}update(e){(this.updateable||void 0===e.updateable||e.updateable)&&(void 0!==e.updateable&&(this.updateable=e.updateable),void 0!==e.deleteable&&(this.deleteable=e.deleteable),void 0!==e.locked&&(this.locked=e.locked),void 0!==e.start&&(this.start=e.start),void 0!==e.end&&(this.end=e.end),void 0!==e.selected&&(this.selected=e.selected),void 0!==e.visible&&(this.visible=e.visible),void 0!==e.color&&(this.color=XS(e.color)),void 0!==e.showInTimeline&&(this.showInTimeline=e.showInTimeline),void 0!==e.external&&(this.external=e.external))}setVisibility(e){e!==this.visible&&(this.visible=e,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this]))}bringToFront(){this.controller.bringRegionToFront(this.id)}get layerName(){return`region-${this.id}`}get duration(){return this.waveform.duration}get zoom(){return this.waveform.zoom}get xStart(){const{width:e}=this.visualizer,t=this.visualizer.getScrollLeft();return(this.start/this.duration*e-e*t)*this.zoom}get xEnd(){return this.xStart+this.width}get yStart(){const{timelinePlacement:e,timelineHeight:t}=this,n=this.visualizer.getLayer("timeline"),r=e===dS.timelinePlacement;return null!=n&&n.isVisible&&r?t:0}get yEnd(){const{height:e}=this.visualizer,{timelineHeight:t}=this;return this.yStart+(e-t)}get width(){const{start:e,end:t}=this,{width:n}=this.visualizer;return(t-e)/this.waveform.duration*n*this.zoom}get hovered(){return this.controller.isHovered(this)}get timelineHeight(){return this.visualizer.timelineHeight||dS.timelineHeight}get timelinePlacement(){return this.visualizer.timelinePlacement||dS.timelinePlacement}get options(){return{start:this.start,end:this.end,id:this.id,selected:this.selected,updateable:this.updateable,locked:this.locked,deleteable:this.deleteable,visible:this.visible}}get inViewport(){const{xStart:e,xEnd:t}=this,n=this.visualizer.width;return!(e<=0&&t<=0)&&!(e>=n&&t>=n)}requiresCursorFocus(e){return![JS.crosshair].includes(e)}initialize(){this.layer=this.visualizer.createLayer({groupName:"regions",name:this.layerName}),this.on("mouseOver",this.mouseOver),this.on("mouseDown",this.mouseDown)}render(){if(!this.visible||!this.inViewport)return;const{color:e,selected:t,highlighted:n,active:r}=this,{height:o}=this.visualizer,i=e.clone(),a=this.yStart,s=this.controller.layerGroup;(t||n||r)&&i.darken(.4),s.fillStyle=i.clone().translucent(.77).toString(),s.fillRect(this.xStart,a,this.width,o),s.fillStyle=t?i.toString():i.clone().translucent(.6).toString(),s.fillRect(this.xStart,a,this.handleWidth,o),s.fillRect(this.xEnd-this.handleWidth,a,this.handleWidth,o)}handleUpdateEnd(){this.invoke("updateEnd",[this]),this.waveform.invoke("regionUpdatedEnd",[this])}setColor(e){this.color.update(e)}setLocked(e){this.locked=e,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this])}updateColor(e){this.updateable&&(this.setColor(e),this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this]))}updatePosition(e,t){if(!this.updateable)return;let n=null!=e?e:this.start,r=null!=t?t:this.end;n>r&&([n,r]=[r,n]),this.start=n,this.end=r,this.invoke("update",[this]),this.waveform.invoke("regionUpdated",[this])}scrollToRegion(){this.waveform.scrollToRegion(this.start)}convertToRegion(e,t=!1){if(this.updateable)return this.controller.convertToRegion(this.id,e,t)}convertToSegment(e=!1){if(this.updateable)return this.controller.convertToSegment(this.id,e)}remove(){this.deleteable&&this.waveform.invoke("regionRemoved",[this])}destroy(e=!0){this.deleteable&&!this.isDestroyed&&(e&&this.remove(),super.destroy())}toJSON(){return{start:this.start,end:this.end}}}class sj extends aj{constructor(e,t,n,r){var o;super(e,t,n,r),this.labels=void 0,this.labels=null!=(o=e.labels)?o:this.labels,this.color=e.color?XS(e.color):this.color}get isRegion(){return!0}get options(){return Object.assign({},super.options,{labels:this.labels,color:this.color.toString()})}renderLabels(){var e;if(null!=(e=this.labels)&&e.length&&this.controller.showLabels&&this.visible){const e=this.controller.layerGroup,t=this.color,n=this.timelinePlacement,r=this.visualizer.getLayer("timeline"),o=this.timelineHeight,i=(null!=r&&r.isVisible&&n?o:0)+4,a=this.labels.map((t=>e.context.measureText(t))),s=a.reduce(((e,t)=>e+t.fontBoundingBoxAscent+t.fontBoundingBoxDescent+2),0),l=this.xStart+this.handleWidth+2,c=a[0].width+10,d=this.xEnd-this.xStart-2*this.handleWidth,u=d{const r=s/a.length*(n+1)-1;e.fitText(t,l+6,i+r,h-this.handleWidth-6)}))}}render(){super.render(),this.renderLabels()}update(e){var t;super.update(e),this.labels=null!=(t=e.labels)?t:this.labels,this.color=e.color?XS(e.color):this.color}toJSON(){return{start:this.start,end:this.end,color:this.color.toString(),labels:this.labels,layerName:this.layerName,id:this.id}}}class lj{constructor(e,t,n){var r,o,i,a,s;this.regions=[],this.waveform=void 0,this.visualizer=void 0,this.initialRegions=void 0,this.locked=!1,this.hoveredRegions=new Set,this.defaultColor=XS("#787878"),this.drawingColor=XS("#787878"),this.labels=void 0,this.createable=!0,this.updateable=!0,this.deleteable=!0,this.drawableTarget=aj,this.showLabels=!1,this.layerGroup=void 0,this.handleDraw=()=>{this.waveform.loaded&&this.renderAll()},this.handleInit=()=>{this.initialRegions.length&&(this.regions=this.initialRegions.map((e=>new sj(e,this.waveform,this.visualizer,this))),this.initialRegions=[]),this.visualizer.on("draw",this.handleDraw)},this.handleRegionUpdated=()=>{this.visualizer.draw(!0)},this.handleRegionRemoved=e=>{this.removeRegion(e.id)},this.handleDrawRegion=e=>{if(this.locked||!this.createable)return;if(this.hoveredRegions.size>0&&!this.isOverrideKeyPressed(e))return;if(!this.layerGroup.isVisible)return;let t,n;this.lock(),this.waveform.invoke("beforeRegionsDraw",[this]);const r=()=>{const{container:r,zoomedWidth:o,fullWidth:i}=this.visualizer,{autoPlayNewSegments:a,duration:s}=this.waveform,l=this.visualizer.getScrollLeftPx();n=mS(wS(e,r)+l,0,i);const c=SS(n,o,s),d=SS(n,o,s);t=this.addRegion({start:c,end:d,color:this.drawingColor.toString(),selected:!1,labels:this.labels}),a&&!t.isRegion&&this.regions.forEach((e=>e.handleSelected(e.id===t.id)))},o=e=>{const{container:o,fullWidth:i}=this.visualizer,a=this.visualizer.getScrollLeftPx(),s=mS(wS(e,o)+a,0,i);if(t||r(),Math.abs(s-n)>5){let e=this.pixelsToTime(n),r=this.pixelsToTime(s);r{const{player:e,autoPlayNewSegments:n}=this.waveform;document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i),t&&t.start===t.end?(t.remove(),this.unlock()):t?(this.waveform.invoke("regionCreated",[t]),n&&!t.isRegion&&(e.playing&&e.pause(),e.play()),setTimeout((()=>this.unlock()),0)):this.unlock(),this.waveform.invoke("afterRegionsDraw",[this])};document.addEventListener("mousemove",o),document.addEventListener("mouseup",i)},this.handleMouseMove=e=>{const t=this.findRegionUnderCursor(e);t?(t.invoke("mouseOver",[t,e]),t.hovered||(this.hoveredRegions.clear(),this.hover(t,e))):this.hoveredRegions.size&&(this.hoveredRegions.forEach((t=>{t.invoke("mouseLeave",[t,e])})),this.hoveredRegions.clear(),this.cursorLockedByPlayhead||this.waveform.cursor.set(JS.crosshair))},this.handleMouseLeave=e=>{this.hoveredRegions.size&&(this.hoveredRegions.forEach((t=>{t.invoke("mouseLeave",[t,e])})),this.hoveredRegions.clear())},this.handleMouseDown=e=>{if(!this.updateable)return;const t=this.findRegionUnderCursor(e);this.layerGroup.isVisible&&null!=t&&t.updateable&&(e.preventDefault(),e.stopPropagation(),t.invoke("mouseDown",[t,e]))},this.handleMouseUp=e=>{if(!this.updateable)return;const t=this.findRegionUnderCursor(e);this.layerGroup.isVisible&&null!=t&&t.updateable&&t.invoke("mouseUp",[t,e])},this.handleClick=e=>{var t;const n=this.visualizer.getLayer("main");if(e.target&&null!=n&&null!=(t=n.canvas)&&t.contains(e.target)){const t=this.findRegionUnderCursor(e);this.layerGroup.isVisible&&t&&t.invoke("click",[t,e])}},this.waveform=t,this.visualizer=n,this.initialRegions=null!=(r=null==e?void 0:e.regions)?r:[],this.defaultColor=null!=e&&e.defaultColor?XS(e.defaultColor):this.defaultColor,this.labels=void 0,this.createable=null!=(o=null==e?void 0:e.createable)?o:this.createable,this.updateable=null!=(i=null==e?void 0:e.updateable)?i:this.updateable,this.deleteable=null!=(a=null==e?void 0:e.deleteable)?a:this.deleteable,this.layerGroup=this.visualizer.getLayer("regions"),this.showLabels=null!=(s=this.waveform.params.showLabels)&&s,this.init()}init(){this.visualizer.on("initialized",this.handleInit),this.waveform.on("regionRemoved",this.handleRegionRemoved),this.waveform.on("regionUpdated",this.handleRegionUpdated),this.visualizer.container.addEventListener("mousedown",this.handleDrawRegion);const{container:e}=this.visualizer;e.addEventListener("mousemove",this.handleMouseMove),e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("mouseup",this.handleMouseUp),e.addEventListener("click",this.handleClick),e.addEventListener("mouseleave",this.handleMouseLeave)}renderAll(){this.layerGroup.clear();const e=this.waveform.currentTime;this.regions.forEach((t=>{t.active=t.start<=e&&t.end>=e,t.render()}))}regionDrawableTarget(){this.drawableTarget=sj}segmentDrawableTarget(){this.drawableTarget=aj}resetDrawableTarget(){this.segmentDrawableTarget()}clearSegments(e=!1){this.regions=this.regions.filter((t=>!!(t.isRegion||e&&!t.selected||t.external)||(t.destroy(),!1)))}addRegions(e,t=!0){e.forEach((e=>this.addRegion(e,!1))),t&&this.redraw()}addRegion(e,t=!0){var n;let r;return r=null!=(n=e.labels)&&n.length||this.drawableTarget===sj?new sj(e,this.waveform,this.visualizer,this):new aj(e,this.waveform,this.visualizer,this),this.regions.push(r),t&&this.redraw(),r}findRegion(e){return this.regions.find((t=>t.id===e))}convertToRegion(e,t,n=!0){let r=this.findRegion(e);const o=this.regions.findIndex((t=>t.id===e));return r=new sj(Object.assign({},r.options,{labels:t}),this.waveform,this.visualizer,this),this.regions[o]=r,n&&this.redraw(),r}convertToSegment(e,t=!0){let n=this.findRegion(e);const r=this.regions.findIndex((t=>t.id===e));return n=new aj(n.options,this.waveform,this.visualizer,this),this.regions[r]=n,t&&this.redraw(),n}updateRegion(e,t=!0){if(!this.updateable||!e.id)return;const n=this.findRegion(e.id);return n?(n.update(e),t&&this.redraw(),n):void 0}redraw(){this.visualizer.draw(!0)}removeRegion(e,t=!0){const n=this.findRegion(e);this.deleteable&&null!=n&&n.deleteable&&(n.destroy(!1),this.regions=this.regions.filter((e=>e!==n))),t&&this.redraw()}bringRegionToFront(e){const t=this.regions.findIndex((t=>t.id===e));this.regions.push(...this.regions.splice(t,1))}destroy(){const{container:e}=this.visualizer;this.visualizer.off("initialized",this.handleInit),this.visualizer.off("draw",this.handleDraw),this.waveform.off("regionRemoved",this.handleRegionRemoved),this.waveform.off("regionUpdated",this.handleRegionUpdated),e.removeEventListener("mousemove",this.handleMouseMove),e.removeEventListener("mousedown",this.handleMouseDown),e.removeEventListener("mouseup",this.handleMouseUp),e.removeEventListener("click",this.handleClick),e.removeEventListener("mouseleave",this.handleMouseLeave),this.regions.forEach((e=>e.destroy())),this.regions=[]}setDrawingColor(e){this.drawingColor=XS(e)}updateLabelVisibility(e){this.showLabels=e,this.redraw()}setLabels(e){e&&(this.labels=e)}resetDrawingColor(){this.drawingColor=this.defaultColor.clone()}resetLabels(){this.labels=void 0}get list(){return Array.from(this.regions)}get selected(){return this.regions.filter((e=>e.selected))}get timelineRegions(){return this.regions.filter((e=>e.showInTimeline))}get visible(){return this.regions.filter((e=>e.visible))}isOverrideKeyPressed(e){return e.shiftKey}get cursorLockedByPlayhead(){return this.waveform.cursor.hasFocus()&&this.waveform.cursor.isFocused("playhead")}findRegionUnderCursor(e){return((e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n]))return e[n]})(this.visible,(t=>this.cursorInRegion(e,t)))}cursorInRegion(e,t){const{xStart:n,width:r}=t,{container:o,timelinePlacement:i,timelineHeight:a=0,height:s}=this.visualizer,l=this.visualizer.getLayer("timeline"),c=i===dS.timelinePlacement&&null!=l&&l.isVisible?a:0,d=wS(e,o),u=CS(e,o);if(!fS(d,n,n+r))return!1;return fS(u,c,c+s-a)}lock(){this.locked=!0,this.visualizer.lockSeek()}unlock(){this.locked=!1,this.visualizer.unlockSeek()}get isLocked(){return this.locked}hover(e,t){t&&(this.visualizer.lockSeek(),e.invoke("mouseEnter",[e,t])),this.hoveredRegions.add(e)}unhover(e,t){t&&(this.visualizer.unlockSeek(),e.invoke("mouseLeave",[e,t])),this.hoveredRegions.delete(e)}pixelsToTime(e){const{zoomedWidth:t}=this.visualizer,{duration:n}=this.waveform;return e/t*n}toJSON(){return this.regions.map((e=>e.toJSON()))}isHovered(e){return this.hoveredRegions.has(e)}}class cj{constructor(e,t,n){var r,o,i,a,s,l;this.waveform=void 0,this.visualizer=void 0,this.layer=void 0,this.placement=void 0,this.padding={left:0,right:0,top:0,bottom:0},this.height=dS.timelineHeight,this.initHeight=dS.timelineHeight,this.fontSize=12,this.gridWidth=1,this.fontFamily="Arial",this.fontColor=XS("#413C4A"),this.selectionColor=XS("rgba(65, 60, 74, 0.08)"),this.gridColor=XS("rgba(137,128,152,0.16)"),this.backgroundColor=XS("#fff"),this._labeMaxWidth={true:0,false:0},this.waveform=t,this.visualizer=n,this.placement=(null==e?void 0:e.placement)||dS.timelinePlacement,this.padding=Object.assign({},this.padding,null==e?void 0:e.padding),this.fontSize=null!=(r=null==e?void 0:e.fontSize)?r:this.fontSize,this.fontFamily=null!=(o=null==e?void 0:e.fontFamily)?o:this.fontFamily,this.height=(null!=(i=null==e?void 0:e.height)?i:dS.timelinePlacement)?null!=(a=null==e?void 0:e.height)?a:dS.timelineHeight:this.height,this.initHeight=this.height,this.gridWidth=null!=(s=null==e?void 0:e.gridWidth)?s:this.gridWidth,this.fontColor=null!=e&&e.fontColor?XS(null==e?void 0:e.fontColor):this.fontColor,this.selectionColor=null!=(l=null==e?void 0:e.selectedColor)?l:this.selectionColor,this.gridColor=null!=e&&e.gridColor?XS(null==e?void 0:e.gridColor):this.gridColor,this.backgroundColor=null!=e&&e.backgroundColor?XS(null==e?void 0:e.backgroundColor):this.backgroundColor,this.visualizer.reserveSpace({height:this.height}),this.layer=this.visualizer.createLayer({name:"timeline",offscreen:!0,zIndex:103}),this.visualizer.on("initialized",(()=>{this.visualizer.on("draw",(()=>this.render()))})),this.layer.on("layerUpdated",(()=>{this.height=this.layer.isVisible?this.initHeight:0,this.visualizer.reserveSpace({height:this.height}),this.render()}))}render(){var e;const{width:t}=this.visualizer,n=this.height,r=this.layer,o=this.visualizer.height-n,i=this.gridWidth,a=this.gridColor.toString(),s=this.backgroundColor.toString(),l=this.placement,c="top"===l?0:o,d="top"===l&&(null==(e=this.padding)?void 0:e.left)||0;r.clear(),this.layer.isVisible&&(r.lineWidth=i,r.strokeStyle=a,r.fillStyle=s,r.beginPath(),r.fillRect(0,c,t+d,n),this.renderTimelineRegions(),this.renderSelected(),this.renderIntervals(),r.fillStyle=a,r.fillRect(0,c+n,t+d,i),r.stroke())}renderTimelineRegions(){var e;const t=null==(e=this.waveform)?void 0:e.regions.timelineRegions;if(t.length){const{height:e}=this,{duration:n}=this.waveform,{zoomedWidth:r}=this.visualizer,o=this.visualizer.getScrollLeftPx(),i=this.waveform.currentTime;t.sort(((e,t)=>e.start-t.start)).forEach((t=>{const{end:a,start:s,selected:l,color:c}=t,d=s<=i&&a>=i,u=s*r/n-o,h=(a-s)*r/n,g=this.layer,m=c.clone();d&&m.darken(l?.3:.4),g.fillStyle=m.translucent(.8).toString(),g.fillRect(u,0,h,e)}))}}renderSelected(){var e;const t=null==(e=this.waveform)?void 0:e.regions.selected;if(t.length){const{selectionColor:e,height:n}=this,{duration:r}=this.waveform,{zoomedWidth:o}=this.visualizer,i=this.visualizer.getScrollLeftPx(),a=t.sort(((e,t)=>e.start-t.start))[0].start,s=a*o/r-i,l=(t.sort(((e,t)=>t.end-e.end))[0].end-a)*o/r,c=0,d=this.layer;d.fillStyle=e.toString(),d.fillRect(s,c,l,n)}}renderInterval(e){var t;const{pixelRatio:n,height:r}=this.visualizer,o=this.fontSize,i=this.height,a=r-i,s=this.placement,l=this.layer,c="top"===s?0:a,d="top"===s&&(null==(t=this.padding)?void 0:t.left)||0,u="top"===s?"label"===e.type?.75*i:.875*i:c,h="top"===s?"label"===e.type?.25*i:.125*i:"label"===e.type?i/2:i/3;if(l.moveTo(e.x+d,u),l.lineTo(e.x+d,u+h),"label"===e.type){var g;const t=this.formatTime(1e3*e.time,e.includeMs),r="top"===s?e.x-this.getDownscaledTextWidth(l,t)/2:e.x+((null==(g=this.padding)?void 0:g.left)||6);l.fillStyle=this.fontColor.toString(),l.font=`${o*n}px ${this.fontFamily}`,l.fillText(t,r,"top"===s?c+.75*i/2+o/2-this.gridWidth:c+i-8)}}getDownscaledTextWidth(e,t){const{pixelRatio:n}=this.visualizer;return e.measureText(t).width/n}renderIntervals(){const{width:e}=this.visualizer,t=this.visualizer.getScrollLeftPx(),n=this.mapToTime(e),[r,o]=this.getIntervals(n),i=this.mapToTime(Math.abs(t)),a=Math.floor(i/r)*r,s=a+n,l=n<60,c=10**10;for(let e=a;e6?a=10**r*7.5:i>4?a=10**r*5:i>2?a=10**r*2.5:i>1&&(a=10**r*1.25);const s=e<60,l=Math.ceil((this.getLabelMaxWidth(s)+2*this.getLabelPadding())/this.mapToPx(a))*a,c=Math.floor(Math.log10(l)),d=Math.ceil(l/10**c);let u=pS(10,c);return d>5?u=10**c*7.5:d>3?u=10**c*5:d>2?u=10**c*2.5:d>1&&(u=10**c*1.25),[a,u]}formatTime(e,t=!1){const n=e>3600?11:14,r=t?23:19;return new Date(e).toISOString().substring(n,r)}}class dj extends RS{constructor(e){var t,n;super(),this.src=void 0,this.media=void 0,this.visualizer=void 0,this.timeline=void 0,this.focusTimeout=null,this.tooltip=void 0,this.cursor=void 0,this.player=void 0,this.params=void 0,this.regions=void 0,this.loaded=!1,this.renderedChannels=!1,this.autoPlayNewSegments=!1,this.handleDrawn=()=>{const e={width:this.visualizer.width,height:this.visualizer.height,zoom:this.zoom,scroll:this.visualizer.getScrollLeftPx()};this.invoke("frameDrawn",[e])},this.handleCursorMove=e=>{if(e.target&&this.visualizer.container.contains(e.target)){if(this.loaded&&this.cursor.inView){var t;this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout((()=>{this.cursor.hasFocus()||this.cursor.set(JS.crosshair)}),1);const n=jS(e,this.visualizer,this.duration),r=null==(t=new Date(1e3*n).toISOString().match(/T(.*?)Z/))?void 0:t[1];this.tooltip.show(e.pageX,e.pageY+16,r)}else this.cursor.set(JS.default);this.cursor.show()}else this.cursor.hide(),this.tooltip.hide()},null!=e&&e.timeline||(e.timeline={placement:"top"}),e.decoderType=null!=(t=e.decoderType)?t:"webaudio",e.playerType="ffmpeg"===e.decoderType?"html5":null!=(n=e.playerType)?n:"html5",this.src=e.src,this.params=e,this.init()}init(){var e,t,n,r,o,i,a;this.media=new NS(this,{src:this.src}),this.tooltip=new qS(null==(e=this.params)?void 0:e.tooltip),this.visualizer=new ij(this.params,this),this.cursor=new QS(Object.assign({x:0,y:0,width:null!=(t=null==(n=this.params)?void 0:n.cursorWidth)?t:1},null==(r=this.params)?void 0:r.cursor),this.visualizer),this.timeline=new cj(Object.assign({gridColor:this.params.gridColor,gridWidth:this.params.gridWidth},null==(o=this.params)?void 0:o.timeline),this,this.visualizer),this.regions=new lj(Object.assign({},null==(i=this.params)?void 0:i.regions),this,this.visualizer),this.autoPlayNewSegments=null!=(a=this.params.autoPlayNewSegments)?a:this.autoPlayNewSegments,this.player="html5"===this.params.playerType?new zS(this):new BS(this),this.initEvents(),this.loadingState()}renderTimeline(){this.timeline.render()}loadingState(){this.visualizer.setLoading(!0),this.renderTimeline(),this.visualizer.draw(!0)}async load(){var e,t,n;if(this.isDestroyed)return;const r=this.media.load({muted:null!=(e=this.params.muted)&&e,volume:null!=(t=this.params.volume)?t:1,rate:null!=(n=this.params.rate)?n:1});this.media.decoderPromise&&(await this.media.decoderPromise,this.renderTimeline(),this.visualizer.draw(!0));const o=await r;this.isDestroyed||o&&("webaudio"===this.params.playerType&&(this.media.duration=o.duration,this.renderTimeline(),this.visualizer.draw(!0)),this.player.init(o),this.visualizer.init(o),this.loaded=!0,this.invoke("load"))}syncCursor(){const e=this.currentTime;this.visualizer.updateCursorToTime(e),this.visualizer.draw(!0)}seek(e){this.player.seek(e)}seekForward(e){var t;this.seek(this.currentTime+(null!=(t=null!=e?e:this.params.seekStep)?t:1))}seekBackward(e){var t;this.seek(this.currentTime-(null!=(t=null!=e?e:this.params.seekStep)?t:1))}scrollToRegion(e){if(1===this.zoom)return;const t=this.visualizer.width/2/this.visualizer.zoomedWidth,n=mS(e/this.duration-t,0,1);this.visualizer.setScrollLeft(n,!0,!0),this.invoke("scroll",[n])}play(e,t){this.player.play(e,t)}pause(){this.player.pause()}togglePlay(){this.playing?this.pause():this.play()}setLoadingProgress(e,t,n){this.visualizer.setLoadingProgress(e,t,n)}setDecodingProgress(e,t){this.visualizer.setDecodingProgress(e,t)}setError(e,t){this.invoke("error",[t||new Error(e)]),this.visualizer.setError(e)}stop(){this.player.stop()}destroy(){this.isDestroyed||(this.regions.destroy(),this.media.destroy(),this.player.destroy(),this.visualizer.destroy(),this.cursor.destroy(),this.tooltip.destroy(),super.destroy())}addRegions(e,t=!0){this.regions.addRegions(e,t)}addRegion(e,t=!0){return this.regions.addRegion(e,t)}updateRegion(e,t=!0){return this.regions.updateRegion(e,t)}updateLabelVisibility(e){this.regions.updateLabelVisibility(e)}removeRegion(e,t=!0){this.regions.removeRegion(e,t)}getLayers(){return this.visualizer.getLayers()}getLayer(e){return this.visualizer.getLayer(e)}get playing(){return this.player.playing}get zoom(){return this.visualizer.getZoom()}set zoom(e){this.visualizer.setZoom(e)}get volume(){return this.player.volume}set volume(e){this.player.volume=e}get muted(){return this.player.muted}set muted(e){this.player.muted=e}get scroll(){return this.duration*this.visualizer.getScrollLeft()/this.zoom*1e3}set scroll(e){const t=e/this.duration*this.zoom;this.visualizer.setScrollLeft(t),this.invoke("scroll",[t])}get rate(){return this.player.rate}set rate(e){this.player.rate=e}get currentTime(){return this.player.currentTime}set currentTime(e){this.setCurrentTime(e,!0)}setCurrentTime(e,t=!1){t?this.player.seek(e):this.player.seekSilent(e)}get amp(){return this.visualizer.getAmp()}set amp(e){this.visualizer.setAmp(e)}get duration(){return this.media.duration}get sampleRate(){return this.media.sampleRate}initEvents(){this.cursor.on("mouseMove",this.handleCursorMove),this.visualizer.on("layersUpdated",(()=>this.invoke("layersUpdated",[this.getLayers()]))),this.visualizer.on("draw",(()=>this.handleDrawn()))}}const uj=["waveform"],hj=(0,y.PA)((({item:e})=>{var t;const n=(0,p.useRef)(),r=((e,t)=>{var n,r,o,i;const a=(0,p.useRef)(),{showLabels:s=!0}=t,[l,c]=(0,p.useState)(1),[d,u]=(0,p.useState)(null!=(n=null==t?void 0:t.volume)?n:1),[h,g]=(0,p.useState)(!1),[m,f]=(0,p.useState)(0),[v,y]=(0,p.useState)(0),[b,x]=(0,p.useState)(null!=(r=null==t?void 0:t.amp)?r:1),[w,C]=(0,p.useState)(null!=(o=null==t?void 0:t.rate)?o:1),[S,j]=(0,p.useState)(null!=(i=null==t?void 0:t.muted)&&i),[k,O]=(0,p.useState)([]),[R,E]=(0,p.useState)(new Map),_=(0,p.useRef)(null==t?void 0:t.onFrameChanged);_.current=null==t?void 0:t.onFrameChanged;const A=(0,p.useMemo)((()=>{let e=null,t=-1;return n=>{cancelAnimationFrame(t),t=requestAnimationFrame((()=>{e&&n.width===e.width&&n.height===e.height&&n.zoom===e.zoom&&n.scroll===e.scroll||(null==_.current||_.current(n),e=n)}))}}),[]);return(0,p.useEffect)((()=>{const n=new dj(Object.assign({},null!=t?t:{},{container:e.current}));return(void 0===(null==t?void 0:t.autoLoad)||null!=t&&t.autoLoad)&&n.load(),n.on("load",(()=>{null==t||null==t.onLoad||t.onLoad(n)})),n.on("play",(()=>{g(!0)})),n.on("pause",(()=>{g(!1)})),n.on("error",(e=>{null==t||null==t.onError||t.onError(e)})),n.on("playing",(e=>{h&&!kS(e,v,m)&&(null==t||null==t.onSeek||t.onSeek(e)),y(e)})),n.on("seek",(e=>{kS(e,v,m)||(null==t||null==t.onSeek||t.onSeek(e),y(e))})),n.on("zoom",c),n.on("frameDrawn",A),n.on("muted",j),n.on("durationChanged",f),n.on("volumeChanged",u),n.on("rateChanged",(e=>{null==t||null==t.onRateChange||t.onRateChange(e),C(e)})),n.on("layersUpdated",(e=>{const t=[],n=new Map;for(const r of e.values())t.push(r),n.set(r.name,r.isVisible);O(t),E(n)})),a.current=n,()=>{var e;null==(e=a.current)||e.destroy()}}),[]),(0,p.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.zoom=l)}),[l]),(0,p.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.volume=d)}),[d]),(0,p.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.rate=w)}),[w]),(0,p.useEffect)((()=>{const e=a.current;e&&e.loaded&&(e.amp=b)}),[b]),(0,p.useEffect)((()=>{null==t||null==t.onPlaying||t.onPlaying(h)}),[h]),(0,p.useEffect)((()=>{a.current&&(a.current.muted=S)}),[S]),(0,p.useEffect)((()=>{var e;null==(e=a.current)||e.updateLabelVisibility(s)}),[s]),{waveform:a,zoom:l,setZoom:c,volume:d,setVolume:u,playing:h,setPlaying:g,duration:m,currentTime:v,setCurrentTime:y,amp:b,setAmp:x,rate:w,setRate:C,muted:S,setMuted:j,layers:k,layerVisibility:R}})(n,{src:e._value,autoLoad:!1,waveColor:"#BEB9C5",gridColor:"#BEB9C5",gridWidth:1,backgroundColor:"#fafafa",autoCenter:!0,zoomToCursor:!0,height:e.height&&!isNaN(Number(e.height))?Number(e.height):96,waveHeight:e.waveheight&&!isNaN(Number(e.waveheight))?Number(e.waveheight):32,splitChannels:e.splitchannels,decoderType:e.decoder,playerType:e.player,volume:e.defaultvolume?Number(e.defaultvolume):1,amp:e.defaultscale?Number(e.defaultscale):1,zoom:e.defaultzoom?Number(e.defaultzoom):1,showLabels:e.annotationStore.store.settings.showLabels,rate:e.defaultspeed?Number(e.defaultspeed):1,muted:"true"===e.muted,onLoad:e.onLoad,onPlaying:e.onPlaying,onSeek:e.onSeek,onRateChange:e.onRateChange,onError:e.onError,regions:{createable:!e.readonly,updateable:!e.readonly,deleteable:!e.readonly},timeline:{backgroundColor:"#ffffff"},experimental:{backgroundCompute:!0,denoize:!0},autoPlayNewSegments:!0,onFrameChanged:t=>{e.setWFFrame(t)}}),{waveform:o}=r,i=(0,Yn.A)(r,uj);return(0,p.useEffect)((()=>{var t,n,r,i,a,s;const l=yr("Audio","Audio Segmentation");null==(t=o.current)||t.load();return null==(n=o.current)||n.on("beforeRegionsDraw",(t=>{var n;const r=e.getRegionColor(),o=null==(n=e.activeState)?void 0:n.selectedValues();r&&o&&(t.regionDrawableTarget(),t.setDrawingColor(r),t.setLabels(o))})),null==(r=o.current)||r.on("afterRegionsDraw",(e=>{e.resetDrawableTarget(),e.resetDrawingColor(),e.resetLabels()})),null==(i=o.current)||i.on("regionSelected",((t,n)=>{const r=e.annotation,o=n.metaKey||n.ctrlKey;o&&(t.selected||t.isRegion)||e.annotation.regionStore.unselectAll();const i=e.regs.find((e=>e.id===t.id)),a=e._ws.regions.findRegion(t.id);if(r.isLinkingMode&&i)return r.addLinkedRegion(i),r.stopLinkingMode(),r.regionStore.unselectAll(),void t.handleSelected(!1);i&&e.annotation.regionStore.toggleSelection(i,t.selected),a&&a.handleSelected(t.selected),o||e._ws.regions.regions.forEach((e=>{e.id!==t.id&&e.handleSelected(!1)}))})),null==(a=o.current)||a.on("regionCreated",(t=>{e.addRegion(t)})),null==(s=o.current)||s.on("regionUpdatedEnd",(t=>{e.updateRegion(t)})),l.addNamed("region:delete",(()=>{var e;null==(e=o.current)||e.regions.clearSegments(!1)})),l.addNamed("segment:delete",(()=>{var e;null==(e=o.current)||e.regions.clearSegments(!1)})),l.addNamed("region:delete-all",(()=>{var e;null==(e=o.current)||e.regions.clearSegments()})),()=>{l.unbindAll()}}),[]),(0,_.jsxs)(Ze.eB,{name:"audio-tag",children:[null==(t=e.errors)?void 0:t.map(((e,t)=>(0,_.jsx)(ke,{error:e},`err-${t}`))),(0,_.jsx)("div",{ref:t=>{n.current=t,e.stageRef.current=t}}),(0,_.jsx)(AC,{position:i.currentTime,playing:i.playing,volume:i.volume,speed:i.rate,zoom:i.zoom,duration:i.duration,onPlay:()=>i.setPlaying(!0),onPause:()=>i.setPlaying(!1),allowFullscreen:!1,onVolumeChange:e=>i.setVolume(e),onStepBackward:()=>{var e,t;null==(e=o.current)||e.seekBackward(.1),null==(t=o.current)||t.syncCursor()},onStepForward:()=>{var e,t;null==(e=o.current)||e.seekForward(.1),null==(t=o.current)||t.syncCursor()},onPositionChange:e=>{var t,n;null==(t=o.current)||t.seek(e),null==(n=o.current)||n.syncCursor()},onSpeedChange:e=>i.setRate(e),onZoom:e=>i.setZoom(e),amp:i.amp,onAmpChange:e=>i.setAmp(e),mediaType:"audio",toggleVisibility:(e,t)=>{if(o.current){var n;const r=null==(n=o.current)?void 0:n.getLayer(e);r&&r.setVisibility(t)}},layerVisibility:i.layerVisibility})]})}));let gj=Er,mj=jn;(0,O.VS)(O.sg)&&(gj=sS),(0,O.VS)(O.vS)&&(gj=hj,mj=On),x.addTag("audio",mj,gj),x.addTag("audioplus",mj,gj),x.addObjectType(mj);var pj=n(78401);const fj=(0,y.PA)(class extends p.Component{render(){const{item:e}=this.props,t=(n=Math.ceil(e.stageWidth/e.gridsize),r=Math.ceil(e.stageHeight/e.gridsize),o=e.gridsize,[...Array(n)].map(((e,t)=>[...Array(r)].map(((e,n)=>({col:t,row:n,x:t*o,y:n*o,fill:"#fff"}))))).reduce(((e,t)=>[...e,...t])));var n,r,o;return(0,_.jsx)(pj.Wd,{opacity:.15,name:"ruler",children:Object.values(t).map(((t,n)=>(0,_.jsx)(pj.rw,{x:t.x,y:t.y,width:e.gridsize,height:e.gridsize,stroke:e.gridcolor,strokeWidth:1},n)))})}}),vj=(0,p.createContext)({expanded:!1}),yj=vj.Provider,bj=yr("SegmentationToolbar","Segmentation Tools"),xj={plus:"+",minus:"-"},wj=({active:e=!1,disabled:t=!1,smart:n=!1,extra:r=null,tool:o=null,controlsOnHover:i=!1,extraShortcuts:a={},ariaLabel:s,controls:l,icon:c,label:d,shortcut:u,onClick:h})=>{var g,m;let f=u;const v=null!=(g=null==o?void 0:o.dynamic)&&g,{expanded:y,alignment:b}=(0,p.useContext)(vj),[x,C]=(0,p.useState)(!1),S=(0,p.useMemo)((()=>{if(!(0,w.isDefined)(u))return null;const e=u.split(",").map((e=>e.trim()));return(0,_.jsx)(Ze.Sl,{name:"shortcut",children:e.map(((e,t)=>{const n=e.split("+");return(0,_.jsx)(p.Fragment,{children:n.map((e=>{var t;return(0,_.jsx)(Ze.Sl,{name:"key",tag:"kbd",children:null!=(t=xj[e])?t:e},e)}))},`${n.join("-")}-${t}`)}))})}),[u]);(0,p.useEffect)((()=>{const e=()=>{f&&bj.hasKey(f)&&bj.removeKey(f)};return e(),f=u,u&&!bj.hasKey(u)&&bj.addKey(u,(()=>{var e;null!=o&&o.disabled||null!=o&&null!=(e=o.annotation)&&e.isDrawing||(null!=o&&o.unselectRegionOnToolChange&&o.annotation.unselectAreas(),null==h||h())}),d),()=>{e()}}),[u,null==o?void 0:o.annotation]),(0,p.useEffect)((()=>(e&&Object.entries(a).forEach((([e,[t,n]])=>{bj.hasKey(e)||bj.overwriteKey(e,n,t)})),()=>{Object.keys(a).forEach((e=>{bj.hasKey(e)&&bj.removeKey(e)}))})),[a,e]);const j=(0,p.useMemo)((()=>n&&r?(0,_.jsx)(Ze.Sl,{name:"extra",children:r}):null),[n,r]),k=!1===v&&(null==l?void 0:l.length)&&(e||i&&x),O=null==o||null==(m=o.annotation)?void 0:m.isDrawing,R=t||O;return(0,_.jsxs)(Ze.eB,{name:"tool",tag:"button","aria-label":s,mod:{active:e,disabled:R,alignment:b,expanded:y&&!v,smart:v||n},onClick:e=>{if(!t&&!O){var n;if(e.preventDefault(),null!=o&&o.unselectRegionOnToolChange)null==o||null==(n=o.annotation)||null==n.unselectAreas||n.unselectAreas();null==h||h(e)}},onMouseEnter:()=>{C(!0)},onMouseLeave:()=>{C(!1)},children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:c}),!1===v&&!1===i&&(y?(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(Ze.Sl,{name:"label",children:[j,d,S]})}):((0,w.isDefined)(d)||(0,w.isDefined)(S))&&!k&&(0,_.jsx)(Ze.Sl,{name:"tooltip",mod:{controlled:!(!n||!r)},children:(0,_.jsxs)(Ze.Sl,{name:"tooltip-body",children:[j,d,S]})})),k&&(0,_.jsx)(Ze.Sl,{name:"controls",onClickCapture:e=>e.stopPropagation(),children:(0,_.jsx)(Ze.Sl,{name:"controls-body",children:l})})]})},Cj=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{ariaLabel:(0,m.toKebabCase)((0,h.Pw)(e).name),active:e.selected,icon:e.iconClass,label:e.viewTooltip,shortcut:e.shortcut,extraShortcuts:e.extraShortcuts,tool:e,onClick:()=>{e.manager.selectTool(e,!0)}}))),Sj=h.gK.model("BaseTool",{smart:!1,unselectRegionOnToolChange:!1,removeDuplicatesNamed:h.gK.maybeNull(h.gK.string)}).volatile((()=>({dynamic:!1,index:1,canInteractWithRegions:!0}))).views((e=>({get toolName(){return(0,h.Pw)(e).name},get isSeparated(){return e.control.isSeparated},get viewClass(){return()=>e.shouldRenderView?(0,_.jsx)(Cj,{item:e}):null},get viewTooltip(){return null},get controls(){return null},get shouldRenderView(){return(e.isSeparated||e.smartEnabled)&&e.iconClass},get iconClass(){if(e.iconComponent){const t=e.iconComponent;return(0,_.jsx)(t,{})}return null},get iconComponent(){return null},get smartEnabled(){var t,n;return null!=(t=null==(n=e.control)?void 0:n.smartEnabled)&&t}}))).actions((e=>({afterCreate(){var t;if(e.smart&&null!=(t=e.control)&&t.smart){const t=(0,h._$)(e),n=(0,h.Pw)(e),r=Object.assign({},(0,h.dV)(e),{smart:!1,default:!1}),o=Object.assign({},t),i=n.create(r,o);i.makeDynamic(),(0,h._$)(e).manager.addTool(`${n.name}-smart`,i,e.control.removeDuplicatesNamed)}},makeDynamic(){e.dynamic=!0}}))),jj={X:3,Y:3},kj={width:30,height:30},Oj={radius:30},Rj={length:30},Ej=Sj;const _j=n.p+"rotate.90d3fb3da9d2ac1e3ee9dd0b990c641c.svg";function Aj(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function Tj(e,t){return function(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),o=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return Object.assign({},e,{rotation:e.rotation+t,x:r,y:o})}(e,t,Aj(e))}class Pj extends yt.A.Transformer{constructor(e){super(e),this.isMouseOver=!1,this.isMouseDown=!1,this.initialRotationDelta=0,this.origin=void 0,this.handleMouseDown=e=>{const t=this.getStage(),n=null==t?void 0:t.getPointerPosition();if(!t||!n)return;const r=this._getNodeRect(),o=Aj(r),i=n.x-o.x,a=n.y-o.y,s=Math.PI/2-Math.atan2(-a,i);t.content.style.cursor=`url(${_j}) 16 16, pointer`,this.isMouseDown=!0,this._movingAnchorName=e.target.name().split(" ")[0],this.initialRotationDelta=s-r.rotation,this.origin=o,window&&(window.addEventListener("mousemove",this.handleMouseMove),window.addEventListener("touchmove",this.handleMouseMove),window.addEventListener("mouseup",this.handleMouseUp,!0),window.addEventListener("touchend",this.handleMouseUp,!0)),this._fire("transformstart",{evt:e,target:this.getNode()}),this._nodes.forEach((t=>{t._fire("transformstart",{evt:e,target:t})}))},this.handleMouseUp=e=>{this.isMouseDown=!1,this.origin=void 0,this.isMouseOver||(this.getStage().content.style.cursor=""),window&&(window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("touchmove",this.handleMouseMove),window.removeEventListener("mouseup",this.handleMouseUp,!0),window.removeEventListener("touchend",this.handleMouseUp,!0));const t=this.getNode();this._fire("transformend",{evt:e,target:t}),t&&this._nodes.forEach((t=>{t._fire("transformend",{evt:e,target:t})})),this._movingAnchorName=""},this.handleMouseMove=e=>{const t=this.getStage();if(!this.isMouseDown||!this.origin||!t)return;t.setPointersPositions(e);const n=t.getPointerPosition(),r=this._getNodeRect();if(!n)return;const o=n.x-this.origin.x,i=n.y-this.origin.y,a=Math.PI/2-Math.atan2(-i,o)-this.initialRotationDelta,s=yt.A.getAngle(this.rotationSnapTolerance()),l=function(e,t,n){let r=t;for(let o=0;o{this.isMouseDown||(this.getStage().content.style.cursor=`url(${_j}) 16 16, pointer`),this.isMouseOver=!0})),n.on("mouseout",(()=>{this.isMouseOver=!1,this.isMouseDown||(this.getStage().content.style.cursor="")})),n.on("dragstart",(e=>{this.findOne(`.${this._movingAnchorName}`).stopDrag(),e.cancelBubble=!0})),n.on("dragend",(e=>{e.cancelBubble=!0}))}}refreshRotationList(){return{"top-left":{x:0,y:0},"top-right":{x:this.getWidth(),y:0},"bottom-left":{x:0,y:this.getHeight()},"bottom-right":{x:this.getWidth(),y:this.getHeight()}}}get _outerBack(){var e;return null==(e=this.getStage())?void 0:e.findOne(this.attrs.backSelector)}setNodes(e=[]){return super.setNodes(e),this._outerBack&&this._proxyDrag(this._outerBack),this}detach(){var e;null==(e=this._outerBack)||e.off(".tr-konva"),super.detach()}update(){this.refreshRotationList();const{x:e,y:t,width:n,height:r}=this._getNodeRect(),o=this.rotation(),i=this._outerBack,a=this.refreshRotationList();for(const e in a){const t=this.findOne(`.rotate-${e}`);t&&t.setAttrs({x:a[e].x,y:a[e].y}).getLayer().batchDraw()}if(super.update(),i){const a=this.getAbsoluteScale(),s=i.getAbsoluteScale(),l={x:a.x/s.x,y:a.y/s.y};i.setAttrs({x:(e-this.getStage().getAttr("x"))*l.x,y:(t-this.getStage().getAttr("y"))*l.y,width:n*l.x,height:r*l.y,rotation:o}).getLayer().batchDraw()}}}yt.A.LSTransformer=Pj;class Ij extends yt.A.Transformer{get _outerBack(){var e;return null==(e=this.getStage())?void 0:e.findOne(this.attrs.backSelector)}setNodes(e=[]){return super.setNodes(e),this._outerBack&&this._proxyDrag(this._outerBack),this}detach(){var e;null==(e=this._outerBack)||e.off(".tr-konva"),super.detach()}update(){const{x:e,y:t,width:n,height:r}=this._getNodeRect(),o=this.rotation(),i=this._outerBack;if(super.update(),i){const a=this.getAbsoluteScale(),s=i.getAbsoluteScale(),l={x:a.x/s.x,y:a.y/s.y};i.setAttrs({x:(e-this.getStage().getAttr("x"))*l.x,y:(t-this.getStage().getAttr("y"))*l.y,width:n*l.x,height:r*l.y,rotation:o}).getLayer().batchDraw()}}}yt.A.LSTransformerOld=Ij;class Lj extends p.Component{constructor(...e){super(...e),this.checkNode=()=>{if(!this.transformer)return;const e=this.transformer.getStage(),{item:{selectedRegions:t}}=this.props;if(null==t||!t.length)return this.transformer.detach(),void this.transformer.getLayer().batchDraw();if(t.find((e=>!e.supportsTransform)))return;const n=[];t.forEach((t=>{const r=e.findOne((e=>e.hasName(t.id)&&e.parent));if(!r)return;if(r.hasName("_transformable")&&n.push(r),!r.find)return;const o=r.find((e=>e.hasName("_transformable")),!0);n.push(...o)}));const r=this.transformer.nodes();(null==n?void 0:n.length)===(null==r?void 0:r.length)&&!n.find(((e,t)=>e!==r[t]))||(n.length?this.transformer.nodes(n):this.transformer.nodes([]),this.transformer.getLayer().batchDraw())},this.constrainSizes=(e,t)=>{const n=void 0!==t.rotation?t.rotation:e.rotation,r=n!==e.rotation,o=this.getStageAbsoluteDimensions();if(t.widthMath.abs(c[e]-l[e])>.001))?e:t}return this.fitBBoxToScaledStage(t,o)},this.dragBoundFunc=e=>{const{item:t}=this.props;return t.fixForZoomWrapper(e,(e=>{if(!this.transformer||!t)return;let{x:n,y:r}=e;const{width:o,height:i}=this.draggingAreaBBox,{stageHeight:a,stageWidth:s}=t;return n<0&&(n=0),r<0&&(r=0),n+o>s&&(n=s-o),r+i>a&&(r=a-i),{x:n,y:r}}))}}componentDidMount(){setTimeout(this.checkNode)}componentDidUpdate(){setTimeout(this.checkNode)}get freezeKey(){return`ImageTransformer_${this.props.item.id}`}freeze(){const{item:e}=this.props,{freezeKey:t}=this;e.annotation.history.freeze(t)}unfreeze(){const{item:e}=this.props,{freezeKey:t}=this;e.annotation.history.unfreeze(t)}fitBBoxToScaledStage(e,t){let{x:n,y:r,width:o,height:i}=e;const[a,s]=[e.x-t.x,e.y-t.y];return a<0?(n=(0,O.VS)(O.pG)?t.x:0,o+=a):a+e.width>t.width&&(o=t.width-a),s<0?(r=(0,O.VS)(O.pG)?t.y:0,i+=s):s+e.height>t.height&&(i=t.height-s),Object.assign({},e,{x:n,y:r,width:o,height:i})}getStageAbsoluteDimensions(){const e=this.transformer.getStage(),{stageWidth:t,stageHeight:n}=this.props.item;let[r,o]=[t*e.scaleX(),n*e.scaleY()];(0,O.VS)(O.pG)&&this.props.item.isSideways&&([r,o]=[o,r]);const[i,a]=[e.x(),e.y()];return{width:r,height:o,x:i,y:a}}renderLSTransformer(){return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)("LSTransformer",{ref:e=>{this.transformer=e,this.transformer&&this.transformer.rotateEnabled(!1)},resizeEnabled:!0,ignoreStroke:!0,keepRatio:!0!==this.props.singleNodeMode,useSingleNodeRotation:this.props.useSingleNodeRotation,rotateEnabled:this.props.rotateEnabled,borderDash:[3,1],boundBoxFunc:this.constrainSizes,anchorSize:8,flipEnabled:!1,zoomedIn:this.props.item.zoomScale>1,onDragStart:e=>{const{item:{selectedRegionsBBox:t}}=this.props;this.freeze(),this.transformer&&e.target===e.currentTarget&&t&&(this.draggingAreaBBox={x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top})},dragBoundFunc:this.dragBoundFunc,onDragEnd:()=>{this.unfreeze(),setTimeout(this.checkNode)},onTransformEnd:()=>{setTimeout(this.checkNode)},backSelector:this.props.draggableBackgroundSelector})})}renderOldLSTransformer(){return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)("LSTransformerOld",{ref:e=>{this.transformer=e},resizeEnabled:!0,ignoreStroke:!0,keepRatio:!0!==this.props.singleNodeMode,useSingleNodeRotation:this.props.useSingleNodeRotation,rotateEnabled:this.props.rotateEnabled,borderDash:[3,1],boundBoxFunc:this.constrainSizes,anchorSize:8,flipEnabled:!1,zoomedIn:this.props.item.zoomScale>1,onDragStart:e=>{const{item:{selectedRegionsBBox:t}}=this.props;this.freeze(),this.transformer&&e.target===e.currentTarget&&t&&(this.draggingAreaBBox={x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top})},dragBoundFunc:this.dragBoundFunc,onDragEnd:()=>{this.unfreeze(),setTimeout(this.checkNode)},onTransformEnd:()=>{setTimeout(this.checkNode)},backSelector:this.props.draggableBackgroundSelector})})}render(){return this.props.supportsTransform?(0,O.VS)(O.id)?this.renderLSTransformer():this.renderOldLSTransformer():null}}const Mj={block:"block--h6e1z",divider:"divider--ucpOT",button:"button--Pugmq",wrapperComponent:"wrapperComponent--lGC5u",wrapper:"wrapper--HIxIc",loading:"loading--NbjdV","image-element":"image-element--YwHyO",image_position:"image_position--Wpu4V",image_position__top:"image_position__top--RQG6L",image_position__middle:"image_position__middle--Emb4G",image_position__center:"image_position__center--sjYuo",image_position__bottom:"image_position__bottom--Yhn9p",image_position__left:"image_position__left--zPURN",image_position__right:"image_position__right--F6wzt",container:"container--_mzc9",frame:"frame--nbBeT",frame_height:"frame_height--CVer_",filler:"filler--R3muM",overlay:"overlay--Ppw7x",withGallery:"withGallery--xrArp",withPagination:"withPagination--AmhTt",gallery:"gallery--IxYdb",active:"active--RZ3Re",pagination:"pagination--_qwcS"},Kj={required:(e,t)=>({modelName:e,field:t,error:"ERR_REQUIRED"}),unknownTag:(e,t,n)=>({modelName:e,field:t,value:n,error:"ERR_UNKNOWN_TAG"}),tagNotFound:(e,t,n)=>({modelName:e,field:t,value:n,error:"ERR_TAG_NOT_FOUND"}),tagUnsupported:(e,t,n,r)=>({modelName:e,field:t,value:n,validType:r,error:"ERR_TAG_UNSUPPORTED"}),parentTagUnexpected:(e,t,n,r)=>({modelName:e,field:t,value:n,validType:r,error:"ERR_PARENT_TAG_UNEXPECTED"}),badAttributeValueType:(e,t,n,r)=>({modelName:e,field:t,value:n,validType:r,error:"ERR_BAD_TYPE"}),internalError:e=>({error:"ERR_INTERNAL",value:String(e).substr(0,1e3),field:String(e.code),modelName:""}),generalError:e=>({error:"ERR_GENERAL",value:String(e).substr(0,1e3),field:String(e.code),modelName:""}),loadingError:(e,t,n,r=Ge.A.ERR_LOADING_HTTP)=>(console.log("ERR",e,e.code),{error:"ERR_GENERAL",value:r({attr:n,error:String(e),url:t}),field:n,modelName:""})},Dj=(e,t=null,n=["view"],r)=>{if(!e.children)return[];const o="pagedview"===e.type?e.children.slice(0,1):e.children;for(const e of o){var i;const o=[...n,...null!=t&&t.type?[null==t?void 0:t.type]:[]],a=Object.assign({},e,{parent:null!=(i=null==t?void 0:t.id)?i:null,parentTypes:o});delete a.children,r.push(a),Array.isArray(e.children)&&Dj(e,e,o,r)}return r},Nj=(e,t)=>{const{name:n}=t.properties;return n&&!n.optionalValues&&void 0===e.name?Kj.required(t.name,"name"):null},Vj=(e,t,n)=>{const{controlledTags:r}=t.properties;if(!e.toname)return null;const o=e.toname.split(",");for(const e of o){const o=n.find((t=>t.name===e));if(void 0===o)return Kj.tagNotFound(t.name,"toname",e);if(r&&r.validate(o.tagName).length)return Kj.tagUnsupported(t.name,"toname",o.tagName,r)}return null},zj=(e,t)=>{var n;const r=null==(n=t.properties.parentTypes)?void 0:n.value;return!r||e.parentTypes.find((e=>r.find((t=>e===t.toLowerCase()))))?null:Kj.parentTagUnexpected(t.name,"parent",e.tagName,t.properties.parentTypes)},Bj=(e,t,n)=>{const r=[],o=Object.keys(t.properties);for(const i of o){if(!{}.hasOwnProperty.call(e,i))continue;if(n.includes(i))continue;const o=e[i],a=t.properties[i.toLowerCase()];0!==a.validate(o,a).length&&r.push(Kj.badAttributeValueType(t.name,i,o,a))}return r},Hj=e=>{const t=[];return e.perregion&&e.peritem&&t.push(Kj.generalError("Attribute perItem is incompatible with attribute perRegion. They define two different modes. However perRegion works fine even with multi-item mode of object tags.")),t};var Fj=n(41984);const Wj=(0,y.WQ)("store")((0,y.PA)((({store:e,tools:t,expanded:n})=>{const[r,o]=(0,p.useState)(null),i=(()=>{const[e,t]=(0,p.useState)({width:window.innerWidth,height:window.innerWidth});return(0,p.useEffect)((()=>{const e=()=>{t({width:window.innerWidth,height:window.innerWidth})};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e})(),a=(0,p.useMemo)((()=>{if(!(0,w.isDefined)(r))return"right";const e=r.getBoundingClientRect();return e.left<200?"right":i.width-e.right<200?"left":"right"}),[r,i]),s=t.filter((e=>!e.dynamic)).reduce(((e,t)=>{var n;const r=null!=(n=e[t.group])?n:[];return r.push(t),e[t.group]=r,e}),{}),l=t.filter((e=>e.dynamic));return(0,_.jsx)(yj,{value:{expanded:n,alignment:a},children:(0,_.jsxs)(Ze.eB,{ref:e=>o(e),name:"toolbar",mod:{alignment:a,expanded:n},children:[Object.entries(s).map((([e,t],n)=>{const r=t.filter((e=>e.viewClass));return r.length?(0,_.jsx)(Ze.Sl,{name:"group",children:r.sort(((e,t)=>e.index-t.index)).map(((e,t)=>{const n=e.viewClass;return(0,_.jsx)(n,{},`${e.toolName}-${t}`)}))},`toolset-${e}-${n}`):null})),e.autoAnnotation&&(0,_.jsx)($j,{tools:l})]})})}))),$j=(0,y.PA)((({tools:e})=>{const[t,n]=(0,p.useState)(Math.max(e.findIndex((e=>e.selected)),0)),r=(0,p.useMemo)((()=>e[t]),[t]),o=e.some((e=>e.selected));return e.length>0&&(0,_.jsx)(Ze.Sl,{name:"group",children:(0,_.jsx)(wj,{smart:!0,label:"Auto-Detect",active:o,icon:r.iconClass,shortcut:"M",extra:e.length>1?(0,_.jsx)(Ze.Sl,{name:"smart",children:e.map(((e,t)=>{const r=e.viewClass;return(0,_.jsx)("div",{onClickCapture:r=>{r.preventDefault(),n(t),e.manager.selectTool(e,!0)},children:(0,_.jsx)(r,{})},`${t}`)}))}):null,controls:r.controls,onClick:()=>{let r=t+1;o?r>=e.length&&(r=0):r=0;const i=e[r];n(r),i.manager.selectTool(i,!0)}})})})),Uj=(0,p.createContext)({suggestion:!1}),Zj=Uj.Provider;var Gj=n(21015);const Yj=(0,p.forwardRef)((({size:e="medium",pageSizeOptions:t=[1,25,50,100],currentPage:n,pageSize:r,totalPages:o,outline:i=!0,align:a="right",noPadding:s=!1,pageSizeSelectable:l=!0,hotkey:c,onChange:d},u)=>{const[h,g]=(0,p.useState)(!1);return(0,_.jsxs)(Ze.eB,{name:"pagination",mod:{size:e,outline:i,align:a,noPadding:s},children:[(0,_.jsxs)(Ze.Sl,{name:"navigation",children:[(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Xj,{mod:["arrow-left","arrow-left-double"],onClick:()=>null==d?void 0:d(1),disabled:1===n}),(0,_.jsx)(Ze.Sl,{name:"divider"})]}),(0,_.jsx)(Xj,{mod:["arrow-left"],onClick:()=>null==d?void 0:d(n-1),hotkey:null==c?void 0:c.prev,disabled:1===n}),(0,_.jsx)(Ze.Sl,{name:"input",children:h?(0,_.jsx)("input",{type:"text",autoFocus:!0,defaultValue:n,pattern:"[0-9]",onKeyDown:e=>{const t=Number.parseFloat(e.currentTarget.value);"Escape"===e.code?g(!1):"Enter"===e.code?(t<=o&&t>=1&&(null==d||d(t)),g(!1)):null!==e.code.match(/[0-9]/)||(e=>null!==e.code.match(/arrow/i)||e.shiftKey&&null!==e.code.match(/arrow/i)||e.metaKey||e.ctrlKey||"Backspace"===e.code)(e)||(e.preventDefault(),e.stopPropagation())},onBlur:e=>{const t=Number.parseFloat(e.currentTarget.value);t<=o&&t>=1&&(null==d||d(t)),g(!1)}}):(0,_.jsxs)(Ze.Sl,{name:"page-indicator",onClick:()=>{g(!0)},children:[n," ",(0,_.jsxs)("span",{children:["of ",o]}),(0,_.jsx)("div",{onClick:()=>{}})]})}),(0,_.jsx)(Xj,{mod:["arrow-right"],onClick:()=>null==d?void 0:d(n+1),disabled:n===o,hotkey:null==c?void 0:c.next}),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"divider"}),(0,_.jsx)(Xj,{mod:["arrow-right","arrow-right-double"],onClick:()=>null==d?void 0:d(o),disabled:n===o})]})]}),l&&(0,_.jsx)(Ze.Sl,{name:"page-size",children:(0,_.jsx)("select",{value:r,onChange:e=>{null==d||d(1,e.currentTarget.value)},children:t.map(((e,t)=>(0,_.jsxs)("option",{value:e,children:[e," per page"]},t)))})})]})})),Xj=({mod:e,disabled:t,hotkey:n,onClick:r})=>{const o=Object.fromEntries(e.map((e=>[e,!0]))),i=(0,p.useCallback)((()=>{t||r()}),[t,r]);return o.disabled=!0===t,Na(n,i),n?(0,_.jsx)(yr.Tooltip,{name:n,children:(0,_.jsx)(Ze.Sl,{name:"btn",mod:o,onClick:i})}):(0,_.jsx)(Ze.Sl,{name:"btn",mod:o,onClick:i})},qj=["item"];yt.A.showWarnings=!1;const Jj=yr("Image"),Qj={};(0,O.VS)(O.xS)&&(Qj.crossOrigin="anonymous");const ek=e=>{const t=[],n=[],r=e.length;let o=0;for(;o(0,O.VS)(O.Kg)?(0,Gj.q3)((()=>D.renderItem(e,e.annotation,!0))):(0,Gj.q3)((()=>e.inSelection!==t?null:D.renderItem(e,e.annotation,!1))))),nk=(0,p.memo)((({regions:e,name:t,useLayers:n,showSelected:r=!1})=>{const o=e.map((e=>(0,_.jsx)(tk,{region:e,showSelected:r},`region-${e.id}`)));return!1===n?o:(0,_.jsx)(pj.Wd,{name:t,children:o})})),rk=(0,p.memo)((({regions:e,useLayers:t=!0,chunkSize:n=15,suggestion:r=!1,showSelected:o=!1})=>(0,_.jsx)(Zj,{value:{suggestion:r},children:(n?(0,w.chunks)(e,n):e).map(((e,n)=>(0,_.jsx)(nk,{name:`chunk-${n}`,regions:e,useLayers:t,showSelected:o},`chunk-${n}`)))}))),ok=(0,y.PA)((({item:e})=>{const{drawingRegion:t}=e;if(!t)return null;if(e.multiImage&&e.currentImage!==t.item_index)return null;const n=t&&"brushregion"===t.type?p.Fragment:pj.Wd;return(0,_.jsx)(n,{children:t?(0,_.jsx)(tk,{region:t},"drawing"):t})})),ik="#40A9FF",ak="white",sk=[3,3],lk=(0,y.PA)((({item:e,selectionArea:t})=>{const{selectionBorders:n}=t;(0,O.VS)(O.MV)||(n.left=n.left*e.stageScale,n.right=n.right*e.stageScale,n.top=n.top*e.stageScale,n.bottom=n.bottom*e.stageScale);const r=n?[{x:n.left,y:n.top},{x:n.right,y:n.top},{x:n.left,y:n.bottom},{x:n.right,y:n.bottom}]:[],o=(0,O.VS)(O.MV)?6/e.stageScale:6;return(0,_.jsxs)(_.Fragment,{children:[n&&(0,_.jsx)(pj.rw,{name:"regions_selection",x:n.left,y:n.top,width:n.right-n.left,height:n.bottom-n.top,stroke:ik,strokeWidth:1,strokeScaleEnabled:!1,listening:!1}),r.map(((e,t)=>(0,_.jsx)(pj.rw,{x:e.x-o/2,y:e.y-o/2,width:o,height:o,fill:ik,stroke:ak,strokeWidth:2,strokeScaleEnabled:!1,listening:!1},t)))]})})),ck=(0,y.PA)((({item:e})=>{const{x:t,y:n,width:r,height:o}=e.onCanvasRect,i={x:t,y:n,width:r,height:o,listening:!1,strokeWidth:1};return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(pj.rw,Object.assign({},i,{stroke:ik,dash:sk,strokeScaleEnabled:!1})),(0,_.jsx)(pj.rw,Object.assign({},i,{stroke:ak,dash:sk,dashOffset:sk[0],strokeScaleEnabled:!1}))]})})),dk="transformer_back",uk=(0,y.PA)((({item:e})=>{const{selectedRegionsBBox:t}=e,n=1===e.selectedRegions.length,r=(0,p.useRef)({x:0,y:0});return(0,_.jsx)(pj.Wd,{children:t&&!n&&(0,_.jsx)(pj.rw,{id:dk,fill:"rgba(0,0,0,0)",draggable:!0,onClick:()=>{e.annotation.unselectAreas()},onMouseOver:t=>{e.annotation.isLinkingMode||(t.target.getStage().container().style.cursor=V.A.POINTER_CURSOR)},onMouseOut:e=>{e.target.getStage().container().style.cursor=V.A.DEFAULT_CURSOR},onDragStart:t=>{r.current={x:e.canvasToInternalX(t.target.getAttr("x")),y:e.canvasToInternalY(t.target.getAttr("y"))}},dragBoundFunc:t=>{let{x:n,y:o}=t;const{top:i,left:a,right:s,bottom:l}=e.selectedRegionsBBox,{stageHeight:c,stageWidth:d}=e,u=r.current.x-a,h=r.current.y-i;n-=u,o-=h;const g={x:n,y:o,width:s-a,height:l-i},m=St(g,d,c);return m.width!==g.width&&(n+=(m.width-g.width)*(m.x!==g.x?-1:1)),m.height!==g.height&&(o+=(m.height-g.height)*(m.y!==g.y?-1:1)),n+=u,o+=h,{x:n,y:o}}})})})),hk=(0,y.PA)((({item:e,selectedRegions:t})=>{if(!t)return null;const{brushRegions:n=[],shapeRegions:r=[]}=ek(t);return(0,_.jsxs)(_.Fragment,{children:[(0,O.VS)(O.q$)?null:(0,_.jsx)(uk,{item:e}),n.length>0&&(0,_.jsx)(rk,{name:"brushes",regions:n,useLayers:!1,showSelected:!0,chankSize:0},"brushes"),r.length>0&&(0,_.jsx)(rk,{name:"shapes",regions:r,showSelected:!0,chankSize:0},"shapes")]})})),gk=(0,y.PA)((({item:e,selectionArea:t})=>{var n,r,o,i;const a=(0,O.VS)(O.MV)?1:1/(e.zoomScale||1),[s,l]=(0,p.useState)(!1),[c,d]=(0,p.useState)(!1),u="ZoomPanTool"===(null==(n=e.getToolsManager().findSelectedTool())?void 0:n.fullName),h=e=>l(4===e.buttons),g=e=>d(e.shiftKey);(0,p.useEffect)((()=>(window.addEventListener("keydown",g),window.addEventListener("keyup",g),window.addEventListener("mousedown",h),window.addEventListener("mouseup",h),()=>{window.removeEventListener("keydown",g),window.removeEventListener("keyup",g),window.removeEventListener("mousedown",h),window.removeEventListener("mouseup",h)})),[]);const m=e.zoomScale>1&&(c||u||s);let f=!0,v=!0,y=!0;return null==(r=e.selectedRegions)||r.forEach((e=>{f=f&&!0===e.supportsTransform,v=v&&!0===e.canRotate,y=y&&!0})),f=f&&(e.selectedRegions.length>1||(e.useTransformer||(null==(o=e.selectedShape)?void 0:o.preferTransformer))&&(null==(i=e.selectedShape)?void 0:i.useTransformer)),(0,_.jsxs)(pj.Wd,{scaleX:a,scaleY:a,children:[t.isActive?(0,_.jsx)(ck,{item:t}):!f&&e.selectedRegions.length>1?(0,_.jsx)(lk,{item:e,selectionArea:t}):null,(0,_.jsx)(Lj,{item:e,rotateEnabled:v,supportsTransform:!m&&f,supportsScale:y,selectedShapes:e.selectedRegions,singleNodeMode:1===e.selectedRegions.length,useSingleNodeRotation:1===e.selectedRegions.length&&v,draggableBackgroundSelector:`#${dk}`})]})})),mk=(0,y.PA)((e=>{let{item:t}=e,n=(0,Yn.A)(e,qj);const{selectionArea:r}=t;return(0,_.jsxs)(_.Fragment,{children:[(0,O.VS)(O.Kg)?(0,_.jsx)(pj.Wd,{name:"selection-regions-layer"}):(0,_.jsx)(hk,Object.assign({item:t,selectedRegions:t.selectedRegions},n)),(0,_.jsx)(gk,{item:t,selectionArea:r})]})})),pk=(0,p.memo)((0,p.forwardRef)((({width:e,height:t},n)=>{const[r,o]=(0,p.useState)([50,0,50,t]),[i,a]=(0,p.useState)([0,100,e,100]),[s,l]=(0,p.useState)(100),[c,d]=(0,p.useState)(50),[u,h]=(0,p.useState)(!1),g=[3,3],m=!1;return n&&(n.current={updatePointer(n,r){n!==s&&(l(n),o([n,0,n,t])),r!==c&&(d(r),a([0,r,e,r]))},updateVisibility(e){h(e)}}),(0,_.jsxs)(pj.Wd,{name:"crosshair",listening:!1,opacity:u?.6:0,children:[(0,_.jsxs)(pj.YJ,{children:[(0,_.jsx)(pj.N1,{name:"v-white",points:i,stroke:"#fff",strokeWidth:1,strokeScaleEnabled:m}),(0,_.jsx)(pj.N1,{name:"v-black",points:i,stroke:"#000",strokeWidth:1,dash:g,strokeScaleEnabled:m})]}),(0,_.jsxs)(pj.YJ,{children:[(0,_.jsx)(pj.N1,{name:"h-white",points:r,stroke:"#fff",strokeWidth:1,strokeScaleEnabled:m}),(0,_.jsx)(pj.N1,{name:"h-black",points:r,stroke:"#000",strokeWidth:1,dash:g,strokeScaleEnabled:m})]})]})}))),fk=(0,y.PA)((({item:e})=>(0,O.VS)(O.bP)?(0,_.jsx)("canvas",{className:Mj.overlay,ref:t=>{e.setOverlayRef(t)},style:e.imageTransform}):null)),vk=(0,y.PA)(class extends p.Component{constructor(e){super(e),this.canvasX=void 0,this.canvasY=void 0,this.lastOffsetWidth=-1,this.lastOffsetHeight=-1,this.state={imgStyle:{},pointer:[0,0]},this.imageRef=(0,p.createRef)(),this.crosshairRef=(0,p.createRef)(),this.handleDeferredMouseDown=null,this.deferredClickTimeout=[],this.skipNextMouseDown=!1,this.skipNextClick=!1,this.skipNextMouseUp=!1,this.mouseDownPoint=null,this.handleOnClick=e=>{const{item:t}=this.props;var n;(0,O.VS)(O.x0)&&(null==(n=this.handleDeferredMouseDown)||n.call(this,!0));if(this.skipNextClick)return void(this.skipNextClick=!1);const r=e.evt||e,{offsetX:o,offsetY:i}=r;if(!(0,O.VS)(O.q$)||!(!this.mouseDownPoint||Math.abs(this.mouseDownPoint.x-o)>.01||Math.abs(this.mouseDownPoint.y-i)>.01))return t.event("click",r,o,i);this.mouseDownPoint=null},this.resetDeferredClickTimeout=()=>{this.deferredClickTimeout.length>0&&(this.deferredClickTimeout=this.deferredClickTimeout.filter((e=>(clearTimeout(e),!1))))},this.handleDeferredClick=(e,t,n=!1)=>{this.handleDeferredMouseDown=r=>{r&&n&&t(),e(),this.handleDeferredMouseDown=null},this.resetDeferredClickTimeout(),this.deferredClickTimeout.push(setTimeout((()=>{var e;null==(e=this.handleDeferredMouseDown)||e.call(this,!1)}),this.props.item.annotation.isDrawing?0:100))},this.handleMouseDown=e=>{var t,n;const{item:r}=this.props,o="ZoomPanTool"===(null==(t=r.getToolsManager().findSelectedTool())?void 0:t.fullName),i="MoveTool"===(null==(n=r.getToolsManager().findSelectedTool())?void 0:n.fullName);this.skipNextMouseDown=this.skipNextMouseUp=this.skipNextClick=!1,(0,O.VS)(O.q$)&&(this.mouseDownPoint={x:e.evt.offsetX,y:e.evt.offsetY}),r.updateSkipInteractions(e);const a=e.target.getParent();if(r.annotation.isReadOnly()&&!o)return;if(a&&"Transformer"===a.className)return;const s=()=>{1===e.evt.button&&e.evt.preventDefault();if(r.getSkipInteractions()||e.target===r.stageRef||(0,w.findClosestParent)(e.target,(e=>{if("Group"===e.nodeType){var t,n;if("ruler"===(null==e||null==(t=e.attrs)?void 0:t.name))return!0;if(!((0,O.VS)(O.Kg)&&i||"segmentation"!==(null==e||null==(n=e.attrs)?void 0:n.name)))return!0}return!1}))){window.addEventListener("mousemove",this.handleGlobalMouseMove),window.addEventListener("mouseup",this.handleGlobalMouseUp);const{offsetX:t,offsetY:n}=e.evt,{left:o,top:i}=r.containerRef.getBoundingClientRect();return this.canvasX=o,this.canvasY=i,this.skipNextMouseDown?(this.skipNextMouseDown=!1,!0):(r.event("mousedown",e,t,n),!0)}},l=r.getToolsManager().findSelectedTool(),c=[void 0,"EllipseTool","EllipseTool-dynamic","RectangleTool","RectangleTool-dynamic","PolygonTool","PolygonTool-dynamic","Rectangle3PointTool","Rectangle3PointTool-dynamic"].includes(null==l?void 0:l.fullName);if((0,O.VS)(O.x0)&&c){const t=e.target===r.stageRef,n=r.annotation.selectedRegions.length>0,o=t&&n,i=()=>{r.annotation.unselectAll(),this.skipNextMouseDown=!0,this.skipNextMouseUp=!0,this.skipNextClick=!0};return void this.handleDeferredClick(s,i,o)}const d=s();return d||!0},this.handleGlobalMouseUp=e=>{if(window.removeEventListener("mousemove",this.handleGlobalMouseMove),window.removeEventListener("mouseup",this.handleGlobalMouseUp),e.target&&"CANVAS"===e.target.tagName)return;const{item:t}=this.props,{clientX:n,clientY:r}=e;return t.freezeHistory(),this.triggerMouseUp(e,n-this.canvasX,r-this.canvasY)},this.handleGlobalMouseMove=e=>{if(e.target&&"CANVAS"===e.target.tagName)return;const{item:t}=this.props,{clientX:n,clientY:r}=e;return t.event("mousemove",e,n-this.canvasX,r-this.canvasY)},this.handleMouseUp=e=>{const{item:t}=this.props;return(0,O.VS)(O.x0)&&this.resetDeferredClickTimeout(),t.freezeHistory(),this.triggerMouseUp(e,e.evt.offsetX,e.evt.offsetY)},this.triggerMouseUp=(e,t,n)=>{if(this.skipNextMouseUp)return void(this.skipNextMouseUp=!1);const{item:r}=this.props;return r.event("mouseup",e,t,n)},this.handleMouseMove=e=>{const{item:t}=this.props;t.freezeHistory(),this.updateCrosshair(e);const n=e.evt&&4===e.evt.buttons,r=e.evt&&1===e.evt.buttons,o=r&&e.evt.shiftKey;var i;(0,O.VS)(O.x0)&&r&&(this.resetDeferredClickTimeout(),null==(i=this.handleDeferredMouseDown)||i.call(this,!1));if((n||o)&&t.zoomScale>1){t.setSkipInteractions(!0),e.evt.preventDefault();const n={x:t.zoomingPositionX+e.evt.movementX,y:t.zoomingPositionY+e.evt.movementY};t.setZoomPosition(n.x,n.y)}else t.event("mousemove",e,e.evt.offsetX,e.evt.offsetY)},this.updateCrosshair=e=>{if(this.crosshairRef.current){const{x:t,y:n}=e.currentTarget.getPointerPosition();this.crosshairRef.current.updatePointer(...this.props.item.fixZoomedCoords([t,n]))}},this.handleError=()=>{const{item:e,store:t}=this.props,n=t.annotationStore,r=(0,h._$)(t).messages.ERR_LOADING_HTTP({attr:e.value,error:"",url:e.currentSrc});n.addErrors([Kj.generalError(r)])},this.updateGridSize=e=>{const{item:t}=this.props;t.freezeHistory(),t.setGridSize(e)},this.handleZoom=e=>{if((!e.evt||e.evt.ctrlKey)&&(e.evt&&e.evt.ctrlKey&&e.evt.preventDefault(),e.evt)){const{item:t}=this.props,n=t.stageRef;t.handleZoom(e.evt.deltaY,n.getPointerPosition())}},this.onResize=Y((()=>{requestAnimationFrame((()=>{var e;if(null==this||null==(e=this.props)||null==(e=e.item)||!e.containerRef)return;const{offsetWidth:t,offsetHeight:n}=this.props.item.containerRef;this.props.item.naturalWidth<=1||this.lastOffsetWidth===t&&this.lastOffsetHeight===n||(this.props.item.onResize(t,n,!0),this.lastOffsetWidth=t,this.lastOffsetHeight=n)}))}),16),this.attachObserver=e=>{this.resizeObserver&&this.detachObserver(),e&&(this.resizeObserver=new G(this.onResize),this.resizeObserver.observe(e))},this.detachObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)},"boolean"==typeof e.item.smoothing&&e.store.settings.setSmoothing(e.item.smoothing)}renderRulers(){const{item:e}=this.props,t="white";return(0,_.jsxs)(pj.YJ,{name:"ruler",onClick:e=>{e.cancelBubble=!1},children:[(0,_.jsx)(pj.N1,{x:0,y:e.cursorPositionY,points:[0,0,e.stageWidth,0],strokeWidth:1,stroke:t,tension:0,dash:[4,4],closed:!0}),(0,_.jsx)(pj.N1,{x:e.cursorPositionX,y:0,points:[0,0,0,e.stageHeight],strokeWidth:1,stroke:t,tension:0,dash:[1.5],closed:!0})]})}componentDidMount(){const{item:e}=this.props;window.addEventListener("resize",this.onResize),this.attachObserver(e.containerRef),this.updateReadyStatus(),Jj.addDescription("shift","Pan image")}componentWillUnmount(){this.detachObserver(),window.removeEventListener("resize",this.onResize),Jj.removeDescription("shift")}componentDidUpdate(){this.onResize(),this.updateReadyStatus()}updateReadyStatus(){const{item:e}=this.props,{imageRef:t}=this;e&&(0,h._n)(e)&&t.current&&e.isReady!==t.current.complete&&e.setReady(t.current.complete)}renderTools(){const{item:e,store:t}=this.props;if(t.annotationStore.viewingAll)return null;const n=e.getToolsManager().allTools();return(0,_.jsx)(Wj,{tools:n})}render(){const{item:e,store:t}=this.props;if(!(0,h._n)(e))return null;if(!t.task||!e.currentSrc)return null;const n={},r=Mj.container,o=!!e.isMultiItem;!1===(0,h.Zn)(e).settings.fullscreen&&(n.maxWidth=e.maxwidth,n.maxHeight=e.maxheight,n.width=e.width,n.height=e.height),!t.settings.enableSmoothing&&e.zoomScale>1&&(n.imageRendering="pixelated");const i=[Mj.image_position,Mj[`image_position__${"center"===e.verticalalignment?"middle":e.verticalalignment}`],Mj[`image_position__${e.horizontalalignment}`]],a=[Mj.wrapperComponent,e.images.length>1?Mj.withGallery:Mj.wrapper];o&&a.push(Mj.withPagination);const[s,l]=(0,O.VS)(O.F2)?[!0,!1]:[e.hasTools,e.stageWidth<=1],c=e.imageIsLoaded||!(0,O.VS)(O.F2);return(0,_.jsxs)(_n,{item:e,className:a.join(" "),children:[o?(0,_.jsx)("div",{className:Mj.pagination,children:(0,_.jsx)(Yj,{size:"small",outline:!1,align:"left",noPadding:!0,hotkey:{prev:"image:prev",next:"image:next"},currentPage:e.currentImage+1,totalPages:e.parsedValueList.length,onChange:t=>e.setCurrentImage(t-1),pageSizeSelectable:!1})}):null,(0,_.jsxs)("div",{ref:t=>{e.setContainerRef(t),this.attachObserver(t)},className:r,style:n,children:[(0,_.jsx)("div",{ref:e=>{this.filler=e},className:Mj.filler,style:{width:"100%",marginTop:e.fillerHeight}}),(0,O.VS)(O.F2)?(0,_.jsx)(Qe,{ref:t=>{e.setImageRef(t),this.imageRef.current=t},usedValue:e.usedValue,imageEntity:e.currentImageEntity,imageTransform:e.imageTransform,updateImageSize:e.updateImageSize,size:e.canvasSize,overlay:(0,_.jsx)(fk,{item:e})}):(0,_.jsxs)("div",{className:[Mj.frame,...i].join(" "),style:e.canvasSize,children:[(0,_.jsx)("img",{ref:t=>{e.setImageRef(t),this.imageRef.current=t},loading:(0,O.VS)(O.H)&&!e.lazyoff?"lazy":"false",style:e.imageTransform,src:e.currentSrc,onLoad:t=>{e.updateImageSize(t),e.currentImageEntity.setImageLoaded(!0)},onError:this.handleError,crossOrigin:e.imageCrossOrigin,alt:"LS"}),(0,_.jsx)(fk,{item:e})]}),l||!s?(0,_.jsx)("div",{className:Mj.loading,children:(0,_.jsx)(Fj.A,{})}):c?(0,_.jsx)(yk,{item:e,crosshairRef:this.crosshairRef,onClick:this.handleOnClick,imagePositionClassnames:i,state:this.state,onMouseEnter:()=>{this.crosshairRef.current&&this.crosshairRef.current.updateVisibility(!0)},onMouseLeave:t=>{this.crosshairRef.current&&this.crosshairRef.current.updateVisibility(!1);const{width:n,height:r}=e.canvasSize,{offsetX:o,offsetY:i}=t.evt,a=Object.assign({},t);o<=0?t.offsetX=0:o>=n&&(t.offsetX=n),i<=0?t.offsetY=0:i>=r&&(t.offsetY=r),this.handleMouseMove(a)},onDragMove:this.updateCrosshair,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,onWheel:e.zoom?this.handleZoom:()=>{}}):null]}),s&&c&&this.renderTools(),e.images.length>1&&(0,_.jsx)("div",{className:Mj.gallery,children:e.images.map(((t,n)=>(0,p.createElement)("img",Object.assign({},Qj,{alt:"",key:t,src:t,className:n===e.currentImage&&Mj.active,height:"60",onClick:()=>e.setCurrentImage(n)}))))})]})}}),yk=(0,y.PA)((({item:e,imagePositionClassnames:t,state:n,onClick:r,onMouseEnter:o,onMouseLeave:i,onDragMove:a,onMouseDown:s,onMouseMove:l,onMouseUp:c,onWheel:d,crosshairRef:u})=>{const{store:h}=e;let g,m;return(0,O.VS)(O.pG)?(g={width:e.containerWidth,height:e.containerHeight},m={x:e.zoomingPositionX+e.alignmentOffset.x,y:e.zoomingPositionY+e.alignmentOffset.y}):(g=Object.assign({},e.canvasSize),m={x:e.zoomingPositionX,y:e.zoomingPositionY}),(0,_.jsx)(pj.BI,{ref:t=>{e.setStageRef(t)},className:[Mj["image-element"],...t].join(" "),width:g.width,height:g.height,scaleX:e.zoomScale,scaleY:e.zoomScale,x:m.x,y:m.y,offsetX:e.stageTranslate.x,offsetY:e.stageTranslate.y,rotation:e.rotation,onClick:r,onMouseEnter:o,onMouseLeave:i,onDragMove:a,onMouseDown:s,onMouseMove:l,onMouseUp:c,onWheel:d,children:(0,_.jsx)(bk,{item:e,store:h,state:n,crosshairRef:u})})})),bk=(0,y.PA)((({item:e,store:t,state:n,crosshairRef:r})=>{if(!(0,h._n)(e))return null;if(!t.task||!e.currentSrc)return null;const o=e.regs,i=!!e.isMultiItem,a=[Mj.wrapperComponent,e.images.length>1?Mj.withGallery:Mj.wrapper];i&&a.push(Mj.withPagination);const{brushRegions:s,shapeRegions:l}=ek(o),{brushRegions:c,shapeRegions:d}=ek(e.suggestions),u=Object.entries({brush:s,shape:l,suggestedBrush:c,suggestedShape:d});return(0,_.jsxs)(_.Fragment,{children:[0===o.length&&(0,_.jsx)(pj.Wd,{children:(0,_.jsx)(pj.N1,{points:[0,0,0,1],stroke:"rgba(0,0,0,0)"})}),e.grid&&e.sizeUpdated&&(0,_.jsx)(fj,{item:e}),(0,O.VS)(O.q$)?(0,_.jsx)(uk,{item:e}):null,u.map((([e,t])=>{const n=null!==e.match(/brush/i),r=null!==e.match("suggested");return t.length>0?(0,_.jsx)(rk,{name:e,regions:t,useLayers:!1===n,suggestion:r},e):(0,_.jsx)(p.Fragment,{},e)})),(0,_.jsx)(mk,{item:e,isPanning:n.isPanning}),(0,_.jsx)(ok,{item:e}),e.crosshair&&(0,_.jsx)(pk,{ref:r,width:(0,O.VS)(O.pG)?e.containerWidth:e.stageWidth,height:(0,O.VS)(O.pG)?e.containerHeight:e.stageHeight})]})}));var xk=n(78438);const wk=[4,4,0,0],Ck=({x:e,y:t,text:n,score:r,showLabels:o,rotation:i=0,zoomScale:a=1,color:s,maxWidth:l,onClickLabel:c,onMouseEnterLabel:d,onMouseLeaveLabel:u,adjacent:h=!1,isTexting:g=!1})=>{var m;const f=20,v=1/a,[y,b]=(0,p.useState)(),x=r?34:0,w=Math.max(0,l*a-25-x),C=!!w,{suggestion:S}=null!=(m=(0,p.useContext)(Uj))?m:{},j=(0,p.useMemo)((()=>{if(!o||!y||!l)return null;return(n?y.measureSize(n).width:0)>w?w:null}),[y,n,l,v]),k=(0,p.useCallback)(((e,t)=>{const n=h&&C?wk:4,r=l?Math.min(t.width()+25,C?l*a:20):t.width()+25,o=t.height();if(e.beginPath(),n){let t=0,i=0,a=0,s=0;"number"==typeof n?t=i=a=s=Math.min(n,r/2,o/2):(t=Math.min(n[0],r/2,o/2),i=Math.min(n[1],r/2,o/2),s=Math.min(n[2],r/2,o/2),a=Math.min(n[3],r/2,o/2)),e.moveTo(t,0),e.lineTo(r-i,0),e.arc(r-i,i,i,3*Math.PI/2,0,!1),e.lineTo(r,o-s),e.arc(r-s,o-s,s,0,Math.PI/2,!1),e.lineTo(a,o),e.arc(a,o-a,a,Math.PI/2,Math.PI,!1),e.lineTo(0,t),e.arc(t,t,t,Math.PI,3*Math.PI/2,!1)}else e.rect(0,0,r,o);e.closePath(),e.fillStrokeShape(t)}),[h,C,l]);return o?(0,_.jsxs)(pj.YJ,{strokeScaleEnabled:!1,x:e,y:t,rotation:i,children:[!!r&&(0,_.jsxs)(pj.JU,{y:-20*v,scaleX:v,scaleY:v,onClick:()=>!1,children:[(0,_.jsx)(pj.vw,{fill:rn.Colors.getScaleGradient(r),cornerRadius:2}),(0,_.jsx)(pj.EY,{text:r.toFixed(2),fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif",fontSize:13,fill:"white",padding:0,lineHeight:1/13*f})]}),(0,_.jsxs)(pj.JU,{x:20*v+x*v,y:-20*v,scaleX:v,scaleY:v,onClick:c,onMouseEnter:c?d:null,onMouseLeave:c?u:null,listening:!S,children:[(0,_.jsx)(pj.vw,{fill:s,cornerRadius:4,sceneFunc:k,offsetX:20}),(0,_.jsx)(pj.EY,{ref:b,text:n,fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif",fontSize:13,lineHeight:1/13*f,height:f,width:j,wrap:"none",ellipsis:"true",fill:V.A.SHOW_LABEL_FILL,padding:0})]}),(0,_.jsx)(pj.wA,{x:2*v+x*v,y:2*v-f*v,scaleX:v,scaleY:v,fill:V.A.SHOW_LABEL_FILL,data:g?"M13,1v2H6C4.11,3,3.17,3,2.59,3.59C2,4.17,2,5.11,2,7v2c0,1.89,0,2.83,0.59,3.41C3.17,13,4.11,13,6,13h7v2h1V1H13z M6,9.5C5.17,9.5,4.5,8.83,4.5,8S5.17,6.5,6,6.5S7.5,7.17,7.5,8S6.83,9.5,6,9.5z M11,9.5c-0.83,0-1.5-0.67-1.5-1.5s0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5S11.83,9.5,11,9.5z":"M13.47,2.52c-0.27-0.27-0.71-0.27-1.59-0.27h-0.64c-1.51,0-2.26,0-2.95,0.29C7.61,2.82,7.07,3.35,6,4.43L3.65,6.78c-0.93,0.93-1.4,1.4-1.4,1.97c0,0.58,0.46,1.04,1.39,1.97l1.63,1.63c0.93,0.93,1.39,1.39,1.97,1.39s1.04-0.46,1.97-1.39L11.57,10c1.07-1.07,1.61-1.61,1.89-2.29c0.28-0.68,0.28-1.44,0.28-2.96V4.11C13.74,3.23,13.74,2.8,13.47,2.52z M10.5,6.9c-0.77,0-1.4-0.63-1.4-1.4s0.63-1.39,1.4-1.39s1.39,0.63,1.39,1.4S11.27,6.9,10.5,6.9z"})]}):null},Sk=(0,y.PA)((({item:e,color:t,strokewidth:n})=>{const r=!!e.texting,o=e.getLabelText(","),i=e.parent,a=e.parent.zoomScale||1;return(0,_.jsx)(Ck,{x:i.internalToCanvasX(e.x-e.radiusX)-n/2/a,y:i.internalToCanvasY(e.y-e.radiusY)-n/2/a,isTexting:r,text:o,score:e.score,showLabels:(0,h.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})})),jk=(0,y.PA)((({item:e,color:t,strokewidth:n})=>{const r=!!e.texting,o=e.getLabelText(","),i=e.parent,a=e.parent.zoomScale||1;return(0,_.jsx)(Ck,{x:i.internalToCanvasX(e.x)-n/2/a,y:i.internalToCanvasY(e.y)-n/2/a,isTexting:r,text:o,score:e.score,showLabels:(0,h.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,rotation:e.rotation,color:t,maxWidth:i.internalToCanvasX(e.width)+n,adjacent:!0,onClickLabel:e.onClickLabel})})),kk=(0,y.PA)((({item:e,color:t})=>{var n;const r=!!e.texting,o=e.getLabelText(","),i=e.bboxCoordsCanvas;if(!i)return null;const a=(0,h.Zn)(e).settings;return(0,_.jsxs)(p.Fragment,{children:[a.showLabels&&(0,_.jsx)(pj.rw,{x:i.left,y:i.top,fillEnabled:!1,width:i.right-i.left,height:i.bottom-i.top,stroke:null==(n=e.style)?void 0:n.strokecolor,strokeWidth:1,strokeScaleEnabled:!1,shadowBlur:0}),(0,_.jsx)(Ck,{x:i.left,y:i.top+2/e.parent.zoomScale,isTexting:r,text:o,score:e.score,showLabels:a.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})]})})),Ok=(0,y.PA)((({item:e,color:t})=>{var n;const r=(0,h.Zn)(e).settings;if(!r.showLabels)return null;const o=!!e.texting,i=e.getLabelText(","),a=e.bboxCoordsCanvas;return a?(0,_.jsxs)(pj.YJ,{name:"region-label",children:[(0,_.jsx)(pj.rw,{x:a.left,y:a.top,fillEnabled:!1,width:a.right-a.left,height:a.bottom-a.top,stroke:null==(n=e.style)?void 0:n.strokecolor,strokeWidth:1,strokeScaleEnabled:!1,shadowBlur:0}),(0,_.jsx)(Ck,{x:a.left,y:a.top+2/e.parent.zoomScale,isTexting:o,text:i,score:e.score,showLabels:r.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})]}):null})),Rk=(0,y.PA)((({item:e,color:t})=>{const n=!!e.texting,r=e.getLabelText(",");return(0,_.jsx)(Ck,{x:e.canvasX+(e.canvasWidth+2)/e.parent.zoomScale,y:e.canvasY+(e.canvasWidth+2)/e.parent.zoomScale,isTexting:n,text:r,score:e.score,showLabels:(0,h.Zn)(e).settings.showLabels,zoomScale:e.parent.zoomScale,color:t,onClickLabel:e.onClickLabel})})),Ek=(0,y.PA)((({reg:e,box:t,color:n,scale:r,strokeWidth:o,adjacent:i=!1})=>{const a=!!e.texting,s=e.getLabelText(",");return(0,_.jsx)(Ck,{x:t.x,y:t.y,rotation:t.rotation,isTexting:a,text:s,score:e.score,showLabels:e.store.settings.showLabels,zoomScale:r,color:n,maxWidth:t.width+o,adjacent:i,onClickLabel:e.onClickRegion})})),_k=h.gK.model({}).views((e=>({get bboxCoords(){return console.warn("KonvaRegionMixin needs to implement bboxCoords getter in regions"),null},get bboxCoordsCanvas(){const t=e.bboxCoords;return(0,O.VS)(O.MV)?e.parent?{left:e.parent.internalToCanvasX(t.left),top:e.parent.internalToCanvasY(t.top),right:e.parent.internalToCanvasX(t.right),bottom:e.parent.internalToCanvasY(t.bottom)}:null:t},get inViewPort(){return!(0,O.VS)(O.pG)||!!e&&!!e.bboxCoordsCanvas&&!!e.object&&e.bboxCoordsCanvas.right>=e.object.viewPortBBoxCoords.left&&e.bboxCoordsCanvas.bottom>=e.object.viewPortBBoxCoords.top&&e.bboxCoordsCanvas.left<=e.object.viewPortBBoxCoords.right&&e.bboxCoordsCanvas.top<=e.object.viewPortBBoxCoords.bottom},get control(){var t;return null==(t=e.results.find((e=>e.from_name.tools)))?void 0:t.from_name},get canRotate(){var t;return(null==(t=e.control)?void 0:t.canrotate)&&e.supportsRotate},get supportsTransform(){return!e.isReadOnly()&&(this._supportsTransform&&!this.hidden)}}))).actions((e=>{let t=null;return{checkSizes(){const{naturalWidth:t,naturalHeight:n,stageWidth:r,stageHeight:o}=e.parent;r>1&&o>1&&(null==e.updateImageSize||e.updateImageSize(r/t,o/n,r,o))},selectRegion(){e.scrollToRegion()},scrollToRegion(){var t;const n=e.object.zoomScale>1,r=null==(t=e.shapeRef)||null==(t=t.parent)||null==(t=t.canvas)?void 0:t._canvas;let o=r;for(;o&&!o.scrollTop&&!o.className.includes("main-content");)o=o.parentElement;if(!o)return;const i=o.getBoundingClientRect(),a=r.getBoundingClientRect(),s=n?{top:0,bottom:a.height}:e.bboxCoordsCanvas,l=s.bottom-s.top,c=s.top-(i.top-a.top),d=r.clientHeight-s.bottom-(a.bottom-i.bottom)-36,u=n&&r.clientHeight>o.clientHeight;if(!(c<0&&d<0))if(c<0&&-c/l>.4){if(n&&(a.bottom-i.top)/o.clientHeight>.4)return;o.scrollBy({top:u?-d:c,left:0,behavior:"smooth"})}else if(d<0&&-d/l>.4){if(n&&(i.bottom-a.top)/o.clientHeight>.4)return;o.scrollBy({top:u?c:-d,left:0,behavior:"smooth"})}},onClickRegion(n){const r=e.annotation,o=(null==n?void 0:n.evt)||n,i=(null==o?void 0:o.ctrlKey)||(null==o?void 0:o.metaKey);if(n&&(n.cancelBubble=!0),(0,O.VS)(O.Kg)){if(2===o.detail)return void e.onDoubleClickRegion()}const a=()=>{e._selectArea(i),t=null};if(!r.isReadOnly()&&r.isLinkingMode)r.addLinkedRegion(e),r.stopLinkingMode(),r.regionStore.unselectAll();else if((0,O.VS)(O.Kg))e._selectArea(i);else{if(!e.perRegionFocusTarget)return void a();t?(clearTimeout(t),e.requestPerRegionFocus(),t=null,r.selectArea(e)):t=setTimeout(a,300)}},onDoubleClickRegion(){e.requestPerRegionFocus(),e.annotation.selectAreas([e])}}}));var Ak=n(87261);const Tk=["item"],Pk=(e,t)=>{const n=(0,y.PA)(e);return(0,y.PA)((e=>{let{item:r}=e,o=(0,Yn.A)(e,Tk);const i=(null==t?void 0:t.renderHidden)||!r.hidden,a=!(0,O.VS)(O.Kg)||(null==t?void 0:t.shouldNotUsePortal),s=a?p.Fragment:Ak.ZL,l=a?{}:{selector:".selection-regions-layer",enabled:r.inSelection},c=!!r.annotation,d=(0,p.useCallback)((e=>{(0,h._n)(r)&&r.setShapeRef(e)}),[r]);return c&&(0,h._n)(r)&&i?(0,_.jsx)(s,Object.assign({},l,{children:(0,_.jsx)(n,Object.assign({item:r},o,{setShapeRef:d}))})):null}))},Ik=(0,y.PA)((({item:e,useLayer:t})=>{const n=(e=>{const{shapeRef:t,bboxCoordsCanvas:n}=e;let r,o,i,a;if((0,w.isDefined)(n))[r,o,i,a]=[n.right-n.left,n.bottom-n.top,n.left,n.top];else{if(!(0,w.isDefined)(t))return null;var s,l;[r,o]=[null!=(s=null==t?void 0:t.width())?s:0,null!=(l=null==t?void 0:t.height())?l:0],[i,a]=[e.x+r/2-32,e.x+r/2-32]}return{x:i+r/2-32,y:a+o+10}})(e),[r,o]=(0,p.useState)(!1),i=1/e.parent.zoomScale;if(n){const a={width:64,height:32},s=t?{x:0,y:0,scaleX:1,scaleY:1}:{x:n.x,y:n.y,scaleX:i,scaleY:i},l=t?{x:n.x,y:n.y,scaleX:i,scaleY:i}:{},c=(0,_.jsxs)(pj.YJ,Object.assign({},a,s,{opacity:e.highlighted||r?1:.5,onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:[(0,_.jsx)(pj.rw,{x:0,y:0,width:64,height:32,fill:"#000",cornerRadius:16}),(0,_.jsx)(Lk,{onClick:()=>e.annotation.rejectSuggestion(e.id),fill:"#DD0000",iconColor:"#fff",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAxCAYAAACcXioiAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF9SURBVHgB7ZjtTcMwEEAdJigbZANWCEzCJmUENmg3oCxAxQgsUHcCGOE4q4kUQe347PtIJT/phETb83tVfyRxrtFoNBoVdKkXAWDAPw849zj7ruvOToHZuYH3onNxyRb+s3XCsJyLH3iGOGIREfmJgbLoDdKwRyzIB3aUZUsBrBEZ8oEjZeEL5FEdkSkfeKUs3eD4zMXFEQR5j9NTdoflPQhGiMpLR6jIS0WoynNHmMhzRZjK10asQr40AtYkXxixLnmBCK8uzxjhzeQZIry5/ERBhOeSv3M8nHEOhPcftG5PF8FvknL5PUf89nSRCnn7CAZ5uwhGef0IovwJFO7sJOV7EL6zE5WffdY2okbePIJD3iyCU149QkJeLUJSXiUC0k+nq+ULIwbK4pyHu1XyBRFXn07HLqc3Lo3HeeK4JB53PLrLJXmK/to/YwGfLg6b/ERmxJfLBS5Pp09SP5vEubGfkyefOy7b4XyP8yEp/+fcPc7POEeNcxuNW+UXHw/Tr96+EacAAAAASUVORK5CYII="}),(0,_.jsx)(Lk,{x:32,onClick:()=>e.annotation.acceptSuggestion(e.id),fill:"#98C84E",iconColor:"#fff",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADEAAAAxCAYAAABznEEcAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEhSURBVHgB7ZftDYIwEIavcQHdwA1cgU0cwRFwA0fQSRgFnMARPO9CSdAItLSl1+Se5A1/6MFD6ReAoiiKoijyMVAIiMiXinKiHCgPY8wTSoEFKFf85k2poQQmBMYi1Q4EY3+hK2Xqi/NwQJDKQg+MaUAiHgLMDaThKdBSjiAJFciNCswUvlA625CvZ0hASoF6okjUJT6lwH6hWBQRTDkG6ObKoWiQCKYexNzAsTi/BPiCW81C1LBxfIiXCG45jWLfG63jw5xEMMc6EFsEcy1kMUSw74HasUaalThEBCVtJdaIiBIIEJG5mfMUkSeQQCTvdjqCiIzzQICIrAPNChF5JzLGQ0SmwICDSCdaYGBGRHYP/GJF7pSXTVOUgKIoivKPD0UduGDYAx6AAAAAAElFTkSuQmCC"})]}));return t?(0,_.jsx)(pj.Wd,Object.assign({},a,l,{children:c})):c}return null})),Lk=({x:e=0,fill:t,iconColor:n,onClick:r,icon:o})=>{const[i,a]=(0,p.useState)(new window.Image),s=pt()(null!=n?n:"#fff"),[l,c]=(0,p.useState)(!1);(0,p.useEffect)((()=>{const e=new window.Image;e.onload=()=>{a(e)},e.width=12,e.height=12,e.src=o}),[o]);const d=(0,p.useCallback)((e=>{if(e){const[t,n,r,o]=s.rgba();e.cache(),e.setAttrs({red:t,green:n,blue:r,alpha:o})}}),[]);return(0,_.jsxs)(pj.YJ,{x:e,width:32,height:32,onClick:r,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),children:[(0,_.jsx)(pj.jl,{x:16,y:16,radius:14,opacity:l?1:.2,fill:l?t:"#fff"}),(0,_.jsx)(pj._V,{ref:e=>d(e),x:8,y:8,width:16,height:16,image:i,filters:[yt.A.Filters.RGB]})]})},Mk=(0,y.PA)((({item:e,children:t})=>{var n;const{suggestion:r}=null!=(n=(0,p.useContext)(Uj))?n:{};return(0,_.jsxs)(p.Fragment,{children:[t,r&&(0,_.jsx)(Ik,{item:e,useLayer:"brushregion"===e.type})]})})),Kk={shadowColor:"red",shadowBlur:1,shadowOffsetY:2,shadowOffsetX:2,shadowOpacity:1},Dk=h.gK.model("Points",{id:h.gK.optional(h.gK.identifier,E),type:h.gK.optional(h.gK.enumeration(["add","eraser"]),"add"),points:h.gK.array(h.gK.number),relativePoints:h.gK.array(h.gK.number),strokeWidth:h.gK.optional(h.gK.number,25),relativeStrokeWidth:h.gK.optional(h.gK.number,25),eraserSize:h.gK.optional(h.gK.number,25)}).views((e=>({get store(){return(0,h.Zn)(e)},get parent(){return(0,h.p7)(e,2)?(0,h.PA)(e,2):null},get stage(){var t;return null==(t=e.parent)?void 0:t.parent},get compositeOperation(){return"add"===e.type?"source-over":"destination-out"}}))).actions((e=>({updateImageSize(t,n,r,o){e.points=e.relativePoints.map(((e,t)=>e*(!(t%2)?r:o)/100)),e.strokeWidth=e.relativeStrokeWidth*r/100},setType(t){e.type=t},addPoint(t,n){t/=e.parent.scaleX,n/=e.parent.scaleY,e.points.push(t),e.points.push(n)},setPoints(t){e.points=t.map(((t,n)=>t/(n%2==0?e.parent.scaleX:e.parent.scaleY))),e.relativePoints=t.map(((t,n)=>t/(n%2==0?e.stage.stageWidth:e.stage.stageHeight)*100)),e.relativeStrokeWidth=e.strokeWidth/e.stage.stageWidth*100},rescale(t,n,r){const o=r/t;return e.points.map((e=>e*o))},scaledStrokeWidth:(t,n,r)=>r/t*e.strokeWidth}))),Nk=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"brushregion",object:h.gK.late((()=>h.gK.reference(HR))),coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc"),rle:h.gK.frozen(),maskDataURL:h.gK.frozen(),touches:h.gK.array(Dk),currentTouch:h.gK.maybeNull(h.gK.reference(Dk))}).volatile((()=>({tension:0,opacity:.6,scaleX:1,scaleY:1,mode:"brush",needsUpdate:1,hideable:!0,layerRef:void 0,imageData:null}))).views((e=>({get parent(){return(0,h._n)(e)?e.object:null},get colorParts(){const t=e.style||e.tag||V.l;return(0,gt.colorToRGBAArray)(t.strokecolor)},get strokeColor(){return(0,gt.rgbArrayToHex)(e.colorParts)},get touchesLength(){return e.touches.length},get bboxCoordsCanvas(){if(!e.imageData){const s={x:[],y:[]};for(let l=0;l in(null!=(t=null==(n=e.touches)||null==(n=n[0])?void 0:n.points)?t:[]);l+=2){var t,n,r,o,i,a;const c=(null!=(r=null==(o=e.touches)||null==(o=o[0])?void 0:o.points)?r:[])[l],d=(null!=(i=null==(a=e.touches)||null==(a=a[0])?void 0:a.points)?i:[])[l+1];s.x.push(c),s.y.push(d)}return{left:Math.min(...s.x),top:Math.min(...s.y),right:Math.max(...s.x),bottom:Math.max(...s.y)}}const s=X.getImageDataBBox(e.imageData.data,e.imageData.width,e.imageData.height);if(!s)return null;const{stageScale:l=1,zoomingPositionX:c=0,zoomingPositionY:d=0}=e.parent||{};return s.x=s.x/l-c/l,s.y=s.y/l-d/l,s.width=s.width/l,s.height=s.height/l,{left:s.x,top:s.y,right:s.x+s.width,bottom:s.y+s.height}},get bboxCoords(){const t=e.bboxCoordsCanvas;return t?(0,O.VS)(O.MV)?{left:e.parent.canvasToInternalX(t.left),top:e.parent.canvasToInternalY(t.top),right:e.parent.canvasToInternalX(t.right),bottom:e.parent.canvasToInternalY(t.bottom)}:t:null}}))).actions((e=>{let t,n,r,o=-1,i=-1;return{afterCreate(){e.updateMaskImage()},updateMaskImage(){e.maskDataURL&&(r||(r=new window.Image),r.src=e.maskDataURL)},getMaskImage:()=>r,setLayerRef(t){t&&(t.canvas._canvas.style.opacity=e.opacity,e.layerRef=t)},cacheImageData(){if(e.layerRef){const t=e.layerRef.toCanvas().getContext("2d");e.imageData=t.getImageData(0,0,e.layerRef.canvas.width,e.layerRef.canvas.height)}else e.imageData=null},prepareCoords:([t,n])=>e.parent.zoomOriginalCoords([t,n]),preDraw(r,a){if(!e.layerRef)return;const s=e.layerRef.canvas.context;if(s.save(),(0,O.VS)(O.pG)&&(s.beginPath(),s.rect(e.parent.alignmentOffset.x,e.parent.alignmentOffset.y,e.parent.stageWidth*e.parent.stageScale,e.parent.stageHeight*e.parent.stageScale),s.clip()),s.beginPath(),n.length/2>3)s.moveTo(...e.prepareCoords([o,i]));else if(0===n.length)s.moveTo(...e.prepareCoords([r,a]));else{s.moveTo(...e.prepareCoords([n[0],n[1]]));for(let t=0;t(e.object.annotation.pauseAutosave(),t=Dk.create({id:E(),type:r,strokeWidth:o,opacity:i}),n=[],t),addPoint(t,r){e.preDraw(t,r),n.push(t),n.push(r)},endPath(){const{annotation:r}=e.object;r.startAutosave(),2===n.length&&(n.push(n[0]),n.push(n[1])),e.touches.push(t),e.currentTouch=t,t.setPoints(n),o=i=-1,t=null,n=[],e.notifyDrawingFinished(),r.autosave&&setTimeout((()=>r.autosave()))},endUpdatedMaskDataURL(t){const{annotation:n}=e.object;n.startAutosave(),e.maskDataURL=t,e.updateMaskImage(),e.notifyDrawingFinished(),n.autosave&&setTimeout((()=>n.autosave()))},convertPointsToMask(){},setScale(t,n){e.scaleX=t,e.scaleY=n},updateImageSize(t,n,r,o){e.parent.stageWidth>1&&e.parent.stageHeight>1&&(e.touches.forEach((e=>e.updateImageSize(t,n,r,o))),e.needsUpdate=e.needsUpdate+1)},addState(t){e.states.push(t)},convertToImage(){if(e.touches.length){const t=e.object,n=xk.A.Region2RLE(e,t,{color:e.strokeColor});e.touches=[],e.rle=Array.from(n)}},serialize(t){const n=e.object,r={format:"rle"};if(null!=t&&t.fast)r.rle=e.rle,e.touches.length&&(r.touches=e.touches),e.maskDataURL&&(r.maskDataURL=e.maskDataURL);else{const t=xk.A.Region2RLE(e,n);if(!t||!t.length)return null;r.rle=Array.from(t)}return e.parent.createSerializedResult(e,r)}}})),Vk=h.gK.compose("BrushRegionModel",it,We,ht,_k,Le,Nk),zk=(0,y.PA)((({item:e,setShapeRef:t,pointsList:n})=>{const r=(0,p.useCallback)(((e,{points:t,strokeWidth:n,strokeColor:r,compositeOperation:o})=>{e.save(),e.beginPath(),e.moveTo(t[0],t[1]);for(let n=0;n{n.forEach((n=>{r(t,{points:n.points,strokeWidth:n.strokeWidth,strokeColor:e.strokeColor,compositeOperation:n.compositeOperation})}))}),[n,n.length,e.strokeColor]),i=(0,p.useCallback)(((e,t)=>{n.forEach((n=>{r(e,{points:n.points,strokeWidth:n.strokeWidth,strokeColor:"eraser"===n.type?"#ffffff":t.colorKey,compositeOperation:"source-over"})}))}),[n,n.length]);return(0,_.jsx)(pj.yp,{ref:e=>t(e),sceneFunc:o,hitFunc:i})})),Bk=Pk((({item:e,setShapeRef:t})=>{var n,r,o,i,a,s,l,c,d,u,g,m;const[f,v]=(0,p.useState)(),{suggestion:y}=null!=(n=(0,p.useContext)(Uj))?n:{};(0,p.useEffect)((async()=>{if(!e.rle&&!e.maskDataURL)return;if(!e.parent||e.parent.naturalWidth<=1||e.parent.naturalHeight<=1)return;let t;e.maskDataURL&&(0,O.VS)(O.bP)?t=await xk.A.maskDataURL2Image(e.maskDataURL,{color:e.strokeColor}):e.rle&&(t=xk.A.RLE2Region(e,{color:e.strokeColor})),t&&(t.onload=()=>{v(t),e.setReady(!0)})}),[e.rle,e.maskDataURL,e.maskBoundsMinX,e.maskBoundsMinY,e.maskBoundsMaxX,e.maskBoundsMaxY,e.parent,null==(r=e.parent)?void 0:r.naturalWidth,null==(o=e.parent)?void 0:o.naturalHeight,e.strokeColor,e.opacity]);const b=(0,p.useMemo)((()=>{let t;return(n,r)=>{if(f){if(!t){n.drawImage(f,0,0,e.parent.stageWidth,e.parent.stageHeight),t=(0,O.VS)(O.pG)?n.getImageData(e.parent.alignmentOffset.x,e.parent.alignmentOffset.y,e.parent.stageWidth,e.parent.stageHeight):n.getImageData(0,0,e.parent.stageWidth,e.parent.stageHeight);const o=(0,gt.colorToRGBAArray)(r.colorKey);for(let e=t.data.length/4-1;e>=0;e--)if(t.data[4*e+3]>0)for(let n=0;n<3;n++)t.data[4*e+n]=o[n]}n.putImageData(t,0,0)}}}),[f,null==(i=e.parent)?void 0:i.stageWidth,null==(a=e.parent)?void 0:a.stageHeight]),{store:x}=e,w=(0,p.useRef)(new window.Image),C=(0,p.useRef)(),S=(0,p.useRef)({});S.current.highlighted=e.highlighted,S.current.highlight=S.current.highlighted?Kk:{shadowOpacity:0};const j=(0,p.useMemo)((()=>{let t=!1;return async()=>{var n;const{highlighted:r}=S.current,o=C.current;if((null==(n=e.parent)?void 0:n.drawingRegion)===e||!o||t)return;let i;r&&(i=o.findOne(".highlight"),i.hide()),o.draw();const a=o.canvas.toDataURL();e.cacheImageData(),r&&(i.show(),o.draw()),w.current.src=a,t=!0}}),[e.touches.length,e.strokeColor,null==(s=e.parent)?void 0:s.stageScale,null==(l=x.annotationStore.selected)?void 0:l.id,null==(c=e.parent)?void 0:c.zoomingPositionX,null==(d=e.parent)?void 0:d.zoomingPositionY,null==(u=e.parent)?void 0:u.stageWidth,null==(g=e.parent)?void 0:g.stageHeight,e.maskDataURL,e.rle,f]),k=(0,p.useCallback)((t=>{(0,h._n)(e)&&e.setLayerRef(t)}),[e]);if(!e.parent)return null;const R=null==(m=e.parent)?void 0:m.stageRef,E=(0,O.VS)(O.pG)?{scaleX:1/e.parent.zoomScale,scaleY:1/e.parent.zoomScale,x:-(e.parent.zoomingPositionX+e.parent.alignmentOffset.x)/e.parent.zoomScale,y:-(e.parent.zoomingPositionY+e.parent.alignmentOffset.y)/e.parent.zoomScale,width:e.containerWidth,height:e.containerHeight}:{scaleX:1/e.parent.stageScale,scaleY:1/e.parent.stageScale,x:-e.parent.zoomingPositionX/e.parent.stageScale,y:-e.parent.zoomingPositionY/e.parent.stageScale,width:e.parent.canvasSize.width,height:e.parent.canvasSize.height},A=(0,O.VS)(O.pG)?{x:0,y:0,width:e.parent.stageWidth,height:e.parent.stageHeight}:null;return(0,_.jsxs)(Mk,{item:e,children:[(0,_.jsx)(pj.Wd,{id:e.cleanId,ref:e=>{k(e),C.current=e},onDraw:()=>{setTimeout(j)},clearBeforeDraw:!e.isDrawing,visible:!e.hidden,clip:A,children:(0,_.jsxs)(pj.YJ,{attrMy:e.needsUpdate,name:"segmentation",onMouseDown:e=>{x.annotationStore.selected.isLinkingMode&&(e.cancelBubble=!0)},onMouseOver:()=>{x.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),R.container().style.cursor="crosshair"):e.parent.getToolsManager().findSelectedTool()||(R.container().style.cursor="pointer")},onMouseOut:()=>{var t;x.annotationStore.selected.isLinkingMode&&e.setHighlight(!1),null!=(t=e.parent)&&t.getToolsManager().findSelectedTool()||(R.container().style.cursor="default")},onClick:t=>{if(!e.parent.getSkipInteractions())if(x.annotationStore.selected.isLinkingMode)e.onClickRegion(t);else{if(!(0,O.VS)(O.pG)){const t=e.parent.getToolsManager().findSelectedTool(),n=t&&"MoveTool"===(0,h.Pw)(t).name;if(t&&!n)return}x.annotationStore.selected.isLinkingMode&&(R.container().style.cursor="default"),e.setHighlight(!1),e.onClickRegion(t)}},listening:!y,children:[(0,_.jsx)(pj._V,{image:f,hitFunc:b,width:e.parent.stageWidth,height:e.parent.stageHeight}),(0,_.jsx)(pj.YJ,{children:(0,_.jsx)(zk,{store:x,item:e,pointsList:e.touches,setShapeRef:t})}),(0,_.jsx)(pj._V,Object.assign({name:"highlight",image:w.current,sceneFunc:S.current.highlighted?null:()=>{},hitFunc:()=>{}},S.current.highlight,E,{listening:!1}))]})}),(0,_.jsx)(pj.Wd,{id:`${e.cleanId}_labels`,ref:t=>{t&&(t.canvas._canvas.style.opacity=e.opacity)},children:(0,_.jsx)(pj.YJ,{children:(0,_.jsx)(Ok,{item:e,color:e.strokeColor})})})]})}),{renderHidden:!0,shouldNotUsePortal:!0});x.addTag("brushregion",Vk,Bk),x.addRegionType(Vk,"image",(e=>e.rle||e.touches||e.maskDataURL));const Hk={defaultOpacity:V.l.opacity,defaultFillColor:V.l.fillcolor,defaultStrokeColor:V.l.strokecolor,defaultStrokeColorHighlighted:V.A.HIGHLIGHTED_STROKE_COLOR,defaultStrokeWidth:V.l.strokewidth,defaultStrokeWidthHighlighted:V.A.HIGHLIGHTED_STROKE_WIDTH,defaultSuggestionWidth:V.A.SUGGESTION_STROKE_WIDTH},Fk=(e,t={})=>{var n,r;const{suggestion:o}=null!=(n=(0,p.useContext)(Uj))?n:{},[i,a]=(0,p.useState)(e.highlighted),[s,l]=(0,p.useState)(null!=(r=e.fill)?r:t.useStrokeAsFill||t.includeFill),c=(0,p.useMemo)((()=>(({region:e,highlighted:t=!1,shouldFill:n=!1,useStrokeAsFill:r=!1,sameStrokeWidthForSelected:o=!1,suggestion:i=!1,defaultOpacity:a=V.l.opacity,defaultFillColor:s=V.l.fillcolor,defaultStrokeColor:l=V.l.strokecolor,defaultStrokeColorHighlighted:c=V.A.HIGHLIGHTED_STROKE_COLOR,defaultStrokeWidth:d=V.l.strokewidth,defaultStrokeWidthHighlighted:u=V.A.HIGHLIGHTED_STROKE_WIDTH,defaultSuggestionWidth:h=V.A.SUGGESTION_STROKE_WIDTH})=>{var g,m,p;const f=e.style||e.tag,v=e.inSelection||t,y=null==f?void 0:f.fillopacity,b=(0,w.isDefined)(y)?y:null==f?void 0:f.opacity,x=n?pt()(null!=(g=r?null==f?void 0:f.strokecolor:null==f?void 0:f.fillcolor)?g:s).darken(.3).alpha(+(null!=(m=null!=b?b:a)?m:.5)).css():null;var C;return{strokeColor:v?c:pt()(null!=(p=null==f?void 0:f.strokecolor)?p:l).css(),fillColor:x,strokeWidth:i?h:v&&!o?u:+(null!=(C=null==f?void 0:f.strokewidth)?C:d)}})(Object.assign({},Hk,null!=t?t:{},{highlighted:i,shouldFill:s,region:e,suggestion:o}))),[e,o,t,i,s]);return(0,p.useEffect)((()=>{const t=["highlighted","fill"].map((t=>{try{return(0,u.lB)(e,t,(({newValue:e})=>{switch(t){case"highlighted":return a(e);case"fill":return l(e)}}),!0)}catch(e){return()=>{}}}));return()=>{t.forEach((e=>e()))}}),[e]),c};function Wk(e,t,n={x:e.left,y:e.top},r=1){if(!e)return e;const o=t*Math.PI/180,i=Math.cos(o),a=Math.sin(o),s=[{x:e.left-n.x,y:e.top-n.y},{x:e.right-n.x,y:e.top-n.y},{x:e.left-n.x,y:e.bottom-n.y},{x:e.right-n.x,y:e.bottom-n.y}].map((e=>({x:e.x*i-e.y*a/r,y:e.x*a*r+e.y*i}))),[l,c]=(0,w.minMax)(s.map((e=>e.x))),[d,u]=(0,w.minMax)(s.map((e=>e.y)));return{left:l+n.x,right:c+n.x,top:d+n.y,bottom:u+n.y}}const $k=h.gK.model({coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc")}).volatile((()=>({relativeX:0,relativeY:0,relativeWidth:0,relativeHeight:0,relativeRadiusX:0,relativeRadiusY:0}))).actions((e=>({afterCreate(){switch(e.startX=e.x,e.startY=e.y,e.coordstype){case"perc":e.relativeX=e.x,e.relativeY=e.y,e.relativeRadiusX=e.radiusX,e.relativeRadiusY=e.radiusY,e.relativeWidth=e.width,e.relativeHeight=e.height;break;case"px":{const{stageWidth:t,stageHeight:n}=e.parent;t&&n&&e.setPosition(e.x,e.y,e.radiusX,e.radiusY,e.rotation);break}}e.checkSizes(),e.updateAppearenceFromState()},setPosition(t,n,r,o,i){var a,s,l,c;e.x=t,e.y=n,e.radiusX=r,e.radiusY=o,e.relativeX=t/(null==(a=e.parent)?void 0:a.stageWidth)*Ye,e.relativeY=n/(null==(s=e.parent)?void 0:s.stageHeight)*Xe,e.relativeRadiusX=r/(null==(l=e.parent)?void 0:l.stageWidth)*Ye,e.relativeRadiusY=o/(null==(c=e.parent)?void 0:c.stageHeight)*Xe,e.rotation=(i+360)%360},setPositionInternal:(t,n,r,o,i)=>e.setPosition(t,n,r,o,i),updateImageSize(t,n,r,o){e.sw=r,e.sh=o,"px"===e.coordstype?(e.x=r*e.relativeX/Ye,e.y=o*e.relativeY/Xe,e.radiusX=r*e.relativeRadiusX/Ye,e.radiusY=o*e.relativeRadiusY/Xe):"perc"===e.coordstype&&(e.x=r*e.x/Ye,e.y=o*e.y/Xe,e.radiusX=r*e.radiusX/Ye,e.radiusY=o*e.radiusY/Xe,e.coordstype="px")}}))),Uk=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"ellipseregion",object:h.gK.late((()=>h.gK.reference(HR))),x:h.gK.number,y:h.gK.number,radiusX:h.gK.number,radiusY:h.gK.number,rotation:0}).volatile((()=>({startX:0,startY:0,scaleX:1,scaleY:1,opacity:h.gK.number,fill:!0,fillColor:V.A.FILL_COLOR,fillOpacity:.2,strokeColor:V.A.STROKE_COLOR,strokeWidth:V.A.STROKE_WIDTH,_supportsTransform:!0,hideable:!0,editableFields:[{property:"x",label:"X"},{property:"y",label:"Y"},{property:"radiusX",label:"Rx"},{property:"radiusY",label:"Ry"},{property:"rotation",label:"icon:angle"}]}))).volatile((()=>({useTransformer:!0,preferTransformer:!0,supportsRotate:!0,supportsScale:!0}))).views((e=>({get store(){return(0,h.Zn)(e)},get bboxCoords(){const t={left:e.x-e.radiusX,top:e.y-e.radiusY,right:e.x+e.radiusX,bottom:e.y+e.radiusY};return 0===e.rotation?t:Wk(t,e.rotation,{x:e.x,y:e.y},e.parent.whRatio)},get canvasX(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasRadiusX(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.radiusX):e.radiusX},get canvasRadiusY(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.radiusY):e.radiusY}}))).actions((e=>({afterCreate(){e.startX=e.x,e.startY=e.y},coordsInside(t,n){const r=e.radiusX,o=e.radiusY;let i=t-e.x,a=n-e.y;const s=e.rotation;return i=i*Math.cos(Math.unit(s,"deg"))-a*Math.sin(Math.unit(s,"deg")),a=i*Math.sin(Math.unit(s,"deg"))+a*Math.cos(Math.unit(s,"deg")),Math.abs(i){var n,r;const{store:o}=e,i=Fk(e),a=null==(n=e.parent)?void 0:n.stageRef,{suggestion:s}=null!=(r=(0,p.useContext)(Uj))?r:{};return e.parent&&e.inViewPort?(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(pj.Pp,{x:e.canvasX,y:e.canvasY,ref:e=>t(e),radiusX:e.canvasRadiusX,radiusY:e.canvasRadiusY,fill:i.fillColor,stroke:i.strokeColor,strokeWidth:i.strokeWidth,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,shadowBlur:0,scaleX:e.scaleX,scaleY:e.scaleY,opacity:1,rotation:e.rotation,name:`${e.id} _transformable`,onTransform:({target:e})=>{e.setAttr("skewX",0),e.setAttr("skewY",0)},onTransformEnd:t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y"),n.getAttr("radiusX")*n.getAttr("scaleX"),n.getAttr("radiusY")*n.getAttr("scaleY"),n.getAttr("rotation")),n.setAttr("scaleX",1),n.setAttr("scaleY",1),e.notifyDrawingFinished()},onDragStart:t=>{e.parent.getSkipInteractions()?t.currentTarget.stopDrag(t.evt):e.annotation.history.freeze(e.id)},onDragEnd:t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y"),n.getAttr("radiusX"),n.getAttr("radiusY"),n.getAttr("rotation")),e.setScale(n.getAttr("scaleX"),n.getAttr("scaleY")),e.annotation.history.unfreeze(e.id),e.notifyDrawingFinished()},dragBoundFunc:jt(e,{x:e.x-e.bboxCoords.left,y:e.y-e.bboxCoords.top}),onMouseOver:()=>{o.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),a.container().style.cursor=V.A.LINKING_MODE_CURSOR):a.container().style.cursor=V.A.POINTER_CURSOR},onMouseOut:()=>{a.container().style.cursor=V.A.DEFAULT_CURSOR,o.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(o.annotationStore.selected.isLinkingMode&&(a.container().style.cursor=V.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))},draggable:!e.isReadOnly(),listening:!s}),(0,_.jsx)(Sk,{item:e,color:i.strokeColor,strokewidth:i.strokeWidth})]}):null}));x.addTag("ellipseregion",Zk,Gk),x.addRegionType(Zk,"image");const Yk=h.gK.model({coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc")}).volatile((()=>({relativeX:0,relativeY:0}))).actions((e=>({afterCreate(){if("perc"===e.coordstype)e.relativeX=e.x,e.relativeY=e.y,e.checkSizes();else{const{stageWidth:t,stageHeight:n}=e.parent;t&&n&&(e.relativeX=e.x/t*Ye,e.relativeY=e.y/n*Xe)}},setPosition(t,n){var r;const o=null==(r=e.control)?void 0:r.getSnappedPoint({x:e.parent.canvasToInternalX(t),y:e.parent.canvasToInternalY(n)});e.x=o.x,e.y=o.y,e.relativeX=o.x/e.parent.stageWidth*Ye,e.relativeY=o.y/e.parent.stageHeight*Xe},updateImageSize(t,n,r,o){"px"===e.coordstype&&(e.x=r*e.relativeX/Ye,e.y=o*e.relativeY/Xe),"perc"===e.coordstype&&(e.x=r*e.x/Ye,e.y=o*e.y/Xe,e.width=r*e.width/Ye,e.coordstype="px")}}))),Xk=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"keypointregion",object:h.gK.late((()=>h.gK.reference(HR))),x:h.gK.number,y:h.gK.number,width:h.gK.number,negative:!1}).volatile((()=>({hideable:!0,_supportsTransform:!0,useTransformer:!1,supportsRotate:!1,supportsScale:!1,editableFields:[{property:"x",label:"X"},{property:"y",label:"Y"}]}))).views((e=>({get store(){return(0,h.Zn)(e)},get bboxCoords(){return{left:e.x-e.width,top:e.y-e.width,right:e.x+e.width,bottom:e.y+e.width}},get canvasX(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasWidth(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.width):e.width}}))).actions((e=>({setPosition(t,n){var r;const o=null==(r=e.control)?void 0:r.getSnappedPoint({x:e.parent.canvasToInternalX(t),y:e.parent.canvasToInternalY(n)});e.x=o.x,e.y=o.y},updateImageSize(){},serialize(){const t={x:(0,O.VS)(O.MV)?e.x:e.convertXToPerc(e.x),y:(0,O.VS)(O.MV)?e.y:e.convertYToPerc(e.y),width:(0,O.VS)(O.MV)?e.width:e.convertHDimensionToPerc(e.width)},n=e.parent.createSerializedResult(e,t);return e.dynamic&&(n.is_positive=!e.negative,n.value.labels=e.labels),n}}))),qk=h.gK.compose("KeyPointRegionModel",it,ht,We,_k,sn,Xk,...(0,O.VS)(O.MV)?[]:[Yk]),Jk=Pk((({item:e,setShapeRef:t})=>{var n,r,o,i;const{store:a}=e,{suggestion:s}=null!=(n=(0,p.useContext)(Uj))?n:{},l=Fk(e,{includeFill:!0,defaultFillColor:"#000",defaultStrokeColor:"#fff",defaultOpacity:(null!=(r=e.style)?r:e.tag)?.6:1,sameStrokeWidthForSelected:!0}),c={opacity:1,fill:l.fillColor,stroke:l.strokeColor,strokeWidth:Math.max(1,l.strokeWidth),strokeScaleEnabled:!1,shadowBlur:0},d=null==(o=e.parent)?void 0:o.stageRef;return e.parent&&e.inViewPort?(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(pj.jl,Object.assign({x:e.canvasX,y:e.canvasY,ref:e=>t(e),radius:Math.max(e.canvasWidth,2)/(null==(i=e.parent)?void 0:i.zoomScale),perfectDrawEnabled:!1,name:`${e.id} _transformable`,onDragStart:t=>{e.parent.getSkipInteractions()?t.currentTarget.stopDrag(t.evt):e.annotation.history.freeze(e.id)},onDragEnd:t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y")),n.setAttr("x",e.canvasX),n.setAttr("y",e.canvasY),e.annotation.history.unfreeze(e.id),e.notifyDrawingFinished()},dragBoundFunc:jt(e),transformsEnabled:"position",onTransformEnd:t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y")),n.setAttr("scaleX",1),n.setAttr("scaleY",1)},onMouseOver:()=>{a.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),d.container().style.cursor="crosshair"):d.container().style.cursor="pointer"},onMouseOut:()=>{d.container().style.cursor="default",a.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(a.annotationStore.selected.isLinkingMode&&(d.container().style.cursor=V.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))}},c,{draggable:!e.isReadOnly(),listening:!s})),(0,_.jsx)(Rk,{item:e,color:l.strokeColor})]}):null}));x.addTag("keypointregion",qk,Jk),x.addRegionType(qk,"image",(e=>"x"in e&&"y"in e&&"width"in e&&!("height"in e)));const Qk=h.gK.model().volatile((()=>({relativeX:0,relativeY:0,initX:0,initY:0}))).actions((e=>({afterCreate(){e.initX=e.x,e.initY=e.y,"perc"===e.parent.coordstype?(e.relativeX=e.x,e.relativeY=e.y):(e.relativeX=e.x/e.stage.stageWidth*Ye,e.relativeY=e.y/e.stage.stageHeight*Xe)},movePoint(t,n){e.initX=e.initX+t,e.initY=e.initY+n,e.x=e.x+t,e.y=e.y+n,e.relativeX=e.x/e.stage.stageWidth*Ye,e.relativeY=e.y/e.stage.stageHeight*Xe},_setPos(t,n){e.initX=t,e.initY=n,e.relativeX=t/e.stage.stageWidth*Ye,e.relativeY=n/e.stage.stageHeight*Xe,e.x=t,e.y=n},_movePoint(t,n){var r;const o=null==(r=e.parent.control)?void 0:r.getSnappedPoint({x:e.stage.canvasToInternalX(t),y:e.stage.canvasToInternalY(n)});e._setPos(o.x,o.y)}}))),eO=h.gK.model("PolygonPoint",{id:h.gK.optional(h.gK.identifier,E),x:h.gK.number,y:h.gK.number,index:h.gK.number,style:"circle",size:"small"}).volatile((()=>({selected:!1}))).views((e=>({get parent(){return(0,h.p7)(e,2)?(0,h.PA)(e,2):null},get stage(){var t;return null==(t=e.parent)?void 0:t.parent},get annotation(){return(0,h.Zn)(e).annotationStore.selected},get canvasX(){var t;return(0,O.VS)(O.MV)?null==(t=e.stage)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,O.VS)(O.MV)?null==(t=e.stage)?void 0:t.internalToCanvasY(e.y):e.y}}))).actions((e=>({movePoint(t,n){const r=e.stage.canvasToInternalX(t),o=e.stage.canvasToInternalY(n);e.x=e.x+r,e.y=e.y+o},_setPos(t,n){e.x=t,e.y=n},_movePoint(t,n){var r;const o=null==(r=e.parent.control)?void 0:r.getSnappedPoint({x:e.stage.canvasToInternalX(t),y:e.stage.canvasToInternalY(n)});e._setPos(o.x,o.y)},closeStartPoint(){e.annotation.isReadOnly()||e.parent.closed||e.parent.mouseOverStartPoint&&e.parent.closePoly()},handleMouseOverStartPoint(t){var n;t.cancelBubble=!0;const r=null==(n=e.stage)?void 0:n.stageRef;if(!r)return;if(r.container().style.cursor="crosshair",e.parent.closed||e.parent.points.length<3)return;const o=t.target;"rectangle"===e.style&&(o.setX(o.x()-o.width()/2),o.setY(o.y()-o.height()/2));const i={small:2,medium:3,large:4}[e.size];o.scale({x:i/e.stage.zoomScale,y:i/e.stage.zoomScale}),e.parent.setMouseOverStartPoint(!0)},handleMouseOutStartPoint(t){var n;const r=t.target,o=null==(n=e.stage)?void 0:n.stageRef;o&&(o.container().style.cursor="default","rectangle"===e.style&&(r.setX(r.x()+r.width()/2),r.setY(r.y()+r.height()/2)),r.scale({x:1/e.stage.zoomScale,y:1/e.stage.zoomScale}),e.parent.setMouseOverStartPoint(!1))},getSkipInteractions:()=>e.parent.control.obj.getSkipInteractions()}))),tO=(0,O.VS)(O.MV)?eO:h.gK.compose("PolygonPoint",eO,Qk),nO=(0,y.PA)((({item:e,name:t})=>{if(!e.parent)return;const[n,r]=(0,p.useState)(!0),o=Fk(e.parent),i={small:1,medium:2,large:3},a={small:4,medium:8,large:12}[e.size],s=0===e.index?{hitStrokeWidth:12,fill:o.strokeColor||e.primary,onMouseOver:e.handleMouseOverStartPoint,onMouseOut:e.handleMouseOutStartPoint}:null,l={onDragMove:t=>{if(e.getSkipInteractions())return!1;if(t.target!==t.currentTarget)return;const n=t.target;let{x:r,y:o}=n.attrs;r<0&&(r=0),o<0&&(o=0),r>e.stage.stageWidth&&(r=e.stage.stageWidth),o>e.stage.stageHeight&&(o=e.stage.stageHeight),e._movePoint(r,o),n.setAttr("x",e.canvasX),n.setAttr("y",e.canvasY)},onDragStart:()=>{if(e.getSkipInteractions())return r(!1),!1;e.annotation.history.freeze()},onDragEnd:t=>{r(!0),e.annotation.history.unfreeze(),t.cancelBubble=!0},onMouseOver:t=>{var n;t.cancelBubble=!0;const r=null==(n=e.stage)?void 0:n.stageRef;r&&(r.container().style.cursor="crosshair")},onMouseOut:()=>{var t;const n=null==(t=e.stage)?void 0:t.stageRef;n&&(n.container().style.cursor="default")},onTransformEnd(e){if(e.target!==e.currentTarget)return;const t=e.target;t.setAttr("x",0),t.setAttr("y",0),t.setAttr("scaleX",1),t.setAttr("scaleY",1)}},c=e.selected?"green":"white";return"circle"===e.style?(0,_.jsx)(pj.jl,Object.assign({name:t,x:e.canvasX,y:e.canvasY,radius:a,fill:c,stroke:"black",strokeWidth:i[e.size],dragOnTop:!1,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,scaleX:1/(e.stage.zoomScale||1),scaleY:1/(e.stage.zoomScale||1),onDblClick:()=>{e.parent.deletePoint(e)},onClick:t=>{if((0,O.VS)(O.Cw)&&t.evt.altKey)return e.parent.deletePoint(e);e.parent.isDrawing&&1===e.parent.points.length||(t.evt.preventDefault(),t.cancelBubble=!0,e.parent.mouseOverStartPoint?(e.closeStartPoint(),e.parent.notifyDrawingFinished()):e.parent.setSelectedPoint(e))}},l,s,{draggable:!e.parent.isReadOnly()&&n}),t):(0,_.jsx)(pj.rw,Object.assign({name:t,x:e.x-a/2,y:e.y-a/2,width:a,height:a,fill:c,stroke:"black",strokeWidth:i[e.size],strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,dragOnTop:!1},l,s,{draggable:!e.parent.isReadOnly()}),t)}));var rO=n(67695);const oO=h.gK.model({coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc")}).actions((e=>({updateImageSize(t,n,r,o){"px"===e.coordstype&&e.points.forEach((e=>{const t=r*e.relativeX/Ye,n=o*e.relativeY/Xe;e._setPos(t,n)})),e.annotation.sentUserGenerate||"perc"!==e.coordstype||e.points.forEach((t=>{const n=r*t.x/Ye,i=o*t.y/Xe;e.coordstype="px",t._setPos(n,i)}))}}))),iO=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"polygonregion",object:h.gK.late((()=>h.gK.reference(HR))),points:h.gK.array(h.gK.union(tO,h.gK.array(h.gK.number)),[]),closed:!0}).volatile((()=>({mouseOverStartPoint:!1,selectedPoint:null,hideable:!0,_supportsTransform:!0,useTransformer:!0,preferTransformer:!1,supportsRotate:!1,supportsScale:!0}))).views((e=>({get store(){return(0,h.Zn)(e)},get bboxCoords(){var t;if(null==(t=e.points)||!t.length||!(0,h._n)(e))return{};const n=e.points.reduce(((e,t)=>({left:Math.min(e.left,t.x),top:Math.min(e.top,t.y),right:Math.max(e.right,t.x),bottom:Math.max(e.bottom,t.y)})),{left:e.points[0].x,top:e.points[0].y,right:e.points[0].x,bottom:e.points[0].y});return(0,O.VS)(O.MV)||(0,w.fixMobxObserve)(e.parent.stageWidth,e.parent.stageHeight),n},get flattenedPoints(){return this.points.map((e=>[e.canvasX,e.canvasY])).reduce(((e,t)=>e.concat(t)),[])}}))).actions((e=>({afterCreate(){e.points.length&&(e.points[0].id||(e.points=e.points.map((([t,n],r)=>({id:E(),x:t,y:n,size:e.pointSize,style:e.pointStyle,index:r})))),(0,O.VS)(O.vz)||(e.closed=e.points.length>2),e.checkSizes())},setMouseOverStartPoint(t){e.mouseOverStartPoint=t},setSelectedPoint(t){e.selectedPoint&&(e.selectedPoint.selected=!1),t.selected=!0,e.selectedPoint=t},handleMouseMove({e:t,flattenedPoints:n}){const{offsetX:r,offsetY:o}=t.evt,[i,a]=e.parent.fixZoomedCoords([r,o]),[s,l]=sO({flattenedPoints:n,cursorX:i,cursorY:a});!function({point:e,group:t,layer:n,zoom:r}){const o=lO({layer:n})||function({point:e,group:t,layer:n,zoom:r}){const o=new yt.A.Circle({name:"hoverAnchor",x:e[0],y:e[1],stroke:rO.green.primary,fill:rO.green[0],scaleX:1/(r||1),scaleY:1/(r||1),strokeWidth:2,radius:5});return t.add(o),n.draw(),o}({point:e,group:t,layer:n,zoom:r});o.to({x:e[0],y:e[1],duration:0})}({point:[s,l],group:t.currentTarget,layer:t.currentTarget.getLayer(),zoom:e.parent.zoomScale})},handleMouseLeave({e}){cO({layer:e.currentTarget.getLayer()})},handleLineClick({e:t,flattenedPoints:n,insertIdx:r}){if(!e.closed||!e.selected)return;t.cancelBubble=!0,cO({layer:t.currentTarget.getLayer()});const{offsetX:o,offsetY:i}=t.evt,[a,s]=e.parent.fixZoomedCoords([o,i]),l=sO({flattenedPoints:n,cursorX:a,cursorY:s});e.insertPoint(r,l[0],l[1])},deletePoint(t){const n=e.points.length<=3&&t.parent.closed,r=1===e.points.length,o=e.selectedPoint===t;n||r||(o&&(e.selectedPoint=null),(0,h.zr)(t))},addPoint(t,n){var r;if(e.closed)return;const o=null==(r=e.control)?void 0:r.getSnappedPoint({x:t,y:n});e._addPoint(o.x,o.y)},setPoints(t){e.points.forEach(((e,n)=>{e.x=t[2*n],e.y=t[2*n+1]}))},insertPoint(t,n,r){var o;const i=null==(o=e.control)?void 0:o.getSnappedPoint({x:e.parent.canvasToInternalX(n),y:e.parent.canvasToInternalY(r)}),a=e.points[t-1]&&e.parent.isSamePixel(i,e.points[t-1]),s=e.points[t]&&e.parent.isSamePixel(i,e.points[t]);if(a||s)return;const l={id:E(),x:i.x,y:i.y,size:e.pointSize,style:e.pointStyle,index:e.points.length};return e.points.splice(t,0,l),e.points[t]},_addPoint(t,n){const r=e.points[0];e.parent.isSamePixel(r,{x:t,y:n})?e.closePoly():e.points.push({id:E(),x:t,y:n,size:e.pointSize,style:e.pointStyle,index:e.points.length})},closePoly(){e.closed||e.points.length<3||(e.closed=!0)},canClose(t,n){if(e.points.length<2)return!1;const r=e.points[0],o=t,i=n;return(r.x-o)**2+(r.y-i)**2<50},destroyRegion(){(0,h.Yo)(e.points),(0,h.zr)(e.points)},afterUnselectRegion(){e.selectedPoint&&(e.selectedPoint.selected=!1)},setScale(t,n){e.scaleX=t,e.scaleY=n},updateImageSize(){},serialize(){if(!(0,O.VS)(O.vz)&&e.points.length<3)return null;const t=Object.assign({points:(0,O.VS)(O.MV)?e.points.map((e=>[e.x,e.y])):e.points.map((t=>[e.convertXToPerc(t.x),e.convertYToPerc(t.y)]))},(0,O.VS)(O.vz)?{closed:e.closed}:{});return e.parent.createSerializedResult(e,t)}}))),aO=h.gK.compose("PolygonRegionModel",it,ht,We,_k,iO,...(0,O.VS)(O.MV)?[]:[oO]);function sO({flattenedPoints:e,cursorX:t,cursorY:n}){const[r,o,i,a]=e;return[t-(a-o)*(i*o-r*a+t*(a-o)-n*(i-r))/((a-o)*(a-o)+(i-r)*(i-r)),((i-r)*(i*o-r*a)+(i-r)*(a-o)*t+(a-o)*(a-o)*n)/((a-o)*(a-o)+(i-r)*(i-r))]}function lO({layer:e}){return e.findOne(".hoverAnchor")}function cO({layer:e}){const t=lO({layer:e});t&&(t.destroy(),e.draw())}const dO=(0,p.memo)((0,y.PA)((({item:e,colors:t,dragProps:n,draggable:r})=>{const{flattenedPoints:o}=e,i="poly";return(0,_.jsx)(pj.YJ,{name:i,children:(0,_.jsx)(pj.N1,Object.assign({name:"_transformable",lineJoin:"round",lineCap:"square",stroke:t.strokeColor,strokeWidth:t.strokeWidth,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,points:o,fill:t.fillColor,closed:!0},n,{onTransformEnd:t=>{if(t.target!==t.currentTarget)return;const n=t.target,r=[n.getAttr("x",0),n.getAttr("y",0)],o=[n.getAttr("scaleX",1),n.getAttr("scaleY",1)],i=n.getAttr("points");e.setPoints(i.reduce(((t,n,a)=>{if(a%2==0){var s;const l=null==(s=e.control)?void 0:s.getSnappedPoint({x:e.parent.canvasToInternalX(n*o[0]+r[0]),y:e.parent.canvasToInternalY(i[a+1]*o[1]+r[1])});t.push(l.x,l.y)}return t}),[])),n.setAttr("x",0),n.setAttr("y",0),n.setAttr("scaleX",1),n.setAttr("scaleY",1)},draggable:r}))},i)}))),uO=(0,y.PA)((({name:e,item:t,idx:n,p1:r,p2:o,closed:i,regionStyles:a})=>{const s=n+1,l=[r.canvasX,r.canvasY,o.canvasX,o.canvasY],c=i?{stroke:"transparent",strokeWidth:a.strokeWidth,strokeScaleEnabled:!1}:{stroke:a.strokeColor,strokeWidth:a.strokeWidth,strokeScaleEnabled:!1};return(0,_.jsx)(pj.YJ,{name:e,onClick:e=>t.handleLineClick({e,flattenedPoints:l,insertIdx:s}),onMouseMove:e=>{t.closed&&t.selected&&!t.isReadOnly()&&t.handleMouseMove({e,flattenedPoints:l})},onMouseLeave:e=>t.handleMouseLeave({e}),children:(0,_.jsx)(pj.N1,Object.assign({lineJoin:"round",opacity:1,points:l,hitStrokeWidth:20,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1},c))},e)})),hO=(0,p.memo)((0,y.PA)((({item:e,regionStyles:t})=>{const{points:n,closed:r}=e,o="borders";return!e.closed||!e.parent.useTransformer&&e.selected?(0,_.jsx)(pj.YJ,{name:o,children:n.map(((o,i)=>{const a=i,s=i===n.length-1?0:i+1;return r||0!==s?(0,_.jsx)(uO,{name:`border_${a}_${s}`,item:e,idx:a,p1:n[i],p2:n[s],closed:r,regionStyles:t},`border_${a}_${s}`):null}))},o):null}))),gO=Pk((({item:e,setShapeRef:t})=>{var n,r,o,i;const{store:a}=e,{suggestion:s}=null!=(n=(0,p.useContext)(Uj))?n:{},l=Fk(e,{useStrokeAsFill:!0});const c=(0,p.useMemo)((()=>{let t=!1;return{onDragStart:n=>{n.target===n.currentTarget&&(e.parent.getSkipInteractions()?n.currentTarget.stopDrag(n.evt):(t=!0,e.annotation.setDragMode(!0),e.annotation.history.freeze(e.id)))},dragBoundFunc:jt(e,{x:-e.bboxCoords.left,y:-e.bboxCoords.top}),onDragEnd:n=>{if(!t)return;const r=n.target;if(n.target===n.currentTarget){var o,i,a,s,l;e.annotation.setDragMode(!1);const t=null==(o=e.control)?void 0:o.getSnappedPoint({x:null==(i=e.parent)?void 0:i.canvasToInternalX(r.getAttr("x")),y:null==(a=e.parent)?void 0:a.canvasToInternalY(r.getAttr("y"))});t.x=null==(s=e.parent)?void 0:s.internalToCanvasX(t.x),t.y=null==(l=e.parent)?void 0:l.internalToCanvasY(t.y),e.points.forEach((e=>e.movePoint(t.x,t.y))),e.annotation.history.unfreeze(e.id)}r.setAttr("x",0),r.setAttr("y",0),t=!1}}}),[e.bboxCoords.left,e.bboxCoords.top]);if((0,p.useEffect)((()=>{(0,O.VS)(O.vz)&&!e.closed&&e.control.tools.Polygon.resumeUnfinishedRegion(e)}),[e.closed]),!e.parent)return null;if(!e.inViewPort)return null;const d=null==(r=e.parent)?void 0:r.stageRef;return(0,_.jsxs)(pj.YJ,Object.assign({name:e.id,ref:e=>t(e),onMouseOver:()=>{a.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),d.container().style.cursor=V.A.LINKING_MODE_CURSOR):d.container().style.cursor=V.A.POINTER_CURSOR},onMouseOut:()=>{d.container().style.cursor=V.A.DEFAULT_CURSOR,a.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||e.isDrawing||(t.cancelBubble=!0,e.closed&&(a.annotationStore.selected.isLinkingMode&&(d.container().style.cursor=V.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t)))}},c,{draggable:!(e.isReadOnly()||e.inSelection&&1!==(null==(o=e.parent)||null==(o=o.selectedRegions)?void 0:o.length)),listening:!s,children:[(0,_.jsx)(kk,{item:e,color:l.strokeColor}),e.mouseOverStartPoint,e.points&&e.closed?(0,_.jsx)(dO,{item:e,colors:l,dragProps:c,draggable:!e.isReadOnly()&&e.inSelection&&(null==(i=e.parent)||null==(i=i.selectedRegions)?void 0:i.length)>1}):null,e.points&&!e.isReadOnly()?(0,_.jsx)(hO,{item:e,regionStyles:l}):null,e.points&&!e.isReadOnly()?function(t){const n="anchors";return!e.closed||!e.parent.useTransformer&&e.selected?(0,_.jsx)(pj.YJ,{name:n,children:t.map(((n,r)=>function({points:t,idx:n}){const r=`anchor_${t.length}_${n}`,o=t[n];if(!e.closed||e.closed&&e.selected)return(0,_.jsx)(nO,{item:o,name:r},r)}({points:t,idx:r})))},n):null}(e.points):null]}),e.id?e.id:E(5))}));x.addTag("polygonregion",aO,gO),x.addRegionType(aO,"image",(e=>!!e.points));const mO=h.gK.model({coordstype:h.gK.optional(h.gK.enumeration(["px","perc"]),"perc")}).volatile((()=>({relativeX:0,relativeY:0,relativeWidth:0,relativeHeight:0}))).actions((e=>({afterCreate(){switch(e.coordstype){case"perc":e.relativeX=e.x,e.relativeY=e.y,e.relativeWidth=e.width,e.relativeHeight=e.height;break;case"px":{const{stageWidth:t,stageHeight:n}=e.parent;t&&n&&e.setPosition(e.x,e.y,e.width,e.height,e.rotation);break}}e.checkSizes(),e.updateAppearenceFromState()},setPosition(t,n,r,o,i){var a,s,l,c;e.x=t,e.y=n,e.width=r,e.height=o,e.relativeX=t/(null==(a=e.parent)?void 0:a.stageWidth)*Ye,e.relativeY=n/(null==(s=e.parent)?void 0:s.stageHeight)*Xe,e.relativeWidth=r/(null==(l=e.parent)?void 0:l.stageWidth)*Ye,e.relativeHeight=o/(null==(c=e.parent)?void 0:c.stageHeight)*Xe,e.rotation=(i+360)%360},setPositionInternal:(t,n,r,o,i)=>e.setPosition(t,n,r,o,i),updateImageSize(t,n,r,o){"px"===e.coordstype?(e.x=r*e.relativeX/Ye,e.y=o*e.relativeY/Xe,e.width=r*e.relativeWidth/Ye,e.height=o*e.relativeHeight/Xe):"perc"===e.coordstype&&(e.x=r*e.x/Ye,e.y=o*e.y/Xe,e.width=r*e.width/Ye,e.height=o*e.height/Xe,e.coordstype="px")},draw(t,n,r){const o=e.height;if(1===r.length)e.width=e.getDistanceBetweenPoints({x:t,y:n},e),e.rotation=e.rotationAtCreation=Math.atan2(n-e.y,t-e.x)*(180/Math.PI);else if(2===r.length){const{y:o,x:i}=r[0],{y:a,x:s}=r[1];e.isAboveTheLine(r[0],r[1],{x:t,y:n})?(e.x=s,e.y=a,e.rotation=e.rotationAtCreation+180):(e.x=i,e.y=o,e.rotation=e.rotationAtCreation),e.height=e.getHeightOnPerpendicular(r[0],r[1],{x:t,y:n})}e.setPosition(e.x,e.y,e.width,e.height,e.rotation);const i=null==e?void 0:e.bboxCoords;((null==i?void 0:i.left)<0||(null==i?void 0:i.top)<0||(null==i?void 0:i.right)>e.parent.stageWidth||(null==i?void 0:i.bottom)>e.parent.stageHeight)&&(e.height=o)},getHeightOnPerpendicular(e,t,n){const r=t.x-e.x,o=t.y-e.y,i=t.y-n.y,a=i/r*o,s=n.x-t.x-a,l=Math.sqrt(a*a+i*i),c=l+s/l*a;return Math.abs(c)}}))),pO=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"rectangleregion",object:h.gK.late((()=>h.gK.reference(HR))),x:h.gK.number,y:h.gK.number,width:h.gK.number,height:h.gK.number,rotation:0,rotationAtCreation:0}).volatile((()=>({startX:0,startY:0,scaleX:1,scaleY:1,opacity:1,fill:!0,fillColor:"#ff8800",fillOpacity:.2,strokeColor:V.A.STROKE_COLOR,strokeWidth:V.A.STROKE_WIDTH,_supportsTransform:!0,hideable:!0,editableFields:[{property:"x",label:"X"},{property:"y",label:"Y"},{property:"width",label:"W"},{property:"height",label:"H"},{property:"rotation",label:"icon:angle"}]}))).volatile((()=>({useTransformer:!0,preferTransformer:!0,supportsRotate:!0,supportsScale:!0}))).views((e=>({get store(){return(0,h.Zn)(e)},get parent(){return(0,h._n)(e)?e.object:null},get bboxCoords(){const t={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height};return 0!==e.rotation&&e.parent?Wk(t,e.rotation,{x:e.x,y:e.y},e.parent.whRatio):t},get canvasX(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.x):e.x},get canvasY(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.y):e.y},get canvasWidth(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasX(e.width):e.width},get canvasHeight(){var t;return(0,O.VS)(O.MV)?null==(t=e.parent)?void 0:t.internalToCanvasY(e.height):e.height}}))).actions((e=>({afterCreate(){e.startX=e.x,e.startY=e.y},getDistanceBetweenPoints(e,t){const{x:n,y:r}=e,{x:o,y:i}=t,a=n-o,s=r-i;return Math.sqrt(a**2+s**2)},getHeightOnPerpendicular(e,t,n){const r=t.x-e.x,o=t.y-e.y;return Math.abs(o*n.x-r*n.y+t.x*e.y-t.y*e.x)/Math.sqrt(o*o+r*r)},isAboveTheLine:(e,t,n)=>(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x)<0,draw(t,n,r){const o=e.height,i=e.parent.internalToCanvasX(t),a=e.parent.internalToCanvasY(n);if(1===r.length){const t=e.getDistanceBetweenPoints({x:i,y:a},{x:e.canvasX,y:e.canvasY});e.width=e.parent.canvasToInternalX(t),e.rotation=e.rotationAtCreation=Math.atan2(a-e.canvasY,i-e.canvasX)*(180/Math.PI)}else if(2===r.length){const t=r.map((({x:t,y:n})=>({x:e.parent.internalToCanvasX(t),y:e.parent.internalToCanvasY(n)}))),{y:n,x:o}=r[0],{y:s,x:l}=r[1];e.isAboveTheLine(t[0],t[1],{x:i,y:a})?(e.x=l,e.y=s,e.rotation=e.rotationAtCreation+180):(e.x=o,e.y=n,e.rotation=e.rotationAtCreation);const c=e.getHeightOnPerpendicular(t[0],t[1],{x:i,y:a});e.height=e.parent.canvasToInternalY(c)}e.setPositionInternal(e.x,e.y,e.width,e.height,e.rotation);const s=null==e?void 0:e.bboxCoords;((null==s?void 0:s.left)<0||(null==s?void 0:s.top)<0||(null==s?void 0:s.right)>Ye||(null==s?void 0:s.bottom)>Xe)&&(e.height=o)},coordsInside(t,n){const r=e.x,o=e.y,i=e.width*(e.scaleX||1),a=e.height*(e.scaleY||1);return t>r&&to&&n1&&!(0,O.VS)(O.MV)?e.convertXToPerc(e.x):e.x,y:e.parent.stageWidth>1&&!(0,O.VS)(O.MV)?e.convertYToPerc(e.y):e.y,width:e.parent.stageWidth>1&&!(0,O.VS)(O.MV)?e.convertHDimensionToPerc(e.width):e.width,height:e.parent.stageWidth>1&&!(0,O.VS)(O.MV)?e.convertVDimensionToPerc(e.height):e.height,rotation:e.rotation};return e.parent.createSerializedResult(e,t)}}))),fO=h.gK.compose("RectRegionModel",it,We,ht,_k,sn,pO,...(0,O.VS)(O.MV)?[]:[mO]),vO=Pk((({item:e,setShapeRef:t})=>{var n,r,o;const{store:i}=e,{suggestion:a}=null!=(n=(0,p.useContext)(Uj))?n:{},s=Fk(e,{suggestion:a}),l=null==(r=e.parent)?void 0:r.stageRef,c={};return e.parent&&e.inViewPort?(a||e.isReadOnly()||(c.onTransform=({target:e})=>{e.setAttr("skewX",0),e.setAttr("skewY",0)},c.onTransformEnd=t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y"),n.getAttr("width")*n.getAttr("scaleX"),n.getAttr("height")*n.getAttr("scaleY"),n.getAttr("rotation")),n.setAttr("scaleX",1),n.setAttr("scaleY",1),e.notifyDrawingFinished()},c.onDragStart=t=>{e.parent.getSkipInteractions()?t.currentTarget.stopDrag(t.evt):e.annotation.history.freeze(e.id)},c.onDragEnd=t=>{const n=t.target;e.setPosition(n.getAttr("x"),n.getAttr("y"),n.getAttr("width"),n.getAttr("height"),n.getAttr("rotation")),e.setScale(n.getAttr("scaleX"),n.getAttr("scaleY")),e.annotation.history.unfreeze(e.id),e.notifyDrawingFinished()},c.dragBoundFunc=jt(e,{x:e.x-e.bboxCoords.left,y:e.y-e.bboxCoords.top})),(0,_.jsxs)(Mk,{item:e,children:[(0,_.jsx)(pj.rw,Object.assign({x:e.canvasX,y:e.canvasY,ref:e=>t(e),width:e.canvasWidth,height:e.canvasHeight,fill:s.fillColor,stroke:s.strokeColor,strokeWidth:s.strokeWidth,strokeScaleEnabled:!1,perfectDrawEnabled:!1,shadowForStrokeEnabled:!1,shadowBlur:0,dash:a?[10,10]:null,scaleX:e.scaleX,scaleY:e.scaleY,opacity:1,rotation:e.rotation,draggable:!e.isReadOnly(),name:`${e.id} _transformable`},c,{onMouseOver:()=>{i.annotationStore.selected.isLinkingMode?(e.setHighlight(!0),l.container().style.cursor=V.A.LINKING_MODE_CURSOR):l.container().style.cursor=V.A.POINTER_CURSOR},onMouseOut:()=>{l.container().style.cursor=V.A.DEFAULT_CURSOR,i.annotationStore.selected.isLinkingMode&&e.setHighlight(!1)},onClick:t=>{e.parent.getSkipInteractions()||(i.annotationStore.selected.isLinkingMode&&(l.container().style.cursor=V.A.DEFAULT_CURSOR),e.setHighlight(!1),e.onClickRegion(t))},listening:!(a||null!=(o=e.annotation)&&o.isDrawing)})),(0,_.jsx)(jk,{item:e,color:s.strokeColor,strokewidth:s.strokeWidth})]})):null}));function yO(e){const t=(0,h.dV)(e);return(0,h.Pw)(e).create(Object.assign({},t,{id:E()}))}x.addTag("rectangleregion",fO,vO),x.addRegionType(fO,"image");const bO=h.gK.model({selected:h.gK.optional(h.gK.boolean,!1),group:h.gK.optional(h.gK.string,"default"),shortcut:h.gK.optional(h.gK.maybeNull(h.gK.string),null)}).views((e=>({get obj(){var t,n;return null!=(t=null==(n=e.manager)?void 0:n.obj)?t:(0,h._$)(e).object},get manager(){return(0,h._$)(e).manager},get control(){return(0,h._$)(e).control},get viewClass(){return()=>null},get fullName(){return e.toolName+(e.dynamic?"-dynamic":"")},get clonedStates(){const t=[e.control],n=t?t.filter((e=>e.isSelected)):null;return n?n.map((e=>yO(e))):null},get getActiveShape(){const t=e.obj;return t.regs[t.regs.length-1]},get getSelectedShape(){return e.control.annotation.highlightedNode},get extraShortcuts(){return{}},get shouldPreserveSelectedState(){if(!e.obj)return!1;return(0,h.Zn)(e.obj).settings.preserveSelectedTool},get isPreserved(){var t;return window.localStorage.getItem(`selected-tool:${null==(t=e.obj)?void 0:t.name}`)===e.fullName}}))).actions((e=>({setSelected(t){if(e.selected=t,e.afterUpdateSelected(),t&&e.obj){const t=`selected-tool:${e.obj.name}`;e.shouldPreserveSelectedState&&window.localStorage.setItem(t,e.fullName)}},afterUpdateSelected(){},event(t,n,r){const o=`${t}Ev`;void 0!==e[o]&&e[o].call(e,n,r)},shouldSkipInteractions(t){const n=t.evt&&(t.evt.metaKey||t.evt.ctrlKey),r=e.control.annotation.hasSelection;return!!n&&!r}}))),xO=h.gK.compose(bO,Pe),wO=h.gK.model("DrawingTool",{default:!0,mode:h.gK.optional(h.gK.enumeration(["drawing","viewing"]),"viewing"),unselectRegionOnToolChange:!0,isDrawingTool:!0}).volatile((()=>({currentArea:null}))).views((e=>({createRegionOptions:e=>Object.assign({},e,{coordstype:"px"}),get tagTypes(){return console.error("Drawing tool model needs to implement tagTypes getter in views"),{}},isIncorrectControl:()=>e.tagTypes.stateTypes===e.control.type&&!e.control.isSelected,isIncorrectLabel:()=>!e.obj.checkLabels(),get isDrawing(){return"drawing"===e.mode},get getActiveShape(){return e.currentArea},getCurrentArea:()=>e.currentArea,current:()=>e.currentArea,canStart:()=>!e.isDrawing&&!e.annotation.isReadOnly(),get defaultDimensions(){return console.warn("Drawing tool model needs to implement defaultDimentions getter in views"),{}},get MIN_SIZE(){return(0,O.VS)(O.MV)?{X:jj.X/e.obj.stageScale/e.obj.stageWidth*Ye,Y:jj.Y/e.obj.stageScale/e.obj.stageHeight*Xe}:{X:jj.X/e.obj.stageScale,Y:jj.Y/e.obj.stageScale}}}))).actions((e=>{let t={ts:0,x:0,y:0};return{event(n,r,[o,i,a,s]){if(r.button>0||r.shiftKey)return;let l=`${n}Ev`;if(void 0!==e[l]&&e[l].call(e,r,[o,i],[a,s]),"click"===n){const n=r.timeStamp;n-t.ts<300&&e.comparePointsWithThreshold(t,{x:o,y:i})&&(l=`dbl${l}`,void 0!==e[l]&&e[l].call(e,r,[o,i],[a,s])),t={ts:n,x:o,y:i}}},comparePointsWithThreshold(t,n,r={x:e.MIN_SIZE.X,y:e.MIN_SIZE.Y}){if(t&&n)return"number"==typeof r&&(r={x:r,y:r}),Math.abs(t.x-n.x)({createDrawingRegion(t){const n=e.control,r=n.getResultValue();return e.currentArea=e.obj.createDrawingRegion(t,r,n,!1),e.currentArea.setDrawing(!0),e.applyActiveStates(e.currentArea),e.annotation.setIsDrawing(!0),e.currentArea},resumeUnfinishedRegion(t){e.currentArea=t,e.currentArea.setDrawing(!0),e.annotation.regionStore.selection._updateResultsFromRegions([e.currentArea]),e.mode="drawing",e.annotation.setIsDrawing(!0),e.annotation.regionStore.selection.drawingSelect(e.currentArea),null==e.listenForClose||e.listenForClose()},commitDrawingRegion(){const{currentArea:t,control:n,obj:r}=e;if(!t)return;const o=t.toJSON(),i=Object.keys(t.serialize().value).reduce(((e,t)=>(e[t]=o[t],e)),{coordstype:"px",dynamic:e.dynamic}),[a,...s]=t.results,l=e.annotation.createResult(i,a.value.toJSON(),n,r);return s.forEach((e=>l.addResult(e.toJSON()))),t.setDrawing(!1),e.deleteRegion(),l.notifyDrawingFinished(),l},createRegion(t,n=!1){const r=e.control,o=r.getResultValue();return e.currentArea=e.annotation.createResult(t,o,r,e.obj,n),e.applyActiveStates(e.currentArea),e.currentArea},deleteRegion(){e.currentArea=null,e.obj.deleteDrawingRegion()},applyActiveStates(t){e.obj.activeStates().forEach((e=>{t.setValue(e)}))},beforeCommitDrawing:()=>!0,canStartDrawing:()=>!e.isIncorrectControl()&&(!(0,O.VS)(O.Zr)||!e.isIncorrectLabel())&&e.canStart()&&!e.annotation.isDrawing,startDrawing(t,n){e.annotation.history.freeze(),e.mode="drawing",e.currentArea=e.createDrawingRegion(e.createRegionOptions({x:t,y:n}))},finishDrawing(){e.beforeCommitDrawing()?e._finishDrawing():(e.deleteRegion(),e.control.type===e.tagTypes.stateTypes&&e.annotation.unselectAll(!0),e._resetState())},_finishDrawing(){e.commitDrawingRegion(),e._resetState()},_resetState(){e.annotation.setIsDrawing(!1),e.annotation.history.unfreeze(),e.mode="viewing"}}))),CO=wO.named("TwoPointsDrawingTool").views((e=>({get defaultDimensions(){return{width:e.MIN_SIZE.X,height:e.MIN_SIZE.Y}}}))).actions((e=>{const t=1,n=2;let r=0,o=0,i=null,a={x:0,y:0};const s={finishDrawing:e.finishDrawing};return{updateDraw:In()(((t,n)=>{0!==r&&e.draw(t,n)}),48),draw(t,n){const r=e.getCurrentArea();if(!r)return;const o=r.type.includes("ellipse"),i=(0,O.VS)(O.MV)?Ye:e.obj.stageWidth,a=(0,O.VS)(O.MV)?Xe:e.obj.stageHeight;let{x1:s,y1:l,x2:c,y2:d}=o?{x1:r.startX,y1:r.startY,x2:t,y2:n}:rn.Image.reverseCoordinates({x:r.startX,y:r.startY},{x:t,y:n});s=Math.max(0,s),l=Math.max(0,l),c=Math.min(i,c),d=Math.min(a,d);let[u,h]=[c-s,d-l].map(Math.abs);o&&(u=Math.min(u,Math.min(s,i-s)),h=Math.min(h,Math.min(l,a-l))),r.setPositionInternal(s,l,u,h,r.rotation)},finishDrawing(e,t){i=null,s.finishDrawing(e,t),r=0,o=0},mousedownEv(n,[a,s]){e.canStartDrawing()&&(i={x:a,y:s},0===r&&(o=t))},mousemoveEv(a,[s,l]){0!==r||!i||e.comparePointsWithThreshold(i,{x:s,y:l})||(r=o,![t,n].includes(r)||(e.startDrawing(i.x,i.y),e.isDrawing))?e.isDrawing&&[t,n].includes(r)&&e.updateDraw(s,l):r=0},mouseupEv(n,[o,i]){r===t&&(a={x:o,y:i},e.isDrawing&&(e.draw(o,i),e.finishDrawing(o,i)))},clickEv(t,[s,l]){e.canStartDrawing()&&(i&&a&&!e.comparePointsWithThreshold(i,a)||(0===r?o=n:e.isDrawing&&r===n&&(e.draw(s,l),e.finishDrawing(s,l),r=0)))},dblclickEv(t,[n,o]){if(!e.canStartDrawing())return;let i=e.defaultDimensions.width,a=e.defaultDimensions.height;if((0,O.VS)(O.MV)&&(i=e.obj.canvasToInternalX(i),a=e.obj.canvasToInternalY(a)),0===r){if(e.startDrawing(n,o),!e.isDrawing)return;n+=i,o+=a,e.draw(n,o),e.finishDrawing(n,o)}}}})),SO=wO.named("MultipleClicksMixin").views((()=>({canStart(){return!this.current()}}))).actions((e=>{let t={x:0,y:0},n=0,r={x:-1,y:-1},o=0;let i=0;const a={canStartDrawing:e.canStartDrawing};return{canStartDrawing:()=>a.canStartDrawing()&&!e.annotation.regionStore.hasSelection,nextPoint(t,r){const o=e.getCurrentArea(),i=e.obj;o&&i&&i.multiImage&&o.item_index!==i.currentImage||(e.getCurrentArea().addPoint(t,r),n++)},listenForClose(){console.error("MultipleClicksMixin model needs to implement listenForClose method in actions")},closeCurrent(){console.error("MultipleClicksMixin model needs to implement closeCurrent method in actions")},finishDrawing(){e.isDrawing&&(e.annotation.regionStore.selection.drawingUnselect(),n=0,e.closeCurrent(),setTimeout((()=>{e._finishDrawing()})))},cleanupUncloseableShape(){e.deleteRegion(),e.control.type===e.tagTypes.stateTypes&&e.annotation.unselectAll(!0),e._resetState()},mousedownEv(e,[t,n]){r={x:t,y:n},o=1},mouseupEv(t,[n,i]){1===o&&e.comparePointsWithThreshold(r,{x:n,y:i})&&(e._clickEv(t,[n,i]),o=2),r={x:-1,y:-1}},clickEv(t,[n,i]){2!==o&&e._clickEv(t,[n,i]),o=3,r={x:-1,y:-1}},_clickEv(r,[o,a]){if(e.current())1===n&&e.comparePointsWithThreshold(t,{x:o,y:a})&&r.timeStamp-i<350?e.drawDefault():e.comparePointsWithThreshold(t,{x:o,y:a})?n>2&&e.finishDrawing():e.nextPoint(o,a);else{if(!e.canStartDrawing())return;t={x:o,y:a},n=1,i=r.timeStamp,e.startDrawing(o,a),e.listenForClose()}},drawDefault(){const{x:n,y:r}=t;let o=e.defaultDimensions.length,i=e.defaultDimensions.length;(0,O.VS)(O.MV)&&(o=e.obj.canvasToInternalX(o),i=e.obj.canvasToInternalY(i)),e.nextPoint(n+o,r),e.nextPoint(n+o/2,r+Math.sin(Math.PI/3)*i),e.finishDrawing()}}})),jO=wO.named("ThreePointsDrawingTool").views((e=>({canStart(){return!this.current()},get defaultDimensions(){return{width:e.MIN_SIZE.X,height:e.MIN_SIZE.Y}}}))).actions((e=>{let t=[],n=0;let r=0,o=null;const i={finishDrawing:e.finishDrawing};return{canStartDrawing:()=>!e.isIncorrectControl(),updateDraw:(n,o)=>{var i;0===r?null==(i=e.getCurrentArea())||i.draw(n,o,t):4===r&&e.draw(n,o)},nextPoint(n,r){t.push({x:n,y:r}),e.getCurrentArea().draw(n,r,t)},draw(t,n){const r=e.getCurrentArea();if(!r)return;const o=(0,O.VS)(O.MV)?Ye:e.obj.stageWidth,i=(0,O.VS)(O.MV)?Xe:e.obj.stageHeight;let{x1:a,y1:s,x2:l,y2:c}=rn.Image.reverseCoordinates({x:r.startX,y:r.startY},{x:t,y:n});a=Math.max(0,a),s=Math.max(0,s),l=Math.min(o,l),c=Math.min(i,c),r.setPositionInternal(a,s,l-a,c-s,r.rotation)},finishDrawing(n,a){e.isDrawing&&(t=[],o=null,r=0,i.finishDrawing(n,a),setTimeout((()=>{e._finishDrawing()})))},mousemoveEv(t,[i,a]){e.isDrawing&&(1===n&&(r=4),4===r&&o?(e.startDrawing(o.x,o.y),e.updateDraw(i,a)):0===r&&e.updateDraw(i,a))},mousedownEv(t,[r,i]){e.canStartDrawing()&&!e.annotation.isDrawing&&(n=1,o={x:r,y:i},e.mode="drawing")},mouseupEv(t,[o,i]){e.canStartDrawing()&&e.isDrawing&&(4===r&&(e.draw(o,i),e.finishDrawing(o,i)),n=2)},clickEv(t,[o,i]){e.canStartDrawing()&&(0===r&&e._clickEv(t,[o,i]),n=3)},_clickEv(n,[r,o]){t.length>=2?e.finishDrawing(r,o):0===t.length?(t=[{x:r,y:o}],e.startDrawing(r,o)):e.nextPoint(r,o)},dblclickEv(t,[o,i]){if(n=5,!e.canStartDrawing())return;let a=e.defaultDimensions.width,s=e.defaultDimensions.height;if((0,O.VS)(O.MV)&&(a=e.obj.canvasToInternalX(a),s=e.obj.canvasToInternalY(s)),0===r){if(e.startDrawing(o,i),!e.isDrawing)return;o+=a,i+=s,e.draw(o,i),e.finishDrawing(o,i)}}}}));var kO=n(18229),OO=n(51366),RO=n(20963),EO=n(15311);const _O=({name:e,icon:t,altIcon:n=null,getContent:r=()=>null,fullContent:o=()=>null})=>(n instanceof Function&&([r,n]=[n,null]),{name:e,icon:t,altIcon:n,getContent:r,fullContent:o}),AO=["node"],TO={RichTextRegionModel:{name:"HTML",icon:Ip,getContent:e=>(0,_.jsx)("span",{style:{color:"#5a5a5a"},children:e.text}),fullContent:e=>(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{children:e.start}),(0,_.jsx)("div",{children:e.startOffset}),(0,_.jsx)("div",{children:JSON.stringify(e.globalOffsets,null,2)})]})},ParagraphsRegionModel:_O({name:"Paragraphs",icon:Ip,getContent:e=>(0,_.jsx)("span",{style:{color:"#5a5a5a"},children:e.text})}),AudioRegionModel:_O({name:"Audio",icon:kO.A}),TimeSeriesRegionModel:_O({name:"TimeSeries",icon:OO.A}),TextAreaRegionModel:_O({name:"Input",icon:RO.A,getContent:e=>(0,_.jsx)("span",{style:{color:"#5a5a5a"},children:e._value})}),RectRegionModel:_O({name:"Rect",icon:sg,altIcon:fg}),Rect3PointRegionModel:_O({name:"Rect3Point",icon:Og,altIcon:Kg}),VideoRectangleRegionModel:_O({name:"Video Rect",icon:sg,altIcon:fg,getContent:e=>{var t;return(0,_.jsxs)("span",{style:{color:"#5a5a5a"},children:["from ",null==(t=e.sequence[0])?void 0:t.frame," frame"]})}}),PolygonRegionModel:_O({name:"Polygon",icon:Hh,altIcon:Jh}),EllipseRegionModel:_O({name:"Ellipse",icon:ah,altIcon:mh}),KeyPointRegionModel:_O({name:"KeyPoint",icon:Ch,altIcon:Ph}),BrushRegionModel:_O({name:"Brush",icon:Wu,altIcon:Ju}),ChoicesModel:_O({name:"Classification",icon:EO.A}),TextAreaModel:_O({name:"Input",icon:RO.A})},PO=(0,y.PA)((({className:e,node:t})=>{const n=KO(t);n in TO||console.error(`No ${n} in NodeView`);const{getContent:r,fullContent:o}=TO[n],i=t.labelName;return(0,_.jsxs)(Ze.eB,{name:"node",className:[e].filter(Boolean).join(" "),children:[i,(0,_.jsx)("br",{}),r(t),o&&o(t)]})})),IO=(0,y.PA)((({className:e,node:t})=>{var n,r;const o=KO(t);if(!o||!(o in TO))return console.error(`No ${o} in NodeView`),null;const{getContent:i}=TO[o],a=t.labelName;return(0,_.jsxs)(Ze.eB,{name:"node",tag:"span",className:e,children:[a,t.isDrawing&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"incomplete",children:(0,_.jsx)(ir,{title:`Incomplete ${null!=(n=null==(r=t.type)?void 0:r.replace("region",""))?n:"region"}`,children:(0,_.jsx)(Nd,{})})})," ",i(t)]})})),LO=(0,y.PA)((e=>{let{node:t}=e,n=(0,Yn.A)(e,AO);const r=KO(t);if(!(r in TO))return console.error(`No ${r} in NodeView`),null;const{icon:o}=TO[r];return(0,_.jsx)(o,Object.assign({},n))})),MO=(0,y.PA)((({node:e})=>{const{sortedRegions:t}=DO(e),n=t.indexOf(e),r=KO(e);if(!(r in TO))return console.error(`No ${r} in NodeView`),null;const{name:o,icon:i}=TO[r];return(0,_.jsxs)(Ze.eB,{name:"node-minimal",tag:"span",children:[n>=0&&(0,_.jsx)(Ze.Sl,{name:"counter",children:n+1}),(0,_.jsx)(Ze.Sl,{name:"icon",tag:i}),o]})})),KO=e=>e.$treenode?(0,h.Pw)(e).name:null,DO=e=>(0,h.Zn)(e).annotationStore.selected.regionStore,NO=({size:e})=>(0,_.jsx)("span",{style:{display:"block",width:e,height:e,background:"rgba(0, 0, 0, 0.25)",borderRadius:"100%"}}),VO=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{label:"Brush",ariaLabel:"brush-tool",active:e.selected,shortcut:e.shortcut,extraShortcuts:e.extraShortcuts,icon:e.iconClass,tool:e,onClick:()=>{e.selected||e.manager.selectTool(e,!0)},controls:e.controls}))),zO=h.gK.model("BrushTool",{strokeWidth:h.gK.optional(h.gK.number,15),group:"segmentation",shortcut:"B",smart:!0,unselectRegionOnToolChange:!(0,O.VS)(O.bP)}).volatile((()=>({canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,_.jsx)(VO,{item:e})},get iconComponent(){return e.dynamic?TO.BrushRegionModel.altIcon:TO.BrushRegionModel.icon},get tagTypes(){return{stateTypes:"brushlabels",controlTagTypes:["brushlabels","brush"]}},get controls(){return[(0,_.jsx)(hC,{value:e.strokeWidth,min:1,max:50,reverse:!0,align:"vertical",minIcon:(0,_.jsx)(NO,{size:8}),maxIcon:(0,_.jsx)(NO,{size:16}),onChange:t=>{e.setStroke(t)}},"brush-size")]},get extraShortcuts(){return{"[":["Decrease size",()=>{e.setStroke((0,w.clamp)(e.strokeWidth-5,1,50))}],"]":["Increase size",()=>{e.setStroke((0,w.clamp)(e.strokeWidth+5,1,50))}]}}}))).actions((e=>{let t,n;return{commitDrawingRegion(){const{currentArea:t,control:n,obj:r}=e,o=t.toJSON(),i={coordstype:"px",touches:o.touches,dynamic:o.dynamic},a=e.annotation.createResult(i,t.results[0].value.toJSON(),n,r);return t.setDrawing(!1),e.applyActiveStates(a),e.deleteRegion(),a.notifyDrawingFinished(),a},updateCursor(){var t;if(!e.selected||null==(t=e.obj)||!t.stageRef)return;const n=e.strokeWidth,r=e.obj.stageRef,o=["url('",xk.A.brushSizeCircle(n),"')"," ",Math.floor(n/2)+4," ",Math.floor(n/2)+4,", auto"];r.container().style.cursor=o.join("")},setStroke(t){e.strokeWidth=t},afterUpdateSelected(){e.updateCursor()},addPoint(e,n){t.addPoint(Math.floor(e),Math.floor(n))},mouseupEv(r,o,[i,a]){"drawing"===e.mode&&(e.addPoint(i,a),e.mode="viewing",t.setDrawing(!1),t.endPath(),n?setTimeout((()=>{const t=e.commitDrawingRegion();e.obj.annotation.selectArea(t),e.annotation.history.unfreeze(),e.obj.annotation.setIsDrawing(!1)})):(e.annotation.history.unfreeze(),e.obj.annotation.setIsDrawing(!1)))},mousemoveEv(t,n,[r,o]){"drawing"===e.mode&&(0,w.findClosestParent)(t.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement))&&e.addPoint(r,o)},mousedownEv(r,o,[i,a]){if(!(0,w.findClosestParent)(r.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement)))return;const s=e.control,l=e.obj;if(t=e.getSelectedShape,!(l&&t&&l.multiImage&&l.currentImage!==t.item_index))if(t&&"brushregion"===t.type)e.annotation.history.freeze(),e.mode="drawing",t.setDrawing(!0),e.obj.annotation.setIsDrawing(!0),n=!1,t.beginPath({type:"add",strokeWidth:e.strokeWidth||s.strokeWidth}),e.addPoint(i,a);else{if((0,O.VS)(O.Zr)&&!e.canStartDrawing())return;if(e.tagTypes.stateTypes===e.control.type&&!e.control.isSelected)return;e.annotation.history.freeze(),e.mode="drawing",n=!0,e.obj.annotation.setIsDrawing(!0),t=e.createDrawingRegion({touches:[],coordstype:"px"}),t.beginPath({type:"add",strokeWidth:e.strokeWidth||s.strokeWidth}),e.addPoint(i,a)}}}})),BO=h.gK.compose(zO.name,xO,Ej,wO,zO),HO=({size:e})=>(0,_.jsx)("span",{style:{display:"block",width:e,height:e,background:"rgba(0, 0, 0, 0.25)",borderRadius:"100%"}}),FO=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{label:"Eraser",ariaLabel:"eraser",shortcut:"E",active:e.selected,extraShortcuts:e.extraShortcuts,tool:e,disabled:!e.getSelectedShape,onClick:()=>{e.selected||e.manager.selectTool(e,!0)},icon:e.iconClass,controls:e.controls}))),WO=h.gK.model("EraserTool",{strokeWidth:h.gK.optional(h.gK.number,10),group:"segmentation",unselectRegionOnToolChange:!1}).volatile((()=>({index:9999,canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,_.jsx)(FO,{item:e})},get iconComponent(){return qg},get controls(){return[(0,_.jsx)(hC,{value:e.strokeWidth,min:1,max:50,reverse:!0,align:"vertical",minIcon:(0,_.jsx)(HO,{size:8}),maxIcon:(0,_.jsx)(HO,{size:16}),onChange:t=>{e.setStroke(t)}},"eraser-size")]},get extraShortcuts(){return{"[":["Decrease size",()=>{e.setStroke((0,w.clamp)(e.strokeWidth-5,1,50))}],"]":["Increase size",()=>{e.setStroke((0,w.clamp)(e.strokeWidth+5,1,50))}]}}}))).actions((e=>{let t;return{updateCursor(){var t;if(!e.selected||null==(t=e.obj)||!t.stageRef)return;const n=e.obj.stageRef,r=["url('",xk.A.brushSizeCircle(24),"')"," ",Math.floor(12)+4," ",Math.floor(12)+4,", auto"];n.container().style.cursor=r.join("")},afterUpdateSelected(){e.updateCursor()},addPoint(e,n){t.addPoint(Math.floor(e),Math.floor(n))},setStroke(t){e.strokeWidth=t},mouseupEv(){"drawing"===e.mode&&(e.mode="viewing",t.endPath())},mousemoveEv(n,r,[o,i]){var a;"drawing"===e.mode&&(0,w.findClosestParent)(n.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement))&&"brushregion"===(null==(a=t)?void 0:a.type)&&e.addPoint(o,i)},mousedownEv(n,r,[o,i]){(0,w.findClosestParent)(n.target,(t=>t===e.obj.stageRef.content),(e=>e.parentElement))&&(t=e.getSelectedShape,t&&t&&"brushregion"===t.type&&(e.mode="drawing",t.beginPath({type:"eraser",opacity:1,strokeWidth:e.strokeWidth}),e.addPoint(o,i)))}}})),$O=h.gK.compose(WO.name,xO,Ej,wO,WO),UO=h.gK.model("KeyPointTool",{default:h.gK.optional(h.gK.boolean,!0),group:"segmentation",shortcut:"K",smart:!0}).views((()=>({get tagTypes(){return{stateTypes:"keypointlabels",controlTagTypes:["keypointlabels","keypoint"]}},get viewTooltip(){return"Key Point"},get iconComponent(){return self.dynamic?TO.KeyPointRegionModel.altIcon:TO.KeyPointRegionModel.icon}}))).actions((e=>({clickEv(t,[n,r]){var o;if((0,O.VS)(O.Zr)&&!e.canStartDrawing())return;const i=e.control;if("keypointlabels"===i.type&&!i.isSelected)return;if(e.annotation.isReadOnly())return;const a=e.createRegion(Object.assign({},null==(o=e.control)?void 0:o.getSnappedPoint({x:n,y:r}),(0,O.VS)(O.MV)?{width:e.obj.canvasToInternalX(Number(i.strokewidth))}:{width:Number(i.strokewidth),coordstype:"px"},{dynamic:e.dynamic,negative:e.dynamic&&t.altKey}));a.setDrawing(!1),a.notifyDrawingFinished()}}))),ZO=h.gK.compose(UO.name,xO,Ej,wO,UO),GO=h.gK.model("PolygonTool",{group:"segmentation",shortcut:"P"}).views((e=>{const t={createRegionOptions:e.createRegionOptions,isIncorrectControl:e.isIncorrectControl,isIncorrectLabel:e.isIncorrectLabel};return{get getActivePolygon(){const t=e.currentArea;return(0,O.VS)(O.vz)&&t&&!(0,h._n)(t)||t&&t.closed||void 0===t||t&&"polygonregion"!==t.type?null:t},get tagTypes(){return{stateTypes:"polygonlabels",controlTagTypes:["polygonlabels","polygon"]}},get viewTooltip(){return"Polygon region"},get iconComponent(){return e.dynamic?TO.PolygonRegionModel.altIcon:TO.PolygonRegionModel.icon},get defaultDimensions(){return Rj},createRegionOptions:({x:e,y:n})=>t.createRegionOptions({points:[[e,n]],width:10,closed:!1}),isIncorrectControl:()=>t.isIncorrectControl()&&null===e.current(),isIncorrectLabel:()=>!e.current()&&t.isIncorrectLabel(),canStart:()=>null===e.current(),current:()=>e.getActivePolygon}})).actions((e=>{const t={startDrawing:e.startDrawing,_finishDrawing:e._finishDrawing,deleteRegion:e.deleteRegion};let n,r;return{handleToolSwitch(t){var n;if(e.stopListening(),null!=(n=e.getCurrentArea())&&n.isDrawing&&"ZoomPanTool"!==t.toolName){var r,o;const t=null==(r=e.getCurrentArea())?void 0:r.toJSON();(null==t||null==(o=t.points)?void 0:o.length)>2?e.finishDrawing():e.cleanupUncloseableShape()}},listenForClose(){r=!1,n=(0,u.lB)(e.getCurrentArea(),"closed",(()=>{var t;null!=(t=e.getCurrentArea())&&t.closed&&!r&&e.finishDrawing()}),!0)},stopListening(){n&&n()},closeCurrent(){e.stopListening(),r||(r=!0,e.getCurrentArea().closePoly())},startDrawing(n,r){var o;const i=null==(o=e.control)?void 0:o.getSnappedPoint({x:n,y:r});(0,O.VS)(O.vz)?(e.mode="drawing",e.currentArea=e.createRegion(e.createRegionOptions({x:i.x,y:i.y}),!0),e.setDrawing(!0),e.applyActiveStates(e.currentArea)):t.startDrawing(i.x,i.y)},_finishDrawing(){if((0,O.VS)(O.vz)){const{currentArea:t,control:n}=e;e.currentArea.notifyDrawingFinished(),e.setDrawing(!1),e.currentArea=null,e.mode="viewing",e.annotation.afterCreateResult(t,n)}else t._finishDrawing()},setDrawing(t){var n;null==(n=e.currentArea)||n.setDrawing(t),e.annotation.setIsDrawing(t)},deleteRegion(){if((0,O.VS)(O.vz)){const{currentArea:t}=e;e.setDrawing(!1),e.currentArea=null,t&&t.deleteRegion()}else t.deleteRegion()}}})),YO=h.gK.compose(GO.name,xO,Ej,SO,GO),XO=h.gK.model("BaseNTool",{group:"segmentation",smart:!0,shortcut:"R"}).views((e=>{const t={createRegionOptions:e.createRegionOptions,isIncorrectControl:e.isIncorrectControl,isIncorrectLabel:e.isIncorrectLabel};return{get getActivePolygon(){const t=e.currentArea;return t&&t.closed||void 0===t||t&&"rectangleregion"!==t.type?null:t},get tagTypes(){return{stateTypes:"rectanglelabels",controlTagTypes:["rectanglelabels","rectangle"]}},get defaultDimensions(){return kj},createRegionOptions:({x:n,y:r})=>t.createRegionOptions({x:n,y:r,height:(0,O.VS)(O.MV)?e.obj.canvasToInternalY(1):1,width:(0,O.VS)(O.MV)?e.obj.canvasToInternalX(1):1}),isIncorrectControl:()=>t.isIncorrectControl()&&null===e.current(),isIncorrectLabel:()=>!e.current()&&t.isIncorrectLabel(),canStart:()=>null===e.current()&&!e.annotation.isReadOnly(),current:()=>e.getActivePolygon}})).actions((e=>({beforeCommitDrawing(){const t=e.getActiveShape;return t.width>e.MIN_SIZE.X&&t.height*e.MIN_SIZE.Y}}))),qO=h.gK.model("RectangleTool",{shortcut:"R"}).views((e=>({get viewTooltip(){return"Rectangle"},get iconComponent(){return e.dynamic?TO.RectRegionModel.altIcon:TO.RectRegionModel.icon}}))),JO=h.gK.model("Rectangle3PointTool",{shortcut:"shift+R"}).views((e=>({get viewTooltip(){return"3 Point Rectangle"},get iconComponent(){return e.dynamic?TO.Rect3PointRegionModel.altIcon:TO.Rect3PointRegionModel.icon}}))),QO=h.gK.compose(qO.name,xO,Ej,CO,XO,qO,Pe),eR=h.gK.compose(JO.name,xO,Ej,jO,XO,JO,Pe),tR=h.gK.model("EllipseTool",{group:"segmentation",shortcut:"O"}).views((e=>{const t={createRegionOptions:e.createRegionOptions};return{get tagTypes(){return{stateTypes:"ellipselabels",controlTagTypes:["ellipselabels","ellipse"]}},get viewTooltip(){return"Ellipse region"},get iconComponent(){return e.dynamic?TO.EllipseRegionModel.altIcon:TO.EllipseRegionModel.icon},get defaultDimensions(){const{radius:e}=Oj;return{width:e,height:e}},createRegionOptions:({x:e,y:n})=>t.createRegionOptions({x:e,y:n,radiusX:1,radiusY:1})}})).actions((e=>({beforeCommitDrawing(){const t=e.getActiveShape;return t.radiusX>e.MIN_SIZE.X&&t.radiusY>e.MIN_SIZE.Y}}))),nR=h.gK.compose(tR.name,xO,Ej,CO,tR),rR=yr("SegmentationToolbar","Segmentation Tools"),oR={plus:"+",minus:"-"},iR=e=>{if(!e)return null;const t=e.split(",").map((e=>e.trim()));return(0,_.jsx)(Ze.Sl,{name:"shortcut",children:t.map(((e,t)=>{const n=e.split("+");return(0,_.jsx)(p.Fragment,{children:n.map((e=>{var t;return(0,_.jsx)(Ze.Sl,{name:"key",tag:"kbd",children:null!=(t=oR[e])?t:e},e)}))},`${n.join("-")}-${t}`)}))})},aR=({items:e,icon:t})=>{const[n,r]=(0,p.useState)(!1);return(0,p.useEffect)((()=>{const t=()=>{e.forEach((e=>{const t=e.shortcut;t&&rR.hasKey(t)&&rR.removeKey(t)}))};return t(),e.forEach((e=>{const t=e.shortcut;t&&!rR.hasKey(t)&&rR.addKey(t,(()=>{null==e||null==e.onClick||e.onClick(),r(!1)}),e.label)})),()=>{t()}}),[e]),(0,p.useEffect)((()=>{const e=()=>{n&&r(!1)};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}})),(0,_.jsxs)(Ze.eB,{name:"flyoutmenu",tag:"div",className:""+(n?"hovered":""),onClick:e=>{e.stopPropagation(),r(!n)},children:[(0,_.jsx)(Ze.Sl,{name:"icon",className:""+(n?"isClicked":""),title:"Zoom presets (click to see options)",children:t}),(0,_.jsx)(Ze.eB,{name:"tooltips",tag:"div",children:e.map(((e,t)=>(0,_.jsx)(Ze.Sl,{name:"tooltip",onClick:t=>{t.stopPropagation(),null==e||null==e.onClick||e.onClick(),r(!1)},children:(0,_.jsxs)(Ze.Sl,{name:"tooltip-body",children:[(0,_.jsx)(Ze.Sl,{name:"label",children:e.label}),iR(e.shortcut)]})},t)))})]})},sR=(0,y.PA)((({item:e})=>(0,_.jsxs)(p.Fragment,{children:[(0,_.jsx)(wj,{active:e.selected,icon:(0,_.jsx)(rm,{}),ariaLabel:"pan",label:"Pan Image",shortcut:"H",onClick:()=>{const t=e.selected;e.manager.selectTool(e,!t)}}),(0,_.jsx)(wj,{icon:(0,_.jsx)(Sm,{}),ariaLabel:"zoom-in",label:"Zoom In",shortcut:"ctrl+plus",onClick:()=>{e.handleZoom(1)}}),(0,_.jsx)(aR,{icon:(0,_.jsx)(zm,{}),items:[{label:"Zoom to fit",shortcut:"shift+1",onClick:()=>{e.sizeToFit()}},{label:"Zoom to actual size",shortcut:"shift+2",onClick:()=>{e.sizeToOriginal()}}]}),(0,_.jsx)(wj,{icon:(0,_.jsx)(Am,{}),ariaLabel:"zoom-out",label:"Zoom Out",shortcut:"ctrl+minus",onClick:()=>{e.handleZoom(-1)}})]}))),lR=h.gK.model("ZoomPanTool",{group:"control"}).volatile((()=>({canInteractWithRegions:!1}))).views((e=>({get viewClass(){return()=>(0,_.jsx)(sR,{item:e})},get stageContainer(){return e.obj.stageRef.container()}}))).actions((e=>({shouldSkipInteractions:()=>!0,mouseupEv(){e.mode="viewing",e.stageContainer.style.cursor="grab"},updateCursor(){var t;e.selected&&null!=(t=e.obj)&&t.stageRef&&(e.stageContainer.style.cursor="grab")},afterUpdateSelected(){e.updateCursor()},handleDrag(t){const n=e.obj,r=n.zoomingPositionX+t.movementX,o=n.zoomingPositionY+t.movementY;n.setZoomPosition(r,o)},mousemoveEv(t){e.obj.zoomScale<=1||"moving"===e.mode&&(e.handleDrag(t),e.stageContainer.style.cursor="grabbing")},mousedownEv(t){2!==t.button&&(e.mode="moving",e.stageContainer.style.cursor="grabbing")},handleZoom(t){e.obj.handleZoom(t)},sizeToFit(){e.obj.sizeToFit()},sizeToAuto(){e.obj.sizeToAuto()},sizeToOriginal(){e.obj.sizeToOriginal()}}))),cR=h.gK.compose(lR.name,xO,Ej,lR),dR=(0,y.PA)((({item:e})=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(wj,{active:e.selected,icon:(0,_.jsx)(tp,{}),ariaLabel:"rotate-left",label:"Rotate Left",shortcut:"alt+left",onClick:()=>{e.rotate(-90)}}),(0,_.jsx)(wj,{active:e.selected,icon:(0,_.jsx)(lp,{}),ariaLabel:"rotate-right",label:"Rotate Right",shortcut:"alt+right",onClick:()=>{e.rotate(90)}})]}))),uR=h.gK.model("RotateTool",{group:"control"}).views((e=>({get viewClass(){return()=>(0,_.jsx)(dR,{item:e})}}))).actions((e=>({rotate(t){e.obj.rotate(t)}}))),hR=h.gK.compose(uR.name,xO,Ej,uR),gR=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{active:e.selected,ariaLabel:"brightness",label:"Brightness",controlsOnHover:!0,controls:[(0,_.jsx)(hC,{align:"vertical",reverse:!0,continuous:!0,minIcon:(0,_.jsx)(cm,{style:{width:22,height:22,opacity:.2}}),maxIcon:(0,_.jsx)(cm,{style:{width:22,height:22,opacity:.8}}),value:e.brightness,max:V.A.BRIGHTNESS_MAX,onChange:t=>{e.setStroke(t)}},"brightness")],icon:(0,_.jsx)(cm,{})}))),mR=h.gK.model({brightness:h.gK.optional(h.gK.number,V.A.BRIGHTNESS_VALUE)}).views((e=>({get viewClass(){return()=>(0,_.jsx)(gR,{item:e})}}))).actions((e=>({setStroke(t){e.brightness=t,e.obj.setBrightnessGrade(t)}}))),pR=h.gK.compose(mR.name,xO,Ej,mR),fR=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{active:e.selected,ariaLabel:"contrast",label:"Contrast",controlsOnHover:!0,controls:[(0,_.jsx)(hC,{align:"vertical",reverse:!0,continuous:!0,minIcon:(0,_.jsx)(pm,{style:{width:22,height:22,opacity:.2}}),maxIcon:(0,_.jsx)(pm,{style:{width:22,height:22,opacity:.8}}),value:e.contrast,max:V.A.CONTRAST_MAX,onChange:t=>{e.setStroke(t)}},"contrast")],icon:(0,_.jsx)(pm,{})}))),vR=h.gK.model("ContrastTool",{contrast:h.gK.optional(h.gK.number,V.A.CONTRAST_VALUE)}).views((e=>({get viewClass(){return()=>(0,_.jsx)(fR,{item:e})}}))).actions((e=>({setStroke(t){e.contrast=t,e.obj.setContrastGrade(t)}}))),yR=h.gK.compose(vR.name,xO,Ej,vR),bR=(0,y.PA)((({item:e})=>(0,_.jsx)(wj,{label:"Magic Wand",ariaLabel:"magicwand",shortcut:"W",active:e.selected,icon:e.iconClass,tool:e,onClick:()=>{e.selected||e.manager.selectTool(e,!0)}}))),xR=h.gK.model("MagicWandTool",{group:"segmentation",shortcut:"W",smart:!0,unselectRegionOnToolChange:!1}).volatile((()=>({canInteractWithRegions:!1,currentThreshold:null,mask:null,anchorScreenX:null,anchorScreenY:null,anchorImgX:null,anchorImgY:null,overlay:null,overlayCtx:null,overlayOrigStyle:null,transformedData:null,transformedCanvas:null,currentRegion:null,isFirstWand:!0,cachedRegionId:null,cachedLabel:null,cachedNaturalCanvas:null,naturalWidth:null,naturalHeight:null,imageDisplayedInBrowserWidth:null,imageDisplayedInBrowserHeight:null,viewportWidth:null,viewportHeight:null,zoomScale:null,zoomingPositionX:null,zoomingPositionY:null,negativezoom:null,rotation:null,timeTravellerListener:null}))).views((e=>({get viewClass(){return()=>(0,_.jsx)(bR,{item:e})},get tagTypes(){return{stateTypes:"brushlabels",controlTagTypes:["brushlabels","magicwand"]}},get iconComponent(){return Fg},get defaultthreshold(){return Number.parseInt(e.control.defaultthreshold,10)},get opacity(){return Number.parseFloat(e.control.opacity)},get fillcolor(){const t=pt()(V.l.fillcolor).hex();let n=t;const r=e.obj.states();if(!r.length)return n;const o=r.find((e=>void 0!==e.selectedColor));return n=o?o.selectedColor:t,pt()(n).hex()},get selectedLabel(){const t=e.obj.states();if(!t.length)return null;return t.find((e=>typeof e.isSelected)).selectedValues()[0]},get blurradius(){return Number.parseInt(e.control.blurradius,10)},get existingRegion(){return e.getSelectedShape&&e.getSelectedShape.type&&e.getSelectedShape.maskDataURL?e.getSelectedShape:null},shouldInvalidateCache:()=>e.existingRegion&&e.existingRegion.id!==e.cachedRegionId}))).actions((e=>({mousedownEv(t){e.timeTravellerListener||(e.timeTravellerListener=e.annotation.history.onUpdate((()=>{e.invalidateCache()}))),e.annotation.history.freeze(),e.mode="drawing",e.currentThreshold=e.defaultthreshold,e.currentRegion=null;const n=e.obj,r=n.imageRef;if(e.naturalWidth=r.naturalWidth,e.naturalHeight=r.naturalHeight,e.imageDisplayedInBrowserWidth=r.width,e.imageDisplayedInBrowserHeight=r.height,e.viewportWidth=Math.round(n.canvasSize.width),e.viewportHeight=Math.round(n.canvasSize.height),e.zoomScale=n.zoomScale,e.zoomingPositionX=n.zoomingPositionX,e.zoomingPositionY=n.zoomingPositionY,e.negativezoom=e.zoomScale<1,e.rotation=n.rotation,e.rotation||n.crosshair){let t;throw e.mode="viewing",e.annotation.history.unfreeze(),t=e.rotation?"The Magic Wand is not supported on rotated images":"The Magic Wand is not supported if the crosshair is turned on",alert(t),t}window.addEventListener("keydown",e.keydownEv,!0),[e.anchorImgX,e.anchorImgY,e.anchorScreenX,e.anchorScreenY]=e.getEventCoords(t),e.initCache(),e.initCanvas(),e.initCurrentRegion()},mousemoveEv(t){if("drawing"!==e.mode)return;const[n,r,o,i]=e.getEventCoords(t);e.threshold(o,i,e.fillcolor,e.opacity)},mouseupEv:(0,h.L3)((function*(){"viewing"!==e.mode&&(e.mode="viewing",window.removeEventListener("keydown",e.keydownEv,!0),yield e.setupFinalMask())})),keydownEv(t){const{key:n}=t;"Escape"===n&&(t.preventDefault(),t.stopPropagation(),e.mode="viewing",window.removeEventListener("keydown",e.keydownEv,!0),e.overlayCtx.clearRect(0,0,e.overlay.width,e.overlay.height))},getEventCoords:e=>[e.offsetX,e.offsetY,e.screenX,e.screenY],initCache(){e.isFirstWand=null===e.existingRegion||e.existingRegion.id!==e.cachedRegionId,e.isFirstWand?(e.cachedNaturalCanvas=document.createElement("canvas"),e.cachedNaturalCanvas.width=e.naturalWidth,e.cachedNaturalCanvas.height=e.naturalHeight,e.cachedLabel=e.selectedLabel):e.shouldInvalidateCache()&&e.invalidateCache()},invalidateCache(){e.cachedNaturalCanvas=document.createElement("canvas"),e.cachedNaturalCanvas.width=e.naturalWidth,e.cachedNaturalCanvas.height=e.naturalHeight,e.isFirstWand=!0,e.cachedRegionId=null,e.cachedLabel=e.selectedLabel},initCanvas(){const t=e.obj,n=t.imageRef;[e.transformedData,e.transformedCanvas]=kt(n,e.naturalWidth,e.naturalHeight,e.imageDisplayedInBrowserWidth,e.imageDisplayedInBrowserHeight,e.viewportWidth,e.viewportHeight,e.zoomScale,e.zoomingPositionX,e.zoomingPositionY,e.negativezoom,e.rotation),e.overlay=t.overlayRef,e.overlayOrigStyle=e.overlay.style,e.overlay.style="",e.overlay.width=e.transformedCanvas.width,e.overlay.height=e.transformedCanvas.height,e.overlayCtx=e.overlay.getContext("2d"),e.mask=vt(e.transformedData,e.overlayCtx,e.transformedCanvas.width,e.transformedCanvas.height,e.anchorImgX,e.anchorImgY,e.currentThreshold,e.fillcolor,e.opacity,e.blurradius,!0)},initCurrentRegion(){if(e.isFirstWand){const t={id:E(),strokewidth:1,object:e.obj,points:[],fillcolor:e.fillcolor,strokecolor:e.fillcolor,opacity:e.opacity};e.currentRegion=e.createDrawingRegion(t)}else e.currentRegion=e.existingRegion},threshold(t,n){if(t!==e.anchorScreenX||n!==e.anchorScreenY){const r=Math.abs(t-e.anchorScreenX),o=Math.abs(n-e.anchorScreenY),i=Math.sqrt(r*r+o*o),a=Math.abs(r),s=Math.abs(o);let l=a>s?r/a:o/s;l=l<0?l/5:l/3;const c=Math.min(Math.max(e.defaultthreshold+Math.floor(l*i),1),255);c!==e.currentThreshold&&(e.currentThreshold=c,e.mask=vt(e.transformedData,e.overlayCtx,e.transformedCanvas.width,e.transformedCanvas.height,e.anchorImgX,e.anchorImgY,e.currentThreshold,e.fillcolor,e.opacity,e.blurradius,!0))}},setupFinalMask:(0,h.L3)((function*(){const t=e.mask;let n,r;e.negativezoom?(n=Math.min(e.viewportWidth,e.imageDisplayedInBrowserWidth),r=Math.min(e.viewportHeight,e.imageDisplayedInBrowserHeight)):(n=e.viewportWidth,r=e.viewportHeight);const o=xk.A.mask2DataURL(t.data,n,r,"#FFFFFF"),i=document.createElement("img");i.src=o,yield i.decode();const a=e.copyTransformedMaskToNaturalSize(i);e.finalMaskToRegion(a)})),copyTransformedMaskToNaturalSize(t){const n=e.cachedNaturalCanvas.getContext("2d"),[r,o]=Ot(e.naturalWidth,e.naturalHeight,e.imageDisplayedInBrowserWidth,e.imageDisplayedInBrowserHeight,e.zoomingPositionX,e.zoomingPositionY),i=Math.ceil(e.transformedCanvas.width/e.imageDisplayedInBrowserWidth*e.naturalWidth),a=Math.ceil(e.transformedCanvas.height/e.imageDisplayedInBrowserHeight*e.naturalHeight),s=e.transformedCanvas.width,l=e.transformedCanvas.height,c=r,d=o,u=i,h=a;n.drawImage(t,0,0,s,l,c,d,u,h);return e.cachedNaturalCanvas.toDataURL()},finalMaskToRegion(t){if(e.isFirstWand){const n=e.commitDrawingRegion(t);e.cachedRegionId=n.id,e.obj.annotation.selectArea(n)}else e.currentRegion.endUpdatedMaskDataURL(t);e.annotation.history.unfreeze(),e.annotation.setIsDrawing(!1),e.overlay.style=e.origStyle,setTimeout((()=>{e.overlayCtx.clearRect(0,0,e.overlay.width,e.overlay.height)}))},commitDrawingRegion(t){const n={maskDataURL:t,coordstype:"px",dynamic:!1},r=e.annotation.createResult(n,e.currentRegion.results[0].value.toJSON(),e.control,e.obj);return e.applyActiveStates(r),e.deleteRegion(),r.notifyDrawingFinished(),r}}))),wR=h.gK.compose(xR.name,xO,Ej,wO,xR),CR=h.gK.model("SelectionTool",{shortcut:"V",group:"control"}).views((()=>({get isSeparated(){return!0},get viewTooltip(){return"Move"},get iconComponent(){return Gm},get useTransformer(){return!0}}))).actions((e=>{let t=!1;return{shouldSkipInteractions:()=>!1,mousedownEv(n,[r,o]){t=!0,e.obj.setSelectionStart({x:r,y:o})},mousemoveEv(n,[r,o]){t&&e.obj.setSelectionEnd({x:r,y:o})},mouseupEv(n,[r,o]){if(!t)return;e.obj.setSelectionEnd({x:r,y:o});const{regionsInSelectionArea:i}=e.obj;e.obj.resetSelection(),n.ctrlKey||n.metaKey?e.annotation.extendSelectionWith(i):e.annotation.selectAreas(i),t=!1},clickEv(n){(0,O.VS)(O.q$)&&(t=!1,e.obj.resetSelection(),n.ctrlKey||n.metaKey||e.annotation.unselectAreas())}}})),SR=h.gK.compose("MoveTool",xO,Ej,Pe,CR),jR=new Map;let kR=null;class OR{static getInstance({name:e}={}){if(!e)return;if(jR.has(e))return jR.get(e);const t=new OR({name:e});return jR.set(e,t),t}static allInstances(){return Array.from(jR.values())}static setRoot(e){kR=e}static removeAllTools(){jR.forEach((e=>e.removeAllTools())),jR.clear()}constructor({name:e}={}){this.name=e,this.tools={},this._default_tool=null,this._prefix=E()}get preservedTool(){return window.localStorage.getItem(`selected-tool:${this.name}`)}get obj(){return kR.annotationStore.names.get(this.name)}addTool(e,t,n=null,r=E()){var o,i;if(t.smart&&null!=(o=t.control)&&o.smartonly)return;const a=null!=(i=t.toolName)?i:e,s=`${null!=r?r:this._prefix}#${a}`;if((0,O.VS)(O.bP)&&n&&e===n){const e=new RegExp(`^.*?#${a}.*$`);if(Object.keys(this.tools).some((t=>e.test(t))))return void console.log(`Ignoring duplicate tool ${a} because it matches removeDuplicatesNamed ${n}`)}this.tools[s]=t,t.default&&!this._default_tool&&(this._default_tool=t),this.preservedTool&&t.shouldPreserveSelectedState?t.fullName===this.preservedTool&&t.setSelected&&(this.unselectAll(),this.selectTool(t,!0)):this._default_tool&&!this.hasSelected&&this.selectTool(this._default_tool,!0)}unselectAll(){var e;Object.values(this.tools).forEach((e=>{void 0!==e.selected&&e.setSelected(!1)}));const t=null==(e=this.obj)?void 0:e.stageRef;t&&(t.container().style.cursor="default")}selectTool(e,t){const n=this.findSelectedTool(),r=null==e?void 0:e.group;if(n&&"segmentation"===r){const t=e.control.type.replace(/labels$/,""),n=e.obj.activeStates().filter((e=>{const n=e.type.replace(/labels$/,"");return"labels"!==e.type&&n!==t}));n.forEach((e=>e.unselectAll()))}if(null==n||null==n.handleToolSwitch||n.handleToolSwitch(e),t)this.unselectAll(),e.setSelected&&e.setSelected(!0);else{const t=this.findDrawingTool();if(t)return this.selectTool(t,!0);e.setSelected&&e.setSelected(!1)}}selectDefault(){const e=this.findSelectedTool();this._default_tool&&!0===(null==e?void 0:e.dynamic)&&(this.unselectAll(),this._default_tool.setSelected(!0))}allTools(){return Object.values(this.tools)}addToolsFromControl(e){if(e.tools){const t=e.tools;Object.keys(t).forEach((n=>{this.addTool(n,t[n],e.removeDuplicatesNamed,e.name||e.id)}))}}findSelectedTool(){return Object.values(this.tools).find((e=>e.selected))}findDrawingTool(){return Object.values(this.tools).find((e=>e.isDrawing))}event(e,t,...n){const r=this.findSelectedTool();r&&r.event(e,t,n)}reload({name:e}={}){jR.delete(this.name),jR.set(e,this),this.removeAllTools(),this.name=e}removeAllTools(){Object.values(this.tools).forEach((e=>(0,h.zr)(e))),this.tools={},this._default_tool=null}get hasSelected(){return Object.values(this.tools).some((e=>e.selected))}}window.ToolManager=OR;const RR=OR,ER=h.gK.union({dispatcher(e){if(!e)return h.gK.null;const t=e.object.name||e.object,n=window.Htx.annotationStore.names.get(t),r=x.getAvailableAreas(n.type,e);return h.gK.union(...r,h.gK.null)}});const _R=new class{constructor(){this.fileCache=new Map,this.errorCache=new Map}download(e,t){var n=this;if(!e)throw new Error("No URL provided for download");return new Promise(((r,o)=>{if(this.fileCache.has(e))return void r(this.fileCache.get(e));if(this.errorCache.has(e))return void o(this.errorCache.get(e));const i=new XMLHttpRequest;i.responseType="blob",i.addEventListener("load",(async function(){if(4===i.readyState&&200===i.status){var t;const a=n.createDataURL(i.response);if(n.fileCache.set(e,a),null!=(t=i.getResponseHeader("content-type"))&&t.match(/image/))try{await n.cacheImage(a)}catch(e){return void o(e)}r(a)}})),i.addEventListener("progress",(e=>{const{total:n,loaded:r}=e;null==t||t(n,r,r/n)})),i.addEventListener("error",(()=>{const t=new Error("Network error");o(t),this.errorCache.set(e,t)})),i.open("GET",e),i.send()}))}isPreloaded(e){return this.fileCache.has(e)}isError(e){return this.errorCache.has(e)}getPreloadedURL(e){return this.fileCache.get(e)}getError(e){return this.errorCache.get(e)}createDataURL(e){return URL.createObjectURL(e)}cacheImage(e){return new Promise(((t,n)=>{const r=new Image;r.onload=()=>{t()},r.onerror=()=>{n()},r.src=e}))}},AR=h.gK.model({id:h.gK.identifier,src:h.gK.string,index:h.gK.number,rotation:h.gK.optional(h.gK.number,0),naturalWidth:h.gK.optional(h.gK.integer,1),naturalHeight:h.gK.optional(h.gK.integer,1),stageWidth:h.gK.optional(h.gK.number,1),stageHeight:h.gK.optional(h.gK.number,1),zoomScale:h.gK.optional(h.gK.number,1),zoomingPositionX:h.gK.optional(h.gK.number,0),zoomingPositionY:h.gK.optional(h.gK.number,0),brightnessGrade:h.gK.optional(h.gK.number,100),contrastGrade:h.gK.optional(h.gK.number,100)}).volatile((()=>({stageRatio:1,containerWidth:1,containerHeight:1,stageZoom:1,stageZoomX:1,stageZoomY:1,currentZoom:1,downloaded:!1,downloading:!1,error:!1,progress:0,currentSrc:void 0,imageLoaded:!1}))).actions((e=>({preload(){!e.ensurePreloaded()&&e.src&&(e.setDownloading(!0),_R.download(e.src,((t,n,r)=>{e.setProgress(r)})).then((t=>{e.setDownloaded(!0),e.setDownloading(!1),e.setCurrentSrc(t)})).catch((()=>{e.setDownloading(!1),e.setError(!0)})))},ensurePreloaded:()=>_R.isError(e.src)?(e.setDownloading(!1),e.setError(!0),!0):!!_R.isPreloaded(e.src)&&(e.setDownloading(!1),e.setDownloaded(!0),e.setProgress(1),e.setCurrentSrc(_R.getPreloadedURL(e.src)),!0),setImageLoaded(t){e.imageLoaded=t},setProgress(t){e.progress=(0,w.clamp)(t,0,100)},setDownloading(t){e.downloading=t},setDownloaded(t){e.downloaded=t},setCurrentSrc(t){e.currentSrc=t},setError(){e.error=!0}}))).actions((e=>({setRotation(t){e.rotation=t},setNaturalWidth(t){e.naturalWidth=t},setNaturalHeight(t){e.naturalHeight=t},setStageWidth(t){e.stageWidth=t},setStageHeight(t){e.stageHeight=t},setStageRatio(t){e.stageRatio=t},setContainerWidth(t){e.containerWidth=t},setContainerHeight(t){e.containerHeight=t},setStageZoom(t){e.stageZoom=t},setStageZoomX(t){e.stageZoomX=t},setStageZoomY(t){e.stageZoomY=t},setCurrentZoom(t){e.currentZoom=t},setZoomScale(t){e.zoomScale=t},setZoomingPositionX(t){e.zoomingPositionX=t},setZoomingPositionY(t){e.zoomingPositionY=t},setBrightnessGrade(t){e.brightnessGrade=t},setContrastGrade(t){e.contrastGrade=t}}))),TR=h.gK.model({currentImageEntity:h.gK.maybeNull(h.gK.reference(AR)),imageEntities:h.gK.optional(h.gK.array(AR),[])}).actions((e=>({beforeDestroy(){e.currentImageEntity=null}}))).views((e=>({get maxItemIndex(){return e.imageEntities.length-1},get imageIsLoaded(){const t=e.currentImageEntity;return!t.downloading&&!t.error&&t.downloaded&&t.imageLoaded},get rotation(){var t;if((0,h._n)(e))return null==(t=e.currentImageEntity)?void 0:t.rotation},set rotation(t){var n;null==(n=e.currentImageEntity)||n.setRotation(t)},get naturalWidth(){var t;return null==(t=e.currentImageEntity)?void 0:t.naturalWidth},set naturalWidth(t){var n;null==(n=e.currentImageEntity)||n.setNaturalWidth(t)},get naturalHeight(){var t;return null==(t=e.currentImageEntity)?void 0:t.naturalHeight},set naturalHeight(t){var n;null==(n=e.currentImageEntity)||n.setNaturalHeight(t)},get stageWidth(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageWidth},set stageWidth(t){var n;null==(n=e.currentImageEntity)||n.setStageWidth(t)},get stageHeight(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageHeight},set stageHeight(t){var n;null==(n=e.currentImageEntity)||n.setStageHeight(t)},get stageRatio(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageRatio},set stageRatio(t){var n;null==(n=e.currentImageEntity)||n.setStageRatio(t)},get containerWidth(){var t;return null==(t=e.currentImageEntity)?void 0:t.containerWidth},set containerWidth(t){var n;null==(n=e.currentImageEntity)||n.setContainerWidth(t)},get containerHeight(){var t;return null==(t=e.currentImageEntity)?void 0:t.containerHeight},set containerHeight(t){var n;null==(n=e.currentImageEntity)||n.setContainerHeight(t)},get stageZoom(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageZoom},set stageZoom(t){var n;null==(n=e.currentImageEntity)||n.setStageZoom(t)},get stageZoomX(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageZoomX},set stageZoomX(t){var n;null==(n=e.currentImageEntity)||n.setStageZoomX(t)},get stageZoomY(){var t;return null==(t=e.currentImageEntity)?void 0:t.stageZoomY},set stageZoomY(t){var n;null==(n=e.currentImageEntity)||n.setStageZoomY(t)},get currentZoom(){var t;return null==(t=e.currentImageEntity)?void 0:t.currentZoom},set currentZoom(t){var n;null==(n=e.currentImageEntity)||n.setCurrentZoom(t)},get zoomScale(){var t;if((0,h._n)(e))return null==(t=e.currentImageEntity)?void 0:t.zoomScale},set zoomScale(t){var n;null==(n=e.currentImageEntity)||n.setZoomScale(t)},get zoomingPositionX(){var t;if((0,h._n)(e))return null==(t=e.currentImageEntity)?void 0:t.zoomingPositionX},set zoomingPositionX(t){var n;null==(n=e.currentImageEntity)||n.setZoomingPositionX(t)},get zoomingPositionY(){var t;return(0,h._n)(e)?null==(t=e.currentImageEntity)?void 0:t.zoomingPositionY:null},set zoomingPositionY(t){var n;null==(n=e.currentImageEntity)||n.setZoomingPositionY(t)},get brightnessGrade(){var t;return null==(t=e.currentImageEntity)?void 0:t.brightnessGrade},set brightnessGrade(t){var n;null==(n=e.currentImageEntity)||n.setBrightnessGrade(t)},get contrastGrade(){var t;return null==(t=e.currentImageEntity)?void 0:t.contrastGrade},set contrastGrade(t){var n;null==(n=e.currentImageEntity)||n.setContrastGrade(t)},findImageEntity(t){var n;return t=null!=(n=t)?n:0,e.imageEntities.find((e=>e.index===t))}}))),PR=h.gK.model({x:h.gK.number,y:h.gK.number}),IR=h.gK.model({start:h.gK.maybeNull(PR),end:h.gK.maybeNull(PR)}).views((e=>({get obj(){return(0,h.PA)(e)},get annotation(){return e.obj.annotation},get highlightedNodeExists(){return!!e.annotation.highlightedNode},get isActive(){return e.start&&e.end},get x(){return Math.min(e.start.x*e.scale,e.end.x*e.scale)},get y(){return Math.min(e.start.y*e.scale,e.end.y*e.scale)},get width(){return Math.abs(e.end.x*e.scale-e.start.x*e.scale)},get height(){return Math.abs(e.end.y*e.scale-e.start.y*e.scale)},get scale(){return e.obj.zoomScale},get bbox(){const{start:t,end:n}=e;return e.isActive?{left:Math.min(t.x,n.x),top:Math.min(t.y,n.y),right:Math.max(t.x,n.x),bottom:Math.max(t.y,n.y)}:null},get onCanvasBbox(){if(!e.isActive)return null;const{start:t,end:n}=e;return{left:e.obj.internalToCanvasX(Math.min(t.x,n.x)),top:e.obj.internalToCanvasY(Math.min(t.y,n.y)),right:e.obj.internalToCanvasX(Math.max(t.x,n.x)),bottom:e.obj.internalToCanvasY(Math.max(t.y,n.y))}},get onCanvasRect(){if(!(0,O.VS)(O.MV))return e;if(!e.isActive)return null;const t=e.onCanvasBbox;return{x:t.left,y:t.top,width:t.right-t.left,height:t.bottom-t.top}},includesBbox(t){if(!e.isActive||!t)return!1;const n=e.bbox.left<=t.left,r=e.bbox.top<=t.top,o=e.bbox.right>=t.right,i=e.bbox.bottom>=t.bottom;return n&&r&&o&&i},intersectsBbox(t){if(!e.isActive||!t)return!1;const n=(e.bbox.left+e.bbox.right)/2,r=(e.bbox.top+e.bbox.bottom)/2,o=e.bbox.right-e.bbox.left,i=e.bbox.bottom-e.bbox.top,a=(t.left+t.right)/2,s=(t.top+t.bottom)/2,l=t.right-t.left,c=t.bottom-t.top;return 2*Math.abs(n-a)t.bboxCoords?{left:Math.min(e.left,t.bboxCoords.left),top:Math.min(e.top,t.bboxCoords.top),right:Math.max(e.right,t.bboxCoords.right),bottom:Math.max(e.bottom,t.bboxCoords.bottom)}:e),t);return(0,O.VS)(O.MV)?{left:e.obj.internalToCanvasX(n.left),top:e.obj.internalToCanvasY(n.top),right:e.obj.internalToCanvasX(n.right),bottom:e.obj.internalToCanvasY(n.bottom)}:n}}))).actions((e=>({setStart(t){e.start=t},setEnd(t){e.end=t}}))),LR=h.gK.model({valuelist:h.gK.maybeNull(h.gK.string)}).extend((e=>{if(!0!==e.isObjectTag)throw new Error("The MultiItemObjectBase mixin should be used only for object-tags");return{}})).views((e=>({get isMultiItem(){return(0,w.isDefined)(e.valuelist)},get maxItemIndex(){throw new Error("MultiItemMixin needs to implement maxItemIndex getter in views")},get currentItemIndex(){throw new Error("MultiItemMixin needs to implement currentItemIndex getter in views")},get regs(){return e.isMultiItem?e.allRegs.filter((t=>{var n;return(null!=(n=t.item_index)?n:0)===e.currentItemIndex})):e.allRegs}}))),MR=h.gK.model({value:h.gK.maybeNull(h.gK.string),valuelist:h.gK.maybeNull(h.gK.string),resize:h.gK.maybeNull(h.gK.number),width:h.gK.optional(h.gK.string,"100%"),height:h.gK.maybeNull(h.gK.string),maxwidth:h.gK.optional(h.gK.string,"100%"),maxheight:h.gK.optional(h.gK.string,"calc(100vh - 194px)"),smoothing:h.gK.maybeNull(h.gK.boolean),grid:h.gK.optional(h.gK.boolean,!1),gridsize:h.gK.optional(h.gK.string,"30"),gridcolor:h.gK.optional(Re.color,"#EEEEF4"),zoom:h.gK.optional(h.gK.boolean,!0),negativezoom:h.gK.optional(h.gK.boolean,!1),zoomby:h.gK.optional(h.gK.string,"1.1"),showlabels:h.gK.optional(h.gK.boolean,!1),zoomcontrol:h.gK.optional(h.gK.boolean,!0),brightnesscontrol:h.gK.optional(h.gK.boolean,!1),contrastcontrol:h.gK.optional(h.gK.boolean,!1),rotatecontrol:h.gK.optional(h.gK.boolean,!1),crosshair:h.gK.optional(h.gK.boolean,!1),selectioncontrol:h.gK.optional(h.gK.boolean,!0),lazyoff:h.gK.optional(h.gK.boolean,!1),horizontalalignment:h.gK.optional(h.gK.enumeration(["left","center","right"]),"left"),verticalalignment:h.gK.optional(h.gK.enumeration(["top","center","bottom"]),"top"),defaultzoom:h.gK.optional(h.gK.enumeration(["auto","original","fit"]),"fit"),crossorigin:h.gK.optional(h.gK.enumeration(["none","anonymous","use-credentials"]),"none")}),KR="rectanglelabels",DR="brushlabels",NR="ellipselabels",VR=h.gK.model({type:"image",sizeUpdated:h.gK.optional(h.gK.boolean,!1),cursorPositionX:h.gK.optional(h.gK.number,0),cursorPositionY:h.gK.optional(h.gK.number,0),brushControl:h.gK.optional(h.gK.string,"brush"),brushStrokeWidth:h.gK.optional(h.gK.number,15),mode:h.gK.optional(h.gK.enumeration(["drawing","viewing","brush","eraser"]),"viewing"),regions:h.gK.array(h.gK.union(Vk,fO,Zk,aO,qk),[]),drawingRegion:h.gK.optional(ER,null),selectionArea:h.gK.optional(IR,{start:null,end:null})}).volatile((()=>({currentImage:void 0,supportSuggestions:!0}))).views((e=>({get store(){return(0,h.Zn)(e)},get multiImage(){return!!e.isMultiItem},get currentItemIndex(){return e.currentImage},get parsedValue(){return j(e.value,e.store.task.dataObj)},get parsedValueList(){return j(e.valuelist,e.store.task.dataObj)},get currentSrc(){return e.currentImageEntity.src},get usedValue(){return e.multiImage?e.valuelist:e.value},get images(){const t=e.parsedValue;return t?Array.isArray(t)?t:[t]:[]},get hasStates(){const t=e.states();return t&&t.length>0},get selectedRegions(){return e.regs.filter((e=>e.inSelection))},get selectedRegionsBBox(){let t;return e.selectedRegions.forEach((e=>{const n=e.bboxCoords;n&&(t=t?{left:Math.min(null==n?void 0:n.left,t.left),top:Math.min(null==n?void 0:n.top,t.top),right:Math.max(null==n?void 0:n.right,t.right),bottom:Math.max(null==n?void 0:n.bottom,t.bottom)}:n)})),t},get regionsInSelectionArea(){return e.regs.filter((e=>e.isInSelectionArea))},get selectedShape(){return e.regs.find((e=>e.selected))},get suggestions(){var t;return(null==(t=e.annotation)?void 0:t.regionStore.suggestions.filter((t=>t.object===e)))||[]},get useTransformer(){var t;return!0===(null==(t=e.getToolsManager().findSelectedTool())?void 0:t.useTransformer)},get stageTranslate(){const{stageWidth:t,stageHeight:n}=e;return{0:{x:0,y:0},90:{x:0,y:n},180:{x:t,y:n},270:{x:t,y:0}}[e.rotation]},get stageScale(){return e.zoomScale},get hasTools(){var t;return!(null==(t=e.getToolsManager().allTools())||!t.length)},get imageCrossOrigin(){const t=e.crossorigin.toLowerCase();return!(0,O.VS)(O.xS)||t&&"none"!==t?(0,O.VS)(O.bP)&&t&&"none"!==t?t:null:"anonymous"},get fillerHeight(){const{naturalWidth:t,naturalHeight:n}=e;return e.isSideways?t/n*100+"%":n/t*100+"%"},get zoomedPixelSize(){const{naturalWidth:t,naturalHeight:n}=e;return(0,O.VS)(O.MV)?{x:100/t,y:100/n}:{x:e.stageWidth/t,y:e.stageHeight/n}},isSamePixel({x:t,y:n},{x:r,y:o}){const i=e.zoomedPixelSize.x,a=e.zoomedPixelSize.y;return Math.abs(t-r)e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t&&t.filter((e=>e.isSelected&&e.type.includes("labels")))},controlButton(){const t=e.states();if(!t||0===t.length)return;let n=t[0];return t.forEach((e=>{e.type!==KR&&e.type!==DR&&e.type!==NR||(n=e)})),n},get controlButtonType(){const t=e.controlButton();return(0,h.Pw)(t).name},get isSideways(){return(e.rotation+360)%180==90},get stageComponentSize(){return e.isSideways?{width:e.stageHeight,height:e.stageWidth}:{width:e.stageWidth,height:e.stageHeight}},get canvasSize(){return e.isSideways?{width:(0,O.VS)(O.aT)?e.naturalHeight*e.stageZoomX:Math.round(e.naturalHeight*e.stageZoomX),height:(0,O.VS)(O.aT)?e.naturalWidth*e.stageZoomY:Math.round(e.naturalWidth*e.stageZoomY)}:{width:(0,O.VS)(O.aT)?e.naturalWidth*e.stageZoomX:Math.round(e.naturalWidth*e.stageZoomX),height:(0,O.VS)(O.aT)?e.naturalHeight*e.stageZoomY:Math.round(e.naturalHeight*e.stageZoomY)}},get alignmentOffset(){const t={x:0,y:0};if((0,O.VS)(O.pG)){switch(e.horizontalalignment){case"center":t.x=(e.containerWidth-e.canvasSize.width)/2;break;case"right":t.x=e.containerWidth-e.canvasSize.width}switch(e.verticalalignment){case"center":t.y=(e.containerHeight-e.canvasSize.height)/2;break;case"bottom":t.y=e.containerHeight-e.canvasSize.height}}return t},get zoomBy(){return Number.parseFloat(e.zoomby)},get isDrawing(){return!!e.drawingRegion},get imageTransform(){const t={width:e.stageWidth*e.zoomScale+"px",height:e.stageHeight*e.zoomScale+"px",transformOrigin:"left top",transform:"translate3d(0,0,0)",filter:`brightness(${e.brightnessGrade}%) contrast(${e.contrastGrade}%)`},n=[];if(1!==e.zoomScale){const{zoomingPositionX:t=0,zoomingPositionY:r=0}=e;n.push(`translate3d(${t}px,${r}px, 0)`)}if(e.rotation){const t={90:"0, -100%",180:"-100%, -100%",270:"-100%, 0"};n.push(`rotate(${e.rotation}deg)`),n.push(`translate(${t[e.rotation]||"0, 0"})`)}return(null==n?void 0:n.length)>0&&(t.transform=n.join(" ")),t},get maxScale(){return e.isSideways?Math.min(e.containerWidth/e.naturalHeight,e.containerHeight/e.naturalWidth):Math.min(e.containerWidth/e.naturalWidth,e.containerHeight/e.naturalHeight)},get coverScale(){return e.isSideways?Math.max(e.containerWidth/e.naturalHeight,e.containerHeight/e.naturalWidth):Math.max(e.containerWidth/e.naturalWidth,e.containerHeight/e.naturalHeight)},get viewPortBBoxCoords(){let t=e.canvasSize.width/e.zoomScale,n=e.canvasSize.height/e.zoomScale;const r=-e.zoomingPositionX/e.zoomScale,o=-e.zoomingPositionY/e.zoomScale,i=[r,o,e.stageComponentSize.width-(r+t),e.stageComponentSize.height-(o+n)];if(e.isSideways&&([t,n]=[n,t]),e.rotation){const t=e.rotation/90%4;for(let e=0;e{const t=RR.getInstance({name:e.name}),n={manager:t,control:e,object:e};return{afterAttach:function(){e.selectioncontrol&&t.addTool("MoveTool",SR.create({},n)),e.zoomcontrol&&t.addTool("ZoomPanTool",cR.create({},n)),e.brightnesscontrol&&t.addTool("BrightnessTool",pR.create({},n)),e.contrastcontrol&&t.addTool("ContrastTool",yR.create({},n)),e.rotatecontrol&&t.addTool("RotateTool",hR.create({},n)),function(){if(!e.store.task)return;const t=e.multiImage?e.parsedValueList:e.parsedValue;Array.isArray(t)?t.forEach(((t,n)=>{e.imageEntities.push({id:`${e.name}#${n}`,src:t,index:n})})):e.imageEntities.push({id:`${e.name}#0`,src:t,index:0}),e.setCurrentImage(0)}()},getToolsManager:function(){return t},afterResultCreated:function(t){t&&(t.classification||e.multiImage&&(null==t.setItemIndex||t.setItemIndex(e.currentImage)))}}})).extend((e=>{let t=!1;return{views:{getSkipInteractions(){var n;if((0,O.VS)(O.pG)){if(t)return!0;if(e.annotation.isLinkingMode)return!1;const n=e.getToolsManager().findSelectedTool();return!(null==n?void 0:n.canInteractWithRegions)}const r="ZoomPanTool"===(null==(n=e.getToolsManager().findSelectedTool())?void 0:n.toolName);return t||r}},actions:{setSkipInteractions(e){t=e},updateSkipInteractions(t){const n=e.getToolsManager().findSelectedTool();if(null!=n&&n.shouldSkipInteractions)return e.setSkipInteractions(n.shouldSkipInteractions(t));e.setSkipInteractions(t.evt&&(t.evt.metaKey||t.evt.ctrlKey))}}}})).actions((e=>({freezeHistory(){},afterRegionSelected(t){e.multiImage&&e.setCurrentImage(t.item_index)},createDrawingRegion(t,n,r,o){const i={from_name:e.annotation.names.get(r.name),to_name:e,type:r.resultType,value:n},a=Object.assign({id:E(),object:e},t,{results:[i],dynamic:o,item_index:e.currentImage});return e.drawingRegion=a,e.drawingRegion},deleteDrawingRegion(){const{drawingRegion:t}=e;t&&(e.drawingRegion=null,(0,h.zr)(t))},setSelectionStart(t){e.selectionArea.setStart(t)},setSelectionEnd(t){e.selectionArea.setEnd(t)},resetSelection(){e.selectionArea.setStart(null),e.selectionArea.setEnd(null)},updateBrushControl(t){e.brushControl=t},updateBrushStrokeWidth(t){e.brushStrokeWidth=t},setBrightnessGrade(t){e.brightnessGrade=t},setContrastGrade(t){e.contrastGrade=t},setGridSize(t){e.gridsize=String(t)},setCurrentItem(t=0){e.setCurrentImage(t)},setCurrentImage(t=0){var n;(t=null!=(n=t)?n:0)!==e.currentImage&&(e.currentImage=t,e.currentImageEntity=e.findImageEntity(t),(0,O.VS)(O.F2)&&e.preloadImages())},preloadImages(){if(e.currentImageEntity.setImageLoaded(!1),e.currentImageEntity.preload(),e.multiImage){const[t,n]=[e.currentImage,e.imageEntities.length],r=(0,w.clamp)(t-3,0,t),o=(0,w.clamp)(t+1+3,t,n-1);[...e.imageEntities.slice(r,t),...e.imageEntities.slice(t+1,o)].forEach((e=>{e.preload()}))}},setPointerPosition({x:t,y:n}){e.freezeHistory(),e.cursorPositionX=t,e.cursorPositionY=n},setZoom(t){t=(0,w.clamp)(t,1,Number.POSITIVE_INFINITY),e.currentZoom=t;const n=e.maxScale,r=e.coverScale;if(n>1?tn?(e.stageZoom=n,e.zoomScale=t):(e.stageZoom=t,e.zoomScale=1),e.zoomScale>1){const t=Math.min(n*e.zoomScale,r);e.containerWidth/e.naturalWidth>e.containerHeight/e.naturalHeight?(e.stageZoomX=t,e.stageZoomY=e.stageZoom):(e.stageZoomX=e.stageZoom,e.stageZoomY=t)}else e.stageZoomX=e.stageZoom,e.stageZoomY=e.stageZoom},updateImageAfterZoom(){const{stageWidth:t,stageHeight:n}=e;e._recalculateImageParams(),t===e.stageWidth&&n===e.stageHeight||e._updateRegionsSizes({width:e.stageWidth,height:e.stageHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight})},setZoomPosition(t,n){const[r,o]=(0,O.VS)(O.aT)?[e.canvasSize.width,e.canvasSize.height]:[e.containerWidth,e.containerHeight],[i,a]=[r-e.stageComponentSize.width*e.zoomScale,o-e.stageComponentSize.height*e.zoomScale];e.zoomingPositionX=(0,w.clamp)(t,i,0),e.zoomingPositionY=(0,w.clamp)(n,a,0)},resetZoomPositionToCenter(){const{stageComponentSize:t,zoomScale:n}=e,{width:r,height:o}=t,[i,a]=(0,O.VS)(O.aT)?[e.canvasSize.width,e.canvasSize.height]:[e.containerWidth,e.containerHeight];e.setZoomPosition((i-r*n)/2,(a-o*n)/2)},sizeToFit(){const{maxScale:t}=e;e.defaultzoom="fit",e.setZoom(t),e.updateImageAfterZoom(),e.resetZoomPositionToCenter()},sizeToOriginal(){const{maxScale:t}=e;e.defaultzoom="original",e.setZoom(t>1?1:1/t),e.updateImageAfterZoom(),e.resetZoomPositionToCenter()},sizeToAuto(){e.defaultzoom="auto",e.setZoom(1),e.updateImageAfterZoom(),e.resetZoomPositionToCenter()},handleZoom(t,n={x:e.canvasSize.width/2,y:e.canvasSize.height/2}){if(t){let r=e.currentZoom;if(r=t>0?r*e.zoomBy:r/e.zoomBy,!0!==e.negativezoom&&r<=1)return e.setZoom(1),e.setZoomPosition(0,0),void e.updateImageAfterZoom();if(r<=1)return e.setZoom(r),e.setZoomPosition(0,0),void e.updateImageAfterZoom();let o=e.zoomScale;const i={x:(n.x-e.zoomingPositionX)/o,y:(n.y-e.zoomingPositionY)/o};e.setZoom(r),o=e.zoomScale;const a={x:-(i.x-n.x/o)*o,y:-(i.y-n.y/o)*o};e.setZoomPosition(a.x,a.y),e.updateImageAfterZoom()}},setMode(t){e.mode=t},setImageRef(t){e.imageRef=t},setContainerRef(t){e.containerRef=t},setStageRef(t){e.stageRef=t;const n=e.getToolsManager().findSelectedTool();null==n||null==n.updateCursor||n.updateCursor()},setOverlayRef(t){e.overlayRef=t},setSelected(){},rotate(t=-90){e.rotation=(e.rotation+t+360)%360;let n=1/e.stageRatio;e.isSideways?e.stageRatio=e.naturalWidth/e.naturalHeight:e.stageRatio=1,n*=e.stageRatio,e.setZoom(e.currentZoom),-90===t&&this.setZoomPosition(e.zoomingPositionY*n,e.stageComponentSize.height-e.zoomingPositionX*n-e.stageComponentSize.height*e.zoomScale),90===t&&this.setZoomPosition(e.stageComponentSize.width-e.zoomingPositionY*n-e.stageComponentSize.width*e.zoomScale,e.zoomingPositionX*n),e.updateImageAfterZoom()},_recalculateImageParams(){e.stageWidth=(0,O.VS)(O.aT)?e.naturalWidth*e.stageZoom:Math.round(e.naturalWidth*e.stageZoom),e.stageHeight=(0,O.VS)(O.aT)?e.naturalHeight*e.stageZoom:Math.round(e.naturalHeight*e.stageZoom)},_updateImageSize({width:t,height:n,userResize:r}){if(void 0!==e.naturalWidth){if(t>1&&n>1){const r=e.canvasSize.width,o=e.canvasSize.height,i=e.stageZoom,a=e.zoomScale;e.containerWidth=t,e.containerHeight=n,e.setZoom(e.currentZoom),e._recalculateImageParams();const s=e.stageZoom/i*(e.zoomScale/a);e.setZoomPosition(e.zoomingPositionX*s+(e.canvasSize.width/2-r/2*s),e.zoomingPositionY*s+(e.canvasSize.height/2-o/2*s))}e.sizeUpdated=!0,e._updateRegionsSizes({width:e.stageWidth,height:e.stageHeight,naturalWidth:e.naturalWidth,naturalHeight:e.naturalHeight,userResize:r})}},_updateRegionsSizes({width:t,height:n,naturalWidth:r,naturalHeight:o,userResize:i}){var a,s;const l=null==(a=e.annotation)||null==(a=a.history)||null==(a=a.history)?void 0:a.length;e.annotation.history.freeze(),e.regions.forEach((e=>{e.updateImageSize(t/r,n/o,t,n,i)})),e.regs.forEach((e=>{e.updateImageSize(t/r,n/o,t,n,i)})),null==(s=e.drawingRegion)||s.updateImageSize(t/r,n/o,t,n,i),setTimeout(e.annotation.history.unfreeze,0),l<=1&&setTimeout((()=>{var t;return null==(t=e.annotation)?void 0:t.reinitHistory(!1)}),0)},updateImageSize(t){var n;const{naturalWidth:r,naturalHeight:o}=null!=(n=e.imageRef)?n:t.target,{offsetWidth:i,offsetHeight:a}=e.containerRef;e.naturalWidth=r,e.naturalHeight=o,e._updateImageSize({width:i,height:a}),e.setReady(!0),"fit"===e.defaultzoom?e.sizeToFit():e.sizeToAuto(),setTimeout((()=>{var t;return null==(t=e.annotation)?void 0:t.reinitHistory(!1)}),0)},checkLabels(){let t;t=(0,O.VS)(O.Zr)?e.activeStates()||[]:(e.states()||[]).filter((e=>e.type.includes("labels")));return 0!==e.getAvailableStates().length||0===t.length},addShape(t){e.regions.push(t),e.annotation.addRegion(t),e.setSelected(t.id),t.selectRegion()},onResize(t,n,r){e._updateImageSize({width:t,height:n,userResize:r})},event(t,n,r,o){const[i,a]=e.fixZoomedCoords([r,o]),s=e.canvasToInternalX(i),l=e.canvasToInternalY(a);e.getToolsManager().event(t,n.evt||n,s,l,i,a)}}))),zR=h.gK.model().actions((e=>({fixZoomedCoords([t,n]){if(!e.stageRef)return[t,n];const r=e.stageRef.getAbsoluteTransform().copy().invert().point({x:t,y:n});return[r.x,r.y]},zoomOriginalCoords([t,n]){const r=e.stageRef.getAbsoluteTransform().point({x:t,y:n});return[r.x,r.y]},fixForZoom(e){return t=>this.fixForZoomWrapper(t,e)},fixForZoomWrapper(t,n){const r=void 0===t.x,[o,i]=e.fixZoomedCoords(r?t:[t.x,t.y]),a=n(r?[o,i]:{x:o,y:i}),s=e.zoomOriginalCoords(r?a:[a.x,a.y]);return r?s:{x:s[0],y:s[1]}}}))).views((e=>({get whRatio(){return(0,O.VS)(O.MV)?e.stageWidth/e.stageHeight:1},canvasToInternalX:t=>t/e.stageWidth*Ye,canvasToInternalY:t=>t/e.stageHeight*Xe,internalToCanvasX:t=>t/Ye*e.stageWidth,internalToCanvasY:t=>t/Xe*e.stageHeight}))),BR=zR.views((()=>({canvasToInternalX:e=>e,canvasToInternalY:e=>e,internalToCanvasX:e=>e,internalToCanvasY:e=>e}))),HR=h.gK.compose("ImageModel",MR,bn,...(0,O.VS)(O.gF)?[LR]:[],Pe,Me,TR,VR,(0,O.VS)(O.MV)?zR:BR),FR=(0,y.WQ)("store")(vk);x.addTag("image",HR,FR),x.addObjectType(HR);var WR=n(7976),$R=n.n(WR);const UR=h.gK.model().views((()=>({}))).actions((e=>({updateSpansColor(t,n){e._spans&&e._spans.forEach((e=>{t&&(e.style.backgroundColor=t),n&&(e.style.backgroundColor=rn.Colors.rgbaChangeAlpha(e.style.backgroundColor,n))}))},updateAppearenceFromState(){const t=e.getLabelColor();e.updateSpansColor(t,e.selected?.8:.3),e.applyCSSClass(e._lastSpan)},createSpans(){const t=e.getLabelColor(),n=(0,je.highlightRange)(e,"htx-highlight",{backgroundColor:t}),r=n[n.length-1];if(r)return e.applyCSSClass(r),e._lastSpan=r,e._spans=n,n},getLabelColor(){let t=e.parent.highlightcolor||(e.style||e.tag||V.l).fillcolor;return t&&(t=rn.Colors.convertToRGBA(t,.3)),t},applyCSSClass(t){if(!t)return;const n=["htx-highlight","htx-highlight-last"],r=(0,h.Zn)(e).settings;if(e.parent.showlabels||r.showLabels){var o;const r=null==(o=e.labeling)?void 0:o.mainValue,i=rn.HTML.labelWithCSS(t,{index:e.region_index,labels:r,score:e.score});n.push(i)}else n.push("htx-no-label");t.className=n.filter(Boolean).join(" ")},addEventsToSpans(t){const n=t=>(t.onmouseover=n=>{e.hidden||(e.annotation.isLinkingMode?(e.toggleHighlight(),t.style.cursor=V.A.LINKING_MODE_CURSOR,n.stopPropagation()):t.style.cursor=V.A.POINTER_CURSOR)},t.onmouseout=()=>{e.hidden||e.setHighlight(!1)},t.onmousedown=function(t){e.hidden||e.parent._currentSpan!==this&&(t.stopPropagation(),e.parent._currentSpan=this)},t.onclick=function(){e.hidden||e.parent._currentSpan===this&&(t.style.cursor=V.A.POINTER_CURSOR,e.onClickRegion())},!1);t&&t.forEach((e=>n(e)))},selectRegion(){e.updateSpansColor(null,.8);const t=e._spans[0];t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView({block:"center",behavior:"smooth"}))},afterUnselectRegion(){e.updateSpansColor(null,.3)},setHighlight(t){if(e._highlighted=t,e._spans){const t=e._spans.length,n=e._spans[0],r=e._spans[t-1],o=e._spans.slice(1,t-1),i=(e,t,{top:n=!0,bottom:r=!0,right:o=!0,left:i=!0}={})=>{o&&(e.style.borderRight=t),i&&(e.style.borderLeft=t),n&&(e.style.borderTop=t),r&&(e.style.borderBottom=t)};if(e.highlighted&&!e.hidden){const e=V.A.HIGHLIGHTED_CSS_BORDER;i(n,e,{right:!1}),i(r,e,{left:!1}),o.length&&o.forEach((t=>i(t,e,{left:!1,right:!1})))}else{const e="0px";i(n,e),i(r,e),o.length&&o.forEach((t=>i(t,e,{left:!1,right:!1})))}}},toggleHidden(t){e.hidden=!e.hidden,e.setHighlight(e.highlighted),e.hidden?(e.updateSpansColor("transparent",0),e._spans&&e._spans.forEach((e=>{e.style.cursor=V.A.DEFAULT_CURSOR}))):e.updateAppearenceFromState(),null==t||t.stopPropagation()},find:t=>e._spans&&e._spans.indexOf(t)>=0?e:void 0}))),ZR=h.gK.model("LabelMixin"),GR=h.gK.model().volatile((()=>({isSeparated:!1}))).views((e=>({get tiedChildren(){return D.filterChildrenOfType(e,e._child)},get selectedLabels(){return e.tiedChildren.filter((e=>!0===e.selected))},getSelectedColor(){const t=e.tiedChildren.find((e=>!0===e.selected));return t&&t.background},get selectedColor(){const t=e.tiedChildren.find((e=>!0===e.selected));return t&&t.background},get isSelected(){return e.selectedLabels.length>0},get holdsState(){return e.selectedLabels.length>0},selectedValues:()=>e.selectedLabels.map((e=>e.alias?e.alias:e.value)).filter((e=>(0,w.isDefined)(e))),getResultValue:()=>({[e.valueType]:e.selectedValues()}),get selectedAliases(){return e.selectedLabels.filter((e=>e.alias)).map((e=>e.alias))},getSelectedString:(t=" ")=>e.selectedValues().join(t),findLabel:t=>e.tiedChildren.find((e=>e.alias===t&&(0,w.isDefined)(t)||e.value===t||!(0,w.isDefined)(e.value)&&!(0,w.isDefined)(t))),get emptyLabel(){return e.allowempty?e.findLabel(null):null}}))).actions((e=>({unselectAll(){e.tiedChildren.forEach((e=>e.setSelected(!1)))},checkMaxUsages(){if((0,O.VS)(O.Zr))return e.tiedChildren.filter((e=>!e.canBeUsed()));const t=e.tiedChildren.filter((e=>!e.canBeUsed()));return t.length&&t.forEach((e=>e.setSelected(!1))),t},selectFirstVisible(){const t=e.tiedChildren.find((e=>e.visible));return t&&t.toggleSelected(),t},updateFromResult(t){e.unselectAll();const n=Array.isArray(t)?t.length?t:[null]:[t];if(n.length)n.map((t=>e.findLabel(t))).forEach((e=>null==e?void 0:e.setSelected(!0)));else if(e.allowempty){var r;null==(r=e.findLabel(null))||r.setSelected(!0)}}}))),YR=GR,XR=h.gK.model({}).views((()=>({get defaultChildType(){console.error("DynamicChildrenMixin needs to implement defaultChildType getter in views")}}))).actions((e=>{const t=(n,r,o)=>{if(n&&n.length)for(const i of n){o.children.push(Object.assign({type:e.defaultChildType},i,{children:[]}));const n=o.children[o.children.length-1];null==n.updateValue||n.updateValue(r),t(i.children,r,n)}},n=(e,t)=>{null==e||e.forEach((e=>{n(e.children,t),null==e.updateValue||e.updateValue(t)}))};return{updateWithDynamicChildren(n,r){var o;const i=(0,h.Zn)(e);e.children=null!=(o=e.children)?o:[],(0,h.Ze)(i),t(n,r,e),(0,h.yQ)(i)},updateValue(t){setTimeout((()=>{e.updateDynamicChildren(t)}))},updateDynamicChildren(t){if(!0!==e.locked){var n;const r=j(e.value,null==(n=t.task)?void 0:n.dataObj);if(!r)return;e.updateWithDynamicChildren(r,t),e.annotation&&(e.annotation.setupHotKeys(),null==e.needsUpdate||e.needsUpdate())}},generateDynamicChildren(t,r){if(e.children){const o=e.children,i=o.length,a=i-t.length,s=o.slice(a,i);n(s,r)}}}})),qR=h.gK.compose(ze,XR),JR=h.gK.model(Object.assign({},(0,O.VS)(O.cE)?{id:h.gK.identifier,name:h.gK.string}:{name:h.gK.identifier},{smart:!0,smartonly:!1,isControlTag:!0})).volatile((()=>({snapMode:qe}))).views((e=>({get resultType(){return e.type},get valueType(){return e.type},get toNameTag(){return e.annotation.names.get(e.toname)},selectedValues(){throw new Error("Control tag needs to implement selectedValues method in views")},get result(){return e.annotation.results.find((t=>t.from_name===e))},getSnappedPoint:t=>"pixel"===e.snap?e.toNameTag.snapPointToPixel(t,e.snapMode):t,get smartEnabled(){var t,n,r;const o=null!=(t=e.smart)&&t;return null!=(n=null==(r=(0,h.Zn)(e))?void 0:r.autoAnnotation)&&n&&o||e.smartonly||!1}}))),QR=h.gK.compose(JR,vn),eE=["className","style","color","empty","hidden","selected","margins","onClick","children","hotkey"],tE=p.forwardRef(((e,t)=>{let{className:n,style:r,color:o,empty:i=!1,hidden:a=!1,selected:s=!1,margins:l=!1,onClick:c,children:d,hotkey:u}=e,h=(0,Yn.A)(e,eE);const g=(0,p.useMemo)((()=>{if(!o)return null;const e=pt()(o).alpha(.15);return Object.assign({},null!=r?r:{},nn({color:o,background:e}))}),[o]);return(0,_.jsxs)(Ze.eB,Object.assign({tag:"span",ref:t,name:"label",mod:{empty:i,hidden:a,selected:s,clickable:!!c,margins:l},mix:n,style:g,onClick:c},h,{children:[(0,_.jsx)(Ze.Sl,{tag:"span",name:"text",children:d}),u?(0,_.jsx)(Ze.Sl,{tag:"span",name:"hotkey",children:u}):null]}))})),nE=h.gK.model("AnnotationMixin",{parentTypes:Te.tagsTypes([])}).views((e=>({get parent(){return Te.getParentTagOfTypeString(e,e.parentTypes)}}))),rE=h.gK.model(Object.assign({value:h.gK.maybeNull(h.gK.string),selected:h.gK.optional(h.gK.boolean,!1),maxusages:h.gK.maybeNull(h.gK.string),alias:h.gK.maybeNull(h.gK.string),hint:h.gK.maybeNull(h.gK.string),hotkey:h.gK.maybeNull(h.gK.string),showalias:h.gK.optional(h.gK.boolean,!1),aliasstyle:h.gK.optional(h.gK.string,"opacity: 0.6"),size:h.gK.optional(h.gK.string,"medium"),background:h.gK.optional(Re.color,V.A.LABEL_BACKGROUND),selectedcolor:h.gK.optional(Re.color,"#ffffff"),granularity:h.gK.maybeNull(h.gK.enumeration(["symbol","word","sentence","paragraph"])),groupcancontain:h.gK.maybeNull(h.gK.string)},(0,O.VS)(O.bT)?{html:h.gK.maybeNull(h.gK.string)}:{})),oE=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"label",visible:h.gK.optional(h.gK.boolean,!0),_value:h.gK.optional(h.gK.string,""),parentTypes:Te.tagsTypes(["Labels","EllipseLabels","RectangleLabels","PolygonLabels","KeyPointLabels","BrushLabels","HyperTextLabels","TimelineLabels","TimeSeriesLabels","ParagraphLabels"])}).volatile((e=>({initiallySelected:e.selected,isEmpty:!1}))).views((e=>({get maxUsages(){var t;return Number(e.maxusages||(null==(t=e.parent)?void 0:t.maxusages))},usedAlready:()=>e.annotation.regionStore.regions.reduce(((t,n)=>t+n.hasLabel(e.value)),0),canBeUsed:(t=1)=>!e.maxUsages||e.usedAlready()+t<=e.maxUsages}))).actions((e=>({setEmpty(){e.isEmpty=!0},toggleSelected(){let t=[];e.annotation.selectedDrawingRegions.length>0?t=e.annotation.selectedDrawingRegions.filter((t=>{var n,r;return(null==(n=t.parent)?void 0:n.name)===(null==(r=e.parent)?void 0:r.toname)})):e.annotation.selectedRegions.length>0&&(t=e.annotation.selectedRegions.filter((t=>{var n,r;return(null==(n=t.parent)?void 0:n.name)===(null==(r=e.parent)?void 0:r.toname)})));const n=t.filter((e=>!e.isReadOnly()));if(e.annotation.isReadOnly())return;if(t.length>0&&0===n.length)return;if(n.length&&!e.selected&&!e.canBeUsed(n.filter((e=>e.results)).length))return void fn.warning(`You can't use ${e.value} more than ${e.maxUsages} time(s)`);const r=e.parent,o=n.filter((t=>!(1===r.selectedLabels.length&&e.selected&&1===t.labelings.length&&(null==r||!r.allowempty||e.isEmpty))&&(!!e.selected||("labels"===r.type||(!!r.type.includes(t.type.replace(/region$/,""))||!!r.type.includes(t.results[0].type))))));if(!(t.length>0&&0===o.length)){if(!r.selectedLabels.length&&!e.selected){var i,a,s;e.annotation.toNames.get(r.toname).filter((e=>e.type&&e.type.endsWith("labels")&&e.name!==r.name));const t=RR.getInstance({name:e.parent.toname}),n=Object.values((null==(i=e.parent)?void 0:i.tools)||{})[0],o=t.findSelectedTool(),l=!(!n||!o)&&(0,h.Pw)(o).name===(0,h.Pw)(n).name,c=!!o&&(null==n||null==(a=n.control)?void 0:a.name)===(null==o||null==(s=o.control)?void 0:s.name);!n||!(o&&(!l||!c))&&o||t.selectTool(n,!0)}if(e.isEmpty){const t=e.selected;r.unselectAll(),e.setSelected(!t)}else r.shouldBeUnselected||e.setSelected(!e.selected),r.shouldBeUnselected&&(e.selected?r.unselectAll():(r.unselectAll(),e.setSelected(!e.selected)));var l;if(r.allowempty&&!e.isEmpty)if(o.length)r.findLabel().setSelected(!(null!=(l=r.selectedValues())&&l.length));else e.selected&&r.findLabel().setSelected(!1);o.forEach((t=>{t&&(t.setValue(e.parent),t.notifyDrawingFinished(),null==t.updateSpans||t.updateSpans())}))}},setVisible(t){e.visible=t},setSelected(t){e.selected=t},onHotKey:()=>e.onLabelInteract(),onClick:()=>(e.onLabelInteract(),!1),onLabelInteract:()=>e.toggleSelected(),_updateBackgroundColor(t){e.background===V.A.LABEL_BACKGROUND&&(e.background=$R().make_color({seed:t})[0])},afterCreate(){e._updateBackgroundColor(e._value||e.value)},updateValue(t){e._value=j(e.value,t.task.dataObj)||V.A.EMPTY_LABEL}}))),iE=h.gK.compose("LabelModel",nE,rE,ze,oE,Pe),aE=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{const n=(t.settings.enableTooltips||t.settings.enableLabelTooltips)&&t.settings.enableHotkeys&&e.hotkey,r=(0,_.jsxs)(tE,{color:e.background,margins:!0,empty:e.isEmpty,hotkey:n,hidden:!e.visible,selected:e.selected,onClick:e.onClick,children:[e.html?(0,_.jsx)("div",{title:e._value,dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(e.html)}}):e._value,!0===e.showalias&&e.alias&&(0,_.jsxs)("span",{style:rn.styleToProp(e.aliasstyle),children:[" ",e.alias]})]});return e.hint?(0,_.jsx)(ir,{title:e.hint,children:r}):r})));x.addTag("label",iE,aE);const sE=h.gK.model({toname:h.gK.maybeNull(h.gK.string),choice:h.gK.optional(h.gK.enumeration(["single","multiple"]),"single"),maxusages:h.gK.maybeNull(h.gK.string),showinline:h.gK.optional(h.gK.boolean,!0),groupdepth:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.2"),fillcolor:h.gK.optional(Re.color,"#f48a42"),strokewidth:h.gK.optional(h.gK.string,"1"),strokecolor:h.gK.optional(Re.color,"#f48a42"),fillopacity:h.gK.maybeNull(Re.range()),allowempty:h.gK.optional(h.gK.boolean,!1),value:h.gK.optional(h.gK.string,"")}),lE=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"labels",children:Te.unionArray(["label","header","view","text","hypertext","richtext"]),visible:h.gK.optional(h.gK.boolean,!0)}),cE=ZR.views((e=>({get shouldBeUnselected(){return"single"===e.choice},get defaultChildType(){return"label"},get isLabeling(){return!0}}))).actions((e=>({afterCreate(){if(e.allowempty){let t=e.findLabel(null);if(!t){const n={value:null,type:"label",background:V.l.fillcolor};e.children?e.children.unshift(n):e.children=(0,h.wg)([n]),t=e.children[0]}t.setEmpty()}}}))),dE=h.gK.compose("LabelsModel",QR,lE,sE,Pe,qR,cE,YR.props({_child:"LabelModel"})),uE=(0,y.PA)((({item:e})=>(0,_.jsx)(Ze.eB,{name:"labels",mod:{hidden:!e.visible,inline:e.showinline},children:D.renderChildren(e,e.annotation)})));x.addTag("labels",dE,uE);const hE=h.gK.model("ParagraphLabelsModel",{pid:h.gK.optional(h.gK.string,E),type:"paragraphlabels",children:Te.unionArray(["label","header","view","hypertext"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get serializableValue(){const t={};return t.paragraphlabels=e.selectedValues(),t}}))),gE=ZR.props({_type:"paragraphlabels"}),mE=h.gK.compose(QR,dE,hE,gE,YR.props({_child:"LabelModel"})),pE=h.gK.compose("ParagraphLabelsModel",mE),fE=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("paragraphlabels",pE,fE);var vE=n(92806),yE=n(47956),bE=n(33250),xE=function(e){return e[e.inertial=0]="inertial",e[e.instant=1]="instant",e}(xE||{});const wE=500,CE=h.gK.model({leadTime:0}).volatile((()=>({leadTimeLogic:xE.inertial,lastRecordedTime:0,debouncedTime:0}))).actions((e=>({_countTimeInertial(){const t=Date.now();e.debouncedTimee.lastRecordedTime&&(e.leadTime+=t-e.lastRecordedTime,e.lastRecordedTime=t),e.debouncedTime=t+wE}}))).actions((e=>({countTime(){e.leadTimeLogic===xE.inertial?e._countTimeInertial():e.leadTimeLogic===xE.instant&&e._countTimeInstant()},resetLeadTimeCounters(){e.lastRecordedTime=0,e.debouncedTime=0}}))),SE=h.gK.model({peritem:h.gK.optional(h.gK.boolean,!1)}).extend((e=>{if(!0!==e.isClassificationTag)throw new Error("The PerItemMixin mixin should be used only for classification control-tags");return{}})).views((e=>({get _perItemResult(){return e.annotation.results.find((t=>t.from_name===e&&t.area.item_index===e.toNameTag.currentItemIndex))}}))).actions((e=>({_validatePerItem(){const t=e.toNameTag;return e.annotation.regions.every((n=>{const r=n.results.find((t=>t.from_name===e));if(null==r||!r.hasValue)return!0;const o=r.mainValue;return!!e.validateValue(o)||(t.setCurrentItem(n.item_index),!1)}))},createPerItemResult(){e.createPerObjectResult({item_index:e.toNameTag.currentItemIndex})}}))),jE=SE,kE=h.gK.model({required:h.gK.optional(h.gK.boolean,!1),requiredmessage:h.gK.maybeNull(h.gK.string)}).actions((e=>{const t={validate:e.validate};return{validate(){if(!t.validate())return!1;if(!e.required)return!0;if(e.perregion){const t=e.toNameTag;for(const r of t.allRegs){const t=r.results.find((t=>t.from_name===e));if("region-selected"===e.visiblewhen&&e.whentagname){var n;const t=null==(n=r.labeling)||null==(n=n.from_name)?void 0:n.name;if(t&&t!==e.whentagname)continue}if((!e.whenlabelvalue||r.hasLabel(e.whenlabelvalue))&&(null==t||!t.hasValue))return e.annotation.selectArea(r),e.requiredModal(),!1}}else if((0,O.VS)(O.gF)&&e.peritem){const t=e.toNameTag,n=t.maxItemIndex,r=e.annotation.regions.reduce(((t,n)=>{const r=n.results.find((t=>t.from_name===e));return null!=r&&r.hasValue&&t.add(n.item_index),t}),new Set);for(let o=0;o<=n;o++)if(!r.has(o))return t.setCurrentItem(o),e.requiredModal(),!1}else{var r;if(!e.holdsState&&!1!==e.isVisible&&!1!==(null==(r=(0,h.PA)(e,2))?void 0:r.isVisible))return e.requiredModal(),!1}return!0}}})),OE=kE,RE="lsf-mark",EE="lsf-selected",_E="lsf-highlighted",AE="lsf-relation";var TE=n(6757),PE=n(39984);const IE={input:"input--GGvVi",editing:"editing--TQ89C",enter:"enter--FWKNX",delete:"delete--hGoXe"},LE=["className","rows","onlyEdit","name","onFocus","onChange","onDelete","isEditable","isDeleteable","ignoreShortcuts"],ME=["onChange","onDelete","isEditable","isDeleteable","text","ignoreShortcuts","onlyEdit"],{Paragraph:KE}=TE.A;class DE extends p.Component{constructor(...e){super(...e),this.state={editing:!1,height:0,value:this.props.text},this.textRef=p.createRef(),this.inputRef=p.createRef(),this.handleGlobalClick=e=>{var t;const n=null==e?void 0:e.target,r=null==n||null==(t=n.dataset)?void 0:t.shortcut;!this.state.editing||this.props.ignoreShortcuts&&r||n===this.inputRef.current||this.setEditing(!1)},this.startEditing=()=>{var e,t,n;const r=(null==(e=this.textRef.current)?void 0:e.parentNode.offsetHeight)||0;this.setState({editing:!0,height:r}),null==(t=(n=this.props).onStartEditing)||t.call(n),setTimeout(this.focus)},this.focus=()=>{const e=this.inputRef.current;e&&(e.selectionStart=this.state.value.length)},this.setEditing=e=>{this.setState({editing:e})},this.setValue=e=>{this.setState({value:e})},this.cancel=()=>{this.setValue(this.props.text),this.setEditing(!1)},this.save=()=>{this.props.onChange(this.state.value),this.setEditing(!1)},this.updateHeight=In()((()=>{var e,t;const n=null!=(e=null==(t=this.inputRef.current)?void 0:t.scrollHeight)?e:0,r=n+2;n&&r!==this.state.height&&this.setState({height:r})}),100)}static getDerivedStateFromProps(e,t){return e.text!==t.prevPropsText?{value:e.text,prevPropsText:e.text}:null}componentDidMount(){window.addEventListener("click",this.handleGlobalClick,{capture:!0})}componentWillUnmount(){window.removeEventListener("click",this.handleGlobalClick,{capture:!0})}renderEdit(){const e=this.props,{className:t="",rows:n=1,onlyEdit:r,name:o,onFocus:i,onChange:a}=e,s=(0,Yn.A)(e,LE),{height:l,value:c}=this.state,d={name:o,className:`ant-input ${IE.input}`,style:l?{height:l,borderWidth:1}:null,autoFocus:!0,ref:this.inputRef,value:c,onBlur:()=>{a(this.state.value)},onFocus:i,onChange:e=>{this.setValue(e.target.value),this.updateHeight()},onKeyDown:e=>{const{key:t,shiftKey:r}=e;"Enter"===t?(1==+n||r)&&(e.preventDefault(),e.stopPropagation(),this.save()):"Escape"===t?this.cancel():"Tab"===t&&this.setEditing(!1)}};return this.updateHeight(),(0,_.jsxs)(KE,Object.assign({},s,{className:`${t} ant-typography-edit-content ${IE.editing}`,children:[n>1?(0,_.jsx)("textarea",Object.assign({},d)):(0,_.jsx)("input",Object.assign({},d)),!r&&(0,_.jsx)(ir,{title:"Save: [shift+enter]",children:(0,_.jsx)(PE.A,{className:`ant-typography-edit-content-confirm ${IE.enter}`,onClick:this.save})})]}))}renderView(){const e=this.props,{onChange:t,onDelete:n,isEditable:r,isDeleteable:o,text:i}=e,a=(0,Yn.A)(e,ME);return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(KE,Object.assign({},a,{children:(0,_.jsx)("span",{ref:this.textRef,children:i})})),r&&t&&(0,_.jsx)(za,{type:"text",className:IE.button,tooltip:"Edit",tooltipTheme:"Dark",style:{padding:0},icon:(0,_.jsx)(gy,{}),"aria-label":"Edit Region",onClick:this.startEditing}),o&&n&&(0,_.jsx)(za,{type:"text",look:"danger",className:IE.button,tooltip:"Delete",tooltipTheme:"Dark",style:{padding:0},icon:(0,_.jsx)(sf,{}),"aria-label":"Delete Region",onClick:n})]})}render(){return(this.state.editing||this.props.onlyEdit)&&this.props.isEditable?this.renderEdit():this.renderView()}}const NE=h.gK.model("TextAreaRegionModel",{id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"textarearegion",_value:h.gK.string}).volatile((()=>({classification:!0,perRegionTags:[],results:[],selected:!1}))).views((e=>({get parent(){return(0,h.k2)(e,YE)},getRegionElement:()=>document.querySelector(`#TextAreaRegion-${e.id}`),getOneColor:()=>null}))).actions((e=>({setValue(t){(!(0,O.VS)(O.q_)||e._value!==t&&e.parent.validateText(t))&&(e._value=t,e.parent.onChange())},deleteRegion(){e.parent.remove(e)},selectRegion(){e.selected=!0},afterUnselectRegion(){e.selected=!1}}))),VE=h.gK.compose("TextAreaRegionModel",it,We,NE),zE=(0,y.PA)((({item:e,onFocus:t})=>{var n;const r=[RE],o={onFocus:n=>t(n,e)},{parent:i}=e,{relationMode:a}=e.annotation,s=i.isEditable&&!e.isReadOnly(),l=i.isDeleteable&&!e.isReadOnly();a&&r.push(AE),e.selected?r.push(EE):e.highlighted&&r.push(_E),(s||i.transcription)&&(o.onChange=t=>{e.setValue(t),e.parent.updateLeadTime()},o.onInput=()=>{e.parent.countTime()}),o.onDelete=e.deleteRegion;let c={};i.perregion||(c={onMouseOver:()=>{a&&e.setHighlight(!0)},onMouseOut:()=>{a&&e.setHighlight(!1)}});const d=`${null!=(n=null==i?void 0:i.name)?n:""}:${e.id}`;return(0,_.jsx)("div",Object.assign({},c,{className:(0,Ze.cn)("row").toString(),"data-testid":"textarea-region",children:(0,_.jsx)(DE,Object.assign({isEditable:s,isDeleteable:l,onlyEdit:i.transcription,id:`TextAreaRegion-${e.id}`,name:d,className:r.join(" "),rows:i.rows,text:e._value},o,{ignoreShortcuts:!0}))}))}));x.addTag("textarearegion",VE,zE);const BE=h.gK.model("ClassificationBase",{isClassificationTag:!0}).extend((e=>{if(!0!==e.isControlTag)throw new Error("The ClassificationBase mixin should be used only for ControlTags");const t=["toname"].filter((t=>!e.$treenode.type.propertyNames.includes(t)));for(const e of t)throw new Error(`The property "${e}" should be defined for ClassificationBase mixin model needs`);return{}})).volatile((()=>({elementRef:p.createRef()}))).views((e=>({selectedValues(){throw new Error("ClassificationBase mixin model needs to implement selectedValues method in views")},get result(){return e.perregion?e._perRegionResult:e.peritem?e._perItemResult:e.annotation.results.find((t=>t.from_name===e))}}))).actions((e=>({validate:()=>e.perregion?e._validatePerRegion():e.peritem&&(0,O.VS)(O.gF)?e._validatePerItem():e._validatePerObject(),validateValue:e=>!0,_validatePerObject:()=>e.validateValue(e.selectedValues()),createPerObjectResult(t={}){e.annotation.createResult(t,{[e.valueType]:e.selectedValues()},e,e.toname)},updateResult(){e.result?e.result.area.setValue(e):e.perregion?null==e.createPerRegionResult||e.createPerRegionResult():e.peritem?e.createPerItemResult():e.createPerObjectResult()}}))),{TextArea:HE}=bE.A,FE=(0,p.forwardRef)((({idx:e,value:t,readOnly:n,onChange:r,onDelete:o,onFocus:i,validate:a,control:s,collapsed:l},c)=>{const d=Number.parseInt(s.rows)>1,[u,h]=(0,p.useState)(null!=t?t:"");(0,O.VS)(O.q_)&&(0,p.useEffect)((()=>{t!==u&&h(t)}),[t]);const g=(0,p.useMemo)((()=>{var e;return l?null!=(e=(null!=t?t:"").split(/\n/)[0])?e:"":(0,O.VS)(O.q_)?u:t}),[t,l,...(0,O.VS)(O.q_)?[u]:[]]),m=(0,O.VS)(O.q_)?(0,p.useCallback)((e=>{h(e.target.value)}),[]):t=>{l||r(e,t.target.value)},f=(0,p.useCallback)((n=>{t===n.target.value||l||(a&&!a(n.target.value)?h(t):null==r||r(e,n.target.value))}),[e,t,r,a,l]),v={className:`ant-input ${IE.input}`,value:g,autoSize:d?{minRows:1}:null,onChange:m,readOnly:n||l,onFocus:i};return(0,O.VS)(O.q_)&&(v.onBlur=f),((0,O.VS)(O.q_)||d)&&(v.onKeyDown=e=>{var t;("Enter"===e.key&&!e.shiftKey||"Escape"===e.key)&&(e.preventDefault(),e.stopPropagation(),null==(t=e.target)||null==t.blur||t.blur())}),(0,_.jsxs)(Ze.Sl,{name:"item",children:[(0,_.jsx)(Ze.Sl,Object.assign({name:"input",tag:d?HE:bE.A},v,{ref:c})),!l&&!n&&(0,_.jsx)(Ze.Sl,{name:"action","aria-label":"Delete Region",tag:vE.default,icon:(0,_.jsx)(bs,{}),size:"small",type:"text",onClick:()=>{o(e)}})]})})),WE=(0,y.PA)((({item:e,control:t,firstResultInputRef:n,onFocus:r,collapsed:o})=>{const i=e.mainValue,a=!e.isReadOnly()&&e.from_name.editable&&!e.area.isReadOnly(),s=(0,p.useCallback)(((t,n)=>{if(e.from_name.isReadOnly())return;const r=i.toJSON();r.splice(t,1,n),e.setValue(r)}),[i]),l=(0,p.useCallback)((t=>{if(!e.from_name.isDeleteable)return;const n=i.toJSON();n.splice(t,1),e.setValue(n)}),[i]);return i.map(((i,c)=>(0,_.jsx)(FE,{idx:c,value:i,readOnly:!a,onChange:s,onDelete:l,control:t,ref:0===c?n:null,onFocus:r,collapsed:o,validate:(0,O.VS)(O.q_)?e.from_name.validateText:null},c)))})),$E=(0,y.PA)((({item:e,area:t,collapsed:n,setCollapsed:r,outliner:o,color:i})=>{var a,s;const l=Number.parseInt(e.rows),c=l>1,d=e.perRegionArea===t,u=t.isCompleted&&t.perRegionFocusTarget===e&&t.perRegionFocusRequest,g=d?e._value:"",m=t.results.find((t=>t.from_name===e)),f=(0,p.useCallback)((()=>{n&&(r(!1),t.isSelected||t.annotation.selectArea(t))}),[n]),v=(0,p.useCallback)((()=>{m?(e.addTextToResult(e._value,m),e.setValue("")):(e.addText(e._value),e.setValue(""))}),[e,m]),y=(0,p.useRef)(),b=(0,p.useRef)(),x=(0,p.useRef)(0),w=(0,p.useMemo)((()=>i?{"--border-color":i}:{}),[i]);(0,p.useEffect)((()=>{var e;d&&u&&x.current{n&&e._value&&v()}),[n]);const C={ref:y,value:g,rows:e.rows,className:"is-search",label:e.label,placeholder:e.placeholder,autoSize:c?{minRows:1}:null,onChange:t=>{if(n)return;const{value:r}=t.target;e.setValue(r)},onFocus:e=>{e.stopPropagation(),e.preventDefault(),t.isSelected||t.annotation.selectArea(t)}};c&&(C.onKeyDown=t=>{var n;("Enter"!==t.key||t.shiftKey)&&"Escape"!==t.key||e.annotation.isReadOnly()||(t.preventDefault(),t.stopPropagation(),e.allowsubmit&&e._value?v():null==(n=t.target)||null==n.blur||n.blur())}),e.annotation.isReadOnly()&&(C.disabled=!0);!e.annotation.isReadOnly()&&(a=e.showsubmitbutton);const S=(!m||!(null!=m&&null!=(s=m.mainValue)&&s.length)||e.maxsubmissions&&m.mainValue.length(e.allowsubmit&&e._value&&!e.annotation.isReadOnly()&&v(),!1),onClick:e=>{e.stopPropagation()},children:(0,_.jsx)(Ze.Sl,Object.assign({name:"input",tag:c?HE:bE.A},C,{onClick:e=>{e.stopPropagation()}}))})]}):null}));x.addPerRegionView("textarea",lt.REGION_LIST,$E);const{TextArea:UE}=bE.A,ZE=h.gK.model(Object.assign({toname:h.gK.maybeNull(h.gK.string),allowsubmit:h.gK.optional(h.gK.boolean,!0),label:h.gK.optional(h.gK.string,""),value:h.gK.maybeNull(h.gK.string),rows:h.gK.optional(h.gK.string,"1"),showsubmitbutton:h.gK.maybeNull(h.gK.boolean),placeholder:h.gK.maybeNull(h.gK.string),maxsubmissions:h.gK.maybeNull(h.gK.string),editable:h.gK.optional(h.gK.boolean,!1),transcription:!1},(0,O.VS)(O.eB)?{skipduplicates:h.gK.optional(h.gK.boolean,!1)}:{})),GE=h.gK.model({type:"textarea",regions:h.gK.array(VE),_value:h.gK.optional(h.gK.string,""),children:Te.unionArray(["shortcut"])}).volatile((()=>({focusable:!0,textareaRef:(0,p.createRef)()}))).views((e=>({get isEditable(){return e.editable&&e.annotation.editable},get isDeleteable(){return!e.isReadOnly()},get valueType(){return"text"},get holdsState(){return e.regions.length>0},get submissionsNum(){return e.regions.length},get showSubmit(){if(e.maxsubmissions){const t=Number.parseInt(e.maxsubmissions);return e.submissionsNume.regions.map((e=>e._value)),hasResult(t){if(!e.result)return!1;let n=e.result.mainValue;return Array.isArray(n)||(n=[n]),t=t.toLowerCase(),n.some((e=>e.toLowerCase()===t))}}))).actions((()=>(0,O.VS)(O.y8)?{}:{countTime:()=>{}})).actions((e=>{let t=null,n=null;const r=(t,n)=>!!(t&&n&&(0,h._n)(n))&&(!(e===n&&!e.showSubmit)&&!!t.parentElement);return{getSerializableValue(){const t=e.regions.map((e=>e._value));if(0!==t.length)return{text:t}},needsUpdate(){var t;e.updateFromResult(null==(t=e.result)?void 0:t.mainValue)},requiredModal(){fn.warning(e.requiredmessage||`Input for the textarea "${e.name}" is required.`)},uniqueModal(){fn.warning("There is already an entry with that text. Please enter unique text.")},setResult(t){(Array.isArray(t)?t:[t]).forEach((t=>e.createRegion(t)))},updateFromResult(t){e.regions=[],t&&e.setResult(t)},setValue(t){e._value=t},remove(t){const n=e.regions.indexOf(t);n<0||(e.regions.splice(n,1),(0,h.zr)(t),e.onChange(t))},perRegionCleanup(){e.regions=[]},createRegion(t,n,r){const o=VE.create({pid:n,leadTime:r,_value:t});return e.regions.push(o),o},onChange(t){var n;e.updateResult();const r=null!=t?t:null==(n=e.result)?void 0:n.area;null==r||r.notifyDrawingFinished()},validateText:t=>!((0,O.VS)(O.eB)&&e.skipduplicates&&e.hasResult(t))||(e.uniqueModal(),!1),addText(t,n){e.validateText(t)&&(e.createRegion(t,n,e.leadTime),e.onChange(),e.updateLeadTime())},updateLeadTime(){var t,n;if(!(0,O.VS)(O.y8))return;const r=e.result;r&&(r.setMetaValue("lead_time",(null!=(t=null==(n=r.meta)?void 0:n.lead_time)?t:0)+e.leadTime/1e3),e.leadTime=0,e.resetLeadTimeCounters())},addTextToResult(t,n){if(!e.validateText(t))return;const r=n.mainValue.toJSON();r.push(t),n.setValue(r)},beforeSend(){e._value&&e._value.length&&(e.addText(e._value),e._value="")},submitChanges(){e.beforeSend()},deleteText(e){(0,h.zr)(e)},onShortcut(o){if(!r(t,n)){if(!(0,O.VS)(O.tz))return;{var i,a;const o=(null==(i=e.textareaRef.current)?void 0:i.input)||(null==(a=e.textareaRef.current)||null==(a=a.resizableTextArea)?void 0:a.textArea);if(!r(o,e))return;t=o,n=e}}t.setRangeText(o,t.selectionStart,t.selectionEnd,"end"),n.setValue(t.value)},setLastFocusedElement(r,o=e){t=r,n=o},returnFocus(){var e;null==(e=t)||null==e.focus||e.focus()}}})),YE=h.gK.compose("TextAreaModel",QR,BE,ZE,...(0,O.VS)(O.y8)?[CE]:[],ze,OE,ct,...(0,O.VS)(O.gF)?[jE]:[],Pe,$e,GE),XE=(0,y.PA)((({item:e})=>{var t;const n=Number.parseInt(e.rows),r=(0,p.useCallback)(((t,n)=>{e.setLastFocusedElement(t.target,n)}),[e]),o={name:e.name,value:e._value,rows:e.rows,className:"is-search",label:e.label,placeholder:e.placeholder,disabled:e.isReadOnly(),readOnly:e.isReadOnly(),onChange:t=>{if(e.annotation.isReadOnly())return;const{value:n}=t.target;e.setValue(n)},onFocus:r,ref:e.textareaRef,onKeyPress:e.countTime,onKeyDown:e.countTime,onKeyUp:e.countTime,onMouseDown:e.countTime,onMouseUp:e.countTime,onMouseMove:t=>(t.button||t.buttons)&&e.countTime()};n>1&&(o.onKeyDown=t=>{"Enter"===t.key&&t.shiftKey&&e.allowsubmit&&e._value&&!e.annotation.isReadOnly()?(t.preventDefault(),t.stopPropagation(),e.addText(e._value),e.setValue("")):e.countTime()});const i=e.perRegionVisible()?{}:{display:"none"},a=!e.isReadOnly()&&(null!=(t=e.showsubmitbutton)?t:1!==n),s={},l=(0,Ze.cn)("text-area").toClassName();return a&&(s.marginBottom=0),i.marginTop="4px",e.displaymode===lt.TAG?(0,_.jsxs)("div",{className:l,style:i,ref:e.elementRef,children:[D.renderChildren(e,e.annotation),e.showSubmit&&(0,_.jsx)(yE.A,{onFinish:()=>(e.allowsubmit&&e._value&&!e.annotation.isReadOnly()&&(e.addText(e._value),e.setValue("")),!1),children:(0,_.jsxs)(yE.A.Item,{style:s,children:[1===n?(0,_.jsx)(bE.A,Object.assign({},o,{"aria-label":"TextArea Input"})):(0,_.jsx)(UE,Object.assign({},o,{"aria-label":"TextArea Input"})),a&&(0,_.jsx)(yE.A.Item,{children:(0,_.jsx)(vE.default,{style:{marginTop:"10px"},type:"primary",htmlType:"submit",children:"Add"})})]})}),e.regions.length>0&&(0,_.jsx)("div",{style:{marginBottom:"1em"},children:e.regions.map((e=>(0,_.jsx)(zE,{item:e,onFocus:r},e.id)))})]}):null}));x.addTag("textarea",YE,XE);const qE=h.gK.model({visiblewhen:h.gK.maybeNull(h.gK.string),whentagname:h.gK.maybeNull(h.gK.string),whenchoicevalue:h.gK.maybeNull(h.gK.string),whenlabelvalue:h.gK.maybeNull(h.gK.string)}).views((e=>({get isVisible(){var t;if(!1===(null==(t=(0,h.PA)(e,2))?void 0:t.isVisible))return!1;if(e.visiblewhen){const t={"region-selected":({tagName:t,labelValue:n})=>{var r;const o=e.annotation.highlightedNode;return!(!o||t&&(null==(r=o.labeling)?void 0:r.from_name.name)!==t)&&(!n||n.split(",").some((e=>o.hasLabel(e))))},"choice-selected":({tagName:t,choiceValue:n})=>{if(!t){for(const t of e.annotation.names.values())if("choices"===t.type&&t.selectedValues&&t.selectedValues().length)return!0;return!1}const r=e.annotation.names.get(t);return!!(null!=r&&r.hasChoiceSelection||null!=n&&n.length)&&r.hasChoiceSelection(null==n?void 0:n.split(","),r.selectedValues())},"no-region-selected":()=>!e.annotation.highlightedNode,"choice-unselected":e=>!t["choice-selected"](e)};if(Object.keys(t).includes(e.visiblewhen)){return!1!==t[e.visiblewhen]({tagName:e.whentagname,choiceValue:e.whenchoicevalue,labelValue:e.whenlabelvalue})}}else if(e.whenchoicevalue){for(const t of e.annotation.names.values()){const n=null==t||null==t.selectedValues?void 0:t.selectedValues();if(null!=n&&n.length)for(const t of n)if(t===e.whenchoicevalue)return!0}return!1}return!0}}))),JE=qE;var QE=n(51129),e_=n(84779);var t_=n(94714),n_=n(42197);const r_=(e=!1)=>{const[t,n]=(0,p.useState)(e),[r,o,i]=(0,p.useMemo)((()=>[n.bind(null,!0),n.bind(null,!1),()=>n((e=>!e))]),[]);return[t,r,o,i]};var o_=n(84392);const i_=e=>{let t=0,n=e.length;for(;n--;){t++;const r=e[n].children;r&&(t+=i_(r))}return t},a_=(e,t)=>({label:"",depth:t,path:e,isOpen:!0});let s_={};const l_=({items:e,rowComponent:t,flatten:n,rowHeight:r,maxHeightPercentage:o,minWidth:i,maxWidth:a,transformationCallback:s,defaultExpanded:l,isEditable:c})=>{var d;const u=document.body.clientHeight,[h,g]=(0,p.useState)(),[m,f]=(0,p.useState)({}),[v,y]=(0,p.useState)(0),[b,x]=(0,p.useState)(i),w=(0,p.useRef)(),C=(0,p.useRef)(),S=null==(d=C.current)?void 0:d.firstChild;S&&(S.style.overflowX="hidden");const j=()=>{y((()=>{var e;w.current.resetAfterIndex(0);const t=null==(e=w.current)||null==(e=e._outerRef.firstChild)?void 0:e.offsetHeight,n=.01*o*u;return t>n?n:t})())},k=t=>{const n=l?{[t]:2!==m[t]?2:1}:{[t]:1!==m[t]?1:2};f(Object.assign({},m,n)),g(A({items:e,toggleItem:n})),y(.01*o*u),s_={},w.current.resetAfterIndex(0)},R=t=>{c&&(g(A(t?{items:e,addInsideId:t}:{items:e})),j())},E=({data:e,index:t,rowStyle:n,rowComponent:o})=>{const i=e(t),s=(0,p.useCallback)((e=>{const n=`${t}`,o=(null==S?void 0:S.offsetWidth)-(null==S?void 0:S.clientWidth)||0,i=((0,O.VS)(O.c0)?e.scrollWidth:e.offsetWidth)+o+5,s=e.scrollHeight;b{const i=[];for(let a=0;a{g(A({items:e}))}),[e]),(0,p.useEffect)((()=>{0===(null==h?void 0:h.length)&&j()}),[h]),(0,_.jsx)("div",{ref:C,children:(0,_.jsx)(o_._m,{ref:w,height:v+4,itemCount:(null==h?void 0:h.length)||0,itemSize:e=>s_[`${e}`]||r,width:b,itemData:e=>({row:h&&h[e],toggle:k,addInside:R}),children:({data:e,index:n,style:r})=>(0,_.jsx)(E,{data:e,rowStyle:r,index:n,rowComponent:t})})})},c_={taxonomy:"taxonomy--sbNxo",taxonomy_open:"taxonomy_open--InD7j",taxonomy__selected:"taxonomy__selected--VOtIN",taxonomy__dropdown:"taxonomy__dropdown--Qi8yg",taxonomy__search:"taxonomy__search--qkTHD",taxonomy__item:"taxonomy__item--I4JB1",taxonomy__measure:"taxonomy__measure--ialoK",taxonomy__measure_ff_dev4075:"taxonomy__measure_ff_dev4075--_zpBo",taxonomy__item_user:"taxonomy__item_user--JBwBu",taxonomy__item_session:"taxonomy__item_session--jWm5B",taxonomy__grouping:"taxonomy__grouping--iZK7b",taxonomy__extra:"taxonomy__extra--GgvBt",taxonomy__extra_actions:"taxonomy__extra_actions--tQuLD",taxonomy__extra_count:"taxonomy__extra_count--MtR7B",taxonomy__action:"taxonomy__action--rpruy",taxonomy__add__container:"taxonomy__add__container--rbs2W",taxonomy__add:"taxonomy__add--dOQt_",taxonomy__newitem:"taxonomy__newitem--amueo",taxonomy__collapsable:"taxonomy__collapsable--hc4oZ"},d_=["title","wrapper","children"],u_=p.createContext([[],()=>{}]),h_=p.createContext({}),g_=({onAddLabel:e,onFinish:t,path:n})=>{const r=(0,p.useRef)(null),o=o=>{if(!r.current)return;const i=r.current.value,a="key"in o&&"Escape"===o.key,s="key"in o&&"Enter"===o.key,l="blur"===o.type;a&&o.stopPropagation(),s&&!i||((l||s)&&i&&e([...n,i]),(l||s||a)&&(r.current.value="",null==t||t()))};return(0,p.useEffect)((()=>{var e;return null==(e=r.current)?void 0:e.focus()}),[]),(0,_.jsx)("div",{className:c_.taxonomy__newitem,children:(0,_.jsx)("input",{name:"taxonomy__add",onKeyDownCapture:o,onBlur:o,ref:r})})},m_=({isEditable:e,flatItems:t})=>{const[n,r]=(0,p.useContext)(u_),{showFullPath:o,pathSeparator:i=" / "}=(0,p.useContext)(h_),a=n.map((e=>e.map((e=>{var n;const r=null==(n=t.find((t=>t.path[t.path.length-1]===e)))?void 0:n.label;return null!=r?r:e}))));return(0,_.jsx)("div",{className:["htx-taxonomy-selected",c_.taxonomy__selected].join(" "),children:a.map(((t,a)=>(0,_.jsxs)("div",{children:[(0,_.jsx)("span",{children:o?t.join(i):t[t.length-1]}),e?(0,_.jsx)("input",{type:"button",onClick:()=>r(n[a],!1),value:"×"}):null]},t.join("|"))))})};const p_=e=>{let{title:t,wrapper:n,children:r}=e,o=(0,Yn.A)(e,d_);if(!(0,O.VS)(O.up))return r;const i=n?(0,_.jsx)(n,{children:r}):r;return t?(0,_.jsx)(ir,Object.assign({title:t,mouseEnterDelay:500},o,{children:i})):i},f_=({style:e,item:t,dimensionCallback:n,maxWidth:r,isEditable:o})=>{var i;const{row:{id:a,isOpen:s,childCount:l,isFiltering:c,name:d,path:u,padding:h,isLeaf:g,hint:m},toggle:f,addInside:v}=t,[y,b]=(0,p.useContext)(u_),{leafsOnly:x,maxUsages:C,maxUsagesReached:S,onAddLabel:j,onDeleteLabel:k}=(0,p.useContext)(h_),R=y.some((e=>(0,w.isArraysEqual)(e,u))),E=y.some((e=>function(e,t){return!(e.length<=t.length)&&t.every(((t,n)=>e[n]===t))}(e,u))),A=x&&!g,T=S&&!R,P=A||T||!o,I=g?{display:"none"}:{transform:s?"rotate(180deg)":"rotate(90deg)"},L=A?"Only leaf nodes allowed":T?`Maximum ${C} items already selected`:void 0,M=(0,p.useCallback)((e=>{e&&(e.indeterminate=!R&&E)}),[R,E]),K=(0,p.useCallback)((()=>{null==k||k(u),v()}),[t,k]),D="session"===t.row.origin?c_.taxonomy__item_session:"user"===t.row.origin?c_.taxonomy__item_user:"",N=""===d&&j,V=(0,p.useRef)(),z=r-h-(r-(null==(i=V.current)?void 0:i.parentElement.offsetWidth)||0)-90;return(0,p.useEffect)((()=>{const e=null==V?void 0:V.current;e&&(e.toggle=f,n(e))}),[]),(0,_.jsx)("div",{ref:V,style:Object.assign({paddingLeft:h,maxWidth:r},e,{width:"fit-content"}),children:N?(0,_.jsx)(g_,{onAddLabel:j,onFinish:()=>v(),path:u},""):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)("div",{className:[c_.taxonomy__measure,!!(0,O.VS)(O.c0)&&c_.taxonomy__measure_ff_dev4075].filter(Boolean).join(" "),children:[(0,_.jsx)("label",{children:d}),(0,O.VS)(O.c0)&&!c&&(0,_.jsx)("div",{className:c_.taxonomy__extra,children:(0,_.jsx)("span",{className:c_.taxonomy__extra_count,children:l})})]}),(0,_.jsx)(p_,{title:m,children:(0,_.jsxs)("div",{className:[c_.taxonomy__item,D].join(" "),children:[(0,_.jsx)("div",{className:c_.taxonomy__grouping,onClick:()=>f(a),children:(0,_.jsx)(lc,{stroke:"#09f",style:I})}),(0,_.jsx)("input",{className:"item",id:a,name:a,type:"checkbox",disabled:P,checked:R,ref:M,onChange:e=>{o&&b(u,e.currentTarget.checked)}}),(0,_.jsx)("label",{htmlFor:a,style:(0,O.VS)(O.c0)?{}:{maxWidth:`${z}px`},onClick:o?()=>A&&f(a):void 0,title:L,className:P?c_.taxonomy__collapsable:void 0,children:d}),!c&&(0,_.jsxs)("div",{className:c_.taxonomy__extra,children:[(0,_.jsx)("span",{className:c_.taxonomy__extra_count,children:l}),o&&j&&(0,_.jsx)("div",{className:c_.taxonomy__extra_actions,children:(0,_.jsx)(t_.A,{destroyPopupOnHide:!0,trigger:["click"],overlay:(0,_.jsxs)(n_.A,{children:[(0,_.jsx)(n_.A.Item,{className:c_.taxonomy__action,onClick:()=>{v(a)},children:"Add Inside"},"add-inside"),"session"===t.row.origin&&(0,_.jsx)(n_.A.Item,{className:c_.taxonomy__action,onClick:K,children:"Delete"},"delete")]}),children:(0,_.jsx)("div",{children:"..."})})})]})]})})]})})},v_=({show:e,flatten:t,items:n,dropdownRef:r,isEditable:o})=>{const i=(0,p.useRef)(null),[a,s]=(0,p.useState)(""),{onAddLabel:l,minWidth:c,maxWidth:d}=(0,p.useContext)(h_),[u,h,g]=r_(!1),m=a?((e,t)=>{const n=[],r=[];let o=-1;for(let a=e.length;a--;){const s=e[a];if(s.depth!==o){if(t(s)){const e=Object.assign({},s,{children:[]});0===s.depth?n.unshift(e):(o=s.depth-1,r[o]||(r[o]=[]),r[o].unshift(e))}}else{var i;const e=Object.assign({},s,{children:null!=(i=r[o])?i:[]});r[o]=[],o?(r[o-1]||(r[o-1]=[]),r[o-1].unshift(e)):n.unshift(e),o--}}return n})(t,(e=>e.label.toLocaleLowerCase().includes(a))):n;(0,p.useEffect)((()=>{const t=i.current;e&&t&&(t.value="",t.focus(),s(""))}),[e]);return(0,_.jsxs)("div",{className:c_.taxonomy__dropdown,ref:r,style:{display:e?"block":"none"},children:[(0,_.jsx)("input",{autoComplete:"off",className:c_.taxonomy__search,name:"taxonomy__search",placeholder:"Search...",onInput:e=>s(e.currentTarget.value.toLocaleLowerCase()),ref:i}),(0,_.jsx)(l_,{items:m,isEditable:o,rowComponent:f_,flatten:""!==a,rowHeight:30,defaultExpanded:!1,maxHeightPercentage:50,minWidth:Number(c)||200,maxWidth:Number(d)||600,transformationCallback:({node:{children:e,depth:t,label:n,origin:r,path:o,hint:i},nestingLevel:a,isFiltering:s,isOpen:l,childCount:c})=>({childCount:c,id:`${n}-${t}`,isFiltering:s,isLeaf:!(null!=e&&e.length),isOpen:l,isOpenByDefault:!0,name:n,nestingLevel:a,origin:r,padding:10*a+10,path:o,hint:i})}),l&&""===a&&(0,_.jsx)("div",{className:c_.taxonomy__add__container,children:u?(0,_.jsx)(g_,{path:[],onAddLabel:l,onFinish:g}):o?(0,_.jsx)("div",{className:c_.taxonomy__add,children:(0,_.jsx)("button",{type:"button",onClick:h,children:"Add"})}):null})]})},y_=({items:e,selected:t,onChange:n,onAddLabel:r,onDeleteLabel:o,options:i={},isEditable:a=!0})=>{const s=(0,p.useRef)(null),l=(0,p.useRef)(null),[c,d]=(0,p.useState)(!1),u=(0,p.useCallback)((()=>d(!1)),[]),h=(0,p.useCallback)((e=>{var t;const n=c_.taxonomy__action;[e.target,e.target.parentNode].some((e=>{var t;return null==e||null==(t=e.classList)?void 0:t.contains(n)}))||null!=(t=l.current)&&t.contains(e.target)||u()}),[]),g=c?c_.taxonomy_open:"",m=(0,p.useMemo)((()=>{const t=[],n=e=>{var r;t.push(e),null==(r=e.children)||r.forEach(n)};return e.forEach(n),t}),[e]),[f,v]=(0,p.useState)(t),y=(0,p.useMemo)((()=>[f,(e,t)=>{const r=t?[...f,e]:f.filter((t=>!(0,w.isArraysEqual)(t,e)));(!1!==i.canRemoveItems||r.length)&&(v(r),n&&n(null,r))}]),[f]),b=(0,p.useMemo)((()=>{const e=!!i.maxUsages&&f.length>=i.maxUsages;return Object.assign({},i,{maxUsagesReached:e,onAddLabel:r,onDeleteLabel:o})}),[i,i.maxUsages,i.maxUsages?f:0]),x=(0,p.useCallback)((e=>{var t,n,r;const o=null==(t=l.current)?void 0:t.querySelectorAll(".item"),i=null==(n=l.current)?void 0:n.querySelector("input"),a=document.activeElement||void 0,s=o&&o.length>0,c=o&&a?Array.from(o).findIndex((e=>e.id===a.id)):-1,h=(e,t)=>s&&o[e+t].focus(),g=e=>{["text","checkbox"].includes(e.target.type)&&e.preventDefault()};switch(e.key){case"Escape":u(),e.stopPropagation();break;case"ArrowDown":g(e),e.shiftKey&&(d(!0),i&&i.focus()),c>=0&&h(c,1),i===a&&h(0,0);break;case"ArrowUp":g(e),c>0?h(c,-1):0===c&&i&&i.focus();break;case"ArrowRight":c>=0&&(null==(r=a.parentNode)||null==(r=r.parentNode)||r.toggle(a.id)),i&&i.focus()}}),[]);return(0,p.useEffect)((()=>{v(t)}),[t]),(0,p.useEffect)((()=>(document.body.addEventListener("click",h,!0),document.body.addEventListener("keydown",x),()=>{document.body.removeEventListener("click",h),document.body.removeEventListener("keydown",x)})),[]),(0,_.jsx)(u_.Provider,{value:y,children:(0,_.jsxs)(h_.Provider,{value:b,children:[(0,_.jsx)(m_,{isEditable:a,flatItems:m}),(0,_.jsxs)("div",{className:["htx-taxonomy",c_.taxonomy,g].join(" "),ref:l,children:[(0,_.jsxs)("span",{onClick:()=>d((e=>!e)),children:[i.placeholder||"Click to add...",(0,_.jsx)(lc,{stroke:"#09f"})]}),(0,_.jsx)(v_,{show:c,isEditable:a,items:e,flatten:m,dropdownRef:s})]})]})})},b_=h.gK.model(Object.assign({},(0,O.VS)(O.cE)?{id:h.gK.identifier}:{},{selected:h.gK.optional(h.gK.boolean,!1),alias:h.gK.maybeNull(h.gK.string),value:h.gK.maybeNull(h.gK.string),hotkey:h.gK.maybeNull(h.gK.string),style:h.gK.maybeNull(h.gK.string),html:h.gK.maybeNull(h.gK.string),color:h.gK.maybeNull(h.gK.string)},(0,O.VS)(O.up)?{hint:h.gK.maybeNull(h.gK.string)}:{})),x_=h.gK.model({type:"choice",visible:h.gK.optional(h.gK.boolean,!0),_value:h.gK.optional(h.gK.string,""),children:Te.unionArray(["choice"]),parentTypes:Te.tagsTypes(["Choices","Taxonomy"]),readonly:h.gK.optional(h.gK.boolean,!1)}).views((e=>({get isCheckbox(){var t;const n=null==(t=e.parent)?void 0:t.choice;return"multiple"===n||"single"===n},get isSelect(){var t;return"select"===(null==(t=e.parent)?void 0:t.layout)},canBeUsed:()=>!0,get isLeaf(){var t;return!e.nestedResults||!(null!=(t=e.children)&&t.length)},get sel(){return e.isLeaf?e._sel:e.children.every((e=>!0===e.sel))},get indeterminate(){return!e.isLeaf&&(!e.sel&&e.children.some((e=>!0===e.sel)))},get parentChoice(){return Te.getParentTagOfTypeString(e,"choice")},get isSkipped(){return!e.nestedResults&&!!e.parentChoice},get nestedResults(){var t;return!1!==(null==(t=e.parent)?void 0:t.allownested)},get _resultValue(){var t;return null!=(t=e.alias)?t:e._value},get resultValue(){if(e.nestedResults){const t=[];let n=e;for(;n;)t.unshift(n._resultValue),n=n.parentChoice;return t}return e._resultValue},isReadOnly(){var t;return e.readonly||(null==(t=e.parent)?void 0:t.isReadOnly())}}))).volatile((()=>({_sel:!1}))).actions((e=>({toggleSelected(){var t,n;if(null!=(t=e.parent)&&t.readonly||null!=(n=e.annotation)&&n.isReadOnly())return;const r=e.parent,o=e.sel;r.shouldBeUnselected&&(null==r.resetSelected||r.resetSelected()),e.setSelected(!o),null==r.updateResult||r.updateResult()},setVisible(t){e.visible=t},setSelected(t){e._sel=t,e.isLeaf||e.children.forEach((e=>{e.setSelected(t)}))}}))).actions((e=>{var t;return"choices"===(null==(t=e.parent)?void 0:t.type)?{onHotKey:()=>e.toggleSelected()}:{}})),w_=h.gK.compose("ChoiceModel",nE,b_,ze,x_,Pe),C_=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{var n;let r={};e.style&&(r=D.cssConverter(e.style));const o=(t.settings.enableTooltips||t.settings.enableLabelTooltips)&&t.settings.enableHotkeys&&e.hotkey,i=(0,p.useCallback)((t=>{e.isReadOnly()||(e.toggleSelected(),t.nativeEvent.target.blur())}),[]),[a,s]=(0,p.useState)(!1),l=(0,p.useCallback)((()=>s((e=>!e))),[]);return(0,_.jsxs)(Ze.eB,{name:"choice",mod:{layout:e.parent.layout,leaf:e.isLeaf,notLeaf:!e.isLeaf,hidden:!e.visible},children:[(0,_.jsxs)(Ze.Sl,{name:"item",mod:{notLeaf:!e.isLeaf},style:r,children:[(0,_.jsx)(Ze.Sl,{name:"checkbox",component:(c=e.isCheckbox?e_.A:QE.Ay,d=e._value,e=>(0,_.jsx)(c,Object.assign({},e,{name:d}))),mod:{notLeaf:!e.isLeaf},checked:e.sel,indeterminate:!e.sel&&e.indeterminate,disabled:e.isReadOnly(),onChange:i,children:(0,_.jsxs)(p_,{title:e.hint,wrapper:"span",children:[e.html?(0,_.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(e.html)}}):e._value,o&&(0,_.jsxs)(ar,{children:["[",e.hotkey,"]"]})]})}),!e.isLeaf&&(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{collapsed:a},component:vE.default,type:"text",onClick:l,children:(0,_.jsx)(lc,{})})]}),e.nestedResults&&null!=(n=e.children)&&n.length?(0,_.jsx)(Ze.Sl,{name:"children",mod:{collapsed:a},children:D.renderChildren(e,e.annotation)}):null]});var c,d})));x.addTag("choice",w_,C_);const S_=h.gK.model().views((e=>({findSelectedChoice(t){var n,r;let o;return e.findLabel?o=e.findLabel(t):e.findItemByValueOrAlias&&(o=e.findItemByValueOrAlias(t)),(null==(n=o)?void 0:n.alias)||(null==(r=o)?void 0:r.value)},selectedChoicesMatch(t,n){const r=e.findSelectedChoice(t),o=e.findSelectedChoice(n);return(0,w.isDefined)(r)&&(0,w.isDefined)(o)&&r===o},hasChoiceSelectionSimple(t){if(null!=t&&t.length){const n=e.selectedValues().map((e=>Array.isArray(e)?e.at(-1):e));return t.some((e=>n.includes(e)))}return e.isSelected},hasChoiceSelection(t,n=[]){if(null!=t&&t.length){if(e.findLabel)return t.map((t=>e.findLabel(t))).some((e=>e&&e.sel));if(n.length){const r=t=>{if(e.findItemByValueOrAlias){const n=e.findItemByValueOrAlias(t);t=(null==n?void 0:n.alias)||(null==n?void 0:n.value)||t}return n.map((e=>Array.isArray(e)?e.at(-1):e)).includes(t)};return t.some(r)}return!1}return e.isSelected}}))),{Option:j_}=Zn.A,k_=h.gK.model({toname:h.gK.maybeNull(h.gK.string),showinline:h.gK.maybeNull(h.gK.boolean),choice:h.gK.optional(h.gK.enumeration(["single","single-radio","multiple"]),"single"),layout:h.gK.optional(h.gK.enumeration(["select","inline","vertical"]),"vertical"),value:h.gK.optional(h.gK.string,""),allownested:h.gK.optional(h.gK.boolean,!1)}),O_=h.gK.model({pid:h.gK.optional(h.gK.string,E),visible:h.gK.optional(h.gK.boolean,!0),type:"choices",children:Te.unionArray(["choice","view","header","hypertext"])}).views((e=>({get shouldBeUnselected(){return"single"===e.choice||"single-radio"===e.choice},states:()=>e.annotation.toNames.get(e.name),get serializableValue(){const t=e.selectedValues();return t&&t.length?{choices:t}:null},get preselectedValues(){return e.tiedChildren.filter((e=>!0===e.selected&&!e.isSkipped)).map((e=>e.resultValue))},get selectedLabels(){return e.tiedChildren.filter((e=>!0===e.sel&&!e.isSkipped))},selectedValues:()=>e.selectedLabels.map((e=>e.resultValue)),get defaultChildType(){return"choice"}}))).actions((e=>({afterCreate(){!0===e.showinline&&(e.layout="inline"),!1===e.showinline&&(e.layout="vertical")},needsUpdate(){e.result?e.setResult(e.result.mainValue):e.setResult([])},requiredModal(){fn.warning(e.requiredmessage||`Checkbox "${e.name}" is required.`)},unselectAll(){},updateFromResult(t){e.setResult(Array.isArray(t)?t:[t])},resetSelected(){e.selectedLabels.forEach((e=>e.setSelected(!1)))},setResult(t){e.tiedChildren.forEach((e=>{let n=!1;e.isSkipped||(n=null==t||null==t.some?void 0:t.some((t=>Array.isArray(t)&&Array.isArray(e.resultValue)?t.length===e.resultValue.length&&(null==t.every?void 0:t.every(((t,n)=>{var r;return t===(null==(r=e.resultValue)?void 0:r[n])}))):t===e.resultValue))),e.setSelected(n)}))}}))).actions((e=>{const t={validate:e.validate};return{validate(){if(!t.validate()||"multiple"!==e.choice&&e.checkResultLength()>1)return!1},checkResultLength:()=>e.children.filter((e=>e._sel)).length,beforeSend(){"multiple"!==e.choice&&e.checkResultLength()>1&&fn.warning(`The number of options selected (${e.checkResultLength()}) exceed the maximum allowed (1). To proceed, first unselect excess options for:\r\n • Choices (${e.name})`)}}})),R_=h.gK.compose("ChoicesModel",QR,BE,YR.props({_child:"ChoiceModel"}),OE,ct,...(0,O.VS)(O.gF)?[jE]:[],$e,S_,JE,qR,Pe,k_,O_),E_=(0,y.PA)((({item:e})=>(0,_.jsx)(Zn.A,{style:{width:"100%"},value:e.selectedLabels.map((e=>e._value)),mode:"multiple"===e.choice?"multiple":"",disabled:e.isReadOnly(),onChange:t=>{if(Array.isArray(t))e.resetSelected(),t.forEach((t=>e.findLabel(t).setSelected(!0))),e.updateResult();else{const n=e.findLabel(t);n&&n.toggleSelected()}},children:e.tiedChildren.map((e=>(0,_.jsx)(j_,{value:e._value,children:(0,_.jsx)(p_,{title:e.hint,wrapper:"div",children:e._value})},e._value)))}))),__=(0,y.PA)((({item:e})=>(0,_.jsx)(Ze.eB,{name:"choices",mod:{hidden:!e.isVisible||!e.perRegionVisible(),layout:e.layout},ref:e.elementRef,children:"select"===e.layout?(0,_.jsx)(E_,{item:e}):D.renderChildren(e,e.annotation)})));x.addTag("choices",R_,__);var A_=n(55454),T_=n(99811);const P_=h.gK.model({toname:h.gK.maybeNull(h.gK.string),maxrating:h.gK.optional(h.gK.string,"5"),icon:h.gK.optional(h.gK.string,"star"),size:h.gK.optional(h.gK.string,"medium"),defaultvalue:h.gK.optional(h.gK.string,"0"),hotkey:h.gK.maybeNull(h.gK.string)}),I_=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"rating",rating:h.gK.maybeNull(h.gK.number)}).views((e=>({selectedValues:()=>e.rating,get serializableValue(){const t=e.selectedValues();return t?{rating:t}:null},get holdsState(){return e.rating>0}}))).actions((e=>({getSelectedString:()=>`${e.rating} star`,needsUpdate(){e.result?e.rating=e.result.mainValue:e.rating=null},unselectAll(){},setRating(t){e.rating=t,e.updateResult()},updateFromResult(t){e.rating=t},requiredModal(){fn.warning(e.requiredmessage||`Rating "${e.name}" is required.`)},increaseValue(){e.rating>=Number(e.maxrating)?e.setRating(0):e.rating>0?e.setRating(e.rating+1):e.setRating(1)},onHotKey:()=>e.increaseValue()}))),L_=h.gK.compose("RatingModel",QR,BE,OE,ct,...(0,O.VS)(O.gF)?[jE]:[],Pe,P_,I_),M_=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{let n;"small"===e.size?n=15:"medium"===e.size?n=25:"large"===e.size&&(n=40);const r=e.perRegionVisible()?{}:{display:"none"};return(0,_.jsxs)("div",{style:r,onKeyDownCapture:e=>{if(e.ctrlKey||e.metaKey||e.altKey||e.shiftKey){const t=document.activeElement;e.currentTarget.contains(t)&&t.blur()}},ref:e.elementRef,children:[(0,_.jsx)(A_.A,{character:(0,_.jsx)(T_.A,{style:{fontSize:n}}),value:e.rating,count:Number(e.maxrating),defaultValue:Number(e.defaultvalue),onChange:e.setRating}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)("sup",{style:{fontSize:"9px"},children:["[",e.hotkey,"]"]})]})})));x.addTag("rating",L_,M_);const K_=h.gK.model("ParagraphsRegionModel",{type:"textrange",object:h.gK.late((()=>h.gK.reference(W_))),startOffset:h.gK.integer,start:h.gK.string,endOffset:h.gK.integer,end:h.gK.string,states:h.gK.maybeNull(h.gK.array(h.gK.union(pE,YE,R_,L_)))}).volatile((()=>({text:"",hideable:!0}))).views((e=>({get parent(){return(0,h._n)(e)?e.object:null},getRegionElement(){var t;return null==(t=e._spans)?void 0:t[0]}}))).actions((e=>({beforeDestroy(){rn.HTML.removeSpans(e._spans)},setText(t){e.text=t},fixOffsets(t,n){e.startOffset=t,e.endOffset=n},serialize(){const{start:t,end:n}=e,r={value:{start:t,end:n,startOffset:e.startOffset,endOffset:e.endOffset}};return"yes"===e.object.savetextresult&&(r.value.text=e.text),r}}))),D_=h.gK.compose("ParagraphsRegionModel",it,ht,We,K_,UR);x.addRegionType(D_,"paragraphs");const N_={phrase:"phrase--qv9_O",numbered:"numbered--a9bkk",name:"name--PZvdb",text:"text--Ou0FP",dialoguename:"dialoguename--Z1bwn",dialoguetext:"dialoguetext--fQTLz",scroll_container:"scroll_container--zjNwB",wrapper_header:"wrapper_header--EZcmN",wrapper_header__buttons:"wrapper_header__buttons--V_YdW",container:"container--mYuCT",withAudio:"withAudio--toh21",collapsed:"collapsed--JuuM7",authorFilter:"authorFilter--koQOu",authorFilter__showall:"authorFilter__showall--iRWAc",authorFilter__placeholder:"authorFilter__placeholder--OnkZm",authorFilter__search:"authorFilter__search--CKZQK",authorFilter__search__input:"authorFilter__search__input--Z6sUA",authorFilter__select:"authorFilter__select--_OLb1",authorFilter__select__item:"authorFilter__select__item--q_yG2",audio:"audio--Fq_ZD",playNewUi:"playNewUi--oUID4",play:"play--q_72j",newUI:"newUI--hohwV",titleWrapper:"titleWrapper--guGg3",time:"time--JzGDH",wrapperText:"wrapperText--Rj0j9",readingLine:"readingLine--UoCCW"},V_=h.gK.model("ParagraphsModel",{value:h.gK.maybeNull(h.gK.string),valuetype:h.gK.optional(h.gK.enumeration(["json","url"]),(()=>window.LS_SECURE_MODE?"url":"json")),audiourl:h.gK.maybeNull(h.gK.string),showplayer:!1,highlightcolor:h.gK.maybeNull(h.gK.string),showlabels:h.gK.optional(h.gK.boolean,!1),layout:h.gK.optional(h.gK.enumeration(["none","dialogue"]),"none"),savetextresult:h.gK.optional(h.gK.enumeration(["none","no","yes"]),(()=>window.LS_SECURE_MODE?"no":"yes")),namekey:h.gK.optional(h.gK.string,"author"),textkey:h.gK.optional(h.gK.string,"text"),contextscroll:h.gK.optional(h.gK.boolean,!1)}),z_=h.gK.model("ParagraphsModel",{type:"paragraphs",_update:h.gK.optional(h.gK.number,1)}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get store(){return(0,h.Zn)(e)},get audio(){if(!e.audiourl)return null;if("$"===e.audiourl[0]){const t=(0,h.Zn)(e),n=e.audiourl.substr(1);return t.task.dataObj[n]}return e.audiourl},layoutStyles(t){if("dialogue"===e.layout){const n=t[e.namekey],r=$R().make_color({seed:n})[0];return(0,O.VS)(O.LG)?{phrase:{"--highlight-color":r,"--background-color":"#FFF"},name:{color:r},inactive:{phrase:{"--highlight-color":rn.Colors.convertToRGBA(r,.4),"--background-color":"#FAFAFA"},name:{color:rn.Colors.convertToRGBA(r,.9)}}}:{phrase:{backgroundColor:rn.Colors.convertToRGBA(r,.25)}}}return{}},get layoutClasses(){return"dialogue"===e.layout?{phrase:N_.phrase,name:N_.dialoguename,text:N_.dialoguetext}:{phrase:N_.phrase,name:N_.name,text:N_.text}},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t&&t.filter((e=>e.isSelected&&"paragraphlabels"===e._type))},isVisibleForAuthorFilter:t=>!(0,O.VS)(O.fw)||(!e.filterByAuthor.length||e.filterByAuthor.includes(t[e.namekey]))}))),B_=h.gK.model().volatile((()=>({_value:null,filterByAuthor:[],searchAuthor:"",playingId:-1,playing:!1,audioRef:(0,p.createRef)(),audioDuration:null,audioFrameHandler:null}))).views((e=>({regionIndicesByTime(t){var n;const r=[];return null==(n=e._value)||n.forEach((({start:e,duration:n,end:o},i)=>void 0!==e&&(!(e>t)&&void((void 0===n&&void 0===o||(null!=o?o:e+n)>t)&&r.push(i))))),r},get regionsStartEnd(){var t;return e.audioDuration?null==(t=e._value)?void 0:t.map((t=>{var n,r;if(void 0===t.start)return{};const o=(0,w.clamp)(null!=(n=t.start)?n:0,0,e.audioDuration),i=t.duration?o+t.duration:null!=(r=t.end)?r:e.audioDuration;return{start:o,end:(0,w.clamp)(i,o,e.audioDuration)}})):[]},get regionsValues(){return Object.values(e.regionsStartEnd)}}))).actions((e=>({triggerSync(t,n){const r=e.audioRef.current;r&&e.syncSend(Object.assign({playing:!r.paused,time:r.currentTime},n),t)},registerSyncHandlers(){e.syncHandlers.set("pause",e.stopNow),e.syncHandlers.set("play",e.handleSyncPlay),e.syncHandlers.set("seek",e.handleSyncPlay),e.syncHandlers.set("speed",e.handleSyncSpeed)},handleSyncPlay({time:t,playing:n}){const r=e.audioRef.current;r&&(r.currentTime=t,r.paused&&n?e.play():e.trackPlayingId())},handleSyncSpeed({speed:t}){const n=e.audioRef.current;n&&(n.playbackRate=t)},syncMuted(t){const n=e.audioRef.current;n&&(n.muted=t)}}))).actions((e=>({handleAudioLoaded(t){const n=t.target;e.audioDuration=n.duration},reset(){e.playingId=-1,e.audioFrameHandler&&(cancelAnimationFrame(e.audioFrameHandler),e.audioFrameHandler=null)},stopNow(){const t=e.audioRef.current;t&&(t.paused||(t.pause(),e.playing=!1,e.triggerSync("pause")))},stopAtTheEnd(){var t;const n=e.audioRef.current;if(!n)return;if(n.paused)return;const{end:r}=null!=(t=e.regionsStartEnd[e.playingId])?t:{};n.currentTime=r)return void e.reset();const o=e.regionsValues;e.playingId=o.findIndex((({start:e,end:t})=>n>=e&&n({setAuthorSearch(t){e.searchAuthor=t},setAuthorFilter(t){e.filterByAuthor=t}}))),H_=h.gK.model().actions((e=>({needsUpdate(){e._update=e._update+1},updateValue(t){const n=j(e.value,t.task.dataObj);if("url"===e.valuetype){const r=n;if(!(0,w.isValidObjectURL)(r,!0)){const o=[];return r?(o.push(`URL (${r}) is not valid.`),o.push('You should not put data directly into your task if you use valuetype="url".')):o.push(`URL is empty, check ${n} in data JSON.`),window.LS_SECURE_MODE&&o.unshift('In SECURE MODE valuetype set to "url" by default.'),t.annotationStore.addErrors([Kj.generalError(o.join("\n"))]),void e.setRemoteValue("")}fetch(r).then((e=>{if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);return e.json()})).then(e.setRemoteValue).catch((n=>{const o=Ge.A.ERR_LOADING_HTTP({attr:e.value,error:String(n),url:r});t.annotationStore.addErrors([Kj.generalError(o)]),e.setRemoteValue("")}))}else e.setRemoteValue(n)},setRemoteValue(t){const n=[];if(Array.isArray(t)?(e.namekey in t[0]||n.push(`"${e.namekey}" field not found in task data; check your nameKey parameter`),e.textkey in t[0]||n.push(`"${e.textkey}" field not found in task data; check your textKey parameter`)):n.push("Provided data is not an array"),n.length){const t=[`Task data (provided as ${e.value}) has wrong format.
`,"It should be an array of objects with fields,",'defined by nameKey ("author" by default)','and textKey ("text" by default)'].join(" ");return void e.store.annotationStore.addErrors([Kj.generalError(`${t}
    ${n.map((e=>`
  • ${e}
  • `)).join("")}
`)])}const r=(0,O.VS)(O.LG)&&e.contextscroll?t.sort(((e,t)=>{if(!e.start)return 1;if(!t.start)return-1;const n=e.end?e.end:e.start+e.duration||0,r=t.end?t.end:t.start+t.duration||0;return e.start===t.start?n-r:e.start-t.start})):t;e._value=r,e.needsUpdate()},createRegion(t){const n=D_.create(Object.assign({pid:t.id},t));return n._range=t._range,e.regions.push(n),e.annotation.addRegion(n),n},addRegions(t){const n=[],r=(0,O.VS)(O.Zr)?e.getAvailableStates():e.activeStates();if(0===r.length)return;const o=r[0],i={[o.valueType]:o.selectedValues()};for(const r of t){const t=e.annotation.createResult(r,i,o,e);t.setText(r.text),t.notifyDrawingFinished(),t._range=r._range,n.push(t)}return n},addRegion(t){if((0,O.VS)(O.Gd))return e.addRegions([t])[0];const n=(0,O.VS)(O.Zr)?e.getAvailableStates():e.activeStates();if(0===n.length)return;const r=n[0],o={[r.valueType]:r.selectedValues()},i=e.annotation.createResult(t,o,r,e);return i.setText(t.text),i.notifyDrawingFinished(),i._range=t._range,i}}))),F_=[it,V_,Fe,bn,Pe,z_,B_,H_].filter(Boolean),W_=h.gK.compose("ParagraphsModel",...F_);var $_=n(8009);const U_=p.createContext(null),Z_=["animated","visible"];let G_=1;const Y_=(0,p.forwardRef)(((e,t)=>{var n;let{animated:r=!0,visible:o=!1}=e,i=(0,Yn.A)(e,Z_);const a=(0,Ze.cn)("dropdown"),s=(0,p.useRef)(),{triggerRef:l,minIndex:c}=null!=(n=(0,p.useContext)(U_))?n:{},d=void 0===l,{children:u}=i,[h,m]=(0,p.useState)(o),[f,v]=(0,p.useState)({}),[y,b]=(0,p.useState)(o?"visible":null),x=(0,p.useCallback)((()=>{var e;const t=s.current,n=null!=(e=null==l?void 0:l.current)?e:t.parentNode,{left:r,top:o}=er(n,t,i.alignment||"bottom-left");v({left:r,top:o})}),[l,c]),w=(0,p.useMemo)((()=>G_++),[]),C=(0,p.useCallback)((async(e=!1,t)=>{if(!1!==i.enabled||!0!==e)return new Promise((n=>{const o=s.current;if(!1===r||!0===t)return b(e?"visible":null),void n();Jn(o,{transition:()=>{b(e?"appear":"disappear")},beforeTransition:()=>{b(e?"before-appear":"before-disappear")},afterTransition:()=>{b(e?"visible":null),n()}})}))}),[r]),S=(0,p.useCallback)((async(e,t)=>{const n=null!=e?e:!h;h!==n&&(null==i.onToggle||i.onToggle(n),await C(n,t),m(n))}),[h,C,i.onToggle]),j=(0,p.useCallback)((async e=>{await S(!1,e)}),[S]),k=(0,p.useCallback)((async e=>{await S(!0,e)}),[S]);or({onEnterFullscreen:()=>j(!0),onExitFullscreen:()=>j(!0)},[]),(0,p.useEffect)((()=>{S(!1)}),[d]),(0,p.useEffect)((()=>{if(!t)return;const e={dropdown:s.current,visible:null!==y,toggle:S,open:k,close:j};t instanceof Function?t(e):t.current=e}),[j,k,t,S,s,y]),(0,p.useEffect)((()=>{m(o)}),[o]),(0,p.useEffect)((()=>{d||"before-appear"!==y||x()}),[y,x,d]),(0,p.useEffect)((()=>{!1===i.enabled&&C(!1)}),[i.enabled]),(0,p.useEffect)((()=>{o?k():j()}),[o]);const R=(0,p.useMemo)((()=>{const e=u;return e.props&&"Menu"===e.props.type?(0,p.cloneElement)(e,Object.assign({},e.props,{className:a.elem("menu").mix(e.props.className)})):u}),[u]),E=(0,p.useMemo)((()=>{switch(y){case"before-appear":return"before-appear";case"appear":return"appear before-appear";case"before-disappear":return"before-disappear";case"disappear":return"disappear before-disappear";case"visible":return"visible";default:return o?"visible":null}}),[y,o]),A=(0,p.useMemo)((()=>{var e;return Object.assign({},null!=(e=i.style)?e:{},null!=f?f:{},{zIndex:(null!=c?c:1e3)+w})}),[i.style,w,c,f]),T=(0,_.jsx)(Ze.eB,{ref:s,name:"dropdown","data-testid":i.dataTestId,mix:[i.className,E],style:Object.assign({},A,{borderRadius:(0,O.VS)(O.bA)&&4}),onClick:e=>e.stopPropagation(),children:R});return!0===i.inline?T:(0,g.createPortal)(T,document.body)}));Y_.displayName="Dropdown";const X_=["tag","children","content","toggle","closeOnClickOutside","disabled"],q_=(0,p.forwardRef)(((e,t)=>{var n;let{tag:r,children:o,content:i,toggle:a,closeOnClickOutside:s=!0,disabled:l=!1}=e,c=(0,Yn.A)(e,X_);const d=null!=t?t:(0,p.useRef)(),u=p.Children.only(o),h=(0,p.useRef)(new Set),[g,m]=(0,p.useState)(1e3),f=(0,p.useRef)(null==u||null==(n=u.props)||null==(n=n.ref)?void 0:n.current),v=(0,p.useContext)(U_),y=(0,p.useCallback)((e=>{var t,n;const r=null==(t=f.current)||null==t.contains?void 0:t.contains(e),o=null==(n=d.current)||null==(n=n.dropdown)||null==n.contains?void 0:n.contains(e),i=Array.from(h.current).reduce(((t,n)=>t||n.hasTarget(e)),!1);return r||o||i}),[f,d]),b=(0,p.useCallback)((e=>{var t;s&&(y(e.target)||null==(t=d.current)||null==t.close||t.close())}),[s,y]),x=(0,p.useCallback)((e=>{var t,n,r;if(l)return;return(null==(t=d.current)||null==(t=t.dropdown)||null==t.contains?void 0:t.contains(e.target))?e.stopPropagation():!1===a?null==d||null==(n=d.current)?void 0:n.open():void(null==d||null==(r=d.current)||r.toggle())}),[d,l]),w=(0,p.useMemo)((()=>Object.assign({},u.props,{tag:r,key:"dd-trigger",ref:e=>{var t;f.current=null!=(t=f.current)?t:e,f.current&&m(Math.max(g,(e=>{let t=1e3;if(e){let o=e.parentElement;for(;o;){var n,r;const e=Number.parseInt(getComputedStyle(o).zIndex);isNaN(e)||(t=Math.max(t,e)),o=null!=(n=null==(r=o)?void 0:r.parentElement)?n:null}}return t})(f.current)))},className:(0,Ze.cn)("dropdown").elem("trigger").mix(c.className),onClickCapture:x})),[u,f,c.className,x]),C=(0,p.useMemo)((()=>(0,p.cloneElement)(u,w)),[u,w]),S=i?(0,_.jsx)(Y_,Object.assign({},c,{ref:d,children:i})):null;(0,p.useEffect)((()=>(document.addEventListener("click",b,{capture:!0}),()=>document.removeEventListener("click",b,{capture:!0}))),[b]);const j=(0,p.useMemo)((()=>({minIndex:g,triggerRef:f,dropdown:d,hasTarget:y,addChild:e=>h.current.add(e),removeChild:e=>h.current.delete(e),open:()=>{var e;return null==d||null==(e=d.current)||null==e.open?void 0:e.open()},close:()=>{var e;return null==d||null==(e=d.current)||null==e.close?void 0:e.close()}})),[f,d,g]);return(0,p.useEffect)((()=>{if(v)return v.addChild(j),()=>v.removeChild(j)}),[]),(0,_.jsxs)(U_.Provider,{value:j,children:[C,S]})})),J_=()=>(0,p.useContext)(U_),Q_=Object.assign(Y_,{Trigger:q_}),eA=(0,p.createContext)({multiple:!1,focused:!1,currentValue:[],setCurrentValue(){}}),{Block:tA,Elem:nA}=(0,Ze.JE)(),rA=(e,t)=>p.Children.toArray(e).reduce(((n,r)=>{if(null!==n)return n;const{type:o,props:i}=r;return"Select.Option"===o.displayName?i.value===t?n=r:Array.isArray(t)&&1===t.length&&(n=rA(e,t[0])):"Select.OptGroup"===o.displayName&&(n=rA(i.children,t)),n}),null),oA=({value:e,defaultValue:t,size:n,children:r,style:o,multiple:i,renderMultipleSelected:a,onChange:s,variant:l,surface:c,dataTestid:d,tabIndex:u=0,placeholder:h="Select value"})=>{const g=(0,p.useRef)(),m=(0,p.useRef)(),[f,v]=(0,p.useState)(i?[].concat(null!=e?e:[]).flat(10):e),[y,b]=(0,p.useState)(),x=p.Children.toArray(r).filter((e=>"Select.Option"===e.type.displayName&&!e.props.exclude)),C={currentValue:f,focused:y,multiple:i,setCurrentValue(e){const t=(e=>{let t=e;return i&&Array.isArray(f)&&e&&(t=!Array.isArray(e)&&f.includes(e)?f.filter((t=>t!==e)):[...f,e].flat(10)),v(t),t})(e);var n;(null==s||s(t),!0!==i)&&(null==(n=g.current)||n.close())}},S=(0,p.useMemo)((()=>{var e;if((0,O.VS)(O.fw)&&i&&a)return a(Array.isArray(f)?f:[f||""]);if(i&&Array.isArray(f)&&(null==f?void 0:f.length)>1)return(0,_.jsx)(_.Fragment,{children:"Multiple values selected"});const n=rA(r,null!=t?t:f),o=null==n||null==(e=n.props)?void 0:e.children;return o?(0,p.cloneElement)((0,_.jsx)(_.Fragment,{children:o})):null}),[f,t,r,e,a]),j=e=>{const t=x[null!=e?e:0];b(t.props.value)},k=(0,p.useCallback)((e=>{const t=x.findIndex((e=>e.props.value===y));let n=-1===t?0:t+e;n>=x.length?n=0:n<0&&(n=x.length-1),j(n)}),[y]);return(0,p.useEffect)((()=>{var t;i&&Array.isArray(e)&&Array.isArray(f)?!1===(0,$_.b)(null!=e?e:[],null!=f?f:[])&&C.setCurrentValue(null!=(t=null==e||null==e.flat?void 0:e.flat(10))?t:[]):e!==f&&C.setCurrentValue(e)}),[e,i]),(0,_.jsx)(eA.Provider,{value:C,children:(0,_.jsx)(tA,{ref:m,name:"select",mod:{size:n,surface:c},style:o,tabIndex:u,onKeyDown:e=>{var t;document.activeElement===m.current&&(["ArrowDown","ArrowUp"].includes(e.key)?null!=g&&g.current.visible?k("ArrowDown"===e.key?1:-1):(null==(t=g.current)||t.open(),j()):"Space"!==e.code&&"Enter"!==e.code||!(0,w.isDefined)(y)||C.setCurrentValue(y))},children:(0,_.jsx)(Q_.Trigger,{ref:g,className:(0,Ze.cn)("select",{elem:"dropdown",mod:{variant:l}}).toClassName(),content:(0,_.jsx)(nA,{name:"list",children:r}),onToggle:e=>{e||b(null)},children:(0,_.jsxs)(nA,{name:"selected","data-testid":d,children:[(0,_.jsx)(nA,{name:"value",children:null!=S?S:h}),(0,_.jsx)(nA,{name:"icon"})]})})})})};oA.displayName="Select";const iA=({value:e,children:t,style:n})=>{const{setCurrentValue:r,multiple:o,currentValue:i,focused:a}=(0,p.useContext)(eA),s=(0,p.useMemo)((()=>{const t=String(e);return o&&Array.isArray(i)?i.map((e=>String(e))).includes(t):t===String(i)}),[e,a,i]),l=(0,p.useMemo)((()=>String(e)===String(a)),[e,a]);return(0,_.jsx)(nA,{name:"option",mod:{selected:s,focused:l},onClick:t=>{t.stopPropagation(),r(e)},style:n,children:t})};iA.displayName="Select.Option";const aA=({label:e,children:t,style:n})=>(0,_.jsxs)(nA,{name:"optgroup",style:n,children:[(0,_.jsx)(nA,{name:"optgroup-label",children:e}),(0,_.jsx)(nA,{name:"optgroup-list",children:t})]});aA.displayName="Select.OptGroup",oA.Option=iA,oA.OptGroup=aA;const sA=({name:e,selected:t})=>{const n={border:`2px solid ${rn.Colors.convertToRGBA($R().make_color({seed:e})[0])}`};return(0,_.jsx)("span",{className:[N_.authorFilter__select__item,t&&N_.authorFilter__select__item_selected].join(" "),style:n,children:e})},lA=e=>0===e.length?null:(0,_.jsx)("div",{className:N_.authorFilter__select,children:e.map((e=>(0,_.jsx)(sA,{name:e},e)))}),cA=(0,y.PA)((({item:e,onChange:t})=>{const n=(0,p.useMemo)((()=>(0,_.jsx)("span",{className:N_.authorFilter__placeholder,children:"Show all authors"})),[]),r=e.filterByAuthor,o=(0,p.useMemo)((()=>e._value.reduce(((t,n)=>t.includes(n[e.namekey])?t:[...t,n[e.namekey]]),[]).sort()),[e._value,e.namekey]),i=e.searchAuthor?o.filter((t=>t.toLowerCase().includes(e.searchAuthor.toLowerCase()))):o,a=(0,p.useCallback)((n=>{!n||null!=n&&n.includes(null)?e.setAuthorFilter([]):e.setAuthorFilter(n),null==t||t()}),[e.setAuthorFilter]);return(0,_.jsx)("div",{className:N_.authorFilter,children:(0,_.jsxs)(oA,{placeholder:n,value:r,options:o,onChange:a,renderMultipleSelected:lA,size:"compact",variant:"rounded",surface:"emphasis",multiple:!0,children:[(0,_.jsx)("div",{className:N_.authorFilter__search,children:(0,_.jsx)("input",{autoComplete:"off",className:N_.authorFilter__search__input,name:"search_author",placeholder:"Search",onInput:t=>e.setAuthorSearch(t.target.value)})}),(0,_.jsx)(oA.Option,{value:null,exclude:!0,children:(0,_.jsx)("span",{className:N_.authorFilter__showall,children:"Show all authors"})},"showAllAuthors"),i.map((e=>(0,_.jsx)(oA.Option,{value:e,children:(0,_.jsx)(sA,{name:e,selected:!1})},e)))]})})})),dA=e=>{if(isNaN(e))return"";const t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.round(e%60);return`${String(t).padStart(2,"0")}:${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`},uA=(0,y.PA)((({item:e,playingId:t,activeRef:n,setIsInViewport:r})=>{const[o,i]=(0,p.useState)(null),[a,s]=(0,p.useState)(0),[l,c]=(0,p.useState)(null),d=e.layoutClasses,u=!!e.audio;let g;const m=(0,p.useCallback)(((t,n,r,o=!0)=>{if(!t||!(0,O.VS)(O.LG)||!e.contextscroll)return;const a=t.animate([{top:`${n}%`},{top:"100%"}],{easing:"linear",duration:1e3*r});o?a.play():a.pause(),i(a)}),[o,i]),f=(0,p.useCallback)((r=>{var o,i,s,l,d,u,h,g;if(!(0,O.VS)(O.LG)||!e.contextscroll)return;const p=(null==(o=e._value[t])?void 0:o.duration)||(null==(i=e._value[t])?void 0:i.end)-(null==(s=e._value[t])?void 0:s.start),f=(null!=(l=e._value[t])&&l.end?null==(h=e._value[t])?void 0:h.end:(null==(d=e._value[t])?void 0:d.start)+(null==(u=e._value[t])?void 0:u.duration))-a.time,v=100-100*f/p;v>0&&v<100?m(null==(g=n.current)?void 0:g.querySelector(".reading-line"),v,f,a.playing):c(r)}),[a,t]),v=(0,p.useCallback)((n=>{if(g&&g.disconnect(),null!==n){var o,i,a;const s=(null==(o=e._value[t])?void 0:o.duration)||(null==(i=e._value[t])?void 0:i.end)-(null==(a=e._value[t])?void 0:a.start);isNaN(s)||m(n,0,s,e.playing),g=new IntersectionObserver((e=>{r(e[0].isIntersecting)}),{rootMargin:"0px"}),g.observe(n)}}),[t]);if((0,p.useEffect)((()=>{var t;if((0,O.VS)(O.LG)&&e.contextscroll)return null==(t=e.syncHandlers)||t.set("seek",(t=>{e.handleSyncPlay(t),s(t),r(!0)})),()=>{var e;null==(e=g)||e.disconnect()}}),[]),(0,p.useEffect)((()=>{f(!0)}),[a]),(0,p.useEffect)((()=>{l&&f(!1)}),[t]),(0,p.useEffect)((()=>{(0,O.VS)(O.LG)&&e.contextscroll&&(e.playing?null==o||o.play():null==o||o.pause())}),[e.playing]),!e._value)return null;return e._value.map(((o,i)=>{const a=t===i,s=a&&e.playing,l=(0,O.VS)(O.LG)&&!a?e.layoutStyles(o).inactive:e.layoutStyles(o),c=[d.phrase],g=e.isVisibleForAuthorFilter(o);return u&&c.push(N_.withAudio),g||c.push(N_.collapsed),(0,h.Zn)(e).settings.showLineNumbers&&c.push(N_.numbered),(0,_.jsxs)("div",{ref:a?n:null,"data-testid":`phrase:${i}`,className:`${c.join(" ")} ${(0,O.VS)(O.LG)&&N_.newUI}`,style:null==l?void 0:l.phrase,children:[g&&u&&!isNaN(o.start)&&(0,_.jsx)(jr.A,{type:"text",className:(0,O.VS)(O.LG)?N_.playNewUi:N_.play,"aria-label":s?"pause":"play",icon:s?(0,O.VS)(O.LG)?(0,_.jsx)(qd,{}):(0,_.jsx)(kr.A,{}):(0,O.VS)(O.LG)?(0,_.jsx)(Wd,{}):(0,_.jsx)(Or.A,{}),onClick:()=>{r(!0),e.play(i)}}),(0,O.VS)(O.LG)?(0,_.jsxs)("span",{className:N_.titleWrapper,"data-skip-node":"true",children:[(0,_.jsx)("span",{className:null==d?void 0:d.name,style:null==l?void 0:l.name,children:o[e.namekey]}),(0,_.jsx)("span",{className:N_.time,children:(e=>{var t,n,r,o,a;return`${dA(null==(t=e._value[i])?void 0:t.start)} - ${dA(null!=(n=e._value[i])&&n.end?null==(a=e._value[i])?void 0:a.end:(null==(r=e._value[i])?void 0:r.start)+(null==(o=e._value[i])?void 0:o.duration))}`})(e)})]}):(0,_.jsx)("span",{className:null==d?void 0:d.name,"data-skip-node":"true",style:null==l?void 0:l.name,children:o[e.namekey]}),(0,O.VS)(O.LG)?(0,_.jsxs)("span",{className:N_.wrapperText,children:[a&&(0,_.jsx)("span",{ref:v,className:`${N_.readingLine} reading-line`,"data-skip-node":"true"}),(0,_.jsx)("span",{className:`${null==d?void 0:d.text}`,children:o[e.textkey]})]}):(0,_.jsx)("span",{className:`${null==d?void 0:d.text}`,children:o[e.textkey]})]},`${e.name}-${i}`)}))})),hA=["className","label","labelProps","description","checked","defaultChecked","onChange","required","style"],gA=(0,p.forwardRef)(((e,t)=>{var n;let{className:r,label:o,labelProps:i,description:a,checked:s,defaultChecked:l,onChange:c,required:d,style:u}=e,h=(0,Yn.A)(e,hA);const g=(0,Ze.cn)("toggle"),m=(0,p.useMemo)((()=>{var e;return null!=(e=null!=l?l:s)&&e}),[l,s]),[f,v]=(0,p.useState)(null!=(n=null!=l?l:s)&&n),y={};(0,p.useEffect)((()=>{v(m)}),[m]),f&&(y.checked=f),y.disabled=h.disabled;const b=(0,_.jsxs)(Ze.eB,{name:"toggle",className:r,mod:y,style:u,children:[(0,_.jsx)("input",Object.assign({ref:t},h,{className:g.elem("input"),type:"checkbox",checked:f,onChange:e=>{v(e.target.checked),null==c||c(e)}})),(0,_.jsx)(Ze.Sl,{tag:"span",name:"indicator"})]});return o?(0,_.jsx)(CC,Object.assign({ref:t,placement:"right",required:d,text:o,children:b,description:a},null!=i?i:{})):b})),mA={};(0,O.VS)(O.xS)&&(mA.crossOrigin="anonymous");class pA extends p.Component{constructor(e){super(e),this._regionSpanSelector=".htx-highlight",this.mainContentSelector=`.${(0,Ze.cn)("main-content").toClassName()}`,this.mainViewAnnotationSelector=`.${(0,Ze.cn)("main-view").elem("annotation").toClassName()}`,this._selectRegions=e=>{const{item:t}=this.props,n=this.myRef.current,r=window.getSelection(),o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i=[];for(;o.nextNode();){const e=o.currentNode;if("SPAN"===e.nodeName&&e.matches(this._regionSpanSelector)&&tn(e)){const t=this._determineRegion(e);i.push(t)}}i.length&&(e?t.annotation.extendSelectionWith(i):t.annotation.selectAreas(i),r.removeAllRanges())},this._handleScrollContainerHeight=()=>{requestAnimationFrame((()=>{var e,t;const n=this.myRef.current,r=document.querySelector(this.mainContentSelector),o=r.getBoundingClientRect(),i=document.documentElement.clientHeight-o.top,a=document.querySelector(this.mainViewAnnotationSelector),s=Math.floor(i{e.style.visibility="hidden"}));const o=[],i=window.getSelection();if(i.isCollapsed)return n.forEach((e=>{e.style.visibility="unset"})),[];for(r=0;r(e.isVisibleForAuthorFilter(n)&&a<=r&&d>=r&&t.push(r),t)),[]);if(c.length!==d-a+1){const e=this.phraseElements;let d=a;for(let u=0;uu&&(d=c[u+1])}}}else o.push({startOffset:n,start:String(r),endOffset:s,end:String(l),_range:t,text:this.removeSurroundingNewlines(i.toString())})}else o.push({startOffset:n,start:String(r),endOffset:s,end:String(l),_range:t,text:this.removeSurroundingNewlines(i.toString())})}catch(e){console.error("Can not get selection",e)}}return n.forEach((e=>{e.style.visibility="unset"})),i.removeAllRanges(),o}_determineRegion(e){if((0,je.matchesSelector)(e,this._regionSpanSelector)){const t="SPAN"===e.tagName?e:e.closest(this._regionSpanSelector),{item:n}=this.props;return n.regs.find((e=>e.find(t)))}}_disposeTimeout(){this.scrollTimeout.length>0&&(this.scrollTimeout.forEach((e=>clearTimeout(e))),this.scrollTimeout=[])}onMouseUp(e){const t=this.props.item,n=t.activeStates();if(!n||0===n.length||e.ctrlKey||e.metaKey)return this._selectRegions(e.ctrlKey||e.metaKey);const r=this.captureDocumentSelection();if(0!==r.length)if(t._currentSpan=null,(0,O.VS)(O.Gd)){const e=t.addRegions(r);for(const t of e){const e=t.createSpans();t.addEventsToSpans(e)}}else{const e=t.addRegion(r[0]);if(e){const t=e.createSpans();e.addEventsToSpans(t)}}}_getResultText(e,t,n,r){const o=this.phraseElements;return e===t?o[e].innerText.slice(n,r):[o[e].innerText.slice(n),o.slice(e+1,t).map((e=>e.innerText)),o[t].innerText.slice(0,r)].flat().join("")}_handleUpdate(){const e=this.myRef.current,{item:t}=this.props;if(t._value&&(t.regs.forEach(((n,r)=>{var o;if(null==(o=n._spans)||null==(o=o[0])||!o.isConnected)try{const o=e.children,i=document.createRange(),a=o[n.start].getElementsByClassName(t.layoutClasses.text)[0],s=o[n.end].getElementsByClassName(t.layoutClasses.text)[0];let{startOffset:l,endOffset:c}=n;if(i.setStart(...(0,je.findNodeAt)(a,l)),i.setEnd(...(0,je.findNodeAt)(s,c)),n.text&&i.toString().replace(/\s+/g,"")!==n.text.replace(/\s+/g,"")){if(console.info("Restore broken position",r,i.toString(),"->",n.text,n),t.regs.slice(0,r).some((e=>n.start===e.end))&&n.start===n.end){const e=a.textContent.match(new RegExp(n.text.replace(/\s+/g,"\\s+")));e||console.warn("Can't find the text",n);const{index:t=0}=e||{};n.endOffset-n.startOffset!==n.text.length&&console.warn("Text length differs from region length; possible regions overlap"),l=t,c=l+n.text.length,i.setStart(...(0,je.findNodeAt)(a,l)),i.setEnd(...(0,je.findNodeAt)(s,c)),n.fixOffsets(l,c)}}else!n.text&&i.toString()&&n.setText(this._getResultText(+n.start,+n.end,l,c));(0,je.splitBoundaries)(i),n._range=i;const d=n.createSpans();n.addEventsToSpans(d)}catch(e){console.log(e,n)}})),Array.from(this.myRef.current.getElementsByTagName("a")).forEach((e=>{e.addEventListener("click",(e=>(e.preventDefault(),!1)))})),(0,O.VS)(O.LG)&&this.props.item.contextscroll&&t.playingId>=0&&this.lastPlayingId!==t.playingId&&this.state.canScroll)){var n,r,o,i,a;const s=Number.parseInt(null==(n=window.getComputedStyle(this.myRef.current))?void 0:n.getPropertyValue("padding-top"))||0,l=this.props.item._value[t.playingId],c=l.start,d=l.end,u=(null==(r=this.activeRef.current)?void 0:r.offsetHeight)||0,h=this.props.item._value[t.playingId].duration||d-c,g=e.offsetHeight,m=(null==(o=this.activeRef.current)?void 0:o.offsetTop)-s,p=Math.ceil((null==(i=this.activeRef.current)?void 0:i.offsetHeight)/(null==(a=this.myRef.current)?void 0:a.offsetHeight))+1;if(this._disposeTimeout(),u>g)for(let t=0;t{const n=m+u*(t*(1/p));this.state.inViewPort&&this.state.canScroll&&e.scrollTo({top:n,behavior:"smooth"})}),h/p*t*1e3));else this.state.inViewPort&&e.scrollTo({top:m,behavior:"smooth"});this.lastPlayingId=t.playingId}}_handleScrollToPhrase(){var e,t;const n=Number.parseInt(null==(e=window.getComputedStyle(this.myRef.current))?void 0:e.getPropertyValue("padding-top"))||0,r=(null==(t=this.activeRef.current)?void 0:t.offsetTop)-n;this.myRef.current.scrollTo({top:r,behavior:"smooth"})}componentDidUpdate(){this._handleUpdate()}componentDidMount(){(0,O.VS)(O.LG)&&this.props.item.contextscroll&&this._resizeObserver.observe(document.querySelector(this.mainContentSelector)),this._handleUpdate()}componentWillUnmount(){var e,t;const n=document.querySelector(this.mainContentSelector);n&&(null==(e=this._resizeObserver)||e.unobserve(n)),null==(t=this._resizeObserver)||t.disconnect()}setIsInViewPort(e){this.setState({inViewPort:e})}renderWrapperHeader(){const{item:e}=this.props;return(0,_.jsxs)("div",{className:N_.wrapper_header,children:[(0,O.VS)(O.fw)&&(0,_.jsx)(cA,{item:e,onChange:()=>{if(!this.activeRef.current)return;const e=1e3*Number.parseFloat(window.getComputedStyle(this.activeRef.current).transitionDuration);setTimeout((()=>{this._handleScrollToPhrase()}),e)}}),e.contextscroll&&(0,_.jsxs)("div",{className:N_.wrapper_header__buttons,children:[(0,_.jsx)(gA,{"data-testid":"auto-scroll-toggle",checked:this.state.canScroll,onChange:()=>{this.state.canScroll||this._handleScrollToPhrase(),this.setState({canScroll:!this.state.canScroll})},label:"Auto-scroll"}),(0,_.jsx)(ir,{placement:"topLeft",title:"Automatically sync transcript scrolling with audio playback",children:(0,_.jsx)(ru,{})})]})]})}render(){const{item:e}=this.props,t=!!e.audio,n=(0,O.VS)(O.LG)&&this.props.item.contextscroll;return!e.playing&&(0,O.VS)(O.LG)&&this._disposeTimeout(),(0,O.VS)(O.fw)&&!e._value?null:(0,_.jsxs)(_n,{item:e,className:(0,Ze.cn)("paragraphs").toClassName(),children:[t&&(0,_.jsx)("audio",Object.assign({},mA,{controls:e.showplayer&&!e.syncedAudio,className:N_.audio,src:e.audio,ref:e.audioRef,onLoadedMetadata:e.handleAudioLoaded,onEnded:e.reset,onError:e.handleError,onCanPlay:e.handleCanPlay})),(0,O.VS)(O.LG)?this.renderWrapperHeader():(0,O.VS)(O.fw)&&(0,_.jsx)(cA,{item:e}),(0,_.jsx)("div",{ref:this.myRef,"data-testid":"phrases-wrapper","data-update":e._update,className:n?N_.scroll_container:N_.container,onMouseUp:this.onMouseUp.bind(this),children:(0,_.jsx)(uA,Object.assign({setIsInViewport:this.setIsInViewPort.bind(this),item:e,playingId:e.playingId},(0,O.VS)(O.LG)?{activeRef:this.activeRef}:{}))})]})}}const fA=(0,y.WQ)("store")((0,y.PA)(pA));x.addTag("paragraphs",W_,fA),x.addObjectType(W_);class vA{constructor(e,t,n,r,o){this.node=void 0,this.start=void 0,this.end=void 0,this.content=void 0,this.path=void 0,this.node=e,this.start=t,this.end=n,this.content=r,this.path=o}getContent(e,t){return this.content.slice(Math.max(e-this.start,0),Math.min(t-this.start,this.end))}get text(){return this.content.join("")}getText(e,t){return this.getContent(e,t).join("")}createSubtext(e,t){e=Math.max(this.start,e),t=Math.min(this.end,t);const{node:n}=this,r=n.cloneNode(),o=this.getContent(e,t);return r.textContent&&(r.textContent=[...r.textContent].slice(e-this.start,t-this.start).join("")),new vA(r,e,t,o)}wrapWithSpan(){const{node:e,start:t,end:n}=this,r=e.ownerDocument,o=e.parentNode,i=r.createTextNode(""),a=r.createElement("span");null==o||o.replaceChild(i,e),a.appendChild(e),null==o||o.replaceChild(a,i);const s=new bA(a,t,n);return s.children.push(this),s}createSpanElements(e,t){const{node:n}=this,r=n.ownerDocument,o=n.parentNode,i=r.createDocumentFragment(),a=r.createTextNode(""),s=[];e>this.start&&s.push(this.createSubtext(this.start,e));const l=this.createSubtext(e,t).wrapWithSpan();return s.push(l),t{i.appendChild(e.node)})),o.replaceChild(a,n),o.replaceChild(i,a),s}removeNode(){const{node:e}=this;e.parentNode.removeChild(e)}mergeWith(e){this.node.data+=e.map((e=>e.node.data)).join(""),this.end=e[e.length-1].end,this.content.push(...e.flatMap((e=>e.content)))}}class yA{constructor(e,t=e){this.start=void 0,this.end=void 0,this.children=[],this.start=e,this.end=t}findTextElement(e,t="start"){const n=this.children.find((n=>n.start<=e&&n.end>=e&&n[t]!==e));return n instanceof bA?n.findTextElement(e,t):n instanceof vA?n:void 0}findElementByNode(e){for(const t of this.children){if(t.node===e)return t;if(t instanceof bA){const n=t.findElementByNode(e);if(n)return n}}}getText(e,t){const n=[];return this.children.forEach((r=>{r.end>e&&r.start{s.appendChild(e.node)})),i.replaceChild(s,a);const l=new bA(s,t.start,n.end);return l.children.push(...e),l}createSpans(e,t){const n=[],r=[];let o=[];for(const i of this.children){const a=i instanceof vA;if(i.start>=e&&i.end<=t)o.push(i);else{if(o.length){const e=this.wrapElementsWithSpan(o);r.push(e),n.push(e.node),o=[]}if(e>=i.start&&ei.start&&t<=i.end)if(a){const o=i.createSpanElements(e,t);r.push(...o),n.push(...o.filter((e=>e instanceof bA)).map((e=>e.node)))}else r.push(i),n.push(...i.createSpans(e,t));else r.push(i)}}if(o.length){const e=this.wrapElementsWithSpan(o);r.push(e),n.push(e.node)}return this.children=r,n}removeSpans(e){for(let t=this.children.length-1;t>=0;t--){const n=this.children[t];n instanceof bA&&(e.includes(n.node)?(n.removeNode(),this.children.splice(t,1,...n.children)):n.removeSpans(e))}let t=[];const n=[],r=()=>{if(t.length>0){const e=t[0];if(t.length>1){const n=t.slice(1);e.mergeWith(n),n.forEach((e=>e.removeNode()))}n.push(e),t=[]}};for(const e of this.children)e instanceof vA&&(0===t.length||t[t.length-1].node.nextSibling===e.node)?t.push(e):(r(),n.push(e));r(),this.children=n}}class bA extends yA{constructor(e,t,n){super(t,n),this.node=void 0,this.node=e}removeNode(){const{node:e}=this,t=e.ownerDocument,n=e.parentNode,r=t.createDocumentFragment();for(;e.firstChild;)r.appendChild(e.firstChild);n.replaceChild(r,e)}}class xA extends yA{constructor(e,t){super(e),this.path=void 0,this.content=[],this.path=t}addTextNode(e,t,n,r,o){this.content=r,this.children.push(new vA(e,t,n,r,o)),this.end=n}getRelativeOffsetByGlobal(e){return this.content.slice(0,e-this.start).map((e=>""===e?" ":e)).join("").length}getGlobalOffsetByRelative(e){let t=e;const n=0===e?0:1+this.content.findIndex((e=>(""===e?t--:t-=e.length,t<=0)));return this.start+n}}class wA{constructor(e,t,n){this.node=void 0,this.start=void 0,this.path=void 0,this.node=e,this.start=t,this.path=n}getText(){return""}}class CA{constructor(){this.elements=[],this.endPos=void 0,this.displayedText="",this.displayedTextPos=0,this.endPos=0}createDynamicBlock(e){const{endPos:t}=this,n=new xA(t,e);return this.elements.push(n),n}setDisplayedText(e){this.displayedText=e}addStaticElement(e,t){this.elements.push(new wA(e,this.endPos,t.toString()))}addExtraText(e){let t=this.elements.length-1;for(;!(this.elements[t]instanceof xA)&&t>-1;)--t;this.elements.splice(t+1,0,function(e){return e.replace(/[\n\r]/g,"\\n")}(e))}findProjectionOnDisplayedText(e){const{displayedText:t}=this;let n=this.displayedTextPos;const r=[];for(;"\n"===t[n]||"\r"===t[n];)n++;let o=n;for(const n of e){const e=t.substring(o,o+n.length);e===n||" "===e&&"\n"===n?(r.push(e),o+=n.length):r.push("")}return{fromIdx:n,toIdx:o,content:r.flatMap((e=>e?[...e]:e))}}addTextElement(e,t){const{displayedText:n}=this,r=e.textContent;let o=n.indexOf(r,this.displayedTextPos),i=[...r];const a=i.length;let s=r.length;if(-1===o||o-this.displayedTextPos>1){const{fromIdx:e,toIdx:t,content:n}=this.findProjectionOnDisplayedText(r);o=e,s=t-e,i=n}o!==this.displayedTextPos&&(this.addExtraText(this.displayedText.substring(this.displayedTextPos,o)),this.displayedTextPos=o);this.createDynamicBlock(t.toString()).addTextNode(e,this.endPos,this.endPos+a,i,t.toString()),this.endPos+=a,this.displayedTextPos+=s}addBR(){this.endPos+=1}findTextElement(e,t="start"){var n;return null==(n=this.findTextBlock(e,t))?void 0:n.findTextElement(e,t)}findElementByPath(e){for(const t of this.elements)if("string"!=typeof t&&t.path===e)return t}getNextElement(e){let t=this.elements.indexOf(e);for(;!(this.elements[t+1]instanceof wA||this.elements[t+1]instanceof xA);)if(t++,t>=this.elements.length-1)return;return this.elements[t+1]}getEndOf(e){if(e instanceof bA||e instanceof vA)return e.end;const t=this.getNextElement(e);return t?t.start:this.endPos}findElementByNode(e){for(const t of this.elements)if(t instanceof wA){if(t.node===e)return t}else if(t instanceof xA){const n=t.findElementByNode(e);if(n)return n}}findTextBlock(e,t="start"){const n=this.elements.find((n=>n instanceof xA&&n.start<=e&&n.end>=e&&n[t]!==e));return(0,w.isDefined)(n),n}indexOfTextBlock(e,t="start"){return this.elements.findIndex((n=>n instanceof xA&&n.start<=e&&n.end>=e&&n[t]!==e))}getText(e,t){const n=this.indexOfTextBlock(e,"end"),r=this.indexOfTextBlock(t,"start");return this.elements.slice(n,r+1).map((n=>"string"!=typeof n?n.getText(e,t):n)).join("")}collectBlocks(e,t){const n=this.indexOfTextBlock(e,"end"),r=Math.max(this.indexOfTextBlock(t,"start"),n);return this.elements.slice(n,r+1).filter((e=>e instanceof xA))}createSpans(e,t){tn.createSpans(e,t))))}removeSpans(e,t,n){const r=this.collectBlocks(t,n);for(const t of r)t.removeSpans(e)}destroy(){this.elements=[]}}class SA{constructor(){this.segments=[],this.counters=[]}get currentSegment(){return this.segments[this.segments.length-1]}get currentCounters(){return this.counters[this.counters.length-1]}getSegmentName(e){return e.nodeType===Node.TEXT_NODE?"text()":e.nodeName.toLowerCase()}into(e){const t=this.getSegmentName(e);this.segments.push([t,1]),this.counters.push({[t]:1})}next(e){const t=this.getSegmentName(e);this.currentCounters[t]||(this.currentCounters[t]=0),this.currentSegment[0]=t,this.currentSegment[1]=++this.currentCounters[t]}outOf(){this.segments.pop(),this.counters.pop()}toString(){return`/${this.segments.map((e=>`${e[0]}[${e[1]}]`)).join("/")}`}}class jA{constructor(e){if(this.container=void 0,this.root=void 0,this.doc=void 0,this.view=void 0,this.domData=void 0,this.fragment=void 0,this.styleTags=void 0,this.walker=null,this.currentPath=new SA,this.container=e,e instanceof HTMLIFrameElement){const e=this.container.contentDocument;this.root=e.body}else this.root=e;this.doc=this.root.ownerDocument,this.view=this.doc.defaultView,this.domData=new CA,this.fragment=document.createDocumentFragment(),this.styleTags={},this.initDataMap()}nextStep(e=!1){const t=this.walker,n=this.currentPath;let r;return!e&&(r=t.firstChild(),r)?(n.into(r),r):(r=t.nextSibling(),r?(n.next(r),r):(r=t.parentNode(),n.outOf(),r?this.nextStep(!0):r))}initDataMap(){const{doc:e,root:t,domData:n}=this,r=this.walker=e.createTreeWalker(t,NodeFilter.SHOW_ALL);let o;for(this.currentPath=new SA,o=r.currentNode,n.setDisplayedText(this.collectText());o;){const e=o.nodeType===Node.TEXT_NODE,t="BR"===o.nodeName;e?n.addTextElement(o,this.currentPath):t?n.addBR():n.addStaticElement(o,this.currentPath),o=this.nextStep()}this.walker=null}collectText(){const{root:e,view:t}=this,n=t.getSelection(),r=new Range,o=[];for(let e=0;e({get _hasSpans(){return!!e._spans&&e._spans.every((e=>e.isConnected))},get identifier(){return`${e.id.split("#")[0]}-${e.ouid}`},get className(){return`${kA}-${e.identifier}`},get classNames(){var t;const n=[kA,e.className];return(null!=(t=e.parent.showlabels)?t:e.store.settings.showLabels)||n.push(OA),(0,w.isDefined)(e.parent.showlabels)&&n.push("htx-manual-label"),n},get styles(){const{className:t}=e,n=e.getLabelColor(),r=rn.Colors.rgbaChangeAlpha(n,.8);return`\n .${t} {\n background-color: ${n} !important;\n border: 1px dashed transparent;\n }\n .${t}.${EA.active}:not(.${EA.hidden}) {\n color: ${rn.Colors.contrastColor(r)} !important;\n background-color: ${r} !important;\n }\n `}}))).actions((e=>({applyHighlight(t=!1){var n,r;if((0,O.VS)(O.Er)){var o;if(e._hasSpans)return;return e._spans=e.parent.createSpansByGlobalOffsets(e.globalOffsets),null==(o=e._spans)||o.forEach((t=>t.className=e.classNames.join(" "))),e.updateSpans(),void(t||e.parent.setStyles({[e.identifier]:e.styles}))}if(!1===e.parent.isLoaded)return;const i=Boolean(null==(n=e._spans)||null==(n=n[0])||null==(n=n.ownerDocument)?void 0:n.defaultView);if(e._hasSpans&&i)return;const a=e.getRangeToHighlight(),s=e._getRootNode();if(!a)return void console.warn("No range found to highlight");if(!s)return;const l=e.getLabelColor(),c=E(5),d=_A(s.ownerDocument,c,l),u=["htx-highlight",d.className];return(null!=(r=e.parent.showlabels)?r:e.store.settings.showLabels)||u.push(OA),(0,w.isDefined)(e.parent.showlabels)&&u.push("htx-manual-label"),e._stylesheet=d,e._spans=rn.Selection.highlightRange(a,{classNames:u,index:e.region_index,label:e.getLabels()}),e._spans},updateHighlightedText(){if(!e.text){if((0,O.VS)(O.Er))return void(e.text=e.parent.getTextFromGlobalOffsets(e.globalOffsets));const t=e.getRangeToHighlight(),n=e._getRootNode();if(!t||!n)return;const r=n.ownerDocument.defaultView.getSelection();r.removeAllRanges(),r.addRange(t),e.text=String(r),r.removeAllRanges()}},updateSpans(){var t;if(e._hasSpans||(0,O.VS)(O.Er)&&null!=(t=e._spans)&&t.length){const t=e._spans[e._spans.length-1];rn.Selection.applySpanStyles(t,{index:e.region_index,label:e.getLabels()})}},clearSpans(){e._spans=null},removeHighlight(){if((0,O.VS)(O.Er)){var t,n;if(e.globalOffsets)null==(n=e.parent)||n.removeSpansInGlobalOffsets(e._spans,e.globalOffsets);null==(t=e.parent)||t.removeStyles([e.identifier])}else rn.Selection.removeRange(e._spans)},updateAppearenceFromState(){var t;if(null==(t=e._spans)||!t.length)return;const n=e._spans[e._spans.length-1];(0,O.VS)(O.Er)?null==e.parent.setStyles||e.parent.setStyles({[e.identifier]:e.styles}):e._stylesheet.setColor(e.getLabelColor()),rn.Selection.applySpanStyles(n,{index:e.region_index,label:e.getLabels()})},selectRegion(){var t;e.annotation.setHighlightedNode(e),e.addClass(EA.active);const n=null==(t=e._spans)?void 0:t[0];n&&(n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded():n.scrollIntoView({block:"center",behavior:"smooth"}))},afterUnselectRegion(){var t;e.removeClass((0,O.VS)(O.Er)?EA.active:null==(t=e._stylesheet)?void 0:t.state.active)},beforeDestroy(){var t;if((0,O.VS)(O.Er))null==(t=e.parent)||t.removeStyles([e.identifier]);else try{e._stylesheet.remove()}catch(e){}},setCursor(t){var n;null==(n=e._stylesheet)||n.setCursor(t)},setHighlight(t){var n,r;(e._stylesheet||(0,O.VS)(O.Er)&&e._spans)&&(e._highlighted=t,e.highlighted?(0,O.VS)(O.Er)?e.addClass(EA.highlighted):(e.addClass(e._stylesheet.state.highlighted),null==(n=e._stylesheet)||n.setCursor(V.A.LINKING_MODE_CURSOR)):(0,O.VS)(O.Er)?e.removeClass(EA.highlighted):(e.removeClass(e._stylesheet.state.highlighted),null==(r=e._stylesheet)||r.setCursor(V.A.POINTER_CURSOR)))},getLabels(){var t,n;return[e.region_index,(null!=(t=null==(n=e.labeling)?void 0:n.selectedLabels)?t:[]).map((e=>e.value)).join(",")].filter(Boolean).join(":")},getLabelColor(){const t=e.parent.highlightcolor||(e.style||e.tag||V.l).fillcolor;return rn.Colors.convertToRGBA(null!=t?t:"#DA935D",.3)},find:t=>e._spans&&e._spans.indexOf(t)>=0?e:void 0,addClass(t){if(!t||!e._spans)return;const n=[].concat(t);e._spans.forEach((e=>e.classList.add(...n)))},removeClass(t){if(!t||!e._spans)return;const n=[].concat(t);e._spans.forEach((e=>e.classList.remove(...n)))},toggleHidden(t){e.hidden=!e.hidden,e.hidden?e.addClass("__hidden"):e.removeClass("__hidden"),null==t||t.stopPropagation()}}))),EA={active:"__active",highlighted:"__highlighted",collapsed:"__collapsed",hidden:"__hidden",noLabel:OA},_A=(e,t,n)=>{var r;const o=`.htx-highlight-${t}`,i={color:`--background-color-${t}`,cursor:`--cursor-style-${t}`},a=`${o}.${EA.active}:not(.${EA.hidden})`,s=`${o}.${EA.highlighted}`,l=e=>rn.Colors.rgbaChangeAlpha(e,.8),c=l(n);e.documentElement.style.setProperty(i.color,n);const d={[o]:`\n background-color: var(${i.color}) !important;\n cursor: var(${i.cursor}, pointer);\n border: 1px dashed transparent;\n `,[`${o}[data-label]::after`]:"\n padding: 2px 2px;\n font-size: 9.5px;\n font-weight: bold;\n font-family: var(--font-mono);\n vertical-align: super;\n content: attr(data-label);\n line-height: 0;\n ",[a]:`\n color: ${rn.Colors.contrastColor(c)} !important;\n ${i.color}: ${c}\n `,[s]:"\n position: relative;\n border-color: rgb(0, 174, 255);\n ",[`${o}.${EA.hidden}`]:`\n border: none;\n padding: 0;\n pointer-events: none;\n ${i.color}: transparent;\n `,[`${o}.${EA.hidden}::before`]:"\n display: none\n ",[`${o}.${EA.hidden}::after`]:"\n display: none\n ",[`${o}.${EA.noLabel}::after`]:"\n display: none\n "},u=e.createElement("style");u.type="text/css",u.id=`highlight-${t}`,e.head.appendChild(u);const h=null!=(r=u.sheet)?r:u.styleSheet,g=!!h.insertRule;let m=0;for(const e in d)Object.prototype.hasOwnProperty.call(d,e)&&(g?h.insertRule(`${e} { ${d[e]} } `,m++):h.addRule(e,d));return{className:o.substr(1),state:EA,setColor:e=>{var t;const n=l(e),r=[...(null!=(t=u.sheet)?t:u.styleSheet).rules].find((e=>e.selectorText.includes("__active"))),{style:o}=r;u.ownerDocument.documentElement.style.setProperty(i.color,e),o.setProperty(i.color,n),o.color=rn.Colors.contrastColor(n)},setCursor:e=>{u.ownerDocument.documentElement.style.setProperty(i.cursor,e)},remove:()=>{u.remove()}}},AA=()=>"Do not put text directly in task data if you use valueType=url.",TA=e=>`URL (${(0,w.escapeHtml)(e)}) is not valid.`,PA=()=>'In SECURE MODE valueType is set to "url" by default.',IA=h.gK.model("RichTextModel",{value:h.gK.maybeNull(h.gK.string),valuetype:h.gK.optional(h.gK.enumeration(["text","url"]),(()=>window.LS_SECURE_MODE?"url":"text")),inline:!1,savetextresult:h.gK.optional(h.gK.enumeration(["none","no","yes"]),(()=>window.LS_SECURE_MODE?"no":"none")),selectionenabled:h.gK.optional(h.gK.boolean,!0),clickablelinks:!1,highlightcolor:h.gK.maybeNull(Re.color),showlabels:h.gK.maybeNull(h.gK.boolean),encoding:h.gK.optional(h.gK.enumeration(["none","base64","base64unicode"]),"none"),granularity:h.gK.optional(h.gK.enumeration(["symbol","word","sentence","paragraph"]),"symbol")}),LA=h.gK.model("RichTextModel",{type:"richtext",_value:h.gK.optional(h.gK.maybeNull(h.gK.string),null)}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t?t.filter((e=>e.isLabeling&&e.isSelected)):null},get isLoaded(){var t;return e._isLoaded&&e._loadedForAnnotation===(null==(t=e.annotation)?void 0:t.id)},get isReady(){return e.isLoaded&&e._isReady},get styles(){return`\n .htx-highlight {\n cursor: pointer;\n border: 1px dashed transparent;\n }\n .htx-highlight[data-index]::after,\n .htx-highlight[data-label]::after {\n padding: 2px 2px;\n font-size: 9.5px;\n font-weight: bold;\n font-family: var(--font-mono);\n vertical-align: super;\n content: attr(data-label);\n line-height: 0;\n }\n .htx-highlight[data-index]:not([data-label])::after {\n content: attr(data-index);\n }\n .htx-highlight.${EA.highlighted} {\n position: relative;\n cursor: ${V.A.LINKING_MODE_CURSOR};\n border-color: rgb(0, 174, 255);\n }\n .htx-highlight.${EA.hidden} {\n border: none;\n padding: 0;\n background: transparent !important;\n cursor: inherit;\n // pointer-events: none;\n }\n .htx-highlight.${EA.hidden}::before,\n .htx-highlight.${EA.hidden}::after,\n .htx-highlight.${EA.noLabel}::after {\n display: none;\n }\n `}}))).volatile((()=>({visibleNodeRef:(0,p.createRef)(),workingNodeRef:(0,p.createRef)(),originalContentRef:(0,p.createRef)(),useWorkingNode:!1,_isReady:!1,regsObserverDisposer:null,_isLoaded:!1,_loadedForAnnotation:null}))).actions((e=>{let t,n,r;return{setWorkingMode(t){e.useWorkingNode=t},setLoaded(t=!0){var n;t&&e.onLoaded(),e._isLoaded=t,e._loadedForAnnotation=null==(n=e.annotation)?void 0:n.id},onLoaded(){e.visibleNodeRef.current&&(0,O.VS)(O.Er)&&(r=new jA(e.visibleNodeRef.current))},onDispose(){e.regs.forEach((e=>{e.clearSpans()}))},updateValue:(0,h.L3)((function*(t){const n=j(e.value,t.task.dataObj),r=yield e.resolveValue(n);if("url"===e.valuetype){const t=r;if(!(0,w.isValidObjectURL)(t,!0)){const n=[TA(t),AA()];return window.LS_SECURE_MODE&&n.unshift(PA()),e.annotationStore.addErrors([Kj.generalError(n.join("
\n"))]),void e.setRemoteValue("")}try{const n=yield fetch(t),{ok:r,status:o,statusText:i}=n;if(!r)throw new Error(`${o} ${i}`);e.setRemoteValue(yield n.text())}catch(n){const r=Ge.A.ERR_LOADING_HTTP({attr:e.value,error:String(n),url:t});e.annotationStore.addErrors([Kj.generalError(r)]),e.setRemoteValue("")}}else e.setRemoteValue(r)})),setRemoteValue(t){e.loaded=!0,"base64"===e.encoding&&(t=atob(t)),"base64unicode"===e.encoding&&(t=rn.Checkers.atobUnicode(t)),(0,O.VS)(O.pN)&&"text"===e.type?e._value=String(t):e._value=(0,je.sanitizeHtml)(String(t)),e._regionsCache.forEach((({region:t,annotation:n})=>{t.setText(e._value.substring(t.startOffset,t.endOffset)),e.regions.push(t),n.addRegion(t)})),e._regionsCache=[]},afterCreate(){e._regionsCache=[],"text"===e.type&&(e.inline=!0),"none"===e.savetextresult&&("url"===e.valuetype?e.savetextresult="no":"text"===e.valuetype&&(e.savetextresult="yes"))},beforeDestroy(){var o,i;(null==e.regsObserverDisposer||e.regsObserverDisposer(),(0,O.VS)(O.Er))&&(null==(o=r)||o.removeStyles(e.name),null==(i=r)||i.destroy(),t=null,n=null,r=null)},setNeedsUpdateCallbacks(e,r){t=e,n=r},needsUpdate(){if(!1!==e.isLoaded){if(e.setReady(!1),(0,O.VS)(O.Er)){const t={[e.name]:e.styles};e.regs.forEach((e=>{try{e.initRangeAndOffsets(),e.applyHighlight(!0),e.updateHighlightedText(),t[e.identifier]=e.styles}catch(e){console.error(e)}})),e.setStyles(t)}else null==t||t(),e.regs.forEach((e=>{try{e.initRangeAndOffsets(),e.applyHighlight()}catch(e){console.error(e)}})),null==n||n(),e.regs.forEach((e=>{try{e.updateHighlightedText()}catch(e){console.error(e)}}));e.setReady(!0)}},setStyles(e){r.setStyles(e)},removeStyles(e){var t;null==(t=r)||t.removeStyles(e)},globalOffsetsToRelativeOffsets:({start:e,end:t})=>r.globalOffsetsToRelativeOffsets(e,t),relativeOffsetsToGlobalOffsets:(e,t,n,o)=>r.relativeOffsetsToGlobalOffsets(e,t,n,o),rangeToGlobalOffset:e=>r.rangeToGlobalOffset(e),createSpansByGlobalOffsets:({start:e,end:t})=>r.createSpans(e,t),removeSpansInGlobalOffsets(e,{start:t,end:n}){var o;return null==(o=r)?void 0:o.removeSpans(e,t,n)},getTextFromGlobalOffsets:({start:e,end:t})=>r.getText(e,t),setHighlight(t){e.regs.forEach((e=>e.setHighlight(!1))),t&&t.annotation.isLinkingMode&&t.setHighlight(!0)},addRegion(t,n){var r,o,i;const a=e.getAvailableStates();if(0===a.length)return;const[s,...l]=a,c=null!=(r=null==n?void 0:n.value)?r:s.selectedValues(),d={[s.valueType]:c},u=l.map((e=>yO(e))),g=e.annotation.createResult(t,d,s,e),m=e.visibleNodeRef.current,p=null!=(o=null==m||null==(i=m.contentDocument)?void 0:i.body)?o:m;u.forEach((e=>{g.setValue(e),(0,h.zr)(e)})),g._range=t._range;const[f,v]=Qt(t._range,p);if(g.updateGlobalOffsets(f,v),t.isText)g.updateTextOffsets(f,v);else if((0,O.VS)(O.Er))g.updateXPathsFromGlobalOffsets();else{const e=g._getRootNode(!0),t=Gt(f,v,e);t&&g._fixXPaths(t,e)}return g.applyHighlight(),g.notifyDrawingFinished(),g}}})),MA=h.gK.compose("RichTextModel",ze,bn,it,Pe,Le,IA,LA);var KA=n(71161);class DA extends p.Component{constructor(...e){super(...e),this._regionSpanSelector=".htx-highlight",this._regionVisibleSpanSelector=".htx-highlight:not(.__hidden)",this.loadingRef=p.createRef(),this.doubleClickSelection=void 0,this._selectRegions=e=>{const{item:t}=this.props,n=t.visibleNodeRef.current,r=window.getSelection(),o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT),i=[];for(;o.nextNode();){const e=o.currentNode;if("SPAN"===e.nodeName&&e.matches((0,O.VS)(O.Er)?this._regionVisibleSpanSelector:this._regionSpanSelector)&&r.containsNode(e)){const t=this._determineRegion(e);i.push(t)}}i.length&&(t.annotation.extendSelectionWith(i),e?t.annotation.extendSelectionWith(i):t.annotation.selectAreas(i),r.removeAllRanges())},this._onMouseUp=e=>{var t,n,r,o,i,a;const{item:s}=this.props,l=s.activeStates(),c=s.visibleNodeRef.current,d=null!=(t=null==c||null==(n=c.contentDocument)?void 0:n.body)?t:c;if(!l||0===l.length||e.ctrlKey||e.metaKey)return this._selectRegions(e.ctrlKey||e.metaKey);if(!1===s.selectionenabled||s.annotation.isReadOnly())return;const u=null==(r=l[0])||null==(r=r.selectedLabels)?void 0:r[0],h=null==(o=l[0])||null==o.selectedValues?void 0:o.selectedValues();rn.Selection.captureSelection((({selectionText:t,range:n})=>{if(!n||n.collapsed||!d.contains(n.startContainer)||!d.contains(n.endContainer))return;qt(n);const r=KA.fromRange(n,d);r&&(this.doubleClickSelection&&(Date.now()-this.doubleClickSelection.time>450||Math.abs(e.pageX-this.doubleClickSelection.x)>5||Math.abs(e.pageY-this.doubleClickSelection.y)>5)&&(this.doubleClickSelection=void 0),r._range=n,r.text=t,r.isText="text"===s.type,s.addRegion(r,this.doubleClickSelection))}),{window:null!=(i=null==c?void 0:c.contentWindow)?i:window,granularity:null!=(a=null==u?void 0:u.granularity)?a:s.granularity,beforeCleanup:()=>{this.doubleClickSelection=void 0,this._selectionMode=!0}}),this.doubleClickSelection={time:Date.now(),value:null!=h&&h.length?h:void 0,x:e.pageX,y:e.pageY}},this._onRegionClick=e=>{if(this._selectionMode)return void(this._selectionMode=!1);if(!this.props.item.clickablelinks&&(0,je.matchesSelector)(e.target,"a[href]"))return void e.preventDefault();const t=this._determineRegion(e.target);t&&(t&&t.onClickRegion(e),e.stopPropagation())},this._onRegionMouseOver=e=>{const t=this._determineRegion(e.target),{item:n}=this.props;n.setHighlight(t)},this._moveStyles=je.moveStylesBetweenHeadTags,this._moveElementsToWorkingNode=()=>{const{item:e}=this.props,t=e.visibleNodeRef.current,n=e.workingNodeRef.current;if(e.inline)this._moveElements(t,n,!0);else{const e=t.contentDocument.documentElement,r=t.contentDocument.body,o=n.contentDocument.documentElement,i=n.contentDocument.head,a=n.contentDocument.body;o.setAttribute("style",e.getAttribute("style")),this._removeChildrenFrom(i),this._moveElements(r,a,!0)}e.setWorkingMode(!0)},this._returnElementsFromWorkingNode=()=>{const{item:e}=this.props,t=e.visibleNodeRef.current,n=e.workingNodeRef.current;if(e.inline)this._moveElements(n,t);else{const e=t.contentDocument.documentElement,r=t.contentDocument.head,o=t.contentDocument.body,i=n.contentDocument.documentElement,a=n.contentDocument.head,s=n.contentDocument.body;e.setAttribute("style",i.getAttribute("style")),this._moveStyles(a,r),this._moveElements(s,o)}e.setWorkingMode(!1)},this.updateLoadingVisibility=()=>{const{item:e}=this.props,t=this.loadingRef.current;t&&(e&&(0,h._n)(e)&&e.isLoaded&&e.isReady?t.setAttribute("style","display: none"):t.removeAttribute("style"))},this._passHotkeys=e=>{const t="key code keyCode location ctrlKey shiftKey altKey metaKey".split(" "),n={};for(const r of t)n[r]=e[r];const r=new KeyboardEvent(e.type,n);document.dispatchEvent(r)},this.onIFrameLoad=()=>{const{item:e}=this.props,t=e.visibleNodeRef.current,n=null==t?void 0:t.contentDocument,r=null==n?void 0:n.body,o=null==r?void 0:r.parentElement,i={click:[this._onRegionClick,!0],keydown:[this._passHotkeys,!1],keyup:[this._passHotkeys,!1],keypress:[this._passHotkeys,!1],mouseup:[this._onMouseUp,!1],mouseover:[this._onRegionMouseOver,!0]};if(!r)return;for(const e in i)r.addEventListener(e,...i[e]);const a=n.createElement("style");a.textContent="body a[href] { pointer-events: all; }",n.head.appendChild(a),r.scrollHeight&&(t.style.height=`${Math.max(r.scrollHeight,o.offsetHeight)}px`),this.markObjectAsLoaded()}}_removeChildrenFrom(e){for(;e.lastChild;)e.removeChild(e.lastChild)}_moveElements(e,t,n){const r=document.createDocumentFragment();for(let t=0;te.find(n)))}}componentDidMount(){const{item:e}=this.props;(0,O.VS)(O.Er)||e.setNeedsUpdateCallbacks(this._moveElementsToWorkingNode,this._returnElementsFromWorkingNode),e.inline||(this.dispose=(0,u.lB)(e,"_isReady",this.updateLoadingVisibility,!0))}componentWillUnmount(){var e;const{item:t}=this.props;t&&(0,h._n)(t)&&(null==(e=this.dispose)||e.call(this),t.setLoaded(!1),t.setReady(!1),t.onDispose())}markObjectAsLoaded(){const{item:e}=this.props;e&&(0,h._n)(e)&&(e.setLoaded(!0),this.updateLoadingVisibility(),setTimeout((()=>this._handleUpdate(!0))))}render(){const{item:e}=this.props;if(!(0,w.isDefined)(e._value))return null;let t=e._value||"";const n=this.props.store.settings,r="text"===e.type;if(r){const e=(0,Ze.cn)("richtext",{elem:"line"});t=(0,je.htmlEscape)(t).split(/\n|\r/g).map((t=>`${t}`)).join("
")}if(e.inline){const o={onClickCapture:this._onRegionClick,onMouseUp:this._onMouseUp,onMouseOverCapture:this._onRegionMouseOver};return(0,_.jsxs)(Ze.eB,{name:"richtext",tag:_n,item:e,children:[(0,_.jsx)(Ze.Sl,Object.assign({name:"container",ref:t=>{e.visibleNodeRef.current=t,t&&this.markObjectAsLoaded()},"data-linenumbers":r&&n.showLineNumbers?"enabled":"disabled",className:"htx-richtext",dangerouslySetInnerHTML:{__html:t}},o),"root"),(0,O.VS)(O.Er)?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"orig-container",ref:e.originalContentRef,className:"htx-richtext-orig",dangerouslySetInnerHTML:{__html:t}},"orig"),(0,_.jsx)(Ze.Sl,{name:"work-container",ref:e.workingNodeRef,className:"htx-richtext-work"},"work")]})]})}return(0,_.jsxs)(Ze.eB,{name:"richtext",tag:_n,item:e,children:[(0,_.jsx)(Ze.Sl,{name:"loading",ref:this.loadingRef,children:(0,_.jsx)(Fj.A,{})}),(0,_.jsx)(Ze.Sl,{name:"iframe",tag:"iframe",referrerPolicy:"no-referrer",sandbox:"allow-same-origin allow-scripts",ref:t=>{e.setReady(!1),e.visibleNodeRef.current=t},className:"htx-richtext",srcDoc:t,onLoad:this.onIFrameLoad},"root"),(0,O.VS)(O.Er)?null:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"orig-iframe",tag:"iframe",referrerPolicy:"no-referrer",sandbox:"allow-same-origin allow-scripts",ref:e.originalContentRef,className:"htx-richtext-orig",srcDoc:t},"orig"),(0,_.jsx)(Ze.Sl,{name:"work-iframe",tag:"iframe",referrerPolicy:"no-referrer",sandbox:"allow-same-origin allow-scripts",ref:e.workingNodeRef,className:"htx-richtext-work"},"work")]})]})}}const NA=(0,y.WQ)("store"),VA=NA((0,y.PA)(DA)),zA=({isText:e=!1}={})=>NA((0,y.PA)((t=>(0,_.jsx)(VA,Object.assign({},t,{isText:e})))));x.addTag("text",MA,zA({isText:!0})),x.addTag("hypertext",MA,zA({isText:!1})),x.addObjectType(MA);var BA=n(23350);const HA=h.gK.model({type:"table",value:h.gK.maybeNull(h.gK.string),_value:h.gK.frozen([]),valuetype:h.gK.optional(h.gK.string,"json")}).views((e=>({get dataSource(){const{type:t}=k(e.valuetype);return"json"===t?Object.keys(e._value).sort(((e,t)=>e.toLowerCase().localeCompare(t.toLowerCase()))).map((t=>{let n=e._value[t];return"object"==typeof n&&(n=JSON.stringify(n)),{type:t,value:n}})):e._value},get columns(){return"json"!==e.valuetype&&e._value[0]?Object.keys(e._value[0]).map((e=>({title:e,dataIndex:e}))):[{title:"Name",dataIndex:"type"},{title:"Value",dataIndex:"value"}]}}))).actions((e=>({updateValue:(0,h.L3)((function*(t){const{type:n,options:r}=k(e.valuetype);let o=j(e.value,t.task.dataObj);if(r.url)try{const e=yield fetch(o),{ok:t,status:n,statusText:r}=e;if(!t)throw new Error(`${n} ${r}`);o=yield e.text()}catch(t){const n=(0,h._$)(e).messages.ERR_LOADING_HTTP({attr:e.value,error:String(t),url:o});e.annotationStore.addErrors([Kj.generalError(n)])}if("csv"===n)De().parse(o,{delimiter:r.separator,header:!r.headless,download:!1,complete:({data:t})=>{e._value=t}});else e._value="string"==typeof o?JSON.parse(o):o}))}))),FA=h.gK.compose("TableModel",bn,ze,Pe,HA),WA=(0,y.WQ)("store")((0,y.PA)((({item:e})=>(0,_.jsx)(BA.A,{bordered:!0,dataSource:e.dataSource,columns:e.columns,pagination:{hideOnSinglePage:!0}}))));x.addTag("table",FA,WA),x.addObjectType(FA);var $A=n(46288);const UA=()=>(window.screen&&window.screen.width||1440)*(window.devicePixelRatio||2),ZA=(e,t=1e6)=>{if(e.length<=t)return e;let n=0;const r=(e.length-1)/(t-1);return e.filter(((e,t)=>!(t{const n=(e.style||V.l).fillcolor;return rn.Colors.convertToRGBA(n,t)},YA=e=>!$A.f0J.sourceEvent||(e?$A.f0J.sourceEvent.type===e:["start","brush","end"].includes($A.f0J.sourceEvent.type)),XA=e=>new Date(e).toUTCString(),qA=h.gK.model({}).views((()=>({get persistentValuesKey(){return"labelStudio:storedValues"},get persistentValues(){return{}}}))).actions((e=>({afterCreate(){setTimeout(e.restoreValues)},beforeDestroy(){e.storeValues()},storeValues(){var t;const n=e.persistentValuesKey,r={task:null==(t=(0,h.Zn)(e).task)?void 0:t.id,values:e.persistentValues};localStorage.setItem(n,JSON.stringify(r))},restoreValues(){var t;const n=JSON.parse(localStorage.getItem(e.persistentValuesKey)||"{}");if(!n||n.task!==(null==(t=(0,h.Zn)(e).task)?void 0:t.id))return;const r=n.values||{};for(const t of Object.keys(r))e[t]=r[t]}}))),JA=h.gK.model({legend:"",units:"",displayformat:h.gK.optional(h.gK.string,".1f"),interpolation:h.gK.optional(h.gK.enumeration(Object.values({curvebasis:"curvebasis",curvebasisopen:"curveBasisOpen",curvebundle:"curveBundle",curvecardinal:"curveCardinal",curvecardinalopen:"curveCardinalOpen",curvecatmullrom:"curveCatmullRom",curvecatmullromopen:"curveCatmullRomOpen",curvelinear:"curveLinear",curvemonotonex:"curveMonotoneX",curvemonotoney:"curveMonotoneY",curvenatural:"curveNatural",curveradial:"curveRadial",curvestep:"curveStep",curvestepafter:"curveStepAfter",curvestepbefore:"curveStepBefore"})),"curveStep"),height:h.gK.optional(h.gK.string,"200"),strokewidth:h.gK.optional(h.gK.string,"1"),strokecolor:h.gK.optional(h.gK.string,"#1f77b4"),markersize:h.gK.optional(h.gK.string,"0"),markercolor:h.gK.optional(h.gK.string,"#1f77b4"),markersymbol:h.gK.optional(h.gK.string,"circle"),datarange:h.gK.maybe(h.gK.string),timerange:h.gK.maybe(h.gK.string),showaxis:h.gK.optional(h.gK.boolean,!0),fixedscale:h.gK.maybe(h.gK.boolean),column:h.gK.string}),QA=h.gK.model("ChannelModel",Object.assign({},(0,O.VS)(O.cE)?{id:h.gK.identifier}:{id:h.gK.optional(h.gK.identifier,E)},{type:"channel",children:Te.unionArray(["channel","view"]),parentTypes:Te.tagsTypes(["TimeSeries"])})).views((e=>({get columnName(){let t=e.column;var n;/^\d+$/.test(t)&&(t=(null==(n=e.parent)?void 0:n.headers[t])||t);return t=t.toLowerCase(),t}}))),eT=h.gK.compose("ChannelModel",nE,QA,JA);class tT extends p.Component{constructor(...e){super(...e),this.ref=p.createRef(),this.gCreator=void 0,this.brushCreator=void 0,this.gBrushes=void 0,this.tracker=void 0,this.trackerX=0,this.trackerPoint=void 0,this.trackerTime=void 0,this.trackerValue=void 0,this.extent=[0,0],this.useOptimizedData=!1,this.optimizedSeries=null,this.zoomStep=10,this.line=void 0,this.lineSlice=void 0,this.height=+this.props.item.height,this.state={width:840},this.changeWidth=()=>{const e=this.ref.current.offsetWidth,{margin:t}=this.props.item.parent;if(e){const n=e-t.left-t.right;this.setState({width:n})}},this.getRegion=(e,t)=>{const[n,r]=e.map((e=>+this.stick(e)[0]));return{start:n,end:t?n:r}},this.createBrushMovedHandler=e=>()=>{if(YA("end")||!$A.f0J.selection)return;const{ranges:t}=this.props,{parent:n}=this.props.item,r=t.findIndex((t=>t.id===e));if(r<0)return void console.error(`REGION ${e} was not found`);const o=t[r],i=this.getRegion($A.f0J.selection,o.instant);i.start===o.start&&i.end===o.end?(null==n||n.annotation.unselectAreas(),o.onClickRegion($A.f0J.sourceEvent)):null==n||n.regionChanged(i,r)},this.newRegion=void 0,this.newRegionTimer=void 0,this.newBrushHandler=()=>{var e;const{ranges:t,item:{parent:n}}=this.props,r=null==n?void 0:n.activeStates(),o=r&&r.length,i=null==n||null==(e=n.annotation)?void 0:e.isReadOnly();if(YA("end"))return;if(!$A.f0J.selection){const e=$A.grR($A.f0J.sourceEvent.target)[0],i=this.newRegion;i&&Math.abs(i.x-e)<4?(clearTimeout(this.newRegionTimer),null==n||n.regionChanged(i.range,t.length,i.states),this.newRegion=null,this.newRegionTimer=null):o&&(this.newRegion={range:this.getRegion([e,e]),states:r.map((e=>yO(e))),x:e},this.newRegionTimer=setTimeout((()=>{this.newRegion=null,this.newRegionTimer=null}),300));const a=this.x.invert(e),s=t.filter((e=>e.start<=a&&e.end>=a)),l=s.findIndex((e=>e.selected))+1,c=s[l];return void(c?c.onClickRegion($A.f0J.sourceEvent):null==n||n.annotation.unselectAreas())}const a=this.getRegion($A.f0J.selection);this.brushCreator.move(this.gCreator,null);const s=$A.f0J.sourceEvent.ctrlKey||$A.f0J.sourceEvent.metaKey;if(s||!o||i){const e=t.filter((e=>e.start>=a.start&&e.end<=a.end));s?null==n||n.annotation.extendSelectionWith(e):null==n||n.annotation.selectAreas(e)}else null==n||n.addRegion(a.start,a.end)},this.updateTracker=(e,t=0)=>{const{width:n}=this.state;if(e<0||e>n)return;const[r,o]=this.stick(e);this.trackerX=r,this.tracker.attr("transform",`translate(${this.x(r)+.5},0)`),this.trackerTime.text(`${this.formatTime(r)}${0===t?"":` [${this.formatDuration(t)}]`}`),this.trackerValue.text(`${this.formatValue(o)} ${this.props.item.units}`),this.trackerPoint.attr("cy",this.y(o)),this.tracker.attr("text-anchor",e>n-100?"end":"start")},this.renderTracker=()=>{const e=this.updateTracker;this.tracker=this.main.append("g").style("pointer-events","none"),this.trackerValue=this.tracker.append("text").attr("font-size",10).attr("fill","#666"),this.trackerTime=this.tracker.append("text").attr("y",this.height-1).attr("font-size",10).attr("fill","#666"),this.trackerPoint=this.tracker.append("circle").attr("cx",0).attr("r",3).attr("stroke","red").attr("fill","none"),this.tracker.append("line").attr("y1",this.height).attr("y2",0).attr("stroke","#666"),this.main.on("mousemove",(function(){e($A.grR(this)[0])}))},this.renderXAxis=()=>{const{item:e}=this.props;if(!e.showaxis)return;const{width:t}=this.state,{margin:n}=e.parent,r=this.height+n.top,o=-n.top;let i=this.main.select(".xaxis");i.size()||(i=this.main.append("g").attr("class","xaxis")),i.attr("transform",`translate(0,${o})`).call($A.l78(this.x).ticks(t/80).tickSize(r+4)).call((e=>e.selectAll(".domain").remove())).call((e=>e.selectAll(".tick").attr("stroke-opacity",.2).selectAll(".bottom").data([0]).enter().append("line").attr("class","bottom").attr("stroke","currentColor").attr("y1",r+16).attr("y2",r+n.bottom)))},this.renderYAxis=()=>{const{item:e}=this.props;if(!e.showaxis)return;let t=this.main.select(".yaxis");t.size()||(t=this.main.append("g").attr("class","yaxis")),t.call($A.V4s(this.y).tickFormat(this.formatValue).tickSize(3)).call((e=>e.select(".domain").remove())).call((e=>e.append("text").attr("class","title").attr("font-size",8).attr("x",-6).attr("y",0).attr("fill","currentColor").attr("text-anchor","end").text(this.props.item.units)))}}renderBrushes(e,t=!1){const{width:n}=this.state,r=this.height,{item:o}=this.props,i=[[0,0],[n,r]],a=$A.n55().extent(i),s=this.x;t&&this.gBrushes.selectAll(".brush").remove();const l=this.gBrushes.selectAll(".brush").data(e,(e=>e.id)),c=this.createBrushMovedHandler,d=this.updateTracker,u=this.getRegion;l.enter().append("g").attr("class","brush").attr("id",(e=>`brush_${o.id}_${e.id}`)).each((function(e){const t=$A.Ltv(this),n=$A.n55().extent(i);n.on("brush",(function(){if(YA("brush"))return;const n=u($A.f0J.selection,e.instant);a.move(t,[s(n.start),s(n.end)+.5*e.instant]),d($A.grR(this)[0])})),n.on("end",c(e.id)),n(t),e.instant?t.selectAll(".handle").style("pointer-events","none"):t.selectAll(".selection").style("pointer-events","none"),t.selectAll(".overlay").style("pointer-events","none"),e.isReadOnly()&&t.selectAll(".handle").remove(),void 0!==e._brushRef&&e._brushRef.isConnected||(e._brushRef=t.select(".selection").node())})).merge(l).each((function(e){const t=$A.Ltv(this),n=t.selectAll(".selection");t.style("display",e.hidden?"none":"block");const r=GA(e);if(e.instant){n.attr("stroke-opacity",e.inSelection||e.highlighted?.6:.2).attr("fill-opacity",e.inSelection||e.highlighted?1:.6).attr("stroke-width",3).attr("stroke",r).attr("fill",r);const o=s(e.start);a.move(t,[o,o+1])}else n.attr("stroke-opacity",e.inSelection||e.highlighted?.8:.5).attr("fill-opacity",e.inSelection||e.highlighted?.6:.3).attr("stroke",r).attr("fill",r),a.move(t,[e.start,e.end].map(s))})),l.exit().remove()}renderBrushCreator(){this.gCreator?this.gCreator.selectAll("*").remove():this.gCreator=this.main.append("g").attr("class","new_brush");const e=this.updateTracker,t=this.gCreator,n=this.getRegion,r=this.x,o=this.brushCreator=$A.n55().extent([[0,0],[this.state.width,this.height]]).on("brush",(function(){if(YA("brush")||!$A.f0J.selection)return;const i=n($A.f0J.selection);o.move(t,[r(i.start),r(i.end)]),e($A.grR(this)[0],i.end-i.start)})).on("end",this.newBrushHandler).filter((()=>!$A.f0J.button));this.gCreator.call(this.brushCreator)}initZoom(){var e;const{data:t,item:n,time:r}=this.props,o=t[r],i=null==(e=n.parent)?void 0:e.throttledRangeUpdate();this.main.on("wheel",(()=>{const e=$A.f0J;if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();const{range:t}=this.props,n=t.map((e=>$A.Jjl(o,e))),[r]=$A.grR($A.f0J.target),a=this.x.range()[1],s=Math.min(.3,-e.deltaY/this.height);if(n[1]-n[0]<10&&s>0)return;const l=t[1]-t[0],c=[Math.max(+this.extent[0],+t[0]+l*s*r/a),Math.min(+this.extent[1],t[1]-l*s*(1-r/a))];i(c,s)}))}componentDidMount(){var e;if(!this.ref.current)return;const{data:t,item:n,range:r,time:o,column:i}=this.props,{isDate:a,formatTime:s,formatDuration:l,margin:c,slicesCount:d}=n.parent,u=this.height;this.zoomStep=d;const g=`marker_${n.id}`,m=`clip_${n.id}`;let{series:p}=this.props;const f=UA()*this.zoomStep;let v,y;this.useOptimizedData=p.length>f,(0,O.VS)(O.dY)&&(v=p.filter((e=>null!==e[i])),y=v.map((e=>e[o]))),this.useOptimizedData&&(this.optimizedSeries=ZA(p,f),p=this.optimizedSeries),p=p.filter((e=>null!==e[i])),this.optimizedSeries&&(this.optimizedSeries=p);const b=p.map((e=>e[o])),x=p.map((e=>e[i]));if(!x){const e=Object.keys(t).filter((e=>e!==o)),r=`\`${i}\` not found in data. Available columns: ${e.join(", ")}. For headless csv you can use column index`;return void(0,h.Zn)(n).annotationStore.addErrors([Kj.generalError(r)])}this.slices=null==(e=n.parent)?void 0:e.dataSlices;const w=$A.GPZ(n.displayformat);this.formatValue=w,this.formatTime=s,this.formatDuration=l;const C=this.ref.current.offsetWidth,S=C?C-c.left-c.right:this.state.width;this.state.width=S,this.extent=$A.Xxv(b);const j=(a?$A.Pps():$A.m4Y()).domain(this.extent).range([0,S]),k=$A.m4Y().domain($A.Xxv(x)).range([u-c.max,c.min]);this.x=j,this.y=k,this.plotX=j.copy(),this.stick=e=>{const t=j.invert(e),n=(0,O.VS)(O.dY)?y:b;let r=$A.Jjl(n,t,0,n.length-1);return n[r]-t>t-n[r-1]&&r--,[n[r],(0,O.VS)(O.dY)?v[r][i]:x[r]]},this.line=$A.n8j().y((e=>this.y(e[i]))).x((e=>this.plotX(e[o]))),this.lineSlice=$A.n8j().defined((e=>e[o]>=r[0]&&e[o]<=r[1])).y((e=>this.y(e[i]))).x((e=>this.x(e[o])));const R=$A.Ltv(this.ref.current).append("svg").attr("viewBox",[0,0,S+c.left+c.right,u+c.top+c.bottom]).style("display","block").append("g").attr("transform",`translate(${c.left},${c.top})`);((e,t,n,r)=>{switch(t){case"circle":e.append("path").attr("d",$A.HRO().type($A.hKN).size(2*n)).attr("transform",`translate(${n/2}, ${n/2})`).attr("stroke","none").attr("fill",r);break;case"square":e.append("path").attr("d",$A.HRO().type($A.yDW).size(2*n)).attr("transform",`translate(${n/2}, ${n/2})`).attr("stroke","none").attr("fill",r);break;case"triangle":case"triangleUp":e.append("path").attr("d",$A.HRO().type($A.ZKi).size(2*n)).attr("transform",`translate(${n/2}, ${n/2})`).attr("stroke","none").attr("fill",r);break;case"triangleDown":e.append("path").attr("d",$A.HRO().type($A.ZKi).size(2*n)).attr("transform",`translate(${n/2}, ${n/2}) rotate(180 0 0)`).attr("stroke","none").attr("fill",r)}})(R.append("defs").append("marker").attr("id",g).attr("markerWidth",n.markersize).attr("markerHeight",n.markersize).attr("refX",n.markersize/2).attr("refY",n.markersize/2),n.markersymbol,n.markersize,n.markercolor),R.append("clipPath").attr("id",m).append("rect").attr("x",0).attr("y",0).attr("height",u).attr("width",S),R.append("text").text(n.legend).attr("dx","1em").attr("dy","1em").attr("font-weight","bold").attr("font-size","1.4em").attr("dy","1em").attr("opacity",.1),this.main=R;const E=R.append("g").attr("clip-path",`url("#${m}")`);this.path=E.append("path").datum(p).attr("d",this.line),this.path2=E.append("path"),E.selectAll("path").attr("vector-effect","non-scaling-stroke").attr("fill","none").attr("stroke-width",n.strokewidth||1).attr("stroke",n.strokecolor||"steelblue").attr("marker-start",n.markersize>0?`url(#${g})`:"").attr("marker-mid",n.markersize>0?`url(#${g})`:"").attr("marker-end",n.markersize>0?`url(#${g})`:""),this.renderTracker(),this.updateTracker(0),this.renderYAxis(),this.setRangeWithScaling(r),this.renderBrushCreator(),this.initZoom(),this.gBrushes=R.append("g").attr("class","brushes").attr("clip-path",`url("#${m}")`),this.renderBrushes(this.props.ranges),window.addEventListener("resize",this.changeWidth)}componentWillUnmount(){window.removeEventListener("resize",this.changeWidth)}setRangeWithScaling(e){var t;this.x.domain(e);const n=this.x.range(),r=this.plotX.domain().map(this.x),o=(r[1]-r[0])/(n[1]-n[0]),i=Math.max(0,Math.floor(this.zoomStep*(n[0]-r[0])/(r[1]-r[0]))),a=Math.max(0,Math.floor(this.zoomStep*(n[1]-r[0])/(r[1]-r[0]))),s=r[0]-n[0];let l=0,c=1;const d=this.y.range()[0],{item:u}=this.props,h=void 0===u.fixedscale?null==(t=u.parent)?void 0:t.fixedscale:u.fixedscale;if(u.timerange){const e=u.timerange.split(",").map(Number);this.x.domain(e)}if(!h){const{data:t,time:n,column:r}=this.props,o=t[r];let i=$A.Jjl(t[n],e[0]);const a=$A.Jjl(t[n],e[1]);let s=o[i],d=o[i];for(;io[i]&&(s=o[i]),dt-e));c=h/(d-s),l=s/h,this.y.domain([s,d])}const g=o>this.zoomStep===this.useOptimizedData;this.optimizedSeries&&g&&(this.useOptimizedData=!this.useOptimizedData,this.useOptimizedData?(this.path.datum(this.optimizedSeries),this.path.attr("d",this.line)):this.path.attr("transform","")),this.useOptimizedData?(this.path.attr("transform",`translate(${s} ${l}) scale(${o} ${c})`),this.path.attr("transform-origin",`left ${d}`),this.path2.attr("d","")):this.optimizedSeries?(this.path.datum(this.slices[i]),this.path.attr("d",this.lineSlice),i!==a&&this.slices[a]?(this.path2.datum(this.slices[a]),this.path2.attr("d",this.lineSlice)):this.path2.attr("d","")):(this.path.attr("d",this.lineSlice),this.path2.attr("d","")),this.renderXAxis(),this.renderYAxis(),this.updateTracker(this.x(this.trackerX))}componentDidUpdate(e,t){const{range:n}=this.props,{width:r}=this.state;let o=!1;if(r!==t.width){const{item:e,range:t}=this.props,{margin:n}=e.parent,i=this.height,a=$A.Ltv(this.ref.current).selectAll("svg");a.attr("viewBox",[0,0,r+n.left+n.right,i+n.top+n.bottom]),this.x.range([0,r]),this.renderBrushCreator(),a.selectAll("clipPath rect").attr("width",r),this.setRangeWithScaling(t),this.renderBrushCreator(),o=!0}else{const e=this.x.domain();+e[0]==+n[0]&&+e[1]==+n[1]||this.setRangeWithScaling(n)}this.renderBrushes(this.props.ranges,o)}render(){return this.props.ranges.map((e=>{var t;return(0,w.fixMobxObserve)(e.start,e.end,e.selected,e.inSelection,e.highlighted,e.hidden,null==(t=e.style)?void 0:t.fillcolor)})),(0,w.fixMobxObserve)(this.props.range.map(Number)),(0,_.jsx)("div",{className:"htx-timeseries-channel",ref:this.ref})}}const nT=(0,y.PA)(tT),rT=(0,y.PA)((({item:e})=>{var t,n,r,o,i,a;return null!=(t=e.parent)&&t.dataObj?(0,_.jsx)(nT,{time:null==(n=e.parent)?void 0:n.keyColumn,column:e.columnName,item:e,data:null==(r=e.parent)?void 0:r.dataObj,series:null==(o=e.parent)?void 0:o.dataHash,range:null==(i=e.parent)?void 0:i.brushRange,ranges:null==(a=e.parent)?void 0:a.regs}):null}));x.addTag("channel",eT,rT);const oT=h.gK.model({value:h.gK.string,valuetype:h.gK.optional(h.gK.enumeration(["url","json"]),"url"),timecolumn:"",sep:",",timeformat:"",timedisplayformat:"",durationdisplayformat:".0f",overviewchannels:"",overviewwidth:"25%",fixedscale:!1,multiaxis:h.gK.optional(h.gK.boolean,!1),hotkey:h.gK.maybeNull(h.gK.string)}),iT=h.gK.model("TimeSeriesModel",{type:"timeseries",children:Te.unionArray(["channel","timeseriesoverview","view","hypertext"]),width:840,margin:h.gK.frozen({top:20,right:20,bottom:30,left:50,min:10,max:10}),brushRange:h.gK.array(h.gK.number),_needsUpdate:h.gK.optional(h.gK.number,0)}).volatile((()=>({data:null,valueLoaded:!1,zoomedRange:0,scale:1,headers:[]}))).views((e=>({get regionsTimeRanges(){return e.regs.map((e=>[e.start,e.end]))},get defaultOverviewWidth(){var t,n;return[0,Math.min(null!=(t=null==(n=e.overviewwidth.match(/(\d+)%$/))?void 0:n[1])?t:25,100)/100]},get store(){return(0,h.Zn)(e)},get isDate(){return Boolean(e.timeformat)||e.timedisplayformat&&/[a-zA-Z]/.test(e.timedisplayformat[0])},get keyColumn(){return(e.timecolumn||"#@$").toLowerCase()},get parseTimeFn(){return e.timeformat&&e.timecolumn?$A.GYh(e.timeformat):Number},parseTime(t){const n=(0,e.parseTimeFn)(t);return n instanceof Date?n.getTime():n},get dataObj(){if(!e.valueLoaded||!e.data)return null;let t=e.data;if(e.timecolumn){if(!e.timeformat&&isNaN(t[e.keyColumn][0])){const n=[`Looks like your timeColumn (${e.timecolumn}) contains non-numbers.`,"You have to use timeFormat parameter if your values are datetimes.",`First wrong values: ${t[e.keyColumn].slice(0,3).join(", ")}`,`Read Documentation for details.`];throw new Error(n.join("
"))}{let n=0,r=Number.NEGATIVE_INFINITY;const o=t[e.keyColumn].length,i=Array.from({length:o});for(let a=0;atimeColumn (${e.timecolumn}) must be incremental and sequentially ordered.`,`First wrong values: ${n.join(", ")}`,`
Read Documentation for details.`].join("
"))}r=n}if(0===i[0]&&0===i[1]&&0===i[2]){const n=[`timeColumn (${e.timecolumn}) cannot be parsed.`,`First wrong values: ${t[e.keyColumn].slice(0,3).join(", ")}`];throw e.timeformat?n.push(`Your timeFormat: ${e.timeformat}. It should be compatible with these values.`):n.push("You have to use timeFormat parameter if your values are datetimes."),n.push(`
Read Documentation for details.`),new Error(n.join("
"))}t=Object.assign({},t,{[e.keyColumn]:i})}}else{const n=Object.values(t)[0],r=Array.from({length:n.length},((e,t)=>t));t=Object.assign({},t,{[e.keyColumn]:r})}return t},get dataHash(){const t=e.dataObj,{keyColumn:n}=e;if(!t)return null;const r=Object.keys(t),o=[];for(const i of r)for(let r=0;re.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t?t.filter((e=>e.isSelected&&"TimeSeriesLabelsModel"===(0,h.Pw)(e).name)):null},formatTime(t){if(!e._format){const{timedisplayformat:t,isDate:n}=e;e._format="date"===t?XA:t?n?$A.aLc(t):$A.GPZ(t):String}return e._format(t)},formatDuration(t){if(!e._formatDuration){const{durationdisplayformat:t,isDate:n}=e;e._formatDuration=t?n?$A.aLc(t):$A.GPZ(t):String}return e._formatDuration(t)}}))).actions((e=>({setData(t){e.data=t,e.valueLoaded=!0},setColumnNames(t){e.headers=t},setZoomedRange(t){e.zoomedRange=t},setScale(t){e.scale=t},updateView(){e._needsUpdate=e._needsUpdate+1},scrollToRegion(t){const n=[...e.brushRange];if(t.start>=n[0]&&t.end<=n[1])return;const r=n[1]-n[0],o=t.end-t.start,i=1.5*o,a=(i-o)/2;if(rn[1]&&(n[0]+=t.end+a-n[1],n[1]=t.end+a),n[0]=Math.max(e.keysRange[0],n[0]),n[1]=Math.min(e.keysRange[1],n[1]),e.updateTR(n,e.scale+1e-4)},updateTR(t,n=1){null!==t&&(e.initialRange=t,e.brushRange=t,e.setZoomedRange(t[1]-t[0]),e.setScale(n),e.updateView())},throttledRangeUpdate:()=>In()(e.updateTR,100),addRegion(t,n){const r=e.getAvailableStates();if(0===r.length)return;const o=r[0],i={[o.valueType]:o.selectedValues()};return e.annotation.createResult({start:t,end:n,instant:t===n},i,o,e)},regionChanged(t,n,r){const o=e.regs[n];let i=!1;if(o)i=o.start!==t.start||o.end!==t.end,o.updateRegion(t.start,t.end);else{i=!0,e.addRegion(t.start,t.end,r).notifyDrawingFinished()}i&&e.updateView()},async preloadValue(t){const n=t.task.dataObj;if("url"!==e.valuetype)return void(e.value?e.setData(j(e.value,n)):e.setData(n));if(!e.value){const n=`Attribute value for ${e.name} should be provided when valuetype="url"`;return void t.annotationStore.addErrors([Kj.generalError(n)])}const r=j(e.value,n);if(!r||"string"!=typeof r){const n=`Cannot find url in ${o=e.value,o.substr(1)} field of your task`;return void t.annotationStore.addErrors([Kj.generalError(n)])}var o;let i,a="",s=!1;try{if(i=await fetch(r),!i.ok){if(400===i.status)return void t.annotationStore.addErrors([Kj.loadingError(`${i.status} ${i.statusText}`,r,e.value,(0,h._$)(t).messages.ERR_LOADING_S3)]);throw new Error(`${i.status} ${i.statusText}`)}a=await i.text()}catch(n){let o=n;if(!i)try{i=await fetch(r,{mode:"no-cors"}),i.ok||0!==i.status||(s=!0)}catch(e){o=e}return void t.annotationStore.addErrors([Kj.loadingError(o,r,e.value,s?(0,h._$)(t).messages.ERR_LOADING_CORS:void 0)])}try{let n=(e=>{if((0,w.isString)(e)&&"{"===e[0])try{return JSON.parse(e)}catch(e){}return!1})(a),r=[];if(!n){var l;let t=e.sep;if((null==(l=t)?void 0:l.length)>1){t={tab:"\t","\\t":"\t",space:" ",auto:"auto",comma:",",dot:"."}[t]||t[0]}[n,r]=((e,t="auto")=>{const n=e.split("\n");let r;if("auto"!==t&&!n[0].includes(t))throw new Error([`Cannot find provided separator "${t}".`,`Row 1: ${n[0]}`].join("\n"));if("auto"===t&&n.length>1){const e=n[1].trim().match(/[,;\s\t]/g);if(!e.length)throw new Error("No separators found");if(e.some((t=>t!==e[0]))){const t=Array.from(new Set(e)).map(w.escapeHtml).map((e=>`"${e}"`)).join(", ");throw new Error([`More than one possible separator found: ${t}`,'You can provide correct one with '].join("\n"))}if(t=e[0],n[0].split(t).length!==n[1].split(t).length)throw new Error(["Different amount of elements in rows.",`Row 1: ${n[0]}`,`Row 2: ${n[1]}`,`Guessed separator: ${t}`,'You can provide correct one with '].join("\n"))}const o=new RegExp(['"(?:""|[^"])*"',`[^"${t}]+`,`(?=${t}(?:${t}|$))`,`^(?=${t})`].join("|"),"g"),i=e=>e.trim().match(o);r=i(n[0]);const a=i(n[1]);r.every(((e,t)=>isNaN(e)===isNaN(a[t])))?r=r.map(((e,t)=>String(t))):(n.shift(),r=r.map((e=>e.toLowerCase())));const s={};for(const e of r)s[e]=[];if(r.length!==i(n[0]).length)throw new Error(["Column names count differs from data columns count.",`Columns: ${r.join(", ")};`,`Data: ${n[0]};`,`Separator: "${t}".`].join("\n"));let l,c;for(const e of n)if(e.trim())for(l=i(e),c=0;cURL: ${r}`;t.annotationStore.addErrors([Kj.generalError(n)])}},async updateValue(t){var n;let r;try{e.dataObj||await e.preloadValue(t),r=e.dataObj}catch(e){return void t.annotationStore.addErrors([Kj.generalError(e.message)])}if(!r)return;const o=r[e.keyColumn];if(!o){const n=[`${e.keyColumn} not found in data.`,'Use valueType="url" for data loading or column index for headless csv'].join(" ");return void t.annotationStore.addErrors([Kj.generalError(n)])}if(null!=(n=e.brushRange)&&n.length)return;const i=e.defaultOverviewWidth.map((e=>o[Math.round((o.length-1)*e)]));e.updateTR(i)},onHotKey(){}})));const aT=(0,y.PA)((({item:e,data:t,series:n})=>{const r=e.regs,[o,i,a]=function(){const[e,t]=p.useState(840),[n,r]=p.useState(null),o=p.useCallback((e=>{r(e)}),[]);return p.useLayoutEffect((()=>{if(n){const e=()=>t(n.offsetWidth);return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}}),[n]),[o,e,n]}(),s=60,{margin:l,keyColumn:c}=e,d=Math.max(i-l.left-l.right,0);let u=e.children.map((e=>e.columnName));if(e.overviewchannels){const t=e.overviewchannels.toLowerCase().split(",").map((t=>/^\d+$/.test(t)?e.headers[t]:t)).filter((e=>u.includes(e)));t.length&&(u=t)}const h=p.useRef(),g=p.useRef(),m=p.useRef(),f=p.useRef(),v=p.useRef(),y=(e.isDate?$A.w7C():$A.m4Y()).domain($A.Xxv(t[c])).range([0,d]),b=p.useCallback(e.throttledRangeUpdate(),[]),x=[0,d>>2],C=p.useRef(x),S=10;let j;const k=$A.n55().extent([[0,0],[d,s]]).on("start",(function(){const[e,t]=$A.f0J.selection;j=e===t?e:null})).on("brush",(function(){if($A.f0J.selection&&!YA("brush")&&!YA("wheel")){let[t,n]=$A.f0J.selection;const r=C.current,o=n-t;let i=+y.invert(t),a=+y.invert(n);if(r[0]===t&&r[1]===n);else if(r[0]!==t&&r[1]!==n&&Math.abs(o-S)<.001){const t=(i+a)/2;i=t-e.zoomedRange/2,a=t+e.zoomedRange/2}else o>1;let o=[t-r,t+r];o[0]<0&&(o=[0,2*r]),o[1]>d&&(o=[d-2*r,d]),v.current.call(k.move,o)}})),O=r=>{const o=e.children.find((e=>e.columnName===r)),i=o?o.strokecolor:"steelblue",a=$A.m4Y().domain([$A.jkA(t[r]),$A.T9B(t[r])]).range([s-l.max,l.min]);m.current.append("path").datum(ZA(n,UA())).attr("class","channel").attr("fill","none").attr("stroke",i).attr("d",$A.n8j().y((e=>a(e[r]))).defined((e=>e[c])).x((e=>y(e[c]))))};return p.useEffect((()=>{a&&(h.current=$A.Ltv(a).append("svg").attr("viewBox",[0,0,d+l.left+l.right,s+l.bottom]).style("display","block").append("g").attr("transform",`translate(${l.left},0)`),f.current=h.current.append("g").attr("transform","translate(0,60)"),m.current=h.current.append("g").attr("class","channels"),g.current=h.current.append("g").attr("class","regions"),v.current=h.current.append("g").call(k).call(k.move,x),v.current.select(".handle--w").style("transform","translate(-1px, 0)"),v.current.select(".handle--e").style("transform","translate(1px, 0)"))}),[a]),p.useEffect((()=>{if(a){$A.Ltv(a).selectAll("svg").attr("viewBox",[0,0,d+l.left+l.right,s+l.bottom]),m.current.selectAll("path").remove();for(const e of u)O(e);f.current.call($A.l78(y).ticks(d/80).tickSizeOuter(0)),v.current.call(k).call(k.move,e.brushRange.map(y))}}),[d,a]),p.useEffect((()=>{if(!v.current)return;const t=e.brushRange.map(y);if(t[1]-t[0]{a&&(e=>{const t=g.current.selectAll(".region").data(e);t.enter().append("rect").attr("class","region").merge(t).attr("y",0).attr("height",s).attr("x",(e=>y(e.start))).attr("width",(e=>Math.max(2,y(e.end)-y(e.start)))).attr("fill",(e=>GA(e,e.selected?.8:.3))).style("display",(e=>e.hidden?"none":"block")),t.exit().remove()})(r)})),e.regs.map((e=>{var t;return(0,w.fixMobxObserve)(e.start,e.end,e.selected,e.hidden,null==(t=e.style)?void 0:t.fillcolor)})),(0,_.jsx)("div",{className:"htx-timeseries-overview",ref:o})})),sT=h.gK.compose("TimeSeriesModel",bn,qA,Pe,oT,iT),lT=(0,y.WQ)("store")((0,y.PA)((({item:e})=>{var t;const n=p.createRef();return p.useEffect((()=>{var t;null!=e&&null!=(t=e.brushRange)&&t.length&&(e._nodeReference=n.current)}),[e,n]),null!=e&&null!=(t=e.brushRange)&&t.length&&e.data?(0,_.jsx)("div",{ref:n,className:"htx-timeseries",children:(0,_.jsxs)(_n,{item:e,children:[D.renderChildren(e,e.annotation),(0,_.jsx)(aT,{data:e.dataObj,series:e.dataHash,item:e,range:e.brushRange})]})}):(0,_.jsx)("div",{style:{textAlign:"center",height:100},children:(0,_.jsx)(v.A,{size:"large",delay:300})})})));x.addTag("timeseries",sT,lT),x.addObjectType(sT);const cT=h.gK.model({id:h.gK.identifier,type:"pagedview",children:Te.unionArray(["view","header","labels","label","table","taxonomy","choices","choice","collapse","datetime","number","rating","ranker","rectangle","ellipse","polygon","keypoint","brush","magicwand","rectanglelabels","ellipselabels","polygonlabels","keypointlabels","brushlabels","hypertextlabels","timeserieslabels","text","audio","image","hypertext","richtext","timeseries","audioplus","list","dialog","textarea","pairwise","style","label","relations","filter","timeseries","timeserieslabels","pagedview","paragraphs","paragraphlabels","video","videorectangle"])}),dT=h.gK.compose("PagedViewModel",cT,Pe),uT="view_page",hT=yr("Repeater"),gT=`.${(0,Ze.cn)("sidepanels").elem("content").toClassName()}`,mT=[1,5,10,25,50,100],pT=()=>{const e=new URLSearchParams(window.location.search).get(uT);return e?Number.parseInt(e):1};let fT=null;const vT=(e,t=null)=>{const n=new URLSearchParams(window.location.search),r=fT&&t!==fT;fT=t,r?n.delete(uT):1!==e?n.set(uT,e.toString()):n.delete(uT),window.history.replaceState(void 0,void 0,`${window.location.pathname}?${n}`)},yT=(0,y.PA)((({item:e})=>{const[t,n]=(0,p.useState)(pT),[r,o]=(0,p.useState)(1),i=(0,p.useCallback)((t=>{var r;n(t),vT(t,null==(r=e.annotationStore)||null==(r=r.store)?void 0:r.task.id)}),[]),a=Math.ceil(e.children.length/r);(0,p.useEffect)((()=>{o(((e,t)=>{const n=localStorage.getItem(`pages:${e}`);return n?Number.parseInt(n):null!=t?t:void 0})("repeater",1))}),[]),(0,p.useEffect)((()=>{const t=e.annotation.lastSelectedRegion;if(t){const e=Number.parseFloat(t.object.name.split("_")[1])+1;i(Math.ceil(e/r))}}),[e.annotation.lastSelectedRegion]),(0,p.useEffect)((()=>{var e,n;(0,O.VS)(O.LE)?null==(e=document.querySelector(gT))||e.scrollTo(0,0):null==(n=document.querySelector("#label-studio-dm"))||n.scrollTo(0,0);return setTimeout((()=>{hT.addNamed("repeater:next-page",(()=>{t{t>1&&i(t-1)}))})),()=>{hT.removeNamed("repeater:next-page"),hT.removeNamed("repeater:previous-page")}}),[t]),(0,p.useEffect)((()=>{var t;return vT(pT(),null==(t=e.annotationStore)||null==(t=t.store)?void 0:t.task.id),()=>{var t;vT(1,null==(t=e.annotationStore)||null==(t=t.store)?void 0:t.task.id)}}),[]);const s=(0,p.useCallback)((()=>{const n=[];for(let o=0;o{e.annotation.unselectAll(),i(t),n!==r&&(((e,t)=>{localStorage.setItem(`pages:${e}`,t.toString())})("repeater",n),o(n))}})]})}));x.addTag("pagedview",dT,yT);const bT=p.createContext(),xT=["name","children","label","icon","to","className","href","danger","exact","forceReload","active","onClick"],wT=(0,p.forwardRef)((({children:e,className:t,style:n,size:r,selectedKeys:o,closeDropdownOnItemClick:i,allowClickSelected:a},s)=>{const l=J_(),c=(0,p.useMemo)((()=>new Set(null!=o?o:[])),[o]),d=(0,p.useCallback)((e=>{const t=(0,Ze.cn)("menu").elem("item").closest(e.target);l&&t&&!1!==i&&l.close()}),[l]),u=(0,p.useMemo)((()=>!!l),[l]),h=(0,p.useMemo)((()=>({selected:c,allowClickSelected:a})),[c,a]);return(0,_.jsx)(bT.Provider,{value:h,children:(0,_.jsx)(Ze.eB,{ref:s,tag:"ul",name:"menu",mod:{size:r,collapsed:u},mix:t,style:n,onClick:d,children:e})})}));wT.Item=e=>{let{name:t,children:n,label:r,icon:o,to:i,className:a,href:s,danger:l,exact:c=!1,forceReload:d=!1,active:u=!1,onClick:h}=e,g=(0,Yn.A)(e,xT);const{selected:m,allowClickSelected:f}=p.useContext(bT),v=(0,Ze.cn)("menu",{elem:"item"}),y=(()=>{const e=window.location.pathname.replace(/\/$/,""),n=null!=i?i:s;return!!m.has(t)||(c?e===n:e.includes(n))})(),b=(0,p.useMemo)((()=>(0,_.jsxs)(_.Fragment,{children:[o&&(0,_.jsx)("span",{className:v.elem("item-icon"),children:o}),null!=n?n:r]})),[n,r,o]),x=Object.assign({className:v.mod({active:y||u,look:l&&"danger",clickable:f}).mix(a),onClick:h},g);return d&&(x.onClick=()=>window.location.href=null!=i?i:s),(0,_.jsx)("li",{children:s?(0,_.jsx)("a",Object.assign({href:null!=s?s:"#"},x,{children:b})):(0,_.jsx)("div",Object.assign({},x,{children:b}))})},wT.Spacer=()=>(0,_.jsx)("li",{className:(0,Ze.cn)("menu",{elem:"spacer"})}),wT.Divider=()=>(0,_.jsx)("li",{className:(0,Ze.cn)("menu",{elem:"divider"})}),wT.Builder=(e,t)=>(null!=t?t:[]).map(((t,n)=>{if("SPACER"===t)return(0,_.jsx)(wT.Spacer,{},n);if("DIVIDER"===t)return(0,_.jsx)(wT.Divider,{},n);const[r,o]=t,i=`${e}${r}`.replace(/([/]+)/g,"/");return(0,_.jsx)(wT.Item,{to:i,exact:!0,children:o},n)})),wT.Group=({children:e,title:t,className:n,style:r})=>{const o=(0,Ze.cn)("menu-group");return(0,_.jsxs)("li",{className:o.mix(n),style:r,children:[(0,_.jsx)("div",{className:o.elem("title"),children:t}),(0,_.jsx)("ul",{className:o.elem("list"),children:e})]})};const CT=(0,p.forwardRef)(((e,t)=>{const n=(0,p.useRef)(),r=(0,p.useRef)(null),o=e=>{t instanceof Function?t(e):t&&(t.current=e)};return(0,p.useEffect)((()=>{var t;const i=document.createElement("canvas");i.width=e.width,i.height=e.height,i.style.background="#efefef",r.current=i,null==(t=n.current)||t.appendChild(i),o(r.current)}),[]),(0,p.useEffect)((()=>{r.current&&(r.current.width=e.width,r.current.height=e.height)}),[e.width,e.height]),(0,p.useEffect)((()=>()=>{const e=r.current,t=e.getContext("2d");null==t||t.clearRect(0,0,e.width,e.height),e.remove(),r.current=null,o(null)}),[]),(0,_.jsx)("div",{ref:n})})),ST={mp4:"video/mp4",mp4v:"video/mp4",mpg4:"video/mp4",ogg:"video/ogg",ogv:"video/ogg",ogm:"video/ogg",ogx:"video/ogg",webm:"video/webm",avi:"video/avi",mov:"video/quicktime",qt:"video/quicktime"},jT=(0,p.forwardRef)(((e,t)=>{const n=(0,p.useRef)(null),r=(0,p.useRef)(null),o=(0,p.useRef)([]),i=(0,p.useCallback)((async t=>{let n=!1;return t&&(n=await(async e=>{var t;const n=document.createElement("video"),r=null!=(t=new URL(e,/^https?/.exec(e)?void 0:window.location.href).pathname.split(".").pop())?t:"";let o=ST[r];o||(o=(await fetch(e,{method:"GET",headers:{Range:"bytes=0-0"}})).headers.get("content-type"));const i=!!(a=o)&&a.includes("octet-stream")||!!o&&""!==n.canPlayType(o);var a;const s=document.querySelector(".ant-modal");return i||s||fn.error("There has been an error rendering your video, please check the format is supported"),i})(t)),e.canPlayType&&e.canPlayType(n),n}),[e.canPlayType]),a=(0,p.useCallback)((()=>{const t=document.createElement("video");t.muted=!!e.muted,t.controls=!1,t.preload="auto",(0,O.VS)(O.xS)&&(t.crossOrigin="anonymous"),Object.assign(t.style,{top:"-9999px",width:0,height:0,position:"absolute"}),n.current=t}),[]),s=(0,p.useCallback)((e=>{t instanceof Function?t(e):t&&(t.current=e)}),[]),l=()=>{const t=Object.entries(e).filter((([e])=>e.startsWith("on"))).map((([e,t])=>[e.toLowerCase(),t])),r=[];t.forEach((([e,t])=>{var o;const i=e.replace(/^on/,"");null==(o=n.current)||o.addEventListener(i,t),r.push([i,t])})),o.current=r},c=()=>{var e;n.current&&((null!=(e=o.current)?e:[]).forEach((([e,t])=>{var r;null==(r=n.current)||r.removeEventListener(e,t)})),o.current=[])},d=()=>{var e,t,o;r&&n&&(null==(e=n.current)||e.pause(),null==(t=r.current)||t.setAttribute("src",""),null==(o=n.current)||o.load())},u=(0,p.useCallback)((()=>{var t,o,i;if(!n.current)return;null==(t=n.current)||t.pause(),r.current&&d();const a=document.createElement("source");a.setAttribute("src",null!=(o=e.src)?o:""),null==(i=n.current)||i.appendChild(a),r.current=a}),[e.src]);return(0,p.useEffect)((()=>{c(),l()})),(0,p.useEffect)((()=>{var t;return a(),l(),i(null!=(t=e.src)?t:"").then((e=>{e&&n.current&&(u(),s(n.current),document.body.append(n.current))})),()=>{var e;c(),d(),s(null),null==(e=n.current)||e.remove(),n.current=null}}),[]),(0,p.useEffect)((()=>{n.current&&void 0!==e.muted&&(n.current.muted=e.muted)}),[e.muted]),null})),kT=e=>(0,w.clamp)(e,.1,10),OT=(e,t,n,r)=>Math.min(1,Math.min(e/n,t/r)),RT=(0,p.memo)((0,p.forwardRef)(((e,t)=>{var n,r,o,i,a;const s=(0,p.useRef)(),l=(0,p.useRef)(),c=(0,p.useRef)(),d=(0,p.useRef)(),u=(0,p.useRef)(),h=(0,p.useRef)(null),g=(0,p.useRef)(!1),m=(0,p.useMemo)((()=>{var t;return null!=(t=e.width)?t:600}),[e.width]),f=(0,p.useMemo)((()=>{var t;return null!=(t=e.height)?t:600}),[e.height]),v=null!=(n=e.framerate)?n:29.97,[y,b]=(0,p.useState)(!0),[x,C]=(0,p.useState)(0),[S,j]=(0,p.useState)(null!=(r=e.position)?r:1),[k,R]=(0,p.useState)(!1),[E,A]=(0,p.useState)(!1),[T,P]=(0,p.useState)(null!=(o=e.zoom)?o:1),[I,L]=(0,p.useState)(null!=(i=e.pan)?i:{x:0,y:0}),[M,K]=(0,p.useState)({width:0,height:0,ratio:1}),[D,N]=(0,p.useState)(1),[V,z]=(0,p.useState)(1),[B,H]=(0,p.useState)(1),F=(0,p.useMemo)((()=>{const e=[];return 1!==D&&e.push(`contrast(${D})`),1!==V&&e.push(`brightness(${V})`),1!==B&&e.push(`saturate(${B})`),e.join(" ")}),[V,D,B]),W=(0,p.useCallback)((t=>{const{width:n,height:r}=M,o=n*T,i=r*T,a=(0,w.clamp)((o-m)/2,0,Number.POSITIVE_INFINITY),s=(0,w.clamp)((i-f)/2,0,Number.POSITIVE_INFINITY);return{x:e.allowPanOffscreen?t.x:(0,w.clamp)(t.x,-a,a),y:e.allowPanOffscreen?t.y:(0,w.clamp)(t.y,-s,s)}}),[e.allowPanOffscreen,m,f,T]),$=(0,p.useCallback)((()=>{try{if(d.current&&u.current){const e=d.current,{width:t,height:n}=M;if(0===t&&0===n)return;const r=t*T,o=n*T,i=(m-r)/2+I.x,a=(f-o)/2+I.y;e.clearRect(0,0,m,f),e.filter=F,e.drawImage(u.current,0,0,t,n,i,a,r,o)}}catch(e){console.log("Error rendering video",e)}}),[M,T,I,F,m,f]),U=(0,p.useCallback)(((t=!1)=>{var n,r,o;if(!d.current)return;const i=null!=(n=null==(r=u.current)?void 0:r.currentTime)?n:0,a=Math.round(i*v),s=(0,w.clamp)(a,1,x||1),l=null!=(o=e.onFrameChange)?o:()=>{};s===S&&!0!==t||(j(s),$(),l(s,x))}),[v,S,$,e.onFrameChange,x]),Z=(0,p.useCallback)((()=>{if(!u.current)return;if(!d.current)return;const e=u.current;e&&(k||U(!0),e.networkState===e.NETWORK_IDLE?(g.current=!0,A(!1)):A(!0))}),[k,U]),G=(0,p.useCallback)((()=>{R(!0),A(!1),null==e.onPlay||e.onPlay()}),[e.onPlay]),Y=(0,p.useCallback)((()=>{R(!1),A(!1),null==e.onPause||e.onPause()}),[e.onPause]),X=(0,p.useCallback)((()=>{A(!1),Z()}),[Z]),q=(0,p.useCallback)((()=>{A(!0)}),[]),J=(0,p.useCallback)((()=>{R(!1),A(!1),null==e.onSeeked||e.onSeeked(),null==e.onEnded||e.onEnded(),null==e.onPause||e.onPause()}),[e.onEnded]),Q=(0,p.useCallback)((()=>{if(!(0,O.VS)(O.xS))return;const t=u.current;null!=t&&t.error&&g.current?(g.current=!1,t.load()):t&&(null==e.onError||e.onError(t.error))}),[e.onError]),ee=()=>{U(),k?s.current=requestAnimationFrame(ee):cancelAnimationFrame(s.current)};(0,p.useEffect)((()=>{k||$()}),[$,k]),(0,p.useEffect)((()=>(k&&(s.current=requestAnimationFrame(ee)),()=>{cancelAnimationFrame(s.current)})),[k]),(0,p.useEffect)((()=>{u.current&&e.speed&&(u.current.playbackRate=e.speed)}),[e.speed]),(0,p.useEffect)((()=>{u.current&&e.position&&(u.current.currentTime=e.position/v)}),[v,e.position]),(0,p.useEffect)((()=>{u.current&&e.currentTime&&(u.current.currentTime=e.currentTime)}),[e.currentTime]),(0,p.useEffect)((()=>{u.current&&(e.playing&&!k?u.current.play():!1===e.playing&&k&&u.current.pause())}),[k,e.playing]),(0,p.useEffect)((()=>{var t;e.allowInteractions&&(null==(t=l.current)||t.addEventListener("wheel",(e=>{e.preventDefault()})))}),[]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.zoom)&&P(kT(e.zoom))}),[e.zoom]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.pan)&&L(W(e.pan))}),[e.pan,W]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.brightness)&&z(e.brightness)}),[e.brightness]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.contrast)&&N(e.contrast)}),[e.contrast]),(0,p.useEffect)((()=>{(0,w.isDefined)(e.saturation)&&H(e.saturation)}),[e.saturation]),(0,p.useEffect)((()=>{$()}),[F,T,I,m,f]),(0,p.useEffect)((()=>{const t=new ResizeObserver((()=>{null==e.onResize||e.onResize(M)}));return t.observe(l.current),()=>t.disconnect()}),[M]);const te={currentFrame:S,length:x,playing:k,zoom:T,pan:I,videoDimensions:M,width:m,height:f,set currentTime(e){const t=u.current;t&&e!==this.currentTime&&(t.currentTime=e)},get currentTime(){var e,t;return null!=(e=null==(t=u.current)?void 0:t.currentTime)?e:0},get duration(){var e,t;return null!=(e=null==(t=u.current)?void 0:t.duration)?e:0},get volume(){var e,t;return null!=(e=null==(t=u.current)?void 0:t.volume)?e:1},set volume(e){const t=u.current;t&&(t.currentTime=e)},adjustPan:(e,t)=>W({x:e,y:t}),setZoom(e){P(kT(e))},setPan(e,t){const n=this.adjustPan(e,t);L(n)},setContrast(e){N(e)},setBrightness(e){z(e)},setSaturation(e){H(e)},play(){var e;null==(e=u.current)||e.play()},pause(){var e;null==(e=u.current)||e.pause()},seek(e){this.currentTime=(0,w.clamp)(e,0,this.duration),requestAnimationFrame((()=>$()))},goToFrame(e){const t=(0,w.clamp)(e,1,x);this.currentTime=t/v,requestAnimationFrame((()=>$()))}};return t instanceof Function?t(te):t&&(t.current=te),(0,p.useEffect)((()=>{const{width:t,height:n}=M,r=OT(m,f,t,n);if(M.ratio!==r){const t=Object.assign({},M,{ratio:r});K(t),e.zoom!==M.ratio&&(null==e.onResize||e.onResize(t))}}),[T,m,f,M]),(0,p.useEffect)((()=>{let t,n,r=!1;const o=()=>{var i;if(!r)if(!1!==h.current)if(4!==(null==(i=u.current)?void 0:i.readyState))n=setTimeout(o,10);else{r=!0;const n=u.current;t=setTimeout((()=>{const t=Math.ceil(n.duration*v),[r,o]=[n.videoWidth,n.videoHeight],i={width:r,height:o,ratio:OT(m,f,r,o)};K(i),C(t),b(!1),U(!0),null==e.onLoad||e.onLoad(Object.assign({},te,{videoDimensions:i,length:t}))}),200)}else b(!1)};return o(),()=>{n&&clearTimeout(n),t&&clearTimeout(t)}}),[]),(0,p.useEffect)((()=>()=>{const e=d.current;e&&e.clearRect(0,0,e.canvas.width,e.canvas.height),d.current=void 0,c.current=void 0,u.current=void 0,l.current=void 0}),[]),(0,_.jsxs)(Ze.eB,{ref:l,name:"video-canvas",children:[y&&(0,_.jsx)(Ze.Sl,{name:"loading",children:(0,_.jsx)(Ze.eB,{name:"spinner"})}),(0,_.jsxs)(Ze.Sl,{name:"view",onClick:e.onClick,style:{width:m,height:f},children:[(0,_.jsx)(CT,{ref:e=>{e&&c.current!==e&&(c.current=e,d.current=e.getContext("2d"))},width:m,height:f}),!y&&E&&(0,_.jsx)(Ze.Sl,{name:"buffering"})]}),(0,_.jsx)(jT,{ref:u,controls:!1,preload:"auto",src:e.src,muted:null!=(a=e.muted)&&a,canPlayType:e=>h.current=e,onPlay:G,onPause:Y,onLoadedData:Z,onCanPlay:Z,onSeeked:t=>{Z(),null==e.onSeeked||e.onSeeked(t)},onSeeking:t=>{Z(),null==e.onSeeked||e.onSeeked(t)},onTimeUpdate:t=>{Z(),null==e.onTimeUpdate||e.onTimeUpdate(t)},onProgress:Z,onPlaying:X,onWaiting:q,onEnded:J,onError:Q})]})})));RT.displayName="VideoCanvas";const ET=h.gK.model("TimeTraveller",{undoIdx:0,targetPath:"",skipNextUndoState:h.gK.optional(h.gK.boolean,!1),lastAdditionTime:h.gK.optional(h.gK.Date,new Date),createdIdx:0}).volatile((()=>({history:[],isFrozen:!1}))).views((e=>({get canUndo(){return e.undoIdx>0},get canRedo(){return e.undoIdx1}}))).actions((e=>{let t,n;const r=new Set,o=new Set;let i=!1,a=!1;function s(e=!0){r.forEach((t=>t(e)))}return{freeze(t){o.add(t),e.isFrozen||(i=!1,e.isFrozen=!0)},safeUnfreeze(t){o.delete(t),e.isFrozen=o.size>0},unfreeze(t){e.safeUnfreeze(t),e.isFrozen||(i&&e.recordNow(),e.setReplaceNextUndoState(!1))},setSkipNextUndoState(t=!0){e.skipNextUndoState=t},setReplaceNextUndoState(e=!0){a=e},recordNow(){t&&e.addUndoState((0,h.dV)(t))},onUpdate:e=>(r.add(e),()=>{r.delete(e)}),addUndoState(t){e.isFrozen?i=!0:e.skipNextUndoState?e.skipNextUndoState=!1:(e.history=e.history.slice(0,e.undoIdx+!a).concat(t),e.undoIdx=e.history.length-1,a=!1,i=!1,e.lastAdditionTime=new Date)},reinit(n=!0){e.history=[(0,h.dV)(t)],e.undoIdx=0,e.createdIdx=0,s(n)},afterCreate(){if(t=e.targetPath?(0,h.o1)(e,e.targetPath):(0,h._$)(e).targetStore,!t)throw new Error("Failed to find target store for TimeTraveller. Please provide `targetPath` property, or a `targetStore` in the environment");n=(0,h.aQ)(t,(e=>this.addUndoState(e))),0===e.history.length&&e.recordNow(),e.createdIdx=e.undoIdx},beforeDestroy(){n(),t=null,n=null,r.clear(),o.clear()},undo(){e.set(e.undoIdx-1)},redo(){e.set(e.undoIdx+1)},set(n){e.undoIdx=n,e.skipNextUndoState=!0,(0,h.Nh)(t,e.history[n]),s(),(0,O.VS)(O.$b)&&setTimeout((()=>{e.setSkipNextUndoState(!1)}))},reset(){(0,h.Nh)(t,e.history[e.createdIdx]),s()}}})),_T=h.gK.model("GlobalOffset",{start:h.gK.number,end:h.gK.number,calculated:!1}).views((e=>({get serialized(){return{start:e.start,end:e.end}}}))),AT=h.gK.model("RichTextRegionModel",{type:"richtextregion",object:h.gK.late((()=>h.gK.reference(MA))),startOffset:h.gK.integer,endOffset:h.gK.integer,start:h.gK.string,end:h.gK.string,text:h.gK.maybeNull(h.gK.string),isText:h.gK.optional(h.gK.boolean,!1),globalOffsets:h.gK.maybeNull(_T)}).volatile((()=>({hideable:!0,cachedRange:null}))).views((e=>({get parent(){return(0,h.$Q)((()=>e.object))},getRegionElement(){var t;return null==(t=e._spans)?void 0:t[0]},get displayValue(){return e.text}}))).actions((e=>({beforeDestroy(){try{e.removeHighlight()}catch(e){console.warn(e)}},applyAdditionalDataFromResult(t){var n,r;const o=null==t||null==(n=t.type)?void 0:n.endsWith("labels"),i=(0,w.isDefined)(null==t||null==(r=t.value)?void 0:r.text);o&&i&&(e.text=t.value.text)},serialize(){const t={value:{}};if(e.isText)Object.assign(t.value,{start:e.startOffset,end:e.endOffset});else try{if((0,O.VS)(O.Er)){const n=e.parent.globalOffsetsToRelativeOffsets(e.globalOffsets);Object.assign(t.value,Object.assign({},n,{globalOffsets:e.globalOffsets.serialized}))}else{const n=e._getRootNode(!0),r=Gt(e.globalOffsets.start,e.globalOffsets.end,n);if(!r)throw new Error;const o=KA.fromRange(r,n);Object.assign(t.value,Object.assign({},o,{globalOffsets:e.globalOffsets.serialized}))}}catch(n){const{start:r,end:o,startOffset:i,endOffset:a}=e;Object.assign(t.value,{start:r,end:o,startOffset:i,endOffset:a}),e.globalOffsets&&Object.assign(t.value,{globalOffsets:e.globalOffsets.serialized})}return"yes"===e.object.savetextresult&&(0,w.isDefined)(e.text)&&(t.value.text=e.text),t},updateTextOffsets(t,n){Object.assign(e,{startOffset:t,endOffset:n})},updateGlobalOffsets(t,n){e.globalOffsets=_T.create({start:t,end:n,calculated:!0})},getRangeToHighlight(){var t;const n=e._getRootNode();if(!n||!e.globalOffsets)return;if(!e.cachedRange||e.cachedRange.collapsed||!(null!=(t=e.cachedRange.startContainer)&&null!=(t=t.ownerDocument)&&t.defaultView)){const{start:t,end:r}=e.globalOffsets;e.cachedRange=Gt(t,r,n)}return e.cachedRange},updateXPathsFromGlobalOffsets(){const t=e.parent.globalOffsetsToRelativeOffsets(e.globalOffsets);t&&e._setXPaths(t)},initRangeAndOffsets(){var t;if(null!=(t=e.globalOffsets)&&t.calculated)return;const n=e._getRootNode();let r;if(e.isText){const{startOffset:t,endOffset:r}=e;return e.globalOffsets={start:t,end:r,calculated:!0},void((0,O.VS)(O.Er)||(e.cachedRange=Gt(t,r,n)))}if((0,O.VS)(O.Er)){const t=e.parent.relativeOffsetsToGlobalOffsets(e.start,e.startOffset,e.end,e.endOffset);if(t){const[n,r]=t;return void(e.globalOffsets={start:n,end:r,calculated:!0})}if(e.globalOffsets)return void e.updateXPathsFromGlobalOffsets()}else{if(r=e._getRange({useOriginalContent:!0}),r){const t=e._getRootNode(!0),[o,i]=Qt(r,t);return e.globalOffsets={start:o,end:i,calculated:!0},void(e.cachedRange=Gt(o,i,n))}if(r=e._getRange({useOriginalContent:!1}),r){const[t,o]=Qt(r,n);return e.globalOffsets={start:t,end:o,calculated:!0},void(e.cachedRange=r)}if(e.globalOffsets&&(0,w.isDefined)(n)){const{start:t,end:r}=e.globalOffsets;return e.cachedRange=Gt(t,r,n),void(e.cachedRange&&(e._fixXPaths(e.cachedRange,n),e.globalOffsets.calculated=!0))}}},_fixXPaths(t,n){const r=KA.fromRange(t,n);(0,w.isDefined)(r)&&(e.start=r.start,e.end=r.end,e.startOffset=r.startOffset,e.endOffset=r.endOffset)},_setXPaths(t){e.start=t.start,e.end=t.end,e.startOffset=t.startOffset,e.endOffset=t.endOffset},_getRange({useOriginalContent:t=!1,useCache:n=!0}={}){const r=e._getRootNode(t),o=(0,w.isDefined)(e._cachedRange)&&!t&&n,i=o&&r&&!r.contains(e._cachedRange.commonAncestorContainer);if(!1===o||i){const r=e._createNativeRange(t);return t||!1===n?r:e._cachedRange=r}return e._cachedRange},_getRootNode(t=!1){var n,r;const o=e.parent;let i;i=(0,O.VS)(O.Er)?o.visibleNodeRef:t?o.originalContentRef:o.useWorkingNode?o.workingNodeRef:o.visibleNodeRef;const a=i.current;return null!=(n=null==a||null==(r=a.contentDocument)?void 0:r.body)?n:a},_createNativeRange(t=!1){const n=e._getRootNode(t);if(void 0===n)return;const{start:r,startOffset:o,end:i,endOffset:a}=e;try{return KA.toRange(r,o,i,a,n)}catch(e){console.warn("can't locate xpath",{start:r,end:i},e)}}}))),TT=h.gK.compose("RichTextRegionModel",it,ht,We,AT,RA);x.addRegionType(TT,"text"),x.addRegionType(TT,"hypertext"),x.addRegionType(TT,"richtext");const PT=h.gK.model({value:h.gK.maybeNull(h.gK.string),hotkey:h.gK.maybeNull(h.gK.string),framerate:h.gK.optional(h.gK.string,"24"),height:h.gK.optional(h.gK.string,"600"),timelineheight:h.gK.maybeNull(h.gK.string),muted:!1}),IT=h.gK.model({type:"video",_value:h.gK.optional(h.gK.string,""),mergeLabelsAndResults:!0}).volatile((()=>({errors:[],speed:1,ref:p.createRef(),frame:1,length:1,drawingRegion:null}))).views((e=>({get store(){return(0,h.Zn)(e)},get currentFrame(){var t,n;return null!=(t=null==(n=e.ref.current)?void 0:n.position)?t:1},get timelineControl(){var t;return null==(t=e.annotation.toNames.get(e.name))?void 0:t.find((e=>e.type.includes("timeline")))},get videoControl(){var t;return null==(t=e.annotation.toNames.get(e.name))?void 0:t.find((e=>e.type.includes("video")))},states(){var t;return null==(t=e.annotation.toNames.get(e.name))?void 0:t.filter((e=>e.type.endsWith("labels")))},activeStates(){const t=e.states();return t?t.filter((e=>!0===e.isSelected)):null},get hasStates(){const t=e.states();return t&&t.length>0}}))).actions((e=>({afterCreate(){var t;const n=Number(j(e.framerate,null==(t=e.store.task)?void 0:t.dataObj));!n||isNaN(n)?e.framerate="24":e.framerate=String(n<1?1/n:n)}}))).actions((e=>({triggerSync(t,n){e.ref.current&&e.syncSend(Object.assign({playing:e.ref.current.playing,time:e.ref.current.currentTime},n),t)},triggerSyncPlay(){e.triggerSync("play",{playing:!0})},triggerSyncPause(){e.triggerSync("pause",{playing:!1})},registerSyncHandlers(){["play","pause","seek"].forEach((t=>{e.syncHandlers.set(t,e.handleSync)})),e.syncHandlers.set("speed",e.handleSyncSpeed)},handleSync(t){if(!e.ref.current)return;const n=e.ref.current;t.playing?n.playing||n.play():n.playing&&n.pause(),t.speed&&(e.speed=t.speed),n.currentTime=t.time},handleSyncSpeed({speed:t}){e.speed=t},handleSeek(){e.triggerSync("seek")},syncMuted(t){e.muted=t}}))).actions((e=>({setLength(t){e.length=t},setOnlyFrame(t){e.frame!==t&&(e.frame=t)},setFrame(t){e.frame!==t&&e.framerate&&(e.frame=t,e.ref.current.currentTime=t/e.framerate)},addVideoRegion(t){const n=e.videoControl;if(!n)return void console.error("No video control is found");const r=[Object.assign({frame:e.frame,enabled:!0,rotation:0},t)],o=e.annotation.createResult({sequence:r},{},n,e);return e.activeStates().forEach((e=>{o.setValue(e)})),o},addTimelineRegion(t){var n,r;const o=e.timelineControl;if(!o)return void console.error("No video timeline control is found");const i=null!=(n=t.frame)?n:e.frame,a={ranges:[{start:i,end:i}]},s=null==(r=e.activeStates())?void 0:r[0],l={[s.valueType]:s.selectedValues()};return e.annotation.createResult(a,l,o,e)},deleteRegion(t){var n;null==(n=e.findRegion(t))||n.deleteRegion()},findRegion:t=>e.regs.find((e=>e.cleanId===t)),startDrawing(t){var n;const r=e.timelineControl;if(null!=r&&null!=(n=r.selectedLabels)&&n.length||null!=r&&r.allowempty)return e.drawingRegion=e.addTimelineRegion({frame:t,enabled:!1}),e.drawingRegion},finishDrawing(){e.drawingRegion=null}}))),LT=h.gK.compose("VideoModel",Fe,PT,ze,bn,Pe,IT,Le),MT=h.gK.model("TimelineRange",{start:h.gK.maybeNull(h.gK.integer),end:h.gK.maybeNull(h.gK.integer)});function KT(e){const{start:t,end:n}=e;return(0,w.isDefined)(t)?(0,w.isDefined)(n)?t===n?{frame:t,enabled:!1}:[{frame:t,enabled:!0},{frame:n,enabled:!1}]:{frame:t,enabled:!0}:(0,w.isDefined)(n)?{frame:n,enabled:!1}:[]}const DT=h.gK.model("TimelineRegionModel",{type:"timelineregion",object:h.gK.late((()=>h.gK.reference(LT))),ranges:h.gK.array(MT)}).volatile((()=>({hideable:!0}))).views((e=>({get parent(){return(0,h._n)(e)?e.object:null},get sequence(){return e.ranges.flatMap(KT)},getShape:()=>null}))).actions((e=>({serialize:()=>({value:{ranges:e.ranges}}),isInLifespan:e=>!0,setRanges([t,n]){e.parent.annotation.history.setReplaceNextUndoState(),e.ranges=[{start:t,end:n}]}}))),NT=h.gK.compose("TimelineRegionModel",it,ht,We,DT);x.addRegionType(NT,"video");const VT=yr("TimeSeries","Time Series Segmentation"),zT=h.gK.model("TimeSeriesRegionModel",{id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"timeseriesregion",object:h.gK.late((()=>h.gK.reference(sT))),start:h.gK.union(h.gK.number,h.gK.string),end:h.gK.union(h.gK.number,h.gK.string),instant:!1}).volatile((()=>({hideable:!0}))).views((e=>({get parent(){return e.object},get annotation(){var t;const n=(0,h.Zn)(e);return n!==e?null==(t=n.annotationStore)?void 0:t.selected:null},getRegionElement:()=>e._brushRef}))).actions((e=>({growRight(t){e.end=e.end+t},growLeft(t){e.start=e.start-t},shrinkRight(t){e.end=e.end-t},shrinkLeft(t){e.start=e.start+t},selectRegion(){const t=1e3,n=1e4;VT.addNamed("ts:grow-left",(()=>e.growLeft(t))),VT.addNamed("ts:grow-right",(()=>e.growRight(t))),VT.addNamed("ts:shrink-left",(()=>e.shrinkLeft(t))),VT.addNamed("ts:shrink-right",(()=>e.shrinkRight(t))),VT.addNamed("ts:grow-left-largre",(()=>e.growLeft(n))),VT.addNamed("ts:grow-right-largre",(()=>e.growRight(n))),VT.addNamed("ts:shrink-left-largre",(()=>e.shrinkLeft(n))),VT.addNamed("ts:shrink-right-largre",(()=>e.shrinkRight(n))),e.parent.scrollToRegion(e)},updateAppearenceFromState(){e.labelsState&&e.parent.updateView()},afterUnselectRegion(){VT.unbindAll(),e.parent.updateView()},updateRegion(t,n){e.start=t,e.end=n,e.notifyDrawingFinished()},afterCreate(){"string"==typeof e.start&&(e.start=e.parent.parseTime(e.start),e.end=e.parent.parseTime(e.end))},serialize(){const t=e.parent.timeformat?$A.aLc(e.parent.timeformat):Number;return{value:{start:t(e.start),end:t(e.end),instant:e.instant}}}}))),BT=h.gK.compose("TimeSeriesRegionModel",it,ht,We,Pe,zT);x.addTag("timeseriesregion",BT,(()=>{})),x.addRegionType(BT,"timeseries");const HT=(e,t)=>Object.fromEntries(e.map((e=>[e,t[e]]))),FT=h.gK.model("VideoRegionModel",{id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),object:h.gK.late((()=>h.gK.reference(LT))),sequence:h.gK.frozen([])}).preProcessSnapshot((e=>Object.assign({},e,{sequence:e.sequence||e.value.sequence}))).volatile((()=>({hideable:!0}))).views((e=>({get parent(){return e.object},get annotation(){var t;return null==(t=(0,h.Zn)(e))||null==(t=t.annotationStore)?void 0:t.selected},getShape(){throw new Error("Method getShape be implemented on a shape level")},getVisibility:()=>!0}))).actions((e=>({updateShape(){throw new Error("Method updateShape must be implemented on a shape level")},onSelectInOutliner(){(0,O.VS)(O.Fk)&&e.object.setFrame(e.sequence[0].frame)},serialize(){var t,n;const{framerate:r,length:o}=e.object;return{value:{framesCount:o,duration:null!=(t=null==(n=e.object)||null==(n=n.ref)||null==(n=n.current)?void 0:n.duration)?t:0,sequence:e.sequence.map((e=>Object.assign({},e,{time:e.frame/r})))}}},toggleLifespan(t){const n=e.closestKeypoint(t,!0);if(n){const t=e.sequence.indexOf(n);e.sequence=[...e.sequence.slice(0,t),Object.assign({},n,{enabled:!n.enabled}),...e.sequence.slice(t+1)]}},addKeypoint(t){var n,r,o;const i=Array.from(e.sequence),a=e.closestKeypoint(t),s=Object.assign({},null!=(n=null!=(r=e.getShape(t))?r:a)?n:{x:0,y:0},{enabled:null==(o=null==a?void 0:a.enabled)||o,frame:t});i.push(s),i.sort(((e,t)=>e.frame-t.frame)),e.sequence=i,e.updateShape(Object.assign({},s),s.frame)},removeKeypoint(t){e.sequence=e.sequence.filter((e=>e.frame!==t))},isInLifespan(t){const n=e.closestKeypoint(t);if(n){const{enabled:e,frame:r}=n;return r===t&&!e||e}return!1},closestKeypoint(t,n=!1){const r=e.sequence;let o;const i=r.filter((({frame:e})=>e<=t));return o=i[i.length-1],o||!0===n||(o=r.find((({frame:e})=>e>=t))),o}}))),WT=h.gK.compose("VideoRegionModel",it,ht,We,FT);function $T(e){let t=e;for(;t>0;)t-=360;return(t-180)%360+180}const UT=(e,t,n,r)=>{const o=(n-e.frame)/(t.frame-e.frame);if("rotation"===r){const n=$T(t[r]-e[r]);return $T(e[r]+n*o)}return e[r]+(t[r]-e[r])*o},ZT=h.gK.model("VideoRectangleRegionModel",{type:"videorectangleregion"}).volatile((()=>({props:["x","y","width","height","rotation"]}))).views((e=>({getShape(t){let n,r;for(const o of e.sequence){if(o.frame===t)return HT(e.props,o);if(o.frame>t){r=o;break}n=o}return n?r?Object.fromEntries(e.props.map((e=>[e,UT(n,r,t,e)]))):HT(e.props,n):null},getVisibility:()=>!0}))).actions((e=>({updateShape(t,n){const r=Object.assign({},t,{frame:n,enabled:!0}),o=e.closestKeypoint(n),i=e.sequence.findIndex((e=>e.frame>=n));if(i<0)e.sequence=[...e.sequence,r];else{var a,s;const r=Object.assign({},null!=(a=e.sequence[i])?a:{},t,{enabled:null==(s=null==o?void 0:o.enabled)||s,frame:n});e.sequence=[...e.sequence.slice(0,i),r,...e.sequence.slice(i+(e.sequence[i].frame===n))]}}}))),GT=h.gK.compose("VideoRectangleRegionModel",it,WT,ht,We,ZT);x.addRegionType(GT,"video");const YT=h.gK.compose("ClassificationArea",it,We,ht,h.gK.model({object:h.gK.late((()=>h.gK.reference(h.gK.union(...x.objectTypes())))),classification:!0}).views((e=>({get supportSuggestions(){return!1},get type(){return""}}))).actions((()=>({serialize:()=>({})})))),XT=h.gK.union({dispatcher(e){if(e.$treenode)return e.$treenode.type;if(!e.points&&!e.sequence&&!e.ranges&&e.value&&Object.values(e.value).length<=1)return YT;const t=D.cleanUpId(e.object.name||e.object),n=window.Htx.annotationStore.names.get(t),r=x.getAvailableAreas(n.type,e);var o;return"video"===n.type?e.sequence||null!=(o=e.value)&&o.sequence?GT:NT:r.length?h.gK.union(...r,YT):YT}},un,D_,NT,BT,fO,TT,qk,Zk,aO,Vk,GT,YT),qT=XT;var JT=n(87835),QT=n.n(JT);const eP=e=>e?e.map((e=>e.map((e=>({label:e,value:e}))))):[],tP={pathSeparator:"/",showFullPath:!0},nP=h.gK.model("UserExtended",{id:h.gK.identifierNumber,firstName:h.gK.maybeNull(h.gK.string),lastName:h.gK.maybeNull(h.gK.string),username:h.gK.maybeNull(h.gK.string),email:h.gK.maybeNull(h.gK.string),lastActivity:h.gK.maybeNull(h.gK.string),avatar:h.gK.maybeNull(h.gK.string),initials:h.gK.maybeNull(h.gK.string),phone:h.gK.maybeNull(h.gK.string)}).preProcessSnapshot((e=>(0,w.camelizeKeys)(null!=e?e:{}))),rP=(h.gK.model("UserStore",{id:h.gK.maybeNull(h.gK.integer),pk:h.gK.maybeNull(h.gK.integer),firstName:h.gK.maybeNull(h.gK.string),lastName:h.gK.maybeNull(h.gK.string)}).views((e=>({get displayName(){return e.firstName||e.lastName?`${e.firstName} ${e.lastName}`:""}}))),["id"]),oP=h.gK.model({regionId:h.gK.maybe(h.gK.string),controlName:h.gK.maybe(h.gK.string)}).views((e=>({get annotation(){return(0,h.PA)(e).annotation},get region(){return e.annotation.regions.find((t=>t.cleanId===e.regionId))},get result(){return e.controlName&&e.region?e.region.results.find((t=>t.from_name.name===e.controlName)):null},get overlayNode(){var t;return null!=(t=e.result)?t:e.region},get targetKey(){const t=[e.regionId];return(0,w.isDefined)(e.controlName)&&t.push(e.controlName),t.join("-")}}))).actions((e=>({serialize(){const t=e.toJSON();return(0,Yn.A)(t,rP)},setRegion(t){e.regionId=t.cleanId}}))),iP=h.gK.model("CommentBase",Object.assign({text:h.gK.string},isFF(O.v1)?{regionRef:h.gK.optional(h.gK.maybeNull(oP),null),classifications:h.gK.optional(h.gK.frozen({}),null)}:{})).views((e=>({get commentsStore(){try{return Te.getParentOfTypeString(e,"CommentStore")}catch(e){return null}},get annotation(){const t=(0,h._$)(e);if(null!=t&&t.annotationStore)return t.annotationStore.selected;const n=e.commentsStore;return null==n?void 0:n.annotation},get isHighlighted(){var t,n;const r=null==(t=e.commentsStore)||null==(t=t.highlightedComment)||null==(t=t.regionRef)?void 0:t.targetKey,o=null==(n=e.regionRef)?void 0:n.targetKey;return!!r&&r===o}}))).actions((e=>({setText(t){e.text=t},unsetLink(){e.regionRef=null},setRegionLink(t){e.regionRef={regionId:t.cleanId}},setClassifications(t){e.classifications=t},setResultLink(t){e.regionRef={regionId:t.area.cleanId,controlName:t.from_name.name}},setHighlighted(t=!0){const n=e.commentsStore;n&&(t?n.setHighlightedComment(e):e.isHighlighted&&n.setHighlightedComment(void 0))}}))),aP=iP.named("Comment").props({id:h.gK.identifierNumber,text:h.gK.string,createdAt:h.gK.optional(h.gK.string,rn.UDate.currentISODate()),updatedAt:h.gK.optional(h.gK.string,rn.UDate.currentISODate()),resolvedAt:h.gK.optional(h.gK.maybeNull(h.gK.string),null),createdBy:h.gK.optional(h.gK.maybeNull(h.gK.safeReference(nP)),null),isResolved:!1,isEditMode:h.gK.optional(h.gK.boolean,!1),isDeleted:h.gK.optional(h.gK.boolean,!1),isConfirmDelete:h.gK.optional(h.gK.boolean,!1),isUpdating:h.gK.optional(h.gK.boolean,!1)}).preProcessSnapshot((e=>(0,w.camelizeKeys)(null!=e?e:{}))).volatile((e=>({_commentRef:(0,p.createRef)()}))).views((e=>({get sdk(){return(0,h._$)(e).events},get isPersisted(){return e.id>0&&!e.isUpdating},get canResolveAny(){return(0,h.Zn)(e).interfaces.includes("comments:resolve-any")}}))).actions((e=>{const t=(0,h.L3)((function*(){if(e.isPersisted&&!e.isDeleted){e.isResolved=!e.isResolved;try{yield e.sdk.invoke("comments:update",{id:e.id,is_resolved:e.isResolved})}catch(t){throw e.isResolved=!e.isResolved,t}}}));const n=(0,h.L3)((function*(t,n=void 0){if(e.isPersisted&&!e.isDeleted){const r={id:e.id,text:t};void 0!==n&&(r.classifications=n),yield e.sdk.invoke("comments:update",r)}e.setEditMode(!1)})),r=(0,h.L3)((function*(t){if(e.isPersisted&&!e.isDeleted&&!e.isUpdating){e.isUpdating=!0;const[n]=yield e.sdk.invoke("comments:update",Object.assign({id:e.id},(0,w.snakeizeKeys)(t)));if(n.error)return void(e.isUpdating=!1);const r=(0,w.camelizeKeys)(n);(0,h.Nh)(e,r),e.isUpdating=!1}}));return{toggleResolve:t,setEditMode:function(t){e.isEditMode=t},setDeleted:function(t){e.isDeleted=t},setConfirmMode:function(t){e.isConfirmDelete=t},updateComment:n,update:r,deleteComment:(0,h.L3)((function*(){e.isPersisted&&!e.isDeleted&&e.isConfirmDelete&&(yield e.sdk.invoke("comments:delete",{id:e.id})),e.setDeleted(!0),e.setConfirmMode(!1)})),setRegionLink:function(t){const n={regionId:t.cleanId};e.update({regionRef:n})},unsetLink:function(){e.update({regionRef:null})},scrollIntoView:()=>{const t=e._commentRef.current;t&&(t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView({block:"center",behavior:"smooth"}))}}})),sP=h.gK.model("CommentStore",{loading:h.gK.optional(h.gK.maybeNull(h.gK.string),"list"),comments:h.gK.optional(h.gK.array(aP),[]),highlightedComment:h.gK.safeReference(aP)}).volatile((()=>({addedCommentThisSession:!1,commentFormSubmit:()=>{},currentComment:{},inputRef:{},tooltipMessage:"",commentsKey:null}))).views((e=>({get store(){return(0,h.PA)(e)},get task(){return(0,h.PA)(e).task},get annotationStore(){return(0,h.PA)(e).annotationStore},get annotation(){return e.annotationStore.selected},get annotationId(){var t;return isNaN(null==(t=e.annotation)?void 0:t.pk)?void 0:e.annotation.pk},get draftId(){var t;return null!=(t=e.annotation)&&t.draftId?e.annotation.draftId:null},get currentUser(){return(0,h.Zn)(e).user},get commentClassificationsItems(){return(e=>{if(!e)return[];const t=(new DOMParser).parseFromString(e,"application/xml"),n=[],r=(e,t=0,n=[])=>{const o=e.getAttribute("value")||"",i=[...n,o],a=[];return e.querySelectorAll(":scope > TaxonomyItem").forEach((e=>{a.push(r(e,t+1,i))})),{label:o,children:a.length?a:void 0,depth:t,path:i}},o=t.querySelector("Taxonomy");return o&&o.querySelectorAll(":scope > TaxonomyItem").forEach((e=>{n.push(r(e))})),n})((0,h.Zn)(e).commentClassificationConfig)},get sdk(){return(0,h._$)(e).events},get isListLoading(){return"list"===e.loading},get taskId(){var t;return null==(t=e.task)?void 0:t.id},get canPersist(){return(0,O.VS)(O.K3)?null!==e.taskId&&void 0!==e.taskId:null!==e.annotationId&&void 0!==e.annotationId},get isCommentable(){return!e.annotation||["annotation"].includes(e.annotation.type)},get queuedComments(){return e.comments.filter((e=>!e.isPersisted)).sort(((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()))},get hasUnsaved(){return e.queuedComments.length>0},get commentInProgress(){if(e.annotation)return e.currentComment[e.annotation.id]},get overlayComments(){const t=new Set;return e.comments.filter((e=>{const{regionRef:n}=e;return!!n&&(!t.has(n.targetKey)&&(t.add(n.targetKey),!0))}))},get isHighlighting(){return!!e.highlightedComment},get targetCommentsKey(){return e.annotationId?{annotation:e.annotationId}:e.draftId?{draft:e.draftId}:null},get isRelevantList(){return!(!e.commentsKey||!e.targetCommentsKey)&&(Object.keys(e.commentsKey).length===Object.keys(e.targetCommentsKey).length&&Object.keys(e.commentsKey).every((t=>e.commentsKey[t]===e.targetCommentsKey[t])))}}))).actions((e=>{const t=(0,h.L3)((function*(t){if("addComment"===e.loading)return;"string"==typeof t&&(t={text:t}),e.setLoading("addComment");const n=-1*Date.now(),r=Object.assign({},(0,w.snakeizeKeys)(t),{id:n,task:e.taskId,created_by:e.currentUser.id,created_at:rn.UDate.currentISODate()});let o=!1;const{annotation:i}=e;if(!(0,O.VS)(O.K3)||e.annotationId||e.draftId||(i.history.hasChanges&&!i.draftSaved?(i.saveDraftImmediately(),yield(0,u.z7)((()=>i.draftSaved))):(i.versions.draft=i.versions.result,i.setDraftSelected(),i.setDraftSaving(!0),yield e.store.submitDraft(e.annotation),i.onDraftSaved()),o=!0),e.annotationId&&(r.annotation=e.annotationId),e.draftId&&(r.draft=e.draftId),e.comments.unshift(r),e.setAddedCommentThisSession(!0),e.canPersist)try{const[t]=yield e.sdk.invoke("comments:create",r);t&&(e.replaceId(n,t),e.setCurrentComment(void 0),o&&e.listComments())}catch(t){throw e.removeCommentById(n),t}finally{e.setLoading(null)}else e.setLoading(null)})),n=(0,h.L3)((function*(){e.currentComment&&(yield t(e.currentComment))}));const r=(0,h.L3)((function*({mounted:t={current:!0},suppressClearComments:n}={}){if(n||e.setComments([]),e.draftId||e.annotationId)try{t.current&&e.setLoading("list");const n=e.annotationId,r=e.targetCommentsKey,[o]=yield e.sdk.invoke("comments:list",{annotation:n,draft:e.draftId});t.current&&n===e.annotationId&&e.setComments(o,r)}catch(e){console.error(e)}finally{t.current&&e.setLoading(null)}}));return{serialize:function({commentsFilter:t,queueComments:n}={commentsFilter:"all",queueComments:!1}){const r=(0,h.dV)("queued"===t?e.queuedComments:e.comments);return{comments:n?r.map((e=>Object.assign({id:e.id>0?-1*e.id:e.id},e))):r}},hasCache:function(e){localStorage.getItem(`commentStore.${e}`)},removeCache:function(e){localStorage.removeItem(`commentStore.${e}`)},toCache:function(t,n={commentsFilter:"all",queueComments:!0}){localStorage.setItem(`commentStore.${t}`,JSON.stringify(e.serialize(n)))},fromCache:function(t,{merge:n=!0,queueRestored:r=!1}={}){const o=localStorage.getItem(`commentStore.${t}`);if(o){const t=JSON.parse(o);if(Array.isArray(null==t?void 0:t.comments)){let o=[];r&&(o=t.comments.map((e=>e.id))),n&&(t.comments=QT()([...t.comments,...(0,h.dV)(e.comments)],"id").sort(((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()))),o.length&&(t.comments=t.comments.map((e=>o.includes(e.id)?Object.assign({id:e.id>0?-1*e.id:e.id},e):e))),e.setComments(t.comments)}}},restoreCommentsFromCache:async function(t){e.fromCache(t,{merge:!0,queueRestored:!0})},setAddedCommentThisSession:function(t=!1){e.addedCommentThisSession=t},setCommentFormSubmit:function(t){e.commentFormSubmit=t},setInputRef:function(t){e.inputRef=t},setLoading:function(t=null){e.loading=t},setTooltipMessage:function(t){e.tooltipMessage=t},replaceId:function(t,n){const r=e.comments,o=r.findIndex((e=>e.id===t));if(o>-1){const e=(0,h.dV)(r[o]);r[o]=Object.assign({},e,{id:n.id||e.id})}},removeCommentById:function(t){const n=e.comments,r=n.findIndex((e=>e.id===t));r>-1&&n.splice(r,1)},persistQueuedComments:async function(){const t=e.queuedComments;if(e.canPersist&&t.length){!(0,O.VS)(O.K3)||e.annotationId||e.draftId||await e.store.submitDraft(e.annotation);try{e.setLoading("persistQueuedComments");for(const n of t){e.annotationId?n.annotation=e.annotationId:e.draftId?n.draft=e.draftId:n.task=e.taskId;const[t]=await e.sdk.invoke("comments:create",n);t&&e.replaceId(n.id,t)}}catch(e){console.error(e)}finally{e.setLoading(null)}}},setCurrentComment:function(t){e.currentComment=Object.assign({},e.currentComment,{[e.annotation.id]:t})},addCurrentComment:n,addComment:t,setComments:function(t,n=null){t&&(e.comments.replace(t),e.commentsKey=n)},listComments:r,setHighlightedComment:function(t){e.highlightedComment=t}}})),lP=h.gK.union(un,Vk,Zk,BT,qk,aO,fO,VE,TT,BT,NT,D_,GT);var cP,dP,uP;const hP=yr("RegionStore"),gP="outliner:sort",mP="outliner:sort-direction",pP="outliner:group",fP="regionstore:view",vP=h.gK.model({selected:h.gK.optional(h.gK.map(h.gK.safeReference(lP)),{}),drawingSelected:h.gK.optional(h.gK.map(h.gK.safeReference(lP)),{})}).views((e=>({get keys(){return Array.from(e.selected.keys())},get annotation(){return(0,h.PA)(e).annotation},get highlighted(){return 1===e.selected.size?e.selected.values().next().value:null},get size(){return e.selected.size},get list(){return Array.from(e.selected.values())},isSelected:t=>e.selected.has(t.id)}))).actions((e=>{const t=Y((()=>{e._updateResultsFromSelection()}),0);return{beforeUnselect(e){e.perRegionTags.forEach((e=>null==e.submitChanges?void 0:e.submitChanges()))},afterUnselect(e){null==e.afterUnselectRegion||e.afterUnselectRegion()},drawingSelect(t){e.drawingSelected.put(t)},drawingUnselect(){Array.from(e.drawingSelected.values()).forEach((t=>{e.drawingSelected.delete(t.id)}))},select(n){var r;e.selected.put(n),n.selectRegion&&n.selectRegion(),e.highlighted?(e.highlighted.perRegionTags.forEach((e=>null==e.updateFromResult?void 0:e.updateFromResult(void 0))),e.highlighted.labelingTags.forEach((e=>null==e.updateFromResult?void 0:e.updateFromResult(void 0))),t()):t(),null==(r=n.object)||null==r.afterRegionSelected||r.afterRegionSelected(n)},_updateResultsFromSelection(){e._updateResultsFromRegions(e.selected.values())},_updateResultsFromRegions(t){const n={},r={};Array.from(t).map((e=>{e.results.forEach((e=>{const t=e.from_name.name,o=n[t];void 0!==o?n[t]=e.mergeMainValue(o):(r[t]=e.from_name,n[t]=e.mainValue)}))})),e.annotation.unselectStates();for(const[e,t]of Object.entries(n)){const n=r[e];null==n.updateFromResult||n.updateFromResult(t)}},unselect(t){e.beforeUnselect(t),e.selected.delete(t.id),e.afterUnselect(t)},clear(){const t=[...e.selected.values()];for(const n of t)e.beforeUnselect(n);e.selected.clear();for(const n of t)e.afterUnselect(n)},highlight(t){e.clear(),e.select(t)}}})),yP=h.gK.model("RegionStore",{sort:h.gK.optional(h.gK.enumeration(["date","score"]),null!=(cP=window.localStorage.getItem(gP))?cP:"date"),sortOrder:h.gK.optional(h.gK.enumeration(["asc","desc"]),null!=(dP=window.localStorage.getItem(mP))?dP:"asc"),group:h.gK.optional(h.gK.enumeration(["type","label","manual"]),(()=>{var e;return null!=(e=window.localStorage.getItem(pP))?e:"manual"})),filter:h.gK.maybeNull(h.gK.array(h.gK.safeReference(lP)),null),view:h.gK.optional(h.gK.enumeration(["regions","labels"]),null!=(uP=window.localStorage.getItem(fP))?uP:"regions"),selection:h.gK.optional(vP,{})}).views((e=>{let t;const n=n=>(r,o)=>{if(r.shiftKey){const r=((e,n)=>{const r=[];let o=0;return D.traverseTree({children:n},(n=>{if(n.isArea)return n.item!==t&&n.item!==e&&1!==o||(n.item&&r.push(n.item),n.item===t&&++o,n.item===e&&++o),o>=2?T:void 0})),r})(o,n);return r.forEach((t=>{e.selection.select(t)})),void(t=null)}t=o,r.metaKey||r.ctrlKey?e.toggleSelection(o):e.selection.highlighted!==o?e.highlight(o):e.clearSelection()};return{get annotation(){return(0,h.PA)(e)},get classifications(){const t=Array.from(e.annotation.names.values()).filter((e=>(0,w.isDefined)(e))).filter((e=>"textarea"===e.type&&!e.perregion)).map((e=>e.regions));return[].concat(...t)},get regions(){return Array.from(e.annotation.areas.values()).filter((e=>!e.classification))},get filteredRegions(){return e.filter||e.regions},get suggestions(){return Array.from(e.annotation.suggestions.values()).filter((e=>!e.classification))},get isAllHidden(){return!e.regions.find((e=>!e.hidden))},get sortedRegions(){return{date:t=>[...e.filteredRegions].sort(t?(e,t)=>t.ouid-e.ouid:(e,t)=>e.ouid-t.ouid),score:t=>[...e.filteredRegions].sort(t?(e,t)=>t.score-e.score:(e,t)=>e.score-t.score)}[e.sort]("desc"===e.sortOrder)},getRegionsTree:t=>null===e.group||"manual"===e.group?e.asTree(t):"label"===e.group?e.asLabelsTree(t):"type"===e.group?e.asTypeTree(t):void console.error(`Grouping by ${e.group} is not implemented`),asTree(t){const r=e.sortedRegions,o=[],i=new Map,a=n(o);return r.forEach(((e,n)=>{const r=t(e,n,a);Object.assign(r,{item:e,children:[],isArea:!0}),i.set(e.cleanId,r)})),i.forEach((e=>{var t;const n=e.item.parentID,r=n?null!=(t=i.get(n))?t:i.get(n.replace(/#(.+)/i,"")):null;if(r)return r.children.push(e);o.push(e)})),o},asLabelsTree(t){const r={},o=[],i=n(o);let a=0;const s=(e,n,o)=>{var s;const l=((e,n)=>{const o=r[n];return o||(r[n]=Object.assign({},t(e,a,!0),{id:n,isGroup:!0,isNotLabel:!0,children:[]}))})(n,e),c=l.id,d=null==(s=(e=>{var t;return(null==(t=e.labeling)?void 0:t.selectedLabels)||e.emptyLabel&&[e.emptyLabel]})(o))||null==(s=s[0])?void 0:s.hotkey;(0,O.VS)(O.TU)&&(l.hotkey=d,l.pos=c.slice(0,c.indexOf("#"))),l.children.push(Object.assign({},t(o,a,!1,null,i,c),{item:o,isArea:!0}))},l=(e,t)=>{if(e)for(const n of e)s(`${n.value}#${n.id}`,n,t);else s("no-label",void 0,t)};for(const t of e.regions){var c;l(null==(c=t.labeling)?void 0:c.selectedLabels,t),a++}const d=Object.values(r);return(0,O.VS)(O.TU)&&d.sort(((e,t)=>e.hotkey>t.hotkey?1:e.hotkey{const n=((e,n)=>{const o=r[n];if(o)return o;const i={type:"tool",value:n.replace("region",""),background:"#000"};return r[n]=Object.assign({},t(i,a,!0),{id:n,key:n,isArea:!1,children:[],isGroup:!0,entity:e})})(e,e.type);n.children.push(Object.assign({},t(e,a,!1,null,i),{item:e,isArea:!0}))};for(const t of e.regions)s(t),a++;return o.push(...Object.values(r)),o},get hasSelection(){return!!e.selection.size},isSelected:t=>e.selection.isSelected(t),get selectedIds(){return Array.from(e.selection.selected.values()).map((e=>e.id))},get persistantView(){var t;return null!=(t=window.localStorage.getItem(fP))?t:e.view}}})).actions((e=>({addRegion(t){e.regions.push(t),(0,h._$)(e).events.invoke("entityCreate",t)},toggleSortOrder(){"asc"===e.sortOrder?e.sortOrder="desc":e.sortOrder="asc"},setView(t){(0,O.VS)(O.TU)&&window.localStorage.setItem(fP,t),e.view=t},setSort(t){e.sort===t?e.toggleSortOrder():(e.sortOrder="asc",e.sort=t),window.localStorage.setItem(gP,e.sort),window.localStorage.setItem(mP,e.sortOrder),e.initHotkeys()},setGrouping(t){e.group=t,window.localStorage.setItem(pP,e.group)},setFilteredRegions(t){if(e.regions.length===t.length)e.filter=null,e.regions.forEach((e=>e.filtered&&e.toggleFiltered()));else{const n=t.map((e=>e.id));e.filter=t,e.regions.forEach((e=>{!e.hideable||e.hidden&&!e.filtered||(n.includes(e.id)?e.hidden&&e.toggleFiltered():e.hidden||e.toggleFiltered())}))}},deleteRegion(t){(0,h.Yo)(t);const n=e.filterByParentID(t.id);n&&n.forEach((e=>e.setParentID(t.parentID))),(0,h._$)(e).events.invoke("entityDelete",t),(0,h.zr)(t),e.initHotkeys()},findRegionID:t=>e.regions.find((e=>e.id===t)),findRegion:t=>e.regions.find((e=>e.id===t)),filterByParentID:t=>e.regions.filter((e=>e.parentID===t)),afterCreate(){var t;(0,h.k4)(e,(t=>{"add"!==t.op&&"delete"!==t.op||-1===t.path.indexOf("/regions/")||e.initHotkeys()})),e.view=null!=(t=window.localStorage.getItem(fP))?t:e.annotation.store.settings.displayLabelsByDefault?"labels":"regions"},initHotkeys(){hP.unbindAll(),e.sortedRegions.forEach(((t,n)=>{hP.addKey("alt+shift+"+(n+1),(()=>{e.unselectAll(),t.selectRegion()}))})),hP.addKey("alt+shift+$n",(()=>{}),"Select a region")},unselectAll(){e.annotation.unselectAll()},unhighlightAll(){e.regions.forEach((e=>e.setHighlight(!1)))},selectNext(){const{regions:t}=e,n=e.regions.findIndex((e=>e.selected));if(n<0){const n=t[0];n&&e.annotation.selectArea(n)}else{const r=(0,w.isDefined)(t[n+1])?t[n+1]:t[0];r&&e.annotation.selectArea(r)}},toggleVisibility(){const t=!e.isAllHidden;e.regions.forEach((e=>{e.hidden!==t&&e.toggleHidden()}))},setHiddenByTool(t,n){e.regions.forEach((e=>{e.hidden!==t&&e.type===n.type&&e.toggleHidden()}))},setHiddenByLabel(t,n){e.regions.forEach((e=>{if(e.hidden!==t){const t=e.labeling;if(t){t.selectedLabels.includes(n)&&e.toggleHidden()}}}))},highlight(t){e.selection.highlight(t)},clearSelection(){e.selection.clear()},selectRegionsByIds(t){e.regions.map((n=>{-1!==t.indexOf(n.id)&&e.toggleSelection(n,!0)}))},toggleSelection(t,n){(0,w.isDefined)(n)||(n=!e.selection.isSelected(t)),n?e.selection.select(t):e.selection.unselect(t)}})));var bP;const xP="relations:order",wP=h.gK.model("Relation",{id:h.gK.optional(h.gK.identifier,E),node1:h.gK.reference(qT),node2:h.gK.reference(qT),direction:h.gK.optional(h.gK.enumeration(["left","right","bi"]),"right"),labels:h.gK.maybeNull(h.gK.array(h.gK.string))}).volatile((()=>({showMeta:!1,visible:!0}))).views((e=>({get parent(){return(0,h.k2)(e,CP)},get control(){return e.parent.control},get selectedValues(){var t;return null==(t=e.labels)?void 0:t.filter((t=>{var n;return null==(n=e.control)?void 0:n.values.includes(t)}))},get hasRelations(){var t;return(null==(t=e.control)||null==(t=t.children)?void 0:t.length)>0},get shouldRender(){if(!(0,h._n)(e))return!1;const{node1:t,node2:n}=e,[r,o]=[t.item_index,n.item_index];return(!(0,w.isDefined)(r)||!t.object.multiImage||r===t.object.currentImage)&&(!(0,w.isDefined)(o)||!n.object.multiImage||o===n.object.currentImage)}}))).actions((e=>({rotateDirection(){const t=["left","right","bi"];let n=t.findIndex((t=>t===e.direction));n+=1,n>=t.length&&(n=0),e.direction=t[n]},toggleHighlight(){e.node1===e.node2?e.node1.toggleHighlight():(e.node1.toggleHighlight(),e.node2.toggleHighlight())},toggleMeta(){e.showMeta=!e.showMeta},setSelfHighlight(t=!1){t?e.parent.setHighlight(e):e.parent.removeHighlight()},toggleVisibility(){e.visible=!e.visible},setRelations(t){e.labels=t}}))),CP=h.gK.model("RelationStore",{relations:h.gK.array(wP),order:h.gK.optional(h.gK.enumeration(["asc","desc"]),null!=(bP=window.localStorage.getItem(xP))?bP:"asc")}).volatile((()=>({showConnections:!0,_highlighted:null,control:null}))).views((e=>({get highlighted(){return e.relations.find((t=>t.id===e._highlighted))},get size(){return e.relations.length},get orderedRelations(){return e.relations?"asc"===e.order?e.relations.slice():e.relations.slice().reverse():[]},get isAllHidden(){return!e.relations.find((e=>!e.visible))},get values(){var t,n;return null!=(t=null==(n=e.control)?void 0:n.values)?t:[]}}))).actions((e=>({afterAttach(){const t=(0,h.Zn)(e);let n=null;D.traverseTree(t.annotationStore.root,(e=>{if("relations"===e.type)return n=e,A})),e.setControl(n)},setControl(t){e.control=t},findRelations(t,n){const r=t.id||t,o=(null==n?void 0:n.id)||n;return o?e.relations.filter((e=>e.node1.id===r&&e.node2.id===o)):e.relations.filter((e=>e.node1.id===r||e.node2.id===r))},nodesRelated:(t,n)=>e.findRelations(t,n).length>0,addRelation(t,n){if(e.nodesRelated(t,n))return;const r=wP.create({node1:t,node2:n});return e.relations.push(r),r},deleteRelation(t){e.relations=e.relations.filter((e=>e.id!==t.id)),(0,h.zr)(t)},deleteNodeRelation(t){const n=e.findRelations(t);n.length&&n.forEach(e.deleteRelation)},deleteAllRelations(){e.relations.forEach((e=>(0,h.zr)(e))),e.relations=[]},serialize:()=>e.relations.map((e=>{const t={from_id:e.node1.cleanId,to_id:e.node2.cleanId,type:"relation",direction:e.direction};return e.selectedValues&&(t.labels=e.selectedValues),t})),deserializeRelation(t,n,r,o){const i=e.addRelation(t,n);i&&(i.direction=r,i.labels=o)},toggleConnections(){e.showConnections=!e.showConnections},toggleOrder(){e.order="asc"===e.order?"desc":"asc",window.localStorage.setItem(xP,e.order)},toggleAllVisibility(){const t=!e.isAllHidden;e.relations.forEach((e=>{e.visible!==t&&e.toggleVisibility()}))},setHighlight(t){e._highlighted=t.id},removeHighlight(){e._highlighted=null}}))),SP=CP,jP=["id","value","type"],kP=yr("Annotations","Annotations");const OP=h.gK.model("TrackedState",{areas:h.gK.map(qT),relationStore:h.gK.optional(SP,{})}),RP=h.gK.model("AnnotationBase",Object.assign({id:h.gK.identifier,pk:h.gK.maybeNull(h.gK.string),selected:h.gK.optional(h.gK.boolean,!1),type:h.gK.enumeration(["annotation","prediction","history"]),createdDate:h.gK.optional(h.gK.string,rn.UDate.currentISODate()),createdAgo:h.gK.maybeNull(h.gK.string),createdBy:h.gK.optional(h.gK.string,"Admin"),user:h.gK.optional(h.gK.maybeNull(h.gK.safeReference(nP)),null),parent_prediction:h.gK.maybeNull(h.gK.integer),parent_annotation:h.gK.maybeNull(h.gK.integer),last_annotation_history:h.gK.maybeNull(h.gK.integer),comment_count:h.gK.maybeNull(h.gK.integer),unresolved_comment_count:h.gK.maybeNull(h.gK.integer),loadedDate:h.gK.optional(h.gK.Date,(()=>new Date)),leadTime:h.gK.maybeNull(h.gK.number),draftSaved:h.gK.maybe(h.gK.string),userGenerate:h.gK.optional(h.gK.boolean,!0),sentUserGenerate:h.gK.optional(h.gK.boolean,!1),localUpdate:h.gK.optional(h.gK.boolean,!1),ground_truth:h.gK.optional(h.gK.boolean,!1),skipped:!1,trackedState:h.gK.optional(OP,{}),history:h.gK.optional(ET,{targetPath:"../trackedState"}),dragMode:h.gK.optional(h.gK.boolean,!1),editable:h.gK.optional(h.gK.boolean,!0),readonly:h.gK.optional(h.gK.boolean,!1),suggestions:h.gK.map(qT),regionStore:h.gK.optional(yP,{regions:[]}),isDrawing:h.gK.optional(h.gK.boolean,!1),commentStore:h.gK.optional(sP,{comments:[]})},(0,O.VS)(O.cE)?{root:Te.allModelsTypes()}:{})).views((e=>({get areas(){return e.trackedState.areas},get relationStore(){return e.trackedState.relationStore}}))).preProcessSnapshot((e=>{var t,n,r,o,i,a,s;let l,c=null!=(t=null!=(n=e.user)?n:e.completed_by)?t:void 0;const d=t=>{var n,r;const o=null==(n=t.children)?void 0:n.map(d);return o&&(t=Object.assign({},t,{children:o})),t.id&&(t=Object.assign({},t,{id:`${null!=(r=t.name)?r:t.id}@${e.id}`})),t};return(0,O.VS)(O.cE)&&(l=d(e.root.toJSON())),c&&"number"!=typeof c&&(c=c.id),Object.assign({},e,(0,O.VS)(O.cE)?{root:l}:{},{user:c,editable:null!=(r=e.editable)?r:"annotation"===e.type,ground_truth:null!=(o=null!=(i=e.honeypot)?i:e.ground_truth)&&o,skipped:e.skipped||e.was_cancelled,acceptedState:null!=(a=null!=(s=e.accepted_state)?s:e.acceptedState)?a:null})})).views((e=>(0,O.VS)(O.cE)?{}:{get root(){return e.list.root},get names(){return e.list.names},get toNames(){return e.list.toNames}})).views((e=>({get store(){return(0,h.Zn)(e)},get list(){return(0,h.PA)(e,2)},get objects(){return Array.from(e.names.values()).filter((e=>e.isObjectTag))},get regions(){return Array.from(e.areas.values())},get lastSelectedRegion(){return e.selectedRegions[e.selectedRegions.length-1]},get results(){const t=[];return(0,h._n)(e)&&e.areas.forEach((e=>e.results.forEach((e=>t.push(e))))),t},get serialized(){return e.areas.toJSON(),e.results.map((e=>e.serialize())).filter(Boolean).concat(e.relationStore.serialize())},get serializedSelection(){e.areas.toJSON();const t=[];return e.areas.forEach((e=>{e.inSelection&&e.results.forEach((e=>{t.push(e)}))})),t.map((e=>e.serialize())).filter(Boolean)},get highlightedNode(){return e.regionStore.selection.highlighted},get hasSelection(){return e.regionStore.hasSelection},get selectionSize(){return e.regionStore.selection.size},get selectedRegions(){return Array.from(e.regionStore.selection.selected.values())},get selectedDrawingRegions(){return Array.from(e.regionStore.selection.drawingSelected.values())},get exists(){const t=e.userGenerate&&e.sentUserGenerate||(0,w.isDefined)(e.versions.result),n=(0,w.isDefined)(e.pk);return t&&n},get hasSuggestionsSupport(){return e.objects.some((e=>e.supportSuggestions))},isReadOnly:()=>e.readonly||!e.editable}))).volatile((()=>({hidden:!1,draftId:0,draftSelected:!1,autosaveDelay:5e3,isDraftSaving:!1,isSuggestionsAccepting:!1,submissionStarted:0,versions:{},resultSnapshot:""}))).volatile((()=>(0,O.VS)(O.cE)?{names:new Map,toNames:new Map,ids:new Map}:{})).views((e=>({get canBeReviewed(){var t,n,r;const o=e.store;return(0,O.VS)(O.I8)&&(null==(t=e.user)?void 0:t.email)&&(null==(n=o.user)?void 0:n.email)!==(null==(r=e.user)?void 0:r.email)&&(0,h._$)(e).events.hasEvent("acceptAnnotation")&&o.hasInterface("annotations:view-all")&&!isNaN(e.pk)}}))).actions((e=>({reinitHistory(t=!0){e.history.reinit(t),e.autosave&&e.autosave.cancel(),"annotation"===e.type&&e.setInitialValues()},setEdit(t){e.editable=t},setReadonly(t){e.readonly=t},setIsDrawing(t){e.isDrawing=t},setUnresolvedCommentCount(t){e.unresolved_comment_count=t},setCommentCount(t){e.comment_count=t},setGroundTruth(t,n=!0){const r=(0,h.Zn)(e);if(r&&r!==e&&n){const t=r.annotationStore,n=t=>{e!==t&&t.setGroundTruth(!1,!1)};t.predictions.forEach(n),t.annotations.forEach(n)}e.ground_truth=t,n&&(0,h._$)(e).events.invoke("groundTruth",e.store,e,t)},sendUserGenerate(){e.sentUserGenerate=!0},setLocalUpdate(t){e.localUpdate=t},setDragMode(t){e.dragMode=t},updatePersonalKey(t){var n,r;e.pk=t,null==(n=(r=(0,h.Zn)(e)).addAnnotationToTaskHistory)||n.call(r,e.pk)},toggleVisibility(t){e.hidden=void 0===t?!e.hidden:!t},setHighlightedNode(){},selectArea(t){e.highlightedNode!==t&&e.regionStore.highlight(t)},toggleRegionSelection(t,n){e.regionStore.toggleSelection(t,n)},selectAreas(t){e.unselectAreas(),e.extendSelectionWith(t)},extendSelectionWith(t){for(const n of Array.isArray(t)?t:[t])e.regionStore.toggleSelection(n,!0)},unselectArea(t){e.highlightedNode===t&&e.regionStore.toggleSelection(t,!1)},unselectAreas(){e.selectionSize&&e.regionStore.clearSelection()},hideSelectedRegions(){e.selectedRegions.forEach((e=>{e.toggleHidden()}))},deleteSelectedRegions(){e.selectedRegions.forEach((e=>{e.deleteRegion()}))},unselectStates(){e.names.forEach((e=>e.unselectAll&&e.unselectAll()))},unselectAll(t=!1){const n=t&&e.store.settings.continuousLabeling;e.unselectAreas(),n||e.unselectStates()},removeArea(e){(0,h.zr)(e)},deleteAllRegions({deleteReadOnly:t=!1}={}){let n=Array.from(e.areas.values());if(t)return e.unselectAll(!0),e.setIsDrawing(!1),e.relationStore.deleteAllRelations(),n.forEach((e=>{null==e.destroyRegion||e.destroyRegion(),(0,h.zr)(e)})),void e.updateObjects();!1===t&&(n=n.filter((e=>!1===e.readonly))),n.forEach((e=>e.deleteRegion())),e.updateObjects()},addRegion(t){e.regionStore.unselectAll(!0),e.isLinkingMode&&(e.addLinkedRegion(t),e.stopLinkingMode())},unloadRegionState(t){t.states&&t.states.forEach((t=>{const n=e.names.get(t.name);n.unselectAll&&n.unselectAll(),n.perRegionCleanup&&n.perRegionCleanup()}))},validate(){var t;let n=!0;return e.traverseTree((e=>{if(n=null==e.validate?void 0:e.validate(),!1===n)return T})),null==(t=n)||t},traverseTree:t=>D.traverseTree(e.root,t),beforeSend(){e.traverseTree((e=>{e&&e.beforeSend&&e.beforeSend()})),e.stopLinkingMode(),e.unselectAll()},deleteRegion(t){if(t.isReadOnly())return;const{regions:n}=e.regionStore,r=n.filter((e=>e.parentID===t.id));r&&r.forEach((e=>e.setParentID(t.parentID))),t.classification||(0,h._$)(e).events.invoke("entityDelete",t),e.relationStore.deleteNodeRelation(t),"polygonregion"===t.type&&(0,h.Yo)(t),(0,h.zr)(t),e.setIsDrawing(!1)},deleteArea(e){(0,h.zr)(e)},undo(){const{history:t,regionStore:n}=e;if(t&&t.canUndo){var r,o;let s=!1;const l=n.selectedIds,c=n.findRegion(null!=(r=l[l.length-1])?r:null==(o=n.regions[n.regions.length-1])?void 0:o.id);if("polygonregion"===(null==c?void 0:c.type)){var i,a;s=(null!=(i=null==c||null==(a=c.points)?void 0:a.length)?i:0)<=1}t.undo(),n.selectRegionsByIds(l),s&&(c.setDrawing(!1),e.setIsDrawing(!1))}},redo(){const{history:t,regionStore:n}=e;if(t&&t.canRedo){const e=n.selectedIds;t.redo(),n.selectRegionsByIds(e)}},updateObjects(t=!0){if(t&&e.unselectAll(),e.names.forEach((e=>e.needsUpdate&&e.needsUpdate())),e.areas.forEach((e=>e.updateAppearenceFromState&&e.updateAppearenceFromState())),(0,O.VS)(O.vz)){const t=Array.from(e.areas.values()).filter((e=>e.isDrawing));e.regionStore.selection._updateResultsFromRegions(t)}},setInitialValues(){e.names.forEach((e=>{if(e.type.endsWith("labels")){var t;const n=null==(t=e.children)?void 0:t.find((e=>e.initiallySelected));n&&n.setSelected(!0)}}))},setDefaultValues(){e.names.forEach((t=>{var n;["choices","taxonomy"].includes(null==t?void 0:t.type)&&null!=(n=t.preselectedValues)&&n.length&&e.createResult({},{[null==t?void 0:t.type]:t.preselectedValues},t,t.toname)}))},addVersions(t){e.versions=Object.assign({},e.versions,t),t.draft&&e.setDraftSelected()},toggleDraft(t){const n=e.draftSelected,r=null!=t?t:!n;r!==n&&(r&&!e.versions.draft||(e.autosave.flush(),e.pauseAutosave(),e.deleteAllRegions({deleteReadOnly:!0}),r?e.deserializeResults(e.versions.draft):e.deserializeResults(e.versions.result),e.draftSelected=r,e.updateObjects(),e.startAutosave()))},startAutosave:(0,h.L3)((function*(){if((0,h._$)(e).events.hasEvent("submitDraft")&&!e.isReadOnly()){if(yield(0,w.delay)(0),e.autosave)return e.autosave.cancel(),void(e.autosave.paused=!1);e.autosave=In()((()=>{e.autosave.paused||e.saveDraft()}),e.autosaveDelay,{leading:!1}),(0,h.aQ)(e.areas,e.autosave)}})),async saveDraft(t){if(e.submissionStarted)return;if(!e.editable)return;const n=e.serializeAnnotation({fast:!0});return(0,O.VS)(O.yP)||e.pk||n.length?(e.setDraftSelected(),e.versions.draft=n,e.setDraftSaving(!0),e.store.submitDraft(e,t).then((t=>(e.onDraftSaved(t),t)))):void 0},submissionInProgress(){e.submissionStarted=Date.now()},saveDraftImmediately(){e.autosave&&e.autosave.flush()},async saveDraftImmediatelyWithResults(t){if(e.submissionStarted||e.isDraftSaving)return{};e.setDraftSaving(!0);return await e.saveDraft(t)},pauseAutosave(){e.autosave&&(e.autosave.paused=!0,e.autosave.cancel())},beforeDestroy(){e.autosave&&e.autosave.cancel&&e.autosave.cancel()},setDraftId(t){e.draftId=t},setDraftSelected(t=!0){e.draftSelected=t},onDraftSaved(){e.setDraftSaved(rn.UDate.currentISODate()),e.setDraftSaving(!1)},dropDraft(){e.autosave&&(e.autosave.cancel(),e.draftId=0,e.draftSelected=!1,e.draftSaved=void 0,e.versions.draft=void 0)},setDraftSaving(t=!1){e.isDraftSaving=t},setDraftSaved(t){e.draftSaved=t},afterAttach(){e.traverseTree((e=>{e.annotationAttached&&e.annotationAttached()})),e.history.onUpdate(e.updateObjects),e.startAutosave()},afterCreate(){if((0,O.VS)(O.cE)){const{names:t,toNames:n}=D.extractNames(e.root);t.forEach(((t,n)=>e.names.set(n,t))),n.forEach(((t,n)=>e.toNames.set(n,t))),D.traverseTree(e.root,(t=>{var n;const r=null!=(n=t.id)?n:t.name;r&&e.ids.set(D.cleanUpId(r),t),e.store.task&&t.updateValue&&t.updateValue(e.store)}))}e.userGenerate&&!e.sentUserGenerate&&(e.loadedDate=new Date)},setupHotKeys(){kP.unbindAll();let t=0,n=null;const r="shift+space";let o=r;e.traverseTree((e=>{e&&e.onHotKey&&e.hotkey&&kP.addKey(e.hotkey,e.onHotKey,void 0,e.hotkeyScope)})),e.traverseTree((e=>{!e||e.hotkey||"audio"!==e.type&&"audioplus"!==e.type||(t>0?o=`${r}+${t+1}`:n=e,e.hotkey=o,kP.addKey(o,e.onHotKey,"Play an audio",`${yr.DEFAULT_SCOPE},${yr.INPUT_SCOPE}`),t++)})),e.traverseTree((e=>{if(e&&e.onHotKey&&!e.hotkey){const t=kP.makeComb();if(!t)return;e.hotkey=t,kP.addKey(e.hotkey,e.onHotKey)}})),n&&t>1&&(n.hotkey=`${r}+1`,kP.addKey(n.hotkey,n.onHotKey),kP.removeKey(r)),yr.setScope(yr.DEFAULT_SCOPE)},createResult(t,n,r,o,i=!1){var a,s;o||"textarea"!==r.type||(o=e.objects[0]);const l=e.names.get(null!=(a=o.name)?a:o),c={from_name:e.names.get(r.name),to_name:l,type:r.resultType,value:n,readonly:e.readonly},d=Object.assign({id:E(),object:l},t,{value:t,results:[c]}),u=null==e||null==(s=e.areas)?void 0:s.put(d);if(null==l||null==l.afterResultCreated||l.afterResultCreated(u),u)return u.classification||(0,h._$)(e).events.invoke("entityCreate",u),i||e.afterCreateResult(u,r),u},afterCreateResult(t,n){e.store.settings.selectAfterCreate?t.classification||setTimeout((()=>(0,h._n)(t)&&e.selectArea(t))):n.isLabeling&&e.unselectAll(!0)},appendResults(t){if(!e.editable||e.readonly)return;const n={},r=e.regionStore.regions.length;return t.forEach((e=>{const t=e.id;n[t]||(n[t]=E()),e.id=n[t]})),e.deserializeResults(t),e.updateObjects(),e.regionStore.regions.slice(r)},serializeAnnotation(t){document.body.style.cursor="wait";const n=e.results.map((e=>e.serialize(t))).filter(Boolean).concat(e.relationStore.serialize(t));return document.body.style.cursor="default",n},fixBrokenAnnotation:t=>(null!=t?t:[]).reduce(((t,n)=>{var r;const o=null!=(r=structuredClone(n))?r:{};if("relation"===o.type)return t.push(n),t;"htmllabels"===o.type&&(o.type="hypertextlabels"),o.normalization&&(o.meta=Object.assign({},o.meta,{text:[o.normalization]}));const i=e.names;if(o.type.endsWith("labels")){const t=Object.keys(o.value);for(let n of t)if(n.endsWith("labels")){const t=i.has(o.from_name)||i.has("labels");if(!(0,O.VS)(O.TJ)&&t){var a;const e=null!=(a=i.get(o.from_name))?a:i.get("labels"),t=o.value[n];if(t&&t.length&&e.type.endsWith("labels")){const r=t.filter((t=>!!e.findLabel(t))),i=n;n=n===e.type?n:e.type,i!==n&&(o.type=n,o.value[n]=o.value[i],delete o.value[i]),r.length!==t.length&&(o.value[n]=r)}}if((!i.has(o.from_name)||!o.value[n].length&&!i.get(o.from_name).allowempty)&&(delete o.value[n],i.has(o.to_name))){const t=i.get(o.to_name),n=e.toNames.get(t.name);if(null!=n&&n.length){const e=o.type.replace(/labels$/,""),t=o.type,r="labels";for(const i of[e,t,r]){const e=n.find((e=>e.type===i));if(e){o.type=i,o.from_name=e.name;break}}}}}}return i.has(o.from_name)&&i.has(o.to_name)&&t.push(o),(e=>{if(!(0,w.isDefined)(o.original_width))return;if(!i.has(o.to_name))return;const t=i.get(o.to_name);if("image"!==t.type)return;const n=t.findImageEntity(null!=(e=o.item_index)?e:0);n&&!n.imageLoaded&&(n.setNaturalWidth(o.original_width),n.setNaturalHeight(o.original_height))})(),t}),[]),setSuggestions(t){const{history:n}=e;e.suggestions.clear(),t&&(e.deserializeResults(t,{suggestions:!0}),e.isSuggestionsAccepting=!0,(0,h.Zn)(e).autoAcceptSuggestions?((0,O.VS)(O.$b)&&e.history.setReplaceNextUndoState(!0),e.acceptAllSuggestions()):e.suggestions.forEach((t=>{t.supportSuggestions||(e.acceptSuggestion(t.id),(0,O.VS)(O.$b)&&n.setReplaceNextUndoState(!0))})),e.isSuggestionsAccepting=!1,(0,O.VS)(O.$b)||n.freeze("richtext:suggestions"),e.names.forEach((e=>null==e.needsUpdate?void 0:e.needsUpdate({suggestions:!0}))),(0,O.VS)(O.$b)||(n.setReplaceNextUndoState(!0),n.unfreeze("richtext:suggestions")))},cleanClassificationAreas(){const t={},n=[];e.areas.forEach((e=>{const r=e.results[0].from_name.name,o=e.item_index;var i;e.classification&&(null!=(i=t[r])&&i[o]&&n.push(t[r][o]),t[r]=t[r]||{},t[r][o]=e.id)})),n.forEach((t=>e.areas.delete(t)))},deserializeResults(t,{suggestions:n=!1,hidden:r=!1}={}){try{const o=e.prepareAnnotation(t),i=n?e.suggestions:e.areas;e._initialAnnotationObj=o,o.forEach((t=>{e.deserializeSingleResult(t,(e=>i.get(e)),(e=>i.put(e)))})),e.cleanClassificationAreas(),!r&&e.results.filter((e=>e.area.classification)).forEach((e=>null==e.from_name.updateFromResult?void 0:e.from_name.updateFromResult(e.mainValue))),o.forEach((t=>{"relation"===t.type&&e.relationStore.deserializeRelation(`${t.from_id}#${e.id}`,`${t.to_id}#${e.id}`,t.direction,t.labels)}))}catch(t){console.error(t),e.list.addErrors([Kj.generalError(t)])}},deserializeAnnotation:(...t)=>(console.warn("deserializeAnnotation() is deprecated. Use deserializeResults() instead"),e.deserializeResults(...t)),prepareAnnotation(t){var n;let r=t;return"object"!=typeof r&&(r=JSON.parse(r)),r=e.fixBrokenAnnotation(null!=(n=r)?n:[]),r},deserializeSingleResult(t,n,r){if("relation"!==t.type){var o;const{id:a,value:s,type:l}=t,c=(0,Yn.A)(t,jP);let{from_name:d,to_name:u}=c;const h=null!=(o=e.names.get(c.to_name))?o:{},g=h.type,m=`${a||E()}#${e.id}`,p=`${c.from_name}@${m}`,f=e.prepareValue(s,g);(0,O.VS)(O.cE)&&(u=`${u}@${e.id}`,d=`${d}@${e.id}`);let v=n(m);if(!v){v=r(Object.assign({id:m,object:u},c,function(e){const t=Object.assign({},e);return st.properties.value.propertyNames.forEach((e=>{delete t[e]})),t}(f),{value:f})),(0,O.VS)(O.gF)&&Object.defineProperty(v,"_rawResult",{value:Object.freeze(structuredClone(t))})}const y=Object.assign({},c,{id:p,type:l,value:f,from_name:d,to_name:u});if(v.addResult(y),null==v.applyAdditionalDataFromResult||v.applyAdditionalDataFromResult(y),!l.endsWith("labels")&&f.labels&&h.mergeLabelsAndResults){const t=f.labels,n=e.toNames.get(h.name).filter((e=>e.type.endsWith("labels"))).find((e=>null==e?void 0:e.findLabel(t[0])));var i;if(n)v.setValue(n),null==(i=v.results.find((e=>e.type.endsWith("labels"))))||i.setValue(t)}}},prepareValue(e,t){switch(t){case"text":case"hypertext":case"richtext":{const t=(0,w.isDefined)(e.start)&&(0,w.isDefined)(e.end),n=!(0,w.isDefined)(e.startOffset)&&!(0,w.isDefined)(e.endOffset);if(t&&n)return Object.assign({},e,{start:"",end:"",startOffset:Number(e.start),endOffset:Number(e.end),isText:!0});break}default:return e}return e},acceptAllSuggestions(){Array.from(e.suggestions.keys()).forEach((t=>{e.acceptSuggestion(t)})),e.deleteAllDynamicregions((0,O.VS)(O.$b))},rejectAllSuggestions(){Array.from(e.suggestions.keys()).forEach((t=>{e.suggestions.delete(t)})),e.deleteAllDynamicregions((0,O.VS)(O.$b))},deleteAllDynamicregions(t=!1){e.regions.forEach((e=>{e.dynamic&&(t&&e.setDrawing(!0),e.deleteRegion())}))},acceptSuggestion(t){const n=e.suggestions.get(t);let r=t;const o=n.classification;if((0,O.VS)(O.jS))if(o){const t=n.results[0],o=e.areas.values();for(const e of o){const n=e.results[0];if(n.from_name===t.from_name&&n.to_name===t.to_name&&n.item_index===t.item_index){r=e.id;break}}}else{const t=e.areas.get(n.cleanId);t&&(r=t.id)}e.areas.set(r,Object.assign({},n.toJSON(),{id:r,fromSuggestion:!0}));const i=e.areas.get(r);i.object.activeStates().forEach((e=>{i.setValue(e)})),e.suggestions.delete(t)},rejectSuggestion(t){e.suggestions.delete(t)},resetReady(){e.objects.forEach((e=>e.setReady&&e.setReady(!1))),e.areas.forEach((e=>e.setReady&&e.setReady(!1)))}}))),EP=h.gK.compose("Annotation",U,RP),_P=["reg","box","frame","workingArea","selected","draggable","listening","onDragMove"],AP=(0,y.PA)((e=>{var t;let{reg:n,box:r,frame:o,workingArea:i,selected:a,draggable:s,listening:l,onDragMove:c}=e,d=(0,Yn.A)(e,_P);const u=Fk(n,{includeFill:!0}),{realWidth:h,realHeight:g,scale:m}=i,f=(0,p.useMemo)((()=>({x:r.x*h/100,y:r.y*g/100,width:r.width*h/100,height:r.height*g/100,rotation:r.rotation})),[r,h,g]),v=e=>{const t=e.target;"dragmove"===e.type&&c(e),n.updateShape(((e,t)=>{const{realWidth:n,realHeight:r}=t;return{x:e.x()/n*100,y:e.y()/r*100,width:e.width()/n*100,height:e.height()/r*100,rotation:e.rotation()}})(t,i),o)};return(0,_.jsxs)(pj.YJ,{children:[(0,_.jsx)(Ek,{reg:n,box:f,scale:m,color:u.strokeColor,strokeWidth:u.strokeWidth,adjacent:!0}),(0,_.jsx)(pj.rw,Object.assign({},f,{fill:null!=(t=u.fillColor)?t:"#fff",stroke:u.strokeColor,strokeScaleEnabled:!1,selected:a,draggable:s,listening:l,opacity:n.hidden?0:1,onTransform:e=>{((e,t)=>{const n=e.scaleX(),r=e.scaleY();"rect"===t&&(e.width(Math.max(jj.X,e.width()*n)),e.height(Math.max(jj.Y,e.height()*r)));e.scaleX(1),e.scaleY(1)})(e.target,"rect")},onTransformEnd:v,onDragMove:v,onDragEnd:v},d))]})})),TP=(e,t,n,r,o)=>{const i=Math.sqrt(n*n+r*r);o+=Math.atan2(r,n);return{x:e+i*Math.cos(o),y:t+i*Math.sin(o)}},PP=(e,t=!0)=>(n,r)=>{if(!t)return r;const o=(e=>{const{x:t,y:n,width:r,height:o}=e,i=e.rotation,a=TP(t,n,0,0,i),s=TP(t,n,r,0,i),l=TP(t,n,r,o,i),c=TP(t,n,0,o,i),d=Math.min(a.x,s.x,l.x,c.x),u=Math.min(a.y,s.y,l.y,c.y);return{x:d,y:u,width:Math.max(a.x,s.x,l.x,c.x)-d,height:Math.max(a.y,s.y,l.y,c.y)-u}})(r),i=Object.assign({},r);return[o.x<=e.x,o.y<=e.y,o.x+o.width>=e.x+e.width,o.y+o.height>=e.y+e.height].some(Boolean)?n:i},IP=(e,t=!0)=>function(n){if(!t)return;const r=null!=this&&this.nodes?this.nodes():[n.target],o=(e=>{let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;return e.forEach((e=>{t=Math.min(t,e.x),n=Math.min(n,e.y),r=Math.max(r,e.x+e.width),o=Math.max(o,e.y+e.height)})),{x:t,y:n,width:r-t,height:o-n}})(r.map((e=>e.getClientRect())));r.forEach((t=>{const n=t.getAbsolutePosition(),r=o.x-e.x-n.x,i=o.y-e.y-n.y,a=Object.assign({},n);o.x-e.x<0&&(a.x=-r),o.y-e.y<0&&(a.y=-i),o.x-e.x+o.width>e.width&&(a.x=e.width-o.width-r),o.y-e.y+o.height>e.height&&(a.y=e.height-o.height-i),t.setAbsolutePosition(a)}))},LP=["reg","frame","stageRef"],MP=e=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(pj.rw,Object.assign({},e,{strokeWidth:2,stroke:"#fff"})),(0,_.jsx)(pj.rw,Object.assign({},e,{fill:pt()("#617ADA").alpha(.1).css(),strokeWidth:2,stroke:"#617ADA",dash:[2,2]}))]}),KP=(0,y.PA)((({regions:e,item:t,locked:n,isDrawing:r,workinAreaCoordinates:o,stageRef:i,onDragMove:a})=>(0,_.jsx)(_.Fragment,{children:e.map((e=>(0,_.jsx)(DP,{id:e.id,reg:e,frame:t.frame,workingArea:o,draggable:!e.isReadOnly()&&!r&&!n,selected:e.selected||e.inSelection,listening:!e.locked&&!e.hidden,stageRef:i,onDragMove:a},e.id)))}))),DP=(0,y.PA)((e=>{let{reg:t,frame:n,stageRef:r}=e,o=(0,Yn.A)(e,LP);const i=t.getShape(n);return t.isInLifespan(n)&&i&&(0,_.jsx)(AP,Object.assign({reg:t,box:i,frame:n,onClick:e=>{const n=(0,h.k2)(t,EP);n&&n.isLinkingMode&&(r.current.container().style.cursor=V.A.DEFAULT_CURSOR),t.setHighlight(!1),t.onClickRegion(e)}},o))})),NP=(0,y.PA)((({item:e,regions:t,width:n,height:r,zoom:o,workingArea:i,locked:a=!1,allowRegionsOutsideWorkingArea:s=!0,pan:l={x:0,y:0},stageRef:c})=>{var d,u;const[h,g]=(0,p.useState)(),[m,f]=(0,p.useState)(!1),v=t.filter((t=>(t.selected||t.inSelection)&&!t.hidden&&!t.isReadOnly()&&t.isInLifespan(e.frame))),y=!a;t.map((e=>(0,w.fixMobxObserve)(e.sequence)));const b=(0,p.useMemo)((()=>{const e=i.width*o,t=i.height*o,a=Math.abs(l.x)>=Math.abs((n-e)/2),s=Math.abs(l.y)>=Math.abs((r-t)/2),c=l.x>0?1:-1,d=l.y>0?1:-1,u=(Math.abs(l.x)-Math.abs((n-e)/2))*c,h=(Math.abs(l.y)-Math.abs((r-t)/2))*d,g=a?u:0,m=s?h:0;return{width:e,height:t,x:(n-e)/2+l.x-g,y:(r-t)/2+l.y-m,scale:o,realWidth:i.width,realHeight:i.height}}),[l.x,l.y,o,i,n,r]),x=(0,p.useMemo)((()=>({width:b.width,height:b.height,scaleX:o,scaleY:o,position:{x:b.x,y:b.y}})),[b,o]),C=(0,p.useCallback)(((e,t)=>{const{x:n,y:r}=b;return{x:(e-n)/o,y:(t-r)/o}}),[b,o]);(0,p.useEffect)((()=>{if(!m&&h){const{width:t,height:n}=i;let r=h.x/t*100,o=h.y/n*100,a=h.width/t*100,s=h.height/n*100;a<0&&(a*=-1,r-=a),s<0&&(s*=-1,o-=s);const l={x:r,y:o,width:a,height:s};e.addVideoRegion(l),g(null)}}),[m,b,i]);const S=({x:e,y:t})=>s?{x:e,y:t}:{x:(0,KC.clamp)(e,0,b.realWidth),y:(0,KC.clamp)(t,0,b.realHeight)},j=y?{onMouseDown:t=>{var n;if(t.target!==c.current||null!=(n=e.annotation)&&n.isReadOnly())return;const{x:r,y:o}=S(C(t.evt.offsetX,t.evt.offsetY)),i=((e,t)=>!!s||e>0&&t>0&&e{var n;if(!m||null!=(n=e.annotation)&&n.isReadOnly())return!1;const{x:r,y:o}=S(C(t.evt.offsetX,t.evt.offsetY));g((e=>Object.assign({},e,{width:r-e.x,height:o-e.y})))},onMouseUp:t=>{var n;if(!m||null!=(n=e.annotation)&&n.isReadOnly())return!1;const{x:r,y:o}=S(C(t.evt.offsetX,t.evt.offsetY));Math.abs(h.x-r)<5&&Math.abs(h.y-o)<5?g(null):g((e=>Object.assign({},e,{width:r-e.x,height:o-e.y}))),f(!1)}}:{};return(0,_.jsxs)(pj.BI,Object.assign({ref:c,width:n,height:r,style:{position:"absolute",zIndex:1},listening:y},j,{children:[(0,_.jsx)(pj.Wd,Object.assign({},x,{children:(0,_.jsx)(KP,{regions:t,item:e,layerProps:x,locked:a,isDrawing:m,workinAreaCoordinates:b,onDragMove:IP(b,!s),stageRef:c})})),null!=(d=e.annotation)&&d.isReadOnly()||!m?null:(0,_.jsx)(pj.Wd,Object.assign({},x,{children:(0,_.jsx)(MP,Object.assign({},h))})),(null==(u=e.annotation)||!u.isReadOnly())&&(null==v?void 0:v.length)>0?(0,_.jsx)(pj.Wd,{children:(0,_.jsx)(pj.Ge,{ref:e=>{if(!e)return;const t=e.getStage(),n=v.map((e=>t.findOne(`#${e.id}`))).filter(Boolean);e.nodes(n),e.getLayer().batchDraw()},keepRatio:!1,ignoreStroke:!0,flipEnabled:!1,boundBoxFunc:PP(b,!s),onDragMove:IP(b,!s)})}):null]}))})),VP=(0,O.VS)(O.vS);const zP=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{var n,r;if(!e._value)return null;const o=!t.settings.videoDrawOutside,i=(0,p.useRef)(),a=(0,p.useRef)(),s=(0,p.useRef)(),l=(0,p.useRef)(),[c,d]=(0,p.useState)(!1),[u,h]=(0,p.useState)(0),[g,m]=(0,p.useState)(!1),[f,v]=(0,p.useState)(1),[y,b]=(0,p.useState)(null),[x,C]=(0,p.useState)({width:0,height:0,ratio:1}),[{zoom:S,pan:j},{setZoomAndPan:k,setZoom:O,setPan:R}]=function(e,t,n){const[r,o]=(0,p.useState)({zoom:1,pan:{x:0,y:0}}),i=(0,p.useRef)({});i.current.video=e,i.current.canvas=t,i.current.shouldClampPan=n;const a=(0,p.useCallback)(((e,t)=>{if(!n)return e;const r=(0,w.clamp)((i.current.video.width*t-i.current.canvas.width)/2,0,Number.POSITIVE_INFINITY),o=(0,w.clamp)((i.current.video.height*t-i.current.canvas.height)/2,0,Number.POSITIVE_INFINITY);return{x:(0,w.clamp)(e.x,-r,r),y:(0,w.clamp)(e.y,-o,o)}}),[]);return[r,{setZoomAndPan:(0,p.useCallback)((e=>o((t=>{const n=e instanceof Function?e(t):e,{zoom:r,pan:o}=t,i=kT(n.zoom);if(i===r)return t;if(i===n.zoom)return{zoom:n.zoom,pan:a(n.pan,n.zoom)};const s=(i-r)/(n.zoom-r),l={x:o.x+(n.pan.x-o.x)*s,y:o.y+(n.pan.y-o.y)*s};return{pan:a(l,i),zoom:i}}))),[]),setZoom:(0,p.useCallback)((e=>o((({zoom:t,pan:n})=>{const r=kT(e instanceof Function?e(t):e);return{zoom:r,pan:{x:n.x/t*r,y:n.y/t*r}}}))),[]),setPan:(0,p.useCallback)((e=>o((t=>(e=e instanceof Function?e(t.pan):e,Object.assign({},t,{pan:e}))))),[])}]}(x,e.ref.current?{width:e.ref.current.width,height:e.ref.current.height}:{width:0,height:0},o),[E,A]=(0,p.useState)(!1),[T,P,I,L]=r_(!1),M=or({onEnterFullscreen(){P()},onExitFullscreen(){I()}}),K=(0,p.useCallback)((e=>{if(e!==f&&u){const t=(0,w.clamp)(e,1,u);v(t)}}),[f,u]),D=(0,p.useCallback)((e=>{e!==u&&h(e)}),[u]),N=(0,p.useMemo)((()=>(0,w.isDefined)(null==e?void 0:e.videoControl)),[e]),z=(0,p.useMemo)((()=>(0,w.isDefined)(null==e?void 0:e.timelineControl)),[e]);(0,p.useEffect)((()=>{const e=s.current,t=e=>{e.shiftKey&&e.preventDefault()};return e.addEventListener("wheel",t),()=>e.removeEventListener("wheel",t)}),[]),(0,p.useEffect)((()=>{const e=e=>{if(e.code.startsWith("Shift")&&(e.preventDefault(),!E)){A(!0);const e=t=>{t.code.startsWith("Shift")&&(A(!1),document.removeEventListener("keyup",e))};document.addEventListener("keyup",e)}};document.addEventListener("keydown",e);const t=new G((()=>(()=>{const e=s.current;e&&b([e.clientWidth,e.clientHeight])})())),[n,r]=[s.current,i.current];return t.observe(n),t.observe(r),()=>{document.removeEventListener("keydown",e),t.unobserve(n),t.unobserve(r),t.disconnect()}}),[]),(0,p.useEffect)((()=>{const e=M.getElement();T&&!e?M.enter(l.current):!T&&e&&M.exit()}),[T]);const B=(0,p.useCallback)((t=>{if(!t.shiftKey||!a.current)return;const n=0===Math.abs(t.deltaY)?t.deltaX:t.deltaY,r=n>0?1:-1,o=Math.abs(25e-5*n),i=r*(0,w.clamp)(o,.05,.5);requestAnimationFrame((()=>{k((({zoom:t,pan:n})=>{const r=t+i,o=r/t,s=a.current.pointerPos.x-e.ref.current.width/2,l=a.current.pointerPos.y-e.ref.current.height/2;return{zoom:r,pan:{x:n.x*o+s*(1-o),y:n.y*o+l*(1-o)}}}))}))}),[]),H=(0,p.useCallback)((t=>{if(!E)return;const n=t.pageX,r=t.pageY,o=t=>{const o=e.ref.current.adjustPan(j.x+(t.pageX-n),j.y+(t.pageY-r));requestAnimationFrame((()=>{R(o)}))},i=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",i)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",i)}),[E,j]),F=(0,p.useCallback)((()=>{O((e=>e+.1))}),[]),W=(0,p.useCallback)((()=>{O((e=>e-.1))}),[]),$=(0,p.useCallback)((()=>{k({zoom:e.ref.current.videoDimensions.ratio,pan:{x:0,y:0}})}),[]),U=(0,p.useCallback)((()=>{k({zoom:1,pan:{x:0,y:0}})}),[]),Z=(0,p.useCallback)(((t,n)=>{K(t),D(n),e.setOnlyFrame(t)}),[e,K,D]),Y=(0,p.useCallback)((({length:t,videoDimensions:n})=>{d(!0),O(n.ratio),C(n),D(t),e.setOnlyFrame(1),e.setLength(t),e.setReady(!0)}),[e,D]),X=(0,p.useCallback)((e=>{C(e)}),[]),q=(0,p.useCallback)((()=>{m(!1),K(u)}),[u,K,m]),J=(0,p.useCallback)((()=>{m((t=>VP?(e.ref.current.playing||(e.ref.current.play(),e.triggerSyncPlay()),!0):!1===t?(e.ref.current.play(),e.triggerSyncPlay(),!0):t))}),[]),Q=(0,p.useCallback)((()=>{m((t=>VP?(e.ref.current.playing&&(e.ref.current.pause(),e.triggerSyncPause()),!1):!0===t?(e.ref.current.pause(),e.triggerSyncPause(),!1):t))}),[]),ee=(0,p.useCallback)(((t,n,r)=>{const o=e.findRegion(n),i=(null==o?void 0:o.selected)||(null==o?void 0:o.inSelection);!o||(0,w.isDefined)(r)&&i===r||o.onClickRegion()}),[e]),te=(0,p.useCallback)(((t,n,r)=>{e.regs.filter((e=>e.selected||e.inSelection)).forEach((e=>{switch(n){case"lifespan_add":case"lifespan_remove":e.toggleLifespan(r.frame);break;case"keypoint_add":e.addKeypoint(r.frame);break;case"keypoint_remove":e.removeKeypoint(r.frame);break;default:console.warn("unknown action")}}))}),[e.regs]),ne=(0,p.useCallback)((t=>{f!==t&&(e.setFrame(t),K(t))}),[e,f]);(0,p.useEffect)((()=>()=>{e.ref.current=null}),[]);const re=e.regs.map((e=>{var t,n,r,o;const i=null!=(t=null!=(n=null==(r=e.style)?void 0:r.fillcolor)?n:null==(o=e.tag)?void 0:o.fillcolor)?t:V.l.fillcolor,a=e.labels.join(", ")||"Empty",s=e.type.includes("timeline"),l=e.sequence;return{id:e.cleanId,index:e.region_index,label:a,color:i,visible:!e.hidden,selected:e.selected||e.inSelection,sequence:l,timeline:s}}));if(e.timelineControl&&re.reverse(),null!=(n=e.timelineControl)&&null!=(n=n.selectedLabels)&&n.length&&!e.annotation.selectionSize&&!e.drawingRegion){const t=e.timelineControl.selectedLabels[0];re.unshift({id:"new",label:t.value,color:t.background,visible:!0,selected:!0,sequence:[],timeline:!0})}return(0,_.jsx)(_n,{item:e,children:(0,_.jsxs)(Ze.eB,{name:"video-segmentation",ref:l,mod:{fullscreen:T},children:[null==(r=e.errors)?void 0:r.map(((e,t)=>(0,_.jsx)(ke,{error:e},`err-${t}`))),(0,_.jsx)(Ze.eB,{name:"video",mod:{fullscreen:T},ref:i,children:(0,_.jsx)(Ze.Sl,{name:"main",ref:s,style:{height:Number(e.height)},onMouseDown:H,onWheel:B,children:y&&(0,_.jsxs)(_.Fragment,{children:[c&&N&&(0,_.jsx)(NP,{item:e,zoom:S,pan:j,locked:E,regions:e.regs,width:y[0],height:y[1],workingArea:x,allowRegionsOutsideWorkingArea:!o,stageRef:a}),(0,_.jsx)(RT,{ref:e.ref,src:e._value,width:y[0],height:y[1],muted:e.muted,zoom:S,pan:j,speed:e.speed,framerate:e.framerate,allowInteractions:!1,allowPanOffscreen:!o,onFrameChange:Z,onLoad:Y,onResize:X,onEnded:q,onPlay:J,onPause:Q,onSeeked:e.handleSeek})]})})}),c&&(0,_.jsx)(Ze.Sl,{name:"timeline",tag:iS,playing:g,length:u,position:f,regions:re,height:e.timelineheight,altHopSize:t.settings.videoHopSize,allowFullscreen:!1,fullscreen:T,defaultStepSize:16,disableView:!z&&!N,framerate:e.framerate,controls:{FramesControl:!0},customControls:[{position:"left",component:()=>(0,_.jsx)(Q_.Trigger,{inline:T,content:(0,_.jsxs)(wT,{size:"auto",closeDropdownOnItemClick:!1,children:[(0,_.jsx)(wT.Item,{onClick:F,children:"Zoom In"}),(0,_.jsx)(wT.Item,{onClick:W,children:"Zoom Out"}),(0,_.jsx)(wT.Item,{onClick:$,children:"Zoom To Fit"}),(0,_.jsx)(wT.Item,{onClick:U,children:"Zoom 100%"})]}),children:(0,_.jsx)(za,{size:"small",nopadding:!0,children:(0,_.jsx)(Sm,{})})},"dd")}],onPositionChange:ne,onPlay:J,onPause:Q,onFullscreenToggle:L,onSelectRegion:ee,onStartDrawing:e.startDrawing,onFinishDrawing:e.finishDrawing,onAction:te})]})})})));x.addTag("video",LT,zP),x.addObjectType(LT);var BP=n(76694);const HP={board:"board--RCWAA",column:"column--gZT9f",columnTitle:"columnTitle--D1Oix",expanded:"expanded--IxfAA",collapsed:"collapsed--wo2M4",item:"item--SAih8",itemLine:"itemLine--J7fhn",itemTitle:"itemTitle--cZnga",dropArea:"dropArea--OHu8G"},FP=e=>{var t;const{item:n,index:r,readonly:o}=e,i=(0,p.useMemo)((()=>n.html?(0,je.sanitizeHtml)(n.html):""),[n.html]),[a,s,l]=(0,p.useContext)(GP),c=null!=(t=s[n.id])&&t,d=a?()=>l(n.id,!c):void 0,u=[HP.item,"htx-ranker-item"];return a&&u.push(c?HP.collapsed:HP.expanded),(0,_.jsx)(BP.sx,{draggableId:n.id,index:r,isDragDisabled:o,children:e=>(0,_.jsxs)("div",Object.assign({},e.draggableProps,e.dragHandleProps,{style:Object.assign({},e.draggableProps.style),className:u.join(" "),ref:e.innerRef,"data-ranker-id":n.id,children:[n.title&&(0,_.jsx)("h3",{className:HP.itemTitle,onClick:d,children:n.title}),n.body&&(0,_.jsx)("p",{className:HP.itemLine,children:n.body}),n.html&&(0,_.jsx)("p",{className:HP.itemLine,dangerouslySetInnerHTML:{__html:i}}),(0,_.jsx)("p",{className:HP.itemLine,children:n.id})]}))})},WP=["children"],$P=e=>{let{children:t}=e,n=(0,Yn.A)(e,WP);const[r,o]=(0,p.useState)(!1);return(0,p.useEffect)((()=>{const e=requestAnimationFrame((()=>o(!0)));return()=>{cancelAnimationFrame(e)}}),[]),r?(0,_.jsx)(BP.gL,Object.assign({},n,{children:t})):null},UP=({items:e,title:t})=>{const[,n,r]=(0,p.useContext)(GP),o=e.every((e=>n[e.id]));return(0,_.jsxs)("h1",{className:[HP.columnTitle,o?HP.collapsed:HP.expanded].join(" "),children:[t,(0,_.jsx)("button",{type:"button",onClick:()=>r(e.map((e=>e.id)),!o),children:(0,_.jsx)("span",{})})]})},ZP=e=>{const{column:t,items:n,readonly:r}=e,[o]=(0,p.useContext)(GP),i=o?(0,_.jsx)(UP,{items:n,title:t.title}):(0,_.jsx)("h1",{className:HP.columnTitle,children:t.title});return(0,_.jsxs)("div",{className:[HP.column,"htx-ranker-column"].join(" "),children:[i,(0,_.jsx)($P,{droppableId:t.id,children:e=>(0,_.jsxs)("div",Object.assign({ref:e.innerRef},e.droppableProps,{className:HP.dropArea,children:[n.map(((e,t)=>(0,_.jsx)(FP,{item:e,index:t,readonly:r},e.id))),e.placeholder]}))})]})},GP=(0,p.createContext)([!0,{},(e,t)=>{}]),YP=({inputData:e,handleChange:t,readonly:n,collapsible:r=!0})=>{const[o,i]=(0,p.useState)(e),[a,s]=(0,p.useState)({}),l=(0,p.useCallback)(((e,t)=>{const n=(Array.isArray(e)?e:[e]).reduce(((e,n)=>Object.assign({},e,{[n]:t})),{});s((e=>Object.assign({},e,n)))}),[]);(0,p.useEffect)((()=>{i(e)}),[e]);return(0,_.jsx)(GP.Provider,{value:[r,a,l],children:(0,_.jsx)(BP.JY,{onDragEnd:e=>{var n;const{destination:r,source:a,draggableId:s}=e;if(!r||r.droppableId===a.droppableId&&r.index===a.index)return;const l=o.columns.find((e=>e.id===a.droppableId)),c=o.columns.find((e=>e.id===r.droppableId));if(l===c){const e=[...o.itemIds[a.droppableId]];e.splice(a.index,1),e.splice(r.index,0,s);const n=Object.assign({},o.itemIds,{[a.droppableId]:e}),l=Object.assign({},o,{itemIds:n});return i(l),void(t&&t(n))}const d=[...o.itemIds[a.droppableId]];d.splice(a.index,1);const u=[...null!=(n=o.itemIds[r.droppableId])?n:[]];u.splice(r.index,0,s);const h=Object.assign({},o.itemIds,{[a.droppableId]:d,[r.droppableId]:u}),g=Object.assign({},o,{itemIds:h});t&&t(h),i(g)},children:(0,_.jsx)("div",{className:HP.board,children:(0,_.jsx)(_.Fragment,{children:o.columns.map((e=>{var t,r;const i=null!=(t=null==(r=o.itemIds[e.id])?void 0:r.map((e=>o.items[e])))?t:[];return(0,_.jsx)(ZP,{column:e,items:i,readonly:n},e.id)}))})})})})},XP=h.gK.model({type:"list",value:h.gK.maybeNull(h.gK.string),_value:h.gK.frozen([]),title:h.gK.optional(h.gK.string,"")}).views((e=>({get ranker(){var t;return null==(t=e.annotation.toNames.get(e.name))?void 0:t.filter((e=>"ranker"===e.type))},get items(){return Object.fromEntries(e._value.map((e=>[e.id,e])))}}))).views((e=>({get dataSource(){return{items:e.items,columns:[{id:e.name,title:e.title}],itemIds:{[e.name]:Object.keys(e.items)}}},get result(){var t;return null==(t=e.annotation)?void 0:t.results.find((t=>t.from_name===e))}}))).actions((e=>({updateValue(t){const n=j(e.value,t.task.dataObj);Array.isArray(n)&&(e._value=n.map((e=>Object.assign({},e,{id:String(e.id)}))))}}))),qP=h.gK.compose("ListModel",bn,ze,Pe,XP),JP=(0,y.WQ)("store")((0,y.PA)((({item:e})=>{const t=e.dataSource;return t?e.ranker?null:(0,_.jsx)(p.StrictMode,{children:(0,_.jsx)(YP,{inputData:t,readonly:!0})}):null})));x.addTag("list",qP,JP),x.addObjectType(qP);const QP=e=>(e<10?"0":"")+e,eI=h.gK.model({toname:h.gK.maybeNull(h.gK.string),format:h.gK.maybeNull(h.gK.string),only:h.gK.maybeNull(h.gK.string),min:h.gK.maybeNull(h.gK.string),max:h.gK.maybeNull(h.gK.string),step:h.gK.maybeNull(h.gK.string),defaultvalue:h.gK.maybeNull(h.gK.string),hotkey:h.gK.maybeNull(h.gK.string)}),tI=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"datetime"}).views((e=>({selectedValues:()=>e.datetime,get holdsState(){return!(e.onlyTime&&!(0,w.isDefined)(e.time))&&((0,w.isDefined)(e.month)||(0,w.isDefined)(e.year))},get showDate(){return!e.only||e.only.includes("date")},get showTime(){return!e.only||e.only.includes("time")},get onlyTime(){return"time"===e.only},get showMonth(){var t,n;return(null==(t=e.only)?void 0:t.includes("month"))&&!(null!=(n=e.only)&&n.includes("date"))},get showYear(){var t;return null==(t=e.only)?void 0:t.includes("year")},getISODate(t){if(e.onlyYear)return t;if(e.onlyTime)return;const n=e.parseDateTime(t);return[n.getFullYear(),QP(n.getMonth()+1),QP(n.getDate())].join("-")},get date(){var t;return null!=(t=e.only)&&t.includes("year")?e.year:e.month&&e.year?[e.year,QP(e.month),QP(e.day)].join("-"):void 0},get datetime(){const t=e.time||"00:00";if(e.onlyTime)return t;if(!e.date)return e.year?e.year:void 0;const n=new Date(e.date+"T"+t);return e.formatDateTime(n)},get isValid(){return!(e.min&&e.datee.max)}}))).volatile((()=>({updateValue:!1,day:void 0,month:void 0,year:void 0,time:void 0}))).volatile((e=>{let t;return t=e.onlyTime?String:e.format?e.format:e.showTime?"%Y-%m-%dT%H:%M":"%Y-%m-%d",{formatTime:$A.DCK("%H:%M"),formatDateTime:$A.DCK(t),parseDateTime:$A.T6w(t)}})).volatile((e=>{var t,n;const r=[],o=[],i=$A.DCK("%B"),a=new Date,s=t=>{var n;return"current"===t?a.getFullYear():4===t.length?t:null==(n=e.parseDateTime(t))?void 0:n.getFullYear()},l=s(null!=(t=e.min)?t:"2000");for(let t=s(null!=(n=e.max)?n:"current");t>=l;t--)r.push(t);a.setDate(1);for(let e=0;e<12;e++)a.setMonth(e),o[e]=i(a);return{months:o,years:r}})).actions((e=>({setNeedsUpdate(t){e.updateValue=t},needsUpdate(){e.setNeedsUpdate(!0),e.result?e.setDateTime(e.result.mainValue):e.resetDateTime()},unselectAll(){},resetDate(){e.day=void 0,e.month=void 0,e.year=void 0},resetDateTime(){e.resetDate(),e.time=void 0},validDateFormat(e){const t=e.split("-").map((e=>Number.parseInt(e,10))),n=t[0];return!(isNaN(new Date(e))||!(n<=9999&&n>=1e3))&&t},setDateTime(t){if(e.onlyTime)return void(e.time=t);const n=e.parseDateTime(t);if(!n)return e.resetDateTime();e.day=n.getDate(),e.month=n.getMonth()+1,e.year=n.getFullYear(),e.showTime&&(e.time=e.formatTime(n))},onMonthChange(t){e.month=+t.target.value||void 0,e.updateResult()},onYearChange(t){e.year=+t.target.value||void 0,e.updateResult()},setDate(t){t?(e.day=t[2],e.month=t[1],e.year=t[0]):(e.day=void 0,e.month=void 0,e.year=void 0),e.updateResult()},onTimeChange(t){e.time=t.target.value||void 0,e.updateResult()},updateFromResult(){this.needsUpdate()},requiredModal(){fn.warning(e.requiredmessage||`DateTime "${e.name}" is required.`)}}))).actions((e=>{const t={validateValue:e.validateValue};return{validateValue(n){var r;if(!t.validateValue(n))return!1;const o=[];if(!n)return!0;let i=e.getISODate(n);null!=(r=e.only)&&r.includes("year")&&(i=i.slice(0,4));const{min:a,max:s}=e;return a&&is&&o.push(`max date is ${s}`),!o.length||(fn.warning(`Date "${i}" is not valid: ${o.join(", ")}.`),!1)}}})),nI=h.gK.compose("DateTimeModel",QR,BE,OE,$e,ct,...(0,O.VS)(O.gF)?[jE]:[],Pe,eI,tI),rI=(0,y.WQ)("store")((0,y.PA)((({item:e})=>{var t;const n=e.isReadOnly(),r=e.perRegionVisible()?{margin:"0 0 1em"}:{display:"none"},o={style:{width:"auto",marginRight:"4px",borderColor:e.isValid?void 0:"red"},className:"ant-input"},[i,a]=[e.min,e.max].map((e=>{var t;return null==e||null==(t=e.match(/\d?\d:\d\d/))?void 0:t[0]})),[s,l]=(0,p.useState)("");e.updateValue&&(!e.showDate||void 0!==e.date&&e.date===s||l(e.date||""),e.setNeedsUpdate(!1));return(0,_.jsxs)("div",{className:"htx-datetime",style:r,ref:e.elementRef,children:[e.showMonth&&(0,_.jsxs)("select",Object.assign({},o,{name:`${e.name}-date`,disabled:n,value:e.month,onChange:n?void 0:e.onMonthChange,children:[(0,_.jsx)("option",{value:"",children:"Month..."}),e.months.map(((e,t)=>(0,_.jsx)("option",{value:t+1,children:e},e)))]})),e.showYear&&(0,_.jsxs)("select",Object.assign({},o,{name:`${e.name}-year`,disabled:n,value:e.year||"",onChange:n?void 0:e.onYearChange,children:[(0,_.jsx)("option",{value:"",children:"Year..."}),e.years.map((e=>(0,_.jsx)("option",{value:e,children:e},e)))]})),e.showDate&&(0,_.jsx)("input",Object.assign({},o,{type:"date",readOnly:n,name:`${e.name}-date`,value:s,min:e.min,max:e.max,onChange:n?void 0:t=>{const n=t.target.value,r=e.validDateFormat(n);l(n),n&&!r||e.setDate(r)},onBlur:n?void 0:()=>{s!==e.date&&l(e.date||"")}})),e.showTime&&(0,_.jsx)("input",Object.assign({},o,{type:"time",readOnly:n,name:`${e.name}-time`,value:null!=(t=e.time)?t:"",min:i,max:a,onChange:n?void 0:e.onTimeChange}))]})})));x.addTag("datetime",nI,rI);const oI=h.gK.model({toname:h.gK.maybeNull(h.gK.string),min:h.gK.maybeNull(h.gK.string),max:h.gK.maybeNull(h.gK.string),step:h.gK.maybeNull(h.gK.string),defaultvalue:h.gK.maybeNull(h.gK.string),slider:h.gK.optional(h.gK.boolean,!1),hotkey:h.gK.maybeNull(h.gK.string)}),iI=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"number",number:h.gK.maybeNull(h.gK.number)}).views((e=>({selectedValues:()=>e.number,get holdsState(){return(0,w.isDefined)(e.number)}}))).actions((e=>{const t={validateValue:e.validateValue};return{validateValue(n){if(!t.validateValue(n))return!1;if(!(0,w.isDefined)(n))return!0;const r=[];if((0,w.isDefined)(e.min)&&ne.max&&r.push(`Value must be less than or equal to ${e.max}`),(0,w.isDefined)(e.step)){const t=Number.parseFloat(e.step),o=(n-((0,w.isDefined)(e.min)?+e.min:0))%t;0!==o&&r.push(`The two nearest valid values are ${n-o} and ${n-o+t}`)}return!r.length||(fn.warning(`Number "${n}" is not valid: ${r.join(", ")}.`),!1)},getSelectedString:()=>`${e.number} star`,needsUpdate(){e.result?e.number=e.result.mainValue:e.number=null},beforeSend(){if((0,w.isDefined)(e.defaultvalue))if(e.perregion&&e.required){const n=e.toNameTag;for(const r of null!=(t=null==n?void 0:n.allRegs)?t:[]){var t;r.results.some((t=>t.from_name===e))||r.results.push({area:r,from_name:e,to_name:n,type:e.resultType,value:{[e.valueType]:+e.defaultvalue}})}}else(0,w.isDefined)(e.number)||e.setNumber(+e.defaultvalue)},unselectAll(){},setNumber(t){e.number=t,e.updateResult()},onChange(t){const n=+t.target.value;isNaN(n)||(e.setNumber(n),t.target.value=(0,w.isDefined)(e.number)?e.number:"")},updateFromResult(){this.needsUpdate()},requiredModal(){fn.warning(e.requiredmessage||`Number "${e.name}" is required.`)},increaseValue(){e.number>=Number(e.max)?e.setNumber(0):e.number>0?e.setNumber(e.number+1):e.setNumber(1)},onHotKey:()=>e.increaseValue()}})),aI=h.gK.compose("NumberModel",QR,BE,OE,$e,ct,...(0,O.VS)(O.gF)?[jE]:[],Pe,oI,iI),sI=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{var n,r,o,i,a;const s=e.perRegionVisible()?{display:"flex",alignItems:"center"}:{display:"none"},l=e.slider?{padding:"9px 0px",border:0}:{},c=e.isReadOnly(),d=(0,Ze.cn)("number").toClassName();return(0,_.jsxs)("div",{className:d,style:s,ref:e.elementRef,children:[(0,_.jsx)("input",{disabled:c,style:l,type:e.slider?"range":"number",name:e.name,value:null!=(n=null!=(r=e.number)?r:e.defaultvalue)?n:"",step:null!=(o=e.step)?o:1,min:(0,w.isDefined)(e.min)?Number(e.min):void 0,max:(0,w.isDefined)(e.max)?Number(e.max):void 0,onChange:c?void 0:e.onChange}),e.slider&&(0,_.jsx)("output",{style:{marginLeft:"5px"},children:null!=(i=null!=(a=e.number)?a:e.defaultvalue)?i:""}),t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)("sup",{style:{fontSize:"9px"},children:["[",e.hotkey,"]"]})]})})));x.addTag("number",aI,sI);const lI=h.gK.model({toname:h.gK.maybeNull(h.gK.string),selectionstyle:h.gK.maybeNull(h.gK.string),leftclass:h.gK.maybeNull(h.gK.string),rightclass:h.gK.maybeNull(h.gK.string)}),cI=h.gK.model({type:"pairwise",selected:h.gK.maybeNull(h.gK.enumeration(["left","right","none"]))}).views((e=>({get names(){return e.toname.split(",")},get left(){return e.annotation.names.get(e.names[0])},get right(){return e.annotation.names.get(e.names[1])},get valueType(){return"selected"}}))).actions((e=>({updateResult(){const{result:t,selected:n}=e;"none"===n?t&&t.area.removeResult(t):t?t.setValue(n):e.annotation.createResult({},{selected:n},e,e.name)},setResult(t="none"){e.selected=t,e.left.addProp("style","left"===t?e._selection:{}),e.right.addProp("style","right"===t?e._selection:{})},selectLeft(){e.setResult("left"===e.selected?"none":"left"),e.updateResult()},selectRight(){e.setResult("right"===e.selected?"none":"right"),e.updateResult()},afterCreate(){2===e.names.length&&e.names[0]!==e.names[1]||fn.error("Incorrect toName parameter on Pairwise, must be two names separated by a comma: name1,name2");let t={};if(e.selectionstyle){const n=D.cssConverter(e.selectionstyle);for(const e in n)t[e]=n[e]}else t={backgroundColor:"#f6ffed",border:"1px solid #b7eb8f"};e._selection=t},needsUpdate(){e.result?e.setResult(e.result.value.selected):e.setResult()},annotationAttached(){setTimeout((()=>{var t;e.left.addProp("onClick",e.selectLeft),e.right.addProp("onClick",e.selectRight),e.setResult(null==(t=e.result)?void 0:t.value.selected)}))}}))),dI=h.gK.compose("PairwiseModel",QR,lI,cI,Pe);x.addTag("pairwise",dI,(()=>null)),x.addObjectType(dI);const uI="_",hI=h.gK.model({type:"ranker",toname:h.gK.maybeNull(h.gK.string),collapsible:h.gK.optional(h.gK.boolean,!0),children:Te.unionArray(["bucket"])}).views((e=>({get list(){const t=e.annotation.names.get(e.toname);return"list"===t.type?t:null},get buckets(){return D.filterChildrenOfType(e,"BucketModel")},get defaultBucket(){var t;return e.buckets.length>0?null==(t=e.buckets.find((e=>e.default)))?void 0:t.name:e.name},get rankOnly(){return!e.buckets.length},get columns(){if(!e.list)return[];if(e.rankOnly)return[{id:e.name,title:e.list.title}];const t=e.buckets.map((e=>{var t;return{id:e.name,title:null!=(t=e.title)?t:""}}));return e.defaultBucket||t.unshift({id:uI,title:e.list.title}),t}}))).views((e=>({get dataSource(){var t,n,r;const o=null==(t=e.list)?void 0:t._value,i=null==(n=e.list)?void 0:n.items,a=Object.keys(i),s=e.columns,l=Object.fromEntries(e.columns.map((e=>[e.id,[]]))),c=null==(r=e.result)?void 0:r.value.ranker;let d={};if(!o)return[];var u;if(c){if(d=Object.assign({},l,c),!e.defaultBucket){const t=e.columns.map((e=>e.id)),n=Object.entries(c).filter((([e])=>t.includes(e))).flatMap((([e,t])=>t)),r=a.filter((e=>!n.includes(e)));var h;if(r.length)d[uI]=[...null!=(h=d[uI])?h:[],...r]}}else d=Object.assign({},l,{[null!=(u=e.defaultBucket)?u:uI]:a});return{items:i,columns:s,itemIds:d}},get result(){var t;return null==(t=e.annotation)?void 0:t.results.find((t=>t.from_name===e))}}))).actions((e=>({createResult(t){e.annotation.createResult({},{ranker:t},e,e.list)},updateResult(t){e.result?e.result.setValue(t):e.createResult(t)},beforeSend(){var t,n;if(!e.list)return;if(e.result)return;const r=Object.keys(null==(t=e.list)?void 0:t.items),o=Object.fromEntries(e.columns.map((e=>[e.id,[]])));o[null!=(n=e.defaultBucket)?n:uI]=r,e.createResult(o)}}))),gI=h.gK.compose("RankerModel",QR,Pe,hI,$e),mI=(0,y.WQ)("store")((0,y.PA)((({item:e})=>{const t=e.dataSource;return t?(0,_.jsx)(YP,{inputData:t,handleChange:e.updateResult,readonly:e.isReadOnly(),collapsible:e.collapsible}):null}))),pI=h.gK.model("BucketModel",{id:h.gK.optional(h.gK.identifier,E),type:"bucket",name:h.gK.string,title:h.gK.maybeNull(h.gK.string),default:h.gK.optional(h.gK.boolean,!1)}),fI=(0,y.WQ)("store")((0,y.PA)((({item:e})=>(0,_.jsx)("h1",{children:e.name}))));x.addTag("ranker",gI,mI),x.addTag("bucket",pI,fI),x.addObjectType(gI);var vI=n(97141);const yI=h.gK.model({value:h.gK.maybeNull(h.gK.string),alias:h.gK.maybeNull(h.gK.string),background:h.gK.optional(Re.color,"#333333"),hotkey:h.gK.maybeNull(h.gK.string)}),bI=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"shortcut",_value:h.gK.optional(h.gK.string,"")}).volatile((()=>({hotkeyScope:yr.INPUT_SCOPE}))).actions((e=>({onClick(){const t=(0,h.PA)(e,2);t.onShortcut&&(t.onShortcut(e.value),null==t.returnFocus||t.returnFocus())},onHotKey(t){const n=(0,h.PA)(e,2),r=(t.target||t.srcElement).name;if(n.name===r||r.startsWith(`${n.name}:`))return t.preventDefault(),e.onClick()}}))),xI=h.gK.compose("ShortcutModel",yI,bI,ze),wI=(0,y.WQ)("store")((0,y.PA)((({item:e,store:t})=>{const n={background:pt()(e.background).alpha(.15),color:"#333333",cursor:"pointer",margin:"5px"};return(0,_.jsxs)(vI.A,{"data-shortcut":!0,onClick:t=>(t.preventDefault(),t.stopPropagation(),e.onClick(),!1),style:n,children:[e.alias?e.alias:e._value,t.settings.enableTooltips&&t.settings.enableHotkeys&&e.hotkey&&(0,_.jsxs)(ar,{children:["[",e.hotkey,"]"]})]})})));x.addTag("shortcut",xI,wI);var CI=n(44318);const SI=p.forwardRef((({treeData:e,onChange:t},n)=>{(0,p.useImperativeHandle)(n,(()=>({resetValue(){i(""),t(e,[])},focus(){var e;return null==(e=r.current)?void 0:e.focus()}})));const r=(0,p.useRef)(),[o,i]=(0,p.useState)("");(0,p.useEffect)((()=>{const n=l(e,o);t(n.filteredDataTree,null)}),[e]);const a=(0,p.useCallback)((e=>"string"==typeof e?e:"object"==typeof e.props.children?a(e.props.children):e.props.children),[]),s=(0,p.useCallback)(((e,t)=>{const n=String(e).toLowerCase(),r=a(t.title);return!!n&&String(r).toLowerCase().includes(n)}),[]),l=(0,p.useCallback)(((e,t)=>{const n=[];if(!t)return{filteredDataTree:e,expandedKeys:n};const r=(e,o=!1)=>e.reduce(((e,i)=>{const a=i.children,l=o||s(t,i),c=null!=a&&a.length?r(a,l):void 0;var d;(l||null!=c&&c.length)&&(!o&&null!=(d=i.children)&&d.length&&n.push(i.key),e.push(Object.assign({},i,{isLeaf:!(null!=c&&c.length),children:c})));return e}),[]);return{filteredDataTree:r(e),expandedKeys:n}}),[]),c=(0,p.useCallback)((0,KC.debounce)((async n=>{const r=l(e,n.target.value);t(r.filteredDataTree,r.expandedKeys)}),300),[e]);return(0,_.jsx)(Ze.eB,{ref:r,value:o,tag:"input",onChange:e=>{i(e.target.value),c(e)},onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||e.stopPropagation()},placeholder:"Search","data-testid":"taxonomy-search",name:"taxonomy-search-input"})})),jI=({items:e,selected:t,onChange:n,onLoadData:r,defaultSearch:o=!0,options:i})=>{var a;const s=(0,p.useRef)(null),[l,c]=(0,p.useState)([]),[d,u]=(0,p.useState)([]),[h,g]=(0,p.useState)([]),m=i.pathSeparator,f={minWidth:null!=(a=i.minWidth)?a:200,maxWidth:i.maxWidth},v=void 0===i.dropdownWidth||+i.dropdownWidth,y=!!i.maxUsages&&t.length>=i.maxUsages,b=t.map((e=>e.map((e=>e.value)).join(m))),x=t.map((e=>({value:e.map((e=>e.value)).join(m),label:i.showFullPath?e.map((e=>e.label)).join(m):e.at(-1).label})));(0,p.useEffect)((()=>{c(((e,t,n)=>{const r=e=>{const t=e=>(0,_.jsx)("span",{className:"htx-taxonomy-item-color",style:{background:e.color},children:e.label});return e.hint?(0,_.jsx)(ir,{title:e.hint,mouseEnterDelay:500,children:e.color?t(e):(0,_.jsx)("span",{children:e.label})}):e.color?t(e):e.label},o=e=>{var i;const a=e.path.join(t.pathSeparator),s=t.leafsOnly&&(!1===e.isLeaf||!!e.children),l=t.maxUsagesReached&&!n.includes(a);return{title:r(e),value:a,key:a,isLeaf:!1!==e.isLeaf&&!e.children,disableCheckbox:s||l,children:null==(i=e.children)?void 0:i.map(o)}};return e.map(o)})(e,Object.assign({},i,{maxUsagesReached:y}),b))}),[e,y]);const w=(0,p.useCallback)((async e=>null==r?void 0:r(e.value.split(m))),[]),C=(0,p.useCallback)(((e,t)=>{u(e),null!=t&&t.length?g(t):g(void 0)}),[]),S=(0,p.useCallback)((e=>(0,_.jsxs)(_.Fragment,{children:[!o&&(0,_.jsx)(SI,{ref:s,treeData:l,onChange:C}),e]})),[l]),j=(0,p.useCallback)((e=>{var t;e?setTimeout((()=>{var e;null==(e=s.current)||e.focus()}),200):null==(t=s.current)||t.resetValue()}),[s]);return(0,_.jsx)(CI.A,{treeData:o?l:d,value:x,labelInValue:!0,onChange:e=>n(null,e.map((e=>e.value.split(m)))),loadData:w,treeCheckable:!0,showSearch:o,showArrow:!o,dropdownRender:S,onDropdownVisibleChange:j,treeExpandedKeys:o?void 0:h,onTreeExpand:e=>{g(e)},treeCheckStrictly:!0,showCheckedStrategy:CI.A.SHOW_ALL,treeExpandAction:!1,dropdownMatchSelectWidth:v,placeholder:i.placeholder||"Click to add...",style:f,className:"htx-taxonomy"})},kI=h.gK.model("SharedStoreModel",{id:h.gK.identifier,locked:!1,children:Te.unionArray(["choice"])}).actions((e=>({setChildren(t){e.children=t},clear(){e.children=[]},lock(){e.locked=!0},unlock(){e.locked=!1},destroy(){e.clear(),(0,h.Yo)(e)}}))),OI=new Map,RI=new Set,EI=h.gK.optional(h.gK.maybeNull(h.gK.string),null),_I=h.gK.optional(h.gK.maybeNull(h.gK.late((()=>h.gK.reference(kI)))),null),AI=h.gK.model("SharedStoreMixin",{sharedstore:EI,store:_I}).views((e=>({get children(){return e.sharedChildren},get locked(){var t,n;return null!=(t=null==(n=e.store)?void 0:n.locked)&&t},set children(t){var n;null==(n=e.store)||n.lock(),e.store.setChildren(t)},get sharedChildren(){var t;return null!=(t=e.store.children)?t:[]},get storeId(){var t;return null!=(t=e.sharedstore)?t:e.name}}))).actions((e=>({afterCreate(){if(!e.store){const t=OI.get(e.storeId);Te.getParentOfTypeString(e,"AnnotationStore").addSharedStore(t),RI.add(e.storeId),e.store=e.storeId}}}))).preProcessSnapshot((e=>{var t;const n=null!=(t=e.sharedstore)?t:e.name;var r,o;RI.has(n)?e.store=n:OI.set(n,kI.create({id:n,children:null!=(r=null!=(o=e._children)?o:e.children)?r:[]}));return e})),TI=()=>{OI.clear(),RI.clear()},PI={taxonomy:"lsf-taxonomy",taxonomy__loading:"lsf-taxonomy__loading",taxonomy__new:"lsf-taxonomy__new"},II=["alias","children","isLeaf","value"],LI=h.gK.model({toname:h.gK.maybeNull(h.gK.string),labeling:h.gK.optional(h.gK.boolean,!1),leafsonly:h.gK.optional(h.gK.boolean,!1),showfullpath:h.gK.optional(h.gK.boolean,!1),legacy:h.gK.optional(h.gK.boolean,!1),pathseparator:h.gK.optional(h.gK.string," / "),apiurl:h.gK.maybeNull(h.gK.string),placeholder:"",minwidth:h.gK.maybeNull(h.gK.string),maxwidth:h.gK.maybeNull(h.gK.string),dropdownwidth:h.gK.maybeNull(h.gK.string),maxusages:h.gK.maybeNull(h.gK.string),value:h.gK.optional(h.gK.string,"")});const MI=new Map,KI=h.gK.model({}).views((e=>({get result(){if(!e.isLabeling&&!e.perregion)return e.peritem?e._perItemResult:e.annotation.results.find((t=>t.from_name===e));const t=e.annotation.highlightedNode;return t?e.annotation.results.find((n=>n.from_name===e&&n.area===t)):null},get canRemoveItems(){return!e.isLabeling||!e.result}}))).actions((e=>{const t={updateResult:e.updateResult};return{updateResult(){if(!e.isLabeling)return t.updateResult();e.result&&e.result.area.setValue(e)},findLabel(t){let n,r="",o=e.items;for(const a of t){var i;if(n=null==(i=o)?void 0:i.find((e=>e.path.at(-1)===a)),!n)return null;o=n.children,r=e.showfullpath&&r?r+e.pathseparator+n.label:n.label}const a={value:r,id:t.join(e.pathseparator)};return n.color&&(a.background=n.color,a.parent={}),a}}})),DI=h.gK.model({pid:h.gK.optional(h.gK.string,E),type:"taxonomy",[(0,O.VS)(O.Ls)?"_children":"children"]:Te.unionArray(["choice"])}).volatile((()=>({maxUsagesReached:!1,selected:[],loading:!0,_api:"",_items:[]}))).views((e=>(0,O.VS)(O.Ls)?{get children(){return e._children},set children(t){e._children=t},get isLabeling(){return(0,O.VS)(O.um)&&e.labeling}}:{})).views((e=>({get userLabels(){return e.annotation.store.userLabels},get holdsState(){return e.selected.length>0},get isSelected(){return e.holdsState},get hasValue(){return e.holdsState},get valueType(){return"taxonomy"},get tiedChildren(){return D.filterChildrenOfType(e,"ChoiceModel")},get preselectedValues(){return e.tiedChildren.filter((e=>!0===e.selected&&!e.isSkipped)).map((e=>e.resultValue))},get isLoadedByApi(){return(0,O.VS)(O.yD)&&!!e.apiurl},get items(){var t,n;if(e.isLoadedByApi)return e._items;const r=function(e){const t=(e,t=[])=>{const r=new Set,o=[];for(const i of e)r.has(i.value)||(r.add(i.value),o.push(n(i,t)));return o},n=(e,n=[])=>{var r;const o=e.value,i=e.hint,a=[...n,null!=(r=e.alias)?r:o],s={label:o,path:a,depth:n.length,hint:i};return e.color&&(s.color=e.color),e.children&&(s.children=t(e.children,a)),s};return e?Array.isArray(e)?t(e):t([e]):[]}(e.children),o=null!=(t=null==(n=e.userLabels)?void 0:n.controls[e.name])?t:[];for(const e of o){let t={children:r};const{origin:n,path:o}=e,a=o.length-1;for(let e=0;et.label===o[e])),!t)break}t&&(t.children||(t.children=[]),t.children.push({label:o[a],path:o,depth:a,origin:n}))}return r},get selectedItems(){return e.selected.map((t=>{let n=e.items;const r=[];for(const e of t){var o,i;const t=n.find((t=>t.path.at(-1)===e));r.push({label:null!=(o=null==t?void 0:t.label)?o:e,value:e}),n=null!=(i=null==t?void 0:t.children)?i:[]}return r}))},get defaultChildType(){return"choice"},selectedValues:()=>e.selected,findItemByValueOrAlias(t){const n=e=>{for(const r of e){const e=r.label,o=r.path[r.path.length-1];if(r.value=e,o!==e&&(r.alias=o),r.value===t||r.alias===t)return r;if(r.children){const e=n(r.children,t);if(e)return e}}};return n(e.items)}}))).actions((e=>({afterAttach(){var t;if(e.isLoadedByApi)return;const n=null!=(t=MI.get(e.name))?t:[];(0,O.VS)(O.Ls)&&e.store&&n.length!==e.children.length?(0,O.VS)(O.xD)?e.updateChildren():setTimeout((()=>e.updateChildren())):e.loading=!1},loadItems:(0,h.L3)((function*(t){if(!e._api)return;let n,r={};if(t){n={children:e.items};for(const e of t){var o;if(n=null==(o=n.children)?void 0:o.find((t=>t.path.at(-1)===e)),!n)return}}if(t&&(!1!==n.isLeaf||n.children))return;e.loading=!0;const i=new URL(e._api);null==t||t.forEach((e=>i.searchParams.append("path",e))),i.username&&i.password&&(r={headers:new Headers({Authorization:`Basic ${btoa(`${i.username}:${i.password}`)}`})},i.username="",i.password="");try{var a;const o=yield fetch(i,r),{ok:s,status:l,statusText:c}=o;if(!s)throw new Error(`${l} ${c}`);const d=yield o.json(),u=null!=(a=d.items)?a:d,h=(e,t)=>e.map((e=>{let{alias:n,children:r,isLeaf:o,value:i}=e,a=(0,Yn.A)(e,II);const s=Object.assign({label:i,path:[...t,null!=n?n:i],depth:t.length,isLeaf:o},a);return r&&(s.children=h(r,s.path)),s})),g=h(u,null!=t?t:[]);t?(n.children=g,e._items=[...e._items]):e._items=g}catch(t){const n=Ge.A.ERR_LOADING_HTTP({attr:"apiUrl",error:String(t),url:e.apiurl});e.annotationStore.addErrors([Kj.generalError(n)]),console.error(t)}e.loading=!1})),beforeDestroy(){MI.delete(e.name)},updateChildren(){var t;const n=null!=(t=MI.get(e.name))?t:[];if(n.length){const t=(0,h.Zn)(e),r=e=>{null==e||e.map((e=>{null==e.updateValue||e.updateValue(t),r(e.children)}))};e._children=n,e.children=[...n],e.store.unlock(),MI.delete(e.name),r(e.children)}e.loading=!1},requiredModal(){fn.warning(e.requiredmessage||`Taxonomy "${e.name}" is required.`)},needsUpdate(){e.result?e.selected=e.result.mainValue:e.selected=[],e.maxUsagesReached=e.selected.length>=e.maxusages},updateFromResult(){e.needsUpdate()},onChange(t,n){(!1!==e.canRemoveItems||n.length)&&(e.selected=n.map((e=>{var t;return null!=(t=e.path)?t:e})),e.maxUsagesReached=e.selected.length>=e.maxusages,e.updateResult())},unselectAll(){(0,O.VS)(O.um)&&e.isLabeling&&(e.selected=[])},onAddLabel(t){var n;null==(n=e.userLabels)||n.addLabel(e.name,t)},onDeleteLabel(t){var n;null==(n=e.userLabels)||n.deleteLabel(e.name,t)}}))).actions((e=>{const t={validate:e.validate};return{validate(){if(!t.validate()||e.maxusages&&e.selected.length>e.maxusages)return!1},beforeSend(){e.maxusages&&e.selected.length>e.maxusages&&fn.warning(`The number of options selected (${e.selected.length}) exceed the maximum allowed (${e.maxusages}). To proceed, first unselect excess options for:\r\n • Taxonomy (${e.name})`)}}})).actions((e=>{const t={updateValue:e.updateValue};return{updateValue:(0,h.L3)((function*(n){var r;if(!e.isLoadedByApi)return null==t.updateValue?void 0:t.updateValue(n);e._api=j(e.apiurl,n.task.dataObj),e._api=null!=(r=yield n.presignUrlForProject(e._api))?r:e._api,yield e.loadItems()}))}})).preProcessSnapshot((e=>{if((0,O.VS)(O.Ls)){var t;const n=null!=(t=e._children)?t:e.children;n&&!MI.has(e.name)&&MI.set(e.name,n),delete e._children,delete e.children}return e})),NI=h.gK.compose("TaxonomyModel",QR,BE,LI,qR,Pe,OE,DI,...(0,O.VS)(O.Ls)?[AI]:[],ct,...(0,O.VS)(O.gF)?[jE]:[],...(0,O.VS)(O.um)?[KI]:[],$e,S_,JE),VI=(0,y.PA)((({item:e})=>{const t=[PI.taxonomy,"taxonomy",(0,O.VS)(O.yD)?PI.taxonomy__new:""].filter(Boolean).join(" "),n=e.perRegionVisible()&&e.isVisible?{}:{display:"none"},r={showFullPath:e.showfullpath,leafsOnly:e.leafsonly,pathSeparator:e.pathseparator,maxUsages:e.maxusages,maxWidth:e.maxwidth,minWidth:e.minwidth,dropdownWidth:e.dropdownwidth,placeholder:e.placeholder,canRemoveItems:e.canRemoveItems},o=!e.isLoadedByApi||!e.items.length;return e.loading&&(0,O.VS)(O.Ls)&&o?(0,_.jsx)("div",{className:t,style:n,children:(0,_.jsx)("div",{className:PI.taxonomy__loading,children:(0,_.jsx)(v.A,{size:"small"})})}):(0,_.jsx)("div",{className:t,style:n,ref:e.elementRef,children:(0,O.VS)(O.yD)&&!e.legacy?(0,_.jsx)(jI,{items:e.items,selected:e.selectedItems,onChange:e.onChange,onLoadData:e.loadItems,onAddLabel:e.userLabels&&e.onAddLabel,onDeleteLabel:e.userLabels&&e.onDeleteLabel,options:r,defaultSearch:!(0,O.VS)(O._m),isEditable:!e.isReadOnly()}):(0,_.jsx)(y_,{items:e.items,selected:e.selected,onChange:e.onChange,onAddLabel:e.userLabels&&e.onAddLabel,onDeleteLabel:e.userLabels&&e.onDeleteLabel,options:r,isEditable:!e.isReadOnly()})})}));x.addTag("taxonomy",NI,VI);const zI=h.gK.model({controlledTags:Te.unionTag(["HyperText"])}),BI=h.gK.model("HyperTextLabelsModel",{type:"hypertextlabels",children:Te.unionArray(["label","header","view","hypertext"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},get serializableValue(){const t={};return t[e.resultType]=e.selectedValues(),t},get resultType(){return"hypertextlabels"},get valueType(){return"hypertextlabels"}}))),HI=h.gK.compose(QR,dE,BI,zI,ZR,YR.props({_child:"LabelModel"})),FI=h.gK.compose("HyperTextLabelsModel",HI),WI=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("hypertextlabels",FI,WI);const $I=h.gK.model({opacity:h.gK.optional(h.gK.string,"0.9"),fillcolor:h.gK.maybeNull(h.gK.string),strokeWidth:h.gK.optional(h.gK.number,1),strokeColor:h.gK.optional(h.gK.string,"#f48a42")}),UI=h.gK.model("TimeSeriesLabelesModel",{pid:h.gK.optional(h.gK.string,E),type:"timeserieslabels",children:Te.unionArray(["labels","label","choice"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0},states:()=>e.annotation.toNames.get(e.name),activeStates(){const t=e.states();return t?t.filter((e=>!0===e.isSelected)):null}}))),ZI=ZR.props({_type:"timeserieslabels"}).views((e=>({get shouldBeUnselected(){return"single"===e.choice}}))),GI=h.gK.compose(QR,dE,UI,$I,ZI,YR.props({_child:"LabelModel"})),YI=h.gK.compose("TimeSeriesLabelsModel",GI),XI=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("timeserieslabels",YI,XI);const qI=h.gK.model({toname:h.gK.maybeNull(h.gK.string)}),JI=h.gK.model("TimelineLabelsModel",{pid:h.gK.optional(h.gK.string,E),type:"timelinelabels"}),QI=h.gK.compose("TimelineLabelsModel",QR,dE,JI,qI,YR.props({_child:"LabelModel"})),eL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("timelinelabels",QI,eL);const tL=h.gK.model({toname:h.gK.maybeNull(h.gK.string)}),nL=h.gK.model("VideoRectangleModel",{pid:h.gK.optional(h.gK.string,E),type:"videorectangle"}),rL=h.gK.compose("VideoRectangleModel",QR,nL,tL),oL=(0,y.PA)((()=>null));x.addTag("videorectangle",rL,oL);const iL=h.gK.model().volatile((()=>({isSeparated:!0}))).views((e=>({get obj(){var t;return null==(t=e.annotation)?void 0:t.names.get(e.toname)},get selectedLabels(){return[]},selectedValues:()=>[],getResultValue:()=>({})}))),aL=h.gK.model().actions((e=>({afterAttach(){var t;const n=null!=(t=e.toolNames)?t:[],r=RR.getInstance({name:e.toname}),o={manager:r,control:e},i={};n.forEach((e=>{if(e in l){const t=l[e].create({},o);i[e]=t}})),e.tools=i,r.addToolsFromControl(e)}}))),sL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),strokewidth:h.gK.optional(h.gK.string,"15")}),lL=h.gK.model({type:"brush",removeDuplicatesNamed:"Erase"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["Brush","Erase"]}))),cL=h.gK.compose("BrushModel",QR,Pe,iL,sL,lL,aL);x.addTag("brush",cL,(()=>null));const dL=h.gK.model({controlledTags:Te.unionTag(["Image"])}),uL=h.gK.model("BrushLabelsModel",{type:"brushlabels",children:Te.unionArray(["label","header","view","hypertext"])}),hL=h.gK.compose("BrushLabelsModel",QR,dE,uL,cL,dL,ZR,YR.props({_child:"LabelModel"})),gL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("brushlabels",hL,gL);const mL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.2"),fillcolor:h.gK.optional(Re.color,"#f48a42"),strokewidth:h.gK.optional(h.gK.string,"1"),strokecolor:h.gK.optional(Re.color,"#f48a42"),fillopacity:h.gK.maybeNull(Re.range()),canrotate:h.gK.optional(h.gK.boolean,!0)}),pL=h.gK.model({type:"ellipse"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["Ellipse"]}))),fL=h.gK.compose("EllipseModel",QR,Pe,iL,mL,pL,aL);x.addTag("ellipse",fL,(()=>null));const vL=h.gK.model("EllipseLabelsModel",{type:"ellipselabels",children:Te.unionArray(["label","header","view","hypertext"])}),yL=h.gK.compose(QR,dE,vL,fL,ZR,YR.props({_child:"LabelModel"})),bL=h.gK.compose("EllipseLabelsModel",yL),xL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("ellipselabels",bL,xL);const wL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.9"),fillcolor:h.gK.optional(Re.color,"#8bad00"),snap:h.gK.optional(h.gK.string,"none"),strokecolor:h.gK.optional(Re.color,"#8bad00"),strokewidth:h.gK.optional(h.gK.string,"2")}),CL=h.gK.model({type:"keypoint"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["KeyPoint"],snapMode:Je}))),SL=h.gK.compose("KeyPointModel",QR,Pe,iL,wL,CL,aL);x.addTag("keypoint",SL,(()=>null));const jL=h.gK.model({controlledTags:Te.unionTag(["Image"])}),kL=h.gK.model("KeyPointLabelsModel",{type:"keypointlabels",children:Te.unionArray(["label","header","view","hypertext"])}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))),OL=h.gK.compose(QR,dE,kL,SL,jL,ZR,YR.props({_child:"LabelModel"})),RL=h.gK.compose("KeyPointLabelsModel",OL),EL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("keypointlabels",RL,EL);const _L=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.6"),blurradius:h.gK.optional(h.gK.string,"5"),defaultthreshold:h.gK.optional(h.gK.string,"15")}),AL=h.gK.model({type:"magicwand",removeDuplicatesNamed:"Erase"}).views((e=>({get hasStates(){const t=e.states();return t&&t.length>0}}))).volatile((()=>({toolNames:["MagicWand","Erase"]}))),TL=h.gK.compose("MagicWandModel",QR,Pe,iL,_L,AL,aL);(0,O.VS)(O.bP)&&x.addTag("magicwand",TL,(()=>null));const PL=yr("Polygons"),IL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.2"),fillcolor:h.gK.optional(Re.color,"#f48a42"),strokewidth:h.gK.optional(h.gK.string,"2"),strokecolor:h.gK.optional(Re.color,"#f48a42"),snap:h.gK.optional(h.gK.string,"none"),pointsize:h.gK.optional(h.gK.string,"small"),pointstyle:h.gK.optional(h.gK.string,"circle")}),LL=h.gK.model({controlledTags:Te.unionTag(["Image"])}),ML=h.gK.model({type:"polygon",_value:h.gK.optional(h.gK.string,"")}).volatile((()=>({toolNames:["Polygon"]}))).actions((e=>({initializeHotkeys(){PL.addNamed("polygon:undo",(()=>{e.annotation.isDrawing&&e.annotation.undo()})),PL.addNamed("polygon:redo",(()=>{e.annotation.isDrawing&&e.annotation.redo()}))},disposeHotkeys(){PL.removeNamed("polygon:undo"),PL.removeNamed("polygon:redo")},afterCreate(){e.initializeHotkeys()},beforeDestroy(){e.disposeHotkeys()}}))),KL=h.gK.compose("PolygonModel",QR,Pe,iL,IL,LL,aL,ML);x.addTag("polygon",KL,(()=>null));const DL=h.gK.model({controlledTags:Te.unionTag(["Image"])}),NL=h.gK.model("PolygonLabelsModel",{type:"polygonlabels",children:Te.unionArray(["label","header","view","hypertext"])}),VL=h.gK.compose(QR,dE,NL,KL,DL,ZR,YR.props({_child:"LabelModel"})),zL=h.gK.compose("PolygonLabelsModel",VL),BL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("polygonlabels",zL,BL);const HL=h.gK.model({toname:h.gK.maybeNull(h.gK.string),opacity:h.gK.optional(Re.range(),"0.2"),fillcolor:h.gK.optional(Re.color,"#f48a42"),strokewidth:h.gK.optional(h.gK.string,"1"),strokecolor:h.gK.optional(Re.color,"#f48a42"),fillopacity:h.gK.maybeNull(Re.range()),canrotate:h.gK.optional(h.gK.boolean,!0)}),FL=h.gK.model({type:"rectangle"}).volatile((()=>({toolNames:["Rect","Rect3Point"]}))),WL=h.gK.compose("RectangleModel",QR,Pe,iL,HL,FL,aL);x.addTag("rectangle",WL,(()=>null));const $L=h.gK.model({controlledTags:Te.unionTag(["Image"])}),UL=h.gK.model("RectangleLabelsModel",{pid:h.gK.optional(h.gK.string,E),type:"rectanglelabels",children:Te.unionArray(["label","header","view","hypertext"])}),ZL=h.gK.compose(QR,dE,UL,WL,$L,ZR,YR.props({_child:"LabelModel"})),GL=h.gK.compose("RectangleLabelsModel",ZL),YL=(0,y.PA)((({item:e})=>(0,_.jsx)(uE,{item:e})));x.addTag("rectanglelabels",GL,YL);const XL=h.gK.model({choice:h.gK.optional(h.gK.enumeration(["single","multiple"]),"multiple")}),qL=h.gK.model({id:h.gK.optional(h.gK.identifier,E),pid:h.gK.optional(h.gK.string,E),type:"relations",children:Te.unionArray(["relation"])}).views((e=>({get values(){return e.children.map((e=>e.value))},findRelation:t=>e.children.find((e=>e.value===t))}))).actions((()=>({}))),JL=h.gK.compose("RelationsModel",qL,XL);x.addTag("relations",JL,(()=>null));const QL=h.gK.model({value:h.gK.maybeNull(h.gK.string),background:h.gK.optional(Re.color,V.A.RELATION_BACKGROUND)}),eM=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"relation"}).actions((()=>({}))),tM=h.gK.compose("RelationModel",QL,eM);x.addTag("relation",tM,(()=>null));var nM=n(68703);const{Panel:rM}=nM.A,oM=h.gK.model({type:"panel",_value:h.gK.optional(h.gK.string,""),value:h.gK.optional(h.gK.string,""),children:Te.unionArray(["view","header","labels","label","table","taxonomy","choices","choice","rating","ranker","rectangle","ellipse","polygon","keypoint","brush","rectanglelabels","ellipselabels","polygonlabels","keypointlabels","brushlabels","hypertextlabels","text","audio","image","hypertext","audioplus","list","dialog","textarea","pairwise","style","label","relations","filter","timeseries","timeserieslabels","paragraphs","paragraphlabels"])}),iM=h.gK.model({type:"collapse",size:h.gK.optional(h.gK.string,"4"),style:h.gK.maybeNull(h.gK.string),_value:h.gK.optional(h.gK.string,""),value:h.gK.optional(h.gK.string,""),bordered:h.gK.optional(h.gK.boolean,!1),accordion:h.gK.optional(h.gK.boolean,!0),children:Te.unionArray(["panel"])}),aM=h.gK.compose("CollapseModel",iM,ze),sM=(0,y.PA)((({item:e})=>(0,_.jsx)(nM.A,{bordered:e.bordered,accordion:e.accordion,children:e.children.filter((e=>"panel"===e.type)).map((t=>(0,_.jsx)(rM,{header:t._value,children:D.renderChildren(t,e.annotation)},t._value)))})));x.addTag("panel",h.gK.compose("PanelModel",oM,ze),(()=>{})),x.addTag("collapse",aM,sM);var lM=n(70821),cM=n(92132);const dM={block:"block--fqozC",block_selected:"block_selected--BXxdo",name:"name--sC49k",tag:"tag--efLdj",date:"date--h1U4a"};class uM extends p.Component{render(){let e,t,n,r=`${dM.block}`;return this.props.hint&&(e=(0,_.jsx)(vI.A,{color:"blue",children:this.props.hint})),this.props.bg&&(t=this.props.bg),this.props.selected&&(r=`${r} ${dM.block_selected}`,e=(0,_.jsx)("div",{children:(0,_.jsx)(vI.A,{color:"magenta",children:"Selected Message"})}),this.props.hint&&(e=(0,_.jsx)("div",{className:dM.tag,children:(0,_.jsx)(vI.A,{color:"magenta",children:this.props.hint})}))),this.props.date&&(n=(0,_.jsx)("span",{className:dM.date,children:this.props.date})),(0,_.jsxs)("div",{className:r,style:{background:t,width:"max-content",maxWidth:"100%"},children:[(0,_.jsxs)("span",{className:dM.name,children:[this.props.name,": "]}),(0,_.jsx)("p",{className:dM.text,children:this.props.text}),n,e]})}}uM.propTypes={name:Ce.PropTypes.string.isRequired,text:Ce.PropTypes.string.isRequired,selected:Ce.PropTypes.bool,date:Ce.PropTypes.string,hint:Ce.PropTypes.string};const hM=h.gK.model({name:h.gK.string,text:h.gK.string,selected:h.gK.optional(h.gK.boolean,!1),date:h.gK.optional(h.gK.string,""),hint:h.gK.optional(h.gK.string,"")}),gM=h.gK.model({value:h.gK.maybeNull(h.gK.string),name:h.gK.maybeNull(h.gK.string)}),mM=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"Dialog",data:h.gK.map(hM)}),pM=h.gK.compose("DialogModel",gM,mM,Pe),fM=(0,y.WQ)("store")((0,y.PA)((({store:e,item:t})=>{if(!e.task||!e.task.dataObj)return(0,_.jsx)(lM.A,{});const n=[];let r=t.value;return"$"===r.charAt(0)&&(r=r.substr(1)),e.task.dataObj[r].forEach(((e,t)=>{let r;e.name&&(r=(0,gt.convertToRGBA)((0,gt.stringToColor)(e.name),.1)),n.push((0,_.jsx)(uM,{name:e.name,hint:e.hint,text:e.text,selected:e.selected,date:e.date,id:e.id,bg:r},t))})),(0,_.jsxs)("div",{children:[(0,_.jsx)("div",{style:{display:"flex",flexFlow:"column",maxHeight:"500px",overflowY:"scroll",paddingRight:"10px",marginTop:"10px"},children:n}),(0,_.jsx)(cM.A,{dashed:!0})]})})));x.addTag("dialog",pM,fM);const vM=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"header",size:h.gK.optional(h.gK.string,"4"),style:h.gK.maybeNull(h.gK.string),_value:h.gK.optional(h.gK.string,""),value:h.gK.optional(h.gK.string,""),underline:h.gK.optional(h.gK.boolean,!1)}),yM=h.gK.compose("HeaderModel",vM,ze),bM=(0,y.PA)((({item:e})=>{const t=(0,w.clamp)(Number.parseInt(e.size),1,5),n=e.style?D.cssConverter(e.style):{margin:"10px 0"};return!n.fontSize&&t>4&&(n.fontSize=5===t?"1.2em":"1.1em"),(0,_.jsx)(TE.A.Title,{underline:e.underline,level:t,style:n,children:e._value})}));x.addTag("header",yM,bM);const xM=h.gK.model({classname:h.gK.optional(h.gK.string,""),display:h.gK.optional(h.gK.string,"block"),style:h.gK.maybeNull(h.gK.string),idattr:h.gK.optional(h.gK.string,"")}),wM=h.gK.model({id:h.gK.identifier,type:"view",children:Te.unionArray(["view","header","labels","label","table","taxonomy","choices","choice","collapse","datetime","number","rating","ranker","rectangle","ellipse","polygon","keypoint","brush","magicwand","rectanglelabels","ellipselabels","polygonlabels","keypointlabels","brushlabels","hypertextlabels","timeserieslabels","text","audio","image","hypertext","richtext","timeseries","audioplus","list","dialog","textarea","pairwise","style","relations","filter","pagedview","paragraphs","paragraphlabels","video","videorectangle","timelinelabels"])}),CM=h.gK.compose("ViewModel",xM,wM,JE,Pe),SM=(0,y.PA)((({item:e})=>{let t={};return"inline"===e.display&&(t={display:"inline-block",marginRight:"15px"}),e.style&&(t=D.cssConverter(e.style)),!1===e.isVisible&&(t.display="none"),(0,_.jsx)("div",{id:e.idattr,className:e.classname,style:t,children:D.renderChildren(e,e.annotation)})}));x.addTag("view",CM,SM);const jM=h.gK.model({id:h.gK.optional(h.gK.identifier,E),type:"style",value:h.gK.optional(h.gK.string,"")}),kM=h.gK.compose("StyleModel",jM),OM=(0,y.PA)((({item:e})=>(0,_.jsx)("style",{dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(e.value)}})));x.addTag("style",kM,OM);var RM=n(31927);const EM=h.gK.model({casesensetive:h.gK.optional(h.gK.boolean,!1),cleanup:h.gK.optional(h.gK.boolean,!0),placeholder:h.gK.optional(h.gK.string,"Quick Filter"),minlength:h.gK.optional(h.gK.string,"3"),hotkey:h.gK.maybeNull(h.gK.string)}),_M=h.gK.model(Object.assign({type:"filter",_value:h.gK.maybeNull(h.gK.string)},(0,O.VS)(O.cE)?{id:h.gK.identifier,name:h.gK.string}:{name:h.gK.identifier},{toname:h.gK.maybeNull(h.gK.string)})).views((e=>({get toTag(){return e.annotation.names.get(e.toname)}}))).actions((e=>({applyFilter(){let t=e._value;const n=e.toTag.tiedChildren;Number(e.minlength)>t.length?n.filter((e=>!e.visible)).forEach((e=>e.setVisible(!0))):(e.casesensetive||(t=t.toLowerCase()),n.forEach((n=>{let r=n._value;e.casesensetive||(r=r.toLowerCase()),-1!==r.indexOf(t)?n.setVisible(!0):n.setVisible(!1)})))},applyFilterEv(t){const{value:n}=t.target;e._value=n,e.applyFilter()},onHotKey:()=>(e._ref&&e._ref.focus(),!1),setInputRef(t){e._ref=t},selectFirstElement(){e.toTag.selectFirstVisible()&&e.cleanup&&(e._value="",e.applyFilter())}}))),AM=h.gK.compose("FilterModel",_M,EM,ze,Pe),TM=(0,y.PA)((({item:e})=>{const t=e.toTag;return-1===t.type.indexOf("labels")&&-1===t.type.indexOf("choices")?null:(0,_.jsx)(RM.A,{ref:t=>{e.setInputRef(t)},value:e._value,size:"small",onChange:e.applyFilterEv,onPressEnter:e.selectFirstElement,placeholder:e.placeholder})}));function PM(e){const t=[e];let n;for(;n=t.pop();){const e=Object.keys(n),r=Object.getOwnPropertyDescriptors(n);if(!("svg"===n.elementType))for(const o of e){const e=n[o],i=r[o].writable;e&&i&&("_debugOwner"!==o&&"object"==typeof e&&{}.hasOwnProperty.call(e,"stateNode")&&t.push(n[o]),"object"!=typeof e&&"function"!=typeof e||(n[o]=null))}}}function IM(e){const t=Object.keys(e);for(const e of t){const t=RegExp(/^__reactProps(\$[^$]+)$/).exec(e);if(t)return t[1]}return""}function LM(e,t){for(const n of e){if(n.isConnected)return;if("svg"===n.tagName)return;const e=Object.keys(n).filter((e=>e.startsWith("__react")&&(!RegExp(/^(?:__reactProps|__reactFiber)/).exec(e)||RegExp(new RegExp(`\\${t}$`)).exec(e))));if(e.length){for(const t of e)PM(n[t]),n[t]=null;n.childNodes&&LM(n.childNodes,t)}}}x.addTag("filter",AM,TM);const MM=new WeakMap;function KM(e,t="default"){MM.has(e)||MM.set(e,new Map);const n=MM.get(e);return n.has(t)||n.set(t,function(){let e=null;return t=>{if(t)e=t;else if(e){const t=e,n=IM(t);e=null,setTimeout((()=>{LM([t],n)}))}}}()),n.get(t)}function DM({annotation:e,root:t}){return(0,p.useLayoutEffect)((()=>()=>{e&&(0,h._n)(e)&&e.resetReady()}),[e.pk,e.id]),t?D.renderItem(t,e):null}const NM=(0,Ze.cn)("draft-panel"),VM=(0,y.PA)((({item:e})=>{if(!e.draftSaved&&!e.versions.draft)return null;const t=e.draft&&e.draftSaved?` saved ${rn.UDate.prettyDate(e.draftSaved)}`:"";return e.selected?e.versions.result&&e.versions.result.length?(0,_.jsxs)("div",{className:NM,children:[(0,_.jsx)(ir,{placement:"topLeft",title:e.draftSelected?"switch to original result":"switch to current draft",children:(0,_.jsx)("button",{type:"button",onClick:()=>e.toggleDraft(),className:NM.elem("toggle"),children:e.draftSelected?"draft":"original"})}),t]}):(0,_.jsx)("div",{className:NM,children:t?`draft${t}`:"not submitted draft"}):e.draft?(0,_.jsxs)("div",{className:NM,children:["draft",t]}):null}));var zM=n(11346);const BM=["badge","className","faded","showUsername","size","src","style","user","username","useRandomBackground","children"],HM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",FM=(0,p.forwardRef)(((e,t)=>{var n,r;let{badge:o=null,className:i,faded:a=!1,showUsername:s,size:l,src:c,style:d,user:u={},username:h,useRandomBackground:g=!0,children:m}=e,f=(0,Yn.A)(e,BM);const v=null!=(n=null==u?void 0:u.avatar)?n:c,y=(0,p.useRef)(),[b,x]=(0,p.useState)(v),[C,S]=(0,p.useState)(!1),[j,k]=(0,p.useState)(!0);(0,p.useEffect)((()=>{v!==b&&(x(v),S(!1),k(!0))}),[v]),l&&(d=Object.assign({width:l,height:l,fontSize:.4*l},d));const O=(0,p.useMemo)((()=>(0,w.userDisplayName)(u)),[u]),R=(0,p.useMemo)((()=>{if((0,w.isDefined)(u.id)){var e;const t=null!=(e=localStorage.getItem(`userpic-color-${u.id}`))?e:pt().average([pt().random(),"#cfcfcf"]).css();return localStorage.setItem(`userpic-color-${u.id}`,t),t}return null}),[u,g]),E=(0,p.useMemo)((()=>{if(R){return pt().contrast(R,"#fff")>=4.5?"#fff":"#000"}return null}),[R]),A=(0,p.useCallback)((()=>{S(!0),b!==HM&&k(!1)}),[b]),T=Object.assign({},null!=(r=d)?r:{},{background:R,color:E}),P=(0,_.jsxs)(Ze.eB,Object.assign({ref:t,name:"userpic",mix:i,mod:{faded:a},style:T},f,{children:[m||(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{tag:"img",name:"avatar",ref:y,src:b,alt:(null!=O?O:"").toUpperCase(),style:{opacity:C?a?.3:1:0},onLoad:A,onError:()=>x(HM),mod:{faded:a}}),j&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"username",children:(null!=O?O:"").slice(0,2).toUpperCase()})]}),o&&Object.entries(o).map((([e,t],n)=>(0,_.jsx)(Ze.Sl,{name:"badge",mod:{[e]:!0},children:t},`badge-${n}`)))]})),I=(0,p.useMemo)((()=>{var e,t;return null!=u&&u.firstName||null!=u&&u.lastName?`${null!=(e=null==u?void 0:u.firstName)?e:""} ${null!=(t=null==u?void 0:u.lastName)?t:""}`.trim():null!=u&&u.email?u.email:h}),[u,h]);return s&&I?(0,_.jsx)(ir,{title:I,children:P}):P}));FM.displayName="Userpic";const WM=(0,y.WQ)((({store:e})=>{var t;const n=e.annotationStore,r=null==n?void 0:n.selected;return{annotationStore:n,selected:null==n?void 0:n.selected,createdBy:null!=(t=null==r?void 0:r.user)?t:{email:null==r?void 0:r.createdBy},createdDate:null==r?void 0:r.createdDate,history:null==n?void 0:n.history,selectedHistory:null==n?void 0:n.selectedHistory}})),$M=(0,y.PA)((({annotation:e,inline:t,isSelected:n})=>{var r;const o=e.history.hasChanges,i=e.list,[a,s]=(0,p.useState)(!1);return(0,p.useEffect)((()=>s(!0)),[e.history.history.length]),(0,p.useEffect)((()=>s(!1)),[e.draftSaved]),o||e.versions.draft?(0,_.jsx)(GM,{user:null!=(r=e.user)?r:{email:e.createdBy},date:e.draftSaved,extra:e.isDraftSaving?(0,_.jsx)(Ze.Sl,{name:"saving",children:(0,_.jsx)(Ze.Sl,{name:"spin"})}):a?(0,_.jsx)(Ze.Sl,{name:"saving",children:(0,_.jsx)(Ze.Sl,{name:"dot"})}):o?(0,_.jsx)(Ze.Sl,{name:"saving",children:(0,_.jsx)(Ze.Sl,{name:"saved",component:cu})}):null,inline:t,comment:"",acceptedState:"draft_created",selected:n,onClick:()=>{i.selectHistory(null),e.toggleDraft(!0)}},"draft"):null})),UM=({reason:e,comment:t})=>{const[n,r]=(0,p.useState)(!1),[o,i]=(0,p.useState)(!1),a=(0,p.useRef)();return(0,p.useLayoutEffect)((()=>{if(a.current){const{clientHeight:e}=a.current,t=e>66;i(t),r(t)}}),[]),(0,_.jsxs)(Ze.Sl,{name:"comment",ref:a,mod:{collapsed:n},children:[(0,_.jsx)(Ze.Sl,{name:"comment-content","data-reason":`${e}${t?": ":""}`,children:t}),o&&(0,_.jsx)(Ze.Sl,{name:"collapse-comment",mod:{collapsed:n},onClick:e=>{e.stopPropagation(),r((e=>!e))},children:n?"Show more":"Show less"})]})},ZM=({type:e})=>{const t=(0,p.useMemo)((()=>{switch(e){case"submitted":case"updated":return(0,_.jsx)(Fb,{style:{color:"#617ADA"}});case"draft_created":return(0,_.jsx)(Qb,{style:{color:"#617ADA"}});case"accepted":return(0,_.jsx)(Sb,{style:{color:"#2AA000"}});case"rejected":return(0,_.jsx)(Tb,{style:{color:"#dd0000"}});case"fixed_and_accepted":return(0,_.jsx)(Sb,{style:{color:"#FA8C16"}});case"prediction":return(0,_.jsx)(vx,{style:{color:"#944BFF"}});case"imported":return(0,_.jsx)(Ix,{style:{color:"#2AA000"}});case"skipped":return(0,_.jsx)(kx,{style:{color:"#dd0000"}});case"deleted_review":return(0,_.jsx)(Bx,{style:{color:"#dd0000"}});case"propagated_annotation":return(0,_.jsx)(Xx,{style:{color:"#2AA000"}});default:return null}}),[e]);return t&&(0,_.jsx)(Ze.Sl,{name:"history-icon",children:t})},GM=(0,y.PA)((({entity:e,user:t,date:n,extra:r,comment:o,acceptedState:i,selected:a=!1,disabled:s=!1,inline:l=!1,onClick:c})=>{const d="prediction"===(null==e?void 0:e.type),u=(0,p.useMemo)((()=>{switch(i){case"accepted":return"Accepted";case"rejected":return"Rejected";case"fixed_and_accepted":return"Fixed";case"updated":return"Updated";case"submitted":return"Submitted";case"prediction":return"From prediction";case"imported":return"Imported";case"skipped":return"Skipped";case"draft_created":return"Draft";case"deleted_review":return"Review deleted";case"propagated_annotation":return"Propagated";default:return null}}),[]),h=(0,p.useCallback)((e=>{s||c(e)}),[c,s]);return(0,_.jsxs)(Ze.eB,{name:"history-item",mod:{inline:l,selected:a,disabled:s},onClick:h,children:[(0,_.jsxs)(Fa,{spread:!0,size:"medium",truncated:!0,children:[(0,_.jsxs)(Fa,{size:"small",truncated:!0,children:[(0,_.jsx)(Ze.Sl,{tag:FM,user:t,name:"userpic",showUsername:!0,username:d?e.createdBy:null,mod:{prediction:d},children:d&&(0,_.jsx)(Ps,{style:{width:16,height:16}})}),(0,_.jsx)(Ze.Sl,{name:"name",tag:"span",children:d?e.createdBy:(0,w.userDisplayName)(t)})]}),(0,_.jsxs)(Fa,{size:"small",children:[r&&(0,_.jsx)(Ze.Sl,{name:"date",children:r}),n&&(0,_.jsx)(Ze.Sl,{name:"date",children:(0,_.jsx)(zM.A,{placement:"topRight",title:new Date(n).toLocaleString(),children:(0,w.humanDateDiff)(n)})})]})]}),(u||o)&&(0,_.jsxs)(Ze.Sl,{name:"action",tag:Fa,size:"small",children:[i&&(0,_.jsx)(ZM,{type:i}),(0,_.jsx)(UM,{comment:o,reason:u})]})]})}));GM.displayName="HistoryItem";const YM=WM((0,y.PA)((({annotationStore:e,selectedHistory:t,history:n,enabled:r=!0,showDraft:o=!1,inline:i=!1})=>{const a=e.selected,s=null!=n&&n.length?n[0]:null,l=a.history.hasChanges,c=!e.selectedHistory&&(a.draftSelected||!a.versions.draft&&l);return(0,_.jsxs)(Ze.eB,{name:"annotation-history",mod:{inline:i},children:[o&&(0,_.jsx)($M,{annotation:a,isSelected:c,inline:i}),r&&n.length>0&&n.map((n=>{const{id:r,user:d,createdDate:h}=n,g=(null==s?void 0:s.id)===n.id,m=g&&!t&&o?!c:(null==t?void 0:t.id)===n.id;return(0,_.jsx)(GM,{inline:i,user:null!=d?d:{email:null==n?void 0:n.createdBy},date:h,comment:n.comment,acceptedState:n.actionType,selected:m,disabled:0===n.results.length,onClick:async()=>{o?(l&&(a.saveDraftImmediately(),await(0,u.z7)((()=>!a.isDraftSaving))),g||m?(e.selectHistory(null),a.toggleDraft(m)):e.selectHistory(n)):e.selectHistory(m?null:n)}},r)}))]})})));YM.displayName="AnnotationHistory";const XM=e=>{var t;(0,p.useEffect)((()=>{const t=e=>{var t;if(!e)return!1;if(e.nodeType!==Node.ELEMENT_NODE)return!1;const n=e,r=Number.parseInt(null!=(t=n.getAttribute("tabindex"))?t:"",10);return n.matches("a, button, input, textarea, select, details, [tabindex], [contenteditable]")||r>-1},n=()=>{var e;const n=window.getSelection(),r=null==n?void 0:n.focusNode,o=t(r),i=t(document.activeElement);return(null==(e=null==n?void 0:n.isCollapsed)||e)&&!o&&!i},r=t=>{const{clipboardData:n}=t,r=e.serializedSelection;null==n||n.setData("application/json",JSON.stringify(r)),t.preventDefault()},o=e=>{n()&&r(e)},i=t=>{n()&&(t=>{const{clipboardData:n}=t,r=null==n?void 0:n.getData("application/json");try{const n=(r?JSON.parse(r):[]).map((e=>Object.assign({},e,{readonly:!1})));e.appendResults(n),t.preventDefault()}catch(e){return void console.error(e)}})(t)},a=t=>{n()&&(r(t),e.deleteSelectedRegions())};return window.addEventListener("copy",o),window.addEventListener("paste",i),window.addEventListener("cut",a),()=>{window.removeEventListener("copy",o),window.removeEventListener("paste",i),window.removeEventListener("cut",a)}}),[null!=(t=e.pk)?t:e.id])},qM=(0,y.WQ)("store")((0,y.PA)((({entity:e,showHistory:t=!0})=>{var n;const r=(0,O.VS)(O.Lk);return XM(e),e?(0,_.jsxs)(Ze.eB,{name:"annotation",onClick:e=>e.stopPropagation(),children:[!r&&(0,_.jsx)(VM,{item:e}),t&&(0,_.jsxs)(Ze.Sl,{tag:Fa,spread:!0,name:"title",children:["Annotation History",(0,_.jsxs)(Ze.Sl,{name:"id",children:["#",null!=(n=e.pk)?n:e.id]})]}),(0,_.jsx)(YM,{enabled:t,showDraft:r})]}):null})));var JM=n(65604);const QM={section:"section--REpX0",header:"header--AcE7u",title:"title--Raola",treelabels:"treelabels--_0J5K",switcherIcon:"switcherIcon--qMJcX",treelabel:"treelabel--dvLD2",treetag:"treetag--Ijool",item:"item--vCp4N",lstitem:"lstitem--p2hZD",hidden:"hidden--UN2IK",visible:"visible--zJ3y7",selected:"selected--mRL_K",lstitem_label:"lstitem_label--G8OgE",lstitem__actions:"lstitem__actions--wwYMx",lstitem__actionIcon:"lstitem__actionIcon--ypg29",list:"list--DRxFA",uihidden:"uihidden--qWqTy",uivisible:"uivisible--EGiBT","ant-tree-switcher":"ant-tree-switcher--QgNI1"};var eK=n(23882),tK=n(50417);const nK=(0,y.PA)((({item:e,setDraggable:t})=>{const[n,r]=(0,p.useState)(!1),o=(0,p.useCallback)((e=>{r((e=>!e)),e.preventDefault(),e.stopPropagation()}),[]),i=e.perRegionDescControls||[];return(0,_.jsxs)(Ze.Sl,{name:"desc",tag:"div",mod:{collapsed:n,empty:!((null==i?void 0:i.length)>0)},onMouseEnter:()=>{null==t||t(!1)},onMouseLeave:()=>{null==t||t(!0)},children:[(0,_.jsx)(Ze.Sl,{name:"controls",children:i.map(((t,o)=>{const i=x.getPerRegionView(t.type,lt.REGION_LIST);return i?(0,_.jsx)(i,{item:t,area:e,collapsed:n,setCollapsed:r},o):null}))}),(0,_.jsx)(Ze.Sl,{name:"collapse",tag:za,size:"small",type:"text",onClick:o,children:n?(0,_.jsx)(pc,{}):(0,_.jsx)(Ec,{})})]})})),rK=(0,y.PA)((({idx:e,item:t,setDraggable:n})=>{const r=(0,p.useRef)();return(0,p.useEffect)((()=>{if(t.selected){const e=r.current;if(!e)return;(e.scrollIntoViewIfNeeded||e.scrollIntoView).call(e)}}),[t.selected]),(0,_.jsxs)(Ze.eB,{ref:r,name:"region-item",mod:{hidden:t.hidden},"data-testid":`regionitem:selected=${t.selected}`,children:[(0,_.jsxs)(Ze.Sl,{name:"header",tag:"div",children:[(0,_.jsx)(Ze.Sl,{name:"counter",children:(0,w.isDefined)(e)?e+1:""}),(0,_.jsx)(Ze.Sl,{name:"title",tag:IO,node:t,mix:QM.node}),(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{tag:"span",name:"id",children:(0,_.jsx)(LO,{node:t})}),(0,_.jsx)(Ze.Sl,{name:"prediction",children:"prediction"===t.origin&&(0,_.jsx)(Ps,{style:{width:16,height:16}})}),t.isReadOnly()&&(0,_.jsx)(eK.A,{count:"ro",style:{backgroundColor:"#ccc"}}),t.score&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"score",style:{color:rn.Colors.getScaleGradient(t.score)},children:t.score.toFixed(2)}),t.hideable&&(0,_.jsx)(Ze.Sl,{tag:za,name:"toggle",size:"small",type:"text",mod:{active:!t.hidden},onClick:t.toggleHidden,children:t.hidden?(0,_.jsx)(nc,{}):(0,_.jsx)($l,{})})]})]}),(0,_.jsx)(nK,{item:t,setDraggable:n})]})})),oK=(0,y.PA)((({item:e,idx:t,flat:n,setDraggable:r,onClick:o})=>{const i=(0,p.useMemo)((()=>{let t;return()=>{if(!t){const n=e.getOneColor();t=n?nn({labelColor:n,labelBgColor:pt()(n).alpha(.15)}):null}return t}}),[(0,h._n)(e)&&e.getOneColor()]);if(!(0,h._n)(e))return null;const a=[QM.lstitem,n&&QM.flat,!0===e.hidden&&QM.hidden,e.inSelection&&QM.selected].filter(Boolean),s=i();return(0,_.jsx)(tK.Ay.Item,{className:a.join(" "),onClick:t=>{o(t,e)},onMouseOver:()=>e.setHighlight(!0),onMouseOut:()=>e.setHighlight(!1),style:s,"aria-label":"region",children:(0,_.jsx)(rK,{idx:t,item:e,setDraggable:r})},e.id)})),iK=(0,y.PA)((({regionStore:e})=>{const[t,n]=(0,p.useState)(!0),r=(0,p.useCallback)((()=>n(!1)),[]);(0,p.useEffect)((()=>{setTimeout(r)}),[r]);const o=(0,p.useRef)(!0),i=(0,p.useCallback)((e=>{o.current=e}),[]);if(t)return(0,_.jsx)("div",{style:{textAlign:"center"},children:(0,_.jsx)(v.A,{})});const a=!e.sortedRegions.some((e=>e.parentID)),s=e.asTree(((e,t,n)=>({key:e.id,title:(0,_.jsx)(oK,{item:e,idx:t,flat:a,setDraggable:i,onClick:n})}))),l=[...e.classifications.map((e=>({classification:!0,key:e.id,title:(0,_.jsx)(oK,{item:e,flat:!0,setDraggable:i})}))),...s];return(0,_.jsx)(JM.A,{className:QM.treelabels,treeData:l,draggable:!0,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,switcherIcon:(0,_.jsx)(lc,{opacity:"0.25"}),onDragStart:({event:e,node:t})=>{if(t.classification||!o.current)return e.preventDefault(),e.stopPropagation(),!1},onDrop:({node:t,dragNode:n,dropPosition:r,dropToGap:o})=>{if(t.classification)return!1;const i=t.props.eventKey,a=n.props.eventKey,s=t.props.pos.split("-");r-=Number.parseInt(s[s.length-1]);const l=s.length,c=e.findRegionID(i),d=e.findRegionID(a);if(e.unhighlightAll(),2===l&&o&&-1===r)d.setParentID("");else if(-1!==r){var u,h;const t=((null==(u=c.labeling)?void 0:u.selectedLabels)||[]).filter((e=>e.groupcancontain));if(t.length){const e=d.labeling.selectedLabels,n=rn.Checkers.flatten(t.map((e=>e.groupcancontain.split(",")))),r=rn.Checkers.flatten(e.map((e=>e.alias?[e.alias,e.value]:[e.value])));if(0===n.filter((e=>-1!==r.indexOf(e))).length)return}if(null!=(h=c.labeling)&&null!=(h=h.from_name)&&h.groupdepth){let t=Number(c.labeling.from_name.groupdepth);const n=t=>{if(!t)return 0;const r=e.filterByParentID(t.pid).map((e=>n(e)));return r.length?1+Math.max.apply(Math,r):0};if(t>=0){t-=n(d);let r=c;for(;r;)r=e.findRegion(r.parentID),t-=1;if(t<0)return}}d.setParentID(c.id)}}})})),aK=(0,y.PA)((({item:e,regions:t,regionStore:n})=>{const r=e.background,o=nn({color:r}),i=Object.values(t).reduce(((e,t)=>e&&t.hidden),!0),a=Object.values(t).length;return(0,_.jsx)(Ze.eB,{name:"list-item",tag:tK.Ay.Item,style:o,children:(0,_.jsxs)(Fa,{spread:!0,children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[e.isNotLabel?(0,_.jsx)(_.Fragment,{children:"Not labeled"}):(0,_.jsx)(tE,{color:r,empty:e.isEmpty,children:e._value}),(0,_.jsx)(Ze.Sl,{name:"counter",children:`${a} Region${0===a||a>1?"s":""}`})]}),(0,_.jsx)(Ze.Sl,{name:"visibility",tag:za,type:"text",icon:i?(0,_.jsx)(nc,{}):(0,_.jsx)($l,{}),onClick:()=>n.setHiddenByLabel(!i,e),mod:{hidden:i}})]})},e.id)})),{localStorage:sK}=window,lK="collapsed-label-pos",cK=(0,y.PA)((({regionStore:e})=>{const t=e.asLabelsTree(((t,n,r,o,i)=>({key:t.id,title:o=>r?(0,_.jsx)(aK,{item:t,idx:n,regions:o.children,regionStore:e}):(0,_.jsx)(oK,{item:t,idx:n,onClick:i})})));if((0,O.VS)(O.TU)){var n,r,o;const[e,i]=(0,p.useState)(null!=(n=null==(r=sK.getItem(lK))||null==r.split||null==(r=r.split(","))?void 0:r.filter((e=>!!e)))?n:[]),a=e=>{sK.setItem(lK,e)},s=t=>{const n=[...e,t];i(n),a(n)},l=t=>{const n=e.filter((e=>e!==t));i(n),a(n)},c=null!=(o=t.filter((t=>!e.includes(t.pos))).map((e=>e.key)))?o:[];return(0,_.jsx)(JM.A,{className:QM.treelabels,treeData:t,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,expandedKeys:c,switcherIcon:(0,_.jsx)(lc,{className:QM.switcherIcon,opacity:"0.25"}),onExpand:(n,{node:r})=>{const o=t.find((e=>e.key===r.key)).pos;e.includes(o)?l(o):s(o)}})}return(0,_.jsx)(JM.A,{className:QM.treelabels,treeData:t,showIcon:!1,blockNode:!0,defaultExpandAll:!0,autoExpandParent:!0,switcherIcon:(0,_.jsx)(lc,{opacity:"0.25"})})}));var dK=n(53312);const uK=({sortKey:e})=>{switch(e){case"date":return(0,_.jsx)(Bc,{});case"score":return(0,_.jsx)(dK.A,{});default:return null}},hK=(0,y.PA)((({regionStore:e})=>(0,_.jsxs)(Ze.eB,{name:"sort-menu",tag:n_.A,selectedKeys:[e.sort],children:[(0,_.jsx)(n_.A.Item,{children:(0,_.jsxs)(Ze.Sl,{name:"option-inner",onClick:t=>(e.setSort("date"),t.preventDefault(),!1),children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[(0,_.jsx)(Ze.Sl,{name:"icon",tag:"span",children:(0,_.jsx)(uK,{sortKey:"date"})})," ","Date"]}),(0,_.jsx)("span",{children:"date"===e.sort&&("asc"===e.sortOrder?"↓":"↑")})]})},"date"),(0,_.jsx)(n_.A.Item,{children:(0,_.jsxs)(Ze.Sl,{name:"option-inner",onClick:t=>(e.setSort("score"),t.preventDefault(),!1),children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[(0,_.jsx)(Ze.Sl,{name:"icon",tag:"span",children:(0,_.jsx)(uK,{sortKey:"score"})})," ","Score"]}),(0,_.jsx)("span",{children:"score"===e.sort&&("asc"===e.sortOrder?"↓":"↑")})]})},"score")]}))),gK=({value:e,children:t,className:n})=>{const r=p.Children.toArray(t),o=(0,p.useMemo)((()=>r.find((t=>t.props.case===e))||null),[r,e]);return o?(0,p.cloneElement)(o,Object.assign({},o.props,{className:[n,o.props.className].join(" ")})):null},mK=["size","value","defaultValue","onChange","children"],pK=p.createContext(),fK=e=>{let{size:t,value:n,defaultValue:r,onChange:o,children:i}=e,a=(0,Yn.A)(e,mK);const[s,l]=(0,p.useState)(r);return(0,_.jsx)(pK.Provider,{value:{value:null!=n?n:s,onChange:e=>{l(e.target.value),null==o||o(e)},defaultValue:r},children:(0,_.jsx)("div",{className:(0,Ze.cn)("radio-group").mod({size:t}),style:a.style,children:(0,_.jsx)("div",{className:(0,Ze.cn)("radio-group").elem("buttons"),children:i})})})};fK.Button=({value:e,disabled:t,children:n})=>{const{onChange:r,value:o}=p.useContext(pK),i=e===o;return(0,_.jsxs)("label",{className:(0,Ze.cn)("radio-group").elem("button").mod({checked:i,disabled:t}),children:[(0,_.jsx)("input",{className:(0,Ze.cn)("radio-group").elem("input"),type:"radio",value:e,checked:e===o,onChange:r,disabled:t}),n]})};const{Block:vK,Elem:yK}=(0,Ze.JE)();class bK extends p.Component{constructor(e){var t;super(e),this.modalRef=(0,p.createRef)(),this.onClickOutside=e=>{const t=(0,Ze.cn)("modal"),{closeOnClickOutside:n}=this.props,r=this.modalRef.current.contains(e.target),o=t.elem("content").closest(e.target),i=t.elem("close").closest(e.target);(r&&i||null===o&&!1!==n)&&this.hide()},this.state={title:e.title,body:e.body,footer:e.footer,visible:!e.animateAppearance&&(null!=(t=e.visible)&&t),transition:e.visible?"visible":null}}componentDidMount(){this.props.animateAppearance&&setTimeout((()=>this.show()),30)}setBody(e){this.setState({body:e})}show(e){var t=this;return new Promise((n=>{this.setState({visible:!0},(async function(){null==e||e(),null==t.props.onShow||t.props.onShow(),await t.transition("appear",n)}))}))}async hide(e){return new Promise((t=>{this.transition("disappear",(()=>{this.setState({visible:!1},(()=>{var n,r;null==(n=(r=this.props).onHide)||n.call(r),t(),null==e||e()}))}))}))}render(){if(!this.state.visible)return null;const e=this.props.bare,t={fullscreen:!!this.props.fullscreen,bare:this.props.bare,visible:this.props.visible||this.state.visible},n=[this.transitionClass,this.props.className],r=(0,_.jsx)(vK,{name:"modal",ref:this.modalRef,mod:t,mix:n,onClick:this.onClickOutside,children:(0,_.jsx)(yK,{name:"wrapper",children:(0,_.jsxs)(yK,{name:"content",style:this.props.style,children:[!e&&(0,_.jsxs)(bK.Header,{children:[(0,_.jsx)(yK,{name:"title",children:this.state.title}),!1!==this.props.allowClose&&(0,_.jsx)(yK,{tag:za,name:"close",type:"text",style:{color:"0099FF"},icon:(0,_.jsx)(hs,{})})]}),(0,_.jsx)(yK,{name:"body",mod:{bare:e},children:this.body}),this.state.footer&&(0,_.jsx)(bK.Footer,{children:this.state.footer})]})})});return(0,g.createPortal)(r,document.body)}transition(e,t){var n=this;return Jn(this.modalRef.current,{transition:async function(){return new Promise((t=>{n.setState({transition:e},(()=>{t()}))}))},beforeTransition:async function(){return new Promise((t=>{n.setState({transition:`before-${e}`},(()=>{t()}))}))},afterTransition:async function(){return new Promise((r=>{n.setState({transition:"appear"===e?"visible":null},(()=>{null==t||t(),r()}))}))}})}get transitionClass(){switch(this.state.transition){case"before-appear":return"before-appear";case"appear":return"appear before-appear";case"before-disappear":return"before-disappear";case"disappear":return"disappear before-disappear";case"visible":return"visible"}return null}get body(){if(this.state.body){const e=this.state.body;return e instanceof Function?(0,_.jsx)(e,{}):e}return this.props.children}}bK.Header=({children:e,divided:t})=>(0,_.jsx)(yK,{name:"header",mod:{divided:t},children:e}),bK.Footer=({children:e})=>(0,_.jsx)(yK,{name:"footer",children:e});const xK=["okText","onOk","cancelText","onCancel","buttonLook"],wK=["okText","onOkPress"],CK=e=>{const t=(0,p.createRef)(),n=document.createElement("div");n.className=(0,Ze.cn)("modal-holder").toClassName(),document.body.appendChild(n);const r=(e,r)=>{(0,g.render)((0,_.jsx)(bK,Object.assign({ref:t},e,{onHide:()=>{null==e.onHidden||e.onHidden(),n.remove()},animateAppearance:r})),n)};return r(e,!0),{update(t){r(Object.assign({},e,null!=t?t:{}),!1)},close(){t.current.hide()}}},SK=e=>{let{okText:t,onOk:n,cancelText:r,onCancel:o,buttonLook:i}=e,a=(0,Yn.A)(e,xK);const s=CK(Object.assign({},a,{allowClose:!1,footer:(0,_.jsxs)(Fa,{align:"end",children:[(0,_.jsx)(za,{onClick:()=>{null==o||o(),s.close()},size:"compact",autoFocus:!0,children:null!=r?r:"Cancel"}),(0,_.jsx)(za,{onClick:()=>{null==n||n(),s.close()},size:"compact",look:null!=i?i:"primary",children:null!=t?t:"OK"})]})}));return s};Object.assign(bK,{info:e=>{let{okText:t,onOkPress:n}=e,r=(0,Yn.A)(e,wK);const o=CK(Object.assign({},r,{footer:(0,_.jsx)(Fa,{align:"end",children:(0,_.jsx)(za,{onClick:()=>{null==n||n(),o.close()},look:"primary",size:"compact",children:null!=t?t:"OK"})})}));return o},confirm:SK,modal:CK});const jK=(0,y.PA)((({regionStore:e,annotation:t})=>{const{classifications:n,regions:r,view:o}=e,i=r.length+("regions"===o?n.length:0);return(0,_.jsxs)(Ze.eB,{name:"entities",children:[(0,_.jsx)(Ze.Sl,{name:"source",children:(0,_.jsxs)(Fa,{spread:!0,children:[(0,_.jsxs)(fK,{size:"small",value:o,style:{width:240},onChange:t=>{e.setView(t.target.value)},children:[(0,_.jsxs)(fK.Button,{value:"regions",children:["Regions",i?(0,_.jsxs)(Ze.Sl,{name:"counter",children:[" ",i]}):null]}),(0,_.jsx)(fK.Button,{value:"labels",children:"Labels"})]}),t.isReadOnly()&&(0,_.jsx)(ir,{title:"Delete All Regions",children:(0,_.jsx)(za,{look:"danger",type:"text","aria-label":"Delete All Regions",icon:(0,_.jsx)(bs,{}),style:{height:36,width:36,padding:0},onClick:()=>{SK({title:"Removing all regions",body:"Do you want to delete all annotated regions?",buttonLook:"destructive",onOk:()=>t.deleteAllRegions()})}})})]})}),i?(0,_.jsx)(Ze.Sl,{name:"header",children:(0,_.jsxs)(Fa,{spread:!0,align:"regions"===o?null:"end",children:["regions"===o&&(0,_.jsx)(t_.A,{overlay:(0,_.jsx)(hK,{regionStore:e}),placement:"bottomLeft",children:(0,_.jsxs)(Ze.Sl,{name:"sort",onClick:e=>e.preventDefault(),children:[(0,_.jsx)(Ze.Sl,{name:"sort-icon",children:(0,_.jsx)(uK,{sortKey:e.sort})})," ",`Sorted by ${e.sort[0].toUpperCase()}${e.sort.slice(1)}`]})}),(0,_.jsx)(Fa,{size:"small",align:"end",children:r.length>0?(0,_.jsx)(Ze.Sl,{name:"visibility",tag:za,size:"small",type:"link",style:{padding:0},onClick:t=>{t.preventDefault(),t.stopPropagation(),e.toggleVisibility()},mod:{hidden:e.isAllHidden},children:e.isAllHidden?(0,_.jsx)(nc,{}):(0,_.jsx)($l,{})}):null})]})}):null,(0,_.jsxs)(gK,{value:o,children:[(0,_.jsx)(Ze.Sl,{name:"regions",case:"regions",children:i?(0,_.jsx)(iK,{regionStore:e}):(0,_.jsx)(Ze.Sl,{name:"empty",children:"No Regions created yet"})}),(0,_.jsx)(Ze.Sl,{name:"labels",case:"labels",children:i?(0,_.jsx)(cK,{regionStore:e}):(0,_.jsx)(Ze.Sl,{name:"empty",children:"No Labeled Regions created yet"})})]})]})}));var kK=n(98065),OK=n(91846),RK=n(37142),EK=n(29961),_K=n(88841);const AK="block--U6qY7",TK="button--XQcyF",PK="labels--aLxIm",IK="statesblk--aVJvV",LK="row--BJ8uf",MK="long--bEvKZ",KK={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekBlue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",accent:"#617ADA"},DK=({className:e,style:t,size:n,color:r,solid:o=!1,children:i})=>{const a=((e,t)=>{const n=pt()(e);return t?{color:pt().contrast(n,"#fff")>4.5?"#fff":"#000",background:n,"shadow-color":n.darken(.22)}:{color:n,background:n.desaturate(2).brighten(2.2),"shadow-color":n.desaturate(1).brighten(1.22)}})((s=r)?null!=(l=KK[s])?l:s:KK.blue,o);var s,l;const c=Object.entries(a).reduce(((e,[t,n])=>Object.assign({},e,{[`--${t}`]:n})),{}),d=Object.assign({},null!=t?t:{},c);return(0,_.jsx)(Ze.eB,{tag:"span",name:"tag",mod:{size:n},mix:e,style:d,children:i})},{Paragraph:NK,Text:VK}=TE.A,zK=e=>{return e.type.endsWith("labels")?null!=(n=(t=e).selectedLabels)&&n.length?(0,_.jsxs)(VK,{className:PK,children:["Labels: ",t.selectedLabels.map((e=>{const t=e.background||"#000000";return(0,_.jsx)(DK,{color:t,solid:!0,children:e.value},e.id)}))]},t.pid):null:"rating"===e.type?(0,_.jsxs)(NK,{children:["Rating: ",e.mainValue]}):"textarea"!==e.type||e.from_name.perregion&&e.from_name.displaymode===lt.REGION_LIST?"choices"===e.type?(0,_.jsxs)(NK,{children:["Choices: ",e.mainValue.join(", ")]}):null:(0,_.jsxs)(NK,{className:LK,children:[(0,_.jsx)(VK,{children:"Text: "}),(0,_.jsx)(VK,{mark:!0,className:MK,children:e.mainValue.join("\n")})]});var t,n},BK=(0,y.PA)((({store:e,annotation:t})=>{var n;const{highlightedNode:r,selectedRegions:o,selectionSize:i}=t,[a,s]=p.useState(!1),l=[],c=!!o.find((e=>!e.isReadOnly())),d=!!o.find((e=>!e.isReadOnly()&&!e.classification)),u=window.HTX_DEBUG?PO:MO;d&&(l.push((0,_.jsx)(yr.Tooltip,{placement:"topLeft",name:"region:relation",children:(0,_.jsxs)(za,{"aria-label":"Create Relation",className:TK,onClick:()=>{t.startLinkingMode(F,r)},disabled:!r,children:[(0,_.jsx)(OK.A,{}),e.settings.enableHotkeys&&e.settings.enableTooltips&&(0,_.jsx)(ar,{children:"[ alt + r ]"})]})},"relations")),l.push((0,_.jsx)(ir,{placement:"topLeft",title:"Add Meta Information",children:(0,_.jsx)(za,{className:TK,onClick:()=>{s(!0)},disabled:!r,children:(0,_.jsx)(RK.A,{})})},"meta"))),l.push((0,_.jsx)(yr.Tooltip,{placement:"topLeft",name:"region:unselect",children:(0,_.jsxs)(za,{className:TK,type:"dashed",onClick:()=>{t.unselectAll()},children:[(0,_.jsx)(EK.A,{}),(0,_.jsx)(yr.Hint,{name:"region:unselect"})]})},"unselect"));const h=(0,Ze.cn)("entity-states").toClassName(),g=(0,Ze.cn)("entity-buttons").toClassName();return(0,_.jsxs)(Ze.eB,{name:"entity",children:[(0,_.jsxs)(Ze.Sl,{name:"info",tag:Fa,spread:!0,children:[(0,_.jsx)(Ze.Sl,{name:"node",children:r?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(u,{node:r})," (ID: ",r.id,")"]}):`${i} Region${i>1?"s are":" is"} selected`}),!c&&(0,_.jsx)(eK.A,{count:"readonly",style:{backgroundColor:"#ccc"}})]}),(0,_.jsxs)("div",{className:`${IK} ${h}`,children:[(null==r?void 0:r.score)&&(0,_.jsx)(p.Fragment,{children:(0,_.jsxs)(VK,{children:["Score: ",(0,_.jsx)(VK,{underline:!0,children:r.score})]})}),(null==r||null==(n=r.meta)?void 0:n.text)&&(0,_.jsxs)(VK,{children:["Meta: ",(0,_.jsx)(VK,{code:!0,children:r.meta.text})," ",(0,_.jsx)(_K.A,{type:"delete",style:{cursor:"pointer"},onClick:()=>{r.deleteMetaText()}})]}),(0,_.jsx)(p.Fragment,{children:null==r?void 0:r.results.map(zK)})]}),(null==r?void 0:r.isDrawing)&&(0,_.jsxs)(Ze.Sl,{name:"warning",children:[(0,_.jsx)(Nd,{}),(0,_.jsxs)(Ze.Sl,{name:"warning-text",children:["Incomplete ",r.type.replace("region","")]})]}),(0,_.jsx)("div",{className:`${AK} ${g}`,children:(0,_.jsxs)(Fa,{spread:!0,children:[(0,_.jsx)(Fa,{children:l}),c&&(0,_.jsx)(yr.Tooltip,{placement:"topLeft",name:"region:delete",children:(0,_.jsxs)(za,{look:"danger",className:TK,onClick:()=>{t.deleteSelectedRegions()},children:[(0,_.jsx)(_K.A,{}),(0,_.jsx)(yr.Hint,{name:"region:delete"})]})})]})}),a&&(0,_.jsxs)(kK.A,{style:{marginTop:"0.5em",marginBottom:"0.5em"},onFinish:()=>{r.setMetaText(r.normInput),s(!1)},children:[(0,_.jsx)(RM.A,{autoFocus:!0,onChange:e=>{const{value:t}=e.target;r.setNormInput(t)},style:{marginBottom:"0.5em"},placeholder:"Meta Information"}),(0,_.jsx)(za,{type:"primary",htmlType:"submit",style:{marginRight:"0.5em"},children:"Add"}),(0,_.jsx)(za,{type:"danger",htmlType:"reset",onClick:e=>(s(!1),e.preventDefault(),!1),children:"Cancel"})]})]})}));var HK=n(79834),FK=n(37720),WK=n(72992),$K=n(74383);const UK={list:"list--FAmTd",item:"item--MfWOD",selected:"selected--qI1ER",block:"block--Z1yxd",relationbtn:"relationbtn--Z2zT9",header:"header--mDSME",section:"section--htmcU",section__blocks:"section__blocks--iGtwJ",uihidden:"uihidden--W82jq",uivisible:"uivisible--UrLqJ"};var ZK=n(38451),GK=n(9099);const{Option:YK}=Zn.A,XK=(0,y.PA)((({rl:e})=>{const t=e.relations,n=t.getSelected().map((e=>e.value));return(0,_.jsxs)("div",{style:{marginTop:"10px"},children:[(0,_.jsx)("h4",{className:UK.header,children:"LABELS"}),(0,_.jsx)(Zn.A,{mode:"multiple"===t.choice?"multiple":"",style:{width:"100%"},placeholder:"Please select",defaultValue:n,onChange:e=>{const n=(0,w.wrapArray)(e);t.unselectAll(),n.forEach((e=>t.findRelation(e).setSelected(!0)))},children:t.children.map((e=>(0,_.jsx)(YK,{style:{background:e.background},children:e.value},e.value)))})]})})),qK=(0,y.PA)((({rl:e})=>{if(!(0,h.aF)((()=>e.node1))||!(0,h.aF)((()=>e.node2)))return null;const t={left:(0,_.jsx)(HK.A,{}),right:(0,_.jsx)(FK.A,{}),bi:(0,_.jsx)(WK.A,{})};return(0,_.jsx)("div",{children:(0,_.jsxs)("div",{className:UK.section__blocks,children:[(0,_.jsx)("div",{children:(0,_.jsx)(MO,{node:e.node1})}),(0,_.jsx)(jr.A,{onClick:()=>e.rotateDirection(),size:"small",className:UK.relationbtn,children:t[e.direction]}),(0,_.jsx)("div",{children:(0,_.jsx)(MO,{node:e.node2})})]})})})),JK=(0,y.PA)((({item:e})=>{const t=(0,h.Zn)(e).annotationStore.selected.highlightedNode,n=t===e.node1||t===e.node2;return(0,_.jsxs)(tK.Ay.Item,{className:n&&UK.selected,actions:[],onMouseEnter:()=>{e.toggleHighlight(),e.setSelfHighlight(!0)},onMouseLeave:()=>{e.toggleHighlight(),e.setSelfHighlight(!1)},children:[(0,_.jsxs)("div",{className:UK.item,children:[(0,_.jsx)("div",{children:(0,_.jsx)(qK,{rl:e})}),(0,_.jsxs)("div",{children:[e.hasRelations&&(0,_.jsx)(jr.A,{size:"small",onClick:()=>{e.toggleMeta()},className:UK.button,children:(0,_.jsx)($K.A,{})})," ",(0,_.jsx)(jr.A,{size:"small",className:UK.button,onClick:()=>(e.node1.setHighlight(!1),e.node2.setHighlight(!1),e.parent.deleteRelation(e),!1),danger:!0,children:(0,_.jsx)(_K.A,{})})]})]}),e.showMeta&&(0,_.jsx)(XK,{rl:e})]},e.id)})),QK=(0,y.PA)((({store:e})=>{const t=e.annotationStore.selected,{relations:n}=t.relationStore,r=n.length>0,o=t.relationStore.showConnections;return(0,_.jsxs)(Ze.eB,{name:"relations",children:[(0,_.jsxs)(Ze.Sl,{name:"header",children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:["Relations (",n.length,")"]}),r&&(0,_.jsx)(jr.A,{size:"small",type:"link",icon:o?(0,_.jsx)(ZK.A,{}):(0,_.jsx)(GK.A,{}),onClick:()=>t.relationStore.toggleConnections(),className:[o?UK.uihidden:UK.uivisible,Fn]})]}),(0,_.jsx)(Ze.Sl,{name:"content",children:r?(0,_.jsx)(tK.Ay,{size:"small",bordered:!0,itemLayout:"vertical",className:UK.list,dataSource:t.relationStore.relations,renderItem:e=>(0,_.jsx)(JK,{item:e})}):(0,_.jsx)("p",{children:"No Relations added yet"})})]})})),eD=QK;var tD,nD=["title","titleId"];function rD(){return rD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iD=function(e,t){var n=e.title,r=e.titleId,o=oD(e,nD);return p.createElement("svg",rD({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,tD||(tD=p.createElement("path",{d:"M3.51 6.03L11.02 9.25L3.5 8.25L3.51 6.03ZM11.01 14.75L3.5 17.97V15.75L11.01 14.75ZM1.51 3L1.5 10L16.5 12L1.5 14L1.51 21L22.5 12L1.51 3Z",fill:"currentColor"})))},aD=(0,p.forwardRef)(iD);n.p;function sD(...e){const t=e.filter(Boolean);return t.length<=1?t[0]:e=>{t.forEach((t=>{"function"==typeof t?t(e):t.current=e}))}}const lD=["ref","actionRef","onChange","onInput","onSubmit","value","autoSize","rows","maxRows","className"],cD=e=>{let{ref:t,actionRef:n,onChange:r,onInput:o,onSubmit:i,value:a,autoSize:s=!0,rows:l=1,maxRows:c=4,className:d}=e,u=(0,Yn.A)(e,lD);const h=!!i,g=[(0,Ze.cn)("textarea").mod({inline:h,autosize:s}),d].join(" ").trim(),m=(0,p.useRef)({rows:l,maxRows:Math.max(c-1,1),lineHeight:24,maxHeight:Number.POSITIVE_INFINITY}),f=(0,p.useRef)(null),v=(0,p.useCallback)((0,KC.debounce)((()=>{const e=f.current;if(!e||!m.current||!f.current)return;if(m.current.maxHeight===Number.POSITIVE_INFINITY){e.style.height="auto";const t=f.current.value;f.current.value="",m.current.lineHeight=f.current.scrollHeight/m.current.rows,m.current.maxHeight=m.current.lineHeight*m.current.maxRows,f.current.value=t}let t;e.scrollHeight>m.current.maxHeight?(e.style.overflowY="scroll",t=m.current.maxHeight):(e.style.overflowY="hidden",e.style.height="auto",t=e.scrollHeight);const n=e.value.length,r=e.selectionStart;requestAnimationFrame((()=>{e.style.height=`${t}px`,n===r&&(e.scrollTop=e.scrollHeight)}))}),10,{leading:!0}),[]);n&&(n.current={update:(e="")=>{f.current&&(f.current.value=e,v())},el:f});const y=(0,p.useCallback)((e=>{null==o||o(e.target.value),v()}),[o]),b=(0,p.useCallback)((e=>{null==r||r(e.target.value),v()}),[r]);return(0,p.useEffect)((()=>{const e=new ResizeObserver(v);return e.observe(f.current),()=>{f.current&&e.unobserve(f.current)}}),[]),(0,p.useEffect)((()=>{f.current&&(f.current.value=a||"",v())}),[a]),(0,p.useEffect)((()=>{if(!i)return;const e=e=>{f.current&&"Enter"===e.key&&(e.ctrlKey||(0,w.isMacOS)()&&e.metaKey)&&i(f.current.value)};return f.current&&f.current.addEventListener("keydown",e),()=>{f.current&&f.current.removeEventListener("keydown",e)}}),[i]),(0,_.jsx)("textarea",Object.assign({ref:sD(f,t),className:g,rows:m.current.rows,onChange:b,onInput:y},u))},dD=(0,y.PA)((({commentStore:e,annotationStore:t,inline:n=!0,onChange:r,rows:o=1,maxRows:i=4})=>{const a=(0,p.useRef)(null),s=(0,p.useRef)({}),l=()=>e.setTooltipMessage(""),c=(0,p.useCallback)((async t=>{if(null==t||null==t.preventDefault||t.preventDefault(),!a.current||"addComment"===e.loading)return;const n=new FormData(a.current).get("comment");if(n.trim())try{null==s.current.update||s.current.update(""),await e.addComment(n)}catch(e){null==s.current.update||s.current.update(n||""),console.error(e)}}),[e]),d=(0,p.useCallback)((t=>{e.setCurrentComment(t||"")}),[e]);(0,p.useEffect)((()=>((0,O.VS)(O.bA)||(e.setAddedCommentThisSession(!1),l()),()=>l())),[]),(0,p.useEffect)((()=>{var t;(0,O.VS)(O.bA)&&(e.tooltipMessage&&(null==(t=s.current)||null==(t=t.el)||null==(t=t.current)||t.focus({preventScroll:!0})))}),[e.tooltipMessage]),(0,p.useEffect)((()=>{e.setInputRef(s.current.el),e.setCommentFormSubmit((()=>c()))}),[s,e]);const u=e.currentComment[t.selected.id]||"";return(0,_.jsxs)(Ze.eB,{ref:a,tag:"form",name:"comment-form",mod:{inline:n},onSubmit:c,children:[(0,_.jsx)(cD,{actionRef:s,name:"comment",placeholder:"Add a comment",value:u,rows:o,maxRows:i,onChange:r,onInput:d,onSubmit:n?c:void 0,onBlur:l}),(0,_.jsx)(Ze.Sl,{tag:"div",name:"primary-action",children:(0,_.jsx)("button",{type:"submit",children:(0,_.jsx)(aD,{})})}),e.tooltipMessage&&(0,_.jsx)(Ze.Sl,{name:"tooltipMessage",children:e.tooltipMessage})]})})),uD=(0,y.PA)((({item:e})=>{const{type:t}=null!=e?e:{};if(!t)return"No Label";if(t.includes("label"))return e.value;if(t.includes("region")||t.includes("range")){const t=e.labelings.map((e=>e.selectedLabels||[])),n=[].concat(...t);return(0,_.jsx)(Ze.eB,{name:"labels-list",children:n.map(((e,t)=>{const n=e.background||"#000000";return[t?", ":null,(0,_.jsx)(Ze.Sl,{style:{color:n},children:e.value||"No label"},e.id)]}))})}return t.includes("tool")?e.value:void 0})),hD=({linking:e,region:t,result:n,onUnlink:r,interactive:o})=>{const i=e||t,a=(0,p.useMemo)((()=>e?{action:!0}:t?{display:!0}:void 0),[e,t]);return i?(0,_.jsxs)(Ze.eB,{tag:"div",name:"link-state",mod:a,children:[(0,_.jsx)(Ze.Sl,{tag:"div",name:"prefix",children:(0,_.jsx)(dC,{})}),(null==a?void 0:a.action)&&"Select an object to link it to this comment.",(null==a?void 0:a.display)&&(0,_.jsx)(gD,{region:t,result:n,onUnlink:r,interactive:o})]}):null},gD=(0,y.PA)((({region:e,result:t,interactive:n,onUnlink:r})=>{var o;const i=null!=(o=null==e?void 0:e.background)?o:null==e||null==e.getOneColor?void 0:e.getOneColor(),a=e.classification,{mouseEnterHandler:s,mouseLeaveHandler:l,clickHandler:c}=(0,p.useMemo)((()=>{if(!n)return{};return{mouseEnterHandler:()=>{null==e||null==e.setHighlight||e.setHighlight(!0)},mouseLeaveHandler:()=>{null==e||null==e.setHighlight||e.setHighlight(!1)},clickHandler:()=>{if(e.classification)return null;e.annotation.selectArea(e)}}}),[n,e]),d=(0,p.useMemo)((()=>{const e=pt()(null!=i?i:"#666").alpha(1);return{"--icon-color":e.css(),"--text-color":e.css()}}),[i]);return(0,_.jsxs)(Ze.eB,{name:"link-state-region",mod:{interactive:n},style:d,onMouseEnter:s,onMouseLeave:l,onClick:c,children:[!a&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(LO,{node:e})}),(0,_.jsx)(Ze.Sl,{name:"index",children:e.region_index})]}),t?(0,_.jsx)(Ze.Sl,{name:"title",children:(0,_.jsx)(mD,{result:t})}):(0,_.jsxs)(Ze.Sl,{name:"title",children:[(0,_.jsx)(Ze.Sl,{name:"label",children:(0,_.jsx)(uD,{item:e})}),(null==e?void 0:e.text)&&(0,_.jsx)(Ze.Sl,{name:"text",children:e.text.replace(/\\n/g,"\n")})]}),r&&(0,_.jsx)(Ze.Sl,{name:"close",children:(0,_.jsx)(jr.A,{size:"small",type:"text",icon:(0,_.jsx)(Zc,{}),onClick:r})})]})})),mD=(0,y.PA)((({result:e})=>{const{from_name:t,type:n,mainValue:r}=e,{name:o}=t;if("textarea"===n)return[o,r.join(" | ")].join(": ");if("choices"===n)return[o,r.join(", ")].join(": ");if("taxonomy"===n){return[o,r.map((e=>e.join("/"))).join(", ")].join(": ")}return[o,String(r)].join(": ")})),pD=({region:e,linking:t,onLinkTo:n})=>(0,_.jsx)(Ze.eB,{name:"comment-form-buttons",children:(0,_.jsxs)(Ze.Sl,{name:"buttons",children:[n&&!e&&(0,_.jsx)(ir,{title:"Link to...",mouseEnterDelay:.8,children:(0,_.jsx)(Ze.Sl,{name:"action",tag:"button",mod:{highlight:t},onClick:n,children:(0,_.jsx)(dC,{})})}),(0,_.jsx)(Ze.Sl,{name:"action",tag:"button",type:"submit",children:(0,_.jsx)(aD,{})})]})}),fD=(0,y.PA)((({commentStore:e,annotationStore:t,inline:n=!0})=>{var r;const o=(0,p.useRef)(null),i=(0,p.useRef)({}),a=()=>e.setTooltipMessage(""),s=t.selected&&t.selected.linkingMode===W,[l,c]=(0,p.useState)(),d=(0,p.useCallback)(((t=!0)=>{let n=e.commentInProgress;return!n&&t&&(n=iP.create({text:""},{annotationStore:e.annotationStore}),e.setCurrentComment(n)),n}),[e]),u=(0,p.useCallback)((e=>{d().setText(e)}),[e,t]),h=(0,p.useCallback)((e=>{null==e||null==e.preventDefault||e.preventDefault();if(t.selected&&t.selected.linkingMode===W)return void t.selected.stopLinkingMode();const n=d();c(n),t.selected.startLinkingMode(W,n)}),[e,t]),g=(0,p.useCallback)((async t=>{if(null==t||null==t.preventDefault||t.preventDefault(),!o.current||"addComment"===e.loading)return;const n=d(!1),r=null==n?void 0:n.text,i=null==n?void 0:n.regionRef,a=null==n?void 0:n.classifications;if(r.trim()||a)try{e.setCurrentComment(void 0);const t={text:r,regionRef:i,classifications:a};await e.addComment(t)}catch(t){e.setCurrentComment(n),console.error(t)}}),[e,t]);(0,p.useEffect)((()=>((0,O.VS)(O.bA)||(e.setAddedCommentThisSession(!1),a()),()=>a())),[]),(0,p.useEffect)((()=>{var t;(0,O.VS)(O.bA)&&(e.tooltipMessage&&(null==(t=i.current)||null==(t=t.el)||null==(t=t.current)||t.focus({preventScroll:!0})))}),[e.tooltipMessage]),(0,p.useEffect)((()=>{var t;e.setInputRef(null==(t=i.current)?void 0:t.el),e.setCommentFormSubmit((()=>g()))}),[i,e]);const m=null==(r=t.selected.currentLinkingMode)?void 0:r.comment,f=d(),{text:v="",regionRef:y,classifications:b}=f||{},{region:x,result:w}=y||{},C=!!l&&m===l&&s,S=C||x,j=(0,p.useMemo)((()=>{var e;return eP(null==b||null==(e=b.default)?void 0:e.values)}),[b]),k=e.commentClassificationsItems,R=(0,p.useCallback)((e=>{d().setClassifications(e)}),[d]),E=(0,p.useCallback)((async(e,t)=>{const n=t.length>0?{default:{type:"taxonomy",values:t}}:null;R(n)}),[R]);return(0,_.jsxs)(Ze.eB,{ref:o,tag:"form",name:"comment-form-new",mod:{inline:n,linked:!!x},onSubmit:g,children:[(0,_.jsxs)(Ze.Sl,{name:"text-row",children:[(0,_.jsx)(cD,{actionRef:i,name:"comment",placeholder:"Add a comment",value:v,rows:1,maxRows:4,onInput:u,onSubmit:n?g:void 0,onBlur:a}),0===k.length&&(0,_.jsx)(pD,{region:x,linking:C,onLinkTo:h})]}),k.length>0&&(0,_.jsxs)(Ze.Sl,{name:"classifications-row",children:[(0,_.jsx)(Ze.Sl,{name:"category-selector",children:(0,_.jsx)(jI,{selected:j,items:k,onChange:E,options:tP,defaultSearch:!1})}),(0,_.jsx)(pD,{region:x,linking:C,onLinkTo:h})]}),S&&(0,_.jsx)(Ze.Sl,{name:"link-state",children:(0,_.jsx)(hD,{linking:C,region:x,result:w,onUnlink:null==f?void 0:f.unsetLink})}),e.tooltipMessage&&(0,_.jsx)(Ze.Sl,{name:"tooltipMessage",children:e.tooltipMessage})]})})),vD=(0,y.PA)((({value:e="",inline:t=!0,onChange:n,onSubmit:r,onBlur:o,rows:i=1,maxRows:a=4,classifications:s})=>{const l=(0,p.useRef)(null),c=(0,p.useRef)({}),d=(0,p.useCallback)((async e=>{var t;if(null==e||null==e.preventDefault||e.preventDefault(),!l.current)return;const n=null==(t=new FormData(l.current).get("comment"))?void 0:t.trim();(n||s)&&(null==r||r(n))}),[r]),u=(0,p.useCallback)((e=>{null==n||n(e||"")}),[n]);return(0,_.jsxs)(Ze.eB,{ref:l,tag:"form",name:"comment-form",mod:{inline:t},onSubmit:d,children:[(0,_.jsx)(cD,{actionRef:c,name:"comment",placeholder:"Add a comment",value:e,rows:i,maxRows:a,onChange:n,onInput:u,onSubmit:e=>{t&&(e=e.trim())&&(null==r||r(e))},onBlur:e=>null==o?void 0:o(e)}),(0,_.jsx)(Ze.Sl,{tag:"div",name:"primary-action",children:(0,_.jsx)("button",{type:"submit",children:(0,_.jsx)(aD,{})})})]})})),yD=(0,y.PA)((({comment:{updatedAt:e,isEditMode:t,isConfirmDelete:n,createdAt:r,isPersisted:o,isDeleted:i,createdBy:a,text:s,isResolved:l,updateComment:c,deleteComment:d,setConfirmMode:u,setEditMode:h,toggleResolve:g,canResolveAny:m},listComments:f})=>{var v;const y=null==(v=window.APP_SETTINGS)?void 0:v.user,b=(null==y?void 0:y.id)===a.id,[x,C]=(0,p.useState)(s);if(i)return null;const S=()=>{const t=new Date(e),n=new Date(r);t.setMilliseconds(0),n.setMilliseconds(0);const i=t>n,a=i?e:r;return o&&a?(0,_.jsx)(Ze.Sl,{name:"date",children:(0,_.jsx)(zM.A,{placement:"topRight",title:new Date(a).toLocaleString(),children:`${i?"updated":""} ${(0,w.humanDateDiff)(a)}`})}):null};return(0,_.jsxs)(Ze.eB,{name:"comment-item",mod:{resolved:l},children:[(0,_.jsxs)(Fa,{spread:!0,size:"medium",truncated:!0,children:[(0,_.jsxs)(Fa,{size:"small",truncated:!0,children:[(0,_.jsx)(Ze.Sl,{tag:FM,user:a,name:"userpic",showUsername:!0,username:a}),(0,_.jsx)(Ze.Sl,{name:"name",tag:"span",children:(0,w.userDisplayName)(a)})]}),(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"resolved",component:cu}),(0,_.jsx)(Ze.Sl,{name:"saving",mod:{hide:o},children:(0,_.jsx)(Ze.Sl,{name:"dot"})}),(0,_.jsx)(S,{})]})]}),(0,_.jsxs)(Ze.Sl,{name:"content",children:[(0,_.jsx)(Ze.Sl,{name:"text",children:t?(0,_.jsx)(vD,{value:x,onSubmit:async e=>{await c(e),C(e),await f({suppressClearComments:!0})}}):n?(0,_.jsxs)(Ze.Sl,{name:"confirmForm",children:[(0,_.jsx)(Ze.Sl,{name:"question",children:"Are you sure?"}),(0,_.jsxs)(Ze.Sl,{name:"controls",children:[(0,_.jsx)(za,{onClick:()=>d(),size:"compact",look:"danger",autoFocus:!0,children:"Yes"}),(0,_.jsx)(za,{onClick:()=>u(!1),size:"compact",children:"No"})]})]}):(0,_.jsx)(_.Fragment,{children:x})}),(0,_.jsx)(Ze.Sl,{name:"actions",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:o&&(b||m)&&(0,_.jsx)(Q_.Trigger,{content:(0,_.jsxs)(wT,{size:"auto",children:[(0,_.jsx)(wT.Item,{onClick:g,children:l?"Unresolve":"Resolve"}),b&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(wT.Item,{onClick:()=>{const e=!t;h(e),e||C(s)},children:t?"Cancel edit":"Edit"}),!n&&(0,_.jsx)(wT.Item,{onClick:()=>{u(!0)},children:"Delete"})]})]}),children:(0,_.jsx)(za,{size:"small",type:"text",icon:(0,_.jsx)(Pd,{})})})})]})]})})),bD=(0,y.PA)((({commentStore:e})=>(0,_.jsx)(Ze.eB,{name:"comments-list",children:e.comments.map((t=>(0,_.jsx)(yD,{comment:t,listComments:e.listComments},t.id)))}))),xD=(0,y.PA)((({comment:e,listComments:t,classificationsItems:n})=>{var r,o,i;const{classifications:a,updatedAt:s,isEditMode:l,isConfirmDelete:c,createdAt:d,isPersisted:u,isDeleted:h,createdBy:g,text:m,regionRef:f,isResolved:v,updateComment:y,deleteComment:b,setConfirmMode:x,setClassifications:C,setEditMode:S,toggleResolve:j,canResolveAny:k,isHighlighted:O,setHighlighted:R,_commentRef:E}=e,{startLinkingMode:A,currentComment:T,globalLinking:P}=(0,p.useContext)(wD),I=null==(r=window.APP_SETTINGS)?void 0:r.user,L=(null==I?void 0:I.id)===g.id,[M,K]=(0,p.useState)(m),[D,N]=(0,p.useState)(),V=null==f?void 0:f.region,z=null==f?void 0:f.result,B=!(!D||T!==D||!P),H=B||V,F=(0,p.useCallback)((e=>{N(e),A(e)}),[A]),W=(0,p.useCallback)((()=>{null!=f&&f.region?e.unsetLink():F(e)}),[e,F,null==f?void 0:f.region]),$=(0,p.useCallback)((async(e,t)=>{const n=t.length>0?{default:{type:"taxonomy",values:t}}:null;C(n)}),[C]),U=(0,p.useMemo)((()=>{var e;return eP(null==a||null==(e=a.default)?void 0:e.values)}),[a]),Z=(0,p.useCallback)((async e=>{await y(e,a),K(e),await t({suppressClearComments:!0})}),[y,t,a]);if(h)return null;const G=()=>{const e=new Date(s),t=new Date(d);e.setMilliseconds(0),t.setMilliseconds(0);const n=e>t,r=n?s:d;return u&&r?(0,_.jsx)(Ze.Sl,{name:"date",children:(0,_.jsx)(zM.A,{placement:"topRight",title:new Date(r).toLocaleString(),children:`${n?"updated":""} ${(0,w.humanDateDiff)(r)}`})}):null};return(0,_.jsxs)(Ze.eB,{name:"comment-item",mod:{resolved:v,highlighted:O},onMouseEnter:()=>{R(!0)},onMouseLeave:()=>{R(!1)},ref:E,children:[(0,_.jsxs)(Fa,{spread:!0,size:"medium",truncated:!0,children:[(0,_.jsxs)(Fa,{size:"small",truncated:!0,children:[(0,_.jsx)(Ze.Sl,{tag:FM,user:g,name:"userpic",showUsername:!0,username:g}),(0,_.jsx)(Ze.Sl,{name:"name",tag:"span",children:(0,w.userDisplayName)(g)})]}),(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"resolved",component:cu}),(0,_.jsx)(Ze.Sl,{name:"saving",mod:{hide:u},children:(0,_.jsx)(Ze.Sl,{name:"dot"})}),(0,_.jsx)(G,{})]})]}),(0,_.jsxs)(Ze.Sl,{name:"content",children:[(0,_.jsx)(Ze.Sl,{name:"text",children:l?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(vD,{value:M,onSubmit:Z,classifications:a}),n.length>0&&(0,_.jsx)(Ze.Sl,{name:"classifications-row",children:(0,_.jsx)(jI,{selected:U,items:n,onChange:$,options:tP,defaultSearch:!1})})]}):c?(0,_.jsxs)(Ze.Sl,{name:"confirmForm",children:[(0,_.jsx)(Ze.Sl,{name:"question",children:"Are you sure?"}),(0,_.jsxs)(Ze.Sl,{name:"controls",children:[(0,_.jsx)(za,{onClick:()=>b(),size:"compact",look:"danger",autoFocus:!0,children:"Yes"}),(0,_.jsx)(za,{onClick:()=>x(!1),size:"compact",children:"No"})]})]}):(0,_.jsxs)(_.Fragment,{children:[(null==a||null==(o=a.default)||null==(o=o.values)?void 0:o.length)>0&&(0,_.jsx)(Ze.Sl,{name:"classifications",tag:"ul",children:null==a||null==(i=a.default)||null==(i=i.values)?void 0:i.map(((e,t)=>(0,_.jsx)("li",{children:e.join("/")},t)))}),M,H&&(0,_.jsx)(Ze.Sl,{name:"linkState",children:(0,_.jsx)(hD,{linking:B,region:V,result:z,interactive:!0})})]})}),(0,_.jsx)(Ze.Sl,{name:"actions",onClick:e=>{e.stopPropagation(),e.preventDefault()},children:u&&(L||k)&&(0,_.jsx)(Q_.Trigger,{content:(0,_.jsxs)(wT,{size:"auto",children:[(0,_.jsx)(wT.Item,{onClick:j,children:v?"Unresolve":"Resolve"}),L&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(wT.Item,{onClick:()=>{const e=!l;S(e),e||K(m)},children:l?"Cancel edit":"Edit"}),(0,_.jsx)(wT.Item,{onClick:W,children:null!=f&&f.region?"Unlink":"Link to..."}),!c&&(0,_.jsx)(wT.Item,{onClick:()=>{x(!0)},children:"Delete"})]})]}),children:(0,_.jsx)(za,{size:"small",type:"text",icon:(0,_.jsx)(Pd,{})})})})]})]})})),wD=(0,p.createContext)({startLinkingMode:()=>{},globalLinking:!1,currentComment:null}),CD=(0,y.PA)((({commentStore:e})=>{var t,n;const r=(0,p.useCallback)((t=>{e.annotation.startLinkingMode(W,t)}),[e]),o=(null==(t=e.annotation)?void 0:t.linkingMode)===W,i=null==(n=e.annotation.currentLinkingMode)?void 0:n.comment,a=(0,p.useMemo)((()=>({startLinkingMode:r,currentComment:i,globalLinking:o})),[r,i,o]);return(0,_.jsx)(wD.Provider,{value:a,children:(0,_.jsx)(SD,{commentStore:e})})})),SD=(0,y.PA)((({commentStore:e})=>(0,_.jsx)(Ze.eB,{name:"comments-list",children:e.comments.map((t=>(0,_.jsx)(xD,{comment:t,listComments:e.listComments,classificationsItems:e.commentClassificationsItems},t.id)))}))),jD=(0,O.VS)(O.v1),kD=jD?fD:dD,OD=jD?CD:bD,RD=(0,y.PA)((({annotationStore:e,commentStore:t,cacheKey:n})=>{const r=N();return(0,p.useEffect)((()=>{(async()=>{const e={mounted:r};jD&&(e.suppressClearComments=t.isRelevantList),await t.listComments(e),(0,O.VS)(O.K3)||t.restoreCommentsFromCache(n)})()}),[t.annotation.id]),(0,p.useEffect)((()=>{const e=e=>(t.hasUnsaved&&(e.returnValue="You have unpersisted comments which will be lost if continuing."),e);return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[t.hasUnsaved]),(0,_.jsxs)(Ze.eB,{name:"comments",children:[(0,_.jsx)(kD,{commentStore:t,annotationStore:e,inline:!0}),(0,_.jsx)(OD,{commentStore:t})]})})),ED=(0,y.PA)((({store:e})=>{var t;const n=e.annotationStore,r=null!=(t=n.selectedHistory)?t:n.selected,{selectionSize:o}=r||{},i=e.hasSegmentation;return(0,_.jsxs)(_.Fragment,{children:[e.hasInterface("annotations:current")&&(0,_.jsx)(qM,{entity:n.selected,showControls:e.hasInterface("controls"),canDelete:e.hasInterface("annotations:delete"),showHistory:e.hasInterface("annotations:history"),showGroundTruth:e.hasInterface("ground-truth")}),o?(0,_.jsx)(BK,{store:e,annotation:r}):i?(0,_.jsx)("p",{style:{marginTop:12,marginBottom:0,paddingInline:15},children:"No Region selected"}):null,i&&(0,_.jsx)(jK,{store:e,annotation:r,regionStore:r.regionStore}),i&&(0,_.jsx)(eD,{store:e,item:r}),e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,_.jsxs)(Ze.eB,{name:"comments-section",children:[(0,_.jsx)(Ze.Sl,{name:"header",children:(0,_.jsx)(Ze.Sl,{name:"title",children:"Comments"})}),(0,_.jsx)(Ze.Sl,{name:"content",children:(0,_.jsx)(RD,{annotationStore:n,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})]})]})})),_D=(0,y.PA)((({entity:e})=>{const{history:t}=e;return(0,_.jsxs)(Ze.eB,{name:"history-buttons",children:[(0,_.jsx)(ir,{title:"Undo",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Undo",disabled:!(null!=t&&t.canUndo),onClick:()=>e.undo(),icon:(0,_.jsx)(Qa,{})})}),(0,_.jsx)(ir,{title:"Redo",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Redo",disabled:!(null!=t&&t.canRedo),onClick:()=>e.redo(),icon:(0,_.jsx)(as,{})})}),(0,_.jsx)(ir,{title:"Reset",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Reset",disabled:!(null!=t&&t.canUndo),onClick:()=>null==t?void 0:t.reset(),icon:(0,_.jsx)(hs,{})})})]})})),AD=(0,y.WQ)("store")((0,y.PA)((({store:e})=>{const t=e.hasInterface("auto-annotation")&&!e.forceAutoAnnotation;return(0,p.useEffect)((()=>{t||e.setAutoAnnotation(!1)}),[t]),t?(0,_.jsx)(Ze.eB,{name:"dynamic-preannotations",children:(0,_.jsx)(Ze.Sl,{name:"wrapper",children:(0,_.jsx)(Fa,{spread:!0,children:(0,_.jsx)(gA,{checked:e.autoAnnotation,onChange:t=>{const n=t.target.checked;e.setAutoAnnotation(n),n||RR.allInstances().forEach((e=>e.selectDefault()))},label:"Auto-Annotation",style:{color:"#7F64FF"}})})})}):null}))),TD=(0,y.WQ)((({store:e})=>{var t;const n=null==(t=e.annotationStore)?void 0:t.selected;return{store:e,annotation:n,suggestions:null==n?void 0:n.suggestions}})),PD=TD((0,y.PA)((({store:e,annotation:t,suggestions:n})=>{if(!e.autoAnnotation)return null;const r=t.hasSuggestionsSupport&&!e.forceAutoAcceptSuggestions,o=e.awaitingSuggestions;return(0,_.jsxs)(Ze.eB,{name:"auto-accept",children:[r&&(0,_.jsx)(Ze.Sl,{name:"wrapper",mod:{loading:o},children:(0,_.jsx)(Fa,{spread:!0,children:n.size>0?(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsxs)(Ze.Sl,{name:"info",children:[n.size," suggestion",n.size>0&&"s"]}),(0,_.jsx)(Ze.Sl,{name:"action",tag:za,mod:{type:"reject"},onClick:()=>t.rejectAllSuggestions(),children:(0,_.jsx)(pu,{})}),(0,_.jsx)(Ze.Sl,{name:"action",tag:za,mod:{type:"accept"},onClick:()=>t.acceptAllSuggestions(),children:(0,_.jsx)(cu,{})})]}):(0,_.jsx)(gA,{checked:e.autoAcceptSuggestions,onChange:t=>e.setAutoAcceptSuggestions(t.target.checked),label:"Auto-Accept Suggestions",style:{color:"#7F64FF"}})})}),o&&(0,_.jsx)(Ze.Sl,{name:"spinner"})]})}))),{Block:ID,Elem:LD}=(0,Ze.JE)(),MD=(0,y.PA)((({entity:e,disabled:t=!1,size:n="md"})=>{const r=e.ground_truth?"Unset this result as a ground truth":"Set this result as a ground truth";return!e.skipped&&!e.userGenerate&&"prediction"!==e.type&&(0,_.jsx)(ID,{name:"ground-truth",mod:{disabled:t,size:n},children:(0,_.jsx)(ir,{placement:"topLeft",title:r,children:(0,_.jsx)(LD,{tag:za,name:"toggle",size:"small",type:"link",onClick:t=>{t.preventDefault(),e.setGroundTruth(!e.ground_truth)},children:(0,_.jsx)(LD,{name:"indicator",tag:(0,O.VS)(O.bA)&&!e.ground_truth?Tl:kl,mod:{active:e.ground_truth,dark:(0,O.VS)(O.bA)}})})})})})),KD=({store:e})=>{const t=e.annotationStore,n=t.selected,r="prediction"===(null==n?void 0:n.type),o=!0===t.viewingAll;return(0,_.jsxs)(Ze.Sl,{name:"section",children:[!r&&!o&&e.hasInterface("edit-history")&&(0,_.jsx)(_D,{entity:n}),e.description&&e.hasInterface("instruction")&&(0,_.jsx)(ir,{placement:"topLeft",title:"Show instructions",children:(0,_.jsx)(za,{icon:(0,_.jsx)(mp,{style:{width:20,height:20}}),type:"text","aria-label":"Instructions",onClick:()=>e.toggleDescription(),style:{height:36,width:36,padding:0}})}),(0,_.jsx)(ir,{placement:"topLeft",title:"Settings",children:(0,_.jsx)(za,{icon:(0,_.jsx)(bl,{}),type:"text","aria-label":"Settings",onClick:()=>e.toggleSettings(),style:{height:36,width:36,padding:0}})}),e.hasInterface("ground-truth")&&(0,_.jsx)(MD,{entity:n}),!o&&(0,_.jsxs)(Ze.Sl,{name:"section",children:[(0,_.jsx)(AD,{}),(0,_.jsx)(PD,{})]})]})};function DD(e){const t=(0,y.WQ)((({store:e})=>{var t;return{store:e,history:null==e||null==(t=e.annotationStore)||null==(t=t.selected)?void 0:t.history}}))(e);return t}const ND=DD((0,y.PA)((({store:e,title:t,children:n})=>(0,_.jsx)(ir,{title:t,enabled:e.settings.enableTooltips,mouseEnterDelay:.8,children:n})))),VD=(0,p.memo)((0,y.PA)((({disabled:e,history:t,store:n})=>(0,_.jsx)(ND,{title:"Accept annotation: [ Ctrl+Enter ]",children:(0,_.jsx)(za,{"aria-label":"accept-annotation",disabled:e,look:"primary",onClick:async()=>{var e;const t=null==(e=n.annotationStore)?void 0:e.selected;null==t||t.submissionInProgress(),await n.commentStore.commentFormSubmit(),n.acceptAnnotation()},children:t.canUndo?"Fix + Accept":"Accept"})},"accept")))),zD={id:"reject",name:"reject",title:"Reject",look:void 0,ariaLabel:"reject-annotation",tooltip:"Reject annotation: [ Ctrl+Space ]",disabled:!1},BD=(0,p.memo)((0,y.PA)((({disabled:e,store:t,onSkipWithComment:n})=>(0,_.jsx)(ND,{title:"Cancel (skip) task: [ Ctrl+Space ]",children:(0,_.jsx)(za,{"aria-label":"skip-task",disabled:e,onClick:async e=>{var r,o;const i=()=>t.skipTask({}),a=null==(r=t.annotationStore)?void 0:r.selected;null==(o=t.hasInterface("comments:skip"))||o?n(e,i):(null==a||a.submissionInProgress(),await t.commentStore.commentFormSubmit(),t.skipTask({}))},children:"Skip"})},"skip")))),HD=(0,p.memo)((0,y.PA)((({disabled:e,store:t})=>(0,_.jsx)(ND,{title:"Cancel skip: []",children:(0,_.jsx)(za,{"aria-label":"cancel-skip",disabled:e,look:"primary",onClick:async()=>{var e;const n=null==(e=t.annotationStore)?void 0:e.selected;null==n||n.submissionInProgress(),await t.commentStore.commentFormSubmit(),t.unskipTask()},children:"Cancel skip"})},"cancel-skip")))),FD=(0,y.PA)((({button:e,disabled:t,onClick:n})=>{var r;const o=e.disabled||t?"disabled":e.look;return(0,_.jsx)(ND,{title:null!=(r=e.tooltip)?r:"",children:(0,_.jsx)(za,{"aria-label":e.ariaLabel,disabled:e.disabled||t,look:o,onClick:n,children:e.title})})})),WD=DD((0,y.PA)((({store:e,history:t,annotation:n})=>{const r=e.hasInterface("review")||n.canBeReviewed,o=e.hasInterface("topbar:prevnext"),i=(0,w.isDefined)(e.annotationStore.selectedHistory),{userGenerate:a,sentUserGenerate:s,versions:l,results:c,editable:d}=n,u=(0,Ze.cn)("dropdown").elem("trigger").toClassName(),h=e.customButtons,g=[],[m,f]=(0,p.useState)(!1),v=!d||e.isSubmitting||i||m,y=e.hasInterface("annotations:deny-empty")&&0===c.length,b=(0,p.useCallback)((async(t,r,o)=>{var i,a,s;const{addedCommentThisSession:l,currentComment:c,commentFormSubmit:d}=e.commentStore,u=c[n.id],h=null==(i=null!=(a=null==u?void 0:u.text)?a:u)?void 0:i.trim();if(m)return;f(!0);const g=null==(s=e.annotationStore)?void 0:s.selected;l?(null==g||g.submissionInProgress(),r()):h?(t.preventDefault(),null==g||g.submissionInProgress(),await d(),r()):e.commentStore.setTooltipMessage(o),f(!1)}),[e.rejectAnnotation,e.skipTask,e.commentStore.currentComment,e.commentStore.commentFormSubmit,e.commentStore.addedCommentThisSession,m]),x=h.get("_before"),C=h.get("_replace"),S=null!=C?C:x;if(S){const n=(0,w.toArray)(S);for(const r of n)"string"==typeof r?"accept"===r&&g.push((0,_.jsx)(VD,{disabled:v,history:t,store:e})):g.push((0,_.jsx)(FD,{disabled:v,button:r,onClick:()=>null==e.handleCustomButton?void 0:e.handleCustomButton(r.name)},r.name))}if(C);else if(r){const n=(0,w.toArray)(h.get("reject")),r=n.length>0,o=zD;(r?n.filter((e=>"string"!=typeof e)):[o]).forEach((t=>{const n=r?()=>null==e.handleCustomButton?void 0:e.handleCustomButton(t.name):()=>e.rejectAnnotation({});g.push((0,_.jsx)(FD,{button:t,disabled:v,onClick:async t=>{var r;const o=null==(r=e.annotationStore)?void 0:r.selected;e.hasInterface("comments:reject")?b(t,n,"Please enter a comment before rejecting"):(null==o||o.submissionInProgress(),await e.commentStore.commentFormSubmit(),n())}}))})),g.push((0,_.jsx)(VD,{disabled:v,history:t,store:e}))}else if(n.skipped)g.push((0,_.jsxs)(Ze.Sl,{name:"skipped-info",children:[(0,_.jsx)(Vl,{color:"#d00"})," Was skipped"]},"skipped")),g.push((0,_.jsx)(HD,{disabled:v,store:e}));else{if(e.hasInterface("skip")){const t=(e,t)=>{b(e,t,"Please enter a comment before skipping")};g.push((0,_.jsx)(BD,{disabled:v,store:e,onSkipWithComment:t}))}const r=v||y,i=r?"disabled":"primary",c=!r&&o,d=({isUpdate:t,onClickMethod:n})=>(0,_.jsx)(za,{name:"submit-option",look:"primary",onClick:async t=>{var r;t.preventDefault();const o=null==(r=e.annotationStore)?void 0:r.selected;if(null==o||o.submissionInProgress(),"URLSearchParams"in window){const e=new URLSearchParams(window.location.search);e.set("exitStream","true");const t=`${window.location.pathname}?${e.toString()}`;window.history.pushState(null,"",t)}await e.commentStore.commentFormSubmit(),n()},children:(t?"Update":"Submit")+" and exit"});if(a||e.explore&&!a&&e.hasInterface("submit")){const t=y?"Empty annotations denied in this project":"Save results: [ Ctrl+Enter ]";g.push((0,_.jsx)(ND,{title:t,children:(0,_.jsx)(Ze.Sl,{name:"tooltip-wrapper",children:(0,_.jsx)(za,{"aria-label":"submit",name:"submit",disabled:r,look:i,mod:{has_icon:c,disabled:r},onClick:async t=>{var n;if(t.target.classList.contains(u))return;const r=null==(n=e.annotationStore)?void 0:n.selected;null==r||r.submissionInProgress(),await e.commentStore.commentFormSubmit(),e.submitAnnotation()},icon:c?(0,_.jsx)(Q_.Trigger,{alignment:"top-right",content:(0,_.jsx)(d,{onClickMethod:e.submitAnnotation,isUpdate:!1}),children:(0,_.jsx)("div",{children:(0,_.jsx)(lc,{})})}):void 0,children:"Submit"})})},"submit"))}if(a&&s||!a&&e.hasInterface("update")){const o=Boolean((0,O.VS)(O.I8)||s||l.result),a=(0,O.VS)(O.I8)&&!t.canUndo&&!n.draftId,h=r||a,m=(0,_.jsx)(ND,{title:a?"No changes were made":"Update this task: [ Ctrl+Enter ]",children:(0,_.jsx)(za,{"aria-label":"submit",name:"submit",disabled:h,look:i,mod:{has_icon:c,disabled:h},onClick:async t=>{var n;if(t.target.classList.contains(u))return;const r=null==(n=e.annotationStore)?void 0:n.selected;null==r||r.submissionInProgress(),await e.commentStore.commentFormSubmit(),e.updateAnnotation()},icon:c?(0,_.jsx)(Q_.Trigger,{alignment:"top-right",content:(0,_.jsx)(d,{onClickMethod:e.updateAnnotation,isUpdate:o}),children:(0,_.jsx)("div",{children:(0,_.jsx)(lc,{})})}):void 0,children:o?"Update":"Submit"})},"update");g.push(m)}}return(0,_.jsx)(Ze.eB,{name:"controls",children:g})}))),$D=(0,y.PA)((({store:e})=>{const t=e.annotationStore,n=null==t?void 0:t.selected,r="prediction"===(null==n?void 0:n.type),o=!0===(null==t?void 0:t.viewingAll);return e&&!o?(0,_.jsxs)(Ze.eB,{name:"bottombar",style:{borderTop:(0,O.VS)(O.bA)&&"1px solid rgba(0,0,0,0.1)"},children:[(0,_.jsx)(Ze.Sl,{name:"group",children:(0,_.jsx)(KD,{store:e})}),(0,_.jsx)(Ze.Sl,{name:"group",children:e.hasInterface("controls")&&(e.hasInterface("review")||!r)&&(0,_.jsx)(Ze.Sl,{name:"section",mod:{flat:!0},children:(0,_.jsx)(WD,{annotation:n})})})]}):null})),UD=e=>{const t=e.pk||e.id,n=e.serializeAnnotation(),r=e.versions.draft,o={id:t,result:n};return r&&(o.draft=r),o},ZD=(0,y.PA)((({store:e})=>{const t=(0,p.useRef)(),n=(0,p.useRef)(),r=(0,p.useRef)(),o=(0,p.useCallback)((()=>{var o,i,a;const s=null==(o=t.current)?void 0:o.value,l=JSON.parse((null==(i=r.current)?void 0:i.value)||'[{ "result": [] }]'),c=JSON.parse(null==(a=n.current)?void 0:a.value);e.resetState(),e.assignConfig(s),e.assignTask({data:c}),e.initializeStore({annotations:l,predictions:[]});const d=e.annotationStore;d.annotations.length&&d.selectAnnotation(d.annotations[0].id)}),[]),i=(0,p.useCallback)((()=>{const t=r.current;if(!t)return;const n=e.annotationStore.selected,o=[UD(n)];t.value=JSON.stringify(o,null,2)}),[]),a=(0,p.useCallback)((()=>{const t=r.current;if(!t)return;const{annotations:n,predictions:o}=e.annotationStore,i=[...n,...o].map(UD);t.value=JSON.stringify(i,null,2)}),[]);return(0,_.jsxs)("div",{style:{width:"100%"},children:[(0,_.jsx)("br",{}),(0,_.jsx)("h2",{children:"Debug"}),(0,_.jsxs)("div",{children:[(0,_.jsx)(jr.A,{onClick:a,children:"↓ Serialize All Annotations"}),(0,_.jsx)(jr.A,{onClick:i,children:"↓ Serialize Current Annotation"}),(0,_.jsx)(jr.A,{onClick:o,children:"↑ Simulate Loading Task"})]}),(0,_.jsx)(kK.A,{children:(0,_.jsxs)("div",{style:{display:"flex"},children:[(0,_.jsxs)("div",{style:{flexBasis:"50%"},children:[(0,_.jsx)("p",{children:"Data"}),(0,_.jsx)("textarea",{style:{width:"100%"},ref:n,rows:4,defaultValue:e.task.data,className:"is-search"}),(0,_.jsx)("p",{children:"Config"}),(0,_.jsx)("textarea",{style:{width:"100%"},ref:t,rows:16,defaultValue:e.config,className:"is-search"})]}),(0,_.jsxs)("div",{style:{flexBasis:"50%"},children:[(0,_.jsx)("p",{children:"Annotations"}),(0,_.jsx)("textarea",{style:{width:"100%"},ref:r,rows:22,className:"is-search"})]})]})})]})}));var GD=n(18869),YD=n(83764);const XD="grid--e4IWo",qD="container--CXRH5",JD="left--_1fAk",QD="right--LGT3p",eN=(0,y.PA)((0,p.forwardRef)((({entity:e,selected:t,style:n,onClick:r,bordered:o=!0,prediction:i=!1,displayGroundTruth:a=!1},s)=>{var l,c;const d=e.userGenerate&&!e.sentUserGenerate||e.draftSelected;return(0,_.jsx)(Ze.eB,{name:"entity-tab",ref:s,mod:{selected:t,bordered:o},style:n,onClick:t=>{t.preventDefault(),t.stopPropagation(),null==r||r(e,i)},children:(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"userpic",tag:FM,showUsername:!0,username:i?e.createdBy:null,user:null!=(l=e.user)?l:{email:e.createdBy},mod:{prediction:i},children:i&&(0,_.jsx)(Ps,{style:{width:16,height:16}})}),(0,_.jsxs)(Ze.Sl,{name:"identifier",children:["ID ",null!=(c=e.pk)?c:e.id," ",d&&"*"]}),a&&e.ground_truth&&(0,_.jsx)(Ze.Sl,{name:"ground-truth",tag:kl}),e.skipped&&(0,_.jsx)(Ze.Sl,{name:"skipped",tag:Vl})]})})})));class tN extends p.Component{componentDidMount(){Promise.all(this.props.annotation.objects.map((e=>"image"===e.type?Promise.resolve():e.isReady?Promise.resolve(e.isReady):new Promise((t=>{const n=(0,u.lB)(e,"isReady",(()=>{n(),t()}))}))))).then((()=>{setTimeout(this.props.onFinish,32)}))}render(){return(0,_.jsx)(DM,{root:this.props.root,annotation:this.props.annotation})}}class nN extends p.Component{constructor(...e){super(...e),this.state={item:0,loaded:new Set},this.container=p.createRef(),this.onFinish=()=>{const e=this.container.current;if(!e)return;const t=e.children[e.children.length-1],n=t.children[t.children.length-1],r=n.cloneNode(!0);e.children[this.state.item].appendChild(r),yt.A.stages.map((e=>e.draw()));const o=n.querySelectorAll("canvas");r.querySelectorAll("canvas").forEach(((e,t)=>{e.getContext("2d").drawImage(o[t],0,0)}));const i=n.querySelectorAll("iframe");r.querySelectorAll("iframe").forEach(((e,t)=>{e.contentWindow.document.open(),e.contentWindow.document.write(i[t].contentDocument.documentElement.outerHTML),(0,je.moveStylesBetweenHeadTags)(i[t].contentDocument.head,e.contentDocument.head)})),this.setState((e=>Object.assign({},e,{loaded:new Set([...e.loaded,this.props.store.selected.id])}))),this.renderNext()},this.shift=e=>{const t=this.container.current,n=t.children,r=Array.from(n).findIndex((e=>t.scrollLeft<=e.offsetLeft));if(!t)return;const o=this.props.annotations.length,i=r+e;if(i<0||i>o-1)return;const a=n[i].offsetLeft;t.scrollTo({left:a,top:0,behavior:"smooth"})},this.left=()=>{this.shift(-1)},this.right=()=>{this.shift(1)},this.select=e=>{const{store:t}=this.props;"annotation"===e.type?t.selectAnnotation(e.id):t.selectPrediction(e.id)}}shouldComponentUpdate(e,t){return!e.store.selected.selected||t.item>=e.annotations.length||e.annotations[t.item]===e.store.selected}componentDidMount(){(0,O.VS)(O.cE)||this.props.annotations[0]===this.props.store.selected||this.startRenderCycle()}startRenderCycle(){this.renderNext(0)}renderNext(e){this.setState({item:(0,w.isDefined)(e)?e:this.state.item+1},(()=>{this.state.item!e.hidden)).map((e=>(0,_.jsxs)("div",{id:`c-${e.id}`,style:{position:"relative"},children:[(0,_.jsx)(eN,{entity:e,onClick:()=>this.select(e),prediction:"prediction"===e.type,bordered:!1,style:{height:44}}),(0,O.VS)(O.cE)?(0,_.jsx)(DM,{root:this.props.root,annotation:e}):!this.state.loaded.has(e.id)&&(0,_.jsx)("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,_.jsx)(v.A,{size:"large"})})]},`anno-${e.id}`))),r&&(0,_.jsxs)("div",{id:"c-tmp",style:{opacity:0,position:"relative",right:99999},children:[(0,_.jsx)(eN,{entity:n,prediction:"prediction"===n.type,bordered:!1,style:{height:44}}),(0,_.jsx)(tN,{root:this.props.root,onFinish:this.onFinish,annotation:n},e)]},"anno-tmp")]}),(0,_.jsx)(jr.A,{type:"text",onClick:this.left,className:JD,icon:(0,_.jsx)(GD.A,{})}),(0,_.jsx)(jr.A,{type:"text",onClick:this.right,className:QD,icon:(0,_.jsx)(YD.A,{})})]})}}const rN=({title:e,children:t,visible:n,onCancel:r})=>{const o={padding:"0 24px 24px",whiteSpace:"pre-wrap"};return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(mn.A,{title:"",visible:n,maskClosable:!0,footer:null,closable:!0,onCancel:()=>r(),width:"70%",style:{maxHeight:"calc(100vh - 250px)",minWidth:"400px",maxWidth:"800px",borderRadius:"8px",overflow:"hidden",padding:"0"},bodyStyle:{overflow:"auto",maxHeight:"calc(100vh - 250px)",padding:"0px"},children:[(0,_.jsx)("h2",{style:{position:"sticky",top:"0px",background:"white",padding:"24px 24px 20px",margin:"0px",fontWeight:"400",fontSize:"24"},children:e}),"string"==typeof t?(0,_.jsx)("p",{style:o,dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(t)}}):(0,_.jsx)("p",{style:o,children:t})]})})};var oN=n(19686);const iN=["relation","startNode","endNode","visible"],aN=["tags","taskData"],sN=({id:e,color:t})=>(0,_.jsx)("marker",{id:`arrow-${e}`,viewBox:"0 0 10 10",refX:8,refY:5,markerWidth:4,markerHeight:4,orient:"auto-start-reverse",children:(0,_.jsx)("path",{d:"M 0 0 L 10 5 L 0 10 z",fill:t})}),lN=({x:e,y:t,width:n,height:r})=>(0,_.jsx)("rect",{x:e,y:t,width:n,height:r,fill:"none"}),cN=({id:e,command:t,color:n,direction:r,highlight:o})=>{const i=o?"#fa541c":n,a={d:t,stroke:i,fill:"none",strokeLinecap:"round"},s={};return"bi"!==r&&"right"!==r||(s.markerEnd=`url(#arrow-${e})`),"bi"!==r&&"left"!==r||(s.markerStart=`url(#arrow-${e})`),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("defs",{children:(0,_.jsx)(sN,{id:e,color:i})}),o&&(0,_.jsx)("path",Object.assign({},a,{stroke:n,opacity:.1,strokeWidth:6})),(0,_.jsx)("path",Object.assign({},a,{opacity:o?1:.6,strokeWidth:2},s))]})},dN=({label:e,position:t})=>{const[n,r]=t,o=(0,p.useRef)(),[i,a]=(0,p.useState)({width:0,height:0,x:0,y:0}),s={transform:`translate(${n}, ${r})`,textAnchor:"middle",dominantBaseline:"middle"};return(0,p.useEffect)((()=>{const e=o.current.getBBox();a({x:e.x-5,y:e.y-3,width:e.width+10,height:e.height+6})}),[e]),(0,_.jsxs)("g",Object.assign({},s,{children:[(0,_.jsx)("rect",Object.assign({},i,{stroke:"#fff",strokeWidth:2,fill:"#a0a",rx:"3"})),(0,_.jsx)("text",Object.assign({ref:o},{fill:"white",style:{fontSize:12,fontFamily:"arial"}},{children:e}))]}))},uN=({id:e,startNode:t,endNode:n,direction:r,rootRef:o,highlight:i,dimm:a,labels:s,visible:l})=>{const c=o.current,d=!0===t.hidden||!0===n.hidden||!l,[,u]=(0,p.useState)(),h=de({id:e,startNode:t,endNode:n,direction:r,labels:s},c),{start:g,end:m}=ue(Object.assign({root:c},h)),[f,v]=he(g,m);return(0,p.useEffect)((()=>(h.onChange((()=>u({}))),()=>h.destroy())),[]),g.width<1||g.height<1||m.width<1||m.height<1?null:(0,_.jsxs)("g",{opacity:a&&!i?.5:1,visibility:d?"hidden":"visible",children:[(0,_.jsx)(lN,Object.assign({},g)),(0,_.jsx)(lN,Object.assign({},m)),(0,_.jsx)(cN,{id:h.id,command:f,color:h.color,direction:h.direction,highlight:i}),h.label&&(0,_.jsx)(dN,{label:h.label,position:v})]})},hN=(0,y.PA)((e=>{let{relation:t,startNode:n,endNode:r,visible:o}=e,i=(0,Yn.A)(e,iN);const a=[n.getRegionElement?n.getRegionElement():n,r.getRegionElement?r.getRegionElement():r],[s,l]=(0,p.useState)(a[0]&&a[1]);(0,p.useEffect)((()=>{let e;const t=()=>{const n=(0,w.isDefined)(a[0])&&(0,w.isDefined)(a[1]);s!==n?l(n):!1===s&&(e=setTimeout(t,30))};return e=setTimeout(t,30),()=>clearTimeout(e)}),[a,s]);const c=o&&t.visible;return s&&t.shouldRender?(0,_.jsx)(uN,Object.assign({id:t.id,startNode:n,endNode:r,direction:t.direction,visible:c,labels:t.selectedValues},i)):null}));class gN extends p.PureComponent{constructor(...e){super(...e),this.rootNode=(0,p.createRef)(),this.timer=null,this.state={shouldRender:!1,shouldRenderConnections:Math.random()},this.onResize=()=>{this.setState({shouldRenderConnections:Math.random()})}}componentDidUpdate(){this.rootNode.current&&!this.state.shouldRender&&this.setState({shouldRender:!0})}render(){const{relations:e,visible:t,highlighted:n}=this.props,r=!!n,o={top:0,left:0,width:"100%",height:"100%",position:"absolute",pointerEvents:"none",zIndex:100};return(0,_.jsx)(oN.Ay,{onResize:this.onResize,children:()=>(0,_.jsxs)("svg",{className:"relations-overlay",ref:this.rootNode,xmlns:"http://www.w3.org/2000/svg",style:o,children:[(0,_.jsx)("title",{children:this.state.shouldRender?"Arrow Marker":""}),this.state.shouldRender&&this.renderRelations(e,t,r,n)]})})}renderRelations(e,t,n,r){return e.map((e=>{const o=r===e;return(0,_.jsx)(hN,{relation:e,rootRef:this.rootNode,startNode:e.node1,endNode:e.node2,dimm:n&&!o,highlight:o,visible:o||t,shouldUpdate:this.state.shouldRenderConnections},e.id)}))}}const mN=(0,y.PA)(gN),pN=(0,y.PA)((0,p.forwardRef)((({store:e,tags:t},n)=>{var r;const{relations:o,showConnections:i,highlighted:a}=e;return(0,_.jsx)(mN,{ref:n,relations:Array.from(o),visible:i,highlighted:a,tags:Array.from(null!=(r=null==t||null==t.values?void 0:t.values())?r:[])})})));let fN=null;const vN=(e,t)=>{if(clearTimeout(fN),(0,O.VS)(O.cE)){if(![...e.values()].every(h._n))return!1}else if(!(0,h._n)(e))return;const n=Array.from(e.values()).reduce(((e,t)=>{var n;return e&&(null==(n=null==t?void 0:t.isReady)||n)}),!0);t(n),n||(fN=setTimeout((()=>{vN(e,t)}),100))},yN=(0,y.PA)((0,p.forwardRef)(((e,t)=>{let{tags:n,taskData:r}=e,o=(0,Yn.A)(e,aN);const[i,a]=(0,p.useState)(!1);return(0,p.useEffect)((()=>(vN(n,(e=>{a(e)})),()=>clearTimeout(fN))),[r,n]),i&&(0,_.jsx)(pN,Object.assign({ref:t},o))}))),bN="block--sSl0y";class xN extends p.Component{componentDidMount(){const{annotation:e}=this.props;e&&e.updateObjects()}render(){let e=bN;return this.props.className&&(e=`${e} ${this.props.className}`),(0,_.jsx)("div",{className:e,children:this.props.children})}}xN.propTypes={children:Ce.PropTypes.array.isRequired};var wN=n(23091),CN=n(54710);const SN={enableHotkeys:{newUI:{title:"Labeling hotkeys",description:"Enables quick selection of labels using hotkeys"},description:"Enable labeling hotkeys",onChangeEvent:"toggleHotkeys",defaultValue:!0},enableTooltips:{newUI:{title:"Show hotkeys on tooltips",description:"Displays keybindings on tools and actions tooltips"},description:"Show hotkey tooltips",onChangeEvent:"toggleTooltips",checked:"",defaultValue:!1},enableLabelTooltips:{newUI:{title:"Show hotkeys on labels",description:"Displays keybindings on labels"},description:"Show labels hotkey tooltips",onChangeEvent:"toggleLabelTooltips",defaultValue:!0},showLabels:{newUI:{title:"Show region labels",description:"Display region label names"},description:"Show labels inside the regions",onChangeEvent:"toggleShowLabels",defaultValue:!1},continuousLabeling:{newUI:{title:"Keep label selected after creating a region",description:"Allows continuous region creation using the selected label"},description:"Keep label selected after creating a region",onChangeEvent:"toggleContinuousLabeling",defaultValue:!1},selectAfterCreate:{newUI:{title:"Select region after creating it",description:"Automatically selects newly created regions"},description:"Select regions after creating",onChangeEvent:"toggleSelectAfterCreate",defaultValue:!1},showLineNumbers:{newUI:{tags:"Text Tag",title:"Show line numbers",description:"Identify and reference specific lines of text in your document"},description:"Show line numbers for Text",onChangeEvent:"toggleShowLineNumbers",defaultValue:!1},preserveSelectedTool:{newUI:{tags:"Image Tag",title:"Keep selected tool",description:"Persists the selected tool across tasks"},description:"Remember Selected Tool",onChangeEvent:"togglepreserveSelectedTool",defaultValue:!0},enableSmoothing:{newUI:{tags:"Image Tag",title:"Pixel smoothing on zoom",description:"Smooth image pixels when zoomed in"},description:"Enable image smoothing when zoom",onChangeEvent:"toggleSmoothing",defaultValue:!0}},jN={videoDrawOutside:{description:"Allow drawing outside of video boundaries",defaultValue:!1,type:"boolean",ff:O.PR},videoHopSize:{description:"Video hop size",defaultValue:10,type:"number"}},kN=(0,y.PA)((({store:e,name:t,value:n})=>{const r={onChange:r=>{if(n.onChangeEvent)n.onChangeEvent(r);else if("boolean"===n.type)e.settings.toggleProperty(t);else{const o="number"===n.type?Number(r.target.value):r.target.value;e.settings.setProperty(t,o)}}};return"boolean"===n.type&&(r.checked=e.settings[t]),"boolean"!==n.type&&(r.type=n.type,r.value=e.settings[t],r.placeholder=n.description),"number"===n.type&&(r.step=n.step,r.min=n.min,r.max=n.max),(0,_.jsx)(Ze.Sl,{name:"field",children:"boolean"===n.type?(0,_.jsx)(CN.S,Object.assign({},r,{children:n.description})):(0,_.jsxs)("label",{children:[n.description,(0,_.jsx)(RM.A,Object.assign({},r))]})},t)})),ON=(0,y.PA)((({store:e,settings:t})=>(0,_.jsx)(Ze.eB,{name:"settings",children:Object.entries(t).map((([t,n])=>n.ff&&!(0,O.VS)(n.ff)?null:(0,_.jsx)(kN,{name:t,store:e,value:n},t)))}))),RN=({store:e})=>(0,_.jsx)(ON,{store:e,settings:jN});RN.displayName="VideoSettings",RN.tagName="Video",RN.title="Video";const EN=(0,Gj.PA)(RN),_N=(0,O.VS)(O.bA)?{newUI:!0}:{},AN=Object.keys(SN);if((0,O.VS)(O.bA)){const e=AN.findIndex((e=>"enableTooltips"===e)),t=AN.findIndex((e=>"enableLabelTooltips"===e)),n=AN[e];AN[e]=AN[t],AN[t]=n}const TN=({children:e})=>(0,_.jsx)(Ze.eB,{name:"settings-tag",children:e}),PN=(0,y.PA)((({store:e})=>(0,_.jsx)(Ze.eB,{name:"settings",mod:_N,children:AN.map(((t,n)=>{var r;return(0,_.jsx)(Ze.Sl,{name:"field",tag:"label",children:(0,O.VS)(O.bA)?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(Ze.eB,{name:"settings__label",children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[SN[t].newUI.title,null==(r=SN[t].newUI.tags)?void 0:r.split(",").map((e=>(0,_.jsx)(TN,{children:e},e)))]}),(0,_.jsx)(Ze.eB,{name:"description",children:SN[t].newUI.description})]}),(0,_.jsx)(gA,{checked:e.settings[t],onChange:e.settings[SN[t].onChangeEvent],description:SN[t].description},n)]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(CN.S,{checked:e.settings[t],onChange:e.settings[SN[t].onChangeEvent],children:SN[t].description},n),(0,_.jsx)("br",{})]})},n)}))}))),IN=(0,y.PA)((({store:e})=>(0,_.jsxs)(Ze.eB,{name:"settings",mod:_N,children:[(0,_.jsx)(Ze.Sl,{name:"field",children:(0,_.jsx)(CN.S,{checked:e.settings.bottomSidePanel,onChange:()=>{e.settings.toggleBottomSP(),setTimeout(w.triggerResizeEvent)},children:"Move sidepanel to the bottom"})}),(0,_.jsx)(Ze.Sl,{name:"field",children:(0,_.jsx)(CN.S,{checked:e.settings.displayLabelsByDefault,onChange:e.settings.toggleSidepanelModel,children:"Display Labels by default in Results panel"})}),(0,_.jsx)(Ze.Sl,{name:"field",children:(0,_.jsx)(CN.S,{value:"Show Annotations panel",defaultChecked:e.settings.showAnnotationsPanel,onChange:()=>{e.settings.toggleAnnotationsPanel()},children:"Show Annotations panel"})}),(0,_.jsx)(Ze.Sl,{name:"field",children:(0,_.jsx)(CN.S,{value:"Show Predictions panel",defaultChecked:e.settings.showPredictionsPanel,onChange:()=>{e.settings.togglePredictionsPanel()},children:"Show Predictions panel"})})]}))),LN={General:{name:"General",component:PN},Hotkeys:{name:"Hotkeys",component:()=>{const e=[{title:"Shortcut",dataIndex:"combo",key:"combo"},{title:"Description",dataIndex:"descr",key:"descr"}],t=yr.namespaces();return(0,_.jsx)(Ze.eB,{name:"keys",children:(0,_.jsx)(wN.A,{size:"small",children:Object.entries(t).map((([t,n])=>{var r,o;return 0===Object.keys(n.descriptions).length?null:(0,_.jsx)(wN.A.TabPane,{tab:null!=(r=n.description)?r:t,children:(0,_.jsx)(BA.A,{columns:e,dataSource:(o=n.descriptions,Object.keys(o).filter((e=>o[e])).map((e=>({key:e,combo:e.split(",").map((e=>(0,_.jsx)(Ze.Sl,{name:"key-group",children:e.trim().split("+").map((e=>(0,_.jsx)(Ze.Sl,{tag:"kbd",name:"key",children:e},e)))},e))),descr:o[e]})))),size:"small"})},t)}))})})}}};(0,O.VS)(O.bA)||(LN.Layout={name:"Layout",component:IN});const MN=Object.keys(LN)[0],KN=(0,O.VS)(O.bA)?{name:"settings-modal",title:"Labeling Interface Settings",closeIcon:(0,_.jsx)(Zc,{})}:{name:"settings-modal-old",title:"Settings",bodyStyle:{paddingTop:"0"}},DN=(0,y.PA)((({store:e})=>{const t=(0,p.useMemo)((()=>{const t=Object.values(e.annotationStore.names.toJSON()),n=Object.values(c);return t.reduce(((t,r)=>{const o=e.annotationStore.names.get(r).type,i=n.find((({tagName:e})=>e.toLowerCase()===o.toLowerCase()));return i&&t.push(i),t}),[])}),[]);return(0,_.jsx)(Ze.eB,Object.assign({tag:mn.A,visible:e.showingSettings,onCancel:e.toggleSettings,footer:""},KN,{children:(0,_.jsxs)(wN.A,{defaultActiveKey:MN,children:[Object.entries(LN).map((([t,{name:n,component:r}])=>(0,_.jsx)(wN.A.TabPane,{tab:n,children:p.createElement(r,{store:e})},t))),t.map((t=>(0,_.jsx)(wN.A.TabPane,{tab:t.title,children:(0,_.jsx)(t,{store:e})},t.tagName)))]})}))})),NN=({children:e})=>(0,_.jsx)(Ze.eB,{name:"sidebar-tabs",children:(0,_.jsx)(Ze.Sl,{name:"content",children:e})}),VN=(e,t=[])=>{(0,p.useEffect)((()=>{const t={capture:e.capture,passive:e.passive},n=e.elementRef.current,r=n=>{if(e.disabled)return;if(n.defaultPrevented)return;const r=null==e.onMouseDown?void 0:e.onMouseDown(n),o=t=>{null==e.onMouseMove||e.onMouseMove(t,r)},i=n=>{document.removeEventListener("mousemove",o,t),document.removeEventListener("mouseup",i),null==e.onMouseUp||e.onMouseUp(n,r)};document.addEventListener("mousemove",o,t),document.addEventListener("mouseup",i)};return null==n||n.addEventListener("mousedown",r),()=>{null==e.onUnmount||e.onUnmount(),null==n||n.removeEventListener("mousedown",r)}}),t)},zN=320,BN=300,HN=500,FN=24,WN=["top-left","top-right","bottom-left","bottom-right","top","bottom","right","left"],$N=({name:e,mix:t,root:n,title:r,width:o,maxWidth:i,height:a,visible:s,detached:l,alignment:c,expanded:d,top:u,left:h,relativeTop:g,relativeLeft:m,zIndex:f,tooltip:v,locked:y=!1,positioning:b=!1,onSnap:x,onResize:C,onResizeStart:S,onResizeEnd:j,onVisibilityChange:k,onPositionChange:O,onPositionChangeBegin:R,children:E})=>{const A=(0,p.useRef)(),T=(0,p.useRef)(),P=(0,p.useRef)(),I=(0,p.useRef)({onResize:C,onResizeStart:S,onResizeEnd:j,onPositionChange:O,onPositionChangeBegin:R,onVisibilityChange:k,onSnap:x}),[L,M]=(0,p.useState)(),K=(0,p.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),null==k||k(e,!1)}),[k]),D=(0,p.useCallback)((()=>{null==k||k(e,!0)}),[k]),N=(0,p.useMemo)((()=>{const e=s?{height:l&&null!=a?a:"100%",width:d?"100%":null!=o?o:zN}:{width:l?null!=o?o:zN:"100%",height:l?26:void 0};return Object.assign({},e,{zIndex:f})}),[o,a,s,l,d,f]),V=(0,p.useMemo)((()=>l&&!y?{top:`${g}%`,left:`${m}%`}:{}),[l,g,m,y]),z=(0,p.useMemo)((()=>({detached:!y&&l,resizing:(0,w.isDefined)(L),hidden:!s,alignment:l?"left":null!=c?c:"left",disabled:y})),[c,s,l,L,y]),B=(0,p.useMemo)((()=>l?s?(0,_.jsx)(yw,{}):(0,_.jsx)(jw,{}):"left"===c?s?(0,_.jsx)(by,{}):(0,_.jsx)(Ty,{}):"right"===c?s?(0,_.jsx)(Ty,{}):(0,_.jsx)(by,{}):null),[l,s,c]),H=(0,p.useMemo)((()=>`${s?"Collapse":"Expand"} ${v}`),[s,v]);return(0,p.useEffect)((()=>{Object.assign(I.current,{onResize:C,onResizeStart:S,onResizeEnd:j,onPositionChangeBegin:R,onPositionChange:O,onVisibilityChange:k,onSnap:x})}),[C,S,j,O,k,R,x]),VN({elementRef:A,disabled:y||!l&&!s,onMouseDown(t){const r=t.target,o="[class*=__toggle]";if(r.matches(o)||r.closest(o))return;const i=l,a=T.current,s=n.current.getBoundingClientRect(),c=a.getBoundingClientRect(),[d,g]=[t.pageX,t.pageY],[m,p]=[c.left-s.left,c.top-s.top];return null==I.current.onPositionChangeBegin||I.current.onPositionChangeBegin(e,u,h,l),{x:d,y:g,oX:m,oY:p,allowDrag:i}},onMouseMove(t,n){if(n){const{x:s,y:l,oX:c,oY:d}=n;let{allowDrag:u}=n;const[h,g]=[t.pageX,t.pageY];if((r=s,o=h,i=l,a=g,Math.sqrt((o-r)**2+(a-i)**2))>30&&(u=!0),!u)return;const[m,p]=[c+(h-s),d+(g-l)];null==I.current.onPositionChange||I.current.onPositionChange(e,p,m,!0)}var r,o,i,a},onMouseUp(){null==I.current.onSnap||I.current.onSnap(e)}},[A,l,s,y]),VN({elementRef:P,disabled:y||b,capture:!0,passive:!0,onMouseDown(e){const t=e.target.dataset.resize,n=(()=>{switch(t){case"top-left":return"top-left";case"top":case"top-right":return"top";case"left":case"bottom-left":return"left"}})(),r={x:null!==(null==t?void 0:t.match(/left|right/i)),y:null!==(null==t?void 0:t.match(/top|bottom/i))};return M(t),null==I.current.onResizeStart||I.current.onResizeStart(),{pos:[e.pageX,e.pageY],type:t,width:o,maxWidth:i,height:a,top:u,left:h,resizeDirections:r,shift:n}},onMouseMove(t,n){if(n){const{pos:r,width:o,height:i,maxWidth:a,top:s,left:l,resizeDirections:c,shift:d}=n,[u,h]=r,g=c.x?t.pageX-u:0,m=c.y?t.pageY-h:0,p=(0,w.isDefined)(d)&&["left","top-left"].includes(d),f=(0,w.isDefined)(d)&&["top","top-left"].includes(d),v=(0,w.clamp)(p?o-g:o+g,zN,a),y=(0,w.clamp)(f?i-m:i+m,BN,s+i),b=f?s+(i-y):s,x=p?l+(o-v):l;I.current.onResize(e,v,y,b,x)}},onMouseUp(){null==I.current.onResizeEnd||I.current.onResizeEnd(),M(void 0)}},[I,l,o,i,a,u,h,s,y,b]),(0,_.jsxs)(Ze.eB,{ref:T,name:"panel",mix:e,mod:z,style:Object.assign({},N,V),children:[(0,_.jsxs)(Ze.Sl,{name:"content",children:[!y&&(0,_.jsxs)(Ze.Sl,{ref:A,name:"header",onClick:l?void 0:D,children:[(s||l)&&(0,_.jsx)(Ze.Sl,{name:"title",children:r}),(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{enabled:s},onClick:l&&!s?D:K,"data-tooltip":H,children:B})]}),s&&(0,_.jsx)(Ze.Sl,{name:"body",children:(0,_.jsx)(Ze.eB,{name:e,mix:t,children:E})})]}),s&&!b&&!y&&(0,_.jsx)(Ze.Sl,{name:"resizers",ref:P,mod:{locked:b||y},children:WN.map((e=>("left"===e||"right"===e)&&c!==e||l||l?(0,_.jsx)(Ze.Sl,{name:"resizer",mod:{drag:e===L},"data-resize":e},e):null))})]})},UN=["onChange","type","value","step"],ZN=e=>{const t=(e=>{if((0,h.fn)(e)){const t=e.getSubTypes();return(0,h.Cb)(t)?t.name:null}return(0,h.Cb)(e)?e.name:null})(e);return"number"===t?"number":"text"},GN={angle:pb},YN=({property:e,label:t,region:n})=>{const r=(0,Ze.KE)(),[o,i]=(0,p.useState)(n.getProperty(e)),a=(0,p.useMemo)((()=>(0,h.Pw)(n).properties[e]),[n,e]),s=(0,p.useMemo)((()=>(0,h.Cb)(a)),[a]),l=(0,p.useMemo)((()=>{if(s)return null;let e=null;if((0,h.CK)(a)){const t=(0,h.fn)(a)?a.getSubTypes().getSubTypes():a.getSubTypes();e=t.some((e=>(0,h.aw)(e)||(0,h.Cb)(e)))?t.map((e=>e.value)):null}return e}),[a,s]),c=(0,p.useMemo)((()=>{if(!s)return!1;return((0,h.fn)(a)?a.getSubTypes():a)===h.gK.boolean}),[a,s]),d=(0,p.useCallback)((t=>{if(t!==n.getProperty(e))try{n.setProperty(e,t)}catch(e){console.error(e)}}),[a,c]);return(0,p.useEffect)((()=>{const t=(0,u.lB)(n,e,(({newValue:e,oldValue:t})=>{t.storedValue!==e.storedValue&&i(e.storedValue)}));return()=>t()}),[n]),(0,_.jsxs)(Ze.Sl,{name:"property",tag:"label",children:[c?(0,_.jsx)(CN.S,{className:null==r?void 0:r.elem("input").toClassName(),checked:o,onChange:e=>d(e.target.checked)}):s?(0,_.jsx)(XN,{type:ZN(a),step:"0.01",value:o,onChange:e=>d(Number(e))}):l?(0,_.jsx)("select",{value:o,onChange:e=>d(e.target.value),className:null==r?void 0:r.elem("select").toClassName(),children:l.map(((e,t)=>(0,_.jsx)("option",{value:e,children:e},`${e}-${t}`)))}):null,(0,_.jsx)(qN,{label:t})]})},XN=e=>{let{onChange:t,type:n,value:r,step:o}=e,i=(0,Yn.A)(e,UN);const a=(0,Ze.KE)(),[s,l]=(0,p.useState)(r),c=(0,p.useCallback)(((e,n=!0)=>{const r=e;l(r),n&&(null==t||t(r))}),[t,n]),d=(0,p.useCallback)((e=>{let t=e.target.value,r=!0;"number"===n&&(t.match(/^([0-9,.]+)$/gi)||(r=!1),t.match(/(,|\.)$/)&&(t=t.replace(/,/,"."),r=!1),r&&(t=Number.parseFloat(t))),c(t,r)}),[c,n]),u=(0,p.useCallback)((e=>{if("number"===n&&("ArrowUp"===e.key||"ArrowDown"===e.key)){e.preventDefault();const t=e.altKey&&e.shiftKey?.01:e.shiftKey?10:e.altKey?.1:1;let n=Number(s);"ArrowUp"===e.key?n+=t:n-=t,c(n)}}),[s,n,o]);return(0,p.useEffect)((()=>{c(r)}),[r]),(0,_.jsx)("input",Object.assign({},i,{className:null==a?void 0:a.elem("input").toClassName(),type:"text",step:o,onChange:d,onKeyDown:u,value:s}))},qN=({label:e})=>{const t=(0,p.useMemo)((()=>{if(e.startsWith("icon:")){var t;const n=e.split(":")[1];return null!=(t=GN[n])?t:null}return null}),[e]);return(0,_.jsx)(Ze.Sl,{name:"text",tag:"span",children:t?(0,_.jsx)(t,{}):e})},JN=(0,y.PA)((({region:e})=>{var t;const n=null!=(t=e.editableFields)?t:[],r="AudioRegionModel"===(0,h.Pw)(e).name,o=t=>{e.setProperty("start",t)},i=t=>{e.setProperty("end",t)};return(0,_.jsx)(Ze.eB,{name:"region-editor",mod:{disabled:e.isReadOnly()},children:r&&(0,O.VS)(O.vS)?(0,_.jsx)(Ze.Sl,{name:"wrapper-time-control",children:(0,_.jsx)(OC,{startTime:e.start,endTime:e.end,minTime:0,maxTime:null==e||null==(a=e._ws_region)?void 0:a.duration,isSidepanel:!0,onChangeStartTime:o,onChangeEndTime:i,showLabels:!0,showDuration:!0})}):(0,_.jsx)(Ze.Sl,{name:"wrapper",children:e.editorEnabled&&n.map(((t,n)=>(0,_.jsx)(YN,{property:t.property,label:t.label,region:e},`${t.property}-${n}`)))})});var a})),{Text:QN}=TE.A,eV=(0,y.PA)((({mainValue:e})=>(0,_.jsx)(QN,{mark:!0,children:e.map(((e,t)=>(0,_.jsx)("p",{"data-counter":t+1,children:e},`${e}-${t}`)))}))),tV=(0,y.PA)((({mainValue:e})=>(0,_.jsx)(QN,{mark:!0,children:e.join(", ")}))),nV=(0,y.PA)((({mainValue:e})=>(0,_.jsx)("span",{children:e}))),rV=(0,y.PA)((({result:e})=>{const{type:t,mainValue:n}=e,r=(0,p.useMemo)((()=>"rating"===t?(0,_.jsxs)(Ze.Sl,{name:"result",children:[(0,_.jsx)(QN,{children:"Rating: "}),(0,_.jsx)(Ze.Sl,{name:"value",children:(0,_.jsx)(nV,{mainValue:n})})]}):"textarea"===t?(0,_.jsxs)(Ze.Sl,{name:"result",children:[(0,_.jsx)(QN,{children:"Text: "}),(0,_.jsx)(Ze.Sl,{name:"value",children:(0,_.jsx)(eV,{mainValue:n})})]}):"choices"===t?(0,_.jsxs)(Ze.Sl,{name:"result",children:[(0,_.jsx)(QN,{children:"Choices: "}),(0,_.jsx)(Ze.Sl,{name:"value",children:(0,_.jsx)(tV,{mainValue:n})})]}):"taxonomy"===t?(0,_.jsxs)(Ze.Sl,{name:"result",children:[(0,_.jsx)(QN,{children:"Taxonomy: "}),(0,_.jsx)(Ze.Sl,{name:"value",children:(0,_.jsx)(tV,{mainValue:n.map((e=>e.join("/")))})})]}):void 0),[t,n]);return r?(0,_.jsx)(Ze.eB,{name:"region-meta",children:r}):null})),oV=(0,y.PA)((({region:e})=>(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(Ze.Sl,{name:"result",children:[(null==e?void 0:e.results).map((e=>(0,_.jsx)(rV,{result:e},e.pid))),null!=e&&e.text?(0,_.jsx)(Ze.eB,{name:"region-meta",children:(0,_.jsx)(Ze.Sl,{name:"item",children:(0,_.jsx)(Ze.Sl,{name:"content",mod:{type:"text"},children:e.text.replace(/\\n/g,"\n")})})}):null]}),(0,_.jsx)(JN,{region:e})]}))),iV=(0,y.PA)((({region:e,editMode:t,cancelEditMode:n,enterEditMode:r})=>{var o,i;const a=(0,Ze.KE)(),s=(0,p.useRef)(),l=t=>{e.setMetaText(t),e.setNormInput(t)};return(0,p.useEffect)((()=>{if(t&&s.current){const{current:e}=s;e.focus(),e.setSelectionRange(e.value.length,e.value.length)}}),[t]),(0,_.jsx)(_.Fragment,{children:t?(0,_.jsx)("textarea",{ref:e=>s.current=e,placeholder:"Meta",className:a.elem("meta-text").toClassName(),value:e.normInput,onChange:e=>l(e.target.value),onBlur:()=>{l(e.normInput),null==n||n()},onKeyDown:t=>{"Enter"!==t.key||t.shiftKey||(t.preventDefault(),l(e.normInput),null==n||n())}}):(null==(o=e.meta)?void 0:o.text)&&(0,_.jsx)(Ze.Sl,{name:"meta-text",onClick:()=>null==r?void 0:r(),children:null==(i=e.meta)?void 0:i.text})})})),aV=["children","onClick"],sV=e=>{var t;let{children:n,onClick:r}=e,o=(0,Yn.A)(e,aV);return(0,_.jsx)(za,Object.assign({},o,{onClick:e=>{e.stopPropagation(),null==r||r(e)},type:"text",style:Object.assign({padding:0,width:24,height:24},null!=(t=o.style)?t:{}),children:n}))},lV=(0,y.PA)((({item:e,annotation:t,hovered:n,locked:r,hotkey:o,look:i,style:a,onClick:s})=>{if(!e)return null;const l=r||e.isReadOnly()||t.isReadOnly(),c=e.isReadOnly()&&!r;if((0,O.VS)(O.bA)){const t=Object.assign({},a,{display:e.isReadOnly()||r?void 0:"none"});return(0,_.jsx)(sV,{disabled:c,onClick:s,hotkey:o,look:i,style:t,children:l?(0,_.jsx)(Hf,{}):(0,_.jsx)(Gf,{})})}return e&&(n||e.isReadOnly()||r)&&(0,_.jsx)(sV,{disabled:c,onClick:s,hotkey:o,look:i,style:a,children:l?(0,_.jsx)(Hf,{}):(0,_.jsx)(Gf,{})})})),cV=(0,y.PA)((({region:e})=>{const t=e.labelings.map((e=>e.selectedLabels||[])),n=[].concat(...t);return n.length?(0,_.jsx)(Ze.eB,{name:"labels-list",children:n.map(((e,t)=>{const n=e.background||"#000000";return[t?", ":null,(0,_.jsx)("span",{style:{color:n},children:e.value},e.id)]}))}):(0,_.jsx)(Ze.eB,{name:"labels-list",children:"No label"})})),dV=["children"],uV=(0,y.PA)((({region:e,compact:t=!1,withActions:n=!0,withIds:r=!0,mainDetails:o,metaDetails:i})=>{var a,s;const{annotation:l}=e,{selectedRegions:c}=l,[d,u]=(0,p.useState)(!1),h=(0,p.useMemo)((()=>!!c.find((e=>!e.isReadOnly()&&!e.classification))),[c]),g=(0,p.useMemo)((()=>{var t,n;const r=null!=(t=null!=(n=e.background)?n:e.getOneColor())?t:"#666";return pt()(r).alpha(1)}),[e.background,e.style]);return(0,_.jsxs)(Ze.eB,{name:"detailed-region",mod:{compact:t},children:[(0,_.jsxs)(Ze.Sl,{name:"head",style:{color:g.css()},children:[(0,_.jsxs)(Ze.Sl,{name:"title",children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(LO,{node:e})}),(0,_.jsx)(cV,{region:e})]}),r&&(0,_.jsx)("span",{children:e.cleanId})]}),o&&(0,_.jsx)(Ze.Sl,{name:"content",children:(0,_.jsx)(o,{region:e})}),e.isDrawing&&(0,_.jsxs)(Ze.Sl,{name:"warning",children:[(0,_.jsx)(Nd,{}),(0,_.jsxs)(Ze.Sl,{name:"warning-text",children:["Incomplete ",null!=(a=null==(s=e.type)?void 0:s.replace("region",""))?a:"region"]})]}),n&&(0,_.jsx)(hV,{region:e,editMode:d,annotation:l,hasEditableRegions:h,onEditModeChange:u}),i&&(0,_.jsx)(Ze.Sl,{name:"content",children:(0,_.jsx)(i,{region:e,editMode:d,enterEditMode:()=>u(!0),cancelEditMode:()=>u(!1)})})]})})),hV=(0,y.PA)((({region:e,annotation:t,editMode:n,onEditModeChange:r})=>{const o=[];return o.push((0,_.jsx)(gV,{icon:(0,_.jsx)(Gp,{}),primary:t.isLinkingMode,onClick:(n,r)=>{r||(t.isLinkingMode?t.stopLinkingMode():t.startLinkingMode(F,e))},hotkey:"region:relation","aria-label":"Create Relation"},"relation")),o.push((0,_.jsx)(gV,{icon:(0,_.jsx)(ef,{}),primary:n,onClick:()=>r(!n),hotkey:"region:meta","aria-label":"Edit region's meta"},"meta")),(0,_.jsxs)(Ze.eB,{name:"region-actions",children:[(0,_.jsx)(Ze.Sl,{name:"group",mod:{align:"left"},children:!e.isReadOnly()&&o}),(0,_.jsxs)(Ze.Sl,{name:"group",mod:{align:"right"},children:[(0,_.jsx)(lV,{item:e,annotation:null==e?void 0:e.annotation,hovered:!0,locked:null==e?void 0:e.locked,onClick:()=>e.setLocked(!e.locked),hotkey:"region:lock",look:"alt",style:{width:36,height:32}}),(0,_.jsx)(gV,{icon:e.hidden?(0,_.jsx)(Ki,{}):(0,_.jsx)(Ai,{}),onClick:e.toggleHidden}),(0,_.jsx)(gV,{danger:!0,disabled:e.isReadOnly(),icon:(0,_.jsx)(bs,{}),onClick:()=>t.deleteRegion(e)})]})]})})),gV=e=>{let{children:t}=e,n=(0,Yn.A)(e,dV);return(0,_.jsx)(za,Object.assign({},n,{look:"alt",style:{padding:0},children:t}))},mV=(0,y.PA)((({relations:e})=>(0,_.jsx)(_.Fragment,{children:e.map(((e,t)=>(0,_.jsx)(pV,{relation:e},t)))}))),pV=(0,y.PA)((({relation:e})=>{const[t,n]=(0,p.useState)(!1),r=(0,p.useCallback)((()=>{e.node1&&e.node2&&(n(!0),e.toggleHighlight(),e.setSelfHighlight(!0))}),[]),o=(0,p.useCallback)((()=>{e.node1&&e.node2&&(n(!1),e.toggleHighlight(),e.setSelfHighlight(!1))}),[]),i=(0,p.useMemo)((()=>{const{direction:t}=e;switch(t){case"left":return(0,_.jsx)(Qy,{"data-direction":e.direction});case"right":return(0,_.jsx)($y,{"data-direction":e.direction});case"bi":return(0,_.jsx)(sb,{"data-direction":e.direction});default:return null}}),[e.direction]);return(0,_.jsxs)(Ze.Sl,{name:"item",mod:{hidden:!e.visible},onMouseEnter:r,onMouseLeave:o,children:[(0,_.jsxs)(Ze.Sl,{name:"content",children:[(0,_.jsx)(Ze.Sl,{name:"icon",onClick:e.rotateDirection,children:(0,_.jsx)(Ze.Sl,{name:"direction",children:i})}),(0,_.jsxs)(Ze.Sl,{name:"nodes",children:[(0,_.jsx)(uV,{compact:!0,withActions:!1,withIds:!1,region:e.node1}),(0,_.jsx)(uV,{compact:!0,withActions:!1,withIds:!1,region:e.node2})]}),(0,_.jsxs)(Ze.Sl,{name:"actions",children:[(0,_.jsx)(Ze.Sl,{name:"action",children:(t||e.showMeta)&&e.hasRelations&&(0,_.jsx)(za,{primary:e.showMeta,"aria-label":(e.showMeta?"Hide":"Show")+" Relation Labels",type:e.showMeta?void 0:"text",onClick:e.toggleMeta,style:{padding:0},children:(0,_.jsx)(wf,{})})}),(0,_.jsx)(Ze.Sl,{name:"action",children:(t||!e.visible)&&(0,_.jsx)(za,{type:"text",onClick:e.toggleVisibility,"aria-label":(e.visible?"Hide":"Show")+" Relation",children:e.visible?(0,_.jsx)(Ai,{}):(0,_.jsx)(Ki,{})})}),(0,_.jsx)(Ze.Sl,{name:"action",children:t&&(0,_.jsx)(za,{type:"text",danger:!0,"aria-label":"Delete Relation",onClick:()=>{e.node1.setHighlight(!1),e.node2.setHighlight(!1),e.parent.deleteRelation(e)},children:(0,_.jsx)(bs,{})})})]})]}),e.showMeta&&(0,_.jsx)(fV,{relation:e})]})})),fV=(0,y.PA)((({relation:e})=>{const{selectedValues:t,control:n}=e,{children:r,choice:o}=n,i=(0,p.useMemo)((()=>"multiple"===o?"multiple":void 0),[o]),a=(0,p.useCallback)((t=>{const n=(0,w.wrapArray)(t);e.setRelations(n)}),[e]);return(0,_.jsx)(Ze.eB,{name:"relation-meta",children:(0,_.jsx)(Zn.A,{mode:i,style:{width:"100%"},placeholder:"Select labels",value:t,onChange:a,children:r.map((e=>(0,_.jsx)(Zn.A.Option,{value:e.value,style:{background:e.background},children:e.value},e.value)))})})})),vV=(0,y.PA)((({relationStore:e})=>{const t=e.orderedRelations;return(0,_.jsx)(Ze.eB,{name:"relations",children:(0,_.jsx)(mV,{relations:t})})})),yV=(0,y.PA)((({relationStore:e})=>{var t;const n=(0,p.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleAllVisibility()}),[e]),r=!(null!=e&&null!=(t=e.relations)&&t.length),o=!(!r&&e.isAllHidden);return(0,_.jsx)(Ze.Sl,{tag:za,type:"text",disabled:r,onClick:n,mod:{hidden:o},"aria-label":o?"Show all":"Hide all",icon:o?(0,_.jsx)(Qw,{}):(0,_.jsx)(Hw,{}),tooltip:o?"Show all":"Hide all",tooltipTheme:"dark"})})),bV=(0,y.PA)((({relationStore:e})=>{var t;const n=(0,p.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleOrder()}),[e]),r=!(null!=e&&null!=(t=e.relations)&&t.length),o="asc"===e.order;return(0,_.jsx)(Ze.Sl,{tag:za,type:"text",onClick:n,disabled:r,mod:{order:e.order},"aria-label":o?"Order by oldest":"Order by newest",icon:o?(0,_.jsx)(Lv,{}):(0,_.jsx)(Zv,{}),tooltip:o?"Order by oldest":"Order by newest",tooltipTheme:"dark"})})),xV=(0,y.PA)((({relationStore:e})=>(0,_.jsxs)(Ze.eB,{name:"relation-controls",children:[(0,_.jsx)(yV,{relationStore:e}),(0,_.jsx)(bV,{relationStore:e})]}))),wV=["currentEntity","regions"],CV=(0,y.PA)((({selection:e,currentEntity:t})=>(0,_.jsx)(_.Fragment,{children:e.size?(0,_.jsx)(EV,{regions:e}):(0,_.jsx)(RV,{currentEntity:t})}))),SV=(0,y.WQ)("store")((0,y.PA)((({store:e})=>(0,_.jsx)(_.Fragment,{children:e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,_.jsx)(Ze.eB,{name:"comments-panel",children:(0,_.jsx)(Ze.Sl,{name:"section-tab",children:(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(RD,{annotationStore:e.annotationStore,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})})})})))),jV=(0,y.WQ)("store")((0,y.PA)((({currentEntity:e})=>{const{relationStore:t}=e;return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(Ze.eB,{name:"relations",children:(0,_.jsxs)(Ze.Sl,{name:"section-tab",children:[(0,_.jsxs)(Ze.Sl,{name:"view-control",children:[(0,_.jsxs)(Ze.Sl,{name:"section-head",children:["Relations (",t.size,")"]}),(0,_.jsx)(xV,{relationStore:t})]}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(vV,{relationStore:t})})]})})})}))),kV=(0,y.WQ)("store")((0,y.PA)((({store:e,currentEntity:t})=>{var n;const r=e.hasInterface("annotations:history"),o=(0,O.VS)(O.Lk);return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(Ze.eB,{name:"history",children:o?(0,_.jsxs)(Ze.Sl,{name:"section-tab",children:[(0,_.jsxs)(Ze.Sl,{name:"section-head",children:["Annotation History",(0,_.jsxs)("span",{children:["#",null!=(n=t.pk)?n:t.id]})]}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(YM,{inline:!0,showDraft:o,enabled:r})})]}):(0,_.jsx)(VM,{item:t})})})}))),OV=(0,y.WQ)("store")((0,y.PA)((({selection:e})=>(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(Ze.eB,{name:"info",children:(0,_.jsxs)(Ze.Sl,{name:"section-tab",children:[(0,_.jsx)(Ze.Sl,{name:"section-head",children:"Selection Details"}),(0,_.jsx)(EV,{regions:e})]})})})))),RV=(0,y.WQ)("store")((0,y.PA)((({store:e,currentEntity:t})=>{var n;const{relationStore:r}=t,o=e.hasInterface("annotations:history"),i=(0,O.VS)(O.Lk);return(0,_.jsxs)(_.Fragment,{children:[i?(0,_.jsxs)(Ze.Sl,{name:"section",children:[(0,_.jsxs)(Ze.Sl,{name:"section-head",children:["Annotation History",(0,_.jsxs)("span",{children:["#",null!=(n=t.pk)?n:t.id]})]}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(YM,{inline:!0,showDraft:i,enabled:o})})]}):(0,_.jsx)(VM,{item:t}),(0,_.jsxs)(Ze.Sl,{name:"section",children:[(0,_.jsxs)(Ze.Sl,{name:"view-control",children:[(0,_.jsxs)(Ze.Sl,{name:"section-head",children:["Relations (",r.size,")"]}),(0,_.jsx)(xV,{relationStore:r})]}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(vV,{relationStore:r})})]}),e.hasInterface("annotations:comments")&&e.commentStore.isCommentable&&(0,_.jsxs)(Ze.Sl,{name:"section",children:[(0,_.jsx)(Ze.Sl,{name:"section-head",children:"Comments"}),(0,_.jsx)(Ze.Sl,{name:"section-content",children:(0,_.jsx)(RD,{annotationStore:e.annotationStore,commentStore:e.commentStore,cacheKey:`task.${e.task.id}`})})]})]})})));RV.displayName="GeneralPanel";const EV=(0,y.PA)((({regions:e})=>(0,_.jsx)("div",{children:e.list.map((e=>(0,_.jsx)(_V,{region:e},e.id)))}))),_V=(0,y.PA)((({region:e})=>(0,_.jsx)(uV,{region:e,mainDetails:oV,metaDetails:iV}))),AV=SV,TV=kV,PV=jV,IV=OV,LV=((0,y.PA)((({currentEntity:e,regions:t})=>{const n=t.selection;return(0,_.jsx)(Ze.eB,{name:"details-tab",children:(0,_.jsx)(CV,{selection:n,currentEntity:e})})})),(0,y.PA)((e=>{let{currentEntity:t,regions:n}=e,r=(0,Yn.A)(e,wV);const o=n.selection;return(0,_.jsx)($N,Object.assign({},r,{currentEntity:t,name:"details",title:"Details",children:(0,_.jsx)(CV,{selection:o,currentEntity:t})}))})));var MV,KV=n(99305),DV=["title","titleId"];function NV(){return NV=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var zV=function(e,t){var n=e.title,r=e.titleId,o=VV(e,DV);return p.createElement("svg",NV({width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":r},o),n?p.createElement("title",{id:r},n):null,MV||(MV=p.createElement("path",{d:"M10.2678 15C11.0376 16.3333 11.4225 17 11.9999 17C12.5772 17 12.9621 16.3333 13.7319 15L15.464 12C16.2338 10.6667 16.6187 10 16.33 9.5C16.0413 9 15.2715 9 13.7319 9H10.2678C8.72821 9 7.95841 9 7.66974 9.5C7.38106 10 7.76596 10.6667 8.53576 12L10.2678 15Z",fill:"currentColor"})))},BV=(0,p.forwardRef)(zV);n.p;const HV=["item","label","isArea"],{localStorage:FV}=window,WV="collapsed-label-pos",$V=(0,p.createContext)({regions:null}),UV=({entity:e})=>(0,_.jsx)(JV,{node:e}),ZV=({isLeaf:e})=>(0,_.jsx)(qV,{isLeaf:e}),GV=(0,y.PA)((({regions:e,regionsTree:t})=>{const n=(0,p.useRef)(),[r,o]=(0,p.useState)(0);let i=(0,p.useMemo)((()=>{let e=0;return new G((t=>{requestAnimationFrame((()=>{var r,i,a;null!=t&&null!=(r=t[0])&&r.contentRect&&(null==t||null==(i=t[0])||null==(i=i.contentRect)?void 0:i.height)!==e&&(e=(null==t||null==(a=t[0])||null==(a=a.contentRect)?void 0:a.height)||1,n.current&&o(e))}))}))}),[]);(0,p.useEffect)((()=>()=>{var e;null==(e=i)||e.disconnect(),i=null}),[]);const a=(0,p.useCallback)((e=>{var t;if(e)null==(t=i)||t.observe(e);else if(n.current){var r;null==(r=i)||r.unobserve(n.current)}n.current=e,o((null==e?void 0:e.clientHeight)||1)}),[]),s=XV(),l=e.selection.keys,c=(0,Ze.cn)("tree");let d,u;const h=(0,O.VS)(O.TU)&&"label"===e.group;if((0,O.VS)(O.TU)){var g,m,f;const[e,n]=(0,p.useState)(null!=(g=null==(m=FV.getItem(WV))||null==m.split||null==(m=m.split(","))?void 0:m.filter((e=>!!e)))?g:[]),r=e=>{FV.setItem(WV,e.join(","))},o=t=>{const o=[...e,t];n(o),r(o)},i=t=>{const o=e.filter((e=>e!==t));n(o),r(o)};d=null!=(f=t.filter((t=>!e.includes(t.pos))).map((e=>e.key)))?f:[],u=(n,{node:r})=>{const a=t.find((e=>e.key===r.key)).pos;e.includes(a)?i(a):o(a)}}return(0,_.jsx)(Ze.eB,Object.assign({name:"outliner-tree"},(0,O.VS)(O.sI)?{ref:a}:{},{children:(!!r||!(0,O.VS)(O.sI))&&(0,_.jsx)(KV.A,Object.assign({draggable:"manual"===e.group,multiple:!0,defaultExpandAll:!0,defaultExpandParent:!h,autoExpandParent:!0,checkable:!1,prefixCls:c.toClassName(),className:c.toClassName(),treeData:t,selectedKeys:l,icon:UV,switcherIcon:ZV},(0,O.VS)(O.sI)?{virtual:!0,itemHeight:34,height:r}:{},s,h?{expandedKeys:d,onExpand:u}:{}),e.group)}))})),YV=({regions:e,rootClass:t,footer:n})=>{const r=(0,p.useCallback)(((e,n,r,o,i)=>{var a;const{id:s,type:l,hidden:c,isDrawing:d}=null!=e?e:{},u=null!=(a=null==e?void 0:e.background)?a:null==e||null==e.getOneColor?void 0:e.getOneColor(),h=pt()(null!=u?u:"#666").alpha(1),g={hidden:c,type:l,isDrawing:d},m=(0,_.jsx)(uD,{item:e});return null==e||null==e.setRegionIndex||e.setRegionIndex(n+1),{idx:n,key:s,type:l,label:m,hidden:c,entity:e,color:h.css(),style:{"--icon-color":h.css(),"--text-color":h.css(),"--selection-color":h.alpha(.1).css()},className:t.elem("node").mod(g).toClassName(),title:e=>(0,_.jsx)(QV,Object.assign({},e))}}),[]),o=e.getRegionsTree(r);return n&&o.push({key:"__footer__",disabled:!0,className:t.elem("node").mod({type:"footer"}).toClassName(),title:n}),o},XV=()=>{const e=(0,p.useCallback)(((e,t)=>{const n=t.nativeEvent.ctrlKey||(0,w.isMacOS)()&&t.nativeEvent.metaKey,{node:r}=t,o=null==r?void 0:r.item;if(null==o||!o.annotation)return;const i=o.annotation;if(n)return void i.toggleRegionSelection(o);if((0,O.VS)(O.v1)&&!o.isReadOnly()&&i.isLinkingMode)return i.addLinkedRegion(o),i.stopLinkingMode(),void i.regionStore.unselectAll();const a=!o.selected;a?(i.selectArea(o),null==o.onSelectInOutliner||o.onSelectInOutliner(a)):i.unselectAll()}),[]),t=(0,p.useRef)(),n=(0,p.useCallback)((({node:e})=>{var n,r;t.current&&(null==(r=t.current)||r.setHighlight(!1));null==(n=e.item)||n.setHighlight(!0),t.current=e.item}),[]),r=(0,p.useCallback)((({node:e})=>{var n,r;(null==e||null==(n=e.item)||n.setHighlight(!1),t.current!==(null==e?void 0:e.item))&&(null==(r=t.current)||r.setHighlight(!1));t.current=void 0}),[]),o=r,i=(0,p.useCallback)((e=>{if(!e)return 0;const t=e.item.annotation.regionStore.filterByParentID(e.pid).map((e=>i(e)));return t.length?1+Math.max(...t):0}),[]);return{onSelect:e,onMouseEnter:n,onMouseLeave:r,onDrop:(0,p.useCallback)((({node:e,dragNode:t,dropPosition:n,dropToGap:r})=>{if(e.classification)return!1;const o=e.props.eventKey,a=t.props.eventKey,s=e.props.pos.split("-"),l=e.item.annotation.regionStore;n-=Number.parseInt(s[s.length-1]);const c=s.length,d=l.findRegionID(a),u=l.findRegionID(o);if(l.unhighlightAll(),2===c&&r&&-1===n)d.setParentID("");else if(-1!==n){var h,g;const e=((null==(h=u.labeling)?void 0:h.selectedLabels)||[]).filter((e=>e.groupcancontain));if(e.length){const t=d.labeling.selectedLabels,n=(0,w.flatten)(e.map((e=>e.groupcancontain.split(",")))),r=(0,w.flatten)(t.map((e=>e.alias?[e.alias,e.value]:[e.value])));if(0===n.filter((e=>-1!==r.indexOf(e))).length)return}if(null!=(g=u.labeling)&&null!=(g=g.from_name)&&g.groupdepth){let e=Number(u.labeling.from_name.groupdepth);if(e>=0){e-=i(d);let t=u;for(;t;)t=l.findRegion(t.parentID),e-=1;if(e<0)return}}d.setParentID(u.id)}}),[]),onScroll:o}},qV=(0,y.PA)((({isLeaf:e})=>e?null:(0,_.jsx)(BV,{}))),JV=(0,y.PA)((({node:e})=>e?(0,_.jsx)(LO,{node:e}):null)),QV=(0,y.PA)((e=>{var t,n;let{item:r,label:o,isArea:i}=e,a=(0,Yn.A)(e,HV);const s=null==r?void 0:r.highlighted,[l,c]=(0,p.useState)(!1),d=(0,p.useMemo)((()=>{var e;return i&&null!=(e=r.perRegionDescControls)?e:[]}),[null==r?void 0:r.perRegionDescControls,i]),u=(0,p.useMemo)((()=>d.length>0),[d.length]),h=(0,p.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c(!l)}),[l]);return(0,_.jsxs)(Ze.eB,{name:"outliner-item",children:[(0,_.jsxs)(Ze.Sl,{name:"content",children:[!a.isGroup&&(0,_.jsx)(Ze.Sl,{name:"index",children:a.idx+1}),(0,_.jsxs)(Ze.Sl,{name:"title",children:[o,(null==r?void 0:r.text)&&(0,_.jsx)(Ze.Sl,{name:"text",children:r.text.replace(/\\n/g,"\n")}),(null==r?void 0:r.isDrawing)&&(0,_.jsx)(Ze.Sl,{tag:"span",name:"incomplete",children:(0,_.jsx)(ir,{title:`Incomplete ${null!=(t=null==(n=r.type)?void 0:n.replace("region",""))?t:"region"}`,children:(0,_.jsx)(Nd,{})})})]}),(0,_.jsx)(ez,{hovered:s,item:r,entity:a.entity,regions:a.children,type:a.type,collapsed:l,hasControls:u&&i,toggleCollapsed:h})]}),u&&i&&(0,_.jsx)(Ze.Sl,{name:"ocr",children:(0,_.jsx)(tz,{item:r,controls:d,collapsed:l,setCollapsed:c,selected:a.selected})})]})})),ez=(0,y.PA)((({hovered:e,item:t,entity:n,collapsed:r,regions:o,hasControls:i,type:a,toggleCollapsed:s})=>{const{regions:l}=(0,p.useContext)($V),c=(0,p.useMemo)((()=>null!=a&&a.includes("region")||null!=a&&a.includes("range")?n.hidden:!(!(!a||a.includes("label")||null!=a&&a.includes("tool"))||!o)&&Object.values(o).every((({hidden:e})=>e))),[n,a,o]),d=(0,p.useCallback)((()=>{null!=a&&a.includes("region")||null!=a&&a.includes("range")?n.toggleHidden():!a||a.includes("label")?l.setHiddenByLabel(!c,n):null!=a&&a.includes("tool")&&l.setHiddenByTool(!c,n)}),[t,null==t?void 0:t.toggleHidden,c]),u=(0,p.useCallback)((e=>{s(e)}),[s]),h=(0,p.useCallback)((()=>{t.setLocked((e=>!e))}),[]);return(0,_.jsxs)(Ze.Sl,{name:"controls",mod:{withControls:i,newUI:(0,O.VS)(O.bA)},children:[(0,O.VS)(O.bA)?(0,_.jsx)(ir,{title:"Confidence Score",children:(0,_.jsxs)(Ze.Sl,{name:"control-wrapper",children:[(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"predict"},children:"prediction"===(null==t?void 0:t.origin)&&(0,_.jsx)(Ps,{style:{width:18,height:18}})}),(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"score"},children:(0,w.isDefined)(null==t?void 0:t.score)&&t.score.toFixed(2)})]})}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"score"},children:(0,w.isDefined)(null==t?void 0:t.score)&&t.score.toFixed(2)}),(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"dirty"}}),(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"predict"},children:"prediction"===(null==t?void 0:t.origin)&&(0,_.jsx)(Ps,{style:{width:18,height:18}})})]}),(0,_.jsxs)(Ze.Sl,{name:"wrapper",children:[(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"lock"},children:(0,_.jsx)(lV,{item:t,annotation:null==t?void 0:t.annotation,hovered:e,locked:null==t?void 0:t.locked,onClick:h})}),(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"visibility"},children:(0,O.VS)(O.bA)?(0,_.jsx)(sV,{onClick:d,style:c?void 0:{display:"none"},children:c?(0,_.jsx)(Ki,{}):(0,_.jsx)(Ai,{})}):(0,_.jsx)(sV,{onClick:d,children:c?(0,_.jsx)(Ki,{}):(0,_.jsx)(Ai,{})})}),i&&(0,_.jsx)(Ze.Sl,{name:"control",mod:{type:"visibility"},children:(0,_.jsx)(sV,{onClick:u,children:(0,_.jsx)(Dr,{style:{transform:`rotate(${r?-90:90}deg)`}})})})]})]})})),tz=(0,y.PA)((({item:e,collapsed:t,setCollapsed:n,selected:r})=>{const o=e.perRegionDescControls||[],i=(0,p.useCallback)((t=>{t.stopPropagation(),r||e.annotation.selectArea(e)}),[e,r,t]);return(0,_.jsx)(Ze.eB,{name:"ocr",mod:{collapsed:t,empty:!((null==o?void 0:o.length)>0)},onClick:i,onDragStart:e=>e.stopPropagation(),children:(0,_.jsx)(Ze.Sl,{name:"controls",children:o.map(((r,o)=>{const i=x.getPerRegionView(r.type,lt.REGION_LIST),a=e.getOneColor(),s=a?pt()(a).alpha(.2).css():void 0;return i?(0,_.jsx)(i,{item:r,area:e,collapsed:t,setCollapsed:n,color:s,outliner:!0},o):null}))})})})),nz=(0,y.PA)((({regions:e,footer:t})=>{const n=(0,Ze.cn)("tree"),r=YV({regions:e,rootClass:n,footer:t,grouping:e.group});return(0,_.jsx)($V.Provider,{value:{regions:e},children:(0,_.jsx)(GV,{regions:e,regionsTree:r})})})),rz=(0,p.createContext)({locked:!1}),oz=(e,t)=>{var n;const r=null!=(n=e.key)?n:e.label,o=t;return(0,_.jsx)(oA.Option,{value:r,style:{fontSize:12},title:r,children:e.label},`${o}`)},iz=({placeholder:e,defaultValue:t,items:n,style:r,dataTestid:o,value:i,onChange:a})=>(0,_.jsx)(oA,{placeholder:e,defaultValue:t,dataTestid:o,value:i,style:Object.assign({fontSize:12,width:"100%",backgroundColor:"#fafafa"},null!=r?r:{}),onChange:e=>a(e),size:"small",children:n.map(oz)}),az=[{key:"equal",label:"is",valueType:"single",input:(0,y.PA)((e=>(0,_.jsx)(iz,{onChange:t=>{e.onChange(!t)},items:[{label:"true",key:!0},{label:"false",key:!1}]})))}],sz=[{key:"empty",label:"is empty",input:(0,y.PA)((e=>(0,_.jsx)(iz,{onChange:t=>e.onChange(t),items:[{label:"yes"},{label:"no"}]})))}],lz=["label","className","required","labelProps","ghost","waiting"],cz=(0,p.forwardRef)(((e,t)=>{let{label:n,className:r,required:o,labelProps:i,ghost:a,waiting:s}=e,l=(0,Yn.A)(e,lz);const c=(0,Ze.cn)("input"),d=[c.mod({ghost:a}),r].join(" ").trim(),u=(0,p.useMemo)((()=>s?(0,_.jsx)("div",{className:c.elem("spinner")}):(0,_.jsx)("input",Object.assign({},l,{ref:t,className:d}))),[l,t,d,s]);return n?(0,_.jsx)(SC,Object.assign({},null!=i?i:{},{text:n,required:o,children:u})):u}));cz.displayName="Input";const dz=cz,uz=({value:e,type:t,onChange:n,placeholder:r,schema:o,style:i})=>{const a=p.useRef();return(0,_.jsx)(dz,Object.assign({size:"small",type:t,value:null!=e?e:"",ref:a,placeholder:r,"data-testid":"filter-input",onChange:()=>{var e,t,r;const o=null!=(e=null==(t=a.current)?void 0:t.value)?e:null==(r=a.current)||null==(r=r.input)?void 0:r.value;n(o)},style:i},null!=o?o:{}))},hz=(0,y.PA)((e=>(0,_.jsx)(uz,Object.assign({},e,{type:"number",value:e.value,pattern:"[0-9*]",onChange:e.onChange})))),gz=(0,y.PA)((e=>{var t,n,r,o;const i=null!=(t=null==(n=e.value)?void 0:n.min)?t:null,a=null!=(r=null==(o=e.value)?void 0:o.max)?r:null,s=t=>{console.log({newValue:t}),e.onChange(t)};return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(hz,{placeholder:"Min",value:i,onChange:e=>{s({min:Number(e),max:a})},schema:e.schema,style:{flex:1}}),(0,_.jsx)("span",{style:{padding:"0 10px"},children:"and"}),(0,_.jsx)(hz,{placeholder:"Max",value:a,onChange:e=>{s({min:i,max:Number(e)})},schema:e.schema,style:{flex:1}})]})})),mz=[{key:"equal",label:"=",valueType:"single",input:hz},{key:"not_equal",label:"≠",valueType:"single",input:hz},{key:"less",label:"<",valueType:"single",input:hz},{key:"greater",label:">",valueType:"single",input:hz},{key:"less_or_equal",label:"≤",valueType:"single",input:hz},{key:"greater_or_equal",label:"≥",valueType:"single",input:hz},{key:"in",label:"is between",valueType:"range",input:gz},{key:"not_in",label:"not between",valueType:"range",input:gz},...sz],pz=(0,y.PA)((e=>(0,_.jsx)(uz,Object.assign({},e,{type:"text",value:e.value,onChange:e.onChange,style:{fontSize:14},placeholder:e.placeholder})))),fz=[{key:"contains",label:"contains",valueType:"single",input:pz},{key:"not_contains",label:"not contains",valueType:"single",input:pz},{key:"regex",label:"regex",valueType:"single",input:pz},{key:"equal",label:"equal",valueType:"single",input:pz},{key:"not_equal",label:"not equal",valueType:"single",input:pz},...sz];let vz=function(e){return e.and="And",e.or="Or",e}({});const yz=Object.entries(vz).map((([e,t])=>({key:e,label:t}))),bz=({field:e,operation:t,value:n,logic:r,availableFilters:o,index:i,onChange:a,onDelete:s})=>{const[l,c]=(0,p.useState)(0),[u,h]=(0,p.useState)(-1),[g,m]=(0,p.useState)(null);return(0,p.useEffect)((()=>{a(i,{field:o[l].label,path:o[l].path})}),[l]),(0,p.useEffect)((()=>{const e=(null==d?void 0:d[o[l].type]).findIndex((e=>{var t;return(null!=(t=e.key)?t:e.label)===u}));if(!(0,w.isDefined)(e)||e<0)return;const t=null==d?void 0:d[o[l].type][e];a(i,{operation:null==t?void 0:t.key}),m(null==t?void 0:t.input)}),[u,l]),(0,_.jsxs)(Ze.eB,{name:"filter-row","data-testid":"filter-row",children:[(0,_.jsx)(Ze.Sl,{name:"column",children:0===i?(0,_.jsx)(Ze.Sl,{name:"title-row",children:"Where"}):(0,_.jsx)(iz,{value:r,items:yz,dataTestid:"logic-dropdown",style:{width:"60px"},onChange:e=>{a(i,{logic:e})}})}),(0,_.jsx)(Ze.Sl,{name:"column",children:(0,_.jsx)(iz,{value:e,items:o,dataTestid:"field-dropdown",style:{width:"140px"},onChange:e=>{c(o.findIndex((t=>{var n;return(null!=(n=t.key)?n:t.label)===e}))),a(i,{value:null})}})}),(0,_.jsx)(Ze.Sl,{name:"column",children:(0,_.jsx)(iz,{value:t,items:null==d?void 0:d[o[l].type],dataTestid:"operation-dropdown",style:{width:"110px"},onChange:e=>{h(e)}})}),(0,_.jsx)(Ze.Sl,{name:"column",children:g&&"empty"!==t&&(0,_.jsx)(Ze.Sl,{tag:g,value:n,onChange:e=>{a(i,{value:e})}})}),(0,_.jsx)(Ze.Sl,{name:"column",children:(0,_.jsx)(Ze.Sl,{onClick:()=>{s(i)},"data-testid":`delete-row-${i}`,name:"delete",children:(0,_.jsx)(sy,{})})})]})},xz=(e,t)=>{if((!t.value||""===t.value)&&"empty"!==t.operation)return e;switch(t.operation){case"contains":return Cz(e,t);case"not_contains":return Sz(e,t);case"in":return Az(e,t);case"not_in":return Tz(e,t);case"regex":return Pz(e,t);case"empty":return Iz(e,t);case"greater":return jz(e,t);case"less":return Oz(e,t);case"less_or_equal":return Rz(e,t);case"greater_or_equal":return kz(e,t);case"equal":return Ez(e,t);case"not_equal":return _z(e,t);default:return e}},wz=(e,t)=>{const n=[[...e]];for(let r=0;re.includes(t)?e:[...e,t]),[])},Cz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{const n=Lz(t.path,e);return null==n?void 0:n.toLowerCase().includes(t.value.toLowerCase())})):e,Sz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{const n=Lz(t.path,e);return!(null!=n&&n.toLowerCase().includes(t.value.toLowerCase()))})):e,jz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>Lz(t.path,e)>t.value)):e,kz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>Lz(t.path,e)>=t.value)):e,Oz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>Lz(t.path,e)(0,w.isDefined)(t.value)?e.filter((e=>Lz(t.path,e)<=t.value)):e,Ez=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{var n;const r=Lz(t.path,e);return(null==r?void 0:r.toString().toLowerCase())===(null==(n=t.value)?void 0:n.toString().toLowerCase())})):e,_z=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{var n;const r=Lz(t.path,e);return(null==r?void 0:r.toString().toLowerCase())!==(null==(n=t.value)?void 0:n.toLowerCase())})):e,Az=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{const n=Lz(t.path,e);return t.value.min<=n&&n<=t.value.max})):e,Tz=(e,t)=>(0,w.isDefined)(t.value)?e.filter((e=>{const n=Lz(t.path,e);return n<=t.value.min||t.value.max<=n})):e,Pz=(e,t)=>{try{return e.filter((e=>{const n=Lz(t.path,e),r=new RegExp(t.value,"g");return n.match(r)}))}catch(t){return e}},Iz=(e,t)=>e.filter((e=>{const n=Lz(t.path,e);return""===n||!n||null==n||"blank"===n})),Lz=(e,t,n=".")=>(Array.isArray(e)?e:e.split(n)).reduce(((e,t)=>null==e?void 0:e[t]),t),Mz=({availableFilters:e,filterData:t,onChange:n,animated:r=!0})=>{const[o,i]=(0,p.useState)([]),[a,s]=(0,p.useState)(!1);(0,p.useEffect)((()=>{n(wz(t,o))}),[t]);const l=(0,p.useCallback)((()=>{i((t=>{var n,r;return[...t,{field:null!=(n=null==(r=e[0])?void 0:r.label)?n:"",logic:"and",operation:"",value:"",path:""}]}))}),[i,e]),c=(0,p.useCallback)(((e,{field:r,operation:o,value:a,path:s,logic:l})=>{i((i=>{const c=[...i];return c[e]=Object.assign({},c[e],{field:null!=r?r:c[e].field,operation:null!=o?o:c[e].operation,logic:null!=l?l:c[e].logic,value:null!=a?a:c[e].value,path:null!=s?s:c[e].path}),n(wz(t,c)),c}))}),[i,t]),d=(0,p.useCallback)((e=>{i((r=>{const o=[...r];return o.splice(e,1),o[0]&&(o[0].logic="and"),n(wz(t,o)),o}))}),[i,t]),u=(0,p.useMemo)((()=>o.map((({field:t,operation:n,logic:r,value:o},i)=>(0,_.jsx)(Ze.eB,{name:"filter-item",children:(0,_.jsx)(bz,{index:i,availableFilters:e,field:t,logic:r,operation:n,value:o,onDelete:d,onChange:c})},i)))),[o,e,d,c]),h=(0,p.useMemo)((()=>(0,_.jsxs)(Ze.eB,{name:"filter",children:[o.length>0?u:(0,_.jsx)(Ze.Sl,{name:"empty",children:"No filters applied"}),(0,_.jsxs)(za,{look:"alt",size:"small",type:"text",onClick:l,children:["Add ",o.length?"Another Filter":"Filter"]})]})),[o,u,l]),g=(0,p.useCallback)((e=>{s(e)}),[]);return(0,_.jsx)(Q_.Trigger,{content:h,dataTestId:"dropdown",animated:r,onToggle:g,children:(0,_.jsxs)(Ze.eB,{"data-testid":"filter-button",name:"filter-button",mod:{active:a},children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(ty,{})}),(0,_.jsx)(Ze.Sl,{name:"text",style:{fontSize:(0,O.VS)(O.bA)&&12,fontWeight:(0,O.VS)(O.bA)&&500,lineHeight:(0,O.VS)(O.bA)&&"24px"},children:"Filter"}),o.length>0&&(0,_.jsx)(Ze.Sl,{name:"filter-length","data-testid":"filter-length",children:o.length})]})})},{Block:Kz,Elem:Dz}=(0,Ze.JE)(),Nz=(0,y.PA)((({ordering:e,regions:t,orderingDirection:n,onOrderingChange:r,onGroupingChange:o,onFilterChange:i})=>{const a=t.group,s=(0,p.useContext)(rz),l=(0,p.useCallback)((e=>{switch(e){case"manual":return{label:"Group Manually",selectedLabel:(0,O.VS)(O.bA)?"Manual":"Manual Grouping",icon:(0,_.jsx)(lv,{}),tooltip:"Manually Grouped"};case"label":return{label:"Group by Label",selectedLabel:(0,O.VS)(O.bA)?(0,O.VS)(O.CZ)?"By Label":"Label":"Grouped by Label",icon:(0,_.jsx)(wv,{}),tooltip:"Grouped by Label"};case"type":return{label:"Group by Tool",selectedLabel:(0,O.VS)(O.bA)?(0,O.VS)(O.CZ)?"By Tool":"Tool":"Grouped by Tool",icon:(0,_.jsx)(ev,{}),tooltip:"Grouped by Tool"}}}),[]),c=(0,p.useCallback)((e=>{switch(e){case"date":return{label:"Order by Time",selectedLabel:"By Time",icon:(0,_.jsx)(Kf,{})};case"score":return{label:"Order by Score",selectedLabel:"By Score",icon:(0,_.jsx)(mv,{})}}}),[]),d="asc"===n?(0,_.jsx)(Lv,{style:{color:"#898098"}}):(0,_.jsx)(Zv,{style:{color:"#898098"}});return(0,_.jsxs)(Kz,{name:"view-controls",mod:{collapsed:s.locked,FF_LSDV_4992:(0,O.VS)(O.CZ)},children:[(0,_.jsx)(Vz,{value:a,options:["manual","type","label"],onChange:e=>o(e),readableValueForKey:l}),"manual"===a&&(0,_.jsx)(Dz,{name:"sort",children:(0,_.jsx)(Vz,{value:e,direction:n,options:["score","date"],onChange:e=>r(e),readableValueForKey:c,allowClickSelected:!0,extraIcon:d})}),(0,O.VS)(O.oh)&&(0,_.jsx)(Mz,{onChange:i,filterData:null==t?void 0:t.regions,availableFilters:[{label:"Annotation results",path:"labelName",type:"String"},{label:"Confidence score",path:"score",type:"Number"}]}),(0,O.VS)(O.CZ)?(0,_.jsx)(Hz,{regions:t}):null]})})),Vz=({value:e,options:t,direction:n,allowClickSelected:r,onChange:o,readableValueForKey:i,extraIcon:a})=>{const s=(0,p.useMemo)((()=>i(e)),[e]),l=(0,p.useMemo)((()=>t.map((e=>[e,i(e)]))),[]),c=(0,p.useMemo)((()=>(0,_.jsx)(wT,{size:"medium",style:{width:200,minWidth:200,borderRadius:(0,O.VS)(O.bA)&&4},selectedKeys:[e],allowClickSelected:r,children:l.map((([t,r])=>(0,_.jsx)(zz,{name:t,value:e,direction:n,label:r,onChange:e=>o(e)},t)))})),[e,l,s,n,o]),d=(0,O.VS)(O.bA)?{mod:{newUI:!0}}:void 0,u=(0,O.VS)(O.CZ)?{}:{padding:"0",whiteSpace:"nowrap"};return(0,O.VS)(O.bA)&&(u.padding="0 12px 0 2px"),(0,_.jsx)(Q_.Trigger,{content:c,style:{width:200},children:(0,_.jsx)(za,Object.assign({type:"text","data-testid":`grouping-${e}`},d,{icon:s.icon,style:u,extra:(0,O.VS)(O.bA)?a:(0,_.jsx)(Bz,{direction:n,name:e,value:e,wrap:!1}),tooltip:(0,O.VS)(O.CZ)&&s.tooltip||void 0,tooltipTheme:"dark",children:s.selectedLabel}))})},zz=({value:e,name:t,label:n,direction:r,onChange:o})=>(0,_.jsx)(wT.Item,{name:t,onClick:()=>o(t),children:(0,_.jsxs)(Dz,{name:"label",children:[n.label,(0,_.jsx)(Bz,{direction:r,name:t,value:e})]})}),Bz=({direction:e,value:t,name:n,wrap:r=!0})=>{const o="asc"===e?(0,_.jsx)(Ev,{}):(0,_.jsx)(Bv,{});return!e||t!==n||(0,O.VS)(O.bA)?null:r?(0,_.jsx)("span",{children:o}):o},Hz=(0,y.PA)((({regions:e})=>{var t;const n=(0,p.useCallback)((t=>{t.preventDefault(),t.stopPropagation(),e.toggleVisibility()}),[e]),r=!(null!=e&&null!=(t=e.regions)&&t.length),o=!r&&e.isAllHidden;return(0,_.jsx)(Dz,{tag:za,type:"text",disabled:r,onClick:n,mod:{hidden:o},"aria-label":o?"Show all regions":"Hide all regions",icon:o?(0,_.jsx)(Qw,{}):(0,_.jsx)(Hw,{}),tooltip:o?"Show all regions":"Hide all regions",tooltipTheme:"dark"})})),Fz=["regions"],Wz=[];(0,O.VS)(O.CZ)&&Wz.push("ff_hide_all_regions"),(0,O.VS)(O.sI)&&Wz.push("ff_outliner_optim");const $z=(0,y.PA)((({regions:e})=>{var t,n,r,o,i;const a=(null==e||null==(t=e.regions)?void 0:t.length)>0&&0===(null==e||null==(n=e.filter)?void 0:n.length),s=(0,p.useMemo)((()=>{var t,n,r,o;return null!=e&&null!=(t=e.regions)&&t.length&&null!=(n=e.filter)&&n.length?(null==e||null==(r=e.regions)?void 0:r.length)-(null==e||null==(o=e.filter)?void 0:o.length):0}),[null==e||null==(r=e.regions)?void 0:r.length,null==e||null==(o=e.filter)?void 0:o.length]);return(0,_.jsx)(_.Fragment,{children:a?(0,_.jsxs)(Ze.eB,{name:"filters-info",children:[(0,_.jsx)(Kw,{width:21,height:20}),(0,_.jsx)(Ze.Sl,{name:"filters-title",children:"All regions hidden"}),(0,_.jsx)(Ze.Sl,{name:"filters-description",children:"Adjust or remove the filters to view"})]}):(null==e||null==(i=e.regions)?void 0:i.length)>0?(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(nz,{regions:e,footer:s>0&&(0,_.jsxs)(Ze.eB,{name:"filters-info",children:[(0,_.jsx)(Kw,{width:21,height:20}),(0,_.jsxs)(Ze.Sl,{name:"filters-title",children:["There ",1===s?"is":"are"," ",s," hidden region",s>1&&"s"]}),(0,_.jsx)(Ze.Sl,{name:"filters-description",children:"Adjust or remove filters to view"})]})})}):(0,_.jsx)(Ze.Sl,{name:"empty",children:"Regions not added"})})})),Uz=(0,y.PA)((({regions:e})=>{const t=(0,p.useCallback)((t=>{e.setSort(t)}),[e]),n=(0,p.useCallback)((t=>{e.setGrouping(t)}),[e]),r=(0,p.useCallback)((t=>{e.setFilteredRegions(t)}),[e]);return(0,_.jsxs)(Ze.eB,{name:"outliner",mix:Wz,children:[(0,_.jsx)(Nz,{ordering:e.sort,regions:e,orderingDirection:e.sortOrder,onOrderingChange:t,onGroupingChange:n,onFilterChange:r}),(0,_.jsx)($z,{regions:e})]})})),Zz=(0,y.PA)((e=>{let{regions:t}=e,n=(0,Yn.A)(e,Fz);const[r,o]=(0,p.useState)(),i=(0,p.useCallback)((e=>{t.setSort(e)}),[t]),a=(0,p.useCallback)((e=>{t.setGrouping(e),o(e)}),[t]),s=(0,p.useCallback)((e=>{t.setFilteredRegions(e)}),[t]);return(0,p.useEffect)((()=>{o(t.group)}),[]),t.setGrouping(r),(0,_.jsxs)($N,Object.assign({},n,{name:"outliner",mix:Wz,title:"Outliner",children:[(0,_.jsx)(Nz,{ordering:t.sort,regions:t,orderingDirection:t.sortOrder,onOrderingChange:i,onGroupingChange:a,onFilterChange:s}),(0,_.jsx)($z,{regions:t})]}))})),Gz=e=>{const[t,n]=(0,p.useState)(window.matchMedia(e));return(0,p.useEffect)((()=>{const t=()=>{n(window.matchMedia(e))};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)}),[]),(0,p.useEffect)((()=>{n(window.matchMedia(e))}),[e]),t},Yz=980,Xz=(e,t)=>{const n=window.localStorage.getItem(`panel:${e}`);return n?Object.assign({},t,JSON.parse(n)):t},qz=(e,t)=>{window.localStorage.setItem(`panel:${e}`,JSON.stringify(t))},Jz={outliner:{title:"Outliner",component:Zz,icon:_f},details:{title:"Details",component:LV,icon:Kf}},Qz=(0,y.PA)((({currentEntity:e,panelsHidden:t,children:n})=>{const r=e.regionStore,o=(0,p.useRef)({width:0,height:0}),i=Gz("screen and (max-width: 980px)"),[a,s]=(0,p.useState)(500),[l,c]=(0,p.useState)(!1),[d,u]=(0,p.useState)(!1),[h,g]=(0,p.useState)(!1),[m,f]=(0,p.useState)(!1),v=(0,p.useRef)(),[y,b]=(0,p.useState)(),x=(0,p.useRef)(y),[C,S]=(0,p.useState)({outliner:Xz("outliner",{top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:zN,height:BN,visible:!0,detached:!1,alignment:"left",maxHeight:HN}),details:Xz("details",{top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:zN,height:BN,visible:!0,detached:!1,alignment:"right",maxHeight:HN})});XM(e);const j=(0,p.useMemo)((()=>l||i.matches),[l,i.matches]),k=(0,p.useCallback)(((e,t)=>{S((n=>{const r=Object.assign({},n[e],t);return qz(e,r),Object.assign({},n,{[e]:r})}))}),[C]),R=(0,p.useCallback)(((e,t)=>{const n=C[e],r=T(e,n.top,n.left,t);k(e,{visible:t,storedTop:r.top/o.current.height*100,storedLeft:r.left/o.current.width*100})}),[k]),E=(0,p.useCallback)((e=>(0,O.VS)(O.bA)||void 0===Object.values(C).find((t=>t.alignment===e&&!t.detached))),[C]),A=(0,p.useCallback)(((e,t,n)=>{const r=e+n,o=t-5;e>=0&&e<=5&&E("left")?b("left"):r<=t&&r>=o&&E("right")?b("right"):b(void 0)}),[E]),T=(e,t,n,r)=>{var o,i,a,s;const l=C[e],c=null!=(o=null==(i=v.current)?void 0:i.clientWidth)?o:0,d=l.detached?(null!=r?r:l.visible)?l.height:26:l.height;return{left:(0,w.clamp)(n,0,c-l.width),top:(0,w.clamp)(t,0,(null!=(a=null==(s=v.current)?void 0:s.clientHeight)?a:0)-d)}},P=(0,p.useCallback)((e=>{const t=Object.entries(C).reduce(((e,[t,n])=>{const r=Object.assign({},n,{zIndex:1});return g(!0),qz(t,r),Object.assign({},e,{[t]:r})}),Object.assign({},C));t[e]=Object.assign({},t[e],{zIndex:15}),qz(e,t[e]),S(t)}),[C]),I=(0,p.useCallback)(((e,t,n,r)=>{var i,a;const s=C[e],l=null!=(i=null==(a=v.current)?void 0:a.clientWidth)?i:0,{left:c,top:d}=T(e,t,n,s.visible),u=o.current.height-d;A(c,l,s.width),requestAnimationFrame((()=>{k(e,{top:d,left:c,relativeTop:d/o.current.height*100,relativeLeft:c/o.current.width*100,storedLeft:void 0,storedTop:void 0,detached:r,maxHeight:u,alignment:r?void 0:s.alignment})}))}),[k,A,C]),L=(0,p.useCallback)((()=>{u((()=>!0))}),[]),M=(0,p.useCallback)((()=>{u((()=>!1))}),[]),K=(0,p.useCallback)((e=>Object.keys(C).filter((t=>{var n;return(null==(n=C[t])?void 0:n.alignment)===e}))),[C]),D=(0,p.useCallback)(((e,t,n,r,i)=>{const{left:s,top:l}=T(e,r,i),c=o.current.height-l;requestAnimationFrame((()=>{if((0,O.VS)(O.bA)){var r;K(null==(r=C[e])?void 0:r.alignment).forEach((e=>{k(e,{top:l,left:s,relativeTop:l/o.current.height*100,relativeLeft:s/o.current.width*100,storedLeft:void 0,storedTop:void 0,maxHeight:c,width:(0,w.clamp)(t,zN,a),height:(0,w.clamp)(n,BN,c)})}))}else k(e,{top:l,left:s,relativeTop:l/o.current.height*100,relativeLeft:s/o.current.width*100,storedLeft:void 0,storedTop:void 0,maxHeight:c,width:(0,w.clamp)(t,zN,a),height:(0,w.clamp)(n,BN,c)})}))}),[k,a,C]),N=(0,p.useCallback)((e=>{if(g(!1),!x.current)return;const t={alignment:x.current,detached:!1};if((0,O.VS)(O.bA)){var n;const o=null==(n=K(x.current).filter((t=>t!==e)))?void 0:n[0];var r;if(o)t.width=(0,w.clamp)(null==(r=C[o])?void 0:r.width,zN,a)}k(e,t),b(void 0)}),[k]),V=(0,p.useMemo)((()=>({onResize:D,onResizeStart:L,onResizeEnd:M,onPositionChange:I,onVisibilityChange:R,onPositionChangeBegin:P,onSnap:N})),[D,L,M,I,R,N]),z=(0,p.useMemo)((()=>Object.assign({},V,{root:v,regions:r,selection:r.selection,currentEntity:e})),[V,v,r,r.selectio,e]),B=(0,p.useMemo)((()=>{if(t&&(0,O.VS)(O.bA))return{};const e={paddingLeft:0,paddingRight:0};return j?e:Object.values(C).reduce(((e,n)=>{const r=(0,O.VS)(O.bA)||!t&&!n.detached&&n.visible?n.width:FN,o="left"===n.alignment?"paddingLeft":"paddingRight";return n.detached?e:Object.assign({},e,{[o]:r})}),e)}),[t,C,j]),H=(0,p.useMemo)((()=>{if(t)return{};const e={detached:[],left:[],right:[]},n=Object.entries(C);for(const[t,i]of n){var r,o;const{alignment:n,detached:s}=i,l=Jz[t],c=l.component,d=l.icon,u={props:Object.assign({},i,z,{top:null!=(r=i.storedTop)?r:i.top,left:null!=(o=i.storedLeft)?o:i.left,tooltip:l.title,icon:(0,_.jsx)(d,{}),positioning:h,maxWidth:a,zIndex:i.zIndex,expanded:j,alignment:j?"left":i.alignment,locked:j}),Component:c};s?e.detached.push(u):"left"===n?e.left.push(u):"right"===n&&e.right.push(u)}return e}),[C,z,t,j,h,a]);(0,p.useEffect)((()=>{x.current=y}),[y]),(0,p.useEffect)((()=>{const e=v.current;if(!e)return;const t=()=>{var e,t;return(null!=(e=null==(t=v.current)?void 0:t.clientWidth)?e:0){requestAnimationFrame((()=>{if(!v.current)return;const{clientWidth:e,clientHeight:n}=v.current;e<=Yz||(o.current.width=null!=e?e:0,o.current.height=null!=n?n:0,c(t()),s(.4*v.current.clientWidth))}))}));return e&&(n.observe(e),c(t()),s(.4*e.clientWidth),f(!0)),()=>{e&&n.unobserve(e),n.disconnect()}}),[]);const F=(0,p.useMemo)((()=>({locked:j})),[j]);return(0,_.jsx)(rz.Provider,{value:F,children:(0,_.jsx)(Ze.eB,{ref:e=>{e&&(v.current=e,c(e.clientWidth<=Yz))},name:"sidepanels",style:Object.assign({},B),mod:{collapsed:j,newLabelingUI:(0,O.VS)(O.bA)},children:m&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"content",mod:{resizing:d||h},children:n}),!0!==t&&(0,_.jsx)(_.Fragment,{children:Object.entries(H).map((([e,t])=>{const n=t.map((({props:e,Component:t},n)=>(0,_.jsx)(t,Object.assign({},e),n)));return"detached"===e?(0,_.jsx)(p.Fragment,{children:n},e):(0,_.jsx)(Ze.Sl,{name:"wrapper",mod:{align:e,snap:y===e},children:n},e)}))})]})})})}));let eB=function(e){return e.left="left",e.right="right",e}({}),tB=function(e){return e.left="left",e.right="right",e.topRight="right-top",e.topLeft="left-top",e.bottomRight="right-bottom",e.bottomLeft="left-bottom",e}({}),nB=function(e){return e.top="top",e.bottom="bottom",e}({});const rB={order:0,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:1,width:zN,height:BN,visible:!0,detached:!0,alignment:eB.left,maxHeight:HN,panelViews:[]},oB=(e,t)=>{const n=t||e.target,r=n.clientWidth;return e.pageX-n.getBoundingClientRect().left>r/2?eB.right:eB.left},iB=(e,t,n)=>{const r=Object.assign({},e);return r[t]?Object.assign({},r,{[t]:Object.assign({},r[t],{panelViews:r[t].panelViews.filter(((e,t)=>t!==n))})}):r},aB=(e,t,n)=>{const r=Object.assign({},e,{[t]:Object.assign({},e[t],{panelViews:e[t].panelViews.map(((e,t)=>(e.active=t===n,e)))})});return r},sB=e=>{const t=Object.assign({},e);return Object.values(t).forEach((e=>{const t=!e.panelViews.find((e=>e.active));t&&(e.panelViews[0].active=!0)})),t},lB=e=>{const t={};return Object.keys(e).forEach((n=>{const r=`${e[n].panelViews.map((e=>e.name)).join("-")}`,o=Object.assign({},e[n]);Object.assign(t,{[r]:o})})),t},cB=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{0===t[e].panelViews.length&&delete t[e]})),t},dB={regions:Uz,history:TV,relations:PV,comments:AV,info:IV},uB=[{name:"regions",title:"Regions",component:dB.regions,active:!0},{name:"history",title:"History",component:dB.history,active:!1},{name:"relations",title:"Relations",component:dB.relations,active:!1},{name:"info",title:"Info",component:dB.info,active:!0},{name:"comments",title:"Comments",component:dB.comments,active:!1}],hB={"info-comments-history":{order:1,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:zN,height:BN,visible:!0,detached:!1,alignment:eB.right,maxHeight:HN,panelViews:[uB[3],uB[4],uB[1]]},"regions-relations":{order:2,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:zN,height:BN,visible:!0,detached:!1,alignment:eB.right,maxHeight:HN,panelViews:[uB[0],uB[2]]}},gB={"info-history":{order:1,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:zN,height:BN,visible:!0,detached:!1,alignment:eB.right,maxHeight:HN,panelViews:[uB[3],uB[1]]},"regions-relations":{order:2,top:0,left:0,relativeLeft:0,relativeTop:0,zIndex:10,width:zN,height:BN,visible:!0,detached:!1,alignment:eB.right,maxHeight:HN,panelViews:[uB[0],uB[2]]}},mB=Object.assign({},rB,{name:"breakpointCollapsed",positioning:!1,height:BN,maxHeight:BN,detached:!1,maxWidth:500,zIndex:10,expanded:!0,locked:!0,alignment:eB.left,lockPanelContents:!1,attachedKeys:[],sidePanelCollapsed:{[eB.left]:!1,[eB.right]:!1},setSidePanelCollapsed:()=>{},dragTop:!1,dragBottom:!1,panelViews:[uB[0],uB[1],uB[2],uB[3],uB[4]]}),pB=["top-left","top-right","bottom-left","bottom-right","top","bottom","right","left"],fB=e=>{var t;const n=window.localStorage.getItem("panelState"),r=n&&JSON.parse(n),o=r&&r.panelData,i={[eB.left]:!1,[eB.right]:!1},a=null!=(t=null==r?void 0:r.collapsedSide)?t:i,s=o&&Object.values(o).flatMap((e=>e.panelViews)),l=uB.length-(e?0:1);if(!s||s.length!==l){return{panelData:e?hB:gB,collapsedSide:i}}const c=cB(o),d=sB(c),u=((e,t)=>{const n=Object.assign({},e);return Object.keys(n).filter((e=>n[e])).forEach((e=>{const r=Object.keys(t).some((n=>t[n].alignment===e&&!t[n].detached));r||(n[e]=!1)})),n})(a,d);return{panelData:vB(d),collapsedSide:u}},vB=e=>{const t=Object.assign({},e);return Object.keys(t).forEach((e=>{t[e].panelViews.forEach((e=>{e.component=dB[e.name]}))})),t},yB=e=>Object.keys(e).filter((t=>!e[t].detached&&e[t].alignment===eB.left)),bB=e=>Object.keys(e).filter((t=>!e[t].detached&&e[t].alignment===eB.right)),xB=(e,t)=>t===eB.left?yB(e).sort(((t,n)=>e[t].order-e[n].order)):t===eB.right?bB(e).sort(((t,n)=>e[t].order-e[n].order)):void 0,wB=(e,t)=>{const n=Object.assign({},e);return[yB(n),bB(n)].forEach((r=>{const o=r.filter((t=>!e[t].visible)).length,i=r.filter((t=>e[t].visible)),a=FN*o,s=i.reduce(((e,t)=>e+n[t].height),0),l=t-a-s,c=l<0,d=Math.abs(l)/(i.length||1);let u=0;i.forEach((e=>{const t=c?n[e].height-d:n[e].height+d;n[e].visible?(n[e].height=t,n[e].top=u,u+=t):u+=FN}))})),n},CB=(e,t,n)=>{const r=Object.assign({},e),o=xB(r,n);if(null==o||!o.length)return e;const i=o.filter((e=>r[e].visible)),a=o.filter((e=>!r[e].visible)).length,s=(t-FN*a)/i.length||1;return i.forEach((e=>{let t=0;r[e].visible?(r[e].height=s,r[e].top=t,t+=s):t+=FN})),r},SB=(e,t,n,r,o,i=nB.bottom)=>{const a=Object.assign({},e),s=xB(a,n),l=s?s.reduce(((t,n)=>t{const o=Object.assign({},e);o[t].order=r===nB.top?0:n.length;let i=r===nB.bottom?0:1;return n.forEach((e=>{t!==e&&(o[e].order=i,i+=1)})),o})(c,t,xB(c,n),i),u=kB(d,t);return CB(u,o,n)},jB=(e,t,n,r,o,i,a)=>{const s=((e,t,n,r,o,i,a)=>Object.assign({},rB,{name:t,panelViews:[Object.assign({},e[n].panelViews[r],{active:!0})],top:i,left:o,relativeTop:i/a.current.height*100,relativeLeft:o/a.current.width*100,visible:!0,detached:!0,zIndex:12}))(e,t,n,r,o,i,a),l=iB(e,n,r),c=cB(l),d=Object.assign({},c,{[`${s.name}`]:s}),u=lB(d),h=sB(u),g=kB(h,s.name);return wB(g,a.current.height)},kB=(e,t)=>{const n=Object.assign({},e),[r,o]=(e=>Object.keys(e).reduce(((t,n)=>(e[n].detached?t[0].push({zIndex:e[n].zIndex,panelKey:n}):t[1].push({zIndex:e[n].zIndex,panelKey:n}),t)),[[],[]]))(n);let i=12;return o.forEach((e=>n[e.panelKey].zIndex=10)),r.sort(((e,t)=>e.zIndex-t.zIndex)).forEach((e=>{n[e.panelKey].zIndex=i,i++})),n[t].detached&&(n[t].zIndex=r.length+12),n},OB=({name:e,root:t,width:n,maxWidth:r,height:o,visible:i,detached:a,alignment:s,top:l,left:c,relativeTop:d,relativeLeft:u,zIndex:h,locked:g=!1,positioning:m=!1,onSnap:f,onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:x,onVisibilityChange:C,onPositionChange:S,onPositionChangeBegin:j,children:k,panelViews:O,attachedKeys:R,sidePanelCollapsed:E,setSidePanelCollapsed:A,dragTop:T,dragBottom:P,lockPanelContents:I})=>{const L=(0,p.useRef)(),M=(0,p.useRef)(),K=(0,p.useRef)(),D=(0,p.useRef)(),N=(0,p.useRef)({onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:x,onPositionChange:S,onPositionChangeBegin:j,onVisibilityChange:C,onSnap:f}),[V,z]=(0,p.useState)(),B=(0,p.useRef)(e),H=E[s]&&!a,F=R&&R[0]===e,W=R&&R.includes(e)&&R[0]!==e,$=!(H&&!F),U=i&&!H?"Collapse":"Expand";N.current={onResize:v,onGroupHeightResize:y,onResizeStart:b,onResizeEnd:x,onPositionChange:S,onPositionChangeBegin:j,onVisibilityChange:C,onSnap:f},B.current=e;const Z=(0,p.useMemo)((()=>{const e=i?{height:g?BN:H?"100%":null!=o?o:"100%",width:g?"100%":H?FN:null!=n?n:"100%"}:{width:H?"100%":null!=n?n:zN,height:H?"100%":FN};return Object.assign({},e,{zIndex:h})}),[n,o,i,g,H,h]),G=(0,p.useMemo)((()=>a&&!g?{top:`${d}%`,left:`${u}%`}:{}),[a,d,u,g]),Y=(0,p.useMemo)((()=>({detached:!g&&a,hidden:!i,alignment:a?"left":null!=s?s:"left",disabled:g,collapsed:H,dragTop:T&&R&&R[0]===e,dragBottom:P&&R&&R[R.length-1]===e})),[s,i,a,V,g,H,T,P]);VN({elementRef:L,disabled:g,onMouseDown(e){var n;const r=e.target,o="[class*=__toggle]";if(r.matches(o)||r.closest(o)||H)return;const i=M.current,l=t.current.getBoundingClientRect(),c=i.getBoundingClientRect(),d=null==(n=e.target)?void 0:n.getBoundingClientRect(),u=e.clientX-d.left,h=e.clientY-d.top,[g,m]=[e.pageX,e.pageY],[p,f]=[c.left-l.left,c.top-l.top],{current:v}=B,[y,b]=[g-u,m-h];return null==N.current.onPositionChangeBegin||N.current.onPositionChangeBegin(v,y,b,s,a),{x:g,y:m,oX:p,oY:f,allowDrag:!0,alignment:s,key:v}},onMouseMove(e,t){if(!t)return;const{x:n,y:r,oX:o,oY:i,key:a}=t,[l,c]=[e.pageX,e.pageY];var d,u,h,g;if((d=n,u=l,h=r,g=c,Math.sqrt((u-d)**2+(g-h)**2))<30)return;const[m,p]=[o+(l-n),i+(c-r)];null==N.current.onPositionChange||N.current.onPositionChange(a,p,m,!0,s)},onMouseUp(e,t){if(!t)return;const{key:n}=t;null==N.current.onSnap||N.current.onSnap(n)}},[a,i,g,s,e,H,L.current]),VN({elementRef:K,disabled:g||m,capture:!0,passive:!0,onMouseDown(e){const t=e.target.dataset.resize,i=(()=>{switch(t){case"top-left":return"top-left";case"top":case"top-right":return"top";case"left":case"bottom-left":return"left"}})(),a={x:null!==(null==t?void 0:t.match(/left|right/i)),y:null!==(null==t?void 0:t.match(/top|bottom/i))};return z(t),null==N.current.onResizeStart||N.current.onResizeStart(),{pos:[e.pageX,e.pageY],type:t,width:n,maxWidth:r,height:o,top:l,left:c,resizeDirections:a,shift:i}},onMouseMove(e,t){if(t){const{pos:n,width:r,height:o,maxWidth:i,top:a,left:s,resizeDirections:l,shift:c}=t,[d,u]=n,h=l.x?e.pageX-d:0,g=l.y?e.pageY-u:0,m=(0,w.isDefined)(c)&&["left","top-left"].includes(c),p=(0,w.isDefined)(c)&&["top","top-left"].includes(c),f=(0,w.clamp)(m?r-h:r+h,zN,i),v=(0,w.clamp)(p?o-g:o+g,55,a+o),y=p?a+(o-v):a,b=m?s+(r-f):s,{current:x}=B;N.current.onResize(x,f,v,y,b)}},onMouseUp(){null==N.current.onResizeEnd||N.current.onResizeEnd(),z(void 0)}},[N,a,n,r,o,l,c,i,g,m]),VN({elementRef:D,disabled:g||m,capture:!0,passive:!0,onMouseDown:e=>(z("grouped-top"),null==N.current.onResizeStart||N.current.onResizeStart(),{sY:e.pageY,h:o}),onMouseMove(e,t){if(!t)return;const{sY:n,h:r}=t,o=e.pageY-n,i=r-o,{current:a}=B;null==N.current.onGroupHeightResize||N.current.onGroupHeightResize(a,i,o)},onMouseUp(){null==N.current.onResizeEnd||N.current.onResizeEnd(),z(void 0)}},[N,n,o,l,c,g,m,D.current]);const X=()=>{A(Object.assign({},E,{[s]:!E[s]}))},q=(0,p.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),null==C||C(e,!i)}),[C,e,i]);return(0,_.jsxs)(Ze.eB,{ref:M,name:"tabs-panel",mod:Y,style:Object.assign({},Z,G),children:[(0,_.jsxs)(Ze.Sl,{name:"content",children:[!g&&$&&(0,_.jsxs)(_.Fragment,{children:[W&&i&&(0,_.jsx)(Ze.Sl,{name:"grouped-top",ref:D,mod:{drag:"grouped-top"===V},"data-resize":"grouped-top"}),(0,_.jsxs)(Ze.Sl,{ref:L,onClick:()=>{H&&X()},id:e,mod:{collapsed:H},name:"header",children:[(0,_.jsxs)(Ze.Sl,{name:"header-left",children:[!H&&(0,_.jsx)(Ze.Sl,{name:"icon",style:{pointerEvents:"none"},tag:Aw,width:8}),!i&&!H&&(0,_.jsx)(Ze.Sl,{name:"title",children:O.map((e=>e.title)).join(" ")})]}),(0,_.jsxs)(Ze.Sl,{name:"header-right",children:[(!a||H)&&(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{detached:a,collapsed:H,alignment:s},onClick:X,"data-tooltip":`${U} Group`,children:eB.left===s?(0,_.jsx)(ky,{}):(0,_.jsx)(Dy,{})}),!H&&(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{detached:a,collapsed:H,alignment:s},onClick:q,"data-tooltip":U,children:i?(0,_.jsx)(Lc,{}):(0,_.jsx)(wc,{})})]})]})]}),i&&!H&&(0,_.jsxs)(Ze.Sl,{name:"body",children:[I&&(0,_.jsx)(Ze.Sl,{name:"shield"}),k]})]}),i&&!m&&!g&&(0,_.jsx)(Ze.Sl,{name:"resizers",ref:K,mod:{locked:m||g},children:pB.map((e=>!H&&(("left"===e||"right"===e)&&s!==e||a)?(0,_.jsx)(Ze.Sl,{name:"resizer",mod:{drag:e===V},"data-resize":e},e):null))})]})},RB=[];var EB=function(e){return e.tabLeft="lsf-drag_over_tab_left",e.tabRight="lsf-drag_over_tab_right",e.emptyTabSpace="lsf-drag_over_empty_tab_space",e}(EB||{});const _B=()=>{RB.forEach((e=>{null==e||e.classList.remove(EB.tabLeft),null==e||e.classList.remove(EB.tabRight),null==e||e.classList.remove(EB.emptyTabSpace)}))},AB=({name:e,rootRef:t,tabTitle:n,tabIndex:r,panelKey:o,viewLength:i,children:a,active:s,panelWidth:l,locked:c,breakPointActiveTab:d,setBreakPointActiveTab:u,transferTab:h,createNewPanel:g,setActiveTab:m,checkSnap:f})=>{const v=(0,p.useRef)(),y=(0,p.useRef)(),b=(0,p.useRef)(!1),x=(0,p.useRef)({panelKey:o,tabIndex:r}),[w,C]=(0,p.useState)(!1);x.current={panelKey:o,tabIndex:r},VN({elementRef:v,onMouseDown(e){var n;if(c)return void(u&&u(x.current.tabIndex));if(2===e.buttons)return;const{panelKey:r,tabIndex:o}=Object.assign({},x.current);m(r,o),null==(n=t.current)||n.append(y.current),y.current.style.pointerEvents="all";const i=v.current,a=t.current.getBoundingClientRect(),s=i.getBoundingClientRect(),[l,d]=[e.pageX,e.pageY],[h,g]=[s.left-a.left,s.top-a.top];return{x:l,y:d,oX:h,oY:g,panelKey:r,tabIndex:o}},onMouseMove(e,t){var n,i;if(!t)return;document.body.style.cursor="grabbing",null==(n=window.getSelection())||n.removeAllRanges(),b.current=!0;const{x:a,y:s,oX:c,oY:d}=t,u=e.pageY-(s-d),h=e.pageX-(a-c);y.current&&(C(!0),y.current.style.display="block",y.current.style.top=`${u}px`,y.current.style.left=`${h}px`);const g=document.elementsFromPoint(e.clientX,e.clientY).find(((e,t)=>e.id.includes("droppable")&&t>0));let m=oB(e,g);const p=null==(i=y.current)?void 0:i.getBoundingClientRect().height;p&&f(h,l,u,p),_B(),(null==g?void 0:g.id)!==`${o}_${r}_droppable`&&(null!=g&&g.id.includes("droppable-space")&&(m=void 0),((e,t)=>{let n;RB.push(t),e===eB.left&&(n=EB.tabLeft),e===eB.right&&(n=EB.tabRight),void 0===e&&(n=EB.emptyTabSpace),n&&(null==t||t.classList.add(n))})(m,g))},onMouseUp(t,n){var r,o;if(_B(),RB.length=0,null==(r=v.current)||r.append(y.current),null!=(o=y.current)&&o.style&&(y.current.style.display="none",C(!1)),document.body.style.cursor="auto",!n||!b.current)return;b.current=!1;const{x:a,y:s,oX:l,oY:c,panelKey:d,tabIndex:u}=n,[m,p]=[t.pageX-(a-l),t.pageY-(s-c)],f=m<0?0:m,x=p-32,w=x<0?0:x,S=document.elementFromPoint(t.clientX,t.clientY);var j,k;if(null==(j=S)||null==(k=j.id)?void 0:k.includes("droppable")){const e=document.elementFromPoint(t.clientX,t.clientY),n=null==e?void 0:e.id;if(!n||null==n||!n.includes("droppable"))return;const r=n.split("_"),o=r[0],a=Number.parseInt(r[1]),s=oB(t,e);if(u===a&&d===o||1===i&&d===o)return;s&&h(u,d,o,a,s)}else g(e,d,u,f,w)}},[]);const S=()=>(0,_.jsxs)(Ze.Sl,{id:`${o}_${r}_droppable`,name:"tab",mod:{active:c?r===d:s},children:[!c&&(0,_.jsx)(Ze.Sl,{name:"icon",tag:Aw,width:8}),n]});return(0,_.jsxs)(Ze.eB,{name:"panel-tabs",children:[(0,_.jsx)(Ze.Sl,{name:"draggable-tab",id:`${n}-draggable`,ref:v,children:(0,_.jsx)(S,{})}),(0,_.jsxs)(Ze.Sl,{ref:y,name:"ghost-tab",style:{width:`${l}px`,height:"fit-content",maxHeight:"300px",overflow:"hidden"},children:[(0,_.jsx)(S,{}),w&&(0,_.jsx)(Ze.Sl,{name:"contents",children:a})]})]})},TB=e=>{var t;const n=e.locked?e.panelViews[e.breakPointActiveTab].component:null==(t=e.panelViews)||null==(t=t.find((e=>e.active)))?void 0:t.component;return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(Ze.eB,{name:"tabs",mix:(0,O.VS)(O.sI)?"ff_outliner_optim":void 0,children:[(0,_.jsxs)(Ze.Sl,{name:"tabs-row",children:[e.panelViews.map(((t,n)=>{const{component:r}=t;return(0,_.jsx)(Ze.Sl,{name:"tab-container",mod:{active:t.active},children:(0,_.jsx)(AB,{name:t.name,rootRef:e.root,panelKey:e.name,tabIndex:n,active:t.active,tabTitle:t.title,panelWidth:e.width,viewLength:e.panelViews.length,locked:e.locked,transferTab:e.transferTab,createNewPanel:e.createNewPanel,setActiveTab:e.setActiveTab,checkSnap:e.checkSnap,breakPointActiveTab:e.breakPointActiveTab,setBreakPointActiveTab:e.setBreakPointActiveTab,children:(0,_.jsx)(Ze.Sl,{name:"content",children:(0,_.jsx)(r,Object.assign({},e,{name:"outliner"}),`${t.title}-${n}-ghost`)})},`${t.title}-tab`)},`${t.title}-${n}-tab`)})),(0,_.jsx)(Ze.Sl,{id:`${e.name}_${e.panelViews.length}-droppable-space`,name:"drop-space-after"})]}),(0,_.jsx)(Ze.Sl,{name:"contents",children:n&&(0,_.jsx)(n,Object.assign({},e))})]})})},PB=980,IB=(0,y.PA)((({currentEntity:e,panelsHidden:t,children:n,showComments:r,focusTab:o})=>{const i=e.regionStore,a=(0,p.useRef)({width:0,height:0}),s=Gz("screen and (max-width: 980px)"),[l,c]=(0,p.useState)(500),[d,u]=(0,p.useState)(!1),[h,g]=(0,p.useState)(!1),[m,f]=(0,p.useState)(!1),[v,y]=(0,p.useState)(!1),b=(0,p.useRef)(),[x,C]=(0,p.useState)(),S=(0,p.useMemo)((()=>fB(r)),[r]),[j,k]=(0,p.useState)(S.panelData),[O,R]=(0,p.useState)(S.collapsedSide),[E,A]=(0,p.useState)(0),T=(0,p.useRef)(x),P=(0,p.useRef)(O);P.current=O,T.current=x,XM(e);const I=(0,p.useMemo)((()=>d||s.matches),[d,s.matches]),L=(0,p.useCallback)(((e,t)=>{k((n=>{const r=Object.assign({},n[e],t);return Object.assign({},n,{[e]:r})}))}),[j]),M=(0,p.useCallback)(((e,t,n,r,o)=>{k((i=>{const s=i[t].panelViews[e];s&&(s.active=!0);const l=iB(i,t,e),c=((e,t,n,r,o,i)=>{const a=Object.assign({},e),s=a[n];s.panelViews=a[n].panelViews.map((e=>(e.active=!1,e)));let l=o+(i===eB.right?1:0);return t===n&&l>0&&(l-=1),s.panelViews.splice(l,0,r),a})(cB(l),t,n,s,r,o),d=kB(c,n),u=lB(d),h=sB(u);return wB(h,a.current.height)})),C(void 0)}),[j]),K=(0,p.useCallback)(((e,t,n,r,o)=>{if(T.current){var i;const s=T.current.split("-"),l=s[0];if(null!=(i=P.current)&&i[l])return;const c="top"===s[1]?nB.top:nB.bottom,d=a.current.height;k((i=>{const s=jB(i,e,t,n,r,o,a);return SB(s,e,l,zN,d,c)}))}else k((i=>jB(i,e,t,n,r,o,a)));C(void 0)}),[j,O,O[eB.left],O[eB.right]]),D=(0,p.useCallback)(((e,t)=>k((n=>aB(n,e,t)))),[j]),N=(0,p.useCallback)(((e,t)=>{k((n=>{const r=j[e],o=z(e,r.top,r.left,t),i=Object.assign({},n,{[e]:Object.assign({},r,{visible:t,storedTop:o.top/a.current.height*100,storedLeft:o.left/a.current.width*100})});return CB(i,a.current.height,r.alignment)}))}),[k,j]),V=(0,p.useCallback)(((e,t,n,r)=>{var o,i,s,l,c,d;const u=e+t,h=n+r,g=null!=(o=a.current.width)?o:0,m=null!=(i=a.current.height)?i:0,p=u>=g-((null==(s=Object.entries(j).find((([e,t])=>t.alignment===eB.right)))?void 0:s[1].width)||0),f=e<=((null==(l=Object.entries(j).find((([e,t])=>t.alignment===eB.left)))?void 0:l[1].width)||0),v=n<=5,y=h>=m-5;let b;null!=(c=P.current)&&c[eB.left]||!f||(e<=5&&(b=tB.left),v&&(b=tB.topLeft),y&&(b=tB.bottomLeft)),null!=(d=P.current)&&d[eB.right]||!p||(u>=g-5&&(b=tB.right),v&&(b=tB.topRight),y&&(b=tB.bottomRight)),C(b)}),[j]),z=(0,p.useCallback)(((e,t,n,r)=>{var o,i,a,s,l;const c=j[e],d=null!=(o=null==(i=b.current)?void 0:i.clientWidth)?o:0,u=(null!=r?r:c.visible)?c.height:FN,h=c.detached?u:c.height,g=c.height!==(null==(a=b.current)?void 0:a.clientHeight)&&c.detached?h:BN;return{left:(0,w.clamp)(n,0,d-c.width),top:(0,w.clamp)(t,0,(null!=(s=null==(l=b.current)?void 0:l.clientHeight)?s:0)-g)||1}}),[j]),B=(0,p.useCallback)((e=>{g((()=>!0)),k((t=>kB(t,e)))}),[j]),H=(0,p.useCallback)(((e,t,n,r)=>{const o=j[e],{left:i,top:s}=z(e,t,n,o.visible),l=a.current.height-s;m||j[e].detached||(f(!0),k((t=>((e,t,n)=>{const r=Object.assign({},e),o=r[t].alignment,i={width:zN,detached:!0,height:BN},a=Object.assign({},r,{[t]:Object.assign({},r[t],i)}),s=xB(r,o);return null==s||s.forEach(((e,t)=>{r[e].order=t})),CB(a,n,o)})(t,e,a.current.height)))),V(i,o.width,s,BN),requestAnimationFrame((()=>{L(e,{top:s,left:i,relativeTop:s/a.current.height*100,relativeLeft:i/a.current.width*100,storedLeft:void 0,storedTop:void 0,detached:r,zIndex:Object.keys(j).length+12,maxHeight:l,alignment:r?void 0:o.alignment})}))}),[L,V,j,m]),F=(0,p.useCallback)((()=>{g((()=>!0))}),[]),W=(0,p.useCallback)((()=>{g((()=>!1))}),[]),$=(0,p.useCallback)(((e,t,n)=>{requestAnimationFrame((()=>{k((r=>((e,t,n,r,o)=>{var i;const a=Object.assign({},e),s=xB(a,null==(i=a[t])?void 0:i.alignment),l=o;if(!s)return e;const c=n-a[t].height,d=s.filter((e=>a[e].visible)),u=(null==d?void 0:d.findIndex((e=>e===t)))-1;if(void 0===u)return e;const h=d[u];s.forEach((e=>{let i=a[e].height;e===t&&(i=n),e===h&&(i-=c),n<=55&&(n=55),a[e].visible&&(a[e]=Object.assign({},a[e],{relativeTop:r/o*100,storedLeft:void 0,storedTop:void 0,maxHeight:l,height:(0,w.clamp)(i,55,o)}))}));const g=s.filter((e=>!a[e].visible)).length*FN,m=s.filter((e=>a[e].visible)).reduce(((e,t)=>e+a[t].height),0);return wB(m+g>o?e:a,o)})(r,e,t,n,a.current.height)))}))}),[k]),U=(0,p.useCallback)((e=>Object.keys(j).filter((t=>{var n;return(null==(n=j[t])?void 0:n.alignment)===e}))),[j]),Z=(0,p.useCallback)(((e,t,n,r,o)=>{const{left:i,top:s}=z(e,r,o),c=a.current.height-s;requestAnimationFrame((()=>{var r;(j[e].detached?[e]:U(null==(r=j[e])?void 0:r.alignment)).forEach((e=>{L(e,{top:s,left:i,relativeTop:s/a.current.height*100,relativeLeft:i/a.current.width*100,storedLeft:void 0,storedTop:void 0,maxHeight:c,width:(0,w.clamp)(t,zN,l),height:j[e].detached?(0,w.clamp)(n,BN,HN):j[e].height})}))}))}),[L,l,j]),Y=(0,p.useCallback)((e=>{var t;if(f(!1),g((()=>!1)),!T.current)return;const n=T.current.split("-"),r=n[0],o="top"===n[1]?nB.top:nB.bottom,i=null==(t=xB(j,r))?void 0:t.filter((t=>t!==e));i&&i.length>0?k((t=>SB(t,e,r,zN,a.current.height,o))):L(e,{height:a.current.height,alignment:r,detached:!1}),C(void 0)}),[L,j]),X=(0,p.useMemo)((()=>({onResize:Z,onGroupHeightResize:$,onResizeStart:F,onResizeEnd:W,onPositionChange:H,onVisibilityChange:N,onPositionChangeBegin:B,onSnap:Y,transferTab:M,createNewPanel:K,setActiveTab:D,checkSnap:V,setBreakPointActiveTab:A})),[Z,$,F,W,H,N,Y,M,K,D]),q=(0,p.useMemo)((()=>Object.assign({},X,{root:b,regions:i,selection:i.selection,currentEntity:e})),[X,i,i.selection,e]),J=(0,p.useMemo)((()=>{const e=yB(j),n=bB(j),r=e.every((e=>!j[e].visible)),o=n.every((e=>!j[e].visible)),{left:i,right:a}=O,s=e.length&&j[e[0]].width||0,l=n.length&&j[n[0]].width||0;return{paddingLeft:I||t?0:i?FN:r?0:s,paddingRight:I||t?0:a?FN:o?0:l}}),[t,j,O,I]),Q=(0,p.useMemo)((()=>{if(t)return{};const e={detached:[],left:[],right:[]},n=Object.entries(j);for(const[t,i]of n){var r,o;const{alignment:n,detached:a}=i,s=xB(j,n),c=Object.assign({},i,q,{name:t,top:null!=(r=i.storedTop)?r:i.top,left:null!=(o=i.storedLeft)?o:i.left,positioning:m,maxWidth:l,zIndex:i.zIndex,expanded:O[n],alignment:i.alignment,locked:I,attachedKeys:s,lockPanelContents:h,breakPointActiveTab:E,sidePanelCollapsed:O,setSidePanelCollapsed:R,dragTop:n===eB.left?x===tB.topLeft:x===tB.topRight,dragBottom:n===eB.left?x===tB.bottomLeft:x===tB.bottomRight});a?e.detached.push(c):"left"===n?e.left.push(c):"right"===n&&e.right.push(c)}return e}),[j,q,h,t,I,m,l,O,x]);(0,p.useEffect)((()=>{Object.keys(j).length&&((e,t)=>{window.localStorage.setItem("panelState",JSON.stringify({panelData:e,collapsedSide:t}))})(j,O)}),[j,O]),(0,p.useEffect)((()=>{if(o){const e=Object.assign({},j),t=((e,t)=>{var n;const r=Object.keys(e).find((e=>e.includes(t)))||"",o=null==(n=e[r])?void 0:n.panelViews.findIndex((e=>e.name===t));return o>=0?{panelName:r,tab:e[r].panelViews[o],panelViewIndex:o}:void 0})(e,o);if(!t)return;const{panelName:n,tab:r,panelViewIndex:i}=t,{alignment:a,detached:s,visible:l}=e[n];r.active||k(aB(e,n,i)),!s&&O[a]&&R(Object.assign({},O,{[a]:!1})),l||N(n,!0)}}),[o]),(0,p.useEffect)((()=>{const e=b.current;if(!e)return;const t=()=>{var e,t;return(null!=(e=null==(t=b.current)?void 0:t.clientWidth)?e:0){requestAnimationFrame((()=>{if(!b.current)return;const{clientWidth:e,clientHeight:n}=b.current;e<=PB||(a.current.height!==n&&k(wB(j,n)),a.current.width=null!=e?e:0,a.current.height=null!=n?n:0,u(t()),c(.4*b.current.clientWidth))}))}));return e&&(n.observe(e),u(t()),c(.4*e.clientWidth),y(!0)),()=>{e&&n.unobserve(e),n.disconnect()}}),[j]);const ee=(0,p.useMemo)((()=>({locked:I})),[]),te=(0,p.useMemo)((()=>{const e=Object.assign({},mB);return e.panelViews=mB.panelViews.filter((e=>"comments"!==e.name||r)),e}),[mB,r]),ne=Object.assign({},te,q,{breakPointActiveTab:E,setBreakPointActiveTab:A});return(0,_.jsx)(rz.Provider,{value:ee,children:(0,_.jsx)(Ze.eB,{ref:e=>{e&&(b.current=e,u(e.clientWidth<=PB))},name:"sidepanels",mod:{collapsed:I},style:Object.assign({},J),children:v&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"content",mod:{resizing:h||m},children:n}),!0!==t&&I?(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(Ze.Sl,{name:"wrapper",children:(0,_.jsx)(OB,Object.assign({},ne,{children:(0,_.jsx)(TB,Object.assign({},ne))}))})}):(0,_.jsx)(_.Fragment,{children:Object.entries(Q).map((([e,t],n)=>{const r=t.sort(((e,t)=>e.order-t.order)).map(((t,r)=>(0,_.jsx)(OB,Object.assign({},t,{children:(0,_.jsx)(TB,Object.assign({},t))}),`${e}-${r}-${n}`)));return"detached"===e?(0,_.jsx)(p.Fragment,{children:r},e):(0,_.jsx)(Ze.Sl,{name:"wrapper",mod:{align:e,snap:x===e},children:r},e)}))})]})})})}));var LB=n(57958),MB=n(8593);const KB=["date"],DB=6e4,NB=[[3e4,3e4],[267e4,DB],[Number.MAX_SAFE_INTEGER,18e5]];const VB=e=>{let{date:t}=e,n=(0,Yn.A)(e,KB);const[r,o]=(0,p.useState)(Date.now()),i=(0,p.useMemo)((()=>new Date(t).valueOf()),[t]),a=(0,p.useRef)(),s=(0,p.useCallback)((()=>{const e=Date.now()-i,t=function(e=0){const t=NB.findIndex((([t],n)=>t>e||n===NB.length-1)),n=t>0?NB[t-1][0]:0,r=NB[t][1];return Math.ceil((e-n+1)/r)*r+n}(e);a.current=window.setTimeout((()=>{o(Date.now())}),t-e)}),[t]);(0,p.useEffect)((()=>(s(),()=>{clearTimeout(a.current)})),[t,r]);const l="less than a minute ago"===(0,LB.A)(i,{addSuffix:!0})?"seconds ago":(0,LB.A)(i,{addSuffix:!0});return(0,_.jsx)("time",Object.assign({dateTime:(0,MB.default)(i,"yyyy-MM-dd'T'HH:mm:ss.SSSxxx"),title:(0,MB.default)(i,"PPpp")},n,{children:l}))},zB=e=>e.unresolved_comment_count>0?"Unresolved Comments":e.comment_count>0?"All Comments Resolved":"",BB=(0,y.PA)((({entity:e,capabilities:t,annotationStore:n,onAnnotationChange:r})=>{var o,i,a;const s="prediction"===e.type,l=(0,w.userDisplayName)(null!=(o=e.user)?o:{firstName:e.createdBy||"Admin"}),[c,d]=(0,p.useState)(),[u,h]=(0,p.useState)(!1),g=(m=e).unresolved_comment_count>0?ol:m.comment_count>0?qs:null;var m;(0,p.useEffect)((()=>{d(e.ground_truth)}),[e,e.ground_truth]);const f=(0,p.useCallback)((()=>{const{selected:t,id:r,type:o}=e;t||("prediction"===o?n.selectPrediction(r):n.selectAnnotation(r))}),[e]),v=({entity:e,capabilities:t})=>{const o=J_(),i=()=>{null==r||r(),null==o||o.close()},a=(0,p.useCallback)((()=>{e.setGroundTruth(!c),i()}),[e]),s=(0,p.useCallback)((()=>{const t=n.addAnnotationFromPrediction(e);window.setTimeout((()=>{n.selectAnnotation(t.id),i()}))}),[e]),l=(0,p.useCallback)((()=>{i(),SK({title:"Delete annotation?",body:(0,_.jsxs)(_.Fragment,{children:["This will ",(0,_.jsx)("strong",{children:"delete all existing regions"}),". Are you sure you want to delete them?",(0,_.jsx)("br",{}),"This action cannot be undone."]}),buttonLook:"destructive",okText:"Delete",onOk:()=>{e.list.deleteAnnotation(e)}})}),[e]),d="prediction"===e.type,u=!(0,w.isDefined)(e.pk),h=t.groundTruthEnabled&&!d&&!u,g=t.enableCreateAnnotation&&!u;return(0,_.jsxs)(Ze.eB,{name:"AnnotationButtonContextMenu",children:[h&&(0,_.jsxs)(Ze.Sl,{name:"option",mod:{groundTruth:!0},onClick:a,children:[c?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(kl,{color:"#FFC53D",width:37,height:37})," ","Unset "]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Tl,{width:37,height:37}),"Set "]}),"as Ground Truth"]}),g&&(0,_.jsxs)(Ze.Sl,{name:"option",mod:{duplicate:!0},onClick:s,children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(Od,{width:20,height:24})}),"Duplicate Annotation"]}),t.enableAnnotationDelete&&!d&&(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"seperator"}),(0,_.jsxs)(Ze.Sl,{name:"option",mod:{delete:!0},onClick:l,children:[(0,_.jsx)(Ze.Sl,{name:"icon",children:(0,_.jsx)(gf,{width:14,height:18})})," ","Delete Annotation"]})]})]})};return(0,_.jsxs)(Ze.eB,{name:"annotation-button",mod:{selected:e.selected,contextMenuOpen:u},children:[(0,_.jsxs)(Ze.Sl,{name:"mainSection",onClick:f,children:[(0,_.jsx)(Ze.Sl,{name:"picSection",children:(0,_.jsx)(Ze.Sl,{name:"userpic",tag:FM,showUsername:!0,username:s?e.createdBy:null,user:null!=(i=e.user)?i:{email:e.createdBy},mod:{prediction:s},size:24,children:s&&(0,_.jsx)(Ps,{style:{width:18,height:18}})})}),(0,_.jsxs)(Ze.Sl,{name:"main",children:[(0,_.jsxs)(Ze.Sl,{name:"user",children:[(0,_.jsx)(Ze.Sl,{tag:"span",name:"name",children:l}),(0,_.jsxs)(Ze.Sl,{tag:"span",name:"entity-id",children:["#",null!=(a=e.pk)?a:e.id]})]}),(0,_.jsx)(Ze.Sl,{name:"created",children:(0,_.jsx)(Ze.Sl,{name:"date",component:VB,date:e.createdDate})})]}),!s&&(0,_.jsxs)(Ze.Sl,{name:"icons",children:[e.draftId>0&&(0,_.jsx)(ir,{title:"Draft",children:(0,_.jsx)(Ze.Sl,{name:"icon",mod:{draft:!0},children:(0,_.jsx)(cx,{color:"#617ADA"})})}),e.skipped&&(0,_.jsx)(ir,{title:"Skipped",children:(0,_.jsx)(Ze.Sl,{name:"icon",mod:{skipped:!0},children:(0,_.jsx)(hw,{color:"#DD0000"})})}),c&&(0,_.jsx)(ir,{title:"Ground-truth",children:(0,_.jsx)(Ze.Sl,{name:"icon",mod:{groundTruth:!0},children:(0,_.jsx)(rw,{})})}),g&&(0,_.jsx)(ir,{title:zB(e),children:(0,_.jsx)(Ze.Sl,{name:"icon",mod:{comments:!0},children:(0,_.jsx)(g,{})})})]})]}),(0,_.jsx)(Ze.Sl,{name:"contextMenu",children:(0,_.jsx)(Q_.Trigger,{content:(0,_.jsx)(v,{entity:e,capabilities:t,annotationStore:n}),onToggle:e=>h(e),children:(0,_.jsx)(Ze.Sl,{name:"ellipsisIcon",children:(0,_.jsx)(Pd,{width:28,height:28})})})})]})})),HB=(0,y.PA)((({store:e,annotationStore:t})=>{const[n,r]=(0,p.useState)([]),o=e.hasInterface("annotations:tabs"),i=e.hasInterface("predictions:tabs"),a=e.hasInterface("annotations:add-new"),s=e.hasInterface("ground-truth"),l=e.hasInterface("annotations:delete"),c=(0,p.useRef)(),d=(0,p.useRef)(),[u,h]=(0,p.useState)(0),[g,m]=(0,p.useState)(!1),[f,v]=(0,p.useState)(!1),y=(0,p.useCallback)(((e,t=!0)=>{if(d.current&&c.current){const e=d.current.clientWidth,n=c.current.clientWidth,r=(0,w.clamp)(t?u-e:u+e,0,n-e);h(r)}}),[d,c,u]);return(0,p.useEffect)((()=>{var e,t,n,r;m(u<=0),v(u>=(null!=(e=null==(t=c.current)?void 0:t.clientWidth)?e:0)-(null!=(n=null==(r=d.current)?void 0:r.clientWidth)?n:0))}),[n.length,d.current,c.current,u,window.innerWidth,window.innerHeight]),(0,p.useEffect)((()=>{const e=[];i&&e.push(...t.predictions),o&&e.push(...t.annotations),r(e)}),[t,JSON.stringify(t.predictions),JSON.stringify(t.annotations)]),o||i||a?(0,_.jsxs)(Ze.eB,{name:"annotations-carousel",style:{"--carousel-left":`${u}px`},children:[(0,_.jsx)(Ze.Sl,{ref:d,name:"container",children:(0,_.jsx)(Ze.Sl,{ref:c,name:"carosel",children:(0,w.sortAnnotations)(n).map((e=>(0,_.jsx)(BB,{entity:e,capabilities:{enablePredictions:i,enableCreateAnnotation:a,groundTruthEnabled:s,enableAnnotations:o,enableAnnotationDelete:l},annotationStore:t},null==e?void 0:e.id)))})}),(!g||!f)&&(0,_.jsxs)(Ze.Sl,{name:"carousel-controls",children:[(0,_.jsx)(Ze.Sl,{tag:za,name:"nav",disabled:g,mod:{left:!0,disabled:g},"aria-label":"Carousel left",onClick:e=>!g&&y(e,!0),children:(0,_.jsx)(Ze.Sl,{name:"arrow",mod:{left:!0},tag:lc})}),(0,_.jsx)(Ze.Sl,{tag:za,name:"nav",disabled:f,mod:{right:!0,disabled:f},"aria-label":"Carousel right",onClick:e=>!f&&y(e,!1),children:(0,_.jsx)(Ze.Sl,{name:"arrow",mod:{right:!0},tag:lc})})]})]}):null})),FB=(0,y.PA)((({entity:e})=>{const{history:t}=e;return(0,_.jsxs)(Ze.eB,{name:"history-buttons",children:[(0,_.jsx)(ir,{title:"Undo",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Undo",disabled:!(null!=t&&t.canUndo),onClick:()=>e.undo(),icon:(0,_.jsx)(Qa,{})})}),(0,_.jsx)(ir,{title:"Redo",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",type:"text","aria-label":"Redo",disabled:!(null!=t&&t.canRedo),onClick:()=>e.redo(),icon:(0,_.jsx)(as,{})})}),(0,_.jsx)(ir,{title:"Reset",children:(0,_.jsx)(Ze.Sl,{tag:za,name:"action",look:"danger",type:"text","aria-label":"Reset",disabled:!(null!=t&&t.canUndo),onClick:()=>null==t?void 0:t.reset(),icon:(0,_.jsx)(hs,{})})})]})})),WB=({store:e})=>{const t=e.annotationStore,n=t.selected,r=!n.userGenerate||n.sentUserGenerate,o="prediction"===(null==n?void 0:n.type),i=t.viewingAll,a=(0,p.useCallback)((()=>{t.toggleViewingAllAnnotations()}),[t]);return(0,_.jsxs)(Ze.Sl,{name:"section",children:[e.hasInterface("annotations:view-all")&&(0,_.jsx)(ir,{title:"View all annotations",children:(0,_.jsx)(za,{icon:(0,_.jsx)(Hp,{}),type:"text","aria-label":"View All",onClick:()=>a(),primary:i,style:{height:36,width:36,padding:0}})}),!i&&e.hasInterface("ground-truth")&&(0,_.jsx)(MD,{entity:n}),!o&&!i&&e.hasInterface("edit-history")&&(0,_.jsx)(FB,{entity:n}),!i&&e.hasInterface("annotations:delete")&&(0,_.jsx)(ir,{title:"Delete annotation",children:(0,_.jsx)(za,{icon:(0,_.jsx)(bs,{}),look:"danger",type:"text","aria-label":"Delete",onClick:()=>{SK({title:"Delete annotation",body:"This action cannot be undone",buttonLook:"destructive",okText:"Proceed",onOk:()=>n.list.deleteAnnotation(n)})},style:{height:36,width:36,padding:0}})}),!i&&e.hasInterface("annotations:add-new")&&r&&(0,_.jsx)(ir,{title:`Create copy of current ${n.type}`,children:(0,_.jsx)(za,{icon:(0,_.jsx)(Rp,{style:{width:36,height:36}}),size:"small",look:"ghost",type:"text","aria-label":"Copy Annotation",onClick:t=>{t.preventDefault();const r=e.annotationStore.addAnnotationFromPrediction(n);window.setTimeout((()=>{e.annotationStore.selectAnnotation(r.id)}),50)},style:{height:36,width:36,padding:0}})}),(0,_.jsx)(za,{icon:(0,_.jsx)(gl,{}),type:"text","aria-label":"Settings",onClick:()=>e.toggleSettings(),style:{height:36,width:36,padding:0}}),e.description&&e.hasInterface("instruction")&&(0,_.jsx)(za,{icon:(0,_.jsx)(xp,{style:{width:16,height:16}}),primary:e.showingDescription,type:"text","aria-label":"Instructions",onClick:()=>e.toggleDescription(),style:{height:36,width:36,padding:0}})]})},$B=["entity","selected","onClick","extra"],UB=(0,y.PA)((({store:e,annotationStore:t,commentStore:n})=>{const r=(0,p.useRef)(),[o,i]=(0,p.useState)(!1),a=e.hasInterface("annotations:tabs"),s=e.hasInterface("predictions:tabs"),l=e.hasInterface("annotations:add-new"),c=e.hasInterface("ground-truth"),d=[];s&&d.push(...t.predictions),a&&d.push(...t.annotations);const h=(0,p.useCallback)(((e,n)=>{e.selected||(n?t.selectPrediction(e.id):t.selectAnnotation(e.id))}),[t]);(0,p.useEffect)((()=>{const e=e=>{const t=e.target,n=r.current;t===n||null!=n&&n.contains(t)||i(!1)};document.addEventListener("click",e);const t=(0,u.mJ)((()=>[...n.comments.map((e=>e.isResolved))]),(e=>{let t=0,r=0;e.forEach((e=>{r++,e||t++})),n.annotation.setUnresolvedCommentCount(t),n.annotation.setCommentCount(r)}));return()=>{document.removeEventListener("click",e),t()}}),[]);const g=e=>e.unresolved_comment_count>0?(0,_.jsx)(Ws,{}):e.comment_count>0?(0,_.jsx)(Ns,{}):null,m=(e,n)=>{var r;return(0,_.jsx)(GB,{entity:e,"aria-label":`${e.type} ${n+1}`,selected:e===t.selected,onClick:t=>{t.preventDefault(),t.stopPropagation(),i(!1),null==h||h(e,"prediction"===e.type)},extra:(0,_.jsxs)(Ze.Sl,{name:"icons",children:[(0,_.jsx)(Ze.Sl,{name:"icon-column",children:g(e)}),(0,_.jsx)(Ze.Sl,{name:"icon-column",children:c&&(0,_.jsx)(MD,{entity:e,disabled:!0})})]})},`${null!=(r=e.pk)?r:e.id}${e.type}`)};return a||s||l?(0,_.jsx)(Ze.Sl,{name:"section",mod:{flat:!0},children:(0,_.jsxs)(Ze.eB,{name:"annotations-list",ref:r,children:[(0,_.jsx)(Ze.Sl,{name:"selected",children:(0,_.jsx)(GB,{"aria-label":"Annotations List Toggle",entity:t.selected,onClick:e=>{e.stopPropagation(),i(!o)},extra:d.length>0?(0,_.jsxs)(Fa,{size:"none",style:{marginRight:-8,marginLeft:8},children:[(0,_.jsxs)(Ze.Sl,{name:"counter",children:[d.indexOf(t.selected)+1,"/",d.length]}),(0,_.jsx)(Ze.Sl,{name:"toggle",mod:{opened:o}})]}):null})}),o&&(0,_.jsxs)(Ze.Sl,{name:"list",children:[e.hasInterface("annotations:add-new")&&(0,_.jsx)(ZB,{annotationStore:t,onClick:()=>i(!1)}),(e=>{const t=[],n=[];return e.forEach(((e,r)=>{e.pk?n.push(m(e,r)):t.push(m(e,r))})),(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(Ze.Sl,{name:"draft",children:t}),(0,_.jsx)(Ze.Sl,{name:"annotation",children:n})]})})(d)]})]})}):null})),ZB=(0,y.PA)((({annotationStore:e,onClick:t})=>{const n=(0,p.useCallback)((()=>{const n=e.createAnnotation();e.selectAnnotation(n.id),t()}),[e,t]);return(0,_.jsx)(Ze.Sl,{name:"create","aria-label":"Create Annotation",onClick:n,children:(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"userpic",tag:FM,mod:{prediction:!0},children:(0,_.jsx)(ed,{})}),"Create Annotation"]})})})),GB=(0,y.PA)((e=>{var t,n,r;let{entity:o,selected:i,onClick:a,extra:s}=e,l=(0,Yn.A)(e,$B);const c="prediction"===o.type,d=(0,w.userDisplayName)(null!=(t=o.user)?t:{firstName:o.createdBy||"Admin"});return(0,_.jsx)(Ze.Sl,Object.assign({},l,{name:"entity",mod:{selected:i},onClick:a,children:(0,_.jsxs)(Fa,{spread:!0,children:[(0,_.jsxs)(Fa,{size:"small",children:[(0,_.jsx)(Ze.Sl,{name:"userpic",tag:FM,showUsername:!0,username:c?o.createdBy:null,user:null!=(n=o.user)?n:{username:d},mod:{prediction:c},children:c&&(0,_.jsx)(Ps,{color:"#944BFF",style:{width:18,height:18}})}),(0,_.jsxs)(Fa,{direction:"vertical",size:"none",children:[(0,_.jsxs)(Ze.Sl,{name:"user",children:[(0,_.jsx)(Ze.Sl,{tag:"span",name:"name",children:d}),(0,_.jsxs)(Ze.Sl,{tag:"span",name:"entity-id",children:["#",null!=(r=o.pk)?r:o.id]})]}),(0,w.isDefined)(o.acceptedState)?(0,_.jsx)(Ze.Sl,{name:"review",mod:{state:o.acceptedState},children:o.acceptedState}):(0,_.jsxs)(Ze.Sl,{name:"created",children:["created, ",(0,_.jsx)(Ze.Sl,{name:"date",component:VB,date:o.createdDate})]})]})]}),s]})}))})),YB=(0,y.WQ)("store")((0,y.PA)((({store:e,title:t,children:n})=>(0,_.jsx)(ir,{title:t,enabled:e.settings.enableTooltips,mouseEnterDelay:.8,children:n})))),XB=(0,y.WQ)((({store:e})=>{var t;return{store:e,history:null==e||null==(t=e.annotationStore)||null==(t=t.selected)?void 0:t.history}})),qB=XB((0,y.PA)((({store:e,history:t,annotation:n})=>{const r=e.hasInterface("review"),o=(0,w.isDefined)(e.annotationStore.selectedHistory),{userGenerate:i,sentUserGenerate:a,versions:s,results:l,editable:c}=n,d=[],[u,h]=(0,p.useState)(!1),g=!c||e.isSubmitting||o||u,m=e.hasInterface("annotations:deny-empty")&&0===l.length,f=(0,p.useCallback)((async(t,n,r)=>{const{addedCommentThisSession:o,currentComment:i,commentFormSubmit:a,inputRef:s}=e.commentStore;if(!u){if(h(!0),!s.current||o)n();else if((null!=i?i:"").trim())t.preventDefault(),await a(),n();else{const t=s.current;e.commentStore.setTooltipMessage(r),t.scrollIntoView({behavior:"smooth"}),t.focus({preventScroll:!0})}h(!1)}}),[e.rejectAnnotation,e.skipTask,e.commentStore.currentComment,e.commentStore.inputRef,e.commentStore.commentFormSubmit,e.commentStore.addedCommentThisSession,u]),v=(0,p.useMemo)((()=>(0,_.jsx)(YB,{title:"Reject annotation: [ Ctrl+Space ]",children:(0,_.jsx)(za,{"aria-label":"reject-annotation",disabled:g,look:"danger",onClick:async t=>{var n;null==(n=e.hasInterface("comments:reject"))||n?f(t,(()=>e.rejectAnnotation({})),"Please enter a comment before rejecting"):(console.log("rejecting"),await e.commentStore.commentFormSubmit(),e.rejectAnnotation({}))},children:"Reject"})},"reject")),[g,e]);if(r)d.push(v),d.push((0,_.jsx)(YB,{title:"Accept annotation: [ Ctrl+Enter ]",children:(0,_.jsx)(za,{"aria-label":"accept-annotation",disabled:g,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.acceptAnnotation()},children:t.canUndo?"Fix + Accept":"Accept"})},"accept"));else if(n.skipped)d.push((0,_.jsxs)(Ze.Sl,{name:"skipped-info",children:[(0,_.jsx)(Vl,{color:"#d00"})," Was skipped"]},"skipped")),d.push((0,_.jsx)(YB,{title:"Cancel skip: []",children:(0,_.jsx)(za,{"aria-label":"cancel-skip",disabled:g,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.unskipTask()},children:"Cancel skip"})},"cancel-skip"));else{if(e.hasInterface("skip")&&d.push((0,_.jsx)(YB,{title:"Cancel (skip) task: [ Ctrl+Space ]",children:(0,_.jsx)(za,{"aria-label":"skip-task",disabled:g,look:"danger",onClick:async t=>{var n;null==(n=e.hasInterface("comments:skip"))||n?f(t,(()=>e.skipTask({})),"Please enter a comment before skipping"):(await e.commentStore.commentFormSubmit(),e.skipTask({}))},children:"Skip"})},"skip")),i&&!a||e.explore&&!i&&e.hasInterface("submit")){const t=m?"Empty annotations denied in this project":"Save results: [ Ctrl+Enter ]";d.push((0,_.jsx)(YB,{title:t,children:(0,_.jsx)(Ze.Sl,{name:"tooltip-wrapper",children:(0,_.jsx)(za,{"aria-label":"submit",disabled:g||m,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.submitAnnotation()},children:"Submit"})})},"submit"))}if(i&&a||!i&&e.hasInterface("update")){const t=a||s.result,n=(0,_.jsx)(YB,{title:"Update this task: [ Alt+Enter ]",children:(0,_.jsx)(za,{"aria-label":"submit",disabled:g||m,look:"primary",onClick:async()=>{await e.commentStore.commentFormSubmit(),e.updateAnnotation()},children:t?"Update":"Submit"})},"update");d.push(n)}}return(0,_.jsx)(Ze.eB,{name:"controls",children:d})}))),JB=(0,y.PA)((({store:e})=>{var t;const n=(0,p.useMemo)((()=>e.taskHistory.findIndex((t=>t.taskId===e.task.id))+1),[e.taskHistory]),[r,o]=(0,p.useState)(0),[i,a]=(0,p.useState)(0);(0,p.useEffect)((()=>{e.commentStore.setAddedCommentThisSession(!1);const t=(0,u.mJ)((()=>e.commentStore.comments.map((e=>e.isDeleted))),(e=>{a(e.filter((e=>!e)).length)}));return()=>{null==t||t()}}),[]),(0,p.useEffect)((()=>{e.commentStore.addedCommentThisSession&&o(i)}),[e.commentStore.addedCommentThisSession]);const s=e.hasInterface("topbar:prevnext"),l=e.hasInterface("topbar:task-counter");let c=!(0,w.isDefined)(e.annotationStore.selected.pk)&&(!(0,O.VS)(O.JO)||e.hasInterface("skip"))&&!e.canGoNextTask&&!e.hasInterface("review")&&e.hasInterface("postpone");return e.hasInterface("annotations:comments")&&(0,O.VS)(O.ow)&&(c=c&&e.commentStore.addedCommentThisSession&&i>=r),(0,_.jsx)(Ze.Sl,{name:"section",children:(0,_.jsxs)(Ze.eB,{name:"current-task",mod:{"with-history":s},style:{padding:(0,O.VS)(O.bA)&&0,width:(0,O.VS)(O.bA)&&"auto"},children:[(0,_.jsxs)(Ze.Sl,{name:"task-id",style:{fontSize:(0,O.VS)(O.bA)?12:14},children:[null!=(t=e.task.id)?t:E(),s&&l&&((0,O.VS)(O.P2)?(0,_.jsxs)(Ze.Sl,{name:"task-count",children:[e.queuePosition," of ",e.queueTotal]}):(0,_.jsxs)(Ze.Sl,{name:"task-count",children:[n," of ",e.taskHistory.length]}))]}),s&&(0,_.jsxs)(Ze.Sl,{name:"history-controls",mod:{newui:(0,O.VS)(O.bA)},children:[(0,_.jsx)(Ze.Sl,{tag:za,name:"prevnext",mod:{prev:!0,disabled:!e.canGoPrevTask,newui:(0,O.VS)(O.bA)},type:"link",disabled:!s||!e.canGoPrevTask,onClick:e.prevTask,style:{background:!(0,O.VS)(O.bA)&&"none",backgroundColor:(0,O.VS)(O.bA)&&"none"}}),(0,_.jsx)(Ze.Sl,{tag:za,name:"prevnext","data-testid":"next-task",mod:{next:!0,disabled:!e.canGoNextTask&&!c,postpone:!e.canGoNextTask&&c,newui:(0,O.VS)(O.bA)},type:"link",disabled:!e.canGoNextTask&&!c,onClick:e.canGoNextTask?e.nextTask:e.postponeTask,style:{background:!(0,O.VS)(O.bA)&&"none",backgroundColor:(0,O.VS)(O.bA)&&"none"}})]})]})})})),QB=(0,y.PA)((({store:e})=>{const t=e.annotationStore,n=null==t?void 0:t.selected,r="prediction"===(null==n?void 0:n.type),o=!0===(null==t?void 0:t.viewingAll);return e?(0,_.jsx)(Ze.eB,{name:"topbar",mod:{newLabelingUI:(0,O.VS)(O.bA)},children:(0,O.VS)(O.bA)?(0,_.jsxs)(Ze.Sl,{name:"group",children:[(0,_.jsx)(JB,{store:e}),e.hasInterface("annotations:view-all")&&(0,_.jsx)(ir,{title:"View all annotations",children:(0,_.jsx)(za,{className:"topbar__button",icon:(0,_.jsx)(Hp,{}),type:"text","aria-label":"View All",onClick:t.toggleViewingAllAnnotations,primary:o,style:{height:36,width:36,padding:0,marginRight:(0,O.VS)(O.bA)&&8}})}),e.hasInterface("annotations:add-new")&&(0,_.jsx)(ir,{placement:"topLeft",title:"Create a new annotation",children:(0,_.jsx)(za,{icon:(0,_.jsx)(ks,{}),className:"topbar__button",type:"text","aria-label":"View All",onClick:t=>{t.preventDefault();const n=e.annotationStore.createAnnotation();e.annotationStore.selectAnnotation(n.id)},style:{height:36,width:36,padding:0,marginRight:4}})}),!o&&(0,_.jsx)(HB,{store:e,annotationStore:e.annotationStore,commentStore:e.commentStore})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(Ze.Sl,{name:"group",children:[(0,_.jsx)(JB,{store:e}),!o&&(0,_.jsx)(UB,{store:e,annotationStore:e.annotationStore,commentStore:e.commentStore}),(0,_.jsx)(WB,{store:e})]}),(0,_.jsxs)(Ze.Sl,{name:"group",children:[!o&&(0,_.jsx)(Ze.Sl,{name:"section",children:(0,_.jsx)(AD,{})}),!o&&e.hasInterface("controls")&&(e.hasInterface("review")||!r)&&(0,_.jsx)(Ze.Sl,{name:"section",mod:{flat:!0},style:{width:320,boxSizing:"border-box"},children:(0,_.jsx)(qB,{annotation:n})})]})]})}):null}));class eH extends p.Component{constructor(...e){super(...e),this.relationsRef=p.createRef(),this._notifyScroll=()=>{this.relationsRef.current&&this.relationsRef.current.onResize()}}componentDidMount(){window.blur(),document.body.focus()}renderSuccess(){return(0,_.jsx)(Ze.eB,{name:"editor",children:(0,_.jsx)(f.Ay,{status:"success",title:(0,h._$)(this.props.store).messages.DONE})})}renderNoAnnotation(){return(0,_.jsx)(Ze.eB,{name:"editor",children:(0,_.jsx)(f.Ay,{status:"success",title:(0,h._$)(this.props.store).messages.NO_COMP_LEFT})})}renderNothingToLabel(e){return(0,_.jsxs)(Ze.eB,{name:"editor",style:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",paddingBottom:"30vh"},children:[(0,_.jsx)(f.Ay,{status:"success",title:(0,h._$)(this.props.store).messages.NO_NEXT_TASK}),(0,_.jsx)(Ze.eB,{name:"sub__result",children:"You have completed all tasks in the queue!"}),(0,_.jsx)(za,{onClick:t=>e.prevTask(t,!0),look:"outlined",style:{margin:"16px 0"},children:"Go to Previous Task"})]})}renderNoAccess(){return(0,_.jsx)(Ze.eB,{name:"editor",children:(0,_.jsx)(f.Ay,{status:"warning",title:(0,h._$)(this.props.store).messages.NO_ACCESS})})}renderConfigValidationException(e){return(0,_.jsxs)(Ze.eB,{name:"main-view",children:[(0,_.jsx)(Ze.Sl,{name:"annotation",children:(0,_.jsx)(Oe,{errors:this.props.store.annotationStore.validation})}),!(0,O.VS)(O.bA)&&e.hasInterface("infobar")&&(0,_.jsxs)(Ze.Sl,{name:"infobar",children:["Task #",e.task.id]})]})}renderLoader(){return(0,_.jsx)(f.Ay,{icon:(0,_.jsx)(v.A,{size:"large"})})}_renderAll(e){if(1===e.length)return(0,_.jsx)(xN,{annotation:e[0],children:[D.renderItem(e[0].root)]});const t=(0,Ze.cn)("renderall").toClassName(),n=(0,Ze.cn)("fade").toClassName();return(0,_.jsx)("div",{className:t,children:e.map(((e,t)=>(0,_.jsx)("div",{className:n,children:(0,_.jsx)(xN,{annotation:e,children:[D.renderItem(e.root)]})},`all-${t}`)))})}_renderUI(e,t){var n,r;return t.viewingAll?this.renderAllAnnotations():(0,_.jsxs)(Ze.eB,{name:"main-view",onScrollCapture:this._notifyScroll,children:[(0,_.jsxs)(Ze.Sl,{name:"annotation",children:[(0,_.jsx)(DM,{root:e,annotation:t.selected}),this.renderRelations(t.selected),(0,O.VS)(O.v1)&&this.renderCommentsOverlay(t.selected)]}),!(0,O.VS)(O.bA)&&(0,h.Zn)(t).hasInterface("infobar")&&this._renderInfobar(t)]},null==(n=null!=(r=t.selectedHistory)?r:t.selected)?void 0:n.id)}_renderInfobar(e){const{id:t,queue:n}=(0,h.Zn)(e).task;return(0,_.jsxs)(Ze.Sl,{name:"infobar",tag:Fa,size:"small",children:[(0,_.jsxs)("span",{children:["Task #",t]}),n&&(0,_.jsx)("span",{children:n})]})}renderAllAnnotations(){const e=this.props.store.annotationStore,t=[...e.annotations,...e.predictions];return(0,O.VS)(O.F5)&&(0,w.sortAnnotations)(t),(0,_.jsx)(nN,{store:e,annotations:t,root:e.root})}renderRelations(e){var t;const n=e.relationStore,r=null==(t=this.props.store.task)?void 0:t.data;return(0,_.jsx)(yN,{store:n,ref:this.relationsRef,tags:e.names,taskData:r},E())}renderCommentsOverlay(e){const{store:t}=this.props,{commentStore:n}=t;return t.hasInterface("annotations:comments")&&n.isCommentable?(0,_.jsx)(we,{commentStore:n,annotation:e}):null}render(){var e,t,n,r;const{store:o}=this.props,i=o.annotationStore,a=i.selected&&i.selected.root,{settings:s}=o;if(o.isLoading)return this.renderLoader();if(o.noTask)return this.renderNothingToLabel(o);if(o.noAccess)return this.renderNoAccess();if(o.labeledSuccess)return this.renderSuccess();if(!a)return this.renderNoAnnotation();const l=i.viewingAll,c=(0,_.jsx)(Ze.eB,{name:"main-content",mix:o.awaitingSuggestions?["requesting"]:[],children:null===i.validation?this._renderUI(null!=(e=null==(t=i.selectedHistory)?void 0:t.root)?e:a,i):this.renderConfigValidationException(o)}),d=(0,O.VS)(O.LE),u=(0,O.VS)(O.bA);return(0,_.jsxs)(Ze.eB,{name:"editor",mod:{fullscreen:s.fullscreen,_auto_height:!d},ref:(0,O.VS)(O.SM)?KM(this):null,children:[(0,_.jsx)(DN,{store:o}),(0,_.jsxs)(y.Kq,{store:o,children:[u?(0,_.jsx)(rN,{visible:o.showingDescription,onCancel:()=>o.toggleDescription(),title:o.hasInterface("review")?"Review Instructions":"Labeling Instructions",children:o.description}):(0,_.jsx)(_.Fragment,{children:o.showingDescription&&(0,_.jsx)(xN,{children:(0,_.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,je.sanitizeHtml)(o.description)}})})}),(0,w.isDefined)(o)&&o.hasInterface("topbar")&&(0,_.jsx)(QB,{store:o}),(0,_.jsx)(Ze.eB,{name:"wrapper",mod:{viewAll:l,bsp:s.bottomSidePanel,outliner:d,showingBottomBar:u},children:d?u?(0,_.jsxs)(IB,{panelsHidden:l,currentEntity:null!=(n=i.selectedHistory)?n:i.selected,regions:i.selected.regionStore,showComments:o.hasInterface("annotations:comments"),focusTab:o.commentStore.tooltipMessage?"comments":null,children:[c,o.hasInterface("topbar")&&(0,_.jsx)($D,{store:o})]}):(0,_.jsx)(Qz,{panelsHidden:l,currentEntity:null!=(r=i.selectedHistory)?r:i.selected,regions:i.selected.regionStore,children:c}):(0,_.jsxs)(_.Fragment,{children:[c,!1===l&&(0,_.jsx)(Ze.eB,{name:"menu",mod:{bsp:s.bottomSidePanel},children:o.hasInterface("side-column")&&(0,_.jsx)(NN,{children:(0,_.jsx)(ED,{store:o})})}),u&&o.hasInterface("topbar")&&(0,_.jsx)($D,{store:o})]})})]}),o.hasInterface("debug")&&(0,_.jsx)(ZD,{store:o})]})}}const tH=(0,y.PA)(eH),nH={CONFIG:class{static validate(e){const t=[];Dj(e,null,[],t);const n=["id","children","name","toname","controlledTags","parentTypes"],r=[];for(const e of t)try{const o=x.getModelByTag(e.type),i=Nj(e,o);null!==i&&r.push(i);const a=Vj(e,o,t);null!==a&&r.push(a);const s=zj(e,o);null!==s&&r.push(s),r.push(...Hj(e)),r.push(...Bj(e,o,n))}catch(t){r.push(Kj.unknownTag(e.type,e.name,e.type))}return r.length?r.map((e=>{return Object.assign({},e,{validType:(t=e.validType,t?((e,t=!0)=>{const n=e.describe().match(/([a-z0-9?|]+)/gi).join("").split("|");if(!1===t){const e=n.indexOf("null?");e>=0&&n.splice(e,1)}return n})(t,!1):null)});var t})):[]}},RESULT:{validate:()=>[]}},rH=Object.keys(nH).reduce(((e,t)=>Object.assign({},e,{[t]:t})),{}),oH=h.gK.union(h.gK.string,h.gK.array(h.gK.string)),iH=h.gK.model({modelName:h.gK.string,field:h.gK.string,error:h.gK.string,value:h.gK.maybeNull(h.gK.string),validType:h.gK.maybeNull(oH)}).views((e=>({get identifier(){return[e.modelName,e.field,e.error,e.value].concat(e.validType).filter((e=>null!==e)).join("-")}})));class aH{constructor(){this.callbacks=new Set}addErrorCallback(e){return!this.callbacks.has(e)&&(this.callbacks.add(e),!0)}removeErrorCallback(e){return!!this.callbacks.has(e)&&(this.callbacks.delete(e),!0)}validate(e,t){const n=nH[e];let r=[];var o;n?r=(null!=(o=n.validate(t))?o:[]).map((e=>{try{return iH.create(e)}catch(t){throw console.log({compiledError:e}),t}})):console.error(`Unknown validator: ${e}`);setTimeout((()=>{if(r.length)for(const e of this.callbacks)e(r)}),0)}}const sH=h.gK.model("StoreExtender",{sharedStores:h.gK.optional(h.gK.map(kI),{})}).actions((e=>({addSharedStore(t){e.sharedStores.set(t.id,t)},beforeReset(){e.sharedStores.forEach((e=>{(0,h.Yo)(e)})),e.sharedStores.clear()},afterReset(){OI.forEach((t=>{e.addSharedStore(t)}))},beforeDestroy(){e.sharedStores.forEach((e=>{(0,h.Yo)(e),(0,h.zr)(e)})),e.sharedStores.clear()}}))),lH=h.gK.compose("HistoryItem",EP,h.gK.model({comment:h.gK.optional(h.gK.maybeNull(h.gK.string),null),actionType:h.gK.optional(h.gK.maybeNull(h.gK.string),null)})).preProcessSnapshot((e=>{var t,n;return Object.assign({},e,{pk:E(),user:e.created_by,createdDate:e.created_at,actionType:null!=(t=null!=(n=e.action)?n:e.action_type)?t:e.actionType,readonly:!0,editable:!1})})),cH=h.gK.union(EP,lH),dH=h.gK.model("AnnotationStore",{selected:h.gK.maybeNull(h.gK.reference(cH)),selectedHistory:h.gK.maybeNull(h.gK.safeReference(cH)),root:Te.allModelsTypes(),names:h.gK.map(h.gK.reference(Te.allModelsTypes())),toNames:h.gK.map(h.gK.array(h.gK.reference(Te.allModelsTypes()))),annotations:h.gK.array(EP),predictions:h.gK.array(EP),history:h.gK.array(lH),viewingAllAnnotations:h.gK.optional(h.gK.boolean,!1),validation:h.gK.maybeNull(h.gK.array(iH))}).volatile((()=>({initialized:!1}))).views((e=>({get store(){return(0,h.Zn)(e)},get viewingAll(){return e.viewingAllAnnotations}}))).actions((e=>{function t(t,n,r=!0){e.viewingAllAnnotations=!1,e._unselectAll();const o=n.find((e=>e.id===t||e.pk===String(t)))||n[0];return o?(o.selected=!0,r&&(e.selectedHistory=null,e.history=[]),e.selected=o,o.updateObjects(),"annotation"===o.type&&o.setInitialValues(),o):null}function n(n,r={}){if(!e.annotations.length)return null;const{selected:o}=e,i=t(n,e.annotations,!r.retainHistory);return i.editable=!0,i.setupHotKeys(),(0,h._$)(e).events.invoke("selectAnnotation",i,o,null!=r?r:{}),i.pk&&(0,h.PA)(e).addAnnotationToTaskHistory(i.pk),i}function r(t){return t&&e.addErrors([Kj.generalError(t)]),e.root=CM.create({id:"error"})}function o(t){if(e.root)return;if(!t)return e.root=CM.create({id:"empty"});let n;try{n=D.treeToModel(t,e.store)}catch(e){return console.error(e),r(e)}const o=x.getModelByTag(n.type),i=x.objectTypes().map((e=>e.name.replace("Model","").toLowerCase())),a=[];e.validate(rH.CONFIG,n);try{e.root=o.create(n)}catch(e){return console.error(e),r(e)}if((0,O.VS)(O.cE)){const{names:t,toNames:n}=D.extractNames(e.root);return t.forEach((t=>e.names.put(t))),n.forEach(((t,n)=>e.toNames.set(n,t))),D.traverseTree(e.root,(t=>{e.store.task&&t.updateValue&&t.updateValue(e.store)})),e.initialized=!0,e.root}return D.traverseTree(e.root,(t=>{null!=t&&t.name&&(e.addName(t),i.includes(t.type)&&a.push(t.name));t.name&&!i.includes(t.type)&&!t.toname&&1===a.length&&(t.toname=a[0]),t&&t.toname&&e.upsertToName(t),e.store.task&&t.updateValue&&t.updateValue(e.store)})),e.initialized=!0,e.root}function i(t){const{user:n,config:r}=e.store;e.root||o(r);let i=t.pk||t.id;var a;"annotation"===t.type&&i&&isNaN(i)&&(i=null==(a=e.annotations)||null==(a=a[e.annotations.length-1])||null==(a=a.storedValue)?void 0:a.pk);const s=Object.assign({userGenerate:!1,createdDate:rn.UDate.currentISODate()},t,{id:E(5),pk:i&&String(i),root:e.root});return n&&!("createdBy"in s)&&(s.createdBy=n.displayName),t.user&&(s.user=t.user),s}const a=t=>{e.addErrors(t)};return{afterCreate:()=>{e._validator=new aH,e._validator.addErrorCallback(a)},beforeDestroy:()=>{e._validator.removeErrorCallback(a)},toggleViewingAllAnnotations:function(){e.viewingAllAnnotations=!e.viewingAllAnnotations,e.viewingAllAnnotations?(e.selected&&("annotation"===e.selected.type&&e.selected.saveDraftImmediately(),e.selected.unselectAll(),e.selected.selected=!1),e.annotations.forEach((e=>{e.editable=!1}))):n(e.annotations.at((0,O.VS)(O.F5)?-1:0).id,{fromViewAll:!0})},initRoot:o,addToName:function(t){e.toNames.set(t.toname,[t.name])},addName:function(t){e.names.put(t)},upsertToName:function(t){const n=e.toNames.get(t.toname);n?n.push(t.name):e.addToName(t)},addPrediction:function(t={}){t.editable=!1,t.type="prediction";const n=i(t);return(0,O.VS)(O.F5)?(e.predictions.push(n),e.predictions.at(-1)):(e.predictions.unshift(n),e.predictions[0])},addAnnotation:function(t={}){t.type="annotation";const n=i(t);if(n.userGenerate){var r,o,a;let t;if((0,O.VS)(O.K3)){const r=(0,w.emailFromCreatedBy)(n.createdBy),o=r&&e.store.users.find((e=>e.email===r));o&&(t=o.id)}n.completed_by=null!=(r=null!=(o=t)?o:null==(a=(0,h.Zn)(e).user)?void 0:a.id)?r:void 0}(0,O.VS)(O.F5)?e.annotations.push(n):e.annotations.unshift(n);const s=e.annotations.at((0,O.VS)(O.F5)?-1:0);return s.addVersions({result:t.result,draft:t.draft}),s},createAnnotation:function(t={userGenerate:!0}){const r=e.predictions.reduce(((e,t)=>[...e,...t._initialAnnotationObj.filter((e=>!1===e.interactive_mode)).map((e=>Object.assign({},e)))]),[]),o=e.addAnnotation(Object.assign({},t,{result:r}));if(r&&r.length){const e={};r.forEach((t=>{if("id"in t){const n=t.id.replace(/#.*$/,`#${o.id}`);e[t.id]=n,t.id=n}})),r.forEach((t=>{t.parent_id&&(e[t.parent_id]?t.parent_id=e[t.parent_id]:t.parent_id=null)})),n(o.id),o.deserializeAnnotation(r),o.reinitHistory()}else o.setDefaultValues();return o},addAnnotationFromPrediction:function(t){const r=t._initialAnnotationObj.map((e=>Object.assign({},e))),o=e.addAnnotation({userGenerate:!0,result:r}),i={};return r.forEach((e=>{if("id"in e){const t=e.id.replace(/#.*$/,`#${o.id}`);i[e.id]=t,e.id=t}})),r.forEach((e=>{e.parent_id&&(i[e.parent_id]?e.parent_id=i[e.parent_id]:e.parent_id=null)})),n(o.id),o.deserializeAnnotation(r),o.reinitHistory(),t.pk&&("prediction"===t.type?o.parent_prediction=Number.parseInt(t.pk):"annotation"===t.type&&(o.parent_annotation=Number.parseInt(t.pk))),o},addHistory:function(t={}){t.type="history";const n=i(t);return e.history.push(n),e.history[e.history.length-1]},clearHistory:function(){e.history.forEach((e=>(0,h.zr)(e))),e.history.length=0},selectHistory:function(t){e.selectedHistory=t,setTimeout((()=>{const n=null!=t?t:e.selected;Array.from(n.names.values()).filter((e=>e.isClassificationTag)).forEach((e=>e.updateFromResult([]))),null==n||n.results.filter((e=>e.area.classification)).forEach((e=>null==e.from_name.updateFromResult?void 0:e.from_name.updateFromResult(e.mainValue)))})),(0,h._$)(e).events.invoke("selectHistory",e.store,e.selected,e.selectedHistory)},addErrors:t=>{var n;const r=[],o=[...null!=(n=e.validation)?n:[],...t].reduce(((e,t)=>{const n=t.identifier;return r.indexOf(n)<0&&(r.push(n),e.push(t)),e}),[]);e.validation=o},validate:(t,n)=>e._validator.validate(t,n),selectAnnotation:n,selectPrediction:function(n){return t(n,e.predictions)},_selectItem:function(t){e._unselectAll(),t.editable=!1,t.selected=!0,e.selected=t,t.updateObjects()},_unselectAll:function(){e.selected&&(e.selected.unselectAll(),e.selected.selected=!1)},deleteAnnotation:function(t){(0,h._$)(e).events.invoke("deleteAnnotation",e.store,t),(0,h.zr)(t),e.clearDeletedParents(t),e.selected=null,e.annotations.length>0&&e.selectAnnotation(e.annotations[0].id)},clearDeletedParents:function(t){null!=t&&t.pk&&e.annotations.forEach((e=>{e.parent_annotation&&+e.parent_annotation==+t.pk&&(e.parent_annotation=null)}))},resetAnnotations:()=>{e.selected=null,e.selectedHistory=null,e.annotations=[],e.predictions=[],e.history=[]}}})),uH=h.gK.compose("AnnotationStore",dH,...(0,O.VS)(O.Ls)?[sH]:[]),hH=h.gK.model("Project",{id:h.gK.identifierNumber}).views((e=>({get app(){return(0,h.PA)(e)}}))),gH="SIDEPANEL_MODE_REGIONS",mH="SIDEPANEL_MODE_LABELS",pH=h.gK.model("SettingsModel",{enableHotkeys:h.gK.optional(h.gK.boolean,!0),enablePanelHotkeys:h.gK.optional(h.gK.boolean,!0),enableTooltips:h.gK.optional(h.gK.boolean,!1),enableLabelTooltips:h.gK.optional(h.gK.boolean,!0),continuousLabeling:!1,selectAfterCreate:!1,fullscreen:h.gK.optional(h.gK.boolean,!1),bottomSidePanel:h.gK.optional(h.gK.boolean,!1),sidePanelMode:h.gK.optional(h.gK.enumeration([gH,mH]),gH),imageFullSize:h.gK.optional(h.gK.boolean,!1),enableAutoSave:h.gK.optional(h.gK.boolean,!1),showLabels:h.gK.optional(h.gK.boolean,!1),showLineNumbers:!1,showAnnotationsPanel:h.gK.optional(h.gK.boolean,!0),showPredictionsPanel:h.gK.optional(h.gK.boolean,!0),preserveSelectedTool:h.gK.optional(h.gK.boolean,!0),enableSmoothing:h.gK.optional(h.gK.boolean,!0),videoHopSize:h.gK.optional(h.gK.number,10),isDestroying:h.gK.optional(h.gK.boolean,!1)}).views((e=>({get annotation(){return(0,h.Zn)(e).annotationStore.selected},get displayLabelsByDefault(){return e.sidePanelMode===mH}}))).actions((e=>({beforeDestroy(){e.isDestroying=!0},afterCreate(){try{const{localStorage:e}=window;if(!e)return}catch(e){return}const t="labelStudio:settings",n=localStorage.getItem(t);if(n){const t=JSON.parse(n);"object"==typeof t&&null!==t&&Object.keys(t).forEach((n=>{n in e&&(e[n]=t[n])}))}else{const t=(0,h._$)(e);Object.keys(SN).map((n=>{"boolean"==typeof t.settings[n]?e[n]=t.settings[n]:e[n]=SN[n].defaultValue}))}(0,h.aQ)(e,(n=>{setTimeout((()=>{e.isDestroying||localStorage.setItem(t,JSON.stringify(n))}))}))},toggleShowLabels(){e.showLabels=!e.showLabels,rn.HTML.toggleLabelsAndScores(e.showLabels)},toggleShowLineNumbers(){e.showLineNumbers=!e.showLineNumbers},toggleContinuousLabeling(){e.continuousLabeling=!e.continuousLabeling},toggleSelectAfterCreate(){e.selectAfterCreate=!e.selectAfterCreate},toggleSidepanelModel(){e.sidePanelMode=e.sidePanelMode===mH?gH:mH,e.annotation.regionStore.setView(e.displayLabelsByDefault?"labels":"regions")},toggleAutoSave(){e.enableAutoSave=!e.enableAutoSave},togglepreserveSelectedTool(){e.preserveSelectedTool=!e.preserveSelectedTool},toggleHotkeys(){e.enableHotkeys=!e.enableHotkeys,e.enableHotkeys?yr.setScope(yr.DEFAULT_SCOPE):yr.setScope("__none__")},togglePanelHotkeys(){e.enablePanelHotkeys=!e.enablePanelHotkeys},toggleTooltips(){e.enableTooltips=!e.enableTooltips},toggleFullscreen(){e.fullscreen=!e.fullscreen},toggleBottomSP(){e.bottomSidePanel=!e.bottomSidePanel},toggleImageFS(){e.imageFullSize=!e.imageFullSize},toggleLabelTooltips(){e.enableLabelTooltips=!e.enableLabelTooltips},toggleAnnotationsPanel(){e.showAnnotationsPanel=!e.showAnnotationsPanel},togglePredictionsPanel(){e.showPredictionsPanel=!e.showPredictionsPanel},toggleSmoothing(){e.enableSmoothing=!e.enableSmoothing},setSmoothing(t){e.enableSmoothing=t},setVideoHopSize(t){e.videoHopSize=t},setProperty(t,n){e[t]=n}}))),fH=h.gK.model({enable:h.gK.optional(h.gK.boolean,!1),username:h.gK.string,password:h.gK.string,to:h.gK.string}),vH=h.gK.model("Task",{id:h.gK.maybeNull(h.gK.number),load:h.gK.optional(h.gK.boolean,!1),auth:h.gK.maybeNull(fH),data:h.gK.maybeNull(h.gK.string),queue:h.gK.optional(h.gK.maybeNull(h.gK.string),null)}).views((e=>({get app(){return(0,h.PA)(e)},get dataObj(){return rn.Checkers.isStringJSON(e.data)?JSON.parse(e.data):"object"==typeof e.data?e.data:null}}))),yH=h.gK.model({controls:h.gK.frozen({})}).actions((e=>({addLabel(t,n){var r;const o={path:n,origin:"session"},i=[...null!=(r=e.controls[t])?r:[],o];e.controls=Object.assign({},e.controls,{[t]:i})},deleteLabel(t,n){if(!e.controls[t])return;const r=e.controls[t].filter((e=>e.path.length!==n.length||!e.path.every(((e,t)=>e===n[t]))));e.controls=Object.assign({},e.controls,{[t]:r})},init(t){const n={};for(const e in t)n[e]=t[e].map((e=>({origin:"user",path:e})));e.controls=n}}))),bH=h.gK.model("CustomButton",{id:h.gK.optional(h.gK.identifier,E),name:h.gK.string,title:h.gK.string,look:h.gK.maybe(h.gK.enumeration(["primary","danger","destructive","alt","outlined","active","disabled"])),tooltip:h.gK.maybe(h.gK.string),ariaLabel:h.gK.maybe(h.gK.string),disabled:h.gK.maybe(h.gK.boolean)}),xH=yr("AppStore","Global Hotkeys"),wH=h.gK.model("AppStore",{config:h.gK.string,task:h.gK.maybeNull(vH),project:h.gK.maybeNull(hH),taskHistory:h.gK.array(h.gK.model({taskId:h.gK.number,annotationId:h.gK.maybeNull(h.gK.string)}),[]),interfaces:h.gK.array(h.gK.string),explore:h.gK.optional(h.gK.boolean,!1),annotationStore:h.gK.optional(uH,{annotations:[],predictions:[],history:[]}),commentStore:h.gK.optional(sP,{comments:[]}),user:h.gK.optional(h.gK.maybeNull(h.gK.safeReference(nP)),null),debug:!0===window.HTX_DEBUG,settings:h.gK.optional(pH,{}),description:h.gK.maybeNull(h.gK.string),showingSettings:h.gK.optional(h.gK.boolean,!1),showingDescription:h.gK.optional(h.gK.boolean,!1),isLoading:h.gK.optional(h.gK.boolean,!1),isSubmitting:!1,noTask:h.gK.optional(h.gK.boolean,!1),noAccess:h.gK.optional(h.gK.boolean,!1),labeledSuccess:h.gK.optional(h.gK.boolean,!1),showComments:!1,_autoAnnotation:!1,_autoAcceptSuggestions:!1,awaitingSuggestions:!1,users:h.gK.optional(h.gK.array(nP),[]),userLabels:(0,O.VS)(O.RI)?h.gK.optional(yH,{controls:{}}):h.gK.undefined,queueTotal:h.gK.optional(h.gK.number,0),queuePosition:h.gK.optional(h.gK.number,0),commentClassificationConfig:h.gK.maybeNull(h.gK.string),customButtons:h.gK.map(h.gK.union(h.gK.string,bH,h.gK.array(h.gK.union(h.gK.string,bH))))}).preProcessSnapshot((e=>{if("number"!=typeof e.user){var t,n,r;const i=null!=(t=null!=(n=e.user)?n:null==(r=window.APP_SETTINGS)?void 0:r.user)?t:null;var o;if(i)e.user=i.id,e.users=null!=(o=e.users)&&o.length?[i,...e.users.filter((({id:e})=>e!==i.id))]:[i]}return Array.isArray(e.customButtons)&&(e.customButtons={_replace:e.customButtons}),Object.assign({},e,{_autoAnnotation:"true"===localStorage.getItem("autoAnnotation"),_autoAcceptSuggestions:"true"===localStorage.getItem("autoAcceptSuggestions")})})).volatile((()=>({version:"string"==typeof LSF_VERSION?LSF_VERSION:"0.0.0",initialized:!1,hydrated:!1,suggestionsRequest:null,simpleInit:(0,O.VS)(O.F5)}))).views((e=>({get events(){return(0,h._$)(e).events},get hasSegmentation(){return Array.from(e.annotationStore.names.values()).some((e=>!e.getAvailableStates&&!e.perRegionVisible))},get canGoNextTask(){if(e.task&&e.taskHistory&&e.taskHistory.length>1){const t=e.taskHistory[e.taskHistory.length-1].taskId;return e.task.id!==t}return!1},get canGoPrevTask(){if(e.task&&e.taskHistory&&e.taskHistory.length>1){const t=e.taskHistory[0].taskId;return e.task.id!==t}return!1},get forceAutoAnnotation(){return(0,h._$)(e).forceAutoAnnotation},get forceAutoAcceptSuggestions(){return(0,h._$)(e).forceAutoAcceptSuggestions},get autoAnnotation(){return e.forceAutoAnnotation||e._autoAnnotation},get autoAcceptSuggestions(){return e.forceAutoAcceptSuggestions||e._autoAcceptSuggestions}}))).actions((e=>{let t;function n(e,t="warning"){fn[t](e)}function r(t,r="Error during submit"){if(e.isSubmitting)return;e.setFlags({isSubmitting:!0});const o=t();e.commentStore.setAddedCommentThisSession(!1),Promise.race([Promise.all([o,(0,w.delay)(200)]),(0,w.delay)(5e3)]).catch((e=>{n((null==e?void 0:e.message)||e||r),console.error(e)})).then((()=>e.setFlags({isSubmitting:!1})))}return{setFlags:function(t){const n=["showingSettings","showingDescription","isLoading","isSubmitting","noTask","noAccess","labeledSuccess","awaitingSuggestions"];for(const r of n)r in t&&(e[r]=t[r])},addInterface:function(t){return e.interfaces.push(t)},hasInterface:function(...t){return void 0!==e.interfaces.find((e=>t.includes(e)))},toggleInterface:function(t,n){const r=e.interfaces.indexOf(t);if(null!=n?n:r<0)r<0&&e.interfaces.push(t);else{if(r<0)return;e.interfaces.splice(r,1)}},afterCreate:function(){RR.setRoot(e),window.Htx=e,e.attachHotkeys(),(0,h._$)(e).events.invoke("labelStudioLoad",e)},assignTask:function(t){t&&!rn.Checkers.isString(t.data)&&(t=Object.assign({},t,{data:JSON.stringify(t.data)})),e.task=vH.create(t),e.taskHistory.some((t=>t.taskId===e.task.id))||e.taskHistory.push({taskId:e.task.id,annotationId:null})},assignConfig:function(t){const n=e.annotationStore;e.config=t,n.initRoot(e.config)},resetState:function(){RR.removeAllTools(),yr.unbindAll(),e.attachHotkeys();const t=e.annotationStore;t&&(null==t.beforeReset||t.beforeReset(),(0,O.VS)(O.C8)&&TI(),(0,h.Yo)(t),(0,h.zr)(t)),e.annotationStore=uH.create({annotations:[]}),e.initialized=!1},resetAnnotationStore:function(){const t=e.annotationStore;t&&(null==t.beforeReset||t.beforeReset(),null==t.resetAnnotations||t.resetAnnotations())},initializeStore:function({annotations:n=[],completions:r=[],predictions:o=[],annotationHistory:i}){const a=e.annotationStore;var s,l;if(null==a.afterReset||a.afterReset(),a.initialized||(a.initRoot(e.config),!(0,O.VS)(O.SM)||null!=(s=t)&&s.isRendered()||null==(l=t)||l.render()),e.simpleInit){window.STORE_INIT_OK=!1,o.forEach((e=>{const t=a.addPrediction(e),n=e.result.map((e=>Object.assign({},e,{origin:"prediction"})));t.deserializeResults(n,{hidden:!0})})),[...r,...n].forEach((e=>{a.addAnnotation(e).deserializeResults(e.draft||e.result,{hidden:!0})})),window.STORE_INIT_OK=!0,console.log("LSF: deserialization is finished");const e=a.annotations.at(-1),t=!e&&a.predictions.at(-1);e?(a.selectAnnotation(e.id),e.reinitHistory()):t&&a.selectPrediction(t.id)}else{var c;(null!=o?o:[]).forEach((e=>{const t=a.addPrediction(e);a.selectPrediction(t.id),t.deserializeResults(e.result.map((e=>Object.assign({},e,{origin:"prediction"}))))})),null==(c=[...null!=r?r:[],...null!=n?n:[]])||c.forEach((e=>{const t=a.addAnnotation(e);a.selectAnnotation(t.id),t.deserializeResults(e.draft||e.result),t.reinitHistory()}));const t=a.annotations.at(-1);t&&t.setInitialValues(),e.setHistory(i)}e.initialized||(e.initialized=!0,(0,h._$)(e).events.invoke("storageInitialized",e))},setHistory:function(t=[]){var n;const r=e.annotationStore;r.clearHistory(),t.length&&null!=(n=r.selected)&&n.pk&&Number(r.selected.pk)===Number(t[0].annotation_id)&&(null!=t?t:[]).forEach((e=>{var t;r.addHistory(e).deserializeResults(null!=(t=e.result)?t:[],{hidden:!0})}))},attachHotkeys:function(){xH.unbindAll(),e.hasInterface("submit","update","review")&&xH.addNamed("annotation:submit",(()=>{const t=e.annotationStore,n=e.hasInterface("annotations:deny-empty"),r=t.selected,o=0===r.results.length,i=e.hasInterface("review")||r.canBeReviewed,a=!i&&(0,w.isDefined)(r.pk),s=!r.history.canUndo&&!r.draftId,l=(0,O.VS)(O.I8)&&a&&s;n&&o||t.viewingAll||l||(null==r||r.submissionInProgress(),i?e.acceptAnnotation():!a&&e.hasInterface("submit")?e.submitAnnotation():e.hasInterface("update")&&e.updateAnnotation())})),e.hasInterface("skip","review")&&xH.addNamed("annotation:skip",(()=>{if(e.annotationStore.viewingAll)return;const t=e.annotationStore.selected;null==t||t.submissionInProgress(),e.hasInterface("review")?e.rejectAnnotation():e.skipTask()})),xH.addNamed("region:delete-all",(()=>{const{selected:t}=e.annotationStore;window.confirm((0,h._$)(e).messages.CONFIRM_TO_DELETE_ALL_REGIONS)&&t.deleteAllRegions()})),xH.addNamed("region:relation",(()=>{const t=e.annotationStore.selected;t&&t.highlightedNode&&!t.isLinkingMode&&t.startLinkingMode(F,t.highlightedNode)})),xH.addNamed("region:focus",(t=>{t.preventDefault();const n=e.annotationStore.selected;n&&n.highlightedNode&&!n.isLinkingMode&&n.highlightedNode.requestPerRegionFocus()})),xH.addNamed("region:unselect",(()=>{const t=e.annotationStore.selected;!t||t.isLinkingMode||t.isDrawing||(e.annotationStore.history.forEach((e=>{e.unselectAll()})),t.unselectAll())})),xH.addNamed("region:visibility",(()=>{const t=e.annotationStore.selected;t&&!t.isLinkingMode&&t.hideSelectedRegions()})),xH.addNamed("region:visibility-all",(()=>{const{selected:t}=e.annotationStore;t.regionStore.toggleVisibility()})),xH.addNamed("annotation:undo",(()=>{const t=e.annotationStore.selected;t.isDrawing||t.undo()})),xH.addNamed("annotation:redo",(()=>{const t=e.annotationStore.selected;t.isDrawing||t.redo()})),xH.addNamed("region:exit",(()=>{const t=e.annotationStore.selected;t&&t.isLinkingMode?t.stopLinkingMode():t.isDrawing||t.unselectAll()})),xH.addNamed("region:delete",(()=>{const t=e.annotationStore.selected;t&&t.deleteSelectedRegions()})),xH.addNamed("region:cycle",(()=>{const t=e.annotationStore.selected;t&&t.regionStore.selectNext()})),xH.addNamed("region:duplicate",(t=>{const{selected:n}=e.annotationStore,{serializedSelection:r}=n||{};if(null==r||!r.length)return;t.preventDefault();const o=n.appendResults(r);n.selectAreas(o)}))},skipTask:function(t){e.isSubmitting||r((()=>{(0,h._$)(e).events.invoke("skipTask",e,t),e.incrementQueuePosition()}),"Error during skip, try again")},unskipTask:function(){e.isSubmitting||r((()=>{(0,h._$)(e).events.invoke("unskipTask",e)}),"Error during cancel skipping task, try again")},setTaskHistory:function(t){e.taskHistory=t},submitDraft:function(t,n={}){return new Promise((r=>{const o=(0,h._$)(e).events;if(!o.hasEvent("submitDraft"))return r();const i=o.invokeFirst("submitDraft",e,t,n);i&&i.then?i.then(r):r(i)}))},waitForDraftSubmission:function(){return new Promise((t=>{e.annotationStore.selected.isDraftSaving||t();const n=setInterval((()=>{e.annotationStore.selected.isDraftSaving||(clearInterval(n),t())}),100)}))},submitAnnotation:function(){if(e.isSubmitting)return;const t=e.annotationStore.selected,n=t.exists?"updateAnnotation":"submitAnnotation";t.beforeSend(),t.validate()&&((0,O.VS)(O.Bg)||t.sendUserGenerate(),r((async()=>{if((0,O.VS)(O.Bg)){await e.waitForDraftSubmission();const r=await(0,h._$)(e).events.invoke("beforeSaveAnnotation",e,t,{event:n});if(r&&r.some((e=>!1===e)))return;t.sendUserGenerate()}await(0,h._$)(e).events.invoke(n,e,t),e.incrementQueuePosition(),(0,O.VS)(O.Bg)&&t.dropDraft()})),(0,O.VS)(O.Bg)||t.dropDraft())},updateAnnotation:function(t){if(e.isSubmitting)return;const n=e.annotationStore.selected;n.beforeSend(),n.validate()&&(r((async()=>{if((0,O.VS)(O.Bg)){const t=await(0,h._$)(e).events.invoke("beforeSaveAnnotation",e,n,{event:"updateAnnotation"});if(t&&t.some((e=>!1===e)))return}await(0,h._$)(e).events.invoke("updateAnnotation",e,n,t),e.incrementQueuePosition(),(0,O.VS)(O.Bg)&&(n.dropDraft(),!n.sentUserGenerate&&n.sendUserGenerate())})),(0,O.VS)(O.Bg)||(n.dropDraft(),!n.sentUserGenerate&&n.sendUserGenerate()))},acceptAnnotation:function(){e.isSubmitting||r((async()=>{const t=e.annotationStore.selected;if(t.beforeSend(),!t.validate())return;if((0,O.VS)(O.Bg)){const n=await(0,h._$)(e).events.invoke("beforeSaveAnnotation",e,t,{event:"acceptAnnotation"});if(n&&n.some((e=>!1===e)))return}const n=t.history.canUndo;t.dropDraft(),await(0,h._$)(e).events.invoke("acceptAnnotation",e,{isDirty:n,entity:t}),e.incrementQueuePosition()}),"Error during accept, try again")},rejectAnnotation:function({comment:t=null}){e.isSubmitting||r((async()=>{const n=e.annotationStore.selected;if(n.beforeSend(),!n.validate())return;if((0,O.VS)(O.Bg)){const t=await(0,h._$)(e).events.invoke("beforeSaveAnnotation",e,n,{event:"rejectAnnotation"});if(t&&t.some((e=>!1===e)))return}const r=n.history.canUndo;n.dropDraft(),await(0,h._$)(e).events.invoke("rejectAnnotation",e,{isDirty:r,entity:n,comment:t}),e.incrementQueuePosition(-1)}),"Error during reject, try again")},handleCustomButton:function(t){e.isSubmitting||r((async()=>{const n=e.annotationStore.selected;n.beforeSend();const r=n.history.canUndo;await(0,h._$)(e).events.invoke("customButton",e,t,{isDirty:r,entity:n}),e.incrementQueuePosition(),n.dropDraft()}),`Error during handling ${t} button, try again`)},presignUrlForProject:async function(t){const n=await e.events.invoke("presignUrlForProject",e,t);return null==n?void 0:n[0]},setUsers:function(t){e.users.replace(t)},mergeUsers:function(t){e.setUsers(QT()([...(0,h.dV)(e.users),...t],"id"))},enrichUsers:function(t){const n=(0,h.dV)(e.users),r={};n.forEach((e=>{r[e.id]=e}));const o=t.map((e=>Object.assign({},r[e.id],e)));e.setUsers(QT()([...o,...n],"id"))},showModal:n,toggleComments:function(t){return e.showComments=t},toggleSettings:function(){e.showingSettings=!e.showingSettings},toggleDescription:function(){e.showingDescription=!e.showingDescription},setAutoAnnotation:t=>{e._autoAnnotation=t,localStorage.setItem("autoAnnotation",t)},setAutoAcceptSuggestions:t=>{e._autoAcceptSuggestions=t,localStorage.setItem("autoAcceptSuggestions",t)},loadSuggestions:(0,h.L3)((function*(t,n){const r=E();e.suggestionsRequest=r,e.setFlags({awaitingSuggestions:!0});try{const o=yield t;r===e.suggestionsRequest&&(e.annotationStore.selected.setSuggestions(n(o)),e.setFlags({awaitingSuggestions:!1}))}catch(t){e.setFlags({awaitingSuggestions:!1})}})),addAnnotationToTaskHistory:function(t){const n=e.taskHistory.findIndex((({taskId:t})=>t===e.task.id));n>=0&&(e.taskHistory[n].annotationId=t)},nextTask:function(){if(e.canGoNextTask){const{taskId:t,annotationId:n}=e.taskHistory[e.taskHistory.findIndex((t=>t.taskId===e.task.id))+1];(0,h._$)(e).events.invoke("nextTask",t,n),e.incrementQueuePosition()}},prevTask:function(t,n=!1){const r=n?e.taskHistory.length-1:e.taskHistory.findIndex((t=>t.taskId===e.task.id))-1;if(e.canGoPrevTask||n){const{taskId:t,annotationId:n}=e.taskHistory[r];(0,h._$)(e).events.invoke("prevTask",t,n),e.incrementQueuePosition(-1)}},postponeTask:async function(){const t=e.annotationStore.selected;await t.saveDraft({was_postponed:!0}),await(0,h._$)(e).events.invoke("nextTask"),e.incrementQueuePosition()},incrementQueuePosition:function(t=1){e.queuePosition=(0,w.clamp)(e.queuePosition+t,1,e.queueTotal)},beforeDestroy(){RR.removeAllTools(),t=null},setAppControls:function(e){t=e},clearApp:function(){var e;null==(e=t)||e.clear()},renderApp:function(){var e;null==(e=t)||e.render()},selfDestroy(){const t=[];let n;for((0,h.GG)(e,(n=>{(0,h.jX)(n)||(0,h.PA)(n)!==e||t.push(n)}));n=t.shift();)try{(0,h.zr)(n)}catch(e){console.log("Problem: ",e)}}}})),CH=async(e,t)=>{var r,o,i,a,s,l,c,d,u;null!=(r=e.options)&&r.secureMode&&(window.LS_SECURE_MODE=!0);const h=await(async()=>(await n.e(99).then(n.bind(n,64099))).default)();if(null!=(o=e=Object.assign({},e))&&o.config||!h.getExample)null!=(i=e)&&i.task&&(e.task=h.getData(e.task));else{const{task:t,config:n}=await h.getExample();e.config=n,e.task=t}null!=(a=e.task)&&a.id&&(e.taskHistory=[{taskId:e.task.id,annotationId:null}]);const g=wH.create(e,Object.assign({},h.configureApplication(e),{events:t}));return g.initializeStore(Object.assign({},null!=(s=e.task)?s:{},{hydrated:null==(l=null==(c=e)?void 0:c.hydrated)||l,users:null!=(d=e.users)?d:[],annotationHistory:null!=(u=e.history)?u:[]})),{store:g,getRoot:h.rootElement}};class SH extends p.Component{constructor(...e){super(...e),this.state={initialized:!1}}componentDidMount(){CH(this.props).then((({store:e})=>{this.store=e,window.Htx=this.store,this.setState({initialized:!0})}))}componentDidUpdate(e){this.props.task!==e.task&&(this.store.resetState(),this.store.assignTask(this.props.task),this.store.initializeStore(this.props.task))}render(){return this.state.initialized?(0,_.jsx)(tH,{store:this.store}):null}}var jH=n(30997);const kH={interfaces:["panel","update","submit","skip","controls","infobar","topbar","instruction","side-column","annotations:history","annotations:tabs","annotations:menu","annotations:current","annotations:add-new","annotations:delete","annotations:view-all","predictions:tabs","predictions:menu","auto-annotation","edit-history"]};class OH{constructor(){this.events=new Map}on(e,t){const n=this.getEventMap(e);n.has(t)||n.add(t)}off(e,t){const n=this.getEventMap(e);n.has(t)&&n.delete(t)}removeAll(e){this.getEventMap(e).clear()}invoke(e,...t){const n=this.getEventMap(e);if(n.size>0)return Promise.all([...n].map((e=>e(...t))))}invokeFirst(e,...t){const n=this.getEventMap(e);if(n.size>0){return Array.from(n)[0](...t)}}hasEvent(e){return this.getEventMap(e).size>0}getEventMap(e){let t;return this.events.has(e)?t=this.events.get(e):(t=new Set,this.events.set(e,t)),t}}(0,u.jK)({isolateGlobalState:!0});class RH{static destroyAll(){RH.instances.forEach((e=>null==e.destroy?void 0:e.destroy())),RH.instances.clear()}getRootElement(e){let t=null;if(t="string"==typeof e?document.getElementById(e):e,!t)throw new Error(`Root element not found (selector: ${e})`);return t}constructor(e,t={}){this.options=void 0,this.root=void 0,this.store=void 0,this.destroy=()=>{},this.events=new OH;const n=Object.assign({},kH,t);n.keymap&&yr.setKeymap(n.keymap),this.root=e,this.options=n,this.supportLegacyEvents(),this.createApp(),RH.instances.add(this)}on(e,t){this.events.on(e,t)}off(e,t){(0,w.isDefined)(t)?this.events.off(e,t):this.events.removeAll(e)}async createApp(){const{store:e}=await CH(this.options,this.events),t=this.getRootElement(this.root);this.store=e,window.Htx=this.store;const n=!1,r=()=>{(0,g.render)((0,_.jsx)(tH,{store:this.store}),t)},o=()=>{var e;if(null==(e=t.childNodes)||!e.length)return;const n=[...t.childNodes],r=IM(n[0]);(0,g.unmountComponentAtNode)(t),LM(n,r),LM([t],r)};r(),e.setAppControls({isRendered:()=>n,render:r,clear:o}),this.destroy=()=>{(0,O.VS)(O.SM)&&o(),TI(),(0,O.VS)(O.SM)&&this.store.selfDestroy(),(0,h.zr)(this.store),yr.unbindAll(),(0,O.VS)(O.SM)&&(this.store=null,this.destroy=null,RH.instances.delete(this))}}supportLegacyEvents(){Object.keys(jH.A).forEach((e=>{const t=this.options[e];if((0,w.isDefined)(t)){const n=(0,m.toCamelCase)(e.replace(/^on/,""));this.events.on(n,t)}}))}}RH.Component=SH,RH.instances=new Set,window.LabelStudio=RH;const EH=RH},50494:(e,t,n)=>{"use strict";n.d(t,{JE:()=>d,KE:()=>g,Sl:()=>h,cn:()=>c,eB:()=>u});var r=n(73033),o=n(14041);const i=["tag","name","mod","mix"],a=["tag","component","block","name","mod","mix"];const s=null!="lsf-"?"lsf-":"dm-",l=(0,o.createContext)(null),c=(e,t={})=>{const{elem:n,mix:r,mod:o}=null!=t?t:{},i=e,a={block:e=>c(e,{elem:n,mix:r,mod:o}),elem:t=>c(e,{elem:t,mix:r,mod:o}),mod(t={}){const a=Object.assign({},null!=o?o:{},t);return c(null!=e?e:i,{elem:n,mix:r,mod:a})},mix:(...t)=>c(e,{elem:n,mix:t,mod:o}),select(e=document){return e.querySelector(this.toCSSSelector())},selectAll(e=document){return e.querySelectorAll(this.toCSSSelector())},closest(e){return e.closest(this.toCSSSelector())},toString:()=>((e,t,n,r)=>{const o=e,i=t?`${o}__${t}`:null,a=Object.entries(null!=r?r:{}).reduce(((e,[t,n])=>{const r=[null!=i?i:o];return null==n||!1!==n&&(r.push(t),!0!==n&&r.push(n),e.push(r.join("_"))),e}),[]),l=[];if(l.push(null!=i?i:o),l.push(...a),n){const e=Array.isArray(n)?n:[n],t=[].concat(...e).filter((e=>"string"==typeof e?""!==e.trim():null!=e)).map((e=>"string"==typeof e?e:null==e||null==e.toClassName?void 0:e.toClassName())).reduce(((e,t)=>[...e,...t.split(/\s+/)]),[]);l.push(...Array.from(new Set(t)))}return l.map((e=>("string"!=typeof e&&console.error("Non-string classname: ",e),String(e).startsWith(s)?e:`${s}${e}`))).join(" ")})(e,n,r,o),toClassName(){return this.toString()},toCSSSelector(){return`.${this.toClassName().replace(/(\s+)/g,".")}`}};return Object.defineProperty(a,"Block",{value:u}),Object.defineProperty(a,"Elem",{value:h}),Object.defineProperty(a,"__class",{value:{block:e,elem:n,mix:r,mod:o}}),a},d=e=>{const t=null!=e?e:(0,o.createContext)(null),n=(0,o.forwardRef)(((e,n)=>{let{tag:a="div",name:s,mod:l,mix:d}=e,u=(0,r.A)(e,i);const h=c(s),g=[].concat(d).filter((e=>!!e)),m=h.mod(l).mix(...g,u.className).toClassName(),p=Object.assign({},u,{ref:n,className:m});return(0,o.createElement)(t.Provider,{value:h},(0,o.createElement)(a,p))})),s=(0,o.forwardRef)(((e,n)=>{let{tag:i="div",component:s,block:l,name:d,mod:u,mix:h}=e,g=(0,r.A)(e,a);const m=(0,o.useContext)(t),p=[].concat(h).filter((e=>!!e)),f=(l?c(l):m).elem(d).mod(u).mix(...p,g.className).toClassName(),v=Object.assign({},g,{ref:n,className:f});return"string"!=typeof i&&(v.block=m),s&&(v.tag=i),(0,o.createElement)(null!=s?s:i,v)}));return n.displayName="Block",s.displayName="Elem",{Block:n,Elem:s,Context:t}},{Block:u,Elem:h}=d(l),g=()=>(0,o.useContext)(l)},78438:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(83960),o=n(75696),i=n.n(o),a=n(47895),s=n(72902),l=n(84826);function c(e,t,n,r,o,a){const[s,l,c]=i()(o).rgb(),d=e.getImageData(0,0,n,r),u=new ArrayBuffer(n*r*4),h=new Uint32Array(u),g=new Uint8ClampedArray(u),m=function(){const e=new ArrayBuffer(2),t=new Uint8Array(e),n=new Uint16Array(e);if(t[0]=170,t[1]=187,48042===n[0])return"little endian";if(43707===n[0])return"big endian";return console.error("Can not determine platform endianness, assuming little endian"),"little endian"}();let p,f,v;"little endian"===m?p=255<<24|c<<16|l<<8|s:"big endian"===m?p=s<<24|l<<16|c<<8|255:(console.error(`Unknown platform endianness (${m}), assuming little endian`),p=255<<24|c<<16|l<<8|s);const y=a;for(v=0;v<=r;v++)for(f=0;f<=n;f++){const e=v*n+f;t[e*y]&&(h[e]=p)}d.data.set(g),e.putImageData(d,0,0)}const d={Region2RLE:function(e){var t;if((0,l.VS)(l.gF))return function(e){const{naturalWidth:t,naturalHeight:n}=e.currentImageEntity,o=document.createElement("canvas");o.width=t,o.height=n,o.style.setProperty("position","absolute"),o.style.setProperty("bottom","200%"),o.style.setProperty("right","200%"),o.style.setProperty("opacity","0");const i=o.getContext("2d");if(document.body.appendChild(o),e.rle&&e.rle.length>0){const o=i.createImageData(t,n);o.data.set((0,r.D)(e.rle)),i.putImageData(o,0,0)}const a=null==e.getMaskImage?void 0:e.getMaskImage();a&&i.drawImage(a,0,0),e.touches.length>0&&e.touches.forEach((e=>{const{relativePoints:r}=e.toJSON(),o=(e,r)=>[t*(e/100),n*(r/100)];i.save(),i.beginPath(),i.moveTo(...o(r[0],r[1]));for(let e=0;e{const o=document.createElement("img");o.onload=()=>{const e=document.createElement("canvas"),r=o.width,i=o.height;e.width=r,e.height=i;const a=e.getContext("2d");a.drawImage(o,0,0);const s=a.getImageData(0,0,r,i);c(a,s.data,r,i,t,4),o.src=e.toDataURL(),n(o)},o.src=e}))},brushSizeCircle:function(e){const t=document.createElement("canvas"),n=t.getContext("2d"),r=4*e+8,o=e/2+4,i=e/2;return t.width=r,t.height=r,n.beginPath(),n.arc(o,o,i,0,2*Math.PI,!1),n.lineWidth=3,n.strokeStyle="black",n.stroke(),n.beginPath(),n.arc(o,o,i,0,2*Math.PI,!1),n.lineWidth=2,n.strokeStyle="white",n.stroke(),t.toDataURL()},labelToSVG:(()=>{const e={};return({label:t,score:n})=>{let r=t;if(null!==n&&(r+=n),r in e)return e[r];let o=0;const i=[];if(null!=n){const e=s.getScaleGradient(n);i.push(``),i.push(`${n.toFixed(2)}`),o+=26}t&&(i.push(`${t}`),o=o+function(e){const t=document.createElement("svg"),n=document.createElement("text");n.style="font-size: 9.5px; font-weight: bold; color: red; fill: red; font-family: var(--font-mono);",n.innerHTML=e,t.appendChild(n),document.body.appendChild(t);const r=n.getBoundingClientRect().width;return t.remove(),r}(t)+2);const a=`${i.join("")}`,l=`'data:image/svg+xml,${a.replace(/\s{2,}/g," ").replace(/[\r\n%#()<>?[\\\]^`{|}]/g,encodeURIComponent)}'`;return e[r]=l,l}})(),trim:e=>{var t,n;let r,o=e.width,i=e.height;const a=e.getContext("2d"),s={top:null,left:null,right:null,bottom:null};try{r=document.createElement("canvas").getContext("2d");const t=a.getImageData(0,0,e.width,e.height),n=t.data.length;let l,c,d;for(l=0;l{"use strict";n.r(t),n.d(t,{colorToRGBA:()=>u,colorToRGBAArray:()=>y,contrastColor:()=>v,convertToRGBA:()=>h,getScaleGradient:()=>p,hexToRGBA:()=>d,over:()=>w,removeAlpha:()=>f,rgbArrayToHex:()=>b,rgbaArrayToRGBA:()=>x,rgbaChangeAlpha:()=>m,stringToColor:()=>g});var r=n(75696),o=n.n(r);const i=["#c22525","#c13025","#bf3b24","#be4624","#bc5124","#bb5b23","#ba6623","#b87023","#b77a22","#b58422","#b48d22","#b39722","#b1a021","#b0aa21","#aaae21","#9ead20","#93ab20","#87aa20","#7ca91f","#71a71f","#66a61f","#5ba41e","#51a31e","#46a21e","#3ca01e","#329f1d","#289d1d","#1e9c1d","#1c9a24","#1c992d","#1c992d"],a={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},s=/^rgba\((25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*(?:,\s*([01]\.?\d*?))\)$/,l=/^rgb\((25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{2}|\d\d?)\s*\)$/;function c(e){const t=[0,0,0];return e&&4===e.length?(t[0]=`0x${e[1]}${e[1]}`,t[1]=`0x${e[2]}${e[2]}`,t[2]=`0x${e[3]}${e[3]}`):e&&7===e.length&&(t[0]=`0x${e[1]}${e[2]}`,t[1]=`0x${e[3]}${e[4]}`,t[2]=`0x${e[5]}${e[6]}`),t.map((e=>+e))}function d(e,t){const n=c(e);let r=.3;return"number"==typeof Number.parseInt(t)&&(r=t),`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${r})`}function u(e,t){if("string"==typeof e){return d(a[e.toLowerCase()],t)}return e}function h(e,t){const n=y(e);return n[3]=Number(t)===t?t:n[3],x(n)}function g(e){let t=0;for(let n=0;n>8*e&255).toString(16)}`.substr(-2)}return n}function m(e,t){return e.replace(/[\d\.]+\)$/g,`${t})`)}function p(e){return i[Math.ceil(30*e)]}const f=(e,t,n,r,o=[255,255,255,1])=>{const i=[];return i[3]=1-(1-r)*(1-o[3]),i[0]=Math.round(e*r/i[3]+o[0]*o[3]*(1-r)/i[3]),i[1]=Math.round(t*r/i[3]+o[1]*o[3]*(1-r)/i[3]),i[2]=Math.round(n*r/i[3]+o[2]*o[3]*(1-r)/i[3]),i},v=e=>{const[t,n,r]=f(...e.match(/([0-9.]{1,3})/g).map(Number));return(299*t+587*n+114*r)/1e3>=128?"rgb(0,0,0)":"rgb(255,255,255)"};function y(e){if(e){if("#"===e.charAt(0)){const t=c(e);return t.push(1),t}let t;if(t=s.exec(e))return t.slice(1,5).map((e=>+e));if(t=l.exec(e)){const e=t.slice(1,4);return e.push(1),e.map((e=>+e))}if("string"==typeof e){const t=c(a[e.toLowerCase()]);return t.push(1),t}}return[0,0,0,1]}function b(e){const t=e.slice(0,3).map((e=>(256|e).toString(16).slice(1)));return t.unshift("#"),t.join("")}function x(e){return`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${e[3]})`}function w(e,t="white"){e=o()(e),t=o()(t);const n=e.alpha(),r=t.alpha()*(1-n),i=n+r,a=t.rgb()||[];return o()([...e.rgb().map(((e,t)=>(n*e+r*a[t])/i)),i])}},84826:(e,t,n)=>{"use strict";var r,o,i,a;n.d(t,{$b:()=>l,Bg:()=>he,C8:()=>J,CZ:()=>q,Cw:()=>m,Er:()=>F,F2:()=>V,F5:()=>se,Fk:()=>ae,Gd:()=>x,H:()=>C,I8:()=>ue,JO:()=>ge,K3:()=>w,Kg:()=>ee,LE:()=>s,LG:()=>M,Lk:()=>g,Ls:()=>O,M3:()=>D,MV:()=>T,P2:()=>oe,PR:()=>S,RI:()=>d,SM:()=>W,TJ:()=>Y,TU:()=>b,VS:()=>fe,Zr:()=>R,_m:()=>ne,aT:()=>j,bA:()=>E,bP:()=>I,bT:()=>h,c0:()=>P,cE:()=>k,dY:()=>G,eB:()=>H,fw:()=>f,gF:()=>N,id:()=>v,jS:()=>K,oh:()=>_,ow:()=>L,pG:()=>le,pN:()=>ce,q$:()=>X,q_:()=>Z,sI:()=>$,sg:()=>u,tz:()=>A,um:()=>re,up:()=>Q,v1:()=>me,vS:()=>y,vz:()=>p,x0:()=>c,xB:()=>de,xD:()=>ie,xS:()=>U,y8:()=>B,yD:()=>te,yP:()=>z});const s="ff_front_1170_outliner_030222_short",l="fflag_fix_front_dev_1284_auto_detect_undo_281022_short",c="ff_front_dev_1442_unselect_shape_on_click_outside_080622_short",d="ff_front_dev_1536_taxonomy_user_labels_150222_long",u="ff_front_DEV_1713_audio_ui_150222_short",h="ff_dev_2128_html_in_labels_150422_short",g="ff_front_dev_2290_draft_in_annotation_history_short",m="ff_front_dev_2431_delete_polygon_points_080622_short",p="ff_front_dev_2432_auto_save_polygon_draft_210622_short",f="ff_front_dev_2669_paragraph_author_filter_210622_short",v="ff_front_dev_2671_anchor_rotate_bbox_010722_short",y="ff_front_dev_2715_audio_3_280722_short",b="fflag_feat_dev_2755_regions_list_grouped_by_labels_with_ordered_collapse_short",x="fflag_fix_front_dev_2918_labeling_filtered_paragraphs_250822_short",w="fflag-feat-dev-3034-comments-with-drafts-short",C="fflag_feat_front_dev_3077_repeater_tag_loading_performance_short",S="fflag_fix_front_dev_3350_restrict_drawing_area_short",j="fflag_fix_front_dev_3377_image_regions_shift_on_resize_280922_short",k="fflag_fix_front_dev_3391_interactive_view_all",O="fflag_fix_front_dev_3617_taxonomy_memory_leaks_fix",R="fflag_fix_front_dev_3666_max_usages_on_region_creation_171122_short",E="fflag_feat_front_dev_3873_labeling_ui_improvements_short",_="fflag_feat_front_lsdv_3025_outliner_filter_short",A="fflag_fix_front_dev_3730_shortcuts_initial_input_22122022_short",T="fflag_fix_front_dev_3793_relative_coords_short",P="fflag_fix_front_dev_4075_taxonomy_overlap_281222_short",I="fflag_feat_front_dev_4081_magic_wand_tool",L="fflag_fix_back_dev_4174_overlap_issue_experiments_10012023_short",M="fflag_feat_front_lsdv_e_278_contextual_scrolling_short",K="fflag_feat_all_lsdv_e_294_llm_annotations_180723_long",D="fflag_fix_font_lsdv_1148_hotkeys_namespaces_01022023_short",N="fflag_feat_front_lsdv_4583_multi_image_segmentation_short",V="fflag_feat_front_lsdv_4583_6_images_preloading_short",z="fflag_fix_font_lsdv_3009_draft_saving_stuck_130223_short",B="fflag_fix_front_lsdv_4600_lead_time_27072023_short",H="fflag_feat_front_lsdv_4659_skipduplicates_060323_short",F="fflag_feat_front_lsdv_4620_richtext_opimization_060423_short",W="fflag_fix_front_lsdv_4620_memory_leaks_100723_short",$="fflag_feat_front_lsdv_4620_outliner_optimization_310723_short",U="fflag_fix_all_lsdv_4711_cors_errors_accessing_task_data_short",Z="fflag_feat_front_lsdv_4712_skipduplicates_editing_110423_short",G="fflag_fix_front_lsdv_4881_timeseries_points_missing_140423_short",Y="fflag_fix_front_lsdv_4988_dynamic_no_label_120523_short",X="fflag_fix_front_lsdv_4930_selection_tool_fixes_240423_short",q="fflag_fix_front_lsdv_4992_hide_all_regions_04052023_short",J="fflag_fix_front_lsdv_4998_missed_dynamic_children_030523_short",Q="fflag_feat_front_prod_309_choice_hint_080523_short",ee="fflag_fix_front_lsdv_5248_double_click_delay_280823_short",te="fflag_feat_front_lsdv_5451_async_taxonomy_110823_short",ne="fflag_fix_front_leap_218_improve_performance_of_taxonomy_search_short",re="fflag_feat_front_lsdv_5452_taxonomy_labeling_110823_short",oe="fflag_fix_all_optic_79_task_count_is_wrong_short",ie="fflag_fix_front_leap_149_taxonomy_selected_true_short",ae="fflag_feat_front_leap_187_video_seek_on_select_short",se="fflag_fix_front_leap_443_select_annotation_once",le="fflag_fix_front_leap_32_zoom_perf_190923_short",ce="fflag_fix_leap_466_text_sanitization",de="fflag_fix_leap_246_multi_object_hotkeys_160124_short",ue="fflag_feat_all_leap_1081_reviewer_flow_updates",he="fflag_feat_all_leap_883_custom_script_270524_short",ge="fflag_feat_front_leap_1173_disable_postpone_skip_short",me="fflag_feat_all_leap_1430_per_field_comments_100924_short";function pe(){var e,t;return Object.assign({},null!=(e=null==(t=window.APP_SETTINGS)?void 0:t.feature_flags)?e:{})}function fe(e){var t;const n=pe(),r={fflag_fix_front_lsdv_4620_memory_leaks_100723_short:!1};return e in r?r[e]:e in n?!0===n[e]:!0===(null==(t=window.APP_SETTINGS)?void 0:t.feature_flags_default_value)}Object.assign(window,{APP_SETTINGS:Object.assign({},null!=(r=window.APP_SETTINGS)?r:{},{feature_flags:Object.assign({},null!=(o=null==(i=window.APP_SETTINGS)?void 0:i.feature_flags)?o:{},null!=(a=window.FEATURE_FLAGS)?a:{})})}),Object.assign(window,{getFeatureFlags:pe,isFF:fe})},84411:(e,t,n)=>{"use strict";n.r(t),n.d(t,{applyHighlightStylesToDoc:()=>_,createClass:()=>h,findByXpath:()=>T,findIdxContainer:()=>O,findNodeAt:()=>I,getNodesInRange:()=>y,getTextNodesInRange:()=>b,highlightRange:()=>C,htmlEscape:()=>P,isValidTreeNode:()=>v,labelWithCSS:()=>u,mainOffsets:()=>k,matchesSelector:()=>A,moveStylesBetweenHeadTags:()=>E,normalizeBoundaries:()=>w,removeSpans:()=>R,sanitizeHtml:()=>L,splitBoundaries:()=>S,toGlobalOffset:()=>j,toggleLabelsAndScores:()=>d});var r=n(72829),o=n.n(r),i=n(48862),a=n(47521),s=n.n(a),l=n(78438),c=n(50494);function d(e){const t=t=>{const n=t.getElementsByClassName("htx-highlight");Array.from(n).forEach((t=>{t.classList.contains("htx-manual-label")||(e?t.classList.remove("htx-no-label"):t.classList.add("htx-no-label"))}))},n=(0,c.cn)("htx-richtext").toClassName();t(document),document.querySelectorAll(`iframe.${n}`).forEach((e=>t(e.contentWindow.document)))}const u=(()=>{const e={};return(t,{index:n,labels:r,score:o})=>{const a=r?r.join(","):"",s=[n,a].filter(Boolean).join(":"),c=i.hashCode(s+o);let d=`htx-label-${c}`;if(d=d.toLowerCase(),d in e)return e[d];t.setAttribute("data-labels",a);return h(`.${d}:after`,`content:${`url(${l.A.labelToSVG({label:s,score:o})})`}`),e[c]=!0,d}})();function h(e,t){const n=document.createElement("style");n.type="text/css",document.getElementsByTagName("head")[0].appendChild(n),(n.sheet||{}).insertRule?n.sheet.insertRule(`${e}{${t}}`,0):(n.styleSheet||n.sheet).addRule(e,t)}function g(e){return e.nodeType===Node.TEXT_NODE}function m(e){for(;e.hasChildNodes();)e=e.firstChild;return e}function p(e){for(;e.hasChildNodes();)e=e.lastChild;return e}function f(e){if(e.firstChild)return e.firstChild;for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function v(e,t){for(;e;){if(t&&e===t)return!0;if(e.nodeType===Node.ELEMENT_NODE&&"true"===e.dataset.skipNode)return!1;e=e.parentNode}return!0}function y(e){const t=e.startContainer,n=e.endContainer,r=e.commonAncestorContainer,o=[];let i;for(i=t.parentNode;i&&(v(i,r)&&o.push(i),i!==r);i=i.parentNode);for(o.reverse(),i=t;i&&(v(i,r)&&o.push(i),i!==n);i=f(i));return o}function b(e){return y(e).filter((e=>g(e)))}function x(e,t){const n=e.cloneNode(!1);return n.deleteData(0,t),e.deleteData(t,e.length-t),o()(n,e)}function w(e){let t,n,r,{startContainer:o,startOffset:i,endContainer:a,endOffset:s}=e;function l(e){return!!g(e)&&(!(e===o&&i>0)&&(e!==a||0!==s))}for(o.childNodes.length&&i>0&&(o=p(o.childNodes[i-1]),i=o.length||o.childNodes.length),se===r?null:function(e){if(e.firstChild)return e.firstChild;for(;!e.nextSibling;)if(!(e=e.parentNode))return null;return e.nextSibling}(e),r=p(a);t&&!l(t);)t=n(t);const c=t;for(t=a,n=e=>e===r?null:function(e){if(e.lastChild)return e.lastChild;for(;!e.previousSibling;)if(!(e=e.parentNode))return null;return e.previousSibling}(e),r=m(o);t&&!l(t);)t=n(t);const d=t;e.setStart(c,0),e.setEnd(d,d.length)}function C(e,t,n){null==t&&(t="htx-annotation");const r=/^\s*$/,o=b(e._range);let i=0;e._range.startOffset===o[i].length&&i++;let a=o.length;a>1&&o[o.length-1].length!==e._range.endOffset&&(a-=1);const s=[];for(let e=i,l=a;e0&&o0&&r{let r=0;const o=e=>{if(e===t)return r;"#text"===e.nodeName&&(r+=e.length),"BR"===e.nodeName&&(r+=1);for(let t=0;t<=e.childNodes.length;t++){const n=e.childNodes[t];if(n){const e=o(n);if(void 0!==e)return e}}};return n+o(e)},k=e=>{const t=window.getSelection().getRangeAt(0).cloneRange();let n=t.startOffset,r=t.endOffset,o=!1,i=!1;const a=e=>{if("#text"===e.nodeName&&(e===t.startContainer||o||(n+=e.length),e===t.startContainer&&(o=!0),e===t.endContainer||i||(r+=e.length),e===t.endContainer&&(i=!0)),"BR"===e.nodeName&&(o||(n+=1),i||(r+=1)),e.childNodes.length>0)for(let t=0;t<=e.childNodes.length;t++){const n=e.childNodes[t];if(n){const e=a(n);if(e)return e}}};return a(e),{start:n,end:r}},O=(e,t)=>{let n=t;const r=e=>{if(e)if("#text"===e.nodeName){if(n-e.length<=0)return e;n-=e.length}else if("BR"===e.nodeName)n-=1;else if(e.childNodes.length>0)for(let t=0;t<=e.childNodes.length;t++){const n=e.childNodes[t];if(n){const e=r(n);if(e)return e}}};return{node:r(e),len:n}};function R(e){const t=[];e&&e.forEach((e=>{for(;e.firstChild;)e.parentNode.insertBefore(e.firstChild,e);t.push(e.parentNode),e.parentNode.removeChild(e)})),t.forEach((e=>e.normalize()))}function E(e,t){const n={},r=document.createDocumentFragment();for(let t=0;te.matches(t)||null!==e.closest(t),T=(e,t=document)=>(t!==document&&"."!==e[0]&&(e=`.${e}`),document.evaluate(e,t,null,XPathResult.ANY_TYPE,null).iterateNext()),P=e=>{const t=`${e}`,n=/["'&<>]/.exec(t);if(!n)return t;let r,o="",i=0,a=0;for(i=n.index;i=t){if(!n.firstChild)return[n,t-r];n=n.firstChild}else r+=n.textContent.length,n=n.nextSibling}function L(e=[]){if(!e)return"";const t=["onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],n={script:!0,iframe:!0};return s()(e,{allowedTags:!1,allowedAttributes:!1,disallowedTagsMode:"discard",allowVulnerableTags:!0,exclusiveFilter:e=>n[e.tag],nonTextTags:["script","textarea","option","noscript"],transformTags:{"*":(e,n)=>(Object.keys(n).forEach((e=>{t.includes(e)&&delete n[e]})),{tagName:e,attribs:n})}})}},18094:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(14041);var r=n(84411),o=n(31085);const i={DONE:"Done!",NO_COMP_LEFT:"No more annotations",NO_NEXT_TASK:"No More Tasks Left in Queue",NO_ACCESS:"You don't have access to this task",CONFIRM_TO_DELETE_ALL_REGIONS:"Please confirm you want to delete all labeled regions",ERR_REQUIRED:({modelName:e,field:t})=>`Attribute ${t} is required for ${e}`,ERR_UNKNOWN_TAG:({modelName:e,field:t,value:n})=>`Tag with name ${n} is not registered. Referenced by ${e}#${t}.`,ERR_TAG_NOT_FOUND:({modelName:e,field:t,value:n})=>`Tag with name ${n} does not exist in the config. Referenced by ${e}#${t}.`,ERR_TAG_UNSUPPORTED:({modelName:e,field:t,value:n,validType:r})=>`Invalid attribute ${t} for ${e}: referenced tag is ${n}, but ${e} can only control ${[].concat(r).join(", ")}`,ERR_PARENT_TAG_UNEXPECTED:({validType:e,value:t})=>`Tag ${t} must be a child of one of the tags ${[].concat(e).join(", ")}.`,ERR_BAD_TYPE:({modelName:e,field:t,validType:n})=>`Attribute ${t} of tag ${e} has invalid type. Valid types are: ${n}.`,ERR_INTERNAL:({value:e})=>`Internal error. See browser console for more info. Try again or contact developers.
${e}`,ERR_GENERAL:({value:e})=>e,URL_CORS_DOCS:"https://labelstud.io/guide/storage.html#Troubleshoot-CORS-and-access-problems",URL_TAGS_DOCS:"https://labelstud.io/tags",ERR_LOADING_AUDIO:({attr:e,url:t,error:n})=>(0,o.jsxs)("div",{"data-testid":"error:audio",children:[(0,o.jsxs)("p",{children:["Error while loading audio. Check ",(0,o.jsx)("code",{children:e})," field in task."]}),(0,o.jsxs)("p",{children:["Technical description: ",n]}),(0,o.jsxs)("p",{children:["URL: ",(0,r.htmlEscape)(t)]})]}),ERR_LOADING_S3:({attr:e,url:t})=>`\n
\n

\n There was an issue loading URL from ${e} value.\n The request parameters are invalid.\n If you are using S3, make sure you’ve specified the right bucket region name.\n

\n

URL: ${(0,r.htmlEscape)(t)}

\n
`,ERR_LOADING_CORS({attr:e,url:t}){return`\n
\n

\n There was an issue loading URL from ${e} value.\n Most likely that's because static server has wide-open CORS.\n Read more on that here.\n

\n

\n Also check that:\n

    \n
  • URL is valid
  • \n
  • Network is reachable
  • \n
\n

\n

URL: ${(0,r.htmlEscape)(t)}

\n
`},ERR_LOADING_HTTP({attr:e,url:t,error:n}){return`\n
\n

\n There was an issue loading URL from ${e} value\n

\n

\n Things to look out for:\n

    \n
  • URL is valid
  • \n
  • URL scheme matches the service scheme, i.e. https and https
  • \n
  • \n The static server has wide-open CORS,\n more on that here\n
  • \n
\n

\n

\n Technical description: ${n}\n
\n URL: ${(0,r.htmlEscape)(t)}\n

\n
`}}},48862:(e,t,n)=>{"use strict";n.r(t),n.d(t,{atobUnicode:()=>m,camelizeKeys:()=>O,chunks:()=>S,clamp:()=>C,delay:()=>b,destroyMSTObject:()=>P,emailFromCreatedBy:()=>k,escapeHtml:()=>p,findClosestParent:()=>w,fixMobxObserve:()=>I,flatten:()=>h,getUrl:()=>c,hashCode:()=>g,humanDateDiff:()=>T,isArraysEqual:()=>f,isDefined:()=>x,isMacOS:()=>_,isString:()=>a,isStringEmpty:()=>s,isStringJSON:()=>l,isValidObjectURL:()=>d,minMax:()=>E,snakeizeKeys:()=>R,sortAnnotations:()=>L,toArray:()=>y,toTimeString:()=>u,triggerResizeEvent:()=>A,userDisplayName:()=>j,wrapArray:()=>v});var r=n(57958),o=n(77099),i=n(83126);const a=e=>"string"==typeof e||e instanceof String,s=e=>!!a(e)&&0===e.length,l=e=>{if(a(e)){try{JSON.parse(e)}catch(e){return!1}return!0}return!1};function c(e,t){const n=t.slice(e),r=/^(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g.exec(n);return r&&r.length?r[1]:""}function d(e,t=!1){return"string"==typeof e&&(!(!t||!e.startsWith("/"))||/^https?:\/\//.test(e))}function u(e){var t;if("number"==typeof e)return null==(t=new Date(e).toUTCString().match(/(\d\d:\d\d:\d\d)/))?void 0:t[0]}function h(e){return e.reduce(((e,t)=>e.concat(Array.isArray(t)?h(t):t)),[])}function g(e){let t=0;if(0===e.length)return`${t}`;for(let n=0;n`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`)).join(""))}function p(e){return(null!=e?e:"").replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function f(e,t){return e.length===t.length&&e.every(((e,n)=>t[n]===e))}function v(e){return[].concat(e)}function y(e){return(Array.isArray(e)?e:[e]).filter((e=>void 0!==e))}function b(e=0){return new Promise((t=>setTimeout(t,e)))}const x=e=>null!=e;function w(e,t=()=>!0,n=e=>e.parent){for(;e=n(e);)if(t(e))return e;return null}function C(e,t,n){return Math.min(n,Math.max(t,e))}const S=(e,t)=>{const n=[];let r,o;for(r=0,o=e.length;r{const{firstName:t,lastName:n}=e;return t||n?[t,n].filter((e=>!!e)).join(" ").trim():e.username||e.email},k=e=>{var t;return null==e||null==(t=e.match(/([^@,\s]+@[^@,\s]+)(,\s*\d+)?$/))?void 0:t[1]},O=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>"[object Object]"===Object.prototype.toString.call(t)?[(0,i.toCamelCase)(e),O(t)]:[(0,i.toCamelCase)(e),t]))),R=e=>Object.fromEntries(Object.entries(e).map((([e,t])=>"[object Object]"===Object.prototype.toString.call(t)?[(0,i.toSnakeCase)(e),R(t)]:[(0,i.toSnakeCase)(e),t])));function E(e){return e.reduce(((e,t)=>(e[0]=void 0===e[0]||te[1]?t:e[1],e)),[])}function _(){return navigator.platform.indexOf("Mac")>-1}const A=()=>{const e=new Event("resize");e.initEvent("resize",!1,!1),window.dispatchEvent(e)},T=e=>{const t=(0,r.A)(new Date(e),{addSuffix:!0});return"less than a minute ago"===t?"just now":t},P=e=>{e&&((0,o.Yo)(e),(0,o.zr)(e))},I=(...e)=>{},L=e=>e.sort(((e,t)=>new Date(t.createdDate).getTime()-new Date(e.createdDate).getTime()))},13346:()=>{},49264:()=>{},35296:()=>{}}]); //# sourceMappingURL=82.js.map \ No newline at end of file diff --git a/web/dist/apps/labelstudio/82.js.map b/web/dist/apps/labelstudio/82.js.map index 6e9c28dd9b89..27c35eeb8d16 100644 --- a/web/dist/apps/labelstudio/82.js.map +++ b/web/dist/apps/labelstudio/82.js.map @@ -1 +1 @@ -{"version":3,"file":"82.js","mappings":"kIAAO,MAAMA,EAAe,CAC1BC,UAAW,OACXC,QAAS,GACTC,YAAa,OACbC,YAAa,GAGf,GACEC,WAAY,GACZC,aAAc,GACdC,aAAc,EAGdC,iBAAkB,UAClBC,YAAa,QAEbC,oBAAqB,OAGrBC,gBAAiB,QACjBC,sBAAuB,QAGvBC,yBAA0B,MAC1BC,yBAA0B,EAC1BC,uBAAwB,qBAGxBC,wBAAyB,EAGzBC,eAAgB,UAChBC,cAAe,UACfC,eAAgB,UAChBC,YAAa,OACbC,oBAAqB,YAGrBC,iBAAkB,IAClBC,eAAgB,IAEhBC,eA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,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAGIC,EAAa,CACjBC,UAAW,UACXC,aAAc,UACdC,KAAM,UACNC,WAAY,UACZC,MAAO,UACPC,MAAO,UACPC,OAAQ,UACRC,MAAO,UACPC,eAAgB,UAChB3pJ,KAAM,UACN4pJ,WAAY,UACZC,MAAO,UACPC,UAAW,UACXC,UAAW,UACXC,WAAY,UACZC,UAAW,UACXC,MAAO,UACPC,eAAgB,UAChBC,SAAU,UACVC,QAAS,UACT33C,KAAM,UACN43C,SAAU,UACVC,SAAU,UACVC,cAAe,UACfC,SAAU,UACVC,UAAW,UACXC,UAAW,UACXC,YAAa,UACbC,eAAgB,UAChBC,WAAY,UACZC,WAAY,UACZC,QAAS,UACTC,WAAY,UACZC,aAAc,UACdC,cAAe,UACfC,cAAe,UACfC,cAAe,UACfC,WAAY,UACZC,SAAU,UACVC,YAAa,UACbC,QAAS,UACTC,WAAY,UACZC,UAAW,UACXC,YAAa,UACbC,YAAa,UACbC,QAAS,UACTC,UAAW,UACXC,WAAY,UACZz5C,KAAM,UACN05C,UAAW,UACXC,KAAM,UACNnsJ,MAAO,UACPosJ,YAAa,UACbC,SAAU,UACVC,QAAS,UACTC,UAAW,UACXC,OAAQ,UACRC,MAAO,UACPC,MAAO,UACPC,SAAU,UACVC,cAAe,UACfC,UAAW,UACXC,aAAc,UACdC,UAAW,UACXC,WAAY,UACZC,UAAW,UACXC,qBAAsB,UACtBC,UAAW,UACXC,WAAY,UACZC,UAAW,UACXC,YAAa,UACbC,cAAe,UACfC,aAAc,UACdC,eAAgB,UAChBC,eAAgB,UAChBC,YAAa,UACbj7C,KAAM,UACNk7C,UAAW,UACXC,MAAO,UACP/6C,QAAS,UACTg7C,OAAQ,UACRC,iBAAkB,UAClBC,WAAY,UACZC,aAAc,UACdC,aAAc,UACdC,e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AM,EAGhBk2M,EAAiBz3L,IAC5B,MAAMimP,GAAUzpB,EAAAA,EAAAA,GAAoB,IAAI7xO,KAAKqV,GAAO,CAAEy8N,WAAW,IAEjE,MAAgB,2BAAZwpB,EAA6C,WAC1CA,CAAO,EAGHC,EAAoBxsR,IAC3BA,KACFy5G,EAAAA,EAAAA,IAAOz5G,IACPgX,EAAAA,EAAAA,IAAQhX,GACV,EAKWs9E,EAAiBA,IAAImvM,KAAJnvM,EAQjBsoL,EAAmBnwD,GACvBA,EAAY1kM,MAAK,CAAC5P,EAAG6P,IAAM,IAAIigB,KAAKjgB,EAAEkhM,aAAa1rK,UAAY,IAAIvV,KAAK9vB,EAAE+wM,aAAa1rK,W","sources":["webpack://labelstudio/../../libs/editor/src/core/Constants.ts","webpack://labelstudio/../../libs/editor/src/core/External.js","webpack://labelstudio/../../libs/editor/src/core/feature-flags/index.ts","webpack://labelstudio/../../libs/editor/src/core/Registry.ts","webpack://labelstudio/../../libs/editor/src/utils/data.js","webpack://labelstudio/../../libs/editor/src/utils/unique.ts","webpack://labelstudio/../../libs/editor/src/core/Tree.tsx","webpack://labelstudio/../../libs/editor/src/common/Utils/useMounted.ts","webpack://labelstudio/../../libs/editor/src/stores/Annotation/LinkingModes/CommentMode.js","webpack://labelstudio/../../libs/editor/src/stores/Annotation/LinkingModes/RelationMode.js","webpack://labelstudio/../../libs/editor/src/stores/Annotation/LinkingModes.js","webpack://labelstudio/../../libs/editor/src/utils/resize-observer.ts","webpack://labelstudio/../../libs/editor/src/utils/debounce.js","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/Geometry.js","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/BoundingBox.js","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/RelationShape.js","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/watchers/DOMWatcher.js","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/watchers/PropertyWatcher.js","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/NodesConnector.js","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/CommentsOverlay.module.scss?0e64","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/CommentsOverlay.tsx","webpack://labelstudio/../../libs/editor/src/components/ErrorMessage/ErrorMessage.module.scss?9ac1","webpack://labelstudio/../../libs/editor/src/components/ErrorMessage/ErrorMessage.jsx","webpack://labelstudio/../../libs/editor/src/components/TreeValidation/TreeValidation.jsx","webpack://labelstudio/../../libs/editor/src/core/CustomTypes.ts","webpack://labelstudio/../../libs/editor/src/core/Types.js","webpack://labelstudio/../../libs/editor/src/mixins/AnnotationMixin.js","webpack://labelstudio/../../libs/editor/src/mixins/IsReadyMixin.js","webpack://labelstudio/../../libs/editor/src/mixins/ProcessAttrs.js","webpack://labelstudio/../../libs/editor/src/mixins/Syncable.ts","webpack://labelstudio/../../libs/editor/src/mixins/Normalization.ts","webpack://labelstudio/../../libs/editor/src/mixins/ReadOnlyMixin.js","webpack://labelstudio/../../libs/editor/src/components/ImageView/Image.scss?ee6d","webpack://labelstudio/../../libs/editor/src/components/ImageView/Image.jsx","webpack://labelstudio/../../libs/editor/src/mixins/Regions.js","webpack://labelstudio/../../libs/editor/src/regions/Result.js","webpack://labelstudio/../../libs/editor/src/mixins/PerRegionModes.ts","webpack://labelstudio/../../libs/editor/src/mixins/PerRegion.js","webpack://labelstudio/../../libs/editor/src/mixins/AreaMixin.js","webpack://labelstudio/../../libs/editor/src/utils/magic-wand.js","webpack://labelstudio/../../libs/editor/src/utils/image.js","webpack://labelstudio/../../libs/editor/src/utils/date.js","webpack://labelstudio/../../libs/editor/src/utils/selection-tools.js","webpack://labelstudio/../../libs/editor/src/utils/styles.js","webpack://labelstudio/../../libs/editor/src/utils/index.js","webpack://labelstudio/../../libs/editor/src/regions/AudioRegion/AudioUltraRegionModel.js","webpack://labelstudio/../../libs/editor/src/regions/AudioRegion/AudioRegionModel.js","webpack://labelstudio/../../libs/editor/src/regions/EditableRegion.js","webpack://labelstudio/../../libs/editor/src/regions/AudioRegion.js","webpack://labelstudio/../../libs/editor/src/components/Infomodal/Infomodal.js","webpack://labelstudio/../../libs/editor/src/tags/TagBase.js","webpack://labelstudio/../../libs/editor/src/tags/object/Base.js","webpack://labelstudio/../../libs/editor/src/tags/object/AudioNext/constants.ts","webpack://labelstudio/../../libs/editor/src/tags/object/AudioNext/model.js","webpack://labelstudio/../../libs/editor/src/tags/object/AudioUltra/model.js","webpack://labelstudio/../../libs/editor/src/tags/object/AudioUltra/constants.ts","webpack://labelstudio/../../libs/editor/src/components/Tags/Object.tsx","webpack://labelstudio/../../libs/editor/src/components/Waveform/Waveform.module.scss?0de5","webpack://labelstudio/../../libs/editor/src/styles/global.module.scss?9025","webpack://labelstudio/../../libs/editor/src/utils/transition.ts","webpack://labelstudio/../../libs/editor/src/utils/dom.ts","webpack://labelstudio/../../libs/editor/src/hooks/useFullscreen.ts","webpack://labelstudio/../../libs/editor/src/common/Tooltip/Tooltip.tsx","webpack://labelstudio/../../libs/editor/src/components/Hint/Hint.scss?7126","webpack://labelstudio/../../libs/editor/src/components/Hint/Hint.tsx","webpack://labelstudio/../../libs/editor/src/core/Hotkey.ts","webpack://labelstudio/../../libs/editor/src/components/Waveform/Waveform.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/Audio/Controls.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/AudioNext/view_old.jsx","webpack://labelstudio/../../libs/editor/src/hooks/useMemoizedHandlers.ts","webpack://labelstudio/../../libs/editor/src/components/Timeline/Context.ts","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/chevron_left.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/chevron_right.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/forward.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/backward.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/fastforward.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/interpolation_disabled.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/interpolation_add.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/interpolation_remove.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/keypoint_add.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/keypoint_delete.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/keypoint_disabled.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/play.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/pause.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/rewind.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/replay.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/fullscreen.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/fullscreen_exit.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/eye_opened.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/eye_closed.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/cross.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/collapse.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/expand.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/prev_step.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/next_step.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/config.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/sound.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/sound_muted.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/timeline/info.svg","webpack://labelstudio/../../libs/editor/src/hooks/useHotkey.ts","webpack://labelstudio/../../libs/editor/src/common/Button/Button.tsx","webpack://labelstudio/../../libs/editor/src/common/Space/Space.scss?9d7d","webpack://labelstudio/../../libs/editor/src/common/Space/Space.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/SideControls/FramesControl.tsx","webpack://labelstudio/../../libs/editor/src/assets/icons/undo.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/redo.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/remove.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/trash.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/plus.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/sparks.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/comment-check.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/comment-red.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/comment-resolved.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/comment-unresolved.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/parent-link.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/grid.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/settings.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/settings-alt.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/star.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/star-outline.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/ban.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/visible.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/invisible.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/chevron.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/expand.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/expand-small.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/expand-alt.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/collapse.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/collapse-small.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/date.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/close.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/plus-circle.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/slow.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/fast.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/duplicate.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/ellipsis.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/warning.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/play.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/pause.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/help.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/check.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/check-bold.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/cross.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/cross-bold.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/player/pause.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/player/play.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/player/step.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/volume-mute.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/volume-half.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/volume-full.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/brush-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/brush-tool-smart.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/circle-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/circle-tool-smart.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/keypoints-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/keypoints-tool-smart.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/polygon-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/polygon-tool-smart.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/rectangle-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/rectangle-tool-smart.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/rectangle-3point-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/rectangle-3point-tool-smart.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/magic-wand-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/eraser-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/hand-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/brightness-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/contrast-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/magnify-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/minify-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/expand-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/move-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/rotate-left-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tools/rotate-right-tool.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/info-outline.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/info.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/copy.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/text.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/view-all.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/link.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/plus-alt.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/trash-alt.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/trash-rect.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/menu.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/minus.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/hamburger.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/details.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/locked.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/unlocked.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/cursor.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/list.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/speed.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/tag-alt.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/sort-up.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/sort-up-new.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/sort-down.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/sort-down-new.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/filter.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/delete.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/models.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/edit.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/arrow-left.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/arrow-left-small.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/arrow-right.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/arrow-right-small.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/relations/right.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/relations/left.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/relations/bi.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/properties/angle.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/thumbs_up.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/thumbs_down.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/entity_created.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/draft_created.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/draft_created2.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/prediction.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/skipped.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/imported.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/removed.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/propagated.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/ground_truth.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/annotation/skipped2.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/outliner/collapse.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/outliner/expand.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/outliner/drag.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/outliner/info.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/outliner/eye_opened.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/outliner/eye_closed.svg","webpack://labelstudio/../../libs/editor/src/assets/icons/comment/link-to.svg","webpack://labelstudio/../../libs/editor/src/common/Range/Range.tsx","webpack://labelstudio/../../libs/editor/src/common/Utils/useValueTracker.ts","webpack://labelstudio/../../libs/editor/src/components/Timeline/SideControls/VolumeControl.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Controls/Info.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Controls/Slider.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Controls/AudioControl.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Controls/ConfigControl.tsx","webpack://labelstudio/../../libs/editor/src/utils/InputMask.ts","webpack://labelstudio/../../libs/editor/src/common/Label/Label.scss?bccf","webpack://labelstudio/../../libs/editor/src/common/Label/Label.jsx","webpack://labelstudio/../../libs/editor/src/components/TimeDurationControl/TimeBox.tsx","webpack://labelstudio/../../libs/editor/src/components/TimeDurationControl/TimeDurationControl.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Controls.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Seeker.scss?3984","webpack://labelstudio/../../libs/editor/src/components/Timeline/Seeker.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Frames/Utils.ts","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Frames/Keypoints.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Frames/Frames.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Frames/index.ts","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Frames/Minimap.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Frames/Controls.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Wave/Utils.ts","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Wave/Wave.tsx","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/index.ts","webpack://labelstudio/../../libs/editor/src/components/Timeline/Views/Wave/index.ts","webpack://labelstudio/../../libs/editor/src/components/Timeline/Timeline.tsx","webpack://labelstudio/../../libs/editor/src/hooks/useLocalStorageState.ts","webpack://labelstudio/../../libs/editor/src/tags/object/AudioNext/view.tsx","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Common/Utils.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Common/Destructable.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Common/Events.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Media/BaseAudioDecoder.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Media/WebAudioDecoder.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Common/Worker/index.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Media/SplitChannel.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Media/AudioDecoder.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Media/AudioDecoderPool.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Media/WaveformAudio.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Media/MediaLoader.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Controls/Player.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Controls/Html5Player.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Controls/WebAudioPlayer.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Common/Color.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Tooltip/Tooltip.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Cursor/Cursor.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Visual/Layer.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Visual/LayerGroup.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Visual/PlayHead.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Visual/Loader.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Visual/Visualizer.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Regions/Segment.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Regions/Region.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Regions/Regions.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Timeline/Timeline.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/Waveform.ts","webpack://labelstudio/../../libs/editor/src/lib/AudioUltra/react/index.ts","webpack://labelstudio/../../libs/editor/src/tags/object/AudioUltra/view.tsx","webpack://labelstudio/../../libs/editor/src/tags/object/AudioNext/index.js","webpack://labelstudio/../../libs/editor/src/components/ImageGrid/ImageGrid.jsx","webpack://labelstudio/../../libs/editor/src/components/Toolbar/ToolbarContext.js","webpack://labelstudio/../../libs/editor/src/components/Toolbar/Tool.jsx","webpack://labelstudio/../../libs/editor/src/tools/Base.jsx","webpack://labelstudio/../../libs/editor/src/assets/icons/rotate.svg","webpack://labelstudio/../../libs/editor/src/components/ImageTransformer/LSTransformer.js","webpack://labelstudio/../../libs/editor/src/components/ImageTransformer/LSTransformerOld.js","webpack://labelstudio/../../libs/editor/src/components/ImageTransformer/ImageTransformer.jsx","webpack://labelstudio/../../libs/editor/src/components/ImageView/ImageView.module.scss?87b5","webpack://labelstudio/../../libs/editor/src/core/DataValidator/ConfigValidator.js","webpack://labelstudio/../../libs/editor/src/components/Toolbar/Toolbar.scss?ec15","webpack://labelstudio/../../libs/editor/src/components/Toolbar/Toolbar.jsx","webpack://labelstudio/../../libs/editor/src/common/Utils/useWindowSize.ts","webpack://labelstudio/../../libs/editor/src/components/ImageView/ImageViewContext.ts","webpack://labelstudio/../../libs/editor/src/common/Pagination/Pagination.scss?d354","webpack://labelstudio/../../libs/editor/src/common/Pagination/Pagination.tsx","webpack://labelstudio/../../libs/editor/src/components/ImageView/ImageView.jsx","webpack://labelstudio/../../libs/editor/src/components/ImageView/LabelOnRegion.jsx","webpack://labelstudio/../../libs/editor/src/mixins/KonvaRegion.js","webpack://labelstudio/../../libs/editor/src/regions/AliveRegion.tsx","webpack://labelstudio/../../libs/editor/src/components/ImageView/SuggestionControls.jsx","webpack://labelstudio/../../libs/editor/src/regions/RegionWrapper.jsx","webpack://labelstudio/../../libs/editor/src/regions/BrushRegion.jsx","webpack://labelstudio/../../libs/editor/src/hooks/useRegionColor.ts","webpack://labelstudio/../../libs/editor/src/utils/bboxCoords.js","webpack://labelstudio/../../libs/editor/src/regions/EllipseRegion.jsx","webpack://labelstudio/../../libs/editor/src/regions/KeyPointRegion.jsx","webpack://labelstudio/../../libs/editor/src/regions/PolygonPoint.jsx","webpack://labelstudio/../../libs/editor/src/regions/PolygonRegion.jsx","webpack://labelstudio/../../libs/editor/src/regions/RectRegion.jsx","webpack://labelstudio/../../libs/editor/src/core/Helpers.ts","webpack://labelstudio/../../libs/editor/src/mixins/Tool.js","webpack://labelstudio/../../libs/editor/src/mixins/DrawingTool.js","webpack://labelstudio/../../libs/editor/src/components/Node/Node.scss?3a19","webpack://labelstudio/../../libs/editor/src/components/Node/NodeView.ts","webpack://labelstudio/../../libs/editor/src/components/Node/Node.tsx","webpack://labelstudio/../../libs/editor/src/tools/Brush.jsx","webpack://labelstudio/../../libs/editor/src/tools/Erase.jsx","webpack://labelstudio/../../libs/editor/src/tools/KeyPoint.js","webpack://labelstudio/../../libs/editor/src/tools/Polygon.js","webpack://labelstudio/../../libs/editor/src/tools/Rect.js","webpack://labelstudio/../../libs/editor/src/tools/Ellipse.js","webpack://labelstudio/../../libs/editor/src/components/Toolbar/FlyoutMenu.jsx","webpack://labelstudio/../../libs/editor/src/tools/Zoom.jsx","webpack://labelstudio/../../libs/editor/src/tools/Rotate.jsx","webpack://labelstudio/../../libs/editor/src/tools/Brightness.jsx","webpack://labelstudio/../../libs/editor/src/tools/Contrast.jsx","webpack://labelstudio/../../libs/editor/src/tools/MagicWand.jsx","webpack://labelstudio/../../libs/editor/src/tools/Selection.js","webpack://labelstudio/../../libs/editor/src/tools/Manager.js","webpack://labelstudio/../../libs/editor/src/tags/object/Image/DrawingRegion.js","webpack://labelstudio/../../libs/editor/src/tags/object/Image/ImageEntity.js","webpack://labelstudio/../../libs/editor/src/utils/FileLoader.ts","webpack://labelstudio/../../libs/editor/src/tags/object/Image/ImageEntityMixin.js","webpack://labelstudio/../../libs/editor/src/tags/object/Image/ImageSelectionPoint.js","webpack://labelstudio/../../libs/editor/src/tags/object/Image/ImageSelection.js","webpack://labelstudio/../../libs/editor/src/tags/object/MultiItemObjectBase.js","webpack://labelstudio/../../libs/editor/src/tags/object/Image/Image.js","webpack://labelstudio/../../libs/editor/src/mixins/SpanText.js","webpack://labelstudio/../../libs/editor/src/mixins/LabelMixin.js","webpack://labelstudio/../../libs/editor/src/mixins/SelectedModel.js","webpack://labelstudio/../../libs/editor/src/mixins/DynamicChildrenMixin.js","webpack://labelstudio/../../libs/editor/src/tags/control/Base.js","webpack://labelstudio/../../libs/editor/src/components/Label/Label.jsx","webpack://labelstudio/../../libs/editor/src/mixins/TagParentMixin.js","webpack://labelstudio/../../libs/editor/src/tags/control/Label.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/Labels/Labels.scss?6204","webpack://labelstudio/../../libs/editor/src/tags/control/Labels/Labels.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/ParagraphLabels.jsx","webpack://labelstudio/../../libs/editor/src/mixins/LeadTime.ts","webpack://labelstudio/../../libs/editor/src/mixins/PerItem.js","webpack://labelstudio/../../libs/editor/src/mixins/Required.js","webpack://labelstudio/../../libs/editor/src/regions/TextAreaRegion/TextAreaRegion.scss?f7c7","webpack://labelstudio/../../libs/editor/src/components/HtxTextBox/HtxTextBox.module.scss?443c","webpack://labelstudio/../../libs/editor/src/components/HtxTextBox/HtxTextBox.jsx","webpack://labelstudio/../../libs/editor/src/regions/TextAreaRegion.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/ClassificationBase.js","webpack://labelstudio/../../libs/editor/src/tags/control/TextArea/TextAreaRegionView.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/TextArea/TextArea.jsx","webpack://labelstudio/../../libs/editor/src/mixins/Visibility.js","webpack://labelstudio/../../libs/editor/src/hooks/useToggle.ts","webpack://labelstudio/../../libs/editor/src/components/TreeStructure/TreeStructure.tsx","webpack://labelstudio/../../libs/editor/src/components/Taxonomy/Taxonomy.module.scss?3d63","webpack://labelstudio/../../libs/editor/src/components/Taxonomy/Taxonomy.tsx","webpack://labelstudio/../../libs/editor/src/tags/control/Choice.jsx","webpack://labelstudio/../../libs/editor/src/mixins/SelectedChoiceMixin.js","webpack://labelstudio/../../libs/editor/src/tags/control/Choices.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/Rating.jsx","webpack://labelstudio/../../libs/editor/src/regions/ParagraphsRegion.js","webpack://labelstudio/../../libs/editor/src/tags/object/Paragraphs/Paragraphs.module.scss?d5ca","webpack://labelstudio/../../libs/editor/src/tags/object/Paragraphs/model.js","webpack://labelstudio/../../libs/editor/src/common/Dropdown/Dropdown.scss?4bda","webpack://labelstudio/../../libs/editor/src/common/Dropdown/DropdownContext.tsx","webpack://labelstudio/../../libs/editor/src/common/Dropdown/DropdownComponent.tsx","webpack://labelstudio/../../libs/editor/src/common/Dropdown/DropdownTrigger.tsx","webpack://labelstudio/../../libs/editor/src/common/Dropdown/Dropdown.ts","webpack://labelstudio/../../libs/editor/src/common/Select/Select.tsx","webpack://labelstudio/../../libs/editor/src/tags/object/Paragraphs/AuthorFilter.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/Paragraphs/Phrases.jsx","webpack://labelstudio/../../libs/editor/src/common/Toggle/Toggle.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/Paragraphs/HtxParagraphs.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/Paragraphs/index.js","webpack://labelstudio/../../libs/editor/src/tags/object/RichText/domManager.ts","webpack://labelstudio/../../libs/editor/src/mixins/HighlightMixin.js","webpack://labelstudio/../../libs/editor/src/tags/object/RichText/model.js","webpack://labelstudio/../../libs/editor/src/tags/object/RichText/view.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/RichText/index.js","webpack://labelstudio/../../libs/editor/src/tags/object/Table.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/TimeSeries/helpers.js","webpack://labelstudio/../../libs/editor/src/mixins/PersistentState.js","webpack://labelstudio/../../libs/editor/src/tags/object/TimeSeries/Channel.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/TimeSeries/symbols.js","webpack://labelstudio/../../libs/editor/src/tags/object/TimeSeries.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/PagedView.jsx","webpack://labelstudio/../../libs/editor/src/common/Menu/Menu.scss?598e","webpack://labelstudio/../../libs/editor/src/common/Menu/MenuContext.js","webpack://labelstudio/../../libs/editor/src/common/Menu/Menu.jsx","webpack://labelstudio/../../libs/editor/src/common/Menu/MenuItem.jsx","webpack://labelstudio/../../libs/editor/src/components/VideoCanvas/VideoCanvas.scss?de81","webpack://labelstudio/../../libs/editor/src/components/VideoCanvas/VirtualCanvas.tsx","webpack://labelstudio/../../libs/editor/src/components/VideoCanvas/VirtualVideo.tsx","webpack://labelstudio/../../libs/editor/src/components/VideoCanvas/VideoCanvas.tsx","webpack://labelstudio/../../libs/editor/src/components/VideoCanvas/VideoConstants.ts","webpack://labelstudio/../../libs/editor/src/tags/object/Video/Video.scss?7d8f","webpack://labelstudio/../../libs/editor/src/core/TimeTraveller.js","webpack://labelstudio/../../libs/editor/src/regions/RichTextRegion.js","webpack://labelstudio/../../libs/editor/src/tags/object/Video/Video.js","webpack://labelstudio/../../libs/editor/src/regions/TimelineRegion.js","webpack://labelstudio/../../libs/editor/src/regions/TimeSeriesRegion.js","webpack://labelstudio/../../libs/editor/src/regions/VideoRegion.js","webpack://labelstudio/../../libs/editor/src/utils/props.ts","webpack://labelstudio/../../libs/editor/src/regions/VideoRectangleRegion.js","webpack://labelstudio/../../libs/editor/src/regions/Area.js","webpack://labelstudio/../../libs/editor/src/utils/commentClassification.ts","webpack://labelstudio/../../libs/editor/src/stores/UserStore.js","webpack://labelstudio/../../libs/editor/src/stores/Comment/Anchor.js","webpack://labelstudio/../../libs/editor/src/stores/Comment/Comment.js","webpack://labelstudio/../../libs/editor/src/stores/Comment/CommentStore.js","webpack://labelstudio/../../libs/editor/src/regions/index.js","webpack://labelstudio/../../libs/editor/src/stores/RegionStore.js","webpack://labelstudio/../../libs/editor/src/stores/RelationStore.js","webpack://labelstudio/../../libs/editor/src/stores/Annotation/Annotation.js","webpack://labelstudio/../../libs/editor/src/tags/object/Video/Rectangle.tsx","webpack://labelstudio/../../libs/editor/src/tags/object/Video/tools.ts","webpack://labelstudio/../../libs/editor/src/tags/object/Video/TransformTools.ts","webpack://labelstudio/../../libs/editor/src/tags/object/Video/VideoRegions.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/Video/HtxVideo.jsx","webpack://labelstudio/../../libs/editor/src/tags/object/Video/index.js","webpack://labelstudio/../../libs/editor/src/components/Ranker/Ranker.module.scss?e14a","webpack://labelstudio/../../libs/editor/src/components/Ranker/Item.tsx","webpack://labelstudio/../../libs/editor/src/components/Ranker/StrictModeDroppable.tsx","webpack://labelstudio/../../libs/editor/src/components/Ranker/Column.tsx","webpack://labelstudio/../../libs/editor/src/components/Ranker/Ranker.tsx","webpack://labelstudio/../../libs/editor/src/tags/object/List.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/DateTime.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/Number.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/Pairwise.js","webpack://labelstudio/../../libs/editor/src/tags/control/Ranker.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/Shortcut.jsx","webpack://labelstudio/../../libs/editor/src/components/NewTaxonomy/TaxonomySearch.scss?b28f","webpack://labelstudio/../../libs/editor/src/components/NewTaxonomy/TaxonomySearch.tsx","webpack://labelstudio/../../libs/editor/src/components/NewTaxonomy/NewTaxonomy.tsx","webpack://labelstudio/../../libs/editor/src/mixins/SharedChoiceStore/model.js","webpack://labelstudio/../../libs/editor/src/mixins/SharedChoiceStore/mixin.js","webpack://labelstudio/../../libs/editor/src/tags/control/Taxonomy/Taxonomy.scss?5aea","webpack://labelstudio/../../libs/editor/src/tags/control/Taxonomy/Taxonomy.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/HyperTextLabels.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/TimeSeriesLabels.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/TimelineLabels.js","webpack://labelstudio/../../libs/editor/src/tags/control/VideoRectangle.js","webpack://labelstudio/../../libs/editor/src/mixins/SeparatedControlMixin.js","webpack://labelstudio/../../libs/editor/src/mixins/ToolManagerMixin.js","webpack://labelstudio/../../libs/editor/src/tags/control/Brush.js","webpack://labelstudio/../../libs/editor/src/tags/control/BrushLabels.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/Ellipse.js","webpack://labelstudio/../../libs/editor/src/tags/control/EllipseLabels.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/KeyPoint.js","webpack://labelstudio/../../libs/editor/src/tags/control/KeyPointLabels.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/MagicWand.js","webpack://labelstudio/../../libs/editor/src/tags/control/Polygon.js","webpack://labelstudio/../../libs/editor/src/tags/control/PolygonLabels.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/Rectangle.js","webpack://labelstudio/../../libs/editor/src/tags/control/RectangleLabels.jsx","webpack://labelstudio/../../libs/editor/src/tags/control/Relations.js","webpack://labelstudio/../../libs/editor/src/tags/control/Relation.js","webpack://labelstudio/../../libs/editor/src/tags/visual/Collapse.jsx","webpack://labelstudio/../../libs/editor/src/components/Dialog/Dialog.module.scss?583d","webpack://labelstudio/../../libs/editor/src/components/Dialog/Dialog.jsx","webpack://labelstudio/../../libs/editor/src/tags/visual/Dialog.jsx","webpack://labelstudio/../../libs/editor/src/tags/visual/Header.jsx","webpack://labelstudio/../../libs/editor/src/tags/visual/View.jsx","webpack://labelstudio/../../libs/editor/src/tags/visual/Style.jsx","webpack://labelstudio/../../libs/editor/src/tags/visual/Filter.jsx","webpack://labelstudio/../../libs/editor/src/utils/reactCleaner.js","webpack://labelstudio/../../libs/editor/src/components/App/Annotation.js","webpack://labelstudio/../../libs/editor/src/components/DraftPanel/DraftPanel.scss?7fcd","webpack://labelstudio/../../libs/editor/src/components/DraftPanel/DraftPanel.jsx","webpack://labelstudio/../../libs/editor/src/common/Userpic/Userpic.scss?58c0","webpack://labelstudio/../../libs/editor/src/common/Userpic/Userpic.tsx","webpack://labelstudio/../../libs/editor/src/components/CurrentEntity/AnnotationHistory.scss?2da5","webpack://labelstudio/../../libs/editor/src/components/CurrentEntity/AnnotationHistory.tsx","webpack://labelstudio/../../libs/editor/src/hooks/useRegionsCopyPaste.ts","webpack://labelstudio/../../libs/editor/src/components/CurrentEntity/CurrentEntity.jsx","webpack://labelstudio/../../libs/editor/src/components/Entities/Entities.module.scss?9eea","webpack://labelstudio/../../libs/editor/src/components/Entities/RegionItem.scss?e4b8","webpack://labelstudio/../../libs/editor/src/components/Entities/RegionItem.jsx","webpack://labelstudio/../../libs/editor/src/components/Entities/RegionTree.jsx","webpack://labelstudio/../../libs/editor/src/components/Entities/LabelItem.jsx","webpack://labelstudio/../../libs/editor/src/components/Entities/LabelList.jsx","webpack://labelstudio/../../libs/editor/src/components/Entities/SortMenu.scss?172b","webpack://labelstudio/../../libs/editor/src/components/Entities/SortMenu.jsx","webpack://labelstudio/../../libs/editor/src/common/Oneof/Oneof.js","webpack://labelstudio/../../libs/editor/src/common/RadioGroup/RadioGroup.jsx","webpack://labelstudio/../../libs/editor/src/common/Modal/Modal.scss?cb58","webpack://labelstudio/../../libs/editor/src/common/Modal/ModalPopup.jsx","webpack://labelstudio/../../libs/editor/src/common/Modal/Modal.jsx","webpack://labelstudio/../../libs/editor/src/components/Entities/Entities.jsx","webpack://labelstudio/../../libs/editor/src/components/Entity/Entity.module.scss?1f7c","webpack://labelstudio/../../libs/editor/src/utils/namedColors.ts","webpack://labelstudio/../../libs/editor/src/common/Tag/Tag.tsx","webpack://labelstudio/../../libs/editor/src/components/Entity/Entity.jsx","webpack://labelstudio/../../libs/editor/src/components/Relations/Relations.module.scss?b1cb","webpack://labelstudio/../../libs/editor/src/components/Relations/Relations.scss?ba9c","webpack://labelstudio/../../libs/editor/src/components/Relations/Relations.jsx","webpack://labelstudio/../../libs/editor/src/assets/icons/send.svg","webpack://labelstudio/../../libs/editor/src/common/Utils/mergeRefs.ts","webpack://labelstudio/../../libs/editor/src/common/TextArea/TextArea.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/OldComment/CommentForm.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/OutlinerPanel/RegionLabel.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/Comment/LinkState.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/Comment/CommentFormButtons.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/Comment/CommentForm.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/CommentFormBase.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/OldComment/CommentItem.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/OldComment/CommentsList.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/Comment/CommentItem.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/Comment/CommentsList.tsx","webpack://labelstudio/../../libs/editor/src/components/Comments/Comments.tsx","webpack://labelstudio/../../libs/editor/src/components/AnnotationTab/AnnotationTab.jsx","webpack://labelstudio/../../libs/editor/src/components/BottomBar/HistoryActions.jsx","webpack://labelstudio/../../libs/editor/src/components/AnnotationTab/DynamicPreannotationsToggle.jsx","webpack://labelstudio/../../libs/editor/src/components/AnnotationTab/AutoAcceptToggle.jsx","webpack://labelstudio/../../libs/editor/src/components/CurrentEntity/GroundTruth.jsx","webpack://labelstudio/../../libs/editor/src/components/BottomBar/Actions.jsx","webpack://labelstudio/../../libs/editor/src/components/BottomBar/buttons.tsx","webpack://labelstudio/../../libs/editor/src/components/BottomBar/Controls.tsx","webpack://labelstudio/../../libs/editor/src/components/BottomBar/BottomBar.jsx","webpack://labelstudio/../../libs/editor/src/components/Debug.jsx","webpack://labelstudio/../../libs/editor/src/components/App/Grid.module.scss?f343","webpack://labelstudio/../../libs/editor/src/components/AnnotationTabs/AnnotationTabs.jsx","webpack://labelstudio/../../libs/editor/src/components/App/Grid.jsx","webpack://labelstudio/../../libs/editor/src/components/InstructionsModal/InstructionsModal.tsx","webpack://labelstudio/../../libs/editor/src/components/InteractiveOverlays/RelationsOverlay.jsx","webpack://labelstudio/../../libs/editor/src/components/Segment/Segment.module.scss?cb0b","webpack://labelstudio/../../libs/editor/src/components/Segment/Segment.jsx","webpack://labelstudio/../../libs/editor/src/components/Settings/Settings.scss?a584","webpack://labelstudio/../../libs/editor/src/core/settings/editorsettings.js","webpack://labelstudio/../../libs/editor/src/core/settings/videosettings.ts","webpack://labelstudio/../../libs/editor/src/components/Settings/TagSettings/SettingsRenderer.tsx","webpack://labelstudio/../../libs/editor/src/components/Settings/TagSettings/VideoSettings.tsx","webpack://labelstudio/../../libs/editor/src/components/Settings/Settings.jsx","webpack://labelstudio/../../libs/editor/src/components/SidebarTabs/SidebarTabs.jsx","webpack://labelstudio/../../libs/editor/src/hooks/useDrag.ts","webpack://labelstudio/../../libs/editor/src/components/SidePanels/constants.ts","webpack://labelstudio/../../libs/editor/src/components/SidePanels/PanelBase.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/DetailsPanel/RegionEditor.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/DetailsPanel/RegionDetails.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/Components/RegionControlButton.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/Components/LockButton.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/DetailsPanel/RegionLabels.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/DetailsPanel/RegionItem.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/DetailsPanel/Relations.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/DetailsPanel/RelationsControls.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/DetailsPanel/DetailsPanel.tsx","webpack://labelstudio/../../libs/editor/src/assets/icons/tree/arrow.svg","webpack://labelstudio/../../libs/editor/src/components/SidePanels/OutlinerPanel/OutlinerTree.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/SidePanelsContext.ts","webpack://labelstudio/../../libs/editor/src/components/Filter/FilterDropdown.tsx","webpack://labelstudio/../../libs/editor/src/components/Filter/types/Boolean.jsx","webpack://labelstudio/../../libs/editor/src/components/Filter/types/Common.jsx","webpack://labelstudio/../../libs/editor/src/common/Input/Input.jsx","webpack://labelstudio/../../libs/editor/src/components/Filter/FilterInput.tsx","webpack://labelstudio/../../libs/editor/src/components/Filter/types/Number.jsx","webpack://labelstudio/../../libs/editor/src/components/Filter/types/String.jsx","webpack://labelstudio/../../libs/editor/src/components/Filter/FilterInterfaces.tsx","webpack://labelstudio/../../libs/editor/src/components/Filter/FilterRow.tsx","webpack://labelstudio/../../libs/editor/src/components/Filter/filter-util.ts","webpack://labelstudio/../../libs/editor/src/components/Filter/Filter.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/OutlinerPanel/ViewControls.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/OutlinerPanel/OutlinerPanel.tsx","webpack://labelstudio/../../libs/editor/src/hooks/useMedia.ts","webpack://labelstudio/../../libs/editor/src/components/SidePanels/SidePanels.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/TabPanels/types.ts","webpack://labelstudio/../../libs/editor/src/components/SidePanels/TabPanels/utils.ts","webpack://labelstudio/../../libs/editor/src/components/SidePanels/TabPanels/PanelTabsBase.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/TabPanels/Tabs.tsx","webpack://labelstudio/../../libs/editor/src/components/SidePanels/TabPanels/SideTabsPanels.tsx","webpack://labelstudio/../../libs/editor/src/common/TimeAgo/TimeAgo.tsx","webpack://labelstudio/../../libs/editor/src/components/AnnotationsCarousel/AnnotationButton.tsx","webpack://labelstudio/../../libs/editor/src/components/AnnotationsCarousel/AnnotationsCarousel.tsx","webpack://labelstudio/../../libs/editor/src/components/TopBar/HistoryActions.jsx","webpack://labelstudio/../../libs/editor/src/components/TopBar/Actions.jsx","webpack://labelstudio/../../libs/editor/src/components/TopBar/Annotations.jsx","webpack://labelstudio/../../libs/editor/src/components/TopBar/Controls.jsx","webpack://labelstudio/../../libs/editor/src/components/TopBar/CurrentTask.jsx","webpack://labelstudio/../../libs/editor/src/components/TopBar/TopBar.jsx","webpack://labelstudio/../../libs/editor/src/components/App/App.jsx","webpack://labelstudio/../../libs/editor/src/core/DataValidator/index.js","webpack://labelstudio/../../libs/editor/src/mixins/SharedChoiceStore/extender.js","webpack://labelstudio/../../libs/editor/src/stores/Annotation/HistoryItem.js","webpack://labelstudio/../../libs/editor/src/stores/Annotation/store.js","webpack://labelstudio/../../libs/editor/src/stores/ProjectStore.js","webpack://labelstudio/../../libs/editor/src/stores/SettingsStore.js","webpack://labelstudio/../../libs/editor/src/stores/TaskStore.js","webpack://labelstudio/../../libs/editor/src/stores/UserLabels.ts","webpack://labelstudio/../../libs/editor/src/stores/CustomButton.ts","webpack://labelstudio/../../libs/editor/src/stores/AppStore.js","webpack://labelstudio/../../libs/editor/src/configureStore.js","webpack://labelstudio/../../libs/editor/src/Component.jsx","webpack://labelstudio/../../libs/editor/src/defaultOptions.js","webpack://labelstudio/../../libs/editor/src/utils/events.ts","webpack://labelstudio/../../libs/editor/src/LabelStudio.tsx","webpack://labelstudio/../../libs/editor/src/index.js","webpack://labelstudio/../../libs/editor/src/utils/bem.ts","webpack://labelstudio/../../libs/editor/src/utils/canvas.js","webpack://labelstudio/../../libs/editor/src/utils/colors.js","webpack://labelstudio/../../libs/editor/src/utils/feature-flags.ts","webpack://labelstudio/../../libs/editor/src/utils/html.js","webpack://labelstudio/../../libs/editor/src/utils/messages.jsx","webpack://labelstudio/../../libs/editor/src/utils/utilities.ts"],"sourcesContent":["export const defaultStyle = {\n fillcolor: \"#666\",\n opacity: 0.2,\n strokecolor: \"#666\",\n strokewidth: 1,\n};\n\nexport default {\n FILL_COLOR: \"\",\n STROKE_COLOR: \"\",\n STROKE_WIDTH: 1,\n\n // labels\n LABEL_BACKGROUND: \"#36B37E\",\n EMPTY_LABEL: \"blank\",\n\n RELATION_BACKGROUND: \"#fff\",\n\n // label on image\n SHOW_LABEL_FILL: \"white\",\n SHOW_LABEL_BACKGROUND: \"black\",\n\n // when region gets highlighted styling\n HIGHLIGHTED_STROKE_COLOR: \"red\",\n HIGHLIGHTED_STROKE_WIDTH: 2,\n HIGHLIGHTED_CSS_BORDER: \"1px dashed #00aeff\",\n\n // when using dynamic suggestions\n SUGGESTION_STROKE_WIDTH: 4,\n\n // cursors\n DEFAULT_CURSOR: \"default\",\n CHOOSE_CURSOR: \"pointer\",\n POINTER_CURSOR: \"pointer\",\n MOVE_CURSOR: \"hand\",\n LINKING_MODE_CURSOR: \"crosshair\",\n\n // images\n BRIGHTNESS_VALUE: 100,\n BRIGHTNESS_MAX: 400,\n\n CONTRAST_VALUE: 100,\n CONTRAST_MAX: 400,\n};\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n\n/**\n * Callback on submit annotation\n */\nfunction onSubmitAnnotation() {}\n\n/**\n * Callback on update annotation\n */\nfunction onUpdateAnnotation() {}\n/**\n * Callback on delete annotation\n */\nfunction onDeleteAnnotation() {}\n\n/**\n * Callback on skip task\n */\nfunction onSkipTask() {}\n\n/**\n * Callback on unskip task\n */\nfunction onUnskipTask() {}\n\n/**\n * Callback on task load\n */\nfunction onTaskLoad() {}\n\n/**\n * Callback on Label Studio load\n */\nfunction onLabelStudioLoad() {}\n\n/**\n * Callback when labeled region gets created\n */\nfunction onEntityCreate() {}\n\n/**\n * Callback when labeled region gets deleted\n */\nfunction onEntityDelete() {}\n\n/**\n * Callback when ground truth button gets pressed\n */\nfunction onGroundTruth() {}\n\n/**\n * Callback when a new annotation gets selected\n */\nfunction onSelectAnnotation(annotation, previousAnnotation) {}\n\n/**\n * Called when \"Accept\" or \"Fix + Accept\" is pressed\n */\nfunction onAcceptAnnotation(store, entity) {}\n\n/**\n * Called when \"Reject\" is pressed\n */\nfunction onRejectAnnotation(store, entity) {}\n\n/**\n * Called when storage gets initialized for the first time\n */\nfunction onStorageInitialized(ls) {}\n\nfunction onSubmitDraft(entity) {}\n\nfunction onNextTask(nextTaskId) {}\n\nfunction onPrevTask(prevTaskId) {}\n\nexport default {\n onDeleteAnnotation,\n onEntityCreate,\n onEntityDelete,\n onGroundTruth,\n onLabelStudioLoad,\n onSkipTask,\n onUnskipTask,\n onSubmitAnnotation,\n onSubmitDraft,\n onTaskLoad,\n onUpdateAnnotation,\n onSelectAnnotation,\n onAcceptAnnotation,\n onRejectAnnotation,\n onStorageInitialized,\n onNextTask,\n onPrevTask,\n};\n","if (process.env.NODE_ENV !== \"production\" && !window.APP_SETTINGS) {\n const feature_flags = (() => {\n try {\n return require(\"./flags.json\");\n } catch (err) {\n return {};\n }\n })();\n\n window.APP_SETTINGS = { feature_flags };\n}\n","/**\n * Class for register View\n */\nclass _Registry {\n tags: any[] = [];\n models: Record = {};\n views: Record = {};\n regions: any[] = [];\n objects: any[] = [];\n // list of available areas per object type\n areas = new Map();\n\n views_models: Record = {};\n\n tools: Record = {};\n\n perRegionViews: Record = {};\n\n addTag(tag: string | number, model: { name: string | number }, view: any) {\n this.tags.push(tag);\n this.models[tag] = model;\n this.views[tag] = view;\n this.views_models[model.name] = view;\n }\n\n addRegionType(type: { detectByValue: any }, object: any, detector: any) {\n this.regions.push(type);\n if (detector) type.detectByValue = detector;\n const areas = this.areas.get(object);\n\n if (areas) areas.push(type);\n else this.areas.set(object, [type]);\n }\n\n regionTypes() {\n return this.regions;\n }\n\n addObjectType(type: any) {\n this.objects.push(type);\n }\n\n objectTypes() {\n return this.objects;\n }\n\n modelsArr() {\n return Object.values(this.models);\n }\n\n getViewByModel(modelName: string) {\n const view = this.views_models[modelName];\n\n if (!view) throw new Error(`No view for model: ${modelName}`);\n\n return view;\n }\n\n getViewByTag(tag: string | number) {\n return this.views[tag];\n }\n\n getAvailableAreas(object: any, value: any) {\n const available = this.areas.get(object);\n\n if (!available) return [];\n if (value) {\n for (const model of available) {\n if (model.detectByValue && model.detectByValue(value)) return [model];\n }\n }\n return available.filter((a: { detectByValue: any }) => !a.detectByValue);\n }\n\n getTool(name: string) {\n const model = this.tools[name];\n\n if (!model) {\n const models = Object.keys(this.tools);\n\n throw new Error(`No model registered for tool: ${name}\\nAvailable models:\\n\\t${models.join(\"\\n\\t\")}`);\n }\n\n return model;\n }\n\n /**\n * Get model\n * @param {string} tag\n * @return {import(\"mobx-state-tree\").IModelType}\n */\n getModelByTag(tag: string) {\n const model = this.models[tag];\n\n if (!model) {\n const models = Object.keys(this.models);\n\n throw new Error(`No model registered for tag: ${tag}\\nAvailable models:\\n\\t${models.join(\"\\n\\t\")}`);\n }\n\n return model;\n }\n\n addPerRegionView(tag: string | number, mode: string | number, view: any) {\n const tagViews = this.perRegionViews[tag] || {};\n\n tagViews[mode] = view;\n this.perRegionViews[tag] = tagViews;\n }\n\n getPerRegionView(tag: string | number, mode: string | number) {\n return this.perRegionViews[tag]?.[mode];\n }\n}\n\nconst Registry = new _Registry();\n\nRegistry.getTool = Registry.getTool.bind(Registry);\nRegistry.getModelByTag = Registry.getModelByTag.bind(Registry);\n\nexport default Registry;\n","import { escapeHtml, isString } from \"./utilities\";\nimport get from \"lodash.get\";\n\n/**\n * Simple way to retrieve linked data in `value` param from task\n * Works only for prefixed values ($image); non-prefixed values left as is\n * It's possible to add some text which will be left untouched; that's useful for\n * visual Text tags to display some additional info (\"Title: $title\")\n * @param {string} value param\n * @param {object} task\n */\nexport const parseValue = (value, task) => {\n const reVar = /\\$[\\w[\\].{}]+/gi;\n\n if (!value) return \"\";\n\n // value can refer to structures, not only texts, so just replace wouldn't be enough\n if (value.match(reVar)?.[0] === value) {\n return get(task, value.slice(1)) ?? \"\";\n }\n\n return value.replace(reVar, (v) => get(task, v.slice(1) ?? \"\"));\n};\n\n/**\n * Parse CSV\n * Accepts only numbers as a data\n * Returns hash with names (or indexed hash for headless csv) as a keys\n * and arrays of numbers as a values\n * @param {string} text\n * @returns {{ [string]: number[] }}\n */\nexport const parseCSV = (text, separator = \"auto\") => {\n // @todo iterate over newlines for better performance\n const lines = text.split(\"\\n\");\n let names;\n\n if (separator !== \"auto\" && !lines[0].includes(separator)) {\n throw new Error([`Cannot find provided separator \"${separator}\".`, `Row 1: ${lines[0]}`].join(\"\\n\"));\n }\n\n // detect separator (2nd line is definitely with data)\n if (separator === \"auto\" && lines.length > 1) {\n const candidates = lines[1].trim().match(/[,;\\s\\t]/g);\n\n if (!candidates.length) throw new Error(\"No separators found\");\n if (candidates.some((c) => c !== candidates[0])) {\n const list = Array.from(new Set(candidates))\n .map(escapeHtml)\n .map((s) => `\"${s}\"`)\n .join(\", \");\n\n throw new Error(\n [\n `More than one possible separator found: ${list}`,\n 'You can provide correct one with ',\n ].join(\"\\n\"),\n );\n }\n separator = candidates[0];\n if (lines[0].split(separator).length !== lines[1].split(separator).length)\n throw new Error(\n [\n \"Different amount of elements in rows.\",\n `Row 1: ${lines[0]}`,\n `Row 2: ${lines[1]}`,\n `Guessed separator: ${separator}`,\n 'You can provide correct one with ',\n ].join(\"\\n\"),\n );\n }\n\n const re = new RegExp(\n [\n '\"(?:\"\"|[^\"])*\"', // quoted text with possible quoted quotes inside it (\"not a \"\"value\"\"\")\n `[^\"${separator}]+`, // usual value, no quotes, between separators\n `(?=${separator}(?:${separator}|$))`, // empty value in the middle or at the end of string\n `^(?=${separator})`, // empty value at the start of the string\n ].join(\"|\"),\n \"g\",\n );\n const split = (text) => text.trim().match(re);\n\n // detect header; if it is omitted, use indices as a header names\n names = split(lines[0]);\n const secondLine = split(lines[1]);\n // assume that we have at least one column with numbers\n // and name of this column is not number :)\n // so we have different types for values in first and second rows\n\n if (!names.every((n, i) => isNaN(n) === isNaN(secondLine[i]))) {\n lines.shift();\n names = names.map((n) => n.toLowerCase());\n } else {\n names = names.map((_, i) => String(i));\n }\n\n const result = {};\n\n for (const name of names) result[name] = [];\n\n if (names.length !== split(lines[0]).length) {\n throw new Error(\n [\n \"Column names count differs from data columns count.\",\n `Columns: ${names.join(\", \")};`,\n `Data: ${lines[0]};`,\n `Separator: \"${separator}\".`,\n ].join(\"\\n\"),\n );\n }\n\n let row;\n let i;\n\n for (const line of lines) {\n // skip empty lines including the last line\n if (!line.trim()) continue;\n row = split(line);\n for (i = 0; i < row.length; i++) {\n const val = +row[i];\n\n result[names[i]].push(isNaN(val) ? row[i] : val);\n }\n }\n\n return [result, names];\n};\n\n/**\n * Internal helper to check if string is JSON\n * @param {string} value\n * @returns {object|false}\n */\nexport const tryToParseJSON = (value) => {\n if (isString(value) && value[0] === \"{\") {\n try {\n return JSON.parse(value);\n } catch (e) {\n // somthing went wrong\n }\n }\n\n return false;\n};\n\n/**\n * Parse value type\n * Accept value type as a parameter\n * Returns type, seperator and options object by analyzing valueType\n */\nexport const parseTypeAndOption = (valueType) => {\n const [, type, sep] = valueType.match(/^(\\w+)(.)?/) ?? [];\n const options = {};\n\n if (sep) {\n const pairs = valueType.split(sep).slice(1);\n\n pairs.forEach((pair) => {\n const [k, v] = pair.split(\"=\", 2);\n\n options[k] = v ?? true; // options without values are `true`\n });\n }\n\n return { type, sep, options };\n};\n","// @todo for nanoid@3 there should be default import\nimport { nanoid } from \"nanoid\";\n\n/**\n * Unique hash generator\n * @param {number} lgth\n */\nexport const guidGenerator = (length = 10) => nanoid(length);\n","import React from \"react\";\nimport { getParentOfType, getType } from \"mobx-state-tree\";\nimport type { IAnyComplexType, IAnyStateTreeNode } from \"mobx-state-tree/dist/internal\";\n\nimport Registry from \"./Registry\";\nimport { parseValue } from \"../utils/data\";\nimport { FF_DEV_3391, isFF } from \"../utils/feature-flags\";\nimport { guidGenerator } from \"../utils/unique\";\n\ninterface ConfigNodeBaseProps {\n id: string;\n type: string;\n tagName: string;\n}\n\ninterface ConfigNode extends ConfigNodeBaseProps {\n // [key: string]: string,\n children?: ConfigNode[];\n value?: string;\n}\n\ninterface IAnnotation {\n id: string;\n ids: Map;\n}\n\nexport const TRAVERSE_SKIP = \"skip\";\nexport const TRAVERSE_STOP = \"stop\";\n\nfunction detectParseError(doc?: Document) {\n let node = doc?.children?.[0];\n\n for (let i = 0; i < 3; i++) {\n if (node?.tagName === \"parsererror\") return node.textContent;\n node = node?.children?.[0];\n }\n}\n\nconst deepReplaceAttributes = (root: Element, idx: number, indexFlag: string) => {\n function recursiveClone(node: Element) {\n if (node.attributes === undefined) return;\n\n const attrNames = Array.from(node.attributes).map((att) => att.name);\n\n for (const name of attrNames) {\n const value = node.getAttribute(name);\n\n node.setAttribute(name, value?.replace?.(indexFlag, `${idx}`) ?? \"\");\n }\n\n node.childNodes.forEach((node) => recursiveClone(node as Element));\n }\n\n recursiveClone(root);\n};\n\nfunction tagIntoObject(node: Element, taskData: Record, replaces?: Record): ConfigNode {\n const props = attrsToProps(node, replaces);\n const type = node.tagName.toLowerCase();\n const indexFlag = props.indexflag ?? \"{{idx}}\";\n const id = isFF(FF_DEV_3391) ? node.getAttribute(\"name\") ?? guidGenerator() : guidGenerator();\n const data: ConfigNode = {\n ...props,\n id,\n tagName: node.tagName,\n type,\n };\n\n if (type === \"repeater\") {\n const repeaterArray = parseValue(props.on, taskData) || [];\n const views = [];\n\n for (let i = 0; i < repeaterArray.length; i++) {\n const newReplaces: Record = { ...replaces, [indexFlag]: i };\n const view = {\n id: guidGenerator(),\n tagName: \"View\",\n type: \"view\",\n children: [...node.children].map((child) => {\n const clonedNode = child.cloneNode(true) as Element;\n\n deepReplaceAttributes(clonedNode, i, indexFlag);\n\n return tagIntoObject(clonedNode, taskData, newReplaces);\n }),\n };\n\n views.push(view);\n }\n\n data.tagName = \"View\";\n\n if (props.mode === \"pagination\") {\n data.type = \"pagedview\";\n } else {\n data.type = \"view\";\n }\n\n data.children = views;\n }\n // contains only text nodes; HyperText can contain any structure\n else if (node.childNodes.length && (!node.children.length || type === \"hypertext\")) {\n data.value = node.innerHTML?.trim() || data.value || \"\";\n } else if (node.children.length) {\n data.children = [...node.children].map((child) => tagIntoObject(child, taskData));\n }\n\n return data;\n}\n\n/**\n * Function to convert CSS string to object\n * @param {string} style\n * @returns {object}\n */\nfunction cssConverter(style: string) {\n if (!style) return null;\n\n const result: Record = {};\n const attributes = style.split(\";\");\n\n let firstIndexOfColon;\n let i;\n let key;\n let value;\n\n for (i = 0; i < attributes.length; i++) {\n firstIndexOfColon = attributes[i].indexOf(\":\");\n key = attributes[i].substring(0, firstIndexOfColon);\n value = attributes[i].substring(firstIndexOfColon + 1);\n\n key = key.replace(/ /g, \"\");\n if (key.length < 1) {\n continue;\n }\n\n if (value[0] === \" \") {\n value = value.substring(1);\n }\n\n if (value[value.length - 1] === \" \") {\n value = value.substring(0, value.length - 1);\n }\n\n const ukey = key.replace(/(-.)/g, (x) => x[1].toUpperCase());\n\n result[ukey] = value;\n }\n\n return result;\n}\n\n/**\n *\n * @param {*} attrs\n */\nfunction attrsToProps(node: Element, replaces?: Record): Record {\n const props: Record = {};\n\n if (!node) return props;\n\n for (const attr of node.attributes) {\n const { name, value } = attr;\n\n if (name !== \"value\" && [\"true\", \"false\"].includes(value)) {\n // Convert node of Tree to boolean value\n props[name.toLowerCase()] = value === \"true\";\n } else {\n if (replaces) {\n let finalValue = value;\n\n for (const [key, index] of Object.entries(replaces)) {\n finalValue = finalValue.replace(key, index);\n }\n props[name.toLowerCase()] = finalValue;\n } else {\n props[name.toLowerCase()] = value;\n }\n }\n }\n\n return props;\n}\n\n/**\n *\n * @param {string} html\n */\nfunction treeToModel(html: string, store: { task: { dataObj: Record } }): ConfigNode {\n const parser = new DOMParser();\n\n const doc = parser.parseFromString(html, \"application/xml\");\n\n const root = doc?.children?.[0];\n const parserError = detectParseError(doc);\n\n if (parserError) {\n throw new Error(parserError);\n }\n\n return tagIntoObject(root, store.task?.dataObj ?? {});\n\n // this.serializer = new XMLSerializer();\n\n // this.initRoot();\n\n // const root = buildData(Object.values(document)[0]);\n\n // root.children = addNode(Object.values(document)[0]);\n\n // return root;\n}\n\n/**\n * Render items of tree\n * @param {*} el\n */\nfunction renderItem(ref: IAnyStateTreeNode, annotation: IAnnotation, includeKey = true) {\n let el = ref;\n\n if (isFF(FF_DEV_3391)) {\n if (!annotation) return null;\n\n el = annotation.ids.get(cleanUpId(ref.id ?? ref.name));\n }\n\n if (!el) {\n console.error(`Can't find element ${ref.id ?? ref.name} in annotation ${annotation?.id}`);\n return null;\n }\n\n const type = getType(el);\n const identifierAttribute = type.identifierAttribute;\n const typeName = type.name;\n const View = Registry.getViewByModel(typeName);\n\n if (!View) {\n throw new Error(`No view for model: ${typeName}`);\n }\n const key = (identifierAttribute && el[identifierAttribute]) || guidGenerator();\n\n return ;\n}\n\n/**\n *\n * @param {*} item\n */\nfunction renderChildren(item: IAnyStateTreeNode, annotation: IAnnotation) {\n if (item && item.children && item.children.length) {\n return item.children.map((el: IAnyStateTreeNode) => {\n return renderItem(el, annotation);\n });\n }\n return null;\n}\n\n/**\n *\n * @param {*} obj\n * @param {*} classes\n */\nexport function findParentOfType(obj: IAnyStateTreeNode, classes: IAnyComplexType[]) {\n for (const c of classes) {\n try {\n const p = getParentOfType(obj, c);\n\n if (p) return p;\n } catch (err) {\n console.error(err);\n }\n }\n\n return null;\n}\n\n/**\n *\n * @param {*} obj\n * @param {*} classes\n */\nfunction filterChildrenOfType(obj: IAnyStateTreeNode, classes: string | string[]) {\n const res: IAnyStateTreeNode[] = [];\n const cls = Array.isArray(classes) ? classes : [classes];\n\n traverseTree(obj, (node) => {\n for (const c of cls) {\n if (getType(node).name === c) res.push(node);\n }\n });\n\n return res;\n}\n\ntype TraverseResult = void | typeof TRAVERSE_SKIP | typeof TRAVERSE_STOP;\n\nfunction traverseTree(root: IAnyStateTreeNode, cb: (node: IAnyStateTreeNode) => TraverseResult) {\n const visitNode = (node: IAnyStateTreeNode): TraverseResult => {\n const res = cb(node);\n\n if (res === TRAVERSE_SKIP) return;\n if (res === TRAVERSE_STOP) return TRAVERSE_STOP;\n\n if (node.children) {\n for (const chld of node.children) {\n const visit = visitNode(chld);\n\n if (visit === TRAVERSE_STOP) return TRAVERSE_STOP;\n }\n }\n };\n\n visitNode(root);\n}\n\nconst cleanUpId = (id: string) => id.replace(/@.*/, \"\");\n\nfunction extractNames(root: IAnyStateTreeNode) {\n const objects: IAnyStateTreeNode[] = [];\n const names = new Map();\n const toNames = new Map();\n\n // hacky way to get all the available object tag names\n const objectTypes = Registry.objectTypes().map((type) => type.name.replace(\"Model\", \"\").toLowerCase());\n\n traverseTree(root, (node) => {\n if (node.name) {\n names.set(cleanUpId(node.name), node);\n if (objectTypes.includes(node.type)) objects.push(cleanUpId(node.name));\n }\n });\n\n // initialize toName bindings [DOCS] name & toName are used to\n // connect different components to each other\n traverseTree(root, (node) => {\n const isControlTag = node.name && !objectTypes.includes(node.type);\n // auto-infer missed toName if there is only one object tag in the config\n\n if (isControlTag && !node.toname && objects.length === 1) {\n node.toname = objects[0];\n }\n\n if (node && node.toname) {\n const val = toNames.get(node.toname);\n\n if (val) {\n val.push(names.get(cleanUpId(node.name)));\n } else {\n toNames.set(node.toname, [names.get(cleanUpId(node.name))]);\n }\n }\n });\n\n return { names, toNames };\n}\n\nexport default {\n renderItem,\n renderChildren,\n treeToModel,\n findParentOfType,\n filterChildrenOfType,\n cssConverter,\n traverseTree,\n extractNames,\n cleanUpId,\n};\n","import { useEffect, useRef } from \"react\";\n\n/**\n * Protects async tasks from causing memory leaks in other effects/callbacks.\n * Wrap any set states within a component with\n *\n * if (mounted.current) { ... }\n */\nexport const useMounted = () => {\n const mounted = useRef(true);\n\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n\n return mounted;\n};\n","import { getParent, types } from \"mobx-state-tree\";\n\nconst CommentModeModel = types\n .model(\"CommentMode\", {})\n .volatile(() => ({\n comment: null,\n }))\n .views((self) => {\n return {\n get annotation() {\n return getParent(self, 2);\n },\n get regionStore() {\n return self.annotation.regionStore;\n },\n };\n })\n .actions((self) => {\n return {\n start(_comment) {\n self.comment = _comment;\n },\n stop() {\n self.comment = null;\n self.regionStore.unhighlightAll();\n },\n addLinkedRegion(region) {\n self.comment.setRegionLink(region);\n self.stop();\n },\n addLinkedResult(result) {\n self.comment.setResultLink(result);\n self.stop();\n },\n };\n });\n\nexport const CommentMode = {\n key: \"link_to_comment\",\n model: CommentModeModel,\n};\n","import { getParent, types } from \"mobx-state-tree\";\n\nconst RelationModeModel = types\n .model(\"RelationsMode\", {})\n .volatile(() => ({\n region: null,\n }))\n .views((self) => {\n return {\n get annotation() {\n return getParent(self, 2);\n },\n get regionStore() {\n return self.annotation.regionStore;\n },\n get relationStore() {\n return self.annotation.relationStore;\n },\n };\n })\n .actions((self) => {\n return {\n start(region) {\n self.region = region;\n },\n stop() {\n self.region = null;\n self.regionStore.unhighlightAll();\n },\n addLinkedRegion(secondRegion) {\n self.relationStore.addRelation(self.region, secondRegion);\n self.stop();\n },\n };\n });\n\nexport const RelationMode = {\n key: \"create_relation\",\n model: RelationModeModel,\n};\n","import { types } from \"mobx-state-tree\";\nimport Constants from \"../../core/Constants\";\nimport { CommentMode } from \"./LinkingModes/CommentMode\";\nimport { RelationMode } from \"./LinkingModes/RelationMode\";\n\nexport const CREATE_RELATION_MODE = RelationMode.key;\nexport const LINK_COMMENT_MODE = CommentMode.key;\n\nconst LinkingModeUnion = types.union(CommentMode.model, RelationMode.model);\n\nexport const LinkingModes = types\n .model(\"LinkingModes\", {\n linkingModes: types.optional(types.map(LinkingModeUnion), () => ({\n [RelationMode.key]: RelationMode.model.create({}),\n [CommentMode.key]: CommentMode.model.create({}),\n })),\n })\n .volatile((self) => {\n return {\n linkingMode: false,\n };\n })\n .views((self) => ({\n get currentLinkingMode() {\n return self.linkingMode && self.linkingModes.has(self.linkingMode)\n ? self.linkingModes.get(self.linkingMode)\n : null;\n },\n get isLinkingMode() {\n return !!self.linkingMode;\n },\n // @deprecated\n get relationMode() {\n console.warn(\"`relationMode` is deprecated. Use `isLinkingMode` instead.\");\n return self.isLinkingMode;\n },\n }))\n .actions((self) => {\n return {\n startLinkingMode(linkingModeName, obj) {\n if (self.isLinkingMode) {\n self.stopLinkingMode();\n }\n self.linkingMode = linkingModeName;\n if (!self.currentLinkingMode) {\n self.linkingMode = false;\n return;\n }\n self.currentLinkingMode.start(obj);\n\n document.body.style.cursor = Constants.CHOOSE_CURSOR;\n },\n\n stopLinkingMode() {\n document.body.style.cursor = Constants.DEFAULT_CURSOR;\n\n if (self.currentLinkingMode) {\n self.currentLinkingMode.stop();\n }\n\n self.linkingMode = false;\n },\n\n addLinkedRegion(region) {\n if (self.currentLinkingMode) {\n self.currentLinkingMode.addLinkedRegion?.(region);\n }\n },\n\n addLinkedResult(region) {\n if (self.currentLinkingMode) {\n self.currentLinkingMode.addLinkedResult?.(region);\n }\n },\n\n // @deprecated Use `startLinkingMode(CREATE_RELATION_MODE, obj)` instead\n startRelationMode(obj) {\n console.warn(\"`startRelationMode` is deprecated. Use `startLinkingMode(CREATE_RELATION_MODE, obj)` instead.\");\n self.startLinkingMode(RelationMode.key, obj);\n },\n // @deprecated Use `stopLinkingMode` instead\n stopRelationMode() {\n console.warn(\"`stopRelationMode` is deprecated. Use `stopLinkingMode` instead.\");\n self.stopLinkingMode();\n },\n };\n });\n","class ResizeObserverFallback {\n observe() {}\n unobserve() {}\n disconnect() {}\n}\n\nconst ResizeObserver = window.ResizeObserver ?? ResizeObserverFallback;\n\nexport default ResizeObserver;\n","/**\n * Returns a function, that, as long as it continues to be invoked,\n * will not be triggered. The function will be called after it\n * stops being called for N milliseconds. If `immediate` is passed,\n * trigger the function on the leading edge, instead of the trailing.\n *\n * @param {function} func\n * @param {number} wait\n * @param {boolean} immediate\n */\nexport function debounce(func, wait, immediate = false) {\n let timeout;\n\n return function (...args) {\n const later = () => {\n timeout = null;\n if (!immediate) {\n func.apply(this, args);\n }\n };\n const callNow = immediate && !timeout;\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n if (callNow) func.apply(this, args);\n };\n}\n","/**\n * @typedef {{x: number, y: number, width: number, height: number}} BBox\n *\n * @typedef {number[]} Points Represents (x,y) flat array, meaning\n * each two numbers represent x and y accordingly. Array always starts with x\n *\n * @typedef {{\n * x1: number,\n * x2: number,\n * x3: number,\n * x4: number,\n * y1: number,\n * y2: number,\n * y3: number,\n * y4: number}} RectCoordinates Represents 4 corners coordinates of rectangle\n */\nimport { clamp } from \"../../utils/utilities\";\n\nexport class Geometry {\n /**\n * Returns RAD angle to normalized degrees meaning that it will always fit 0-360 range\n * @param {number} angle Angle in RAD\n */\n static normalizeAngle(angle) {\n return ((angle + 360) % 360) * (Math.PI / 180);\n }\n\n /**\n * Calculate BBox for any number of coordinates\n * @param {Points} points Input points\n * @returns {Points} Array of two (x,y) coordinates representing a BBox\n */\n static getPointsBBox(points) {\n const minmax = [null, null, null, null];\n\n points.forEach((num, i) => {\n const pos = Math.round(i / 2) * 2 - i;\n\n if (pos === 0) {\n // Calculate min and max X\n if (minmax[0] === null || minmax[0] >= num) minmax[0] = num;\n if (minmax[2] === null || minmax[2] <= num) minmax[2] = num;\n } else if (pos === 1) {\n // Calculate min and max Y\n if (minmax[1] === null || minmax[1] >= num) minmax[1] = num;\n if (minmax[3] === null || minmax[3] <= num) minmax[3] = num;\n }\n });\n\n return minmax;\n }\n\n /**\n * Calculate distance between wo points\n * @param {Points} point1\n * @param {Points} point2\n */\n static distance(point1, point2) {\n const [x1, y1] = point1;\n const [x2, y2] = point2;\n\n return Math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2);\n }\n\n /**\n * Convert standard bbox to a set of coordinates\n * @param {BBox} bbox\n * @returns {RectCoordinates}\n */\n static toRectCoordinates(bbox) {\n const { x: x1, y: y1, width, height } = bbox;\n const [x2, y2] = [x1 + width, y1];\n const [x3, y3] = [x1 + width, y1 + height];\n const [x4, y4] = [x1, y1 + height];\n\n return { x1, x2, x3, x4, y1, y2, y3, y4 };\n }\n\n /**\n * Convert RectCoordinates to BBox\n * @param {RectCoordinates} rect\n * @returns {BBox}\n */\n static convertToRectBBox(rect) {\n return {\n x: rect.x1,\n y: rect.y1,\n width: rect.x2 - rect.x1,\n height: rect.y3 - rect.y1,\n };\n }\n\n /**\n * Find two closes BBoxes of two lists\n * @param {BBox[]} rectsList1\n * @param {BBox[]} rectsList2\n */\n static closestRects(rectsList1, rectsList2) {\n const result = rectsList1\n .reduce((res, rect1) => {\n const bbox1 = Geometry.toRectCoordinates(rect1);\n\n rectsList2.forEach((rect2) => {\n const bbox2 = Geometry.toRectCoordinates(rect2);\n\n const avgDistance =\n [\n Geometry.distance([bbox1.x1, bbox1.y1], [bbox2.x1, bbox1.y1]),\n Geometry.distance([bbox1.x2, bbox1.y2], [bbox2.x2, bbox1.y2]),\n Geometry.distance([bbox1.x3, bbox1.y3], [bbox2.x3, bbox1.y3]),\n Geometry.distance([bbox1.x4, bbox1.y4], [bbox2.x4, bbox2.y4]),\n ].reduce((d1, d2) => d1 + d2) / 4;\n\n res.push({\n distance: avgDistance,\n bbox: [Geometry.convertToRectBBox(bbox1), Geometry.convertToRectBBox(bbox2)],\n });\n });\n\n return res;\n }, [])\n .sort((a, b) => a.distance - b.distance);\n\n return result[0].bbox;\n }\n\n /**\n * Scale given BBox by a scale factor\n * @param {BBox} bbox Original BBox\n * @param {number} scale Scale factor\n * @returns {BBox} Scaled BBox\n */\n static scaleBBox(bbox, scale = 1) {\n return {\n ...bbox,\n x: bbox.x * scale,\n y: bbox.y * scale,\n width: bbox.width * scale,\n height: bbox.height * scale,\n };\n }\n\n static modifyBBoxCoords(bbox, modifier = (x) => x) {\n const p1 = modifier([bbox.x, bbox.y]);\n const p2 = modifier([bbox.width + bbox.x, bbox.height + bbox.y]);\n\n return {\n ...bbox,\n x: Math.min(p1[0], p2[0]),\n y: Math.min(p1[1], p2[1]),\n width: Math.abs(p2[0] - p1[0]),\n height: Math.abs(p2[1] - p1[1]),\n };\n }\n\n /**\n * Add padding to BBox\n * @param {BBox} bbox BBox to pad\n * @param {number} padding Padding size\n */\n static padding(bbox, padding = 0) {\n const paddingX = bbox.width < 1 ? 0 : padding;\n const paddingY = bbox.height < 1 ? 0 : padding;\n\n return {\n ...bbox,\n x: bbox.x - paddingX,\n y: bbox.y - paddingY,\n width: bbox.width + paddingX * 2,\n height: bbox.height + paddingY * 2,\n };\n }\n\n /**\n * Calculate ellipse BBox\n * @param {number} x Center X\n * @param {number} y Center Y\n * @param {number} rx Radius X\n * @param {number} ry Radius Y\n * @param {number} angle Angle in RAD\n * @returns {BBox[]} Dimensions of bounding box\n */\n static getEllipseBBox(x, y, rx, ry, angle) {\n const angleRad = Geometry.normalizeAngle(angle);\n const major = Math.max(rx, ry) * 2;\n const minor = Math.min(rx, ry) * 2;\n\n const getXLimits = () => {\n const t = Math.atan(((-minor / 2) * Math.tan(angleRad)) / (major / 2));\n\n return [t, t + Math.PI]\n .map((t) => {\n return x + (major / 2) * Math.cos(t) * Math.cos(angleRad) - (minor / 2) * Math.sin(t) * Math.sin(angleRad);\n })\n .sort((a, b) => b - a);\n };\n\n const getYLimits = () => {\n const t = Math.atan(((minor / 2) * 1.0) / Math.tan(angleRad) / (major / 2));\n\n return [t, t + Math.PI]\n .map((t) => {\n return y + (minor / 2) * Math.sin(t) * Math.cos(angleRad) + (major / 2) * Math.cos(t) * Math.sin(angleRad);\n })\n .sort((a, b) => b - a);\n };\n\n const [x1, x2] = getXLimits();\n const [y1, y2] = getYLimits();\n const width = x1 - x2;\n const height = y1 - y2;\n\n return { x: x2, y: y2, width, height };\n }\n\n /**\n * Calculate rotated rect BBox\n * @param {number} x Top left X\n * @param {number} y Top left Y\n * @param {number} width Width\n * @param {number} height Height\n * @param {number} angle Angle in RAD\n * @returns {BBox[]} Dimensions of bounding box\n */\n static getRectBBox(x, y, width, height, angle) {\n const angleRad = Geometry.normalizeAngle(angle);\n\n const rotate = (x1, y1) => [\n (x1 - x) * Math.cos(angleRad) - (y1 - y) * Math.sin(angleRad) + x,\n (x1 - x) * Math.sin(angleRad) + (y1 - y) * Math.cos(angleRad) + y,\n ];\n\n const [rx1, ry1, rx2, ry2] = Geometry.getPointsBBox([\n x,\n y,\n ...rotate(x + width, y),\n ...rotate(x + width, y + height),\n ...rotate(x, y + height),\n ]);\n\n return { x: rx1, y: ry1, width: rx2 - rx1, height: ry2 - ry1 };\n }\n\n /**\n * Calculate BBox of polygon shape\n * @param {Points} points\n * @return {BBox[]}\n */\n static getPolygonBBox(points) {\n const coords = points.reduce((res, point) => [...res, point.x, point.y], []);\n const [x1, y1, x2, y2] = Geometry.getPointsBBox(coords);\n\n return { x: x1, y: y1, width: x2 - x1, height: y2 - y1 };\n }\n\n /**\n * Calculate BBox of Brush region (a set of points)\n * @param {Points} points\n * @return {BBox[]}\n */\n static getBrushBBox(points) {\n const [x1, y1, x2, y2] = Geometry.getPointsBBox(points);\n\n return { x: x1, y: y1, width: x2 - x1, height: y2 - y1 };\n }\n\n /**\n * Calculate BBox of Brush region from image data\n * @param {Uint8ClampedArray} imageData Array containing the data in the RGBA order\n * @param {Number} width\n * @param {Number} height\n * @return {BBox}\n */\n static getImageDataBBox(imageData, w, h) {\n if (imageData.length !== w * h * 4) return null;\n const min = { x: w, y: h };\n const max = { x: 0, y: 0 };\n\n for (let y = 0; y < h; y++) {\n for (let x = 0; x < w; x++) {\n const alphaIndex = 4 * (y * w + x) + 3;\n\n if (imageData[alphaIndex]) {\n if (min.x > x) min.x = x;\n if (min.y > y) min.y = y;\n if (max.x < x) max.x = x;\n if (max.y < y) max.y = y;\n }\n }\n }\n return min.x <= max.x && min.y <= max.y\n ? { x: min.x, y: min.y, width: max.x - min.x, height: max.y - min.y }\n : null;\n }\n /**\n * Combine two or more BBoxes into one\n * @param {...BBox} bboxes Bboxes to merge\n * @return {BBox}\n */\n static combineBBoxes(...bboxes) {\n const [x1, y1, x2, y2] = Geometry.getPointsBBox(\n bboxes.reduce((points, bbox) => {\n if (bbox && bbox.x && bbox.y) {\n points.push(bbox.x);\n points.push(bbox.y);\n points.push(bbox.x + bbox.width);\n points.push(bbox.y + bbox.height);\n }\n return points;\n }, []),\n );\n\n return { x: x1, y: y1, width: x2 - x1, height: y2 - y1 };\n }\n\n static clampBBox(bbox, min, max) {\n const p1 = [clamp(bbox.x, min.x, max.x), clamp(bbox.y, min.y, max.y)];\n const p2 = [clamp(bbox.width + bbox.x, min.x, max.x), clamp(bbox.height + bbox.y, min.y, max.y)];\n\n return {\n x: p1[0],\n y: p1[1],\n width: p2[0] - p1[0],\n height: p2[1] - p1[1],\n };\n }\n\n /**\n * Get BBox of any DOM node\n * @param {HTMLOrSVGElement} domNode\n * @param {boolean} single Should return all possible BBoxes or not\n * @return {BBox[]}\n */\n static getDOMBBox(domNode, single = false) {\n if (!domNode) return null;\n\n const bboxes = domNode.getClientRects();\n\n if (bboxes.length === 0) return null;\n\n const convertDOMRect = (domRect) => ({\n x: domRect.x,\n y: domRect.y,\n width: domRect.width,\n height: domRect.height,\n });\n\n return single ? convertDOMRect(bboxes[0]) : Array.from(domNode.getClientRects()).map(convertDOMRect);\n }\n}\n","import { wrapArray } from \"../../utils/utilities\";\nimport { Geometry } from \"./Geometry\";\n\n/**\n * @type {import(\"./Geometry\").BBox}\n */\nconst DEFAULT_BBOX = { x: 0, y: 0, width: 0, height: 0 };\n\n/**\n * Provides an abstract boudnign box for any types of regions\n */\nexport class BoundingBox {\n options = {};\n\n static bbox(region) {\n const bbox = _detect(region);\n\n return wrapArray(bbox).map((bbox) => Object.assign({ ...DEFAULT_BBOX }, bbox));\n }\n\n /**\n * Contructor\n *\n * _source_ might be any object that provides its dimensions and position\n *\n * @param {{\n * source: any,\n * getX: (any) => number,\n * getY: (any) => number,\n * getXWidth: (any) => number,\n * getHeight: (any) => number\n * }} options\n */\n constructor(options) {\n Object.assign(this.options, options);\n }\n\n get _source() {\n return this.options.source;\n }\n\n get x() {\n return this.options.getX(this._source);\n }\n\n get y() {\n return this.options.getY(this._source);\n }\n\n get width() {\n return this.options.getWidth(this._source);\n }\n\n get height() {\n return this.options.getHeight(this._source);\n }\n}\n\nconst stageRelatedBBox = (region, bbox) => {\n // If there is no stageRef we just wait for it in the next renders\n if (!region.parent?.stageRef) return null;\n const imageBbox = Geometry.getDOMBBox(region.parent.stageRef.content, true);\n const transformedBBox = Geometry.clampBBox(\n Geometry.modifyBBoxCoords(bbox, region.parent.zoomOriginalCoords),\n { x: 0, y: 0 },\n { x: region.parent.canvasSize.width, y: region.parent.canvasSize.height },\n );\n\n return {\n ...transformedBBox,\n x: imageBbox.x + transformedBBox.x,\n y: imageBbox.y + transformedBBox.y,\n };\n};\n\nconst _detect = (region) => {\n // that's a tricky way to detect bbox of exact result instead of whole region\n // works for global classifications and per-regions\n const isResult = !!region.from_name;\n if (isResult) {\n return Geometry.getDOMBBox(region.from_name.elementRef?.current);\n }\n switch (region.type) {\n case \"textrange\":\n case \"richtextregion\":\n case \"textarearegion\":\n case \"audioregion\":\n case \"paragraphs\":\n case \"timeseriesregion\": {\n const regionBbox = Geometry.getDOMBBox(region.getRegionElement());\n const container = region.parent?.visibleNodeRef?.current;\n\n if (container?.tagName === \"IFRAME\") {\n const iframeBbox = Geometry.getDOMBBox(container, true);\n\n return (\n regionBbox?.map((bbox) => ({\n ...bbox,\n x: bbox.x + iframeBbox.x,\n y: bbox.y + iframeBbox.y,\n })) || null\n );\n }\n\n return regionBbox;\n }\n case \"rectangleregion\":\n case \"ellipseregion\":\n case \"polygonregion\":\n case \"keypointregion\":\n case \"brushregion\": {\n const bbox = region.bboxCoordsCanvas;\n\n return bbox\n ? stageRelatedBBox(region, {\n x: bbox.left,\n y: bbox.top,\n width: bbox.right - bbox.left,\n height: bbox.bottom - bbox.top,\n })\n : DEFAULT_BBOX;\n }\n default: {\n console.warn(`Unknown region type: ${region.type}`);\n return { ...DEFAULT_BBOX };\n }\n }\n};\n","import { BoundingBox } from \"./BoundingBox\";\n\n/* eslint-disable no-unused-expressions */\nexport class RelationShape {\n params = {};\n\n _onUpdated = null;\n\n constructor(params) {\n Object.assign(this.params, params);\n\n if (this.params.watcher) {\n this._watcher = new this.params.watcher(this.params.root, this.params.element, this.onChanged);\n }\n }\n\n boundingBox() {\n return BoundingBox.bbox(this.params.element);\n }\n\n onUpdate(callback) {\n this.onUpdated = callback;\n }\n\n onChanged = () => {\n this.onUpdated?.();\n };\n\n destroy() {\n this.onUpdated = null;\n }\n}\n","export class DOMWatcher {\n constructor(root, element, callback) {\n this.root = root;\n this.element = element.getRegionElement();\n this.callback = callback;\n\n this.handleUpdate();\n }\n\n handleResize() {\n window.addEventListener(\"resize\", this.onUpdate);\n }\n\n handleUpdate() {\n this.observer = new MutationObserver(this.onUpdate);\n\n this.observer.observe(this.element, { attributes: true });\n }\n\n onUpdate = () => {\n this.callback();\n };\n\n destroy() {\n window.removeEventListener(\"resize\", this.onUpdate);\n this.observer.disconnect();\n }\n}\n","import { observe } from \"mobx\";\nimport { debounce } from \"../../../utils/debounce\";\n\nexport const createPropertyWatcher = (props) => {\n return class {\n constructor(root, element, callback) {\n this.root = root;\n this.element = element;\n this.callback = callback;\n\n this.handleUpdate();\n }\n\n handleUpdate() {\n this.disposers = this._watchProperties(this.element, props, []);\n }\n\n onUpdate = debounce(() => {\n this.callback();\n }, 10);\n\n destroy() {\n this.disposers.forEach((dispose) => dispose());\n }\n\n _watchProperties(element, propsList, disposers) {\n return propsList.reduce((res, property) => {\n if (typeof property !== \"string\") {\n Object.keys(property).forEach((propertyName) => {\n this._watchProperties(element[propertyName], property[propertyName], disposers);\n });\n } else {\n if (Array.isArray(element)) {\n element.forEach((el) => this._watchProperties(el, propsList, disposers));\n } else {\n res.push(observe(element, property, this.onUpdate, true));\n }\n }\n\n return res;\n }, disposers);\n }\n };\n};\n","import { debounce } from \"../../utils/debounce\";\nimport { FF_PER_FIELD_COMMENTS, isFF } from \"../../utils/feature-flags\";\nimport { wrapArray } from \"../../utils/utilities\";\nimport { Geometry } from \"./Geometry\";\nimport { RelationShape } from \"./RelationShape\";\nimport { createPropertyWatcher, DOMWatcher } from \"./watchers\";\n\nconst parentImagePropsWatch = {\n parent: [\n \"zoomScale\",\n \"zoomingPositionX\",\n \"zoomingPositionY\",\n \"rotation\",\n \"currentImage\",\n ...(isFF(FF_PER_FIELD_COMMENTS) ? [\"containerWidth\", \"containerHeight\", \"canvasSize\"] : []),\n ],\n};\n\nconst obtainWatcher = (node) => {\n switch (node.type) {\n case \"richtextregion\":\n case \"audioregion\":\n case \"paragraphs\":\n return DOMWatcher;\n case \"rectangleregion\":\n return createPropertyWatcher([\"x\", \"y\", \"width\", \"height\", \"hidden\", parentImagePropsWatch]);\n case \"ellipseregion\":\n return createPropertyWatcher([\"x\", \"y\", \"radiusX\", \"radiusY\", \"rotation\", \"hidden\", parentImagePropsWatch]);\n case \"polygonregion\":\n return createPropertyWatcher([\"hidden\", { points: [\"x\", \"y\"] }, parentImagePropsWatch]);\n case \"keypointregion\":\n return createPropertyWatcher([\"x\", \"y\", \"hidden\", parentImagePropsWatch]);\n case \"brushregion\":\n return createPropertyWatcher([\"needsUpdate\", \"hidden\", \"touchesLength\", parentImagePropsWatch]);\n case \"timeseriesregion\":\n return createPropertyWatcher([\"start\", \"end\", { parent: [\"zoomedRange\"] }]);\n default:\n return null;\n }\n};\n\nconst createShape = (node, root) => {\n return new RelationShape({\n root,\n element: node,\n watcher: obtainWatcher(node),\n });\n};\n\nconst connect = (relation, root) => {\n return {\n id: relation.id,\n label: wrapArray(relation.labels ?? []).join(\", \"),\n color: \"#fa541c\",\n direction: relation.direction,\n start: createShape(relation.startNode, root),\n end: createShape(relation.endNode, root),\n onChange(callback) {\n const onChangedCallback = debounce(callback, 50);\n\n this.start.onUpdate(onChangedCallback);\n this.end.onUpdate(onChangedCallback);\n },\n destroy() {\n this.start.destroy();\n this.end.destroy();\n },\n };\n};\n\n/**\n * Calculate BBox for the shape\n * @param {RelationShape} shape\n * @param {HTMLOrSVGElement} root\n */\nconst calculateBBox = (shape, root) => {\n const { x, y } = Geometry.getDOMBBox(root, true) ?? { x: 0, y: 0 };\n const bboxList = shape.boundingBox();\n\n return bboxList.map((bbox) => {\n const padded = Geometry.padding(bbox, 3);\n\n return {\n ...padded,\n x: padded.x - x,\n y: padded.y - y,\n };\n });\n};\n\nconst getNodesBBox = ({ start, end, root }) => {\n const [startBBox, endBBox] = Geometry.closestRects(calculateBBox(start, root), calculateBBox(end, root));\n\n return {\n start: startBBox,\n end: endBBox,\n };\n};\n\nconst shapesIntersect = ({ x1, y1, w1, x2, y2, w2 }) => {\n if (y1 === y2) return false;\n\n const leftIntersection = x1 <= x2 && x2 <= x1 + w1;\n const rightIntersection = x1 <= x2 + w2 && x2 + w2 <= x1 + w1;\n\n return leftIntersection || rightIntersection;\n};\n\nconst calculateTopPath = ({ x1, y1, w1, x2, y2, w2, limit }) => {\n const xw1 = x1 + w1 * 0.5;\n const xw2 = x2 + w2 * 0.5;\n\n const top = Math.min(y1, y2) - limit;\n const l1 = Math.min(top, y1 - limit);\n const l2 = Math.min(top, y2 - limit);\n\n const toEnd = xw1 < xw2;\n\n return { x1: xw1, x2: xw2, y1, y2, l1, l2, toEnd };\n};\n\nconst calculateSidePath = ({ x1, y1, w1, h1, x2, y2, w2, h2, limit }) => {\n let renderingSide = \"left\";\n\n if (Math.min(x1, x2) - limit < 0) {\n renderingSide = \"right\";\n }\n\n let xs1;\n let xs2;\n let ys1;\n let ys2;\n let l1;\n let l2;\n\n if (renderingSide === \"left\") {\n xs1 = x1;\n ys1 = y1 + h1 * 0.5;\n xs2 = x2;\n ys2 = y2 + h2 * 0.5;\n const left = Math.min(xs1, xs2) - limit;\n\n l1 = Math.min(left, xs1 - limit);\n l2 = Math.min(left, xs2 - limit);\n } else {\n xs1 = x1 + w1;\n ys1 = y1 + h1 * 0.5;\n xs2 = x2 + w2;\n ys2 = y2 + h2 * 0.5;\n const left = Math.max(xs1, xs2) + limit;\n\n l1 = Math.max(left, xs1 + limit);\n l2 = Math.max(left, xs2 + limit);\n }\n\n const toEnd = ys1 < ys2;\n\n return { x1: xs1, x2: xs2, y1: ys1, y2: ys2, l1, l2, toEnd, renderingSide };\n};\n\nconst buildPathCommand = ({ x1, y1, x2, y2, l1, l2, toEnd, renderingSide }, orientation) => {\n const radius = 5;\n const vertical = orientation === \"vertical\";\n\n let px1;\n let py1;\n let px2;\n let py2;\n let px3;\n let py3;\n let px4;\n let py4;\n let sweep;\n let arc1;\n let arc2;\n let ex;\n let ey;\n\n if (vertical) {\n px1 = x1;\n py1 = y1;\n px2 = x1;\n py2 = l1 + radius;\n px3 = x2 + radius * (toEnd ? -1 : 1);\n py3 = l2;\n px4 = x2;\n py4 = y2;\n sweep = toEnd ? 1 : 0;\n arc1 = toEnd ? `${radius} -${radius}` : `-${radius} -${radius}`;\n arc2 = toEnd ? `${radius} ${radius}` : `-${radius} ${radius}`;\n\n // Edge center coordinates\n ex = Math.min(x1, x2) + Math.abs(x2 - x1) / 2;\n ey = l1;\n } else if (!vertical && renderingSide === \"right\") {\n px1 = x1;\n py1 = y1;\n px2 = l1 - radius;\n py2 = y1;\n px3 = l2;\n py3 = y2 + radius * (toEnd ? -1 : 1);\n px4 = x2;\n py4 = y2;\n sweep = toEnd ? 1 : 0;\n arc1 = toEnd ? `${radius} ${radius}` : `${radius} -${radius}`;\n arc2 = toEnd ? `-${radius} ${radius}` : `-${radius} -${radius}`;\n\n // Edge center coordinates\n ex = l1;\n ey = Math.min(y1, y2) + Math.abs(y2 - y1) / 2;\n } else if (!vertical && renderingSide === \"left\") {\n px1 = x1;\n py1 = y1;\n px2 = l1 + radius;\n py2 = y1;\n px3 = l2;\n py3 = y2 + radius * (toEnd ? -1 : 1);\n px4 = x2;\n py4 = y2;\n sweep = toEnd ? 0 : 1;\n arc1 = toEnd ? `-${radius} ${radius}` : `-${radius} -${radius}`;\n arc2 = toEnd ? `${radius} ${radius}` : `${radius} -${radius}`;\n\n // Edge center coordinates\n ex = l1;\n ey = Math.min(y1, y2) + Math.abs(y2 - y1) / 2;\n }\n\n const pathCommand = [\n `M ${px1} ${py1}`,\n `${px2} ${py2}`,\n `a 5 5 0 0 ${sweep} ${arc1}`, // rounded corner\n `L ${px3} ${py3}`,\n `a 5 5 0 0 ${sweep} ${arc2}`, // rounded corner\n `L ${px4} ${py4}`,\n ];\n\n return [pathCommand.join(\" \"), [ex, ey]];\n};\n\nconst calculatePath = (start, end) => {\n const { x: x1, y: y1, width: w1, height: h1 } = start;\n const { x: x2, y: y2, width: w2, height: h2 } = end;\n\n const limit = 15;\n\n const intersecting = shapesIntersect({\n x1,\n y1,\n w1,\n x2,\n y2,\n w2,\n });\n\n const coordinatesCalculator = intersecting ? calculateSidePath : calculateTopPath;\n const coordinates = coordinatesCalculator({\n x1,\n y1,\n w1,\n h1,\n x2,\n y2,\n w2,\n h2,\n limit,\n });\n\n const pathCommand = buildPathCommand(coordinates, intersecting ? \"horizontal\" : \"vertical\");\n\n return pathCommand;\n};\n\nexport default {\n obtainWatcher,\n createShape,\n connect,\n getNodesBBox,\n calculatePath,\n calculateBBox,\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"container--gJBc5\",\"commentItem\":\"commentItem--aJS6d\",\"commentIconBackground\":\"commentIconBackground--EofOZ\",\"commentIconLines\":\"commentIconLines--uQaUg\",\"_highlighting\":\"_highlighting--qltMP\",\"_highlighted\":\"_highlighted--Ksg1R\"};","import { observer } from \"mobx-react\";\nimport { isAlive } from \"mobx-state-tree\";\nimport type React from \"react\";\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useMounted } from \"../../common/Utils/useMounted\";\nimport { LINK_COMMENT_MODE } from \"../../stores/Annotation/LinkingModes\";\nimport ResizeObserver from \"../../utils/resize-observer\";\nimport { guidGenerator } from \"../../utils/unique\";\nimport NodesConnector from \"./NodesConnector\";\n\nimport styles from \"./CommentsOverlay.module.scss\";\n\nconst CommentIcon = () => {\n return (\n \n \n \n \n );\n};\n\nconst ICON_SIZE = 24;\nconst PADDING_COMPENSATION = 3;\nconst COMMENT_ICON_OVERLAP = 4;\ntype CommentItemProps = {\n comment: MSTComment;\n rootRef: React.MutableRefObject;\n};\nconst CommentItem: React.FC = observer(({ comment, rootRef }) => {\n const root = rootRef.current;\n const node = comment.regionRef?.overlayNode;\n // result is hidden when it's per-region and the region is not selected\n const isHiddenResult = node?.area && !node.area.selected && !node.area.classification;\n const isHidden = !node || node.hidden || isHiddenResult;\n // {} !== {} it's always so, and it's a way to force re-render\n const [forceUpdateId, forceUpdate] = useState({});\n\n const onHover = useCallback(() => {\n comment.setHighlighted(true);\n }, [comment]);\n const onUnHover = useCallback(() => {\n comment.setHighlighted(false);\n }, [comment]);\n\n const shape = useMemo(() => {\n return node && root ? NodesConnector.createShape(node, root) : null;\n }, [node, root]);\n\n const { shapeBBox, positionStyle } = useMemo(() => {\n const shapeBBox =\n shape && root ? NodesConnector.calculateBBox(shape, root)[0] : { x: 0, y: 0, width: 0, height: 0 };\n const pos = { x: shapeBBox.x + shapeBBox.width, y: shapeBBox.y };\n const transform = `translate(${pos.x - PADDING_COMPENSATION - COMMENT_ICON_OVERLAP}px, ${\n pos.y - ICON_SIZE + PADDING_COMPENSATION + COMMENT_ICON_OVERLAP\n }px)`;\n const positionStyle = { transform };\n return { shapeBBox, positionStyle };\n }, [shape, root, forceUpdateId]);\n\n useEffect(() => {\n shape?.onUpdate(() => {\n forceUpdate({});\n });\n return () => {\n shape?.destroy();\n };\n }, [shape]);\n\n if (!root || !node || isHidden) return null;\n if (shapeBBox.width < 1 || shapeBBox.height < 1) return null;\n\n const itemStyles = [styles.commentItem];\n if (comment.isHighlighted) {\n itemStyles.push(styles._highlighted);\n }\n return (\n \n \n \n );\n});\n\n/** Is used to narrow all results down to classifications good to be selected */\nconst isClassification = (result: MSTResult) => {\n const { isClassificationTag } = result.from_name;\n const isGlobalClassification = result.area.classification;\n const isActivePerRegion = result.area.selected;\n\n return isClassificationTag && (isGlobalClassification || isActivePerRegion);\n};\n\ntype ResultItemProps = {\n result: MSTResult;\n rootRef: React.MutableRefObject;\n};\nconst ResultTagBbox: React.FC = observer(({ result, rootRef }) => {\n const root = rootRef.current;\n const node = result.area;\n const isHidden = !node || node.hidden;\n const [forceUpdateId, forceUpdate] = useState({});\n const [hovered, setHovered] = useState(false);\n\n const shape = useMemo(() => {\n return result && root ? NodesConnector.createShape(result, root) : null;\n }, [result, root]);\n\n const bbox = useMemo(() => {\n if (!shape || !root) return { x: 0, y: 0, width: 0, height: 0 };\n return NodesConnector.calculateBBox(shape, root)[0];\n }, [shape, root, forceUpdateId]);\n\n useEffect(() => {\n shape?.onUpdate(() => {\n forceUpdate({});\n });\n return () => {\n shape?.destroy();\n };\n }, [shape]);\n\n if (!root || !node || isHidden) return null;\n if (bbox.width < 1 || bbox.height < 1) return null;\n\n const itemStyle = {\n pointerEvents: \"all\" as const,\n stroke: \"var(--grape_600)\",\n strokeDasharray: hovered ? undefined : \"4 2\",\n cursor: \"crosshair\",\n };\n\n return (\n setHovered(true)}\n onMouseLeave={() => setHovered(false)}\n stroke=\"red\"\n strokeWidth={1}\n fill=\"none\"\n onClick={() => {\n result.annotation.addLinkedResult(result);\n result.annotation.stopLinkingMode();\n }}\n />\n );\n});\n\ntype CommentsOverlayProps = {\n commentStore: MSTCommentStore;\n annotation: MSTAnnotation;\n};\nconst CommentsOverlayInner = observer(({ annotation, commentStore }: CommentsOverlayProps) => {\n const { overlayComments } = commentStore || {};\n const rootRef = useRef();\n const [uniqKey, forceUpdate] = useState(guidGenerator());\n\n const mounted = useMounted();\n\n const loadComments = async () => {\n await commentStore.listComments({ mounted, suppressClearComments: commentStore.isRelevantList });\n };\n\n useEffect(() => {\n loadComments();\n // id is internal id,\n // always different for different annotations, even empty ones;\n // remain the same when user submit draft, so no unneeded calls.\n }, [commentStore.annotation?.id]);\n\n const resizeObserver: ResizeObserver = useMemo(() => {\n let requestId: number;\n\n return new ResizeObserver((entities) => {\n cancelAnimationFrame(requestId);\n requestId = requestAnimationFrame(() => {\n forceUpdate(guidGenerator());\n });\n });\n }, []);\n\n useEffect(() => {\n return () => {\n resizeObserver?.disconnect();\n };\n }, []);\n const setRef = useCallback((ref: SVGSVGElement | null) => {\n const refOfFixedType = ref || undefined;\n if (ref) {\n resizeObserver?.observe(ref);\n resizeObserver?.observe(document.body);\n } else if (rootRef.current) {\n resizeObserver?.unobserve(rootRef.current);\n resizeObserver?.unobserve(document.body);\n }\n rootRef.current = refOfFixedType;\n }, []);\n\n if (!overlayComments) return null;\n\n const containerStyles = [styles.container];\n if (commentStore?.isHighlighting) {\n containerStyles.push(styles._highlighting);\n }\n\n return (\n // biome-ignore lint/a11y/noSvgWithoutTitle: It's not just an icon or a figure; it's an entire interactive layer.\n \n \n {annotation.linkingMode === LINK_COMMENT_MODE &&\n annotation.results\n .filter(isClassification)\n .map((result) => )}\n {overlayComments.map((comment: MSTComment) => {\n const { id } = comment;\n return ;\n })}\n \n \n );\n});\n\ntype WhenTagsReadyProps = {\n tags: Map;\n children: React.ReactNode;\n};\nconst WhenTagsReady: React.FC = memo(\n observer(({ tags, children }) => {\n if (\n !Array.from(tags.values()).every((tag) => {\n if (!isAlive(tag)) return false;\n\n return tag?.isReady ?? true;\n }, true)\n ) {\n return null;\n }\n return <>{children};\n }),\n);\n\nconst CommentsOverlay: React.FC = observer((props) => {\n const { annotation } = props;\n\n return (\n \n \n \n );\n});\n\nexport { CommentsOverlay };\n","// extracted by mini-css-extract-plugin\nexport default {\"error\":\"error--SXGAh\"};","import React from \"react\";\nimport styles from \"./ErrorMessage.module.scss\";\nimport { sanitizeHtml } from \"../../utils/html\";\n\nexport const ErrorMessage = ({ error }) => {\n if (typeof error === \"string\") {\n return
;\n }\n const body = error instanceof Error ? error.message : error;\n\n return
{body}
;\n};\n","import React from \"react\";\nimport { PropTypes } from \"prop-types\";\nimport { getEnv } from \"mobx-state-tree\";\nimport { inject, observer } from \"mobx-react\";\n\nimport { ErrorMessage } from \"../ErrorMessage/ErrorMessage\";\n\nexport const TreeValidation = inject(\"store\")(\n observer(({ store, errors }) => {\n return (\n
\n {errors.map((error, index) => (\n \n ))}\n
\n );\n }),\n);\n\nTreeValidation.propTypes = {\n errors: PropTypes.array.isRequired,\n};\n","import { types } from \"mobx-state-tree\";\n\n/**\n * Validates the value against the given range.\n * By default range is from 0 to 1 including ends.\n * @param {Number} min Minimal value\n * @param {Number} max Maximal value\n */\nconst Range = (min = 0, max = 1) =>\n types.custom({\n name: `Range(${min}..${max})`,\n fromSnapshot(snapshot) {\n return Number.parseFloat(snapshot);\n },\n toSnapshot(value) {\n return value.toString();\n },\n isTargetType(value) {\n const floatValue = Number.parseFloat(value);\n\n return min <= floatValue && floatValue <= max;\n },\n getValidationMessage(value) {\n if (this.isTargetType(value)) return \"\";\n return `Value ${value} is outside of range ${min}..${max}.`;\n },\n });\n\n/**\n * Validates any string value againts CSS color rules.\n * Color value might be named, HEX, HSL(A), RGB(A).\n */\nconst CSSColor = types.custom({\n name: \"CSSColor\",\n fromSnapshot(value) {\n return String(value);\n },\n toSnapshot(value) {\n return value.toString();\n },\n isTargetType(value) {\n const colorTester = new Option().style;\n\n colorTester.color = value;\n return colorTester.color !== \"\";\n },\n getValidationMessage(value) {\n if (this.isTargetType(value)) return \"\";\n return `Value ${value} doesn't appear to be a valid HEX color.`;\n },\n});\n\nexport const customTypes = {\n range: Range,\n color: CSSColor,\n};\n","import { getParent, getType, isRoot, types } from \"mobx-state-tree\";\n\nimport Registry from \"./Registry\";\n\nfunction _mixedArray(fn) {\n return (arr) => types.maybeNull(types.array(fn(arr)));\n}\n\nfunction _oneOf(lookup, err) {\n return (arr) =>\n types.union({\n dispatcher: (sn) => {\n if (arr.find((val) => sn.type === val)) {\n return lookup(sn.type);\n }\n throw Error(err + sn.type);\n },\n });\n}\n\nconst oneOfTags = _oneOf(Registry.getModelByTag, \"Not expecting tag: \");\nconst tagsArray = _mixedArray(oneOfTags);\n\nfunction unionArray(arr) {\n const type = types.maybeNull(types.array(oneOfTags(arr)));\n\n type.value = arr;\n return type;\n}\n\nfunction unionTag(arr) {\n return types.maybeNull(types.enumeration(\"unionTag\", arr));\n}\n\nfunction tagsTypes(arr) {\n const type = types.frozen(arr.map((val) => val.toLowerCase()));\n\n type.describe = () => `(${arr.join(\"|\")})`;\n type.value = arr;\n return type;\n}\n\nfunction allModelsTypes() {\n const args = [\n {\n dispatcher: (sn) => {\n if (!sn) return types.literal(undefined);\n if (Registry.tags.includes(sn.type)) {\n return Registry.getModelByTag(sn.type);\n }\n throw Error(`Not expecting tag: ${sn.type}`);\n },\n },\n Registry.modelsArr(),\n ];\n\n const results = [].concat.apply([], args);\n\n return types.union.apply(null, results);\n}\n\nfunction isType(node, types) {\n const nt = getType(node);\n\n for (const t of types) if (nt === t) return true;\n\n return false;\n}\n\nfunction getParentOfTypeString(node, str) {\n // same as getParentOfType but checks models .name instead of type\n let parent = getParent(node);\n\n if (!Array.isArray(str)) str = [str];\n\n while (parent) {\n const name = getType(parent).name;\n\n if (str.find((c) => c === name)) return parent;\n\n parent = isRoot(parent) ? null : getParent(parent);\n }\n\n return null;\n}\n\nfunction getParentTagOfTypeString(node, str) {\n // same as getParentOfType but checks models .name instead of type\n let parent = getParent(node);\n\n if (!Array.isArray(str)) str = [str];\n\n while (parent) {\n const parentType = parent.type;\n\n if (str.find((c) => c === parentType)) return parent;\n\n parent = isRoot(parent) ? null : getParent(parent);\n }\n\n return null;\n}\n\nconst oneOfTools = _oneOf(Registry.getTool, \"Not expecting tool: \");\nconst toolsArray = _mixedArray(oneOfTools);\n\nconst Types = {\n unionArray,\n allModelsTypes,\n unionTag,\n tagsTypes,\n isType,\n getParentOfTypeString,\n getParentTagOfTypeString,\n tagsArray,\n toolsArray,\n};\n\nexport default Types;\n","import { getRoot, isAlive, types } from \"mobx-state-tree\";\nimport Types from \"../core/Types\";\nimport { FF_DEV_3391, FF_SIMPLE_INIT, isFF } from \"../utils/feature-flags\";\n\nexport const AnnotationMixin = types.model(\"AnnotationMixin\", {}).views((self) => ({\n get annotation() {\n // annotation should not be accessed before store is initialized\n if (isFF(FF_SIMPLE_INIT) && !window.STORE_INIT_OK) {\n console.error(\"LSF: annotation accessed before store is initialized\", self);\n }\n\n if (!isAlive(self)) return null;\n if (isFF(FF_DEV_3391)) {\n const root = getRoot(self);\n\n // if that's a Tool (they live in separate tree)\n if (root === self) {\n if (self.control) {\n return self.control.annotation;\n }\n if (self.obj) {\n return self.obj.annotation;\n }\n return null;\n }\n\n // if annotation history item selected\n if (root.annotationStore?.selectedHistory) {\n return root.annotationStore.selectedHistory;\n }\n\n // return connected annotation, not the globally selected one\n return Types.getParentOfTypeString(self, \"Annotation\");\n }\n\n const as = self.annotationStore;\n\n return as?.selectedHistory ?? as?.selected;\n },\n\n get annotationStore() {\n const root = getRoot(self);\n\n if (root === self) {\n if (self.control) {\n return getRoot(self.control).annotationStore;\n }\n if (self.obj) {\n return getRoot(self.obj).annotationStore;\n }\n return null;\n }\n\n return root.annotationStore;\n },\n}));\n","import { types } from \"mobx-state-tree\";\n\nconst IsReadyMixin = types\n .model({})\n .volatile(() => {\n return {\n _isReady: true,\n };\n })\n .views((self) => ({\n get isReady() {\n return self._isReady;\n },\n }))\n .actions((self) => {\n return {\n setReady(value) {\n self._isReady = value;\n },\n };\n });\n\nexport default IsReadyMixin;\n\nexport const IsReadyWithDepsMixin = IsReadyMixin.views((self) => ({\n get isReady() {\n return self._isReady && !self.regs?.filter((r) => !r.isReady).length;\n },\n}));\n","import { flow, types } from \"mobx-state-tree\";\nimport Papa from \"papaparse\";\n\nimport { parseTypeAndOption, parseValue } from \"../utils/data\";\n\nconst resolvers = {\n // @todo comments/types\n csv(content, options = {}) {\n const header = !options.headless;\n const {\n data,\n meta: { fields },\n } = Papa.parse(content, { delimiter: options.separator, header });\n const { column = header ? fields[0] : 0 } = options;\n const row = data[0];\n let cell = row[column];\n\n if (cell === undefined) {\n // if `column` is a number even if csv has header\n cell = row[fields[column] ?? fields[0]];\n }\n\n return String(cell ?? \"\");\n },\n};\n\nconst ProcessAttrsMixin = types\n .model({\n resolver: types.maybeNull(types.string),\n })\n .actions((self) => ({\n updateLocalValue(value) {\n self._value = value;\n },\n\n updateValue(store) {\n self._value = parseValue(self.value, store?.task?.dataObj ?? {});\n },\n\n /**\n * Use `resolver` param for data retrieval from remote resource\n * format: (option=value)*\n * currently only csv type supported, separator is | by default\n */\n resolveValue: flow(function* (value) {\n if (!self.resolver) return value;\n\n const { type, options } = parseTypeAndOption(self.resolver);\n\n if (!Object.prototype.hasOwnProperty.call(resolvers, type)) {\n console.error(`Resolver \"${type ?? self.resolver}\" looks unfamiliar`);\n return value;\n }\n\n // @todo checks for url\n // @todo error handling\n const response = yield fetch(value);\n const text = yield response.text();\n\n return resolvers[type](text, options);\n }),\n }));\n\nexport default ProcessAttrsMixin;\n","import { type Instance, types } from \"mobx-state-tree\";\n\n/**\n * Supress all additional events during this window in ms.\n * 100ms is too short to notice, but covers enough frames (~6) for back and forth events.\n */\nexport const SYNC_WINDOW = 100;\n\nexport type SyncEvent = \"play\" | \"pause\" | \"seek\" | \"speed\";\n\n/**\n * Currently only for reference, MST mixins don't allow to apply this interface\n */\nexport interface SyncTarget {\n name: string;\n sync: string;\n syncSend(data: SyncData, event: SyncEvent): void;\n syncReceive(data: SyncData, event: SyncEvent): void;\n registerSyncHandlers(): void;\n destroy(): void;\n}\n\nexport interface SyncDataFull {\n time: number;\n playing: boolean;\n speed: number;\n}\n\nexport type SyncData = Partial;\n\n/**\n * Sync group of tags with each other; every tag should be registered\n */\nexport class SyncManager {\n syncTargets = new Map>();\n locked: string | null = null; // refers to the main tag, which locked this sync\n audioTags = 0; // number of audio tags in the group to control muted state\n\n register(syncTarget: Instance) {\n this.syncTargets.set(syncTarget.name, syncTarget);\n if (syncTarget.type === \"audio\") this.audioTags += 1;\n }\n\n unregister(syncTarget: Instance) {\n this.syncTargets.delete(syncTarget.name);\n if (syncTarget.type === \"audio\") this.audioTags -= 1;\n // @todo remove manager on empty set\n }\n\n /**\n * Sync `origin` state (in `data`) to connected tags.\n * No back-sync to origin of the event.\n * During SYNC_WINDOW only events from origin are processed, others are skipped\n * @param {SyncData} data state to sync between connected tags\n * @param {string} event name of event, supplementary info, actions should rely on data\n * @param {string} origin name of the tag triggered event\n * @returns {boolean} false if event was suppressed, because it's inside other event sync window\n */\n sync(data: SyncData, event: SyncEvent, origin: string) {\n // @todo remove\n if (!this.locked || this.locked === origin) console.log(\"SYNC\", { event, locked: this.locked, data, origin });\n\n ///// locking mechanism\n // also send events came from original tag even when sync window is locked,\n // this allows to correct state in case of coupled events like play + seek.\n if (this.locked && this.locked !== origin) return false;\n if (!this.locked) setTimeout(() => (this.locked = null), SYNC_WINDOW);\n this.locked = origin;\n\n for (const target of this.syncTargets.values()) {\n if (origin !== target.name) {\n target.syncReceive(data, event);\n }\n }\n return true;\n }\n}\n\nexport const SyncManagerFactory = {\n managers: new Map(),\n\n /**\n * Retrieve or create SyncManager\n * @param name sync manager's name, can be any string\n * @param fallbackName previously `sync` attrs of two tags were referring their respective names;\n * for backward compatibility these names can be passed here,\n * so the first tag will create manager by the name of the second tag\n * and the second tag will get this manager by the name of this tag.\n * @returns SyncManager\n */\n get(name: string, fallbackName?: string): SyncManager {\n let manager = this.managers.get(name);\n\n if (!manager && fallbackName) manager = this.managers.get(fallbackName);\n\n if (!manager) {\n manager = new SyncManager();\n this.managers.set(name, manager);\n }\n\n return manager;\n },\n};\n\nexport type SyncHandler = (data: SyncData, event: string) => void;\n\ninterface SyncableProps {\n syncHandlers: Map;\n syncManager: SyncManager | null;\n}\n\n/**\n * Tag should override `registerSyncHandlers()` or `syncReceive()` to handle sync events.\n * To trigger sync events internal methods should call `syncSend()`.\n * Should be used before ObjectBase to not break FF_DEV_3391.\n */\nconst SyncableMixin = types\n .model(\"SyncableMixin\", {\n name: types.string,\n type: types.string,\n sync: types.optional(types.string, \"\"),\n })\n /* eslint-disable @typescript-eslint/indent */\n .volatile(() => ({\n syncHandlers: new Map(),\n syncManager: null,\n }))\n .actions(() => ({\n syncMuted(_muted: boolean) {\n // Should be overriden in models, that can be muted, with simple code like this:\n // self.muted = muted;\n },\n }))\n /* eslint-enable @typescript-eslint/indent */\n .actions((self) => ({\n afterCreate() {\n if (!self.sync) return;\n\n self.syncManager = SyncManagerFactory.get(self.sync, self.name);\n self.syncManager!.register(self as Instance);\n (self as Instance).registerSyncHandlers();\n },\n\n /**\n * Tag can add handlers to `syncHandlers` here\n */\n registerSyncHandlers() {},\n\n syncSend(data: SyncData, event: SyncEvent) {\n if (!self.sync) return;\n const notSuppressed = self.syncManager!.sync(data, event, self.name);\n\n if (notSuppressed && event === \"play\") {\n // Only Audio has volume controls, so Audio should not be muted,\n // while other synced tags should be muted, otherwise volume can't be controlled.\n // But if there are no Audio tags in group, the tag triggered sync\n // should be the main tag with volume active, and others should be muted.\n self.syncMuted(self.type !== \"audio\" && self.syncManager!.audioTags > 0);\n }\n },\n\n syncReceive(data: SyncData, event: SyncEvent) {\n const handler = self.syncHandlers.get(event);\n\n if (event === \"play\") {\n // audio is the only tag with volume control, so don't mute it, but mute others.\n self.syncMuted(self.type !== \"audio\");\n }\n\n if (handler) {\n handler(data, event);\n }\n },\n\n destroy() {\n self.syncManager!.unregister(self as Instance);\n },\n }));\n\nexport { SyncableMixin };\n","import { types } from \"mobx-state-tree\";\n\n/**\n * @todo rework this into MetaMixin for all the meta data\n * @todo it's used by too much files, so that's for later\n * Meta Information\n * Additional information for regions and their results, like text and lead_time\n */\nconst NormalizationMixin = types\n .model({\n meta: types.frozen<{ text?: string[] }>({}),\n // @todo do we really need it? it's used to store current value from input\n normInput: types.maybeNull(types.string),\n })\n .preProcessSnapshot((sn) => {\n if (!sn.meta) return sn;\n return {\n ...sn,\n normInput: sn.meta?.text?.[0] ?? null,\n };\n })\n .actions((self) => ({\n setMetaValue(key: string, value: any) {\n self.meta = { ...self.meta, [key]: value };\n },\n\n /**\n * Set meta text\n * @param {*} text\n */\n setMetaText(text: string) {\n if (text) {\n self.meta = { ...self.meta, text: [text] };\n } else {\n const adjusted = { ...self.meta };\n\n delete adjusted.text;\n self.meta = adjusted;\n }\n },\n\n setNormInput(val: string) {\n self.normInput = val;\n },\n }))\n .actions((self) => ({\n /**\n * Delete meta text\n */\n deleteMetaText() {\n self.setMetaText(\"\");\n },\n }));\n\nexport default NormalizationMixin;\n","import { isAlive, types } from \"mobx-state-tree\";\n\nexport const ReadOnlyControlMixin = types.model(\"ReadOnlyControlMixin\", {}).views((self) => ({\n isReadOnly() {\n return self.result?.isReadOnly() || self.annotation?.isReadOnly();\n },\n}));\n\nexport const ReadOnlyRegionMixin = types\n .model(\"ReadOnlyRegionMixin\", {\n readonly: types.optional(types.boolean, false),\n })\n .views((self) => ({\n isReadOnly() {\n if (!isAlive(self)) {\n return false;\n }\n return (\n self.locked ||\n self.readonly ||\n self.annotation.isReadOnly() ||\n (self.parent && (self.parent.isReadOnly?.() || self.parent.result?.isReadOnly?.()))\n );\n },\n }));\n","// extracted by mini-css-extract-plugin\nexport default {\"image\":\"lsf-image\",\"image-progress\":\"lsf-image-progress\",\"image-progress__bar\":\"lsf-image-progress__bar\"};","import { observer } from \"mobx-react\";\nimport { forwardRef, useCallback, useMemo } from \"react\";\nimport { Block, Elem } from \"../../utils/bem\";\nimport { FF_LSDV_4711, isFF } from \"../../utils/feature-flags\";\nimport messages from \"../../utils/messages\";\nimport { ErrorMessage } from \"../ErrorMessage/ErrorMessage\";\nimport \"./Image.scss\";\n\n/**\n * Coordinates in relative mode belong to a data domain consisting of percentages in the range from 0 to 100\n */\nexport const RELATIVE_STAGE_WIDTH = 100;\n\n/**\n * Coordinates in relative mode belong to a data domain consisting of percentages in the range from 0 to 100\n */\nexport const RELATIVE_STAGE_HEIGHT = 100;\n\n/**\n * Mode of snapping to pixel\n */\nexport const SNAP_TO_PIXEL_MODE = {\n EDGE: \"edge\",\n CENTER: \"center\",\n};\n\nexport const Image = observer(\n forwardRef(({ imageEntity, imageTransform, updateImageSize, usedValue, size, overlay }, ref) => {\n const imageSize = useMemo(() => {\n return {\n width: size.width === 1 ? \"100%\" : size.width,\n height: size.height === 1 ? \"auto\" : size.height,\n };\n }, [size]);\n\n const onLoad = useCallback(\n (event) => {\n updateImageSize(event);\n imageEntity.setImageLoaded(true);\n },\n [updateImageSize, imageEntity],\n );\n\n return (\n \n {overlay}\n \n {imageEntity.downloaded ? (\n \n ) : null}\n \n );\n }),\n);\n\nconst ImageProgress = observer(({ downloading, progress, error, src, usedValue }) => {\n return downloading ? (\n \n Downloading image\n \n \n ) : error ? (\n \n ) : null;\n});\n\nconst imgDefaultProps = {};\n\nif (isFF(FF_LSDV_4711)) imgDefaultProps.crossOrigin = \"anonymous\";\n\nconst ImageRenderer = observer(\n forwardRef(({ src, onLoad, imageTransform, isLoaded }, ref) => {\n const imageStyles = useMemo(() => {\n const style = imageTransform ?? {};\n\n return { ...style, visibility: isLoaded ? \"visible\" : \"hidden\" };\n }, [imageTransform, isLoaded]);\n\n // biome-ignore lint/a11y/noRedundantAlt: The use of this component justifies this alt text\n return \"image\";\n }),\n);\n\nconst ImageLoadingError = ({ src, value }) => {\n const error = useMemo(() => {\n return messages.ERR_LOADING_HTTP({\n url: src,\n error: \"\",\n attr: value,\n });\n }, [src]);\n\n return ;\n};\n","import { getEnv, getParent, getRoot, getType, types } from \"mobx-state-tree\";\nimport { guidGenerator } from \"../core/Helpers\";\nimport { isDefined } from \"../utils/utilities\";\nimport { AnnotationMixin } from \"./AnnotationMixin\";\nimport { ReadOnlyRegionMixin } from \"./ReadOnlyMixin\";\nimport { RELATIVE_STAGE_HEIGHT, RELATIVE_STAGE_WIDTH } from \"../components/ImageView/Image\";\n\nconst RegionsMixin = types\n .model({\n // id: types.optional(types.identifier, guidGenerator),\n pid: types.optional(types.string, guidGenerator),\n\n score: types.maybeNull(types.number),\n\n filtered: types.optional(types.boolean, false),\n\n parentID: types.optional(types.string, \"\"),\n\n fromSuggestion: false,\n\n // Dynamic preannotations enabled\n dynamic: false,\n\n origin: types.optional(types.enumeration([\"prediction\", \"prediction-changed\", \"manual\"]), \"manual\"),\n\n item_index: types.maybeNull(types.number),\n })\n .volatile(() => ({\n // selected: false,\n _highlighted: false,\n hidden: false,\n locked: false,\n isDrawing: false,\n perRegionFocusRequest: null,\n shapeRef: null,\n drawingTimeout: null,\n }))\n .views((self) => ({\n get perRegionStates() {\n const states = self.states;\n\n return states && states.filter((s) => s.perregion === true);\n },\n\n get store() {\n return getRoot(self);\n },\n\n get parent() {\n return getParent(self);\n },\n\n get editable() {\n throw new Error(\"Not implemented\");\n },\n\n get isCompleted() {\n return !self.isDrawing;\n },\n\n get highlighted() {\n return self._highlighted;\n },\n\n get inSelection() {\n return self.annotation?.regionStore.isSelected(self);\n },\n\n get isReady() {\n return true;\n },\n\n get currentImageEntity() {\n return self.parent.findImageEntity(self.item_index ?? 0);\n },\n\n getConnectedDynamicRegions(excludeSelf) {\n const { regions = [] } = getRoot(self).annotationStore?.selected || {};\n const { type, labelName } = self;\n\n const result = regions.filter((region) => {\n if (excludeSelf && region === self) return false;\n const canBePartOfNotification = self.supportSuggestions ? self.dynamic : true;\n\n return (\n canBePartOfNotification &&\n region.type === type &&\n region.labelName === labelName &&\n region.results?.[0]?.to_name === self.results?.[0]?.to_name\n );\n });\n\n return result;\n },\n\n // Indicates that it is not temporary region created just to display data like Textarea's one\n // and is not a suggestion\n get isRealRegion() {\n return self.annotation?.areas?.has(self.id);\n },\n\n get shouldNotifyDrawingFinished() {\n // extra calls on destroying will be skipped\n // @see beforeDestroy action\n if (!self.isRealRegion) return false;\n if (self.annotation.isSuggestionsAccepting) return false;\n // There are two modes:\n // If object tag support suggestions - the region should be marked as a dynamic one to make notifications\n // If object tag doesn't support suggestions - every region works as dynamic with auto suggestions\n const canBeReasonOfNotification = self.supportSuggestions ? self.dynamic && !self.fromSuggestion : true;\n\n const isSmartEnabled = self.results.some((r) => r.from_name.smartEnabled);\n\n return isSmartEnabled && canBeReasonOfNotification;\n },\n }))\n .actions((self) => {\n return {\n setParentID(id) {\n self.parentID = id;\n },\n\n setDrawing(val) {\n self.isDrawing = val;\n },\n\n setShapeRef(ref) {\n if (!ref) return;\n self.shapeRef = ref;\n },\n\n setItemIndex(index) {\n if (!isDefined(index)) throw new Error(\"Index must be provided for\", self);\n self.item_index = index;\n },\n\n beforeDestroy() {\n // beforeDestroy may be called by accident for Textarea and etc. as part of updateObjects action\n // in that case the region already has no results\n\n // The other bad behaviour is that beforeDestroy may be called on accepting suggestions 'cause they are deleting in that case\n\n // So if you see this bad thing during debugging - now you know why\n // and why we need this check\n if (self.isRealRegion) {\n return self.beforeDestroyArea();\n }\n },\n\n beforeDestroyArea() {\n self.notifyDrawingFinished({ destroy: true });\n },\n\n setLocked(locked) {\n if (locked instanceof Function) {\n self.locked = locked(self.locked);\n } else {\n self.locked = locked;\n }\n },\n\n makeDynamic() {\n self.dynamic = true;\n },\n\n // @todo this conversion methods should be removed after removing FF_DEV_3793\n convertXToPerc(x) {\n return (x * RELATIVE_STAGE_WIDTH) / self.currentImageEntity.stageWidth;\n },\n\n convertYToPerc(y) {\n return (y * RELATIVE_STAGE_HEIGHT) / self.currentImageEntity.stageHeight;\n },\n\n convertHDimensionToPerc(hd) {\n return (hd * (self.scaleX || 1) * RELATIVE_STAGE_WIDTH) / self.currentImageEntity.stageWidth;\n },\n\n convertVDimensionToPerc(vd) {\n return (vd * (self.scaleY || 1) * RELATIVE_STAGE_HEIGHT) / self.currentImageEntity.stageHeight;\n },\n\n // update region appearence based on it's current states, for\n // example bbox needs to update its colors when you change the\n // label, becuase it takes color from the label\n updateAppearenceFromState() {},\n\n serialize() {\n console.error(\"Region class needs to implement serialize\");\n },\n\n selectRegion() {},\n\n /**\n * @todo fix \"keep selected\" setting\n * Common logic for unselection; specific actions should be in `afterUnselectRegion`\n * @param {boolean} tryToKeepStates try to keep states selected if such settings enabled\n */\n unselectRegion(tryToKeepStates = false) {\n console.log(\"UNSELECT REGION\", \"you should not be here\");\n\n // biome-ignore lint/correctness/noConstantCondition:\n if (1) return;\n const annotation = self.annotation;\n const parent = self.parent;\n const keepStates = tryToKeepStates && self.store.settings.continuousLabeling;\n\n if (annotation.isLinkingMode) {\n annotation.stopLinkingMode();\n }\n if (parent.setSelected) {\n parent.setSelected(undefined);\n }\n\n self.selected = false;\n annotation.setHighlightedNode(null);\n\n self.afterUnselectRegion();\n\n if (!keepStates) {\n annotation.unloadRegionState(self);\n }\n },\n\n afterUnselectRegion() {},\n\n onClickRegion(ev) {\n const annotation = self.annotation;\n\n if (!self.isReadOnly() && (self.isDrawing || annotation.isDrawing)) return;\n\n if (!self.isReadOnly() && annotation.isLinkingMode) {\n annotation.addLinkedRegion(self);\n annotation.stopLinkingMode();\n annotation.regionStore.unselectAll();\n } else {\n self._selectArea(ev?.ctrlKey || ev?.metaKey);\n }\n },\n\n _selectArea(additiveMode = false) {\n this.cancelPerRegionFocus();\n const annotation = self.annotation;\n\n if (additiveMode) {\n annotation.toggleRegionSelection(self);\n } else {\n const wasNotSelected = !self.selected;\n\n if (wasNotSelected) {\n annotation.selectArea(self);\n } else {\n annotation.unselectAll();\n }\n }\n },\n\n requestPerRegionFocus() {\n self.perRegionFocusRequest = Date.now();\n },\n\n cancelPerRegionFocus() {\n self.perRegionFocusRequest = null;\n },\n\n setHighlight(val) {\n self._highlighted = val;\n },\n\n toggleHighlight() {\n self.setHighlight(!self._highlighted);\n },\n\n toggleFiltered(e) {\n self.filtered = !self.filtered;\n self.toggleHidden(e, true);\n e && e.stopPropagation();\n },\n\n toggleHidden(e, isFiltered = false) {\n if (!isFiltered) self.filtered = false;\n self.hidden = !self.hidden;\n e && e.stopPropagation();\n },\n\n notifyDrawingFinished({ destroy = false } = {}) {\n if (self.origin === \"prediction\") {\n self.origin = \"prediction-changed\";\n }\n\n // everything below is related to dynamic preannotations\n if (!self.shouldNotifyDrawingFinished) return;\n\n clearTimeout(self.drawingTimeout);\n\n if (self.isDrawing === false) {\n const timeout = getType(self).name.match(/brush/i) ? 1200 : 0;\n const env = getEnv(self);\n\n self.drawingTimeout = setTimeout(() => {\n const connectedRegions = self.getConnectedDynamicRegions(destroy);\n\n env.events.invoke(\"regionFinishedDrawing\", self, connectedRegions);\n }, timeout);\n }\n },\n };\n });\n\nexport default types.compose(RegionsMixin, ReadOnlyRegionMixin, AnnotationMixin);\n","import { getParent, getRoot, getSnapshot, types } from \"mobx-state-tree\";\nimport { guidGenerator } from \"../core/Helpers\";\nimport Registry from \"../core/Registry\";\nimport Tree from \"../core/Tree\";\nimport { AnnotationMixin } from \"../mixins/AnnotationMixin\";\nimport { isDefined } from \"../utils/utilities\";\nimport { FF_LSDV_4583, isFF } from \"../utils/feature-flags\";\n\nconst Result = types\n .model(\"Result\", {\n id: types.optional(types.identifier, guidGenerator),\n // pid: types.optional(types.string, guidGenerator),\n\n score: types.maybeNull(types.number),\n // @todo to readonly mixin\n readonly: types.optional(types.boolean, false),\n\n // @why?\n // hidden: types.optional(types.boolean, false),\n\n // @todo to mixins\n // selected: types.optional(types.boolean, false),\n // highlighted: types.optional(types.boolean, false),\n\n // @todo pid?\n // parentID: types.optional(types.string, \"\"),\n\n // ImageRegion, TextRegion, HyperTextRegion, AudioRegion)),\n // optional for classifications\n // labeling/control tag\n from_name: types.late(() => types.reference(types.union(...Registry.modelsArr()))),\n // object tag\n to_name: types.late(() => types.reference(types.union(...Registry.objectTypes()))),\n // @todo some general type, maybe just a `string`\n type: types.enumeration([\n \"labels\",\n \"hypertextlabels\",\n \"paragraphlabels\",\n \"rectangle\",\n \"keypoint\",\n \"polygon\",\n \"brush\",\n \"ellipse\",\n \"magicwand\",\n \"rectanglelabels\",\n \"keypointlabels\",\n \"polygonlabels\",\n \"brushlabels\",\n \"ellipselabels\",\n \"timeserieslabels\",\n \"timelinelabels\",\n \"choices\",\n \"datetime\",\n \"number\",\n \"taxonomy\",\n \"textarea\",\n \"rating\",\n \"pairwise\",\n \"videorectangle\",\n \"ranker\",\n ]),\n // @todo much better to have just a value, not a hash with empty fields\n value: types.model({\n ranker: types.union(types.array(types.string), types.frozen(), types.null),\n datetime: types.maybe(types.string),\n number: types.maybe(types.number),\n rating: types.maybe(types.number),\n item_index: types.maybeNull(types.number),\n text: types.maybe(types.union(types.string, types.array(types.string))),\n choices: types.maybe(types.array(types.union(types.string, types.array(types.string)))),\n // pairwise\n selected: types.maybe(types.enumeration([\"left\", \"right\"])),\n // @todo all other *labels\n labels: types.maybe(types.array(types.string)),\n htmllabels: types.maybe(types.array(types.string)),\n hypertextlabels: types.maybe(types.array(types.string)),\n paragraphlabels: types.maybe(types.array(types.string)),\n rectanglelabels: types.maybe(types.array(types.string)),\n keypointlabels: types.maybe(types.array(types.string)),\n polygonlabels: types.maybe(types.array(types.string)),\n ellipselabels: types.maybe(types.array(types.string)),\n brushlabels: types.maybe(types.array(types.string)),\n timeserieslabels: types.maybe(types.array(types.string)),\n timelinelabels: types.maybe(types.array(types.string)), // new one\n taxonomy: types.frozen(), // array of arrays of strings\n sequence: types.frozen(),\n }),\n // info about object and region\n meta: types.frozen(),\n })\n .views((self) => ({\n get perRegionStates() {\n const states = self.states;\n\n return states && states.filter((s) => s.perregion === true);\n },\n\n get store() {\n return getRoot(self);\n },\n\n get area() {\n return getParent(self, 2);\n },\n\n get mainValue() {\n return self.value[self.from_name.valueType];\n },\n\n mergeMainValue(value) {\n value = value?.toJSON ? value.toJSON() : value;\n const mainValue = self.mainValue?.toJSON?.() ? self.mainValue?.toJSON?.() : self.mainValue;\n\n if (typeof value !== typeof mainValue) return null;\n if (self.type.endsWith(\"labels\")) {\n return value.filter((x) => mainValue.includes(x));\n }\n return value === mainValue ? value : null;\n },\n\n get hasValue() {\n const value = self.mainValue;\n\n if (!isDefined(value)) return false;\n if (Array.isArray(value)) return value.length > 0;\n return true;\n },\n\n get editable() {\n throw new Error(\"Not implemented\");\n },\n\n isReadOnly() {\n return self.readonly || self.area.isReadOnly();\n },\n\n isSelfReadOnly() {\n return self.readonly;\n },\n\n getSelectedString(joinstr = \" \") {\n return self.mainValue?.join(joinstr) || \"\";\n },\n\n // @todo check all usages of selectedLabels:\n // — check usages of non-array values (like `if selectedValues ...`)\n // - check empty labels, they should be returned as an array\n get selectedLabels() {\n if (self.mainValue?.length === 0 && self.from_name.allowempty) {\n return self.from_name.findLabel(null);\n }\n return self.mainValue?.map((value) => self.from_name.findLabel(value)).filter(Boolean) ?? [];\n },\n\n /**\n * Checks perRegion and Visibility params\n */\n get canBeSubmitted() {\n const control = self.from_name;\n\n if (control.perregion) {\n const label = control.whenlabelvalue;\n\n if (label && !self.area.hasLabel(label)) return false;\n }\n\n // picks leaf's (last item in a path) value for Taxonomy or usual Choice value for Choices\n const innerResults = (r) => r.map((s) => (Array.isArray(s) ? s.at(-1) : s));\n\n const isChoiceSelected = () => {\n const tagName = control.whentagname;\n const choiceValues = control.whenchoicevalue?.split(\",\") ?? null;\n const results = self.annotation.results.filter((r) => [\"choices\", \"taxonomy\"].includes(r.type) && r !== self);\n\n if (tagName) {\n const result = results.find((r) => {\n if (r.from_name.name !== tagName) return false;\n // for perRegion choices we should check that they are in the same area\n return !r.from_name.perregion || r.area === self.area;\n });\n\n if (!result) return false;\n if (\n choiceValues &&\n !choiceValues.some((v) =>\n innerResults(result.mainValue).some((vv) => result.from_name.selectedChoicesMatch(v, vv)),\n )\n )\n return false;\n } else {\n if (!results.length) return false;\n // if no given choice value is selected in any choice result\n if (\n choiceValues &&\n !results.some((r) =>\n choiceValues.some((v) => innerResults(r.mainValue).some((vv) => r.from_name.selectedChoicesMatch(v, vv))),\n )\n )\n return false;\n }\n return true;\n };\n\n if (control.visiblewhen === \"choice-selected\") {\n return isChoiceSelected();\n }\n if (control.visiblewhen === \"choice-unselected\") {\n return !isChoiceSelected();\n }\n\n return true;\n },\n\n get tag() {\n const value = self.mainValue;\n\n if (!value || !value.length) return null;\n if (!self.from_name.findLabel) return null;\n return self.from_name.findLabel(value[0]);\n },\n\n get style() {\n if (!self.tag) return null;\n const fillcolor = self.tag.background || self.tag.parent?.fillcolor;\n\n if (!fillcolor) return null;\n const strokecolor = self.tag.background || self.tag.parent.strokecolor;\n const { strokewidth, fillopacity, opacity } = self.tag.parent;\n\n return { strokecolor, strokewidth, fillcolor, fillopacity, opacity };\n },\n\n get emptyStyle() {\n const emptyLabel = self.from_name.emptyLabel;\n\n if (!emptyLabel) return null;\n const fillcolor = emptyLabel.background || emptyLabel.parent.fillcolor;\n\n if (!fillcolor) return null;\n const strokecolor = emptyLabel.background || emptyLabel.parent.strokecolor;\n const { strokewidth, fillopacity, opacity } = emptyLabel.parent;\n\n return { strokecolor, strokewidth, fillcolor, fillopacity, opacity };\n },\n\n get controlStyle() {\n if (!self.from_name) return null;\n\n const { fillcolor, strokecolor, strokewidth, fillopacity, opacity } = self.from_name;\n\n return { strokecolor, strokewidth, fillcolor, fillopacity, opacity };\n },\n }))\n .volatile(() => ({\n pid: \"\",\n selected: false,\n // highlighted: types.optional(types.boolean, false),\n }))\n .actions((self) => ({\n setValue(value) {\n self.value[self.from_name.valueType] = value;\n },\n\n afterCreate() {\n self.pid = self.id;\n },\n\n afterAttach() {\n // const tag = self.from_name;\n // update state of classification tags\n // @todo unify this with `selectArea`\n },\n\n setParentID(id) {\n self.parentID = id;\n },\n\n setMetaValue(key, value) {\n self.meta = { ...self.meta, [key]: value };\n },\n\n // update region appearence based on it's current states, for\n // example bbox needs to update its colors when you change the\n // label, becuase it takes color from the label\n updateAppearenceFromState() {},\n\n serialize(options) {\n const sn = getSnapshot(self);\n const { type, score, value, meta } = sn;\n const { valueType } = self.from_name;\n const data = self.area ? self.area.serialize(options) : {};\n // cut off annotation id\n const id = self.area?.cleanId;\n const from_name = Tree.cleanUpId(sn.from_name);\n const to_name = Tree.cleanUpId(sn.to_name);\n\n if (!data) return null;\n if (!self.canBeSubmitted) return null;\n\n if (!isDefined(data.value)) data.value = {};\n // with `mergeLabelsAndResults` control uses only one result even with external `Labels`\n if (self.to_name.mergeLabelsAndResults) {\n // we are in labeling result, so skipping it, labels will be added to the main result\n if (type === \"labels\") return null;\n // add labels to the main result, not nested ones\n // if this is specialized labels, then labels will be already part of it, so skipping it\n if (!type.endsWith(\"labels\") && self.area?.labels?.length && !self.from_name.perregion) {\n data.value.labels = self.area.labels;\n }\n }\n\n const contolMeta = self.from_name.metaValue;\n\n if (contolMeta) {\n data.meta = { ...data.meta, ...contolMeta };\n }\n const areaMeta = self.area.meta;\n\n if (areaMeta && Object.keys(areaMeta).length) {\n data.meta = { ...data.meta, ...areaMeta };\n }\n\n if (meta) {\n data.meta = { ...data.meta, ...meta };\n }\n\n if (self.area.parentID) {\n data.parentID = self.area.parentID.replace(/#.*/, \"\");\n }\n\n Object.assign(data, { id, from_name, to_name, type, origin: self.area.origin });\n\n if (isDefined(value[valueType])) {\n Object.assign(data.value, { [valueType]: value[valueType] });\n }\n\n if (typeof score === \"number\") data.score = score;\n\n if (self.isSelfReadOnly()) data.readonly = true;\n\n if (isFF(FF_LSDV_4583) && isDefined(self.area.item_index)) {\n data.item_index = self.area.item_index;\n }\n\n return data;\n },\n\n /**\n * Remove region\n */\n deleteRegion() {\n if (self.annotation.isReadOnly()) return;\n\n self.unselectRegion();\n\n self.annotation.relationStore.deleteNodeRelation(self);\n\n if (self.type === \"polygonregion\") {\n self.destroyRegion();\n }\n\n self.annotation.regionStore.deleteRegion(self);\n\n self.annotation.deleteRegion(self);\n },\n\n setHighlight(val) {\n self._highlighted = val;\n },\n\n toggleHighlight() {\n self.setHighlight(!self._highlighted);\n },\n\n toggleHidden() {\n self.hidden = !self.hidden;\n },\n }));\n\nexport default types.compose(\"Result\", Result, AnnotationMixin);\n","export const PER_REGION_MODES = {\n TAG: \"tag\",\n REGION_LIST: \"region-list\",\n};\n","import { types } from \"mobx-state-tree\";\nimport { PER_REGION_MODES } from \"./PerRegionModes\";\n\n/**\n * This mixing defines perRegion control tag's parameter and related basic functionality\n * It should be used right after ClassificationBase mixin\n * @see ClassificationBase\n */\nconst PerRegionMixin = types\n .model({\n perregion: types.optional(types.boolean, false),\n whenlabelvalue: types.maybeNull(types.string),\n displaymode: types.optional(types.enumeration(Object.values(PER_REGION_MODES)), PER_REGION_MODES.TAG),\n })\n .extend((self) => {\n /* Validation */\n if (self.isClassificationTag !== true) {\n throw new Error(\"The PerRegionMixin mixin should be used only for classification control-tags\");\n }\n return {};\n })\n .volatile(() => {\n return {\n focusable: false,\n };\n })\n .views((self) => ({\n get perRegionArea() {\n if (!self.perregion) return null;\n return self.annotation.highlightedNode;\n },\n get _perRegionResult() {\n const area = self.perRegionArea;\n\n if (!area) return null;\n\n return self.annotation.results.find((r) => r.from_name === self && r.area === area);\n },\n perRegionVisible() {\n if (!self.perregion) return true;\n\n const region = self.perRegionArea;\n\n if (!region) {\n // no region is selected return hidden\n return false;\n }\n // check if selected region is the one this tag is connected to\n if (region.parent.name !== self.toname) return false;\n\n // we may need to check for specific value\n if (self.whenlabelvalue !== null && self.whenlabelvalue !== undefined)\n return region.hasLabel(self.whenlabelvalue);\n\n return true;\n },\n }))\n .actions((self) => ({\n /**\n * Validates all values related to the current classification per region.\n *\n * - This method should not be overridden.\n * - It is used only in validate method of the ClassificationBase mixin.\n *\n * @returns {boolean}\n * @private\n */\n _validatePerRegion() {\n const objectTag = self.toNameTag;\n\n for (const reg of objectTag.allRegs) {\n const value = reg.results.find((s) => s.from_name === self)?.mainValue;\n const isValid = self.validateValue(value);\n\n if (!isValid) {\n self.annotation.selectArea(reg);\n return false;\n }\n }\n\n return true;\n },\n createPerRegionResult() {\n self.perRegionArea?.setValue(self);\n },\n }));\n\nexport default PerRegionMixin;\nexport { PER_REGION_MODES } from \"./PerRegionModes\";\n","import { destroy, isAlive, types } from \"mobx-state-tree\";\nimport { defaultStyle } from \"../core/Constants\";\nimport { guidGenerator } from \"../core/Helpers\";\nimport Result from \"../regions/Result\";\nimport { PER_REGION_MODES } from \"./PerRegion\";\nimport { ReadOnlyRegionMixin } from \"./ReadOnlyMixin\";\nimport { FF_LSDV_4930, FF_TAXONOMY_LABELING, isFF } from \"../utils/feature-flags\";\n\nlet ouid = 1;\n\nexport const AreaMixinBase = types\n .model({\n id: types.optional(types.identifier, guidGenerator),\n ouid: types.optional(types.number, () => ouid++),\n results: types.array(Result),\n parentID: types.maybeNull(types.string),\n })\n .views((self) => ({\n // self id without annotation id added to uniquiness across all the tree\n get cleanId() {\n return self.id.replace(/#.*/, \"\");\n },\n\n /**\n * @return {Result[]} all results with labeling (created by *Labels control)\n */\n get labelings() {\n return self.results.filter((r) => r.from_name.isLabeling);\n },\n\n /**\n * @return {Result?} first result with labels (usually it's the only one, but not always)\n */\n get labeling() {\n if (!isAlive(self)) {\n return undefined;\n }\n return self.results.find((r) => r.from_name.isLabeling && r.hasValue);\n },\n\n get emptyLabel() {\n return self.results.find((r) => r.from_name?.emptyLabel)?.from_name?.emptyLabel;\n },\n\n get texting() {\n return isAlive(self) && self.results.find((r) => r.type === \"textarea\" && r.hasValue);\n },\n\n get tag() {\n return self.labeling?.from_name;\n },\n\n hasLabel(value) {\n const labels = self.labeling?.mainValue;\n\n if (!labels || !value) return false;\n // label can contain comma, so check for full match first\n if (labels.includes(value)) return true;\n if (value.includes(\",\")) {\n return value.split(\",\").some((v) => labels.includes(v));\n }\n return false;\n },\n\n get perRegionTags() {\n return self.annotation.toNames.get(self.object.name)?.filter((tag) => tag.perregion) || [];\n },\n\n // special tags that can be used for labeling (only for now)\n get labelingTags() {\n if (!isFF(FF_TAXONOMY_LABELING)) return [];\n\n return self.annotation.toNames.get(self.object.name)?.filter((tag) => tag.classification && tag.isLabeling) || [];\n },\n\n get perRegionDescControls() {\n return self.perRegionTags.filter((tag) => tag.displaymode === PER_REGION_MODES.REGION_LIST);\n },\n\n get perRegionFocusTarget() {\n return self.perRegionTags.find((tag) => tag.isVisible !== false && tag.focusable);\n },\n\n get labelName() {\n if (!isAlive(self)) {\n return void 0;\n }\n return self.labeling?.mainValue?.[0] || self.emptyLabel?._value;\n },\n\n get labels() {\n return Array.from(self.labeling?.mainValue ?? []);\n },\n\n // used only in labels on regions for Image and Video tags\n getLabelText(joinstr) {\n const index = self.region_index;\n const label = self.labeling;\n const text = self.texting?.mainValue?.[0]?.replace(/\\n\\r|\\n/, \" \");\n const labelNames = label?.getSelectedString(joinstr);\n const labelText = [];\n\n if (index) labelText.push(String(index));\n if (labelNames) labelText.push(labelNames);\n if (text) labelText.push(text);\n return labelText.join(\": \");\n },\n\n get parent() {\n if (!isAlive(self)) {\n return void 0;\n }\n return self.object;\n },\n\n get style() {\n if (!isAlive(self)) {\n return void 0;\n }\n\n const styled = self.results.find((r) => r.style);\n\n if (styled && styled.style) {\n return styled.style;\n }\n const emptyStyled = self.results.find((r) => r.emptyStyle);\n\n if (emptyStyled && emptyStyled.emptyStyle) {\n return emptyStyled.emptyStyle;\n }\n\n const controlStyled = self.results.find((r) => self.type.startsWith(r.type));\n\n return controlStyled && controlStyled.controlStyle;\n },\n\n // @todo may be slow, consider to add some code to annotation (un)select* methods\n get selected() {\n return self.annotation?.highlightedNode === self;\n },\n\n getOneColor() {\n return (self.style || defaultStyle).fillcolor;\n },\n\n get highlighted() {\n return self.parent?.selectionArea?.isActive ? self.isInSelectionArea : self._highlighted;\n },\n\n get isInSelectionArea() {\n return (!isFF(FF_LSDV_4930) || !self.hidden) && self.parent?.selectionArea?.isActive\n ? self.parent.selectionArea.intersectsBbox(self.bboxCoords)\n : false;\n },\n\n get supportSuggestions() {\n return self.object.supportSuggestions;\n },\n }))\n .volatile(() => ({\n // index of the region in the regions tree (Outliner); will be updated on any order change\n region_index: null,\n }))\n .actions((self) => ({\n setRegionIndex(index) {\n if (self.region_index !== index) {\n self.region_index = index;\n // update text regions\n self.updateAppearenceFromState?.();\n }\n },\n beforeDestroy() {\n self.results.forEach((r) => destroy(r));\n },\n\n setSelected(value) {\n self.selected = value;\n },\n\n /**\n * Remove region\n */\n deleteRegion() {\n if (self.annotation.isReadOnly()) return;\n if (self.isReadOnly()) return;\n if (self.selected) self.annotation.unselectAll(true);\n if (self.destroyRegion) self.destroyRegion();\n self.annotation.deleteRegion(self);\n },\n\n addResult(r) {\n self.results.push(r);\n },\n\n /**\n * Applies additional data from the given result.\n * In the results we have almost all data meaningful stored in value but in regions we have two places for it:\n * - region itself (fields in model)\n * - related results (in results array)\n * so for some fields we should control more if we want to apply fields that could be in both places into the region.\n * This method also helps to avoid region type detection at the deserialization stage.\n *\n * @param {Object} result - The result object containing additional data.\n * @returns {void}\n */\n applyAdditionalDataFromResult(_result) {\n // This method should be overridden if we need to get some additional data from result on deserialize\n },\n\n removeResult(r) {\n const index = self.results.indexOf(r);\n\n if (index < 0) return;\n self.results.splice(index, 1);\n destroy(r);\n if (!self.results.length) self.annotation.deleteArea(self);\n },\n\n setValue(tag) {\n const result = self.results.find((r) => r.from_name === tag);\n const values = tag.selectedValues();\n\n if (result) {\n if (tag.holdsState) result.setValue(values);\n else self.removeResult(result);\n } else {\n self.results.push({\n area: self,\n from_name: tag,\n to_name: self.object,\n type: tag.resultType,\n value: {\n [tag.valueType]: values,\n },\n });\n }\n self.updateAppearenceFromState && self.updateAppearenceFromState();\n },\n }));\n\nexport const AreaMixin = types.compose(\"AreaMixin\", AreaMixinBase, ReadOnlyRegionMixin);\n","/* eslint-disable prefer-const */\n\nimport chroma from \"chroma-js\";\n\n// Magic Wand (Fuzzy Selection Tool) for Javascript\n//\n// The MIT License (MIT)\n//\n// Copyright (c) 2014, Ryasnoy Paul (ryasnoypaul@gmail.com)\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice avnd this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\nconst MagicWand = (() => {\n const lib = {};\n\n /** Create a binary mask on the image by color threshold\n * Algorithm: Scanline flood fill (http://en.wikipedia.org/wiki/Flood_fill)\n * @param {Object} image: {Uint8Array} data, {int} width, {int} height, {int} bytes\n * @param {int} x of start pixel\n * @param {int} y of start pixel\n * @param {int} color threshold\n * @param {Uint8Array} mask of visited points (optional)\n * @return {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n */\n lib.floodFill = (image, px, py, colorThreshold, mask) => {\n let c;\n let x;\n let newY;\n let el;\n let xr;\n let xl;\n let dy;\n let dyl;\n let dyr;\n let checkY;\n const data = image.data;\n const w = image.width;\n const h = image.height;\n const bytes = image.bytes; // number of bytes in the color\n let maxX = -1;\n let minX = w + 1;\n let maxY = -1;\n let minY = h + 1;\n let i = py * w + px; // start point index in the mask data\n const result = new Uint8Array(w * h); // result mask\n const visited = new Uint8Array(mask ? mask : w * h); // mask of visited points\n\n if (visited[i] === 1) return null;\n\n i = i * bytes; // start point index in the image data\n const sampleColor = [data[i], data[i + 1], data[i + 2], data[i + 3]]; // start point color (sample)\n\n const stack = [{ y: py, left: px - 1, right: px + 1, dir: 1 }]; // first scanning line\n\n do {\n el = stack.shift(); // get line for scanning\n\n checkY = false;\n for (x = el.left + 1; x < el.right; x++) {\n dy = el.y * w;\n i = (dy + x) * bytes; // point index in the image data\n\n if (visited[dy + x] === 1) continue; // check whether the point has been visited\n // compare the color of the sample\n c = data[i] - sampleColor[0]; // check by red\n if (c > colorThreshold || c < -colorThreshold) continue;\n c = data[i + 1] - sampleColor[1]; // check by green\n if (c > colorThreshold || c < -colorThreshold) continue;\n c = data[i + 2] - sampleColor[2]; // check by blue\n if (c > colorThreshold || c < -colorThreshold) continue;\n\n checkY = true; // if the color of the new point(x,y) is similar to the sample color need to check minmax for Y\n\n result[dy + x] = 1; // mark a new point in mask\n visited[dy + x] = 1; // mark a new point as visited\n\n xl = x - 1;\n // walk to left side starting with the left neighbor\n while (xl > -1) {\n dyl = dy + xl;\n i = dyl * bytes; // point index in the image data\n if (visited[dyl] === 1) break; // check whether the point has been visited\n // compare the color of the sample\n c = data[i] - sampleColor[0]; // check by red\n if (c > colorThreshold || c < -colorThreshold) break;\n c = data[i + 1] - sampleColor[1]; // check by green\n if (c > colorThreshold || c < -colorThreshold) break;\n c = data[i + 2] - sampleColor[2]; // check by blue\n if (c > colorThreshold || c < -colorThreshold) break;\n\n result[dyl] = 1;\n visited[dyl] = 1;\n\n xl--;\n }\n xr = x + 1;\n // walk to right side starting with the right neighbor\n while (xr < w) {\n dyr = dy + xr;\n i = dyr * bytes; // index point in the image data\n if (visited[dyr] === 1) break; // check whether the point has been visited\n // compare the color of the sample\n c = data[i] - sampleColor[0]; // check by red\n if (c > colorThreshold || c < -colorThreshold) break;\n c = data[i + 1] - sampleColor[1]; // check by green\n if (c > colorThreshold || c < -colorThreshold) break;\n c = data[i + 2] - sampleColor[2]; // check by blue\n if (c > colorThreshold || c < -colorThreshold) break;\n\n result[dyr] = 1;\n visited[dyr] = 1;\n\n xr++;\n }\n\n // check minmax for X\n if (xl < minX) minX = xl + 1;\n if (xr > maxX) maxX = xr - 1;\n\n newY = el.y - el.dir;\n if (newY >= 0 && newY < h) {\n // add two scanning lines in the opposite direction (y - dir) if necessary\n if (xl < el.left) stack.push({ y: newY, left: xl, right: el.left, dir: -el.dir }); // from \"new left\" to \"current left\"\n if (el.right < xr) stack.push({ y: newY, left: el.right, right: xr, dir: -el.dir }); // from \"current right\" to \"new right\"\n }\n newY = el.y + el.dir;\n if (newY >= 0 && newY < h) {\n // add the scanning line in the direction (y + dir) if necessary\n if (xl < xr) stack.push({ y: newY, left: xl, right: xr, dir: el.dir }); // from \"new left\" to \"new right\"\n }\n }\n // check minmax for Y if necessary\n if (checkY) {\n if (el.y < minY) minY = el.y;\n if (el.y > maxY) maxY = el.y;\n }\n } while (stack.length > 0);\n\n return {\n data: result,\n width: image.width,\n height: image.height,\n bounds: {\n minX,\n minY,\n maxX,\n maxY,\n },\n };\n };\n\n /** Apply the gauss-blur filter to binary mask\n * Algorithms: http://blog.ivank.net/fastest-gaussian-blur.html\n * http://www.librow.com/articles/article-9\n * http://elynxsdk.free.fr/ext-docs/Blur/Fast_box_blur.pdf\n * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n * @param {int} blur radius\n * @return {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n */\n lib.gaussBlur = (mask, radius) => {\n let i;\n let k;\n let k1;\n let x;\n let y;\n let val;\n let start;\n let end;\n const n = radius * 2 + 1; // size of the pattern for radius-neighbors (from -r to +r with the center point)\n const s2 = radius * radius;\n const wg = new Float32Array(n); // weights\n let total = 0; // sum of weights(used for normalization)\n const w = mask.width;\n const h = mask.height;\n const data = mask.data;\n const minX = mask.bounds.minX;\n const maxX = mask.bounds.maxX;\n const minY = mask.bounds.minY;\n const maxY = mask.bounds.maxY;\n\n // calc gauss weights\n for (i = 0; i < radius; i++) {\n const dsq = (radius - i) * (radius - i);\n const ww = Math.exp(-dsq / (2.0 * s2)) / (2 * Math.PI * s2);\n\n wg[radius + i] = wg[radius - i] = ww;\n total += 2 * ww;\n }\n // normalization weights\n for (i = 0; i < n; i++) {\n wg[i] /= total;\n }\n\n const result = new Uint8Array(w * h); // result mask\n const endX = radius + w;\n const endY = radius + h;\n\n //walk through all source points for blur\n for (y = minY; y < maxY + 1; y++)\n for (x = minX; x < maxX + 1; x++) {\n val = 0;\n k = y * w + x; // index of the point\n start = radius - x > 0 ? radius - x : 0;\n end = endX - x < n ? endX - x : n; // Math.min((((w - 1) - x) + radius) + 1, n);\n k1 = k - radius;\n // walk through x-neighbors\n for (i = start; i < end; i++) {\n val += data[k1 + i] * wg[i];\n }\n start = radius - y > 0 ? radius - y : 0;\n end = endY - y < n ? endY - y : n; // Math.min((((h - 1) - y) + radius) + 1, n);\n k1 = k - radius * w;\n // walk through y-neighbors\n for (i = start; i < end; i++) {\n val += data[k1 + i * w] * wg[i];\n }\n result[k] = val > 0.5 ? 1 : 0;\n }\n\n return {\n data: result,\n width: w,\n height: h,\n bounds: {\n minX,\n minY,\n maxX,\n maxY,\n },\n };\n };\n\n /** Create a border index array of boundary points of the mask with radius-neighbors\n * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n * @param {int} blur radius\n * @param {Uint8Array} visited: mask of visited points (optional)\n * @return {Array} border index array of boundary points with radius-neighbors (only points need for blur)\n */\n function createBorderForBlur(mask, radius, visited) {\n let x;\n let i;\n let j;\n let y;\n let k;\n let k1;\n let k2;\n const w = mask.width;\n const h = mask.height;\n const data = mask.data;\n const visitedData = new Uint8Array(data);\n const minX = mask.bounds.minX;\n const maxX = mask.bounds.maxX;\n const minY = mask.bounds.minY;\n const maxY = mask.bounds.maxY;\n let len = w * h;\n const temp = new Uint8Array(len); // auxiliary array to check uniqueness\n const border = []; // only border points\n const x0 = Math.max(minX, 1);\n const x1 = Math.min(maxX, w - 2);\n const y0 = Math.max(minY, 1);\n const y1 = Math.min(maxY, h - 2);\n\n if (visited && visited.length > 0) {\n // copy visited points (only \"black\")\n for (k = 0; k < len; k++) {\n if (visited[k] === 1) visitedData[k] = 1;\n }\n }\n\n // walk through inner values except points on the boundary of the image\n for (y = y0; y < y1 + 1; y++)\n for (x = x0; x < x1 + 1; x++) {\n k = y * w + x;\n if (data[k] === 0) continue; // \"white\" point isn't the border\n k1 = k + w; // y + 1\n k2 = k - w; // y - 1\n // check if any neighbor with a \"white\" color\n if (\n visitedData[k + 1] === 0 ||\n visitedData[k - 1] === 0 ||\n visitedData[k1] === 0 ||\n visitedData[k1 + 1] === 0 ||\n visitedData[k1 - 1] === 0 ||\n visitedData[k2] === 0 ||\n visitedData[k2 + 1] === 0 ||\n visitedData[k2 - 1] === 0\n ) {\n //if (visitedData[k + 1] + visitedData[k - 1] +\n // visitedData[k1] + visitedData[k1 + 1] + visitedData[k1 - 1] +\n // visitedData[k2] + visitedData[k2 + 1] + visitedData[k2 - 1] === 8) continue;\n border.push(k);\n }\n }\n\n // walk through points on the boundary of the image if necessary\n // if the \"black\" point is adjacent to the boundary of the image, it is a border point\n if (minX === 0) for (y = minY; y < maxY + 1; y++) if (data[y * w] === 1) border.push(y * w);\n\n if (maxX === w - 1) for (y = minY; y < maxY + 1; y++) if (data[y * w + maxX] === 1) border.push(y * w + maxX);\n\n if (minY === 0) for (x = minX; x < maxX + 1; x++) if (data[x] === 1) border.push(x);\n\n if (maxY === h - 1) for (x = minX; x < maxX + 1; x++) if (data[maxY * w + x] === 1) border.push(maxY * w + x);\n\n const result = []; // border points with radius-neighbors\n let start;\n let end;\n const endX = radius + w;\n const endY = radius + h;\n const n = radius * 2 + 1; // size of the pattern for radius-neighbors (from -r to +r with the center point)\n\n len = border.length;\n // walk through radius-neighbors of border points and add them to the result array\n for (j = 0; j < len; j++) {\n k = border[j]; // index of the border point\n temp[k] = 1; // mark border point\n result.push(k); // save the border point\n x = k % w; // calc x by index\n y = (k - x) / w; // calc y by index\n start = radius - x > 0 ? radius - x : 0;\n end = endX - x < n ? endX - x : n; // Math.min((((w - 1) - x) + radius) + 1, n);\n k1 = k - radius;\n // walk through x-neighbors\n for (i = start; i < end; i++) {\n k2 = k1 + i;\n if (temp[k2] === 0) {\n // check the uniqueness\n temp[k2] = 1;\n result.push(k2);\n }\n }\n start = radius - y > 0 ? radius - y : 0;\n end = endY - y < n ? endY - y : n; // Math.min((((h - 1) - y) + radius) + 1, n);\n k1 = k - radius * w;\n // walk through y-neighbors\n for (i = start; i < end; i++) {\n k2 = k1 + i * w;\n if (temp[k2] === 0) {\n // check the uniqueness\n temp[k2] = 1;\n result.push(k2);\n }\n }\n }\n\n return result;\n }\n\n /** Apply the gauss-blur filter ONLY to border points with radius-neighbors\n * Algorithms: http://blog.ivank.net/fastest-gaussian-blur.html\n * http://www.librow.com/articles/article-9\n * http://elynxsdk.free.fr/ext-docs/Blur/Fast_box_blur.pdf\n * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n * @param {int} blur radius\n * @param {Uint8Array} visited: mask of visited points (optional)\n * @return {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n */\n lib.gaussBlurOnlyBorder = (mask, radius, visited) => {\n const border = createBorderForBlur(mask, radius, visited); // get border points with radius-neighbors\n let ww;\n let dsq;\n let i;\n let j;\n let k;\n let k1;\n let x;\n let y;\n let val;\n let start;\n let end;\n const n = radius * 2 + 1; // size of the pattern for radius-neighbors (from -r to +r with center point)\n const s2 = 2 * radius * radius;\n const wg = new Float32Array(n); // weights\n let total = 0; // sum of weights(used for normalization)\n const w = mask.width;\n const h = mask.height;\n const data = mask.data;\n let minX = mask.bounds.minX;\n let maxX = mask.bounds.maxX;\n let minY = mask.bounds.minY;\n let maxY = mask.bounds.maxY;\n const len = border.length;\n\n // calc gauss weights\n for (i = 0; i < radius; i++) {\n dsq = (radius - i) * (radius - i);\n ww = Math.exp(-dsq / s2) / Math.PI;\n wg[radius + i] = wg[radius - i] = ww;\n total += 2 * ww;\n }\n // normalization weights\n for (i = 0; i < n; i++) {\n wg[i] /= total;\n }\n\n const result = new Uint8Array(data); // copy the source mask\n const endX = radius + w;\n const endY = radius + h;\n\n //walk through all border points for blur\n for (i = 0; i < len; i++) {\n k = border[i]; // index of the border point\n val = 0;\n x = k % w; // calc x by index\n y = (k - x) / w; // calc y by index\n start = radius - x > 0 ? radius - x : 0;\n end = endX - x < n ? endX - x : n; // Math.min((((w - 1) - x) + radius) + 1, n);\n k1 = k - radius;\n // walk through x-neighbors\n for (j = start; j < end; j++) {\n val += data[k1 + j] * wg[j];\n }\n if (val > 0.5) {\n result[k] = 1;\n // check minmax\n if (x < minX) minX = x;\n if (x > maxX) maxX = x;\n if (y < minY) minY = y;\n if (y > maxY) maxY = y;\n continue;\n }\n start = radius - y > 0 ? radius - y : 0;\n end = endY - y < n ? endY - y : n; // Math.min((((h - 1) - y) + radius) + 1, n);\n k1 = k - radius * w;\n // walk through y-neighbors\n for (j = start; j < end; j++) {\n val += data[k1 + j * w] * wg[j];\n }\n if (val > 0.5) {\n result[k] = 1;\n // check minmax\n if (x < minX) minX = x;\n if (x > maxX) maxX = x;\n if (y < minY) minY = y;\n if (y > maxY) maxY = y;\n } else {\n result[k] = 0;\n }\n }\n\n return {\n data: result,\n width: w,\n height: h,\n bounds: {\n minX,\n minY,\n maxX,\n maxY,\n },\n };\n };\n\n /** Create a border mask (only boundary points)\n * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n * @return {Object} border mask: {Uint8Array} data, {int} width, {int} height, {Object} offset\n */\n lib.createBorderMask = (mask) => {\n let x;\n let y;\n let k;\n let k1;\n let k2;\n const w = mask.width;\n const h = mask.height;\n const data = mask.data;\n const minX = mask.bounds.minX;\n const maxX = mask.bounds.maxX;\n const minY = mask.bounds.minY;\n const maxY = mask.bounds.maxY;\n const rw = maxX - minX + 1; // bounds size\n const rh = maxY - minY + 1;\n const result = new Uint8Array(rw * rh); // reduced mask (bounds size)\n const x0 = Math.max(minX, 1);\n const x1 = Math.min(maxX, w - 2);\n const y0 = Math.max(minY, 1);\n const y1 = Math.min(maxY, h - 2);\n\n // walk through inner values except points on the boundary of the image\n for (y = y0; y < y1 + 1; y++)\n for (x = x0; x < x1 + 1; x++) {\n k = y * w + x;\n if (data[k] === 0) continue; // \"white\" point isn't the border\n k1 = k + w; // y + 1\n k2 = k - w; // y - 1\n // check if any neighbor with a \"white\" color\n if (\n data[k + 1] === 0 ||\n data[k - 1] === 0 ||\n data[k1] === 0 ||\n data[k1 + 1] === 0 ||\n data[k1 - 1] === 0 ||\n data[k2] === 0 ||\n data[k2 + 1] === 0 ||\n data[k2 - 1] === 0\n ) {\n //if (data[k + 1] + data[k - 1] +\n // data[k1] + data[k1 + 1] + data[k1 - 1] +\n // data[k2] + data[k2 + 1] + data[k2 - 1] === 8) continue;\n result[(y - minY) * rw + (x - minX)] = 1;\n }\n }\n\n // walk through points on the boundary of the image if necessary\n // if the \"black\" point is adjacent to the boundary of the image, it is a border point\n if (minX === 0) for (y = minY; y < maxY + 1; y++) if (data[y * w] === 1) result[(y - minY) * rw] = 1;\n\n if (maxX === w - 1)\n for (y = minY; y < maxY + 1; y++) if (data[y * w + maxX] === 1) result[(y - minY) * rw + (maxX - minX)] = 1;\n\n if (minY === 0) for (x = minX; x < maxX + 1; x++) if (data[x] === 1) result[x - minX] = 1;\n\n if (maxY === h - 1)\n for (x = minX; x < maxX + 1; x++) if (data[maxY * w + x] === 1) result[(maxY - minY) * rw + (x - minX)] = 1;\n\n return {\n data: result,\n width: rw,\n height: rh,\n offset: { x: minX, y: minY },\n };\n };\n\n /** Create a border index array of boundary points of the mask\n * @param {Object} mask: {Uint8Array} data, {int} width, {int} height\n * @return {Array} border index array boundary points of the mask\n */\n lib.getBorderIndices = (mask) => {\n let x;\n let y;\n let k;\n let k1;\n let k2;\n const w = mask.width;\n const h = mask.height;\n const data = mask.data;\n const border = []; // only border points\n const x1 = w - 1;\n const y1 = h - 1;\n\n // walk through inner values except points on the boundary of the image\n for (y = 1; y < y1; y++)\n for (x = 1; x < x1; x++) {\n k = y * w + x;\n if (data[k] === 0) continue; // \"white\" point isn't the border\n k1 = k + w; // y + 1\n k2 = k - w; // y - 1\n // check if any neighbor with a \"white\" color\n if (\n data[k + 1] === 0 ||\n data[k - 1] === 0 ||\n data[k1] === 0 ||\n data[k1 + 1] === 0 ||\n data[k1 - 1] === 0 ||\n data[k2] === 0 ||\n data[k2 + 1] === 0 ||\n data[k2 - 1] === 0\n ) {\n //if (data[k + 1] + data[k - 1] +\n // data[k1] + data[k1 + 1] + data[k1 - 1] +\n // data[k2] + data[k2 + 1] + data[k2 - 1] === 8) continue;\n border.push(k);\n }\n }\n\n // walk through points on the boundary of the image if necessary\n // if the \"black\" point is adjacent to the boundary of the image, it is a border point\n for (y = 0; y < h; y++) if (data[y * w] === 1) border.push(y * w);\n\n for (x = 0; x < w; x++) if (data[x] === 1) border.push(x);\n\n k = w - 1;\n for (y = 0; y < h; y++) if (data[y * w + k] === 1) border.push(y * w + k);\n\n k = (h - 1) * w;\n for (x = 0; x < w; x++) if (data[k + x] === 1) border.push(k + x);\n\n return border;\n };\n\n /** Create a compressed mask with a \"white\" border (1px border with zero values) for the contour tracing\n * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n * @return {Object} border mask: {Uint8Array} data, {int} width, {int} height, {Object} offset\n */\n function prepareMask(mask) {\n let x;\n let y;\n const w = mask.width;\n const data = mask.data;\n const minX = mask.bounds.minX;\n const maxX = mask.bounds.maxX;\n const minY = mask.bounds.minY;\n const maxY = mask.bounds.maxY;\n const rw = maxX - minX + 3; // bounds size +1 px on each side (a \"white\" border)\n const rh = maxY - minY + 3;\n const result = new Uint8Array(rw * rh); // reduced mask (bounds size)\n\n // walk through inner values and copy only \"black\" points to the result mask\n for (y = minY; y < maxY + 1; y++)\n for (x = minX; x < maxX + 1; x++) {\n if (data[y * w + x] === 1) result[(y - minY + 1) * rw + (x - minX + 1)] = 1;\n }\n\n return {\n data: result,\n width: rw,\n height: rh,\n offset: { x: minX - 1, y: minY - 1 },\n };\n }\n\n /** Create a contour array for the binary mask\n * Algorithm: http://www.sciencedirect.com/science/article/pii/S1077314203001401\n * @param {Object} mask: {Uint8Array} data, {int} width, {int} height, {Object} bounds\n * @return {Array} contours: {Array} points, {bool} inner, {int} label\n */\n lib.traceContours = (mask) => {\n const m = prepareMask(mask);\n const contours = [];\n let label = 0;\n const w = m.width;\n const w2 = w * 2;\n const h = m.height;\n const src = m.data;\n const dx = m.offset.x;\n const dy = m.offset.y;\n const dest = new Uint8Array(src); // label matrix\n let i;\n let j;\n let x;\n let y;\n let k;\n let k1;\n let c;\n let inner;\n let dir;\n let first;\n let second;\n let current;\n let previous;\n let next;\n let d;\n\n // all [dx,dy] pairs (array index is the direction)\n // 5 6 7\n // 4 X 0\n // 3 2 1\n const directions = [\n [1, 0],\n [1, 1],\n [0, 1],\n [-1, 1],\n [-1, 0],\n [-1, -1],\n [0, -1],\n [1, -1],\n ];\n\n for (y = 1; y < h - 1; y++)\n for (x = 1; x < w - 1; x++) {\n k = y * w + x;\n if (src[k] === 1) {\n for (i = -w; i < w2; i += w2) {\n // k - w: outer tracing (y - 1), k + w: inner tracing (y + 1)\n if (src[k + i] === 0 && dest[k + i] === 0) {\n // need contour tracing\n inner = i === w; // is inner contour tracing ?\n label++; // label for the next contour\n\n c = [];\n dir = inner ? 2 : 6; // start direction\n current = previous = first = { x, y };\n second = null;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n dest[current.y * w + current.x] = label; // mark label for the current point\n // bypass all the neighbors around the current point in a clockwise\n for (j = 0; j < 8; j++) {\n dir = (dir + 1) % 8;\n\n // get the next point by new direction\n d = directions[dir]; // index as direction\n next = { x: current.x + d[0], y: current.y + d[1] };\n\n k1 = next.y * w + next.x;\n if (src[k1] === 1) {\n // black boundary pixel\n dest[k1] = label; // mark a label\n break;\n }\n dest[k1] = -1; // mark a white boundary pixel\n next = null;\n }\n if (next === null) break; // no neighbours (one-point contour)\n current = next;\n if (second) {\n if (\n previous.x === first.x &&\n previous.y === first.y &&\n current.x === second.x &&\n current.y === second.y\n ) {\n break; // creating the contour completed when returned to original position\n }\n } else {\n second = next;\n }\n c.push({ x: previous.x + dx, y: previous.y + dy });\n previous = current;\n dir = (dir + 4) % 8; // next dir (symmetrically to the current direction)\n }\n\n if (next !== null) {\n c.push({ x: first.x + dx, y: first.y + dy }); // close the contour\n contours.push({ inner, label, points: c }); // add contour to the list\n }\n }\n }\n }\n }\n\n return contours;\n };\n\n /** Simplify contours\n * Algorithms: http://psimpl.sourceforge.net/douglas-peucker.html\n * http://neerc.ifmo.ru/wiki/index.php?title=%D0%A3%D0%BF%D1%80%D0%BE%D1%89%D0%B5%D0%BD%D0%B8%D0%B5_%D0%BF%D0%BE%D0%BB%D0%B8%D0%B3%D0%BE%D0%BD%D0%B0%D0%BB%D1%8C%D0%BD%D0%BE%D0%B9_%D1%86%D0%B5%D0%BF%D0%B8\n * @param {Array} contours: {Array} points, {bool} inner, {int} label\n * @param {float} simplify tolerant\n * @param {int} simplify count: min number of points when the contour is simplified\n * @return {Array} contours: {Array} points, {bool} inner, {int} label, {int} initialCount\n */\n lib.simplifyContours = (contours, simplifyTolerant, simplifyCount) => {\n const lenContours = contours.length;\n const result = [];\n let i;\n let j;\n let k;\n let c;\n let points;\n let len;\n let resPoints;\n let lst;\n let stack;\n let ids;\n let maxd;\n let maxi;\n let dist;\n let r1;\n let r2;\n let r12;\n let dx;\n let dy;\n let pi;\n let pf;\n let pl;\n\n // walk through all contours\n for (j = 0; j < lenContours; j++) {\n c = contours[j];\n points = c.points;\n len = c.points.length;\n\n if (len < simplifyCount) {\n // contour isn't simplified\n resPoints = [];\n for (k = 0; k < len; k++) {\n resPoints.push({ x: points[k].x, y: points[k].y });\n }\n result.push({ inner: c.inner, label: c.label, points: resPoints, initialCount: len });\n continue;\n }\n\n lst = [0, len - 1]; // always add first and last points\n stack = [{ first: 0, last: len - 1 }]; // first processed edge\n\n do {\n ids = stack.shift();\n if (ids.last <= ids.first + 1) {\n // no intermediate points\n continue;\n }\n\n maxd = -1.0; // max distance from point to current edge\n maxi = ids.first; // index of maximally distant point\n\n for (\n i = ids.first + 1;\n i < ids.last;\n i++ // bypass intermediate points in edge\n ) {\n // calc the distance from current point to edge\n pi = points[i];\n pf = points[ids.first];\n pl = points[ids.last];\n dx = pi.x - pf.x;\n dy = pi.y - pf.y;\n r1 = Math.sqrt(dx * dx + dy * dy);\n dx = pi.x - pl.x;\n dy = pi.y - pl.y;\n r2 = Math.sqrt(dx * dx + dy * dy);\n dx = pf.x - pl.x;\n dy = pf.y - pl.y;\n r12 = Math.sqrt(dx * dx + dy * dy);\n if (r1 >= Math.sqrt(r2 * r2 + r12 * r12)) dist = r2;\n else if (r2 >= Math.sqrt(r1 * r1 + r12 * r12)) dist = r1;\n else dist = Math.abs((dy * pi.x - dx * pi.y + pf.x * pl.y - pl.x * pf.y) / r12);\n\n if (dist > maxd) {\n maxi = i; // save the index of maximally distant point\n maxd = dist;\n }\n }\n\n if (maxd > simplifyTolerant) {\n // if the max \"deviation\" is larger than allowed then...\n lst.push(maxi); // add index to the simplified list\n stack.push({ first: ids.first, last: maxi }); // add the left part for processing\n stack.push({ first: maxi, last: ids.last }); // add the right part for processing\n }\n } while (stack.length > 0);\n\n resPoints = [];\n len = lst.length;\n lst.sort((a, b) => a - b); // restore index order\n for (k = 0; k < len; k++) {\n resPoints.push({ x: points[lst[k]].x, y: points[lst[k]].y }); // add result points to the correct order\n }\n result.push({ inner: c.inner, label: c.label, points: resPoints, initialCount: c.points.length });\n }\n\n return result;\n };\n\n return lib;\n})();\n\n/**\n * Given some mask with non-zero values indicating pixels to color, draws it on the given\n * canvas Context.\n * @param ctx Canvas 2D context to use for drawing the image data.\n * @param w When creating an image from the mask, the width of that image.\n * @param h When creating an image from the mask, the height of that image.\n * @param color Chroma.js compatible RGB color to use when drawing the mask.\n * @param alpha Float 0 to 1 value of how much opacity to use for thresholded, filled pixels.\n */\nfunction paint(ctx, w, h, mask, color, alpha) {\n if (!mask) return;\n\n const [r, g, b] = chroma(color).rgb();\n\n alpha = Math.round(alpha * 255.0);\n\n let x;\n let y;\n const { data, bounds, width: maskW } = mask;\n const imgData = ctx.createImageData(w, h);\n\n for (y = bounds.minY; y <= bounds.maxY; y++) {\n for (x = bounds.minX; x <= bounds.maxX; x++) {\n if (data[y * maskW + x] === 0) continue;\n const k = (y * w + x) * 4;\n\n imgData.data[k] = r;\n imgData.data[k + 1] = g;\n imgData.data[k + 2] = b;\n imgData.data[k + 3] = alpha;\n }\n }\n\n ctx.putImageData(imgData, 0, 0);\n}\n\n/**\n * Given some image, apply a threshold to it anchored at the x and y location, and also\n * draw a results border around the thresholded mask.\n * @param {ImageData} imageData Raw image data to do the thresholding on.\n * @param {CanvasRenderingContext2D} ctx Image context on which to draw the results.\n * @param {int} width of the image.\n * @param {int} height of the image.\n * @param {int} x of start pixel\n * @param {int} y of start pixel.\n * @param {int} threshold Color range around anchor pixel to include within mask.\n * @param {string} color The color to draw the mask as, passed in as an RGB string.\n * @param {float} alpha Alpha opacity of the mask when drawn, 0. to 1.\n * @param {boolean} doPaint Whether to draw the mask once its calculated; not drawing\n * it can save some performance time.\n * @param {int} blurRadius The degree of gaussian blur to apply to the contour.\n * @param {boolean} doPaint Whether to draw the mask once its calculated; not drawing\n * it can save some performance time.\n * @returns The mask as {Uint8Array} data, {int} width, {int} height, {Object} bounds.\n */\nexport function drawMask(imageData, ctx, width, height, x, y, threshold, color, alpha, blurRadius, doPaint) {\n const image = {\n data: imageData.data,\n width,\n height,\n bytes: 4, // RGBA\n };\n const existingMask = null;\n let mask = MagicWand.floodFill(image, x, y, threshold, existingMask);\n\n if (mask) mask = MagicWand.gaussBlurOnlyBorder(mask, blurRadius, existingMask);\n if (doPaint) paint(ctx, width, height, mask, color, alpha);\n\n return mask;\n}\n","import Konva from \"konva\";\nimport { FF_DEV_3793, isFF } from \"./feature-flags\";\n\nexport function reverseCoordinates(r1, r2) {\n let r1X = r1.x;\n let r1Y = r1.y;\n let r2X = r2.x;\n let r2Y = r2.y;\n let d;\n\n if (r1X > r2X) {\n d = Math.abs(r1X - r2X);\n r1X = r2X;\n r2X = r1X + d;\n }\n\n if (r1Y > r2Y) {\n d = Math.abs(r1Y - r2Y);\n r1Y = r2Y;\n r2Y = r1Y + d;\n }\n /**\n * Return the corrected rect\n */\n return { x1: r1X, y1: r1Y, x2: r2X, y2: r2Y };\n}\n\n/**\n * Transform RGBA Canvas to Binary Matrix\n * @param {object} canvas\n * @param {object} shape\n */\nexport function canvasToBinaryMatrix(canvas, shape) {\n const currentLayer = canvas.stageRef.getLayers().filter((layer) => layer.attrs.id === shape.id);\n\n const canv = currentLayer[0].canvas.context;\n\n const initialArray = canv.getImageData(0, 0, canv.canvas.width, canv.canvas.height);\n\n const binaryMatrix = [];\n\n for (\n let i = 0;\n i < canvas.stageRef.bufferCanvas.context.canvas.width * canvas.stageRef.bufferCanvas.context.canvas.height * 4;\n i += 4\n ) {\n const alpha = initialArray.data[i + 0];\n const r = initialArray.data[i + 1];\n const g = initialArray.data[i + 2];\n const b = initialArray.data[i + 3];\n\n if (alpha > 0 || r > 0 || g > 0 || b > 0) {\n binaryMatrix.push(1);\n } else {\n binaryMatrix.push(0);\n }\n }\n\n return binaryMatrix;\n}\n\n/**\n * Apply transform to rect and calc bounding box around it\n * @param {{ x: number, y: number, width: number, height: number }} rect\n * @param {Konva.Transform} transform\n */\nexport function getBoundingBoxAfterTransform(rect, transform) {\n const points = [\n { x: rect.x, y: rect.y },\n { x: rect.x + rect.width, y: rect.y },\n { x: rect.x + rect.width, y: rect.y + rect.height },\n { x: rect.x, y: rect.y + rect.height },\n ];\n let minX;\n let minY;\n let maxX;\n let maxY;\n\n points.forEach((point) => {\n const transformed = transform.point(point);\n\n if (minX === undefined) {\n minX = maxX = transformed.x;\n minY = maxY = transformed.y;\n }\n minX = Math.min(minX, transformed.x);\n minY = Math.min(minY, transformed.y);\n maxX = Math.max(maxX, transformed.x);\n maxY = Math.max(maxY, transformed.y);\n });\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n}\n\n/**\n * Apply changes to rect (shift to (x, y) and rotate) and calc bounding box around it\n * @param {{ x: number, y: number, width: number, height: number }} rect\n * @param {{ x: number, y: number }} shiftPoint\n * @param {number} radRotation\n */\nexport function getBoundingBoxAfterChanges(rect, shiftPoint, radRotation = 0) {\n const transform = new Konva.Transform();\n\n transform.translate(shiftPoint.x, shiftPoint.y);\n transform.rotate(radRotation);\n return getBoundingBoxAfterTransform(rect, transform);\n}\n\n/**\n * Crop rect to fit into canvas with given dimensions\n * @param {{ x: number, y: number, width: number, height: number }} rect\n * @param {number} stageWidth\n * @param {number} stageHeight\n */\nexport function fixRectToFit(rect, stageWidth, stageHeight) {\n let { x, y, width, height } = rect;\n\n if (x < 0) {\n width += x;\n x = 0;\n } else if (x + width > stageWidth) {\n width = stageWidth - x;\n }\n\n if (y < 0) {\n height += y;\n y = 0;\n } else if (y + height > stageHeight) {\n height = stageHeight - y;\n }\n\n return { ...rect, x, y, width, height };\n}\n\nexport function createDragBoundFunc(item, offset = { x: 0, y: 0 }) {\n const { parent: image } = item;\n\n return (pos) =>\n image.fixForZoomWrapper(pos, (pos) => {\n let { x, y } = pos;\n\n if (isFF(FF_DEV_3793)) {\n x = image.canvasToInternalX(x);\n y = image.canvasToInternalY(y);\n }\n\n x -= offset.x;\n y -= offset.y;\n const singleRegionDragging = item.selected || !item.inSelection;\n const { top, left, right, bottom } = item.bboxCoords;\n const { top: srTop, left: srLeft, right: srRight, bottom: srBottom } = image?.selectedRegionsBBox || {};\n const bbox = singleRegionDragging\n ? { x, y, width: right - left, height: bottom - top }\n : { x: srLeft - left + x, y: srTop - top + y, width: srRight - srLeft, height: srBottom - srTop };\n const fixed = isFF(FF_DEV_3793)\n ? fixRectToFit(bbox, 100, 100)\n : fixRectToFit(bbox, image.stageWidth, image.stageHeight);\n\n if (fixed.width !== bbox.width) {\n x += (fixed.width - bbox.width) * (fixed.x !== bbox.x ? -1 : 1);\n }\n\n if (fixed.height !== bbox.height) {\n y += (fixed.height - bbox.height) * (fixed.y !== bbox.y ? -1 : 1);\n }\n\n x += offset.x;\n y += offset.y;\n\n if (!isFF(FF_DEV_3793)) return { x, y };\n\n return { x: image.internalToCanvasX(x), y: image.internalToCanvasY(y) };\n });\n}\n\n/**\n * An image on the stage that is being labelled might be under some CSS transformations,\n * such as being zoomed in, negatively zoomed out, rotated, etc., while also being shown in a\n * viewport on top of the image that might cut parts of it off. For operations like the\n * Magic Wand we need to ultimately get raw pixel data of the image with these transforms applied.\n *\n * Unfortunately it is impossible to get the raw pixel values exhibiting the actual CSS\n * transforms for an Image via JavaScript. Instead, we have to take the original untransformed\n * image and blit it to a Canvas with similar transforms but done through the Canvas API,\n * then getting the transformed raw pixels.\n *\n * In addition, doing all of this on large images can burn performance cycles that can\n * make using tools like the Magic Wand onerous, so we also attempt to only transform & blit\n * the image to exactly the area currently being shown in the viewport, so that we don't\n * do wasted work.\n *\n * We currently support zoomed in, negative zoom, and images being scaled in their viewport.\n * We do not support rotated images currently with this method.\n *\n * @param {Image} img DOM Image object to ultimately get raw, transformed pixel values for.\n * @param {int} naturalWidth The actual size of the Image if it were loaded from disk and shown\n * its full, real size.\n * @param {int} naturalHeight Same, but for the height.\n * @param imageDisplayedInBrowserWidth {int} When the image is displayed in an actual browser\n * it can be shrunken or expanded based on its container and available screen real estate; this\n * is that width.\n * @param imageDisplayedInBrowserHeight {int} Same, but for the height.\n * @param viewportWidth {int} The width in pixels of where the image is actually being displayed;\n * this is different than the imageDisplayedInBrowserWidth as the size of the image might be\n * clipped by the edges of the viewport when overflow: hidden is set, like looking through the\n * edges of a window clipping a view of the world outside.\n * @param viewportHeight {int} Same, but for the height.\n * @param zoomScale {float} 1 if no zooming is happening, >1 if zooming is on, <1 if negatively\n * zoomed outwards.\n * @param zoomingPositionX {float} If zoomed and panned away from the image origin at the upper\n * left of the screen, relates negative float coordinates from that corner of the X value,\n * where these coordinates are relative to the imageDisplayedInBrowserWidth values.\n * @param zoomingPositionY {float} Same, but for the height.\n * @param negativezoom {boolean} True If a template allows negative zooming (i.e. zooming outwards\n * beyond the actual size of the image), and if the user is currently actually negative zooming,\n * will be true.\n * @returns {[ImageData, Canvas]} Returns an array with the actual RGBA imagedata of the transformed\n * image, as well as a Canvas with the transformed image drawn on it.\n */\nexport function getTransformedImageData(\n img,\n naturalWidth,\n naturalHeight,\n imageDisplayedInBrowserWidth,\n imageDisplayedInBrowserHeight,\n viewportWidth,\n viewportHeight,\n zoomScale,\n zoomingPositionX,\n zoomingPositionY,\n negativezoom,\n) {\n // If negative zoom is on, the image as displayed in the browser could actually be\n // _smaller_ than the viewport. Get the minimum size between these when creating\n // our ultimate canvas.\n let canvasWidth;\n let canvasHeight;\n\n if (negativezoom) {\n canvasWidth = Math.min(viewportWidth, imageDisplayedInBrowserWidth);\n canvasHeight = Math.min(viewportHeight, imageDisplayedInBrowserHeight);\n } else {\n canvasWidth = viewportWidth;\n canvasHeight = viewportHeight;\n }\n\n const canvas = document.createElement(\"canvas\");\n\n canvas.width = canvasWidth;\n canvas.height = canvasHeight;\n\n const ctx = canvas.getContext(\"2d\");\n\n const [viewportNaturalX, viewportNaturalY] = getActualZoomingPosition(\n naturalWidth,\n naturalHeight,\n imageDisplayedInBrowserWidth,\n imageDisplayedInBrowserHeight,\n zoomingPositionX,\n zoomingPositionY,\n );\n\n // The viewport dimensions are some percentage of the actual size of the image\n // shown in the browser; determine that then calculate the percentage dimension\n // of the viewport in natural coordinate space. If we are negative zooming then\n // the calculations are slightly different.\n let viewportNaturalWidth;\n let viewportNaturalHeight;\n\n if (negativezoom) {\n viewportNaturalWidth = naturalWidth;\n viewportNaturalHeight = naturalHeight;\n } else {\n viewportNaturalWidth = Math.ceil((viewportWidth / imageDisplayedInBrowserWidth) * naturalWidth);\n viewportNaturalHeight = Math.ceil((viewportHeight / imageDisplayedInBrowserHeight) * naturalHeight);\n }\n\n // Only draw the part of the image under transformations to the viewport that we will actually\n // use, so we can then efficiently get its pixel data for pixel-level tools.\n\n // Source dimensions.\n const sx = viewportNaturalX;\n const sy = viewportNaturalY;\n const sWidth = viewportNaturalWidth;\n const sHeight = viewportNaturalHeight;\n // Destination dimensions.\n const dx = 0;\n const dy = 0;\n const dWidth = canvasWidth;\n const dHeight = canvasHeight;\n\n ctx.drawImage(img, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight);\n\n // Now grab the transformed pixels from the canvas for the values to actual do Magic Wanding on.\n // If an exception is thrown then CORS cross domain headers are probably not configured\n // correctly.\n let transformedData;\n\n try {\n transformedData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n } catch (err) {\n const msg = \"Please configure CORS cross-domain headers correctly for getting image labeling data\";\n\n alert(msg);\n console.error(msg);\n throw msg;\n }\n\n return [transformedData, canvas];\n}\n\n/**\n * Given some image that we might be zoomed into, get its x and y values relative to the actual,\n * natural size of the image.\n *\n * @param {int} naturalWidth The actual size of the Image if it were loaded from disk and shown\n * its full, real size.\n * @param {int} naturalHeight Same, but for the height.\n * @param imageDisplayedInBrowserWidth {int} When the image is displayed in an actual browser\n * it can be shrunken or expanded based on its container and available screen real estate; this\n * is that width.\n * @param imageDisplayedInBrowserHeight {int} Same, but for the height.\n * @param zoomingPositionX {float} If zoomed and panned away from the image origin at the upper\n * left of the screen, relates negative float coordinates from that corner of the X value,\n * where these coordinates are relative to the imageDisplayedInBrowserWidth values.\n * @param zoomingPositionY {float} Same, but for the height.\n * @returns {[int, int]} X and Y upper left position of where the zoom is relative to the actual,\n * natural size of the image.\n */\nexport function getActualZoomingPosition(\n naturalWidth,\n naturalHeight,\n imageDisplayedInBrowserWidth,\n imageDisplayedInBrowserHeight,\n zoomingPositionX,\n zoomingPositionY,\n) {\n // The zoomingPosition is actually relative to whatever size the image is\n // actually being displayed in the browser (which could be scaled down or up),\n // so turn it into a percentage then re-apply it to the full natural size to get the\n // correct upper-left pixel offsets.\n const zoomPercentageX = Math.abs(zoomingPositionX) / imageDisplayedInBrowserWidth;\n const zoomPercentageY = Math.abs(zoomingPositionY) / imageDisplayedInBrowserHeight;\n const viewportNaturalX = Math.floor(zoomPercentageX * naturalWidth);\n const viewportNaturalY = Math.floor(zoomPercentageY * naturalHeight);\n\n return [viewportNaturalX, viewportNaturalY];\n}\n","function checkISO(value) {\n const regExpISO = /\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d\\.\\d+([+-][0-2]\\d:[0-5]\\d|Z)/;\n\n return regExpISO.test(value);\n}\n\n/**\n * Helper function to convert ms -> HHMMSS\n * @param {number} ms\n * @returns {string}\n */\nexport function msToHMS(ms) {\n // 1- Convert to seconds:\n let seconds = ms / 1000;\n // 2- Extract hours:\n const hours = Number.parseInt(seconds / 3600); // 3,600 seconds in 1 hour\n\n seconds = seconds % 3600; // seconds remaining after extracting hours\n // 3- Extract minutes:\n const minutes = Number.parseInt(seconds / 60); // 60 seconds in 1 minute\n // 4- Keep only seconds not extracted to minutes:\n\n seconds = Math.floor(seconds); // % 60;\n\n return `${hours}:${minutes}:${seconds}`;\n}\n\n/**\n * Helper function to pretty date\n */\nexport function prettyDate(time) {\n if (typeof time !== \"string\" && !(time instanceof Date) && !checkISO(time)) return;\n\n const date = new Date(time);\n const diff = (new Date().getTime() - date.getTime()) / 1000;\n const day_diff = Math.floor(diff / 86400);\n\n if (isNaN(day_diff) || day_diff < 0) return;\n\n return (\n (day_diff === 0 &&\n ((diff < 60 && \"just now\") ||\n (diff < 120 && \"1 minute ago\") ||\n (diff < 3600 && `${Math.floor(diff / 60)} minutes ago`) ||\n (diff < 7200 && \"1 hour ago\") ||\n (diff < 86400 && `${Math.floor(diff / 3600)} hours ago`))) ||\n (day_diff === 1 && \"Yesterday\") ||\n (day_diff < 7 && `${day_diff} days ago`) ||\n (day_diff < 31 && `${Math.ceil(day_diff / 7)} weeks ago`) ||\n `${day_diff} days ago`\n );\n}\n\nexport function toISODateString(date) {\n date = date || new Date();\n\n const tzOffest = date.getTimezoneOffset() * 60000;\n const localISOTime = new Date(date.getTime() - tzOffest).toISOString().slice(0, -1);\n\n return localISOTime;\n}\n\n/**\n * Helper function to get current timezone\n */\nexport function currentISODate() {\n return toISODateString();\n}\n","import { clamp, isDefined } from \"./utilities\";\nimport { FF_LSDV_4620_3, isFF } from \"./feature-flags\";\n\nexport const isTextNode = (node) => node && node.nodeType === Node.TEXT_NODE;\n\nconst isText = (text) => text && /[\\w']/i.test(text);\nconst isSpace = (text) => text && /[\\s\\t]/i.test(text);\n\nconst destructSelection = (selection) => {\n const range = selection.getRangeAt(0);\n const { startOffset, startContainer, endOffset, endContainer } = range;\n\n const firstSymbol = startContainer.textContent[startOffset];\n const prevSymbol = startContainer.textContent[startOffset - 1];\n const lastSymbol = endContainer.textContent[endOffset - 1];\n const nextSymbol = endContainer.textContent[endOffset];\n\n return {\n selection,\n range,\n startOffset,\n startContainer,\n endOffset,\n endContainer,\n firstSymbol,\n prevSymbol,\n lastSymbol,\n nextSymbol,\n };\n};\n\nconst trimSelectionLeft = (selection) => {\n const resultRange = selection.getRangeAt(0);\n\n selection.removeAllRanges();\n selection.collapse(resultRange.startContainer, resultRange.startOffset);\n let currentRange = selection.getRangeAt(0);\n\n do {\n selection.collapse(currentRange.endContainer, currentRange.endOffset);\n selection.modify(\"extend\", \"forward\", \"character\");\n currentRange = selection.getRangeAt(0);\n } while (\n !isTextNode(currentRange.startContainer) ||\n isSpace(currentRange.startContainer.textContent[currentRange.startOffset])\n );\n resultRange.setStart(currentRange.startContainer, currentRange.startOffset);\n selection.removeAllRanges();\n selection.addRange(resultRange);\n};\nconst trimSelectionRight = (selection) => {\n const resultRange = selection.getRangeAt(0);\n\n selection.removeAllRanges();\n selection.collapse(resultRange.endContainer, resultRange.endOffset);\n let currentRange = selection.getRangeAt(0);\n\n do {\n selection.collapse(currentRange.startContainer, currentRange.startOffset);\n selection.modify(\"extend\", \"backward\", \"character\");\n currentRange = selection.getRangeAt(0);\n } while (\n !isTextNode(currentRange.startContainer) ||\n isSpace(currentRange.startContainer.textContent[currentRange.startOffset])\n );\n resultRange.setEnd(currentRange.endContainer, currentRange.endOffset);\n selection.removeAllRanges();\n selection.addRange(resultRange);\n};\nconst trimSelection = (selection) => {\n trimSelectionLeft(selection);\n trimSelectionRight(selection);\n};\n\n/**\n *\n * @param {Selection} selection\n */\nconst findBoundarySelection = (selection, boundary) => {\n const { range: originalRange, startOffset, startContainer, endOffset, endContainer } = destructSelection(selection);\n\n const resultRange = {};\n let currentRange;\n\n // It's easier to operate the selection when it's collapsed\n selection.collapse(endContainer, endOffset);\n // Looking for maximum displacement\n while (selection.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START, originalRange) === 1) {\n selection.modify(\"move\", \"backward\", boundary);\n }\n // Going back to find minimum displacement\n while (selection.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START, originalRange) < 1) {\n currentRange = selection.getRangeAt(0);\n Object.assign(resultRange, {\n startContainer: currentRange.startContainer,\n startOffset: currentRange.startOffset,\n });\n selection.modify(\"move\", \"forward\", boundary);\n }\n\n selection.collapse(startContainer, startOffset);\n while (selection.getRangeAt(0).compareBoundaryPoints(Range.END_TO_END, originalRange) === -1) {\n selection.modify(\"move\", \"forward\", boundary);\n }\n while (selection.getRangeAt(0).compareBoundaryPoints(Range.END_TO_END, originalRange) > -1) {\n currentRange = selection.getRangeAt(0);\n Object.assign(resultRange, {\n endContainer: currentRange.endContainer,\n endOffset: currentRange.endOffset,\n });\n selection.modify(\"move\", \"backward\", boundary);\n }\n\n selection.removeAllRanges();\n const range = new Range();\n\n range.setStart(resultRange.startContainer, resultRange.startOffset);\n range.setEnd(resultRange.endContainer, resultRange.endOffset);\n selection.addRange(range);\n trimSelection(selection);\n return selection;\n};\n\nconst closestBoundarySelection = (selection, boundary) => {\n const { range: originalRange, startOffset, startContainer, endOffset, endContainer } = destructSelection(selection);\n\n const resultRange = {};\n let currentRange;\n\n // It's easier to operate the selection when it's collapsed\n selection.collapse(startContainer, startOffset);\n selection.modify(\"move\", \"forward\", \"character\");\n selection.modify(\"move\", \"backward\", boundary);\n if (selection.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START, originalRange) === 1) {\n selection.collapse(startContainer, startOffset);\n selection.modify(\"move\", \"backward\", boundary);\n }\n currentRange = selection.getRangeAt(0);\n Object.assign(resultRange, {\n startContainer: currentRange.startContainer,\n startOffset: currentRange.startOffset,\n });\n\n selection.collapse(endContainer, endOffset);\n selection.modify(\"move\", \"backward\", \"character\");\n selection.modify(\"move\", \"forward\", boundary);\n if (selection.getRangeAt(0).compareBoundaryPoints(Range.START_TO_START, originalRange) === -1) {\n selection.collapse(endContainer, endOffset);\n selection.modify(\"move\", \"forward\", boundary);\n }\n currentRange = selection.getRangeAt(0);\n Object.assign(resultRange, {\n endContainer: currentRange.endContainer,\n endOffset: currentRange.endOffset,\n });\n\n selection.removeAllRanges();\n const range = new Range();\n\n range.setStart(resultRange.startContainer, resultRange.startOffset);\n range.setEnd(resultRange.endContainer, resultRange.endOffset);\n selection.addRange(range);\n\n return selection;\n};\n\nconst boundarySelection = (selection, boundary) => {\n const wordBoundary = boundary !== \"symbol\";\n const { startOffset, startContainer, endOffset, endContainer, firstSymbol, prevSymbol, lastSymbol, nextSymbol } =\n destructSelection(selection);\n\n if (wordBoundary) {\n if (boundary.endsWith(\"boundary\")) {\n closestBoundarySelection(selection, boundary);\n } else {\n findBoundarySelection(selection, boundary);\n }\n } else {\n if (!isText(firstSymbol) || isText(prevSymbol)) {\n const newRange = selection.getRangeAt(0);\n\n newRange.setEnd(startContainer, startOffset);\n selection.modify(\"move\", \"backward\", boundary);\n }\n\n if (!isText(lastSymbol) || isText(nextSymbol)) {\n const newRange = selection.getRangeAt(0);\n\n newRange.setEnd(endContainer, endOffset);\n selection.modify(\"extend\", \"forward\", boundary);\n }\n }\n};\n\n/**\n * Captures current selection\n * @param {(response: {selectionText: string, range: Range}) => void} callback\n */\nexport const captureSelection = (\n callback,\n { granularity, beforeCleanup, window } = {\n granularity: \"symbol\",\n },\n) => {\n const selection = window.getSelection();\n\n if (selection.isCollapsed) return;\n if (granularity !== \"symbol\") {\n trimSelection(selection);\n }\n\n if (selection.isCollapsed) return;\n\n applyTextGranularity(selection, granularity);\n\n const selectionText = selection.toString().replace(/[\\n\\r]/g, \"\\\\n\");\n\n for (let i = 0; i < selection.rangeCount; i++) {\n const range = fixRange(selection.getRangeAt(i));\n\n callback({ selectionText, range });\n }\n\n // eslint-disable-next-line no-unused-expressions\n beforeCleanup?.();\n\n selection.removeAllRanges();\n};\n\n/**\n * *Experimental feature. Might nor work in Gecko browsers.*\n *\n * Updates selection's granularity.\n * @param {Selection} selection\n * @param {string} granularity\n */\nconst applyTextGranularity = (selection, granularity) => {\n if (!selection.modify || !granularity || granularity === \"symbol\") return;\n\n try {\n switch (granularity) {\n case \"word\":\n boundarySelection(selection, \"word\");\n break;\n case \"sentence\":\n boundarySelection(selection, \"sentenceboundary\");\n break;\n case \"paragraph\":\n boundarySelection(selection, \"paragraphboundary\");\n break;\n default:\n // Handles \"charater\", \"symbol\", and any other unspecified granularities\n break;\n }\n } catch {\n console.warn(\"Probably, you're using browser that doesn't support granularity.\");\n }\n};\n\n/**\n * Lookup closest text node\n * @param {HTMLElement} commonContainer\n * @param {HTMLElement} node\n * @param {number} offset\n * @param {string} direction forward, backward, forward-next, backward-next\n * \"-next\" when we need to skip node if it's a text node\n */\nconst textNodeLookup = (commonContainer, node, offset, direction = \"forward\") => {\n const startNode = node === commonContainer ? node.childNodes[offset] : node;\n\n if (isTextNode(startNode) && !direction.endsWith(\"next\")) return startNode;\n\n const walker = commonContainer.ownerDocument.createTreeWalker(commonContainer, NodeFilter.SHOW_ALL);\n let currentNode = walker.nextNode();\n // tree walker can't go backward, so we go forward to startNode and record every text node\n // to find the last one before startNode\n let lastTextNode;\n\n while (currentNode && currentNode !== startNode) {\n if (isTextNode(currentNode)) lastTextNode = currentNode;\n currentNode = walker.nextNode();\n }\n\n if (currentNode && direction.startsWith(\"backward\")) return lastTextNode;\n\n if (direction === \"forward-next\") currentNode = walker.nextNode();\n\n while (currentNode) {\n if (isTextNode(currentNode)) return currentNode;\n currentNode = walker.nextNode();\n }\n};\n\n/**\n * Fix range if it contains non-text nodes and shrink it down to the better fit.\n * The main goal here is to get the most relevant xpath+offset combination.\n * i.e. `start` should point to the element, containing first char, not parent,\n * not root, not some previous element with `startOffset` on the last char.\n * @param {Range} range\n */\nconst fixRange = (range) => {\n const { endOffset, commonAncestorContainer: commonContainer } = range;\n let { startOffset, startContainer, endContainer } = range;\n\n if (!isTextNode(startContainer)) {\n startContainer = textNodeLookup(commonContainer, startContainer, startOffset, \"forward\");\n if (!startContainer) return null;\n range.setStart(startContainer, 0);\n startOffset = 0;\n }\n\n // if user started selection from the end of the tag, start could be this tag,\n // so we should move it to more relevant one\n const selectionFromTheEnd = startContainer.wholeText.length === startOffset;\n // we skip ephemeral whitespace-only text nodes, like \\n between tags in original html\n const isBasicallyEmpty = (textNode) => /^\\s*$/.test(textNode.wholeText);\n\n if (selectionFromTheEnd || isBasicallyEmpty(startContainer)) {\n do {\n startContainer = textNodeLookup(commonContainer, startContainer, startOffset, \"forward-next\");\n if (!startContainer) return null;\n } while (isBasicallyEmpty(startContainer));\n\n range.setStart(startContainer, 0);\n startOffset = 0;\n }\n\n if (!isTextNode(endContainer)) {\n endContainer = textNodeLookup(commonContainer, endContainer, endOffset, \"backward\");\n if (!endContainer) return null;\n\n while (/^\\s*$/.test(endContainer.wholeText)) {\n endContainer = textNodeLookup(commonContainer, endContainer, endOffset, \"backward-next\");\n if (!endContainer) return null;\n }\n // we skip empty whitespace-only text nodes, so we need the found one to be included\n range.setEnd(endContainer, endContainer.length);\n }\n\n return range;\n};\n\n/**\n * Highlight given Range\n * @param {Range} range\n * @param {{label: string, index?: number, classNames: string[]}} param1\n */\nexport const highlightRange = (range, { index, label, classNames }) => {\n const { startContainer, endContainer, commonAncestorContainer } = range;\n const { startOffset, endOffset } = range;\n const highlights = [];\n\n /**\n * Wrapper with predefined classNames and cssStyles\n * @param {[Node, number, number]} args\n */\n const applyStyledHighlight = (...args) => highlightRangePart(...args, classNames);\n\n // If start and end nodes are equal, we don't need\n // to perform any additional work, just highlighting as is\n if (startContainer === endContainer) {\n highlights.push(applyStyledHighlight(startContainer, startOffset, endOffset));\n } else {\n // When start and end are different we need to find all\n // nodes between as they could contain text nodes\n const nodesToHighlight = findNodesBetween(startContainer, endContainer, commonAncestorContainer);\n\n // All nodes between start and end should be fully highlighted\n nodesToHighlight.forEach((node) => {\n let start = startOffset;\n let end = endOffset;\n\n if (node !== startContainer) start = 0;\n if (node !== endContainer) end = node.length;\n\n highlights.push(applyStyledHighlight(node, start, end));\n });\n }\n\n const lastLabel = highlights[highlights.length - 1];\n\n if (lastLabel) {\n lastLabel.setAttribute(\"data-label\", label ?? \"\");\n lastLabel.setAttribute(\"data-index\", index ? String(index) : \"\");\n }\n\n return highlights;\n};\n\n/**\n * Takes original range and splits it into multiple text\n * nodes highlighting a part of the text, then replaces\n * original text node with highlighted one\n * @param {Node} container\n * @param {number} startOffset\n * @param {number} endOffset\n * @param {object} cssStyles\n * @param {string[]} classNames\n */\nexport const highlightRangePart = (container, startOffset, endOffset, classNames) => {\n let spanHighlight;\n const text = container.textContent;\n const parent = container.parentNode;\n\n /**\n * In case we're inside another region, move the selection outside\n * to maintain proper nesting of highlight nodes\n */\n if (\n startOffset === 0 &&\n container.length === endOffset &&\n parent.classList.contains(classNames[0]) &&\n (!isFF(FF_LSDV_4620_3) || parent.innerText === text)\n ) {\n const placeholder = container.ownerDocument.createElement(\"span\");\n const parentNode = parent.parentNode;\n\n parentNode.replaceChild(placeholder, parent);\n spanHighlight = wrapWithSpan(parent, classNames);\n parentNode.replaceChild(spanHighlight, placeholder);\n } else {\n // Extract text content that matches offsets\n const content = text.substring(startOffset, endOffset);\n // Create text node that will be highlighted\n const highlitedNode = container.ownerDocument.createTextNode(content);\n\n // Split the container in three parts\n const noseNode = container.cloneNode();\n const tailNode = container.cloneNode();\n\n // Add all the text BEFORE selection\n noseNode.textContent = text.substring(0, startOffset);\n tailNode.textContent = text.substring(endOffset, text.length);\n\n // To avoid weird dom mutation we assemble replacement\n // beforehands, it allows to replace original node\n // directly without extra work\n const textFragment = container.ownerDocument.createDocumentFragment();\n\n spanHighlight = wrapWithSpan(highlitedNode, classNames);\n\n if (noseNode.length) textFragment.appendChild(noseNode);\n textFragment.appendChild(spanHighlight);\n if (tailNode.length) textFragment.appendChild(tailNode);\n\n // At this point we have three nodes in the tree\n // one of them is our selected range\n parent.replaceChild(textFragment, container);\n }\n\n return spanHighlight;\n};\n\n/**\n * Wrap text node with stylized span\n * @param {Text} node\n * @param {string[]} classNames\n * @param {object} cssStyles\n * @param {string} [label]\n * @todo all 2 usages of this method don't even get the label\n */\nexport const wrapWithSpan = (node, classNames, label) => {\n const highlight = node.ownerDocument.createElement(\"span\");\n\n highlight.appendChild(node);\n\n applySpanStyles(highlight, { classNames, label });\n\n return highlight;\n};\n\n/**\n * Apply classes and styles to a span. Optionally add or remove label\n * @param {HTMLSpanElement} spanNode\n * @param {{classNames?: string[], index?: number, label?: string}} param1\n */\nexport const applySpanStyles = (spanNode, { classNames, index, label }) => {\n if (classNames) {\n spanNode.className = \"\";\n spanNode.classList.add(...classNames);\n }\n\n // label is array, string or null, so check for length\n if (!label?.length) spanNode.removeAttribute(\"data-label\");\n else spanNode.setAttribute(\"data-label\", label);\n spanNode.setAttribute(\"data-index\", index ? String(index) : \"\");\n};\n\n/**\n * Look up all nodes between given `startNode` and `endNode` including ends\n * @param {Node} startNode\n * @param {Node} endNode\n * @param {Node} root\n */\nexport const findNodesBetween = (startNode, endNode, root) => {\n // Tree walker creates flat representation of DOM\n // it allows to iterate over nodes more efficiently\n // as we don't need to go up and down on a tree\n\n // Also we iterate over Text nodes only natively. That's\n // the only type of nodes we need to highlight.\n // No additional checks, long live TreeWalker :)\n const walker = root.ownerDocument.createTreeWalker(root, NodeFilter.SHOW_ALL);\n\n // Flag indicates that we're somwhere between `startNode` and `endNode`\n let inRange = false;\n\n // Here we collect all nodes between start and end\n // including ends\n const nodes = [];\n let { currentNode } = walker;\n\n while (currentNode) {\n if (currentNode === startNode) inRange = true;\n if (inRange && currentNode.nodeType === Node.TEXT_NODE) nodes.push(currentNode);\n if (inRange && currentNode === endNode) break;\n currentNode = walker.nextNode();\n }\n\n return nodes;\n};\n\n/**\n * Removes given range and restores DOM structure.\n * @param {HTMLSpanElement[]} spans\n */\nexport const removeRange = (spans) => {\n if (!spans) return;\n spans.forEach((hl) => {\n const fragment = hl.ownerDocument.createDocumentFragment();\n const parent = hl.parentNode;\n\n // Fill replacement fragment\n // We need to copy childNodes because otherwise\n // It will be changed during the loop\n Array.from(hl.childNodes).forEach((node) => {\n node.remove();\n fragment.appendChild(node);\n });\n\n // Put back all text without spans\n parent.replaceChild(fragment, hl);\n\n // Join back all text nodes\n Array.from(parent.childNodes).forEach((node) => {\n const prev = node.previousSibling;\n\n if (!isTextNode(prev) || !isTextNode(node)) return;\n\n prev.data += node.data;\n node.remove();\n });\n });\n};\n\n/**\n * Find a startContainer and endContainer by text offsets\n * @param {number} start\n * @param {number} end\n * @param {Node} root\n */\nexport const findRange = (start, end, root) => {\n return {\n startContainer: codePointsToChars(findOnPosition(root, start, \"right\")),\n endContainer: codePointsToChars(findOnPosition(root, end, \"left\")),\n };\n};\n\nexport const findRangeNative = (start, end, root) => {\n const { startContainer, endContainer } = findRange(start, end, root);\n\n const range = (root.contentDocument ?? root.ownerDocument).createRange();\n\n if (!startContainer || !endContainer) return;\n\n range.setStart(startContainer.node, startContainer.position);\n range.setEnd(endContainer.node, endContainer.position);\n\n return range;\n};\n\n/**\n * Convert position in node from code points count to chars count\n * May be useful to do some string operations and then convert it back\n * @param {{ node: Node, position: number }} container\n * @return {{ node: Node, position: number }}\n */\nexport const codePointsToChars = ({ node, position } = {}) => {\n if (!node) return;\n\n const codePoints = [...node.textContent].slice(0, position);\n const chars = codePoints.join(\"\").length;\n\n return { node, position: chars };\n};\n\n/**\n * Fix position in node from chars count to code points count\n * In python and other modern tools complex unicode symbols handled as code points, not UTF chars\n * So for external usage js length should be converted to code points count\n * string to array conversion splits string into code points array, that's the easiest way\n * @param {{ node: Node, position: number }} container\n * @return {{ node: Node, position: number }}\n */\nexport const charsToCodePoints = ({ node, position }) => {\n const chars = node.textContent.substr(0, position);\n const codePoints = [...chars].length;\n\n return { node, position: codePoints };\n};\n\n/**\n * Fix Range start/end offsets to code points count instead of chars count\n * Alters given range\n * @param {Range} range\n * @return {Range} the same range\n */\nexport const fixCodePointsInRange = (range) => {\n const start = charsToCodePoints({ node: range.startContainer, position: range.startOffset });\n const end = charsToCodePoints({ node: range.endContainer, position: range.endOffset });\n\n range.setStart(range.startContainer, start.position);\n range.setEnd(range.endContainer, end.position);\n\n return range;\n};\n\n/**\n * Find a node by text offset\n * @param {Node} root\n * @param {number} position\n */\nexport const findOnPosition = (root, position, borderSide = \"left\") => {\n const walker = (root.contentDocument ?? root.ownerDocument).createTreeWalker(root, NodeFilter.SHOW_ALL);\n\n let lastPosition = 0;\n let currentNode = walker.nextNode();\n let nextNode = walker.nextNode();\n // set to finish on the next text\n let finishHere = false;\n\n while (currentNode) {\n const isText = currentNode.nodeType === Node.TEXT_NODE;\n const isBR = currentNode.nodeName === \"BR\";\n\n if (isBR) {\n lastPosition++;\n }\n\n if (isText && finishHere) {\n return { node: currentNode, position: 0 };\n }\n\n if (isText) {\n // convert chars count to code points count, see `charsToCodePoints`\n const length = [...currentNode.textContent].length;\n\n if (length + lastPosition >= position || !nextNode) {\n if (borderSide === \"right\" && length + lastPosition === position && nextNode) {\n finishHere = true;\n } else {\n return { node: currentNode, position: isBR ? 0 : clamp(position - lastPosition, 0, length) };\n }\n }\n lastPosition += length;\n }\n\n currentNode = nextNode;\n nextNode = walker.nextNode();\n }\n};\n\n/**\n * Convert Range to global offsets relative to a root\n * @param {Range} range\n * @param {Node} root\n */\nexport const rangeToGlobalOffset = (range, root) => {\n const globalOffsets = [\n findGlobalOffset(range.startContainer, range.startOffset, root),\n findGlobalOffset(range.endContainer, range.endOffset, root),\n ];\n\n return globalOffsets;\n};\n\n/**\n * Find text offset for given node and position relative to a root\n * @param {Node} node\n * @param {Number} position\n * @param {Node} root\n */\nconst findGlobalOffset = (node, position, root) => {\n const walker = (root.contentDocument ?? root.ownerDocument).createTreeWalker(root, NodeFilter.SHOW_ALL);\n\n let globalPosition = 0;\n let nodeReached = false;\n let currentNode = walker.nextNode();\n\n while (currentNode) {\n // Indicates that we at or below desired node\n nodeReached = nodeReached || node === currentNode;\n const atTargetNode = node === currentNode || currentNode.contains(node);\n const isText = currentNode.nodeType === Node.TEXT_NODE;\n const isBR = currentNode.nodeName === \"BR\";\n\n // Stop iteration\n // Break if we passed target node and current node\n // is not target, nor child of a target\n if (nodeReached && atTargetNode === false) {\n break;\n }\n\n if (isText || isBR) {\n let length = isDefined(currentNode.length) ? [...currentNode.textContent].length : 1;\n\n if (atTargetNode) {\n length = Math.min(position, length);\n }\n\n globalPosition += length;\n }\n\n currentNode = walker.nextNode();\n }\n\n return globalPosition;\n};\n\nexport const isSelectionContainsSpan = (spanNode) => {\n const selection = window.getSelection();\n const spanRange = document.createRange();\n const textNode = spanNode.childNodes[0];\n\n spanRange.setStart(textNode, 0);\n spanRange.setEnd(textNode, textNode.length);\n for (let i = selection.rangeCount; i--; ) {\n const selRange = selection.getRangeAt(i);\n\n if (\n selRange.compareBoundaryPoints(Range.START_TO_START, spanRange) < 1 &&\n selRange.compareBoundaryPoints(Range.END_TO_END, spanRange) > -1\n )\n return true;\n }\n return false;\n};\n","/**\n * Parses a string of inline styles into a JavaScript object with casing for React\n *\n * @see TemplateEngine via MIT Licensed https://github.com/NervJS/taro/blob/master/packages/taro-components-rn/src/utils/index.ts\n *\n * @param {string} styles\n * @returns {Object}\n */\nexport function styleToProp(styles) {\n if (!styles) return null;\n return styles\n .split(\";\")\n .filter((style) => style.split(\":\")[0] && style.split(\":\")[1])\n .map((style) => [\n style\n .split(\":\")[0]\n .trim()\n .replace(/-./g, (c) => c.substr(1).toUpperCase()),\n style.split(\":\").slice(1).join(\":\").trim(),\n ])\n .reduce(\n (styleObj, style) => ({\n ...styleObj,\n [style[0]]: style[1],\n }),\n {},\n );\n}\n\nexport function asVars(obj) {\n if (!obj) return null;\n return Object.entries(obj).reduce((vars, [key, val]) => {\n vars[`--${key}`] = val;\n return vars;\n }, {});\n}\n","import * as Checkers from \"./utilities\";\nimport * as Colors from \"./colors\";\nimport * as Magicwand from \"./magic-wand\";\nimport * as Image from \"./image\";\nimport * as UDate from \"./date\";\nimport * as HTML from \"./html\";\nimport * as Selection from \"./selection-tools\";\nimport { debounce } from \"./debounce\";\nimport { guidGenerator } from \"./unique\";\nimport { styleToProp } from \"./styles\";\n\nexport default {\n Image,\n HTML,\n Checkers,\n Colors,\n UDate,\n guidGenerator,\n debounce,\n styleToProp,\n Magicwand,\n Selection,\n};\n","import { types } from \"mobx-state-tree\";\nimport { AudioModel } from \"../../tags/object/AudioNext\";\nimport Utils from \"../../utils\";\nimport Constants from \"../../core/Constants\";\n\nexport const AudioUltraRegionModel = types\n .model(\"AudioUltraRegionModel\", {\n type: \"audioregion\",\n object: types.late(() => types.reference(AudioModel)),\n\n start: types.number,\n end: types.number,\n channel: types.optional(types.number, 0),\n\n selectedregionbg: types.optional(types.string, \"rgba(0, 0, 0, 0.5)\"),\n })\n .volatile(() => ({\n hideable: true,\n }))\n .views((self) => ({\n wsRegionOptions() {\n const reg = {\n id: self.id,\n start: self.start,\n end: self.end,\n color: self.getColor(),\n visible: !self.hidden,\n updateable: !self.readonly,\n deletable: !self.readonly,\n channel: self.channel ?? 0,\n };\n\n return reg;\n },\n }))\n .actions((self) => {\n /**\n * @returns {AudioRegionResult}\n */\n const Super = {\n setProperty: self.setProperty,\n setLocked: self.setLocked,\n };\n\n return {\n serialize() {\n const res = {\n original_length: self.object._ws?.duration,\n value: {\n start: self.start,\n end: self.end,\n channel: self.channel,\n },\n };\n\n return res;\n },\n\n getColor(alpha = 1) {\n return Utils.Colors.convertToRGBA(self.getOneColor(), alpha);\n },\n\n updateColor(alpha = 1) {\n const color = self.getColor(alpha);\n\n self._ws_region?.updateColor(color);\n },\n\n updatePosition(start, end) {\n self._ws_region?.updatePosition(start ?? self.start, end ?? self.end);\n },\n\n /**\n * Select audio region\n */\n selectRegion() {\n if (!self._ws_region) return;\n self._ws_region.handleSelected(true);\n self._ws_region.bringToFront();\n self._ws_region.scrollToRegion();\n },\n\n deleteRegion() {\n self.annotation.deleteRegion(self);\n },\n\n /**\n * Unselect audio region\n */\n afterUnselectRegion() {\n if (!self._ws_region) return;\n self._ws_region.handleSelected(false);\n },\n\n setHighlight(val) {\n self._highlighted = val;\n\n if (!self._ws_region) return;\n self._ws_region.handleHighlighted(val);\n },\n\n beforeDestroy() {\n if (self._ws_region) self._ws_region.remove();\n },\n\n setLocked(locked) {\n Super.setLocked(locked);\n\n if (self._ws_region) self._ws_region.setLocked(self.locked);\n },\n\n onMouseOver() {\n if (self.annotation.isLinkingMode) {\n self.setHighlight(true);\n self._ws_region.switchCursor(Constants.LINKING_MODE_CURSOR);\n }\n },\n\n onMouseLeave() {\n if (self.annotation.isLinkingMode) {\n self.setHighlight(false);\n self._ws_region.switchCursor(Constants.MOVE_CURSOR);\n }\n },\n\n onUpdateEnd() {\n self.start = self._ws_region.start;\n self.end = self._ws_region.end;\n self.notifyDrawingFinished();\n },\n\n toggleHidden(e) {\n e?.stopPropagation();\n self.hidden = !self.hidden;\n\n if (!self._ws_region) return;\n self._ws_region.setVisibility(!self.hidden);\n },\n\n setProperty(propName, value) {\n Super.setProperty(propName, value);\n if ([\"start\", \"end\"].includes(propName)) {\n self.updatePosition();\n }\n },\n };\n });\n","import { getRoot, types } from \"mobx-state-tree\";\nimport { AudioModel } from \"../../tags/object/AudioNext\";\nimport Utils from \"../../utils\";\nimport Constants from \"../../core/Constants\";\n\nexport const AudioRegionModel = types\n .model(\"AudioRegionModel\", {\n type: \"audioregion\",\n object: types.late(() => types.reference(AudioModel)),\n\n start: types.number,\n end: types.number,\n channel: types.optional(types.number, 0),\n\n selectedregionbg: types.optional(types.string, \"rgba(0, 0, 0, 0.5)\"),\n })\n .volatile(() => ({\n hideable: true,\n }))\n .views((self) => ({\n getRegionElement() {\n return self.wsRegionElement(self._ws_region);\n },\n\n wsRegionElement(wsRegion) {\n if (!wsRegion) return null;\n\n const elID = wsRegion.id;\n const el = document.querySelector(`[data-id=\"${elID}\"]`);\n\n return el;\n },\n\n get wsRegionOptions() {\n const reg = {\n id: self.id,\n start: self.start,\n end: self.end,\n channel: self.channel,\n color: \"orange\",\n };\n\n if (self.readonly) {\n reg.drag = false;\n reg.resize = false;\n }\n return reg;\n },\n }))\n .actions((self) => ({\n /**\n * @returns {AudioRegionResult}\n */\n serialize() {\n const res = {\n original_length: self.object._ws?.getDuration(),\n value: {\n start: self.start,\n end: self.end,\n channel: self.channel,\n },\n };\n\n return res;\n },\n\n updateColor(alpha = 1) {\n const color = Utils.Colors.convertToRGBA(self.getOneColor(), alpha);\n // eslint-disable-next-line no-unused-expressions\n\n try {\n self._ws_region?.update({ color });\n } catch {\n /**\n * Sometimes this method is called too soon in the new UI so it fails.\n * Will be good on the next execution\n * */\n }\n },\n\n updateAppearenceFromState() {\n if (self._ws_region?.update) {\n self._ws_region.start = self.start;\n self._ws_region.end = self.end;\n self.applyCSSClass(self._ws_region);\n }\n },\n\n applyCSSClass(wsRegion) {\n self.updateColor(0.3);\n\n const settings = getRoot(self).settings;\n const el = self.wsRegionElement(wsRegion);\n\n if (!el) return;\n\n const lastClassList = el.className.split(\" \");\n\n for (const obj in lastClassList) {\n if (lastClassList[obj].indexOf(\"htx-label\") >= 0) {\n lastClassList.splice(obj, 1);\n }\n }\n\n const classes = [...new Set([...lastClassList, \"htx-highlight\", \"htx-highlight-last\"])];\n\n if (!self.parent.showlabels && !settings.showLabels) {\n classes.push(\"htx-no-label\");\n } else {\n const cssCls = Utils.HTML.labelWithCSS(el, {\n labels: self.labeling?.mainValue,\n score: self.score,\n });\n\n classes.push(cssCls);\n }\n\n el.className = classes.filter(Boolean).join(\" \");\n },\n\n /**\n * Select audio region\n */\n selectRegion() {\n self.updateColor(0.8);\n\n const el = self.wsRegionElement(self._ws_region);\n\n if (el) {\n // scroll object tag but don't scroll the document\n const container = window.document.scrollingElement;\n const top = container.scrollTop;\n const left = container.scrollLeft;\n\n el.scrollIntoViewIfNeeded ? el.scrollIntoViewIfNeeded() : el.scrollIntoView();\n window.document.scrollingElement.scrollTo(left, top);\n }\n },\n\n /**\n * Unselect audio region\n */\n afterUnselectRegion() {\n self.updateColor(0.3);\n },\n\n setHighlight(val) {\n self._highlighted = val;\n\n if (!self._ws_region) return;\n\n if (val) {\n self.updateColor(0.8);\n self._ws_region.element.style.border = Constants.HIGHLIGHTED_CSS_BORDER;\n } else {\n self.updateColor(0.3);\n self._ws_region.element.style.border = \"none\";\n }\n },\n\n beforeDestroy() {\n if (self._ws_region) self._ws_region.remove();\n },\n\n setLocked(locked) {\n if (locked instanceof Function) {\n self.locked = locked(self.locked);\n } else {\n self.locked = locked;\n }\n\n if (self._ws_region) {\n self._ws_region.drag = !self.locked;\n self._ws_region.resize = !self.locked;\n }\n },\n\n onClick(wavesurfer, ev) {\n // if (! self.editable) return;\n\n if (!self.annotation.isLinkingMode) {\n // Object.values(wavesurfer.regions.list).forEach(r => {\n // // r.update({ color: self.selectedregionbg });\n // });\n\n self._ws_region.update({ color: Utils.Colors.rgbaChangeAlpha(self.selectedregionbg, 0.8) });\n }\n\n self.onClickRegion(ev);\n },\n\n onMouseOver() {\n if (self.annotation.isLinkingMode) {\n self.setHighlight(true);\n self._ws_region.element.style.cursor = Constants.LINKING_MODE_CURSOR;\n }\n },\n\n onMouseLeave() {\n if (self.annotation.isLinkingMode) {\n self.setHighlight(false);\n self._ws_region.element.style.cursor = Constants.MOVE_CURSOR;\n }\n },\n\n onUpdateEnd() {\n self.start = self._ws_region.start;\n self.end = self._ws_region.end;\n self.channel = self._ws_region.channelIdx ?? 0;\n self.updateColor(self.selected ? 0.8 : 0.3);\n self.notifyDrawingFinished();\n },\n\n toggleHidden(e) {\n self.hidden = !self.hidden;\n self._ws_region.element.style.display = self.hidden ? \"none\" : \"block\";\n e?.stopPropagation();\n },\n }));\n","import { types } from \"mobx-state-tree\";\n\nexport const EditableRegion = types\n .model(\"EditableRegion\")\n .volatile(() => ({\n editorEnabled: true,\n /**\n * Adding properties to the editableFields array on the\n * target model will make them editable in the details panel.\n */\n editableFields: [\n // { property: \"x\", label: \"X\" },\n ],\n }))\n .views((self) => ({\n getProperty(name) {\n return self[name];\n },\n\n isPropertyEditable(name) {\n return self.editableFields.some((f) => f.property === name);\n },\n\n get hasEditableFields() {\n return self.editableFields.length > 0;\n },\n }))\n .actions((self) => ({\n setProperty(propName, value) {\n if (self.isPropertyEditable(propName)) {\n self[propName] = value;\n } else {\n throw new Error(`Property ${propName} of model ${self.type} is not editable`);\n }\n },\n }));\n","import { types } from \"mobx-state-tree\";\n\nimport NormalizationMixin from \"../mixins/Normalization\";\nimport RegionsMixin from \"../mixins/Regions\";\nimport { AreaMixin } from \"../mixins/AreaMixin\";\nimport Registry from \"../core/Registry\";\nimport { FF_DEV_2715, isFF } from \"../utils/feature-flags\";\n\nimport { AudioUltraRegionModel as _audioUltraRegionModel } from \"./AudioRegion/AudioUltraRegionModel\";\nimport { AudioRegionModel as _audioRegionModel } from \"./AudioRegion/AudioRegionModel\";\nimport { EditableRegion } from \"./EditableRegion\";\n\n// this type is used in auto-generated documentation\n/**\n * @example\n * {\n * \"original_length\": 18,\n * \"value\": {\n * \"start\": 3.1,\n * \"end\": 8.2,\n * \"channel\": 0,\n * \"labels\": [\"Voice\"]\n * }\n * }\n * @typedef {Object} AudioRegionResult\n * @property {number} original_length length of the original audio (seconds)\n * @property {Object} value\n * @property {number} value.start start time of the fragment (seconds)\n * @property {number} value.end end time of the fragment (seconds)\n * @property {number} value.channel channel identifier which was targeted\n */\n\nconst EditableAudioModel = types.model(\"EditableAudioModel\", {}).volatile(() => ({\n editableFields: [\n { property: \"start\", label: \"Start\" },\n { property: \"end\", label: \"End\" },\n ],\n}));\n\nconst AudioRegionModel = types.compose(\n \"AudioRegionModel\",\n RegionsMixin,\n AreaMixin,\n NormalizationMixin,\n EditableRegion,\n EditableAudioModel,\n _audioRegionModel,\n);\n\nconst AudioUltraRegionModel = types.compose(\n \"AudioRegionModel\",\n RegionsMixin,\n AreaMixin,\n NormalizationMixin,\n EditableRegion,\n EditableAudioModel,\n _audioUltraRegionModel,\n);\n\nlet _exportAudioRegion = AudioRegionModel;\n\nif (isFF(FF_DEV_2715)) {\n _exportAudioRegion = AudioUltraRegionModel;\n}\n\nRegistry.addRegionType(_exportAudioRegion, \"audioplus\");\nRegistry.addRegionType(_exportAudioRegion, \"audio\");\n\nexport { _exportAudioRegion as AudioRegionModel };\n","import { Modal } from \"antd\";\n\nconst wrapper = (_type, value, title) => {\n const custom = {\n type: \"\",\n title: \"\",\n };\n\n switch (_type) {\n case \"error\":\n custom.type = Modal.error;\n custom.title = \"Error\";\n break;\n case \"warning\":\n custom.type = Modal.warning;\n custom.title = \"Warning\";\n break;\n case \"success\":\n custom.type = Modal.success;\n custom.title = \"Success\";\n break;\n default:\n custom.type = Modal.info;\n custom.title = \"Info\";\n }\n\n return custom.type({\n title: title ? title : custom.title,\n content: value,\n });\n};\n\n/**\n * Success modal\n * @param {string} value\n * @param {string} title\n */\nconst error = (value, title) => {\n return wrapper(\"error\", value, title);\n};\n\n/**\n * Warning modal\n * @param {string} value\n * @param {string} title\n */\nconst warning = (value, title) => {\n return wrapper(\"warning\", value, title);\n};\n\n/**\n * Success modal\n * @param {string} value\n * @param {string} title\n */\nconst success = (value, title) => {\n return wrapper(\"success\", value, title);\n};\n\n/**\n * Information modal\n * @param {string} value\n * @param {string} title\n */\nconst info = (value, title) => {\n return wrapper(\"info\", value, title);\n};\n\nexport default { error, warning, success, info };\n","import { types } from \"mobx-state-tree\";\n\nconst BaseTag = types.model(\"BaseTag\");\n\nexport { BaseTag };\n","import { types } from \"mobx-state-tree\";\nimport isMatch from \"lodash.ismatch\";\nimport InfoModal from \"../../components/Infomodal/Infomodal\";\nimport { AnnotationMixin } from \"../../mixins/AnnotationMixin\";\nimport { FF_DEV_3391, FF_DEV_3666, isFF } from \"../../utils/feature-flags\";\nimport { BaseTag } from \"../TagBase\";\n\nconst ObjectBase = types\n .model({\n ...(isFF(FF_DEV_3391)\n ? {\n id: types.identifier,\n name: types.string,\n }\n : {\n name: types.identifier,\n }),\n // TODO there should be a better way to force an update\n _needsUpdate: types.optional(types.number, 0),\n })\n .volatile(() => ({\n isObjectTag: true,\n supportSuggestions: false,\n }))\n .views((self) => ({\n /**\n * A list of all related regions\n * it is using for validation purposes\n */\n get allRegs() {\n return self.annotation?.regionStore.regions.filter((r) => r.object === self) || [];\n },\n /**\n * A list of regions related to the current object state\n * (it could be overridden)\n */\n get regs() {\n return self.allRegs;\n },\n findRegion(params) {\n let obj = null;\n\n if (self._regionsCache && self._regionsCache.length) {\n obj = self._regionsCache.find(({ region }) => isMatch(region, params));\n }\n\n return obj || self.regions.find((r) => isMatch(r, params));\n },\n get isReady() {\n return true;\n },\n }))\n .actions((self) => {\n const props = {};\n\n function addProp(name, value) {\n props[name] = value;\n self._needsUpdate = self._needsUpdate + 1;\n }\n\n function getProps() {\n return props;\n }\n\n // @todo maybe not a best place for this method?\n // check that maxUsages was not exceeded for labels\n // and if it was - don't allow to create new region and unselect all regions\n // unselect labels which was exceeded maxUsages\n // return all states left untouched - available labels and others\n function getAvailableStates() {\n // `checkMaxUsages` may unselect labels with already reached `maxUsages`\n const checkAndCollect = (list, s) => (s.checkMaxUsages ? list.concat(s.checkMaxUsages()) : list);\n const allStates = self.states() || [];\n let exceeded;\n\n if (isFF(FF_DEV_3666)) {\n exceeded = allStates.reduce(checkAndCollect, []).filter((e) => e.selected);\n exceeded.forEach((e) => e.setSelected(false));\n } else {\n exceeded = allStates.reduce(checkAndCollect, []);\n }\n\n const states = self.activeStates() || [];\n\n if (states.length === 0) {\n if (exceeded.length) {\n const label = exceeded[0];\n\n InfoModal.warning(`You can't use ${label.value} more than ${label.maxUsages} time(s)`);\n }\n self.annotation.unselectAll();\n }\n return states;\n }\n\n return {\n addProp,\n getProps,\n getAvailableStates,\n };\n });\n\nexport default types.compose(ObjectBase, BaseTag, AnnotationMixin);\n","export const WS_ZOOM_X = {\n min: 1,\n max: 1500,\n step: 10,\n default: 1,\n};\n\nexport const WS_SPEED = {\n min: 0.5,\n max: 2,\n step: 0.01,\n default: 1,\n};\n\nexport const WS_VOLUME = {\n min: 0,\n max: 1,\n step: 0.01,\n default: 1,\n};\n","import { getRoot, getType, types } from \"mobx-state-tree\";\nimport { customTypes } from \"../../../core/CustomTypes\";\nimport { guidGenerator } from \"../../../core/Helpers.ts\";\nimport { AnnotationMixin } from \"../../../mixins/AnnotationMixin\";\nimport IsReadyMixin from \"../../../mixins/IsReadyMixin\";\nimport ProcessAttrsMixin from \"../../../mixins/ProcessAttrs\";\nimport { SyncableMixin } from \"../../../mixins/Syncable\";\nimport { AudioRegionModel } from \"../../../regions/AudioRegion\";\nimport Utils from \"../../../utils\";\nimport { isDefined } from \"../../../utils/utilities\";\nimport ObjectBase from \"../Base\";\nimport { WS_SPEED, WS_VOLUME, WS_ZOOM_X } from \"./constants\";\n\n/**\n * The Audio tag plays audio and shows its waveform. Use for audio annotation tasks where you want to label regions of audio, see the waveform, and manipulate audio during annotation.\n *\n * Use with the following data types: audio\n * @example\n * \n * \n * \n * \n * \n * \n * @meta_title Audio Tag for Audio Labeling\n * @meta_description Customize Label Studio with the Audio tag for advanced audio annotation tasks for machine learning and data science projects.\n * @param {string} name - Name of the element\n * @param {string} value - Data field containing path or a URL to the audio\n * @param {boolean=} [volume=false] - Whether to show a volume slider (from 0 to 1)\n * @param {string} [defaultvolume=1] - Default volume level (from 0 to 1)\n * @param {boolean} [speed=false] - Whether to show a speed slider (from 0.5 to 3)\n * @param {string} [defaultspeed=1] - Default speed level (from 0.5 to 2)\n * @param {boolean} [zoom=true] - Whether to show the zoom slider\n * @param {string} [defaultzoom=1] - Default zoom level (from 1 to 1500)\n * @param {string} [hotkey] - Hotkey used to play or pause audio\n * @param {string} [sync] object name to sync with\n * @param {string} [cursorwidth=1] - Audio pane cursor width. it's Measured in pixels.\n * @param {string} [cursorcolor=#333] - Audio pane cursor color. Color should be specify in hex decimal string\n * @param {string} [defaultscale=1] - Audio pane default y-scale for waveform\n * @param {boolean} [autocenter=true] – Always place cursor in the middle of the view\n * @param {boolean} [scrollparent=true] – Wave scroll smoothly follows the cursor\n */\nconst TagAttrs = types.model({\n value: types.maybeNull(types.string),\n muted: types.optional(types.boolean, false),\n zoom: types.optional(types.boolean, true),\n defaultzoom: types.optional(types.string, WS_ZOOM_X.default.toString()),\n volume: types.optional(types.boolean, true),\n defaultvolume: types.optional(types.string, WS_VOLUME.default.toString()),\n speed: types.optional(types.boolean, true),\n defaultspeed: types.optional(types.string, WS_SPEED.default.toString()),\n hotkey: types.maybeNull(types.string),\n showlabels: types.optional(types.boolean, false),\n showscores: types.optional(types.boolean, false),\n height: types.optional(types.string, \"88\"),\n cursorwidth: types.optional(types.string, \"2\"),\n cursorcolor: types.optional(customTypes.color, \"#333\"),\n defaultscale: types.optional(types.string, \"1\"),\n autocenter: types.optional(types.boolean, true),\n scrollparent: types.optional(types.boolean, true),\n});\n\nexport const AudioModel = types.compose(\n \"AudioModel\",\n TagAttrs,\n SyncableMixin,\n ProcessAttrsMixin,\n ObjectBase,\n AnnotationMixin,\n IsReadyMixin,\n types\n .model(\"AudioModel\", {\n type: \"audio\",\n _value: types.optional(types.string, \"\"),\n\n playing: types.optional(types.boolean, false),\n regions: types.array(AudioRegionModel),\n })\n .volatile(() => ({\n errors: [],\n }))\n .views((self) => ({\n get hasStates() {\n const states = self.states();\n\n return states && states.length > 0;\n },\n\n get store() {\n return getRoot(self);\n },\n\n states() {\n return self.annotation.toNames.get(self.name);\n },\n\n activeStates() {\n const states = self.states();\n\n return states && states.filter((s) => getType(s).name === \"LabelsModel\" && s.isSelected);\n },\n }))\n ////// Sync actions\n .actions((self) => ({\n ////// Outgoing\n triggerSync(event, data) {\n if (!self._ws) return;\n\n self.syncSend(\n {\n playing: self._ws.isPlaying(),\n time: self._ws.getCurrentTime(),\n speed: self._ws.rate ?? 1,\n ...data,\n },\n event,\n );\n },\n\n triggerSyncPlay() {\n self.triggerSync(\"play\");\n },\n\n triggerSyncPause() {\n self.triggerSync(\"pause\");\n },\n\n ////// Incoming\n handleSyncPlay(data) {\n if (!self._ws) return;\n self.handleSyncSeek(data);\n if (self._ws.isPlaying()) return;\n\n self._ws?.play();\n },\n\n handleSyncPause(data) {\n if (!self._ws) return;\n self.handleSyncSeek(data);\n if (!self._ws.isPlaying()) return;\n\n self._ws?.pause();\n },\n\n handleSyncSpeed() {},\n\n handleSyncSeek({ time }) {\n try {\n if (self._ws && time !== self._ws.getCurrentTime()) {\n self._ws.setCurrentTime(time);\n }\n } catch (err) {\n console.log(err);\n }\n },\n\n registerSyncHandlers() {\n self.syncHandlers.set(\"play\", self.handleSyncPlay);\n self.syncHandlers.set(\"pause\", self.handleSyncPause);\n self.syncHandlers.set(\"seek\", self.handleSyncSeek);\n self.syncHandlers.set(\"speed\", self.handleSyncSpeed);\n },\n }))\n .actions((self) => ({\n needsUpdate() {\n self.handleNewRegions();\n },\n\n onReady() {\n self.setReady(true);\n },\n\n handleNewRegions() {\n if (!self._ws?.isReady) return;\n self.regs.map((reg) => {\n if (reg._ws_region) return;\n self.createWsRegion(reg);\n });\n },\n\n onHotKey(e) {\n e && e.preventDefault();\n self._ws.playPause();\n return false;\n },\n\n setRangeValue(val) {\n self.rangeValue = val;\n },\n\n setPlaybackRate(val) {\n self.playBackRate = val;\n },\n\n createRegion(wsRegion, states) {\n let bgColor = self.selectedregionbg;\n const st = states.find((s) => s.type === \"labels\");\n\n if (st) bgColor = Utils.Colors.convertToRGBA(st.getSelectedColor(), 0.3);\n\n const r = AudioRegionModel.create({\n id: wsRegion.id ? wsRegion.id : guidGenerator(),\n pid: wsRegion.pid ? wsRegion.pid : guidGenerator(),\n parentID: wsRegion.parent_id === null ? \"\" : wsRegion.parent_id,\n start: wsRegion.start,\n end: wsRegion.end,\n score: wsRegion.score,\n readonly: wsRegion.readonly,\n regionbg: self.regionbg,\n selectedregionbg: bgColor,\n normalization: wsRegion.normalization,\n states,\n });\n\n r._ws_region = wsRegion;\n\n self.regions.push(r);\n self.annotation.addRegion(r);\n\n return r;\n },\n\n selectRange(ev, ws_region) {\n const selectedRegions = self.regs.filter((r) => r.start >= ws_region.start && r.end <= ws_region.end);\n\n ws_region.remove && ws_region.remove();\n if (!selectedRegions.length) return;\n // @todo: needs preventing drawing with ctrl pressed\n // if (ev.ctrlKey || ev.metaKey) {\n // self.annotation.extendSelectionWith(selectedRegions);\n // return;\n // }\n self.annotation.selectAreas(selectedRegions);\n },\n\n addRegion(wsRegion) {\n // area id is assigned to WS region during deserealization\n const find_r = self.annotation.areas.get(wsRegion.id);\n\n if (find_r) {\n find_r.applyCSSClass(wsRegion);\n\n find_r._ws_region = wsRegion;\n return find_r;\n }\n\n const states = self.getAvailableStates();\n\n if (states.length === 0) {\n wsRegion.on(\"update-end\", (ev) => self.selectRange(ev, wsRegion));\n return;\n }\n\n const control = self.activeStates()[0];\n const labels = { [control.valueType]: control.selectedValues() };\n const r = self.annotation.createResult(wsRegion, labels, control, self);\n\n r._ws_region = wsRegion;\n r.updateAppearenceFromState();\n return r;\n },\n\n /**\n * Play and stop\n */\n handlePlay() {\n if (self._ws) {\n self.playing = !self.playing;\n self._ws.isPlaying() ? self.triggerSync(\"play\") : self.triggerSync(\"pause\");\n }\n },\n\n handleSeek() {\n self.triggerSync(\"seek\");\n },\n\n handleSpeed(speed) {\n self.triggerSync(\"speed\", { speed });\n },\n\n createWsRegion(region) {\n const _regionOptions = region.wsRegionOptions;\n\n if (region.annotation.isReadOnly()) {\n _regionOptions.drag = false;\n _regionOptions.resize = false;\n }\n\n const r = self._ws.addRegion(region.wsRegionOptions);\n\n region._ws_region = r;\n region.updateAppearenceFromState();\n },\n\n onLoad(ws) {\n self._ws = ws;\n const history = self.annotation.history;\n\n self.regs.forEach((reg) => {\n self.createWsRegion(reg);\n });\n\n // In cases where we do skipNextUndoState on region creation, we need to make sure\n // that we don't skip the next undo state after it is resolved entirely.\n setTimeout(() => history.setSkipNextUndoState(false), 0);\n },\n\n onError(error) {\n self.errors = [error];\n },\n\n wsCreated(ws) {\n self._ws = ws;\n },\n\n beforeDestroy() {\n try {\n if (isDefined(self._ws)) {\n self._ws.destroy();\n self._ws = null;\n }\n } catch (err) {\n self._ws = null;\n console.warn(\"Already destroyed\");\n }\n },\n })),\n);\n","import { observe } from \"mobx\";\nimport { getEnv, getRoot, getType, types } from \"mobx-state-tree\";\nimport { customTypes } from \"../../../core/CustomTypes\";\nimport { guidGenerator } from \"../../../core/Helpers.ts\";\nimport { AnnotationMixin } from \"../../../mixins/AnnotationMixin\";\nimport IsReadyMixin from \"../../../mixins/IsReadyMixin\";\nimport ProcessAttrsMixin from \"../../../mixins/ProcessAttrs\";\nimport { SyncableMixin } from \"../../../mixins/Syncable\";\nimport { AudioRegionModel } from \"../../../regions/AudioRegion\";\nimport Utils from \"../../../utils\";\nimport { FF_LSDV_E_278, isFF } from \"../../../utils/feature-flags\";\nimport { isDefined } from \"../../../utils/utilities\";\nimport ObjectBase from \"../Base\";\nimport { WS_SPEED, WS_VOLUME, WS_ZOOM_X } from \"./constants\";\n\n/**\n * The Audio tag plays audio and shows its waveform. Use for audio annotation tasks where you want to label regions of audio, see the waveform, and manipulate audio during annotation.\n *\n * Use with the following data types: audio\n * @example\n * \n * \n * \n * @example\n * \n * \n * \n * @example\n * \n * \n * \n * @example\n * \n * \n * \n * @example\n * \n * \n * \n * \n * \n * \n * \n * \n * @name Shortcut\n * @meta_title Shortcut Tag to Define Shortcuts\n * @meta_description Customize Label Studio to define keyboard shortcuts and hotkeys to accelerate labeling for machine learning and data science projects.\n * @param {string} value - The value of the shortcut\n * @param {string} [alias] - Shortcut alias\n * @param {string} [hotkey] - Hotkey\n * @param {string} [background=#333333] - Background color in hexadecimal\n */\nconst TagAttrs = types.model({\n value: types.maybeNull(types.string),\n alias: types.maybeNull(types.string),\n background: types.optional(customTypes.color, \"#333333\"),\n hotkey: types.maybeNull(types.string),\n});\n\nconst Model = types\n .model({\n id: types.optional(types.identifier, guidGenerator),\n type: \"shortcut\",\n _value: types.optional(types.string, \"\"),\n })\n .volatile(() => ({\n hotkeyScope: Hotkey.INPUT_SCOPE,\n }))\n .actions((self) => ({\n onClick() {\n const textarea = getParent(self, 2);\n\n if (textarea.onShortcut) {\n textarea.onShortcut(self.value);\n textarea.returnFocus?.();\n }\n },\n\n onHotKey(event) {\n const textarea = getParent(self, 2);\n const name = (event.target || event.srcElement).name;\n // fired on a wrong element\n\n if (textarea.name !== name && !name.startsWith(`${textarea.name}:`)) return;\n event.preventDefault();\n return self.onClick();\n },\n }));\n\nconst ShortcutModel = types.compose(\"ShortcutModel\", TagAttrs, Model, ProcessAttrsMixin);\n\nconst HtxShortcutView = inject(\"store\")(\n observer(({ item, store }) => {\n const bg = {\n background: chroma(item.background).alpha(0.15),\n color: \"#333333\",\n cursor: \"pointer\",\n margin: \"5px\",\n };\n\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n item.onClick();\n return false;\n }}\n style={bg}\n >\n {item.alias ? item.alias : item._value}\n {store.settings.enableTooltips && store.settings.enableHotkeys && item.hotkey && [{item.hotkey}]}\n \n );\n }),\n);\n\nRegistry.addTag(\"shortcut\", ShortcutModel, HtxShortcutView);\n\nexport { HtxShortcutView, ShortcutModel };\n","// extracted by mini-css-extract-plugin\nexport default {\"taxonomy-search-input\":\"lsf-taxonomy-search-input\"};","import React, {\n type ChangeEvent,\n type KeyboardEvent,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\n\nimport \"./TaxonomySearch.scss\";\nimport { Block } from \"../../utils/bem\";\nimport type { AntTaxonomyItem } from \"./NewTaxonomy\";\nimport { debounce } from \"lodash\";\n\ntype TaxonomySearchProps = {\n treeData: AntTaxonomyItem[];\n onChange: (list: AntTaxonomyItem[], expandedKeys: React.Key[] | null) => void;\n};\n\nexport type TaxonomySearchRef = {\n resetValue: () => void;\n focus: () => void;\n};\n\nconst TaxonomySearch = React.forwardRef(({ treeData, onChange }, ref) => {\n useImperativeHandle(ref, (): TaxonomySearchRef => {\n return {\n resetValue() {\n setInputValue(\"\");\n onChange(treeData, []);\n },\n focus() {\n return inputRef.current?.focus();\n },\n };\n });\n\n const inputRef = useRef();\n const [inputValue, setInputValue] = useState(\"\");\n\n useEffect(() => {\n const _filteredData = filterTreeData(treeData, inputValue);\n\n onChange(_filteredData.filteredDataTree, null);\n }, [treeData]);\n\n // When the treeNode has additional formatting because of `hint` or `color` props,\n // the `treeNode.title` is not a string but a react component,\n // so we have to look for the title in children (1 or 2 levels deep)\n const getTitle = useCallback((treeNodeTitle: any): string => {\n if (typeof treeNodeTitle === \"string\") return treeNodeTitle;\n\n if (typeof treeNodeTitle.props.children === \"object\") return getTitle(treeNodeTitle.props.children);\n\n return treeNodeTitle.props.children;\n }, []);\n\n // To filter the treeData items that match with the searchValue\n const filterTreeNode = useCallback((searchValue: string, treeNode: AntTaxonomyItem) => {\n const lowerSearchValue = String(searchValue).toLowerCase();\n const lowerResultValue = getTitle(treeNode.title);\n\n if (!lowerSearchValue) {\n return false;\n }\n\n return String(lowerResultValue).toLowerCase().includes(lowerSearchValue);\n }, []);\n\n // It's running recursively through treeData and its children filtering the content that match with the search value\n const filterTreeData = useCallback((treeData: AntTaxonomyItem[], searchValue: string) => {\n const _expandedKeys: React.Key[] = [];\n\n if (!searchValue) {\n return {\n filteredDataTree: treeData,\n expandedKeys: _expandedKeys,\n };\n }\n\n const dig = (list: AntTaxonomyItem[], keepAll = false) => {\n return list.reduce((total, dataNode) => {\n const children = dataNode.children;\n\n const match = keepAll || filterTreeNode(searchValue, dataNode);\n const childList = children?.length ? dig(children, match) : undefined;\n\n if (match || childList?.length) {\n if (!keepAll && dataNode.children?.length) _expandedKeys.push(dataNode.key);\n\n total.push({\n ...dataNode,\n isLeaf: !childList?.length,\n children: childList,\n });\n }\n\n return total;\n }, []);\n };\n\n return {\n filteredDataTree: dig(treeData),\n expandedKeys: _expandedKeys,\n };\n }, []);\n\n const handleSearch = useCallback(\n debounce(async (e: ChangeEvent) => {\n const _filteredData = filterTreeData(treeData, e.target.value);\n\n onChange(_filteredData.filteredDataTree, _filteredData.expandedKeys);\n }, 300),\n [treeData],\n );\n\n return (\n ) => {\n setInputValue(e.target.value);\n handleSearch(e);\n }}\n onKeyDown={(e: KeyboardEvent) => {\n // to prevent selected items from being deleted\n if (e.key === \"Backspace\" || e.key === \"Delete\") e.stopPropagation();\n }}\n placeholder={\"Search\"}\n data-testid={\"taxonomy-search\"}\n name={\"taxonomy-search-input\"}\n />\n );\n});\n\nexport { TaxonomySearch };\n","import { TreeSelect } from \"antd\";\nimport type React from \"react\";\nimport { type ReactNode, useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { Tooltip } from \"../../common/Tooltip/Tooltip\";\n\nimport \"./NewTaxonomy.scss\";\nimport { TaxonomySearch, type TaxonomySearchRef } from \"./TaxonomySearch\";\n\nexport type TaxonomyPath = string[];\ntype onAddLabelCallback = (path: string[]) => any;\ntype onDeleteLabelCallback = (path: string[]) => any;\n\nexport type TaxonomyItem = {\n label: string;\n path: TaxonomyPath;\n depth: number;\n isLeaf?: boolean; // only in new async taxonomy\n children?: TaxonomyItem[];\n origin?: \"config\" | \"user\" | \"session\";\n hint?: string;\n color?: string;\n};\n\nexport type AntTaxonomyItem = {\n title: string | JSX.Element;\n value: string;\n key: string;\n isLeaf?: boolean;\n children?: AntTaxonomyItem[];\n disableCheckbox?: boolean;\n};\n\ntype TaxonomyOptions = {\n leafsOnly?: boolean;\n showFullPath?: boolean;\n pathSeparator: string;\n maxUsages?: number;\n maxWidth?: number;\n minWidth?: number;\n dropdownWidth?: number;\n placeholder?: string;\n};\n\nexport type SelectedItem = {\n label: string;\n value: string;\n}[];\n\ntype TaxonomyProps = {\n items: TaxonomyItem[];\n selected: SelectedItem[];\n onChange: (node: any, selected: TaxonomyPath[]) => any;\n onLoadData?: (item: TaxonomyPath) => any;\n onAddLabel?: onAddLabelCallback;\n onDeleteLabel?: onDeleteLabelCallback;\n options: TaxonomyOptions;\n isEditable?: boolean;\n defaultSearch?: boolean;\n};\n\ntype TaxonomyExtendedOptions = TaxonomyOptions & {\n maxUsagesReached?: boolean;\n};\n\nconst convert = (\n items: TaxonomyItem[],\n options: TaxonomyExtendedOptions,\n selectedPaths: string[],\n): AntTaxonomyItem[] => {\n // generate string or component to be the `title` of the item\n const enrich = (item: TaxonomyItem) => {\n const color = (item: TaxonomyItem) => (\n // no BEM here to make it more lightweight\n // global classname to allow to change it in Style tag\n \n {item.label}\n \n );\n\n if (!item.hint) return item.color ? color(item) : item.label;\n\n return (\n \n {item.color ? color(item) : {item.label}}\n \n );\n };\n\n const convertItem = (item: TaxonomyItem): AntTaxonomyItem => {\n const value = item.path.join(options.pathSeparator);\n const disabledNode = options.leafsOnly && (item.isLeaf === false || !!item.children);\n const maxUsagesReached = options.maxUsagesReached && !selectedPaths.includes(value);\n\n return {\n title: enrich(item),\n value,\n key: value,\n isLeaf: item.isLeaf !== false && !item.children,\n disableCheckbox: disabledNode || maxUsagesReached,\n children: item.children?.map(convertItem),\n };\n };\n\n return items.map(convertItem);\n};\n\nconst NewTaxonomy = ({\n items,\n selected,\n onChange,\n onLoadData,\n defaultSearch = true,\n // @todo implement user labels\n // onAddLabel,\n // onDeleteLabel,\n options,\n // @todo implement readonly mode\n // isEditable = true,\n}: TaxonomyProps) => {\n const refInput = useRef(null);\n const [treeData, setTreeData] = useState([]);\n const [filteredTreeData, setFilteredTreeData] = useState([]);\n const [expandedKeys, setExpandedKeys] = useState([]);\n const separator = options.pathSeparator;\n const style = { minWidth: options.minWidth ?? 200, maxWidth: options.maxWidth };\n const dropdownWidth = options.dropdownWidth === undefined ? true : +options.dropdownWidth;\n const maxUsagesReached = !!options.maxUsages && selected.length >= options.maxUsages;\n const value = selected.map((path) => path.map((p) => p.value).join(separator));\n const displayed = selected.map((path) => ({\n value: path.map((p) => p.value).join(separator),\n label: options.showFullPath ? path.map((p) => p.label).join(separator) : path.at(-1).label,\n }));\n\n useEffect(() => {\n setTreeData(convert(items, { ...options, maxUsagesReached }, value));\n }, [items, maxUsagesReached]);\n\n const loadData = useCallback(async (node: any) => {\n return onLoadData?.(node.value.split(separator));\n }, []);\n\n const handleSearch = useCallback((list: AntTaxonomyItem[], expandedKeys: React.Key[] | null) => {\n setFilteredTreeData(list);\n if (expandedKeys?.length) setExpandedKeys(expandedKeys);\n else setExpandedKeys(undefined);\n }, []);\n\n const renderDropdown = useCallback(\n (origin: ReactNode) => {\n return (\n <>\n {!defaultSearch && }\n {origin}\n \n );\n },\n [treeData],\n );\n\n const handleDropdownChange = useCallback(\n (open: boolean) => {\n if (open) {\n // handleDropdownChange is being called before the dropdown is rendered,\n // 200ms is the time that we have to wait to dropdown be rendered and animated\n setTimeout(() => {\n refInput.current?.focus();\n }, 200);\n } else {\n refInput.current?.resetValue();\n }\n },\n [refInput],\n );\n\n return (\n \n onChange(\n null,\n items.map((item) => item.value.split(separator)),\n )\n }\n loadData={loadData}\n treeCheckable\n showSearch={defaultSearch}\n showArrow={!defaultSearch}\n dropdownRender={renderDropdown}\n onDropdownVisibleChange={handleDropdownChange}\n treeExpandedKeys={!defaultSearch ? expandedKeys : undefined}\n onTreeExpand={(expandedKeys: React.Key[]) => {\n setExpandedKeys(expandedKeys);\n }}\n treeCheckStrictly\n showCheckedStrategy={TreeSelect.SHOW_ALL}\n treeExpandAction={false}\n dropdownMatchSelectWidth={dropdownWidth}\n placeholder={options.placeholder || \"Click to add...\"}\n style={style}\n className=\"htx-taxonomy\"\n />\n );\n};\n\nexport { NewTaxonomy };\n","import { detach, types } from \"mobx-state-tree\";\nimport Types from \"../../core/Types\";\n\n/**\n * Shared Store Model is used to hold children of tags such Taxonomy and Choices.\n *\n * Every tag that uses the SharedStoreMixin will have a reference to the same store\n * defined by `sharedStore` attribute.\n */\nexport const SharedStoreModel = types\n .model(\"SharedStoreModel\", {\n id: types.identifier,\n locked: false,\n children: Types.unionArray([\"choice\"]),\n })\n .actions((self) => ({\n setChildren(val) {\n self.children = val;\n },\n clear() {\n self.children = [];\n },\n lock() {\n self.locked = true;\n },\n unlock() {\n self.locked = false;\n },\n destroy() {\n self.clear();\n detach(self);\n },\n }));\n","import { types } from \"mobx-state-tree\";\nimport Types from \"../../core/Types\";\nimport { SharedStoreModel } from \"./model\";\n\n/**\n * StoreIds and Stores act as a cache.\n *\n * The reason behind those is that we're creating a new store on the `preProcessSnapshot` when there's no\n * access to the State Tree. When the store is created, it's put into the cache and retrieved back in the\n * `afterCreate` hook of the model.\n *\n * StoreIds is just a map of existing store IDs to reference to during the `preProcessSnapshot`.\n */\nexport const Stores = new Map();\nconst StoreIds = new Set();\n\n/**\n * Defines the ID to group SharedStores by.\n */\nconst SharedStoreID = types.optional(types.maybeNull(types.string), null);\n\n/**\n * Defines the Store model referenced from the Annotation Store\n */\nconst Store = types.optional(types.maybeNull(types.late(() => types.reference(SharedStoreModel))), null);\n\n/**\n * SharedStoreMixin, when injected into the model, provides an AnnotationStore level shared storages to\n * reduce the memory footprint and computation time.\n *\n * It was specifically designed to be used with Repeater tag where the memory issues are the most sound.\n *\n * This mixin provedes a `sharedStore` property to the model which is a reference to the shared store.\n *\n * The concept behind it is that whenever a model is parsing a snapshot, children are subtracted from the\n * initial snapshot, and put into the newly created SharedStore.\n *\n * The store is then put into the cache and attached to the model in the `afterCreate` hook. Any subsequent\n * models lookup the store in the cache first and use its id instead of creating a new one.\n *\n * When the store is fullfilled with children, it's locked and cannot be modified anymore. The allows the model\n * not to process children anymore and just use the store.\n *\n * Shared Stores live on the AnnotationStore level meaning that even if the user switches between annotations or\n * create new ones, they will all use the same shared store decreasing the memory footprint and computation time.\n */\nexport const SharedStoreMixin = types\n .model(\"SharedStoreMixin\", {\n sharedstore: SharedStoreID,\n store: Store,\n })\n .views((self) => ({\n get children() {\n return self.sharedChildren;\n },\n\n get locked() {\n return self.store?.locked ?? false;\n },\n\n set children(val) {\n self.store?.lock();\n self.store.setChildren(val);\n },\n\n get sharedChildren() {\n return self.store.children ?? [];\n },\n\n get storeId() {\n return self.sharedstore ?? self.name;\n },\n }))\n .actions((self) => ({\n afterCreate() {\n if (!self.store) {\n const store = Stores.get(self.storeId);\n const annotationStore = Types.getParentOfTypeString(self, \"AnnotationStore\");\n\n annotationStore.addSharedStore(store);\n StoreIds.add(self.storeId);\n self.store = self.storeId;\n }\n },\n }))\n .preProcessSnapshot((sn) => {\n const storeId = sn.sharedstore ?? sn.name;\n\n if (StoreIds.has(storeId)) {\n sn.store = storeId;\n } else {\n Stores.set(\n storeId,\n SharedStoreModel.create({\n id: storeId,\n children: sn._children ?? sn.children ?? [],\n }),\n );\n }\n\n return sn;\n });\n\nexport const destroy = () => {\n Stores.clear();\n StoreIds.clear();\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"taxonomy\":\"lsf-taxonomy\",\"taxonomy__loading\":\"lsf-taxonomy__loading\",\"taxonomy__new\":\"lsf-taxonomy__new\"};","import React from \"react\";\nimport { observer } from \"mobx-react\";\nimport { flow, getRoot, types } from \"mobx-state-tree\";\nimport { Spin } from \"antd\";\n\nimport Infomodal from \"../../../components/Infomodal/Infomodal\";\nimport { NewTaxonomy } from \"../../../components/NewTaxonomy/NewTaxonomy\";\nimport { Taxonomy } from \"../../../components/Taxonomy/Taxonomy\";\nimport { guidGenerator } from \"../../../core/Helpers\";\nimport Registry from \"../../../core/Registry\";\nimport Tree from \"../../../core/Tree\";\nimport Types from \"../../../core/Types\";\nimport { AnnotationMixin } from \"../../../mixins/AnnotationMixin\";\nimport DynamicChildrenMixin from \"../../../mixins/DynamicChildrenMixin\";\nimport PerItemMixin from \"../../../mixins/PerItem\";\nimport PerRegionMixin from \"../../../mixins/PerRegion\";\nimport { ReadOnlyControlMixin } from \"../../../mixins/ReadOnlyMixin\";\nimport RequiredMixin from \"../../../mixins/Required\";\nimport SelectedChoiceMixin from \"../../../mixins/SelectedChoiceMixin\";\nimport { SharedStoreMixin } from \"../../../mixins/SharedChoiceStore/mixin\";\nimport VisibilityMixin from \"../../../mixins/Visibility\";\nimport { parseValue } from \"../../../utils/data\";\nimport {\n FF_DEV_3617,\n FF_LEAP_218,\n FF_LSDV_4583,\n FF_TAXONOMY_ASYNC,\n FF_TAXONOMY_LABELING,\n FF_TAXONOMY_SELECTED,\n isFF,\n} from \"../../../utils/feature-flags\";\nimport ControlBase from \"../Base\";\nimport ClassificationBase from \"../ClassificationBase\";\n\nimport styles from \"./Taxonomy.scss\";\nimport messages from \"../../../utils/messages\";\nimport { errorBuilder } from \"../../../core/DataValidator/ConfigValidator\";\n\n/**\n * @typedef TaxonomyItem\n * @property {string} label\n * @property {string[]} path\n * @property {number} depth\n * @property {string} [hint]\n * @property {string} [color]\n * @property {TaxonomyItem[]} [children]\n * @property {string} [alias]\n */\n\n/**\n * The `Taxonomy` tag is used to create one or more hierarchical classifications, storing both choice selections and their ancestors in the results. Use for nested classification tasks with the `Choice` tag.\n *\n * You can define nested classifications using the `Choice` tag, or retrieve external classifications using the `apiUrl` parameter. For more information on these options, see the [Taxonomy template page](/templates/taxonomy).\n *\n * Use with the following data types: audio, image, HTML, paragraphs, text, time series, video.\n *\n * @example\n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * @name Taxonomy\n * @meta_title Taxonomy Tag for Hierarchical Labels\n * @meta_description Customize Label Studio with the Taxonomy tag and use hierarchical labels for machine learning and data science projects.\n * @param {string} name - Name of the element\n * @param {string} toName - Name of the element that you want to classify\n * @param {string} [apiUrl] - **Beta** -- Retrieve the taxonomy from a remote source. This can be a JSON-formatted file or a hierarchical data source read as an API. For more information, see the [Taxonomy template page](/templates/taxonomy)\n * @param {boolean} [leafsOnly=false] - Allow annotators to select only leaf nodes of taxonomy\n * @param {boolean} [showFullPath=false] - Whether to show the full path of selected items\n * @param {string} [pathSeparator= / ] - Separator to show in the full path (default is \" / \"). To avoid errors, ensure that your data does not include this separator\n * @param {number} [maxUsages] - Maximum number of times a choice can be selected per task or per region\n * @param {number} [maxWidth] - Maximum width for dropdown\n * @param {number} [minWidth] - Minimum width for dropdown\n * @param {boolean} [required=false] - Whether taxonomy validation is required\n * @param {string} [requiredMessage] - Message to show if validation fails\n * @param {string} [placeholder=] - What to display as prompt on the input\n * @param {boolean} [perRegion] - Use this tag to classify specific regions instead of the whole object\n * @param {boolean} [perItem] - Use this tag to classify specific items inside the object instead of the whole object\n * @param {boolean} [legacy] - Use this tag to enable the legacy version of the Taxonomy tag. The legacy version supports the ability for annotators to add labels as needed. However, when true, the `apiUrl` parameter is not usable.\n */\nconst TagAttrs = types.model({\n toname: types.maybeNull(types.string),\n labeling: types.optional(types.boolean, false),\n leafsonly: types.optional(types.boolean, false),\n showfullpath: types.optional(types.boolean, false),\n legacy: types.optional(types.boolean, false),\n pathseparator: types.optional(types.string, \" / \"),\n apiurl: types.maybeNull(types.string),\n placeholder: \"\",\n minwidth: types.maybeNull(types.string),\n maxwidth: types.maybeNull(types.string),\n dropdownwidth: types.maybeNull(types.string),\n maxusages: types.maybeNull(types.string),\n value: types.optional(types.string, \"\"),\n});\n\nfunction traverse(root) {\n const visitUnique = (nodes, path = []) => {\n const uniq = new Set();\n const result = [];\n\n for (const child of nodes) {\n if (uniq.has(child.value)) continue;\n uniq.add(child.value);\n result.push(visitNode(child, path));\n }\n\n return result;\n };\n\n const visitNode = (node, parents = []) => {\n const label = node.value;\n const hint = node.hint;\n const path = [...parents, node.alias ?? label];\n const depth = parents.length;\n const obj = { label, path, depth, hint };\n\n if (node.color) obj.color = node.color;\n if (node.children) {\n obj.children = visitUnique(node.children, path);\n }\n\n return obj;\n };\n\n if (!root) return [];\n if (!Array.isArray(root)) return visitUnique([root]);\n return visitUnique(root);\n}\n\nconst ChildrenSnapshots = new Map();\n\n/**\n * Taxonomy as a labeling tool should work with results in a different way, similar to per-regions.\n * But it won't create a new result on change if there are none, these items will be used to create labeled region by user.\n */\nconst TaxonomyLabelingResult = types\n .model({})\n .views((self) => ({\n get result() {\n // @todo make it without duplication of ClassificationBase code\n if (!self.isLabeling && !self.perregion) {\n if (self.peritem) {\n return self._perItemResult;\n }\n return self.annotation.results.find((r) => r.from_name === self);\n }\n\n // per-region Taxonomy and Taxonomy as a labeling tool share the same way to find a result,\n // they just display items for current region, attached directly or in result.\n const area = self.annotation.highlightedNode;\n\n if (!area) return null;\n\n return self.annotation.results.find((r) => r.from_name === self && r.area === area);\n },\n get canRemoveItems() {\n if (!self.isLabeling) return true;\n return !self.result;\n },\n }))\n .actions((self) => {\n const Super = {\n updateResult: self.updateResult,\n };\n\n return {\n updateResult() {\n if (!self.isLabeling) return Super.updateResult();\n if (self.result) {\n self.result.area.setValue(self);\n }\n },\n\n /**\n * @param {string[]} path saved value from Taxonomy\n * @returns quazi-label object to act as Label in most places\n */\n findLabel(path) {\n let title = \"\";\n let items = self.items;\n let item;\n\n for (const value of path) {\n item = items?.find((item) => item.path.at(-1) === value);\n\n if (!item) return null;\n\n items = item.children;\n title = self.showfullpath && title ? title + self.pathseparator + item.label : item.label;\n }\n\n const label = { value: title, id: path.join(self.pathseparator) };\n\n if (item.color) {\n // to conform the current format of our Result#style (and it requires parent)\n label.background = item.color;\n label.parent = {};\n }\n\n return label;\n },\n };\n });\n\nconst Model = types\n .model({\n pid: types.optional(types.string, guidGenerator),\n\n type: \"taxonomy\",\n [isFF(FF_DEV_3617) ? \"_children\" : \"children\"]: Types.unionArray([\"choice\"]),\n })\n .volatile(() => ({\n maxUsagesReached: false,\n selected: [],\n loading: true,\n _api: \"\", // will be filled after the first load in updateValue()\n _items: [], // items loaded via API\n }))\n .views((self) =>\n isFF(FF_DEV_3617)\n ? {\n get children() {\n return self._children;\n },\n set children(val) {\n self._children = val;\n },\n get isLabeling() {\n return isFF(FF_TAXONOMY_LABELING) && self.labeling;\n },\n }\n : {},\n )\n .views((self) => ({\n get userLabels() {\n return self.annotation.store.userLabels;\n },\n\n get holdsState() {\n return self.selected.length > 0;\n },\n\n get isSelected() {\n return self.holdsState;\n },\n\n get hasValue() {\n return self.holdsState;\n },\n\n get valueType() {\n return \"taxonomy\";\n },\n\n get tiedChildren() {\n return Tree.filterChildrenOfType(self, \"ChoiceModel\");\n },\n\n get preselectedValues() {\n return self.tiedChildren.filter((c) => c.selected === true && !c.isSkipped).map((c) => c.resultValue);\n },\n\n get isLoadedByApi() {\n return isFF(FF_TAXONOMY_ASYNC) && !!self.apiurl;\n },\n\n get items() {\n if (self.isLoadedByApi) return self._items;\n\n const fromConfig = traverse(self.children);\n const fromUsers = self.userLabels?.controls[self.name] ?? [];\n\n for (const label of fromUsers) {\n let current = { children: fromConfig };\n const { origin, path } = label;\n const lastIndex = path.length - 1;\n\n for (let depth = 0; depth < lastIndex; depth++) {\n current = current.children?.find((item) => item.label === path[depth]);\n if (!current) break;\n }\n\n if (current) {\n if (!current.children) current.children = [];\n current.children.push({ label: path[lastIndex], path, depth: lastIndex, origin });\n }\n }\n\n return fromConfig;\n },\n\n get selectedItems() {\n const full = self.selected.map((path) => {\n /** @type {TaxonomyItem[]} items */\n let items = self.items;\n const levels = [];\n\n for (const value of path) {\n const item = items.find((item) => item.path.at(-1) === value);\n\n levels.push({ label: item?.label ?? value, value });\n items = item?.children ?? [];\n }\n\n return levels;\n });\n\n return full;\n },\n\n get defaultChildType() {\n return \"choice\";\n },\n\n selectedValues() {\n return self.selected;\n },\n\n findItemByValueOrAlias(valueOrAlias) {\n // search the tree of items for the given\n // value or alias match\n const findItem = (items) => {\n for (const item of items) {\n const label = item.label;\n const value = item.path[item.path.length - 1];\n\n // @todo why do we change items??\n item.value = label;\n if (value !== label) {\n item.alias = value;\n }\n\n if (item.value === valueOrAlias || item.alias === valueOrAlias) {\n return item;\n }\n if (item.children) {\n const found = findItem(item.children, valueOrAlias);\n\n if (found) return found;\n }\n }\n };\n\n return findItem(self.items);\n },\n }))\n .actions((self) => ({\n afterAttach() {\n // we are not mixing items from API with other kinds of items\n if (self.isLoadedByApi) return;\n\n const children = ChildrenSnapshots.get(self.name) ?? [];\n\n if (isFF(FF_DEV_3617) && self.store && children.length !== self.children.length) {\n if (isFF(FF_TAXONOMY_SELECTED)) {\n // we have to update it during config parsing to let other code work\n // with correctly added children.\n // looks like there are no obstacles to do it in the same tick\n self.updateChildren();\n } else {\n setTimeout(() => self.updateChildren());\n }\n } else {\n self.loading = false;\n }\n },\n\n /**\n * Load items from `apiUrl` and set them indirectly to `items` (via `_items`)\n * @param {string[]} path to load nested items by this path\n */\n loadItems: flow(function* (path) {\n if (!self._api) return;\n let requestOptions = {};\n\n // will be used only to load children for nested items\n // to check that item exists and requires loading\n let item;\n\n // check that item exists\n if (path) {\n item = { children: self.items };\n for (const level of path) {\n item = item.children?.find((ch) => ch.path.at(-1) === level);\n if (!item) return;\n }\n }\n\n // Tree Select triggers this on every non-leaf node,\n // so load only if this item really needs it\n if (path && (item.isLeaf !== false || item.children)) return;\n\n self.loading = true;\n\n // build url with `path` as array (path ['A', 'BC'] => path=A&path=BC)\n const url = new URL(self._api);\n\n path?.forEach((p) => url.searchParams.append(\"path\", p));\n\n if (url.username && url.password) {\n requestOptions = {\n headers: new Headers({\n Authorization: `Basic ${btoa(`${url.username}:${url.password}`)}`,\n }),\n };\n\n url.username = \"\";\n url.password = \"\";\n }\n\n try {\n const res = yield fetch(url, requestOptions);\n const { ok, status, statusText } = res;\n\n if (!ok) throw new Error(`${status} ${statusText}`);\n\n const dataRaw = yield res.json();\n // @todo temporary to support deprecated API response format (just array, no items)\n const data = dataRaw.items ?? dataRaw;\n const prefix = path ?? [];\n // recursive convertor to internal format\n const convert = (items, path) =>\n items.map(({ alias, children, isLeaf, value, ...rest }) => {\n const item = { label: value, path: [...path, alias ?? value], depth: path.length, isLeaf, ...rest };\n\n if (children) item.children = convert(children, item.path);\n\n return item;\n });\n const items = convert(data, prefix);\n\n if (path) {\n item.children = items;\n self._items = [...self._items];\n } else {\n self._items = items;\n }\n } catch (err) {\n const message = messages.ERR_LOADING_HTTP({ attr: \"apiUrl\", error: String(err), url: self.apiurl });\n\n self.annotationStore.addErrors([errorBuilder.generalError(message)]);\n\n console.error(err);\n }\n\n self.loading = false;\n }),\n\n beforeDestroy() {\n ChildrenSnapshots.delete(self.name);\n },\n\n updateChildren() {\n const children = ChildrenSnapshots.get(self.name) ?? [];\n\n if (children.length) {\n const root = getRoot(self);\n // SharedChoiceStore doesn't call `updateValue()` because it's annotation agnostic,\n // so call it here right after Taxonomy is attached\n const updateChildrenValue = (children) => {\n children?.map((child) => {\n child.updateValue?.(root);\n updateChildrenValue(child.children);\n });\n };\n\n self._children = children;\n self.children = [...children];\n self.store.unlock();\n ChildrenSnapshots.delete(self.name);\n\n updateChildrenValue(self.children);\n }\n\n self.loading = false;\n },\n\n requiredModal() {\n Infomodal.warning(self.requiredmessage || `Taxonomy \"${self.name}\" is required.`);\n },\n\n needsUpdate() {\n if (self.result) self.selected = self.result.mainValue;\n else self.selected = [];\n self.maxUsagesReached = self.selected.length >= self.maxusages;\n },\n\n updateFromResult() {\n self.needsUpdate();\n },\n\n onChange(_node, checked) {\n // don't remove last label from region if region is selected (so canRemoveItems is false)\n // should be checked only for Taxonomy as labbeling tool\n if (self.canRemoveItems === false && !checked.length) return;\n\n self.selected = checked.map((s) => s.path ?? s);\n self.maxUsagesReached = self.selected.length >= self.maxusages;\n self.updateResult();\n },\n\n unselectAll() {\n if (isFF(FF_TAXONOMY_LABELING) && self.isLabeling) self.selected = [];\n },\n\n onAddLabel(path) {\n self.userLabels?.addLabel(self.name, path);\n },\n\n onDeleteLabel(path) {\n self.userLabels?.deleteLabel(self.name, path);\n },\n }))\n .actions((self) => {\n const Super = {\n validate: self.validate,\n };\n\n return {\n validate() {\n if (!Super.validate() || (self.maxusages && self.selected.length > self.maxusages)) return false;\n },\n\n beforeSend() {\n if (self.maxusages && self.selected.length > self.maxusages)\n Infomodal.warning(\n `The number of options selected (${self.selected.length}) exceed the maximum allowed (${self.maxusages}). To proceed, first unselect excess options for:\\r\\n • Taxonomy (${self.name})`,\n );\n },\n };\n })\n .actions((self) => {\n const Super = {\n updateValue: self.updateValue,\n };\n\n return {\n /**\n * Usual method to parse values from task and init data.\n * Will store correct api url and load items from it.\n * Also used for Dynamic Children.\n */\n updateValue: flow(function* (store) {\n if (!self.isLoadedByApi) return Super.updateValue?.(store);\n\n self._api = parseValue(self.apiurl, store.task.dataObj);\n // trying to presign this url if needed and if handler is passed into LSF\n self._api = (yield store.presignUrlForProject(self._api)) ?? self._api;\n\n yield self.loadItems();\n }),\n };\n })\n .preProcessSnapshot((sn) => {\n if (isFF(FF_DEV_3617)) {\n const children = sn._children ?? sn.children;\n\n if (children && !ChildrenSnapshots.has(sn.name)) {\n ChildrenSnapshots.set(sn.name, children);\n }\n\n delete sn._children;\n delete sn.children;\n }\n\n return sn;\n });\n\nconst TaxonomyModel = types.compose(\n \"TaxonomyModel\",\n ControlBase,\n ClassificationBase,\n TagAttrs,\n DynamicChildrenMixin,\n AnnotationMixin,\n RequiredMixin,\n Model,\n ...(isFF(FF_DEV_3617) ? [SharedStoreMixin] : []),\n PerRegionMixin,\n ...(isFF(FF_LSDV_4583) ? [PerItemMixin] : []),\n ...(isFF(FF_TAXONOMY_LABELING) ? [TaxonomyLabelingResult] : []),\n ReadOnlyControlMixin,\n SelectedChoiceMixin,\n VisibilityMixin,\n);\n\nconst HtxTaxonomy = observer(({ item }) => {\n // literal \"taxonomy\" class name is for external styling\n const className = [styles.taxonomy, \"taxonomy\", isFF(FF_TAXONOMY_ASYNC) ? styles.taxonomy__new : \"\"]\n .filter(Boolean)\n .join(\" \");\n const visibleStyle = item.perRegionVisible() && item.isVisible ? {} : { display: \"none\" };\n const options = {\n showFullPath: item.showfullpath,\n leafsOnly: item.leafsonly,\n pathSeparator: item.pathseparator,\n maxUsages: item.maxusages,\n maxWidth: item.maxwidth,\n minWidth: item.minwidth,\n dropdownWidth: item.dropdownwidth,\n placeholder: item.placeholder,\n canRemoveItems: item.canRemoveItems,\n };\n\n // without full api there will be just one initial loading;\n // with full api we should not block UI with spinner on nested requests —\n // they are indicated by loading icon on the item itself\n const firstLoad = item.isLoadedByApi ? !item.items.length : true;\n\n if (item.loading && isFF(FF_DEV_3617) && firstLoad) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n {isFF(FF_TAXONOMY_ASYNC) && !item.legacy ? (\n \n ) : (\n \n )}\n
\n );\n});\n\nRegistry.addTag(\"taxonomy\", TaxonomyModel, HtxTaxonomy);\n\nexport { HtxTaxonomy, TaxonomyModel, TagAttrs };\n","import React from \"react\";\nimport { observer } from \"mobx-react\";\nimport { types } from \"mobx-state-tree\";\n\nimport LabelMixin from \"../../mixins/LabelMixin\";\nimport Registry from \"../../core/Registry\";\nimport SelectedModelMixin from \"../../mixins/SelectedModel\";\nimport Types from \"../../core/Types\";\nimport { HtxLabels, LabelsModel } from \"./Labels/Labels\";\nimport ControlBase from \"./Base\";\n\n/**\n * The `HyperTextLabels` tag creates labeled hyper text (HTML). Use with the HyperText object tag to annotate HTML text or HTML elements for named entity recognition tasks.\n *\n * Use with the following data types: HTML.\n * @example\n * \n * \n * \n * \n * \n * \n * @name HyperTextLabels\n * @regions HyperTextRegion\n * @meta_title Hypertext Label Tag to Create Labeled Hypertext (HTML)\n * @meta_description Customize Label Studio with the HyperTextLabels tag to label hypertext (HTML) for machine learning and data science projects.\n * @param {string} name - Name of the element\n * @param {string} toName - Name of the HTML element to label\n * @param {single|multiple=} [choice=single] - Configure if you can select one or multiple labels\n * @param {number} [maxUsages] - Maximum number of times a label can be used per task\n * @param {boolean} [showInline=true] - Show labels in the same visual line\n */\n\nconst Validation = types.model({\n controlledTags: Types.unionTag([\"HyperText\"]),\n});\n\nconst ModelAttrs = types\n .model(\"HyperTextLabelsModel\", {\n type: \"hypertextlabels\",\n children: Types.unionArray([\"label\", \"header\", \"view\", \"hypertext\"]),\n })\n .views((self) => ({\n get hasStates() {\n const states = self.states();\n\n return states && states.length > 0;\n },\n\n get serializableValue() {\n const obj = {};\n\n obj[self.resultType] = self.selectedValues();\n\n return obj;\n },\n\n get resultType() {\n return \"hypertextlabels\";\n },\n\n get valueType() {\n return \"hypertextlabels\";\n },\n }));\n\nconst Composition = types.compose(\n ControlBase,\n LabelsModel,\n ModelAttrs,\n Validation,\n LabelMixin,\n SelectedModelMixin.props({ _child: \"LabelModel\" }),\n);\n\nconst HyperTextLabelsModel = types.compose(\"HyperTextLabelsModel\", Composition);\n\nconst HtxHyperTextLabels = observer(({ item }) => {\n return ;\n});\n\nRegistry.addTag(\"hypertextlabels\", HyperTextLabelsModel, HtxHyperTextLabels);\n\nexport { HtxHyperTextLabels, HyperTextLabelsModel };\n","import React from \"react\";\nimport { observer } from \"mobx-react\";\nimport { types } from \"mobx-state-tree\";\n\nimport LabelMixin from \"../../mixins/LabelMixin\";\nimport Registry from \"../../core/Registry\";\nimport SelectedModelMixin from \"../../mixins/SelectedModel\";\nimport Types from \"../../core/Types\";\nimport { HtxLabels, LabelsModel } from \"./Labels/Labels\";\nimport { guidGenerator } from \"../../core/Helpers\";\nimport ControlBase from \"./Base\";\n\n/**\n * The `TimeSeriesLabels` tag is used to create a labeled time range.\n *\n * Use with the following data types: time series.\n * @example\n * \n * \n * \n * \n *\n * \n * \n * \n * \n *\n * @name TimeSeriesLabels\n * @meta_title Time Series Label Tag for Labeling Time Series Data\n * @meta_description Customize Label Studio for with the TimeSeriesLabel tag to label time series data for machine learning and data science projects.\n * @param {string} name - Name of the element\n * @param {string} toname - Name of the timeseries to label\n * @param {single|multiple=} [choice=single] - Configure whether you can select one or multiple labels\n * @param {number} [maxUsages] - Maximum number of times a label can be used per task\n * @param {boolean} [showInline=true] - Show labels in the same visual line\n * @param {float=} [opacity=0.9] - Opacity of the range\n * @param {string=} [fillColor=transparent] - Range fill color in hexadecimal or HTML color name\n * @param {string} [strokeColor=#f48a42] - Stroke color in hexadecimal\n * @param {number=} [strokeWidth=1] - Width of the stroke\n */\nconst TagAttrs = types.model({\n opacity: types.optional(types.string, \"0.9\"),\n fillcolor: types.maybeNull(types.string),\n\n strokeWidth: types.optional(types.number, 1),\n strokeColor: types.optional(types.string, \"#f48a42\"),\n});\n\nconst ModelAttrs = types\n .model(\"TimeSeriesLabelesModel\", {\n pid: types.optional(types.string, guidGenerator),\n type: \"timeserieslabels\",\n children: Types.unionArray([\"labels\", \"label\", \"choice\"]),\n })\n .views((self) => ({\n get hasStates() {\n const states = self.states();\n\n return states && states.length > 0;\n },\n\n states() {\n return self.annotation.toNames.get(self.name);\n },\n\n activeStates() {\n const states = self.states();\n\n return states ? states.filter((c) => c.isSelected === true) : null;\n },\n }));\n\nconst Model = LabelMixin.props({ _type: \"timeserieslabels\" }).views((self) => ({\n get shouldBeUnselected() {\n return self.choice === \"single\";\n },\n}));\n\nconst Composition = types.compose(\n ControlBase,\n LabelsModel,\n ModelAttrs,\n TagAttrs,\n Model,\n SelectedModelMixin.props({ _child: \"LabelModel\" }),\n);\n\nconst TimeSeriesLabelsModel = types.compose(\"TimeSeriesLabelsModel\", Composition);\n\nconst HtxTimeSeriesLabels = observer(({ item }) => {\n return ;\n});\n\nRegistry.addTag(\"timeserieslabels\", TimeSeriesLabelsModel, HtxTimeSeriesLabels);\n\nexport { HtxTimeSeriesLabels, TimeSeriesLabelsModel };\n","import { observer } from \"mobx-react\";\nimport { types } from \"mobx-state-tree\";\n\nimport Registry from \"../../core/Registry\";\nimport { guidGenerator } from \"../../core/Helpers\";\nimport SelectedModelMixin from \"../../mixins/SelectedModel\";\nimport ControlBase from \"./Base\";\nimport { HtxLabels, LabelsModel } from \"./Labels/Labels\";\n\n/**\n * Use the TimelineLabels tag to classify video frames. This can be a single frame or a span of frames.\n *\n * First, select a label and then click once to annotate a single frame. Click and drag to annotate multiple frames.\n *\n * ![Screenshot of video with frame classification](../images/timelinelabels.png)\n *\n * Use with the `
\n );\n }),\n);\n\nRegistry.addTag(\"dialog\", DialogModel, HtxDialogView);\n\nexport { DialogModel, HtxDialogView };\n","import React from \"react\";\nimport { types } from \"mobx-state-tree\";\nimport { observer } from \"mobx-react\";\nimport { Typography } from \"antd\";\n\nimport ProcessAttrsMixin from \"../../mixins/ProcessAttrs\";\nimport Registry from \"../../core/Registry\";\nimport Tree from \"../../core/Tree\";\nimport { guidGenerator } from \"../../utils/unique\";\nimport { clamp } from \"../../utils/utilities\";\n\n/**\n * The `Header` tag is used to show a header on the labeling interface.\n * @example\n * \n * \n *
\n * \n * @example\n * \n * \n *
\n * \n * @name Header\n * @meta_title Header Tag to Show Headers\n * @meta_description Customize Label Studio with the Header tag to display a header for a labeling task for machine learning and data science projects.\n * @param {string} value - Text of header, either static text or the field name in data to use for the header\n * @param {number} [size=4] - Level of header on a page, used to control size of the text\n * @param {string} [style] - CSS style for the header\n * @param {boolean} [underline=false] - Whether to underline the header\n */\nconst Model = types.model({\n id: types.optional(types.identifier, guidGenerator),\n type: \"header\",\n size: types.optional(types.string, \"4\"),\n style: types.maybeNull(types.string),\n _value: types.optional(types.string, \"\"),\n value: types.optional(types.string, \"\"),\n underline: types.optional(types.boolean, false),\n});\n\nconst HeaderModel = types.compose(\"HeaderModel\", Model, ProcessAttrsMixin);\n\nconst HtxHeader = observer(({ item }) => {\n const size = clamp(Number.parseInt(item.size), 1, 5);\n const style = item.style ? Tree.cssConverter(item.style) : { margin: \"10px 0\" };\n\n if (!style.fontSize && size > 4) {\n style.fontSize = size === 5 ? \"1.2em\" : \"1.1em\";\n }\n\n return (\n \n {item._value}\n \n );\n});\n\nRegistry.addTag(\"header\", HeaderModel, HtxHeader);\n\nexport { HtxHeader, HeaderModel };\n","import React from \"react\";\nimport { observer } from \"mobx-react\";\nimport { types } from \"mobx-state-tree\";\n\nimport Registry from \"../../core/Registry\";\nimport Tree from \"../../core/Tree\";\nimport Types from \"../../core/Types\";\nimport VisibilityMixin from \"../../mixins/Visibility\";\nimport { AnnotationMixin } from \"../../mixins/AnnotationMixin\";\n\n/**\n * The `View` element is used to configure the display of blocks, similar to the div tag in HTML.\n * @example\n * \n * \n * \n * \n *
\n * \n * \n * \n * \n *
\n * \n * \n * @example\n * \n * \n * \n * \n * \n * \n * \n * \n * @name Shortcut\n * @meta_title Shortcut Tag to Define Shortcuts\n * @meta_description Customize Label Studio to define keyboard shortcuts and hotkeys to accelerate labeling for machine learning and data science projects.\n * @param {string} value - The value of the shortcut\n * @param {string} [alias] - Shortcut alias\n * @param {string} [hotkey] - Hotkey\n * @param {string} [background=#333333] - Background color in hexadecimal\n */\nconst TagAttrs = types.model({\n value: types.maybeNull(types.string),\n alias: types.maybeNull(types.string),\n background: types.optional(customTypes.color, \"#333333\"),\n hotkey: types.maybeNull(types.string),\n});\n\nconst Model = types\n .model({\n id: types.optional(types.identifier, guidGenerator),\n type: \"shortcut\",\n _value: types.optional(types.string, \"\"),\n })\n .volatile(() => ({\n hotkeyScope: Hotkey.INPUT_SCOPE,\n }))\n .actions((self) => ({\n onClick() {\n const textarea = getParent(self, 2);\n\n if (textarea.onShortcut) {\n textarea.onShortcut(self.value);\n textarea.returnFocus?.();\n }\n },\n\n onHotKey(event) {\n const textarea = getParent(self, 2);\n const name = (event.target || event.srcElement).name;\n // fired on a wrong element\n\n if (textarea.name !== name && !name.startsWith(`${textarea.name}:`)) return;\n event.preventDefault();\n return self.onClick();\n },\n }));\n\nconst ShortcutModel = types.compose(\"ShortcutModel\", TagAttrs, Model, ProcessAttrsMixin);\n\nconst HtxShortcutView = inject(\"store\")(\n observer(({ item, store }) => {\n const bg = {\n background: chroma(item.background).alpha(0.15),\n color: \"#333333\",\n cursor: \"pointer\",\n margin: \"5px\",\n };\n\n return (\n {\n e.preventDefault();\n e.stopPropagation();\n item.onClick();\n return false;\n }}\n style={bg}\n >\n {item.alias ? item.alias : item._value}\n {store.settings.enableTooltips && store.settings.enableHotkeys && item.hotkey && [{item.hotkey}]}\n \n );\n }),\n);\n\nRegistry.addTag(\"shortcut\", ShortcutModel, HtxShortcutView);\n\nexport { HtxShortcutView, ShortcutModel };\n","// extracted by mini-css-extract-plugin\nexport default {\"taxonomy-search-input\":\"lsf-taxonomy-search-input\"};","import React, {\n type ChangeEvent,\n type KeyboardEvent,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\n\nimport \"./TaxonomySearch.scss\";\nimport { Block } from \"../../utils/bem\";\nimport type { AntTaxonomyItem } from \"./NewTaxonomy\";\nimport { debounce } from \"lodash\";\n\ntype TaxonomySearchProps = {\n treeData: AntTaxonomyItem[];\n onChange: (list: AntTaxonomyItem[], expandedKeys: React.Key[] | null) => void;\n};\n\nexport type TaxonomySearchRef = {\n resetValue: () => void;\n focus: () => void;\n};\n\nconst TaxonomySearch = React.forwardRef(({ treeData, onChange }, ref) => {\n useImperativeHandle(ref, (): TaxonomySearchRef => {\n return {\n resetValue() {\n setInputValue(\"\");\n onChange(treeData, []);\n },\n focus() {\n return inputRef.current?.focus();\n },\n };\n });\n\n const inputRef = useRef();\n const [inputValue, setInputValue] = useState(\"\");\n\n useEffect(() => {\n const _filteredData = filterTreeData(treeData, inputValue);\n\n onChange(_filteredData.filteredDataTree, null);\n }, [treeData]);\n\n // When the treeNode has additional formatting because of `hint` or `color` props,\n // the `treeNode.title` is not a string but a react component,\n // so we have to look for the title in children (1 or 2 levels deep)\n const getTitle = useCallback((treeNodeTitle: any): string => {\n if (typeof treeNodeTitle === \"string\") return treeNodeTitle;\n\n if (typeof treeNodeTitle.props.children === \"object\") return getTitle(treeNodeTitle.props.children);\n\n return treeNodeTitle.props.children;\n }, []);\n\n // To filter the treeData items that match with the searchValue\n const filterTreeNode = useCallback((searchValue: string, treeNode: AntTaxonomyItem) => {\n const lowerSearchValue = String(searchValue).toLowerCase();\n const lowerResultValue = getTitle(treeNode.title);\n\n if (!lowerSearchValue) {\n return false;\n }\n\n return String(lowerResultValue).toLowerCase().includes(lowerSearchValue);\n }, []);\n\n // It's running recursively through treeData and its children filtering the content that match with the search value\n const filterTreeData = useCallback((treeData: AntTaxonomyItem[], searchValue: string) => {\n const _expandedKeys: React.Key[] = [];\n\n if (!searchValue) {\n return {\n filteredDataTree: treeData,\n expandedKeys: _expandedKeys,\n };\n }\n\n const dig = (list: AntTaxonomyItem[], keepAll = false) => {\n return list.reduce((total, dataNode) => {\n const children = dataNode.children;\n\n const match = keepAll || filterTreeNode(searchValue, dataNode);\n const childList = children?.length ? dig(children, match) : undefined;\n\n if (match || childList?.length) {\n if (!keepAll && dataNode.children?.length) _expandedKeys.push(dataNode.key);\n\n total.push({\n ...dataNode,\n isLeaf: !childList?.length,\n children: childList,\n });\n }\n\n return total;\n }, []);\n };\n\n return {\n filteredDataTree: dig(treeData),\n expandedKeys: _expandedKeys,\n };\n }, []);\n\n const handleSearch = useCallback(\n debounce(async (e: ChangeEvent) => {\n const _filteredData = filterTreeData(treeData, e.target.value);\n\n onChange(_filteredData.filteredDataTree, _filteredData.expandedKeys);\n }, 300),\n [treeData],\n );\n\n return (\n ) => {\n setInputValue(e.target.value);\n handleSearch(e);\n }}\n onKeyDown={(e: KeyboardEvent) => {\n // to prevent selected items from being deleted\n if (e.key === \"Backspace\" || e.key === \"Delete\") e.stopPropagation();\n }}\n placeholder={\"Search\"}\n data-testid={\"taxonomy-search\"}\n name={\"taxonomy-search-input\"}\n />\n );\n});\n\nexport { TaxonomySearch };\n","import { TreeSelect } from \"antd\";\nimport type React from \"react\";\nimport { type ReactNode, useCallback, useEffect, useRef, useState } from \"react\";\n\nimport { Tooltip } from \"../../common/Tooltip/Tooltip\";\n\nimport \"./NewTaxonomy.scss\";\nimport { TaxonomySearch, type TaxonomySearchRef } from \"./TaxonomySearch\";\n\nexport type TaxonomyPath = string[];\ntype onAddLabelCallback = (path: string[]) => any;\ntype onDeleteLabelCallback = (path: string[]) => any;\n\nexport type TaxonomyItem = {\n label: string;\n path: TaxonomyPath;\n depth: number;\n isLeaf?: boolean; // only in new async taxonomy\n children?: TaxonomyItem[];\n origin?: \"config\" | \"user\" | \"session\";\n hint?: string;\n color?: string;\n};\n\nexport type AntTaxonomyItem = {\n title: string | JSX.Element;\n value: string;\n key: string;\n isLeaf?: boolean;\n children?: AntTaxonomyItem[];\n disableCheckbox?: boolean;\n};\n\ntype TaxonomyOptions = {\n leafsOnly?: boolean;\n showFullPath?: boolean;\n pathSeparator: string;\n maxUsages?: number;\n maxWidth?: number;\n minWidth?: number;\n dropdownWidth?: number;\n placeholder?: string;\n};\n\nexport type SelectedItem = {\n label: string;\n value: string;\n}[];\n\ntype TaxonomyProps = {\n items: TaxonomyItem[];\n selected: SelectedItem[];\n onChange: (node: any, selected: TaxonomyPath[]) => any;\n onLoadData?: (item: TaxonomyPath) => any;\n onAddLabel?: onAddLabelCallback;\n onDeleteLabel?: onDeleteLabelCallback;\n options: TaxonomyOptions;\n isEditable?: boolean;\n defaultSearch?: boolean;\n};\n\ntype TaxonomyExtendedOptions = TaxonomyOptions & {\n maxUsagesReached?: boolean;\n};\n\nconst convert = (\n items: TaxonomyItem[],\n options: TaxonomyExtendedOptions,\n selectedPaths: string[],\n): AntTaxonomyItem[] => {\n // generate string or component to be the `title` of the item\n const enrich = (item: TaxonomyItem) => {\n const color = (item: TaxonomyItem) => (\n // no BEM here to make it more lightweight\n // global classname to allow to change it in Style tag\n \n {item.label}\n \n );\n\n if (!item.hint) return item.color ? color(item) : item.label;\n\n return (\n \n {item.color ? color(item) : {item.label}}\n \n );\n };\n\n const convertItem = (item: TaxonomyItem): AntTaxonomyItem => {\n const value = item.path.join(options.pathSeparator);\n const disabledNode = options.leafsOnly && (item.isLeaf === false || !!item.children);\n const maxUsagesReached = options.maxUsagesReached && !selectedPaths.includes(value);\n\n return {\n title: enrich(item),\n value,\n key: value,\n isLeaf: item.isLeaf !== false && !item.children,\n disableCheckbox: disabledNode || maxUsagesReached,\n children: item.children?.map(convertItem),\n };\n };\n\n return items.map(convertItem);\n};\n\nconst NewTaxonomy = ({\n items,\n selected,\n onChange,\n onLoadData,\n defaultSearch = true,\n // @todo implement user labels\n // onAddLabel,\n // onDeleteLabel,\n options,\n // @todo implement readonly mode\n // isEditable = true,\n}: TaxonomyProps) => {\n const refInput = useRef(null);\n const [treeData, setTreeData] = useState([]);\n const [filteredTreeData, setFilteredTreeData] = useState([]);\n const [expandedKeys, setExpandedKeys] = useState([]);\n const separator = options.pathSeparator;\n const style = { minWidth: options.minWidth ?? 200, maxWidth: options.maxWidth };\n const dropdownWidth = options.dropdownWidth === undefined ? true : +options.dropdownWidth;\n const maxUsagesReached = !!options.maxUsages && selected.length >= options.maxUsages;\n const value = selected.map((path) => path.map((p) => p.value).join(separator));\n const displayed = selected.map((path) => ({\n value: path.map((p) => p.value).join(separator),\n label: options.showFullPath ? path.map((p) => p.label).join(separator) : path.at(-1).label,\n }));\n\n useEffect(() => {\n setTreeData(convert(items, { ...options, maxUsagesReached }, value));\n }, [items, maxUsagesReached]);\n\n const loadData = useCallback(async (node: any) => {\n return onLoadData?.(node.value.split(separator));\n }, []);\n\n const handleSearch = useCallback((list: AntTaxonomyItem[], expandedKeys: React.Key[] | null) => {\n setFilteredTreeData(list);\n if (expandedKeys?.length) setExpandedKeys(expandedKeys);\n else setExpandedKeys(undefined);\n }, []);\n\n const renderDropdown = useCallback(\n (origin: ReactNode) => {\n return (\n <>\n {!defaultSearch && }\n {origin}\n \n );\n },\n [treeData],\n );\n\n const handleDropdownChange = useCallback(\n (open: boolean) => {\n if (open) {\n // handleDropdownChange is being called before the dropdown is rendered,\n // 200ms is the time that we have to wait to dropdown be rendered and animated\n setTimeout(() => {\n refInput.current?.focus();\n }, 200);\n } else {\n refInput.current?.resetValue();\n }\n },\n [refInput],\n );\n\n return (\n \n onChange(\n null,\n items.map((item) => item.value.split(separator)),\n )\n }\n loadData={loadData}\n treeCheckable\n showSearch={defaultSearch}\n showArrow={!defaultSearch}\n dropdownRender={renderDropdown}\n onDropdownVisibleChange={handleDropdownChange}\n treeExpandedKeys={!defaultSearch ? expandedKeys : undefined}\n onTreeExpand={(expandedKeys: React.Key[]) => {\n setExpandedKeys(expandedKeys);\n }}\n treeCheckStrictly\n showCheckedStrategy={TreeSelect.SHOW_ALL}\n treeExpandAction={false}\n dropdownMatchSelectWidth={dropdownWidth}\n placeholder={options.placeholder || \"Click to add...\"}\n style={style}\n className=\"htx-taxonomy\"\n />\n );\n};\n\nexport { NewTaxonomy };\n","import { detach, types } from \"mobx-state-tree\";\nimport Types from \"../../core/Types\";\n\n/**\n * Shared Store Model is used to hold children of tags such Taxonomy and Choices.\n *\n * Every tag that uses the SharedStoreMixin will have a reference to the same store\n * defined by `sharedStore` attribute.\n */\nexport const SharedStoreModel = types\n .model(\"SharedStoreModel\", {\n id: types.identifier,\n locked: false,\n children: Types.unionArray([\"choice\"]),\n })\n .actions((self) => ({\n setChildren(val) {\n self.children = val;\n },\n clear() {\n self.children = [];\n },\n lock() {\n self.locked = true;\n },\n unlock() {\n self.locked = false;\n },\n destroy() {\n self.clear();\n detach(self);\n },\n }));\n","import { types } from \"mobx-state-tree\";\nimport Types from \"../../core/Types\";\nimport { SharedStoreModel } from \"./model\";\n\n/**\n * StoreIds and Stores act as a cache.\n *\n * The reason behind those is that we're creating a new store on the `preProcessSnapshot` when there's no\n * access to the State Tree. When the store is created, it's put into the cache and retrieved back in the\n * `afterCreate` hook of the model.\n *\n * StoreIds is just a map of existing store IDs to reference to during the `preProcessSnapshot`.\n */\nexport const Stores = new Map();\nconst StoreIds = new Set();\n\n/**\n * Defines the ID to group SharedStores by.\n */\nconst SharedStoreID = types.optional(types.maybeNull(types.string), null);\n\n/**\n * Defines the Store model referenced from the Annotation Store\n */\nconst Store = types.optional(types.maybeNull(types.late(() => types.reference(SharedStoreModel))), null);\n\n/**\n * SharedStoreMixin, when injected into the model, provides an AnnotationStore level shared storages to\n * reduce the memory footprint and computation time.\n *\n * It was specifically designed to be used with Repeater tag where the memory issues are the most sound.\n *\n * This mixin provedes a `sharedStore` property to the model which is a reference to the shared store.\n *\n * The concept behind it is that whenever a model is parsing a snapshot, children are subtracted from the\n * initial snapshot, and put into the newly created SharedStore.\n *\n * The store is then put into the cache and attached to the model in the `afterCreate` hook. Any subsequent\n * models lookup the store in the cache first and use its id instead of creating a new one.\n *\n * When the store is fullfilled with children, it's locked and cannot be modified anymore. The allows the model\n * not to process children anymore and just use the store.\n *\n * Shared Stores live on the AnnotationStore level meaning that even if the user switches between annotations or\n * create new ones, they will all use the same shared store decreasing the memory footprint and computation time.\n */\nexport const SharedStoreMixin = types\n .model(\"SharedStoreMixin\", {\n sharedstore: SharedStoreID,\n store: Store,\n })\n .views((self) => ({\n get children() {\n return self.sharedChildren;\n },\n\n get locked() {\n return self.store?.locked ?? false;\n },\n\n set children(val) {\n self.store?.lock();\n self.store.setChildren(val);\n },\n\n get sharedChildren() {\n return self.store.children ?? [];\n },\n\n get storeId() {\n return self.sharedstore ?? self.name;\n },\n }))\n .actions((self) => ({\n afterCreate() {\n if (!self.store) {\n const store = Stores.get(self.storeId);\n const annotationStore = Types.getParentOfTypeString(self, \"AnnotationStore\");\n\n annotationStore.addSharedStore(store);\n StoreIds.add(self.storeId);\n self.store = self.storeId;\n }\n },\n }))\n .preProcessSnapshot((sn) => {\n const storeId = sn.sharedstore ?? sn.name;\n\n if (StoreIds.has(storeId)) {\n sn.store = storeId;\n } else {\n Stores.set(\n storeId,\n SharedStoreModel.create({\n id: storeId,\n children: sn._children ?? sn.children ?? [],\n }),\n );\n }\n\n return sn;\n });\n\nexport const destroy = () => {\n Stores.clear();\n StoreIds.clear();\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"taxonomy\":\"lsf-taxonomy\",\"taxonomy__loading\":\"lsf-taxonomy__loading\",\"taxonomy__new\":\"lsf-taxonomy__new\"};","import React from \"react\";\nimport { observer } from \"mobx-react\";\nimport { flow, getRoot, types } from \"mobx-state-tree\";\nimport { Spin } from \"antd\";\n\nimport Infomodal from \"../../../components/Infomodal/Infomodal\";\nimport { NewTaxonomy } from \"../../../components/NewTaxonomy/NewTaxonomy\";\nimport { Taxonomy } from \"../../../components/Taxonomy/Taxonomy\";\nimport { guidGenerator } from \"../../../core/Helpers\";\nimport Registry from \"../../../core/Registry\";\nimport Tree from \"../../../core/Tree\";\nimport Types from \"../../../core/Types\";\nimport { AnnotationMixin } from \"../../../mixins/AnnotationMixin\";\nimport DynamicChildrenMixin from \"../../../mixins/DynamicChildrenMixin\";\nimport PerItemMixin from \"../../../mixins/PerItem\";\nimport PerRegionMixin from \"../../../mixins/PerRegion\";\nimport { ReadOnlyControlMixin } from \"../../../mixins/ReadOnlyMixin\";\nimport RequiredMixin from \"../../../mixins/Required\";\nimport SelectedChoiceMixin from \"../../../mixins/SelectedChoiceMixin\";\nimport { SharedStoreMixin } from \"../../../mixins/SharedChoiceStore/mixin\";\nimport VisibilityMixin from \"../../../mixins/Visibility\";\nimport { parseValue } from \"../../../utils/data\";\nimport {\n FF_DEV_3617,\n FF_LEAP_218,\n FF_LSDV_4583,\n FF_TAXONOMY_ASYNC,\n FF_TAXONOMY_LABELING,\n FF_TAXONOMY_SELECTED,\n isFF,\n} from \"../../../utils/feature-flags\";\nimport ControlBase from \"../Base\";\nimport ClassificationBase from \"../ClassificationBase\";\n\nimport styles from \"./Taxonomy.scss\";\nimport messages from \"../../../utils/messages\";\nimport { errorBuilder } from \"../../../core/DataValidator/ConfigValidator\";\n\n/**\n * @typedef TaxonomyItem\n * @property {string} label\n * @property {string[]} path\n * @property {number} depth\n * @property {string} [hint]\n * @property {string} [color]\n * @property {TaxonomyItem[]} [children]\n * @property {string} [alias]\n */\n\n/**\n * The `Taxonomy` tag is used to create one or more hierarchical classifications, storing both choice selections and their ancestors in the results. Use for nested classification tasks with the `Choice` tag.\n *\n * You can define nested classifications using the `Choice` tag, or retrieve external classifications using the `apiUrl` parameter. For more information on these options, see the [Taxonomy template page](/templates/taxonomy).\n *\n * Use with the following data types: audio, image, HTML, paragraphs, text, time series, video.\n *\n * @example\n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n * @name Taxonomy\n * @meta_title Taxonomy Tag for Hierarchical Labels\n * @meta_description Customize Label Studio with the Taxonomy tag and use hierarchical labels for machine learning and data science projects.\n * @param {string} name - Name of the element\n * @param {string} toName - Name of the element that you want to classify\n * @param {string} [apiUrl] - **Beta** -- Retrieve the taxonomy from a remote source. This can be a JSON-formatted file or a hierarchical data source read as an API. For more information, see the [Taxonomy template page](/templates/taxonomy)\n * @param {boolean} [leafsOnly=false] - Allow annotators to select only leaf nodes of taxonomy\n * @param {boolean} [showFullPath=false] - Whether to show the full path of selected items\n * @param {string} [pathSeparator= / ] - Separator to show in the full path (default is \" / \"). To avoid errors, ensure that your data does not include this separator\n * @param {number} [maxUsages] - Maximum number of times a choice can be selected per task or per region\n * @param {number} [maxWidth] - Maximum width for dropdown\n * @param {number} [minWidth] - Minimum width for dropdown\n * @param {boolean} [required=false] - Whether taxonomy validation is required\n * @param {string} [requiredMessage] - Message to show if validation fails\n * @param {string} [placeholder=] - What to display as prompt on the input\n * @param {boolean} [perRegion] - Use this tag to classify specific regions instead of the whole object\n * @param {boolean} [perItem] - Use this tag to classify specific items inside the object instead of the whole object\n * @param {boolean} [legacy] - Use this tag to enable the legacy version of the Taxonomy tag. The legacy version supports the ability for annotators to add labels as needed. However, when true, the `apiUrl` parameter is not usable.\n */\nconst TagAttrs = types.model({\n toname: types.maybeNull(types.string),\n labeling: types.optional(types.boolean, false),\n leafsonly: types.optional(types.boolean, false),\n showfullpath: types.optional(types.boolean, false),\n legacy: types.optional(types.boolean, false),\n pathseparator: types.optional(types.string, \" / \"),\n apiurl: types.maybeNull(types.string),\n placeholder: \"\",\n minwidth: types.maybeNull(types.string),\n maxwidth: types.maybeNull(types.string),\n dropdownwidth: types.maybeNull(types.string),\n maxusages: types.maybeNull(types.string),\n value: types.optional(types.string, \"\"),\n});\n\nfunction traverse(root) {\n const visitUnique = (nodes, path = []) => {\n const uniq = new Set();\n const result = [];\n\n for (const child of nodes) {\n if (uniq.has(child.value)) continue;\n uniq.add(child.value);\n result.push(visitNode(child, path));\n }\n\n return result;\n };\n\n const visitNode = (node, parents = []) => {\n const label = node.value;\n const hint = node.hint;\n const path = [...parents, node.alias ?? label];\n const depth = parents.length;\n const obj = { label, path, depth, hint };\n\n if (node.color) obj.color = node.color;\n if (node.children) {\n obj.children = visitUnique(node.children, path);\n }\n\n return obj;\n };\n\n if (!root) return [];\n if (!Array.isArray(root)) return visitUnique([root]);\n return visitUnique(root);\n}\n\nconst ChildrenSnapshots = new Map();\n\n/**\n * Taxonomy as a labeling tool should work with results in a different way, similar to per-regions.\n * But it won't create a new result on change if there are none, these items will be used to create labeled region by user.\n */\nconst TaxonomyLabelingResult = types\n .model({})\n .views((self) => ({\n get result() {\n // @todo make it without duplication of ClassificationBase code\n if (!self.isLabeling && !self.perregion) {\n if (self.peritem) {\n return self._perItemResult;\n }\n return self.annotation.results.find((r) => r.from_name === self);\n }\n\n // per-region Taxonomy and Taxonomy as a labeling tool share the same way to find a result,\n // they just display items for current region, attached directly or in result.\n const area = self.annotation.highlightedNode;\n\n if (!area) return null;\n\n return self.annotation.results.find((r) => r.from_name === self && r.area === area);\n },\n get canRemoveItems() {\n if (!self.isLabeling) return true;\n return !self.result;\n },\n }))\n .actions((self) => {\n const Super = {\n updateResult: self.updateResult,\n };\n\n return {\n updateResult() {\n if (!self.isLabeling) return Super.updateResult();\n if (self.result) {\n self.result.area.setValue(self);\n }\n },\n\n /**\n * @param {string[]} path saved value from Taxonomy\n * @returns quazi-label object to act as Label in most places\n */\n findLabel(path) {\n let title = \"\";\n let items = self.items;\n let item;\n\n for (const value of path) {\n item = items?.find((item) => item.path.at(-1) === value);\n\n if (!item) return null;\n\n items = item.children;\n title = self.showfullpath && title ? title + self.pathseparator + item.label : item.label;\n }\n\n const label = { value: title, id: path.join(self.pathseparator) };\n\n if (item.color) {\n // to conform the current format of our Result#style (and it requires parent)\n label.background = item.color;\n label.parent = {};\n }\n\n return label;\n },\n };\n });\n\nconst Model = types\n .model({\n pid: types.optional(types.string, guidGenerator),\n\n type: \"taxonomy\",\n [isFF(FF_DEV_3617) ? \"_children\" : \"children\"]: Types.unionArray([\"choice\"]),\n })\n .volatile(() => ({\n maxUsagesReached: false,\n selected: [],\n loading: true,\n _api: \"\", // will be filled after the first load in updateValue()\n _items: [], // items loaded via API\n }))\n .views((self) =>\n isFF(FF_DEV_3617)\n ? {\n get children() {\n return self._children;\n },\n set children(val) {\n self._children = val;\n },\n get isLabeling() {\n return isFF(FF_TAXONOMY_LABELING) && self.labeling;\n },\n }\n : {},\n )\n .views((self) => ({\n get userLabels() {\n return self.annotation.store.userLabels;\n },\n\n get holdsState() {\n return self.selected.length > 0;\n },\n\n get isSelected() {\n return self.holdsState;\n },\n\n get hasValue() {\n return self.holdsState;\n },\n\n get valueType() {\n return \"taxonomy\";\n },\n\n get tiedChildren() {\n return Tree.filterChildrenOfType(self, \"ChoiceModel\");\n },\n\n get preselectedValues() {\n return self.tiedChildren.filter((c) => c.selected === true && !c.isSkipped).map((c) => c.resultValue);\n },\n\n get isLoadedByApi() {\n return isFF(FF_TAXONOMY_ASYNC) && !!self.apiurl;\n },\n\n get items() {\n if (self.isLoadedByApi) return self._items;\n\n const fromConfig = traverse(self.children);\n const fromUsers = self.userLabels?.controls[self.name] ?? [];\n\n for (const label of fromUsers) {\n let current = { children: fromConfig };\n const { origin, path } = label;\n const lastIndex = path.length - 1;\n\n for (let depth = 0; depth < lastIndex; depth++) {\n current = current.children?.find((item) => item.label === path[depth]);\n if (!current) break;\n }\n\n if (current) {\n if (!current.children) current.children = [];\n current.children.push({ label: path[lastIndex], path, depth: lastIndex, origin });\n }\n }\n\n return fromConfig;\n },\n\n get selectedItems() {\n const full = self.selected.map((path) => {\n /** @type {TaxonomyItem[]} items */\n let items = self.items;\n const levels = [];\n\n for (const value of path) {\n const item = items.find((item) => item.path.at(-1) === value);\n\n levels.push({ label: item?.label ?? value, value });\n items = item?.children ?? [];\n }\n\n return levels;\n });\n\n return full;\n },\n\n get defaultChildType() {\n return \"choice\";\n },\n\n selectedValues() {\n return self.selected;\n },\n\n findItemByValueOrAlias(valueOrAlias) {\n // search the tree of items for the given\n // value or alias match\n const findItem = (items) => {\n for (const item of items) {\n const label = item.label;\n const value = item.path[item.path.length - 1];\n\n // @todo why do we change items??\n item.value = label;\n if (value !== label) {\n item.alias = value;\n }\n\n if (item.value === valueOrAlias || item.alias === valueOrAlias) {\n return item;\n }\n if (item.children) {\n const found = findItem(item.children, valueOrAlias);\n\n if (found) return found;\n }\n }\n };\n\n return findItem(self.items);\n },\n }))\n .actions((self) => ({\n afterAttach() {\n // we are not mixing items from API with other kinds of items\n if (self.isLoadedByApi) return;\n\n const children = ChildrenSnapshots.get(self.name) ?? [];\n\n if (isFF(FF_DEV_3617) && self.store && children.length !== self.children.length) {\n if (isFF(FF_TAXONOMY_SELECTED)) {\n // we have to update it during config parsing to let other code work\n // with correctly added children.\n // looks like there are no obstacles to do it in the same tick\n self.updateChildren();\n } else {\n setTimeout(() => self.updateChildren());\n }\n } else {\n self.loading = false;\n }\n },\n\n /**\n * Load items from `apiUrl` and set them indirectly to `items` (via `_items`)\n * @param {string[]} path to load nested items by this path\n */\n loadItems: flow(function* (path) {\n if (!self._api) return;\n let requestOptions = {};\n\n // will be used only to load children for nested items\n // to check that item exists and requires loading\n let item;\n\n // check that item exists\n if (path) {\n item = { children: self.items };\n for (const level of path) {\n item = item.children?.find((ch) => ch.path.at(-1) === level);\n if (!item) return;\n }\n }\n\n // Tree Select triggers this on every non-leaf node,\n // so load only if this item really needs it\n if (path && (item.isLeaf !== false || item.children)) return;\n\n self.loading = true;\n\n // build url with `path` as array (path ['A', 'BC'] => path=A&path=BC)\n const url = new URL(self._api);\n\n path?.forEach((p) => url.searchParams.append(\"path\", p));\n\n if (url.username && url.password) {\n requestOptions = {\n headers: new Headers({\n Authorization: `Basic ${btoa(`${url.username}:${url.password}`)}`,\n }),\n };\n\n url.username = \"\";\n url.password = \"\";\n }\n\n try {\n const res = yield fetch(url, requestOptions);\n const { ok, status, statusText } = res;\n\n if (!ok) throw new Error(`${status} ${statusText}`);\n\n const dataRaw = yield res.json();\n // @todo temporary to support deprecated API response format (just array, no items)\n const data = dataRaw.items ?? dataRaw;\n const prefix = path ?? [];\n // recursive convertor to internal format\n const convert = (items, path) =>\n items.map(({ alias, children, isLeaf, value, ...rest }) => {\n const item = { label: value, path: [...path, alias ?? value], depth: path.length, isLeaf, ...rest };\n\n if (children) item.children = convert(children, item.path);\n\n return item;\n });\n const items = convert(data, prefix);\n\n if (path) {\n item.children = items;\n self._items = [...self._items];\n } else {\n self._items = items;\n }\n } catch (err) {\n const message = messages.ERR_LOADING_HTTP({ attr: \"apiUrl\", error: String(err), url: self.apiurl });\n\n self.annotationStore.addErrors([errorBuilder.generalError(message)]);\n\n console.error(err);\n }\n\n self.loading = false;\n }),\n\n beforeDestroy() {\n ChildrenSnapshots.delete(self.name);\n },\n\n updateChildren() {\n const children = ChildrenSnapshots.get(self.name) ?? [];\n\n if (children.length) {\n const root = getRoot(self);\n // SharedChoiceStore doesn't call `updateValue()` because it's annotation agnostic,\n // so call it here right after Taxonomy is attached\n const updateChildrenValue = (children) => {\n children?.map((child) => {\n child.updateValue?.(root);\n updateChildrenValue(child.children);\n });\n };\n\n self._children = children;\n self.children = [...children];\n self.store.unlock();\n ChildrenSnapshots.delete(self.name);\n\n updateChildrenValue(self.children);\n }\n\n self.loading = false;\n },\n\n requiredModal() {\n Infomodal.warning(self.requiredmessage || `Taxonomy \"${self.name}\" is required.`);\n },\n\n needsUpdate() {\n if (self.result) self.selected = self.result.mainValue;\n else self.selected = [];\n self.maxUsagesReached = self.selected.length >= self.maxusages;\n },\n\n updateFromResult() {\n self.needsUpdate();\n },\n\n onChange(_node, checked) {\n // don't remove last label from region if region is selected (so canRemoveItems is false)\n // should be checked only for Taxonomy as labbeling tool\n if (self.canRemoveItems === false && !checked.length) return;\n\n self.selected = checked.map((s) => s.path ?? s);\n self.maxUsagesReached = self.selected.length >= self.maxusages;\n self.updateResult();\n },\n\n unselectAll() {\n if (isFF(FF_TAXONOMY_LABELING) && self.isLabeling) self.selected = [];\n },\n\n onAddLabel(path) {\n self.userLabels?.addLabel(self.name, path);\n },\n\n onDeleteLabel(path) {\n self.userLabels?.deleteLabel(self.name, path);\n },\n }))\n .actions((self) => {\n const Super = {\n validate: self.validate,\n };\n\n return {\n validate() {\n if (!Super.validate() || (self.maxusages && self.selected.length > self.maxusages)) return false;\n },\n\n beforeSend() {\n if (self.maxusages && self.selected.length > self.maxusages)\n Infomodal.warning(\n `The number of options selected (${self.selected.length}) exceed the maximum allowed (${self.maxusages}). To proceed, first unselect excess options for:\\r\\n • Taxonomy (${self.name})`,\n );\n },\n };\n })\n .actions((self) => {\n const Super = {\n updateValue: self.updateValue,\n };\n\n return {\n /**\n * Usual method to parse values from task and init data.\n * Will store correct api url and load items from it.\n * Also used for Dynamic Children.\n */\n updateValue: flow(function* (store) {\n if (!self.isLoadedByApi) return Super.updateValue?.(store);\n\n self._api = parseValue(self.apiurl, store.task.dataObj);\n // trying to presign this url if needed and if handler is passed into LSF\n self._api = (yield store.presignUrlForProject(self._api)) ?? self._api;\n\n yield self.loadItems();\n }),\n };\n })\n .preProcessSnapshot((sn) => {\n if (isFF(FF_DEV_3617)) {\n const children = sn._children ?? sn.children;\n\n if (children && !ChildrenSnapshots.has(sn.name)) {\n ChildrenSnapshots.set(sn.name, children);\n }\n\n delete sn._children;\n delete sn.children;\n }\n\n return sn;\n });\n\nconst TaxonomyModel = types.compose(\n \"TaxonomyModel\",\n ControlBase,\n ClassificationBase,\n TagAttrs,\n DynamicChildrenMixin,\n AnnotationMixin,\n RequiredMixin,\n Model,\n ...(isFF(FF_DEV_3617) ? [SharedStoreMixin] : []),\n PerRegionMixin,\n ...(isFF(FF_LSDV_4583) ? [PerItemMixin] : []),\n ...(isFF(FF_TAXONOMY_LABELING) ? [TaxonomyLabelingResult] : []),\n ReadOnlyControlMixin,\n SelectedChoiceMixin,\n VisibilityMixin,\n);\n\nconst HtxTaxonomy = observer(({ item }) => {\n // literal \"taxonomy\" class name is for external styling\n const className = [styles.taxonomy, \"taxonomy\", isFF(FF_TAXONOMY_ASYNC) ? styles.taxonomy__new : \"\"]\n .filter(Boolean)\n .join(\" \");\n const visibleStyle = item.perRegionVisible() && item.isVisible ? {} : { display: \"none\" };\n const options = {\n showFullPath: item.showfullpath,\n leafsOnly: item.leafsonly,\n pathSeparator: item.pathseparator,\n maxUsages: item.maxusages,\n maxWidth: item.maxwidth,\n minWidth: item.minwidth,\n dropdownWidth: item.dropdownwidth,\n placeholder: item.placeholder,\n canRemoveItems: item.canRemoveItems,\n };\n\n // without full api there will be just one initial loading;\n // with full api we should not block UI with spinner on nested requests —\n // they are indicated by loading icon on the item itself\n const firstLoad = item.isLoadedByApi ? !item.items.length : true;\n\n if (item.loading && isFF(FF_DEV_3617) && firstLoad) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n {isFF(FF_TAXONOMY_ASYNC) && !item.legacy ? (\n \n ) : (\n \n )}\n
\n );\n});\n\nRegistry.addTag(\"taxonomy\", TaxonomyModel, HtxTaxonomy);\n\nexport { HtxTaxonomy, TaxonomyModel, TagAttrs };\n","import React from \"react\";\nimport { observer } from \"mobx-react\";\nimport { types } from \"mobx-state-tree\";\n\nimport LabelMixin from \"../../mixins/LabelMixin\";\nimport Registry from \"../../core/Registry\";\nimport SelectedModelMixin from \"../../mixins/SelectedModel\";\nimport Types from \"../../core/Types\";\nimport { HtxLabels, LabelsModel } from \"./Labels/Labels\";\nimport ControlBase from \"./Base\";\n\n/**\n * The `HyperTextLabels` tag creates labeled hyper text (HTML). Use with the HyperText object tag to annotate HTML text or HTML elements for named entity recognition tasks.\n *\n * Use with the following data types: HTML.\n * @example\n * \n * \n * \n * \n * \n * \n * @name HyperTextLabels\n * @regions HyperTextRegion\n * @meta_title Hypertext Label Tag to Create Labeled Hypertext (HTML)\n * @meta_description Customize Label Studio with the HyperTextLabels tag to label hypertext (HTML) for machine learning and data science projects.\n * @param {string} name - Name of the element\n * @param {string} toName - Name of the HTML element to label\n * @param {single|multiple=} [choice=single] - Configure if you can select one or multiple labels\n * @param {number} [maxUsages] - Maximum number of times a label can be used per task\n * @param {boolean} [showInline=true] - Show labels in the same visual line\n */\n\nconst Validation = types.model({\n controlledTags: Types.unionTag([\"HyperText\"]),\n});\n\nconst ModelAttrs = types\n .model(\"HyperTextLabelsModel\", {\n type: \"hypertextlabels\",\n children: Types.unionArray([\"label\", \"header\", \"view\", \"hypertext\"]),\n })\n .views((self) => ({\n get hasStates() {\n const states = self.states();\n\n return states && states.length > 0;\n },\n\n get serializableValue() {\n const obj = {};\n\n obj[self.resultType] = self.selectedValues();\n\n return obj;\n },\n\n get resultType() {\n return \"hypertextlabels\";\n },\n\n get valueType() {\n return \"hypertextlabels\";\n },\n }));\n\nconst Composition = types.compose(\n ControlBase,\n LabelsModel,\n ModelAttrs,\n Validation,\n LabelMixin,\n SelectedModelMixin.props({ _child: \"LabelModel\" }),\n);\n\nconst HyperTextLabelsModel = types.compose(\"HyperTextLabelsModel\", Composition);\n\nconst HtxHyperTextLabels = observer(({ item }) => {\n return ;\n});\n\nRegistry.addTag(\"hypertextlabels\", HyperTextLabelsModel, HtxHyperTextLabels);\n\nexport { HtxHyperTextLabels, HyperTextLabelsModel };\n","import React from \"react\";\nimport { observer } from \"mobx-react\";\nimport { types } from \"mobx-state-tree\";\n\nimport LabelMixin from \"../../mixins/LabelMixin\";\nimport Registry from \"../../core/Registry\";\nimport SelectedModelMixin from \"../../mixins/SelectedModel\";\nimport Types from \"../../core/Types\";\nimport { HtxLabels, LabelsModel } from \"./Labels/Labels\";\nimport { guidGenerator } from \"../../core/Helpers\";\nimport ControlBase from \"./Base\";\n\n/**\n * The `TimeSeriesLabels` tag is used to create a labeled time range.\n *\n * Use with the following data types: time series.\n * @example\n * \n * \n * \n * \n *\n * \n * \n * \n * \n *\n * @name TimeSeriesLabels\n * @meta_title Time Series Label Tag for Labeling Time Series Data\n * @meta_description Customize Label Studio for with the TimeSeriesLabel tag to label time series data for machine learning and data science projects.\n * @param {string} name - Name of the element\n * @param {string} toname - Name of the timeseries to label\n * @param {single|multiple=} [choice=single] - Configure whether you can select one or multiple labels\n * @param {number} [maxUsages] - Maximum number of times a label can be used per task\n * @param {boolean} [showInline=true] - Show labels in the same visual line\n * @param {float=} [opacity=0.9] - Opacity of the range\n * @param {string=} [fillColor=transparent] - Range fill color in hexadecimal or HTML color name\n * @param {string} [strokeColor=#f48a42] - Stroke color in hexadecimal\n * @param {number=} [strokeWidth=1] - Width of the stroke\n */\nconst TagAttrs = types.model({\n opacity: types.optional(types.string, \"0.9\"),\n fillcolor: types.maybeNull(types.string),\n\n strokeWidth: types.optional(types.number, 1),\n strokeColor: types.optional(types.string, \"#f48a42\"),\n});\n\nconst ModelAttrs = types\n .model(\"TimeSeriesLabelesModel\", {\n pid: types.optional(types.string, guidGenerator),\n type: \"timeserieslabels\",\n children: Types.unionArray([\"labels\", \"label\", \"choice\"]),\n })\n .views((self) => ({\n get hasStates() {\n const states = self.states();\n\n return states && states.length > 0;\n },\n\n states() {\n return self.annotation.toNames.get(self.name);\n },\n\n activeStates() {\n const states = self.states();\n\n return states ? states.filter((c) => c.isSelected === true) : null;\n },\n }));\n\nconst Model = LabelMixin.props({ _type: \"timeserieslabels\" }).views((self) => ({\n get shouldBeUnselected() {\n return self.choice === \"single\";\n },\n}));\n\nconst Composition = types.compose(\n ControlBase,\n LabelsModel,\n ModelAttrs,\n TagAttrs,\n Model,\n SelectedModelMixin.props({ _child: \"LabelModel\" }),\n);\n\nconst TimeSeriesLabelsModel = types.compose(\"TimeSeriesLabelsModel\", Composition);\n\nconst HtxTimeSeriesLabels = observer(({ item }) => {\n return ;\n});\n\nRegistry.addTag(\"timeserieslabels\", TimeSeriesLabelsModel, HtxTimeSeriesLabels);\n\nexport { HtxTimeSeriesLabels, TimeSeriesLabelsModel };\n","import { observer } from \"mobx-react\";\nimport { types } from \"mobx-state-tree\";\n\nimport Registry from \"../../core/Registry\";\nimport { guidGenerator } from \"../../core/Helpers\";\nimport SelectedModelMixin from \"../../mixins/SelectedModel\";\nimport ControlBase from \"./Base\";\nimport { HtxLabels, LabelsModel } from \"./Labels/Labels\";\n\n/**\n * Use the TimelineLabels tag to classify video frames. This can be a single frame or a span of frames.\n *\n * First, select a label and then click once to annotate a single frame. Click and drag to annotate multiple frames.\n *\n * ![Screenshot of video with frame classification](../images/timelinelabels.png)\n *\n * Use with the `